@k8slens/extensions 5.4.1-git.cd1f6e1348.0 → 5.4.1-git.d1e4d8e681.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/src/common/fs/write-file.injectable.d.ts +4 -0
  2. package/dist/src/common/k8s-api/endpoints/events.api.d.ts +6 -0
  3. package/dist/src/common/k8s-api/kube-object.d.ts +15 -0
  4. package/dist/src/common/utils/tuple.d.ts +4 -0
  5. package/dist/src/extensions/extension-api.js +56 -34
  6. package/dist/src/main/child-process/spawn.injectable.d.ts +5 -0
  7. package/dist/src/main/context-handler/context-handler.d.ts +4 -1
  8. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.d.ts +13 -0
  9. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.injectable.d.ts +3 -0
  10. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy.injectable.d.ts +3 -1
  11. package/dist/src/main/kube-auth-proxy/kube-auth-proxy-ca.injectable.d.ts +4 -0
  12. package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +3 -1
  13. package/dist/src/main/lens-proxy.d.ts +2 -2
  14. package/dist/src/main/proxy-functions/index.d.ts +1 -1
  15. package/dist/src/main/proxy-functions/{kube-api-request.d.ts → kube-api-upgrade-request.d.ts} +1 -1
  16. package/dist/src/renderer/components/+cluster/cluster-issues.d.ts +2 -3
  17. package/dist/src/renderer/components/+custom-resources/crd-list.d.ts +1 -2
  18. package/dist/src/renderer/components/+custom-resources/crd-resources.d.ts +1 -2
  19. package/dist/src/renderer/components/+events/events.d.ts +0 -1
  20. package/dist/src/renderer/components/dock/__test__/dock-store.test.d.ts +5 -0
  21. package/dist/src/renderer/components/dock/dock/store.d.ts +1 -0
  22. package/dist/src/renderer/components/dock/dock-tab.d.ts +0 -1
  23. package/dist/src/renderer/components/duration/reactive-duration.d.ts +13 -0
  24. package/dist/src/renderer/components/kube-object/age.d.ts +14 -0
  25. package/dist/src/renderer/hooks/index.d.ts +1 -0
  26. package/dist/src/renderer/hooks/useResizeObserver.d.ts +5 -0
  27. package/package.json +1 -1
@@ -14555,7 +14555,7 @@ eval("var stream = __webpack_require__(/*! stream */ \"stream\")\n\n\nfunction i
14555
14555
  \**************************************************/
14556
14556
  /***/ ((module) => {
14557
14557
 
14558
- eval("!function(e,t){ true?module.exports=t():0}(self,(function(){return e={1238:e=>{\"use strict\";e.exports={version:\"17.5.0\"}},7629:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(9474),o=r(1687),i=r(8652),l=r(8160),c=r(3292),u=r(6354),f=r(8901),m=r(9708),h=r(6914),d=r(2294),p=r(6133),g=r(1152),y=r(8863),b=r(2036),v={Base:class{constructor(e){this.type=e,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new d.Ids,this._preferences=null,this._refs=new p.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return s(\"function\"==typeof m.describe,\"Manifest functionality disabled\"),m.describe(this)}allow(...e){return l.verifyFlat(e,\"allow\"),this._values(e,\"_valids\")}alter(e){s(e&&\"object\"==typeof e&&!Array.isArray(e),\"Invalid targets argument\"),s(!this._inRuleset(),\"Cannot set alterations inside a ruleset\");const t=this.clone();t.$_terms.alterations=t.$_terms.alterations||[];for(const r in e){const n=e[r];s(\"function\"==typeof n,\"Alteration adjuster for\",r,\"must be a function\"),t.$_terms.alterations.push({target:r,adjuster:n})}return t.$_temp.ruleset=!1,t}artifact(e){return s(void 0!==e,\"Artifact cannot be undefined\"),s(!this._cache,\"Cannot set an artifact with a rule cache\"),this.$_setFlag(\"artifact\",e)}cast(e){return s(!1===e||\"string\"==typeof e,\"Invalid to value\"),s(!1===e||this._definition.cast[e],\"Type\",this.type,\"does not support casting to\",e),this.$_setFlag(\"cast\",!1===e?void 0:e)}default(e,t){return this._default(\"default\",e,t)}description(e){return s(e&&\"string\"==typeof e,\"Description must be a non-empty string\"),this.$_setFlag(\"description\",e)}empty(e){const t=this.clone();return void 0!==e&&(e=t.$_compile(e,{override:!1})),t.$_setFlag(\"empty\",e,{clone:!1})}error(e){return s(e,\"Missing error\"),s(e instanceof Error||\"function\"==typeof e,\"Must provide a valid Error object or a function\"),this.$_setFlag(\"error\",e)}example(e,t={}){return s(void 0!==e,\"Missing example\"),l.assertOptions(t,[\"override\"]),this._inner(\"examples\",e,{single:!0,override:t.override})}external(e,t){return\"object\"==typeof e&&(s(!t,\"Cannot combine options with description\"),t=e.description,e=e.method),s(\"function\"==typeof e,\"Method must be a function\"),s(void 0===t||t&&\"string\"==typeof t,\"Description must be a non-empty string\"),this._inner(\"externals\",{method:e,description:t},{single:!0})}failover(e,t){return this._default(\"failover\",e,t)}forbidden(){return this.presence(\"forbidden\")}id(e){return e?(s(\"string\"==typeof e,\"id must be a non-empty string\"),s(/^[^\\.]+$/.test(e),\"id cannot contain period character\"),this.$_setFlag(\"id\",e)):this.$_setFlag(\"id\",void 0)}invalid(...e){return this._values(e,\"_invalids\")}label(e){return s(e&&\"string\"==typeof e,\"Label name must be a non-empty string\"),this.$_setFlag(\"label\",e)}meta(e){return s(void 0!==e,\"Meta cannot be undefined\"),this._inner(\"metas\",e,{single:!0})}note(...e){s(e.length,\"Missing notes\");for(const t of e)s(t&&\"string\"==typeof t,\"Notes must be non-empty strings\");return this._inner(\"notes\",e)}only(e=!0){return s(\"boolean\"==typeof e,\"Invalid mode:\",e),this.$_setFlag(\"only\",e)}optional(){return this.presence(\"optional\")}prefs(e){s(e,\"Missing preferences\"),s(void 0===e.context,\"Cannot override context\"),s(void 0===e.externals,\"Cannot override externals\"),s(void 0===e.warnings,\"Cannot override warnings\"),s(void 0===e.debug,\"Cannot override debug\"),l.checkPreferences(e);const t=this.clone();return t._preferences=l.preferences(t._preferences,e),t}presence(e){return s([\"optional\",\"required\",\"forbidden\"].includes(e),\"Unknown presence mode\",e),this.$_setFlag(\"presence\",e)}raw(e=!0){return this.$_setFlag(\"result\",e?\"raw\":void 0)}result(e){return s([\"raw\",\"strip\"].includes(e),\"Unknown result mode\",e),this.$_setFlag(\"result\",e)}required(){return this.presence(\"required\")}strict(e){const t=this.clone(),r=void 0!==e&&!e;return t._preferences=l.preferences(t._preferences,{convert:r}),t}strip(e=!0){return this.$_setFlag(\"result\",e?\"strip\":void 0)}tag(...e){s(e.length,\"Missing tags\");for(const t of e)s(t&&\"string\"==typeof t,\"Tags must be non-empty strings\");return this._inner(\"tags\",e)}unit(e){return s(e&&\"string\"==typeof e,\"Unit name must be a non-empty string\"),this.$_setFlag(\"unit\",e)}valid(...e){l.verifyFlat(e,\"valid\");const t=this.allow(...e);return t.$_setFlag(\"only\",!!t._valids,{clone:!1}),t}when(e,t){const r=this.clone();r.$_terms.whens||(r.$_terms.whens=[]);const n=c.when(r,e,t);if(![\"any\",\"link\"].includes(r.type)){const e=n.is?[n]:n.switch;for(const t of e)s(!t.then||\"any\"===t.then.type||t.then.type===r.type,\"Cannot combine\",r.type,\"with\",t.then&&t.then.type),s(!t.otherwise||\"any\"===t.otherwise.type||t.otherwise.type===r.type,\"Cannot combine\",r.type,\"with\",t.otherwise&&t.otherwise.type)}return r.$_terms.whens.push(n),r.$_mutateRebuild()}cache(e){s(!this._inRuleset(),\"Cannot set caching inside a ruleset\"),s(!this._cache,\"Cannot override schema cache\"),s(void 0===this._flags.artifact,\"Cannot cache a rule with an artifact\");const t=this.clone();return t._cache=e||i.provider.provision(),t.$_temp.ruleset=!1,t}clone(){const e=Object.create(Object.getPrototypeOf(this));return this._assign(e)}concat(e){s(l.isSchema(e),\"Invalid schema object\"),s(\"any\"===this.type||\"any\"===e.type||e.type===this.type,\"Cannot merge type\",this.type,\"with another type:\",e.type),s(!this._inRuleset(),\"Cannot concatenate onto a schema with open ruleset\"),s(!e._inRuleset(),\"Cannot concatenate a schema with open ruleset\");let t=this.clone();if(\"any\"===this.type&&\"any\"!==e.type){const r=e.clone();for(const e of Object.keys(t))\"type\"!==e&&(r[e]=t[e]);t=r}t._ids.concat(e._ids),t._refs.register(e,p.toSibling),t._preferences=t._preferences?l.preferences(t._preferences,e._preferences):e._preferences,t._valids=b.merge(t._valids,e._valids,e._invalids),t._invalids=b.merge(t._invalids,e._invalids,e._valids);for(const r of e._singleRules.keys())t._singleRules.has(r)&&(t._rules=t._rules.filter((e=>e.keep||e.name!==r)),t._singleRules.delete(r));for(const r of e._rules)e._definition.rules[r.method].multi||t._singleRules.set(r.name,r),t._rules.push(r);if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);const r=Object.assign({},e._flags);delete r.empty,o(t._flags,r)}else if(e._flags.empty){t._flags.empty=e._flags.empty;const r=Object.assign({},e._flags);delete r.empty,o(t._flags,r)}else o(t._flags,e._flags);for(const r in e.$_terms){const s=e.$_terms[r];s?t.$_terms[r]?t.$_terms[r]=t.$_terms[r].concat(s):t.$_terms[r]=s.slice():t.$_terms[r]||(t.$_terms[r]=s)}return this.$_root._tracer&&this.$_root._tracer._combine(t,[this,e]),t.$_mutateRebuild()}extend(e){return s(!e.base,\"Cannot extend type with another base\"),f.type(this,e)}extract(e){return e=Array.isArray(e)?e:e.split(\".\"),this._ids.reach(e)}fork(e,t){s(!this._inRuleset(),\"Cannot fork inside a ruleset\");let r=this;for(let s of[].concat(e))s=Array.isArray(s)?s:s.split(\".\"),r=r._ids.fork(s,t,r);return r.$_temp.ruleset=!1,r}rule(e){const t=this._definition;l.assertOptions(e,Object.keys(t.modifiers)),s(!1!==this.$_temp.ruleset,\"Cannot apply rules to empty ruleset or the last rule added does not support rule properties\");const r=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;s(r>=0&&r<this._rules.length,\"Cannot apply rules to empty ruleset\");const a=this.clone();for(let o=r;o<a._rules.length;++o){const r=a._rules[o],i=n(r);for(const n in e)t.modifiers[n](i,e[n]),s(i.name===r.name,\"Cannot change rule name\");a._rules[o]=i,a._singleRules.get(i.name)===r&&a._singleRules.set(i.name,i)}return a.$_temp.ruleset=!1,a.$_mutateRebuild()}get ruleset(){s(!this._inRuleset(),\"Cannot start a new ruleset without closing the previous one\");const e=this.clone();return e.$_temp.ruleset=e._rules.length,e}get $(){return this.ruleset}tailor(e){e=[].concat(e),s(!this._inRuleset(),\"Cannot tailor inside a ruleset\");let t=this;if(this.$_terms.alterations)for(const{target:r,adjuster:n}of this.$_terms.alterations)e.includes(r)&&(t=n(t),s(l.isSchema(t),\"Alteration adjuster for\",r,\"failed to return a schema object\"));return t=t.$_modify({each:t=>t.tailor(e),ref:!1}),t.$_temp.ruleset=!1,t.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(e,t){return y.entry(e,this,t)}validateAsync(e,t){return y.entryAsync(e,this,t)}$_addRule(e){\"string\"==typeof e&&(e={name:e}),s(e&&\"object\"==typeof e,\"Invalid options\"),s(e.name&&\"string\"==typeof e.name,\"Invalid rule name\");for(const t in e)s(\"_\"!==t[0],\"Cannot set private rule properties\");const t=Object.assign({},e);t._resolve=[],t.method=t.method||t.name;const r=this._definition.rules[t.method],n=t.args;s(r,\"Unknown rule\",t.method);const a=this.clone();if(n){s(1===Object.keys(n).length||Object.keys(n).length===this._definition.rules[t.name].args.length,\"Invalid rule definition for\",this.type,t.name);for(const e in n){let o=n[e];if(void 0!==o){if(r.argsByName){const i=r.argsByName.get(e);if(i.ref&&l.isResolvable(o))t._resolve.push(e),a.$_mutateRegister(o);else if(i.normalize&&(o=i.normalize(o),n[e]=o),i.assert){const t=l.validateArg(o,e,i);s(!t,t,\"or reference\")}}n[e]=o}else delete n[e]}}return r.multi||(a._ruleRemove(t.name,{clone:!1}),a._singleRules.set(t.name,t)),!1===a.$_temp.ruleset&&(a.$_temp.ruleset=null),r.priority?a._rules.unshift(t):a._rules.push(t),a}$_compile(e,t){return c.schema(this.$_root,e,t)}$_createError(e,t,r,s,n,a={}){const o=!1!==a.flags?this._flags:{},i=a.messages?h.merge(this._definition.messages,a.messages):this._definition.messages;return new u.Report(e,t,r,o,i,s,n)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){return e=Array.isArray(e)?e:e.split(\".\"),this._ids.labels(e)}$_match(e,t,r,s){(r=Object.assign({},r)).abortEarly=!0,r._externals=!1,t.snapshot();const n=!y.validate(e,this,t,r,s).errors;return t.restore(),n}$_modify(e){return l.assertOptions(e,[\"each\",\"once\",\"ref\",\"schema\"]),d.schema(this,e)||this}$_mutateRebuild(){return s(!this._inRuleset(),\"Cannot add this rule inside a ruleset\"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(e,{source:t,name:r,path:s,key:n})=>{const a=this._definition[t][r]&&this._definition[t][r].register;!1!==a&&this.$_mutateRegister(e,{family:a,key:n})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(e,{family:t,key:r}={}){this._refs.register(e,t),this._ids.register(e,{key:r})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t,r={}){s(\"_\"===e[0]||!this._inRuleset(),\"Cannot set flag inside a ruleset\");const n=this._definition.flags[e]||{};if(a(t,n.default)&&(t=void 0),a(t,this._flags[e]))return this;const o=!1!==r.clone?this.clone():this;return void 0!==t?(o._flags[e]=t,o.$_mutateRegister(t)):delete o._flags[e],\"_\"!==e[0]&&(o.$_temp.ruleset=!1),o}$_parent(e,...t){return this[e][l.symbols.parent].call(this,...t)}$_validate(e,t,r){return y.validate(e,this,t,r)}_assign(e){e.type=this.type,e.$_root=this.$_root,e.$_temp=Object.assign({},this.$_temp),e.$_temp.whens={},e._ids=this._ids.clone(),e._preferences=this._preferences,e._valids=this._valids&&this._valids.clone(),e._invalids=this._invalids&&this._invalids.clone(),e._rules=this._rules.slice(),e._singleRules=n(this._singleRules,{shallow:!0}),e._refs=this._refs.clone(),e._flags=Object.assign({},this._flags),e._cache=null,e.$_terms={};for(const t in this.$_terms)e.$_terms[t]=this.$_terms[t]?this.$_terms[t].slice():null;e.$_super={};for(const t in this.$_super)e.$_super[t]=this._super[t].bind(e);return e}_bare(){const e=this.clone();e._reset();const t=e._definition.terms;for(const r in t){const s=t[r];e.$_terms[r]=s.init}return e.$_mutateRebuild()}_default(e,t,r={}){return l.assertOptions(r,\"literal\"),s(void 0!==t,\"Missing\",e,\"value\"),s(\"function\"==typeof t||!r.literal,\"Only function value supports literal option\"),\"function\"==typeof t&&r.literal&&(t={[l.symbols.literal]:!0,literal:t}),this.$_setFlag(e,t)}_generate(e,t,r){if(!this.$_terms.whens)return{schema:this};const s=[],n=[];for(let a=0;a<this.$_terms.whens.length;++a){const o=this.$_terms.whens[a];if(o.concat){s.push(o.concat),n.push(\"\".concat(a,\".concat\"));continue}const i=o.ref?o.ref.resolve(e,t,r):e,l=o.is?[o]:o.switch,c=n.length;for(let c=0;c<l.length;++c){const{is:u,then:f,otherwise:m}=l[c],h=\"\".concat(a).concat(o.switch?\".\"+c:\"\");if(u.$_match(i,t.nest(u,\"\".concat(h,\".is\")),r)){if(f){const a=t.localize([...t.path,\"\".concat(h,\".then\")],t.ancestors,t.schemas),{schema:o,id:i}=f._generate(e,a,r);s.push(o),n.push(\"\".concat(h,\".then\").concat(i?\"(\".concat(i,\")\"):\"\"));break}}else if(m){const a=t.localize([...t.path,\"\".concat(h,\".otherwise\")],t.ancestors,t.schemas),{schema:o,id:i}=m._generate(e,a,r);s.push(o),n.push(\"\".concat(h,\".otherwise\").concat(i?\"(\".concat(i,\")\"):\"\"));break}}if(o.break&&n.length>c)break}const a=n.join(\", \");if(t.mainstay.tracer.debug(t,\"rule\",\"when\",a),!a)return{schema:this};if(!t.mainstay.tracer.active&&this.$_temp.whens[a])return{schema:this.$_temp.whens[a],id:a};let o=this;this._definition.generate&&(o=this._definition.generate(this,e,t,r));for(const e of s)o=o.concat(e);return this.$_root._tracer&&this.$_root._tracer._combine(o,[this,...s]),this.$_temp.whens[a]=o,{schema:o,id:a}}_inner(e,t,r={}){s(!this._inRuleset(),\"Cannot set \".concat(e,\" inside a ruleset\"));const n=this.clone();return n.$_terms[e]&&!r.override||(n.$_terms[e]=[]),r.single?n.$_terms[e].push(t):n.$_terms[e].push(...t),n.$_temp.ruleset=!1,n}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(e,t={}){if(!this._singleRules.has(e))return this;const r=!1!==t.clone?this.clone():this;r._singleRules.delete(e);const s=[];for(let t=0;t<r._rules.length;++t){const n=r._rules[t];n.name!==e||n.keep?s.push(n):r._inRuleset()&&t<r.$_temp.ruleset&&--r.$_temp.ruleset}return r._rules=s,r}_values(e,t){l.verifyFlat(e,t.slice(1,-1));const r=this.clone(),n=e[0]===l.symbols.override;if(n&&(e=e.slice(1)),!r[t]&&e.length?r[t]=new b:n&&(r[t]=e.length?new b:null,r.$_mutateRebuild()),!r[t])return r;n&&r[t].override();for(const n of e){s(void 0!==n,\"Cannot call allow/valid/invalid with undefined\"),s(n!==l.symbols.override,\"Override must be the first value\");const e=\"_invalids\"===t?\"_valids\":\"_invalids\";r[e]&&(r[e].remove(n),r[e].length||(s(\"_valids\"===t||!r._flags.only,\"Setting invalid value\",n,\"leaves schema rejecting all values due to previous valid rule\"),r[e]=null)),r[t].add(n,r._refs)}return r}}};v.Base.prototype[l.symbols.any]={version:l.version,compile:c.compile,root:\"$_root\"},v.Base.prototype.isImmutable=!0,v.Base.prototype.deny=v.Base.prototype.invalid,v.Base.prototype.disallow=v.Base.prototype.invalid,v.Base.prototype.equal=v.Base.prototype.valid,v.Base.prototype.exist=v.Base.prototype.required,v.Base.prototype.not=v.Base.prototype.invalid,v.Base.prototype.options=v.Base.prototype.prefs,v.Base.prototype.preferences=v.Base.prototype.prefs,e.exports=new v.Base},8652:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(8160),o={max:1e3,supported:new Set([\"undefined\",\"boolean\",\"number\",\"string\"])};t.provider={provision:e=>new o.Cache(e)},o.Cache=class{constructor(e={}){a.assertOptions(e,[\"max\"]),s(void 0===e.max||e.max&&e.max>0&&isFinite(e.max),\"Invalid max cache size\"),this._max=e.max||o.max,this._map=new Map,this._list=new o.List}get length(){return this._map.size}set(e,t){if(null!==e&&!o.supported.has(typeof e))return;let r=this._map.get(e);if(r)return r.value=t,void this._list.first(r);r=this._list.unshift({key:e,value:t}),this._map.set(e,r),this._compact()}get(e){const t=this._map.get(e);if(t)return this._list.first(t),n(t.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},o.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:t,prev:r}=e;return t.prev=r,r&&(r.next=t),e===this.tail&&(this.tail=t),e.prev=null,e.next=null,e}}},8160:(e,t,r)=>{\"use strict\";const s=r(375),n=r(7916),a=r(1238);let o,i;const l={isoDate:/^(?:[-+]\\d{2})?(?:\\d{4}(?!\\d{2}\\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\\1(?:[12]\\d|0[1-9]|3[01]))?|W(?:[0-4]\\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\\d|[12]\\d{2}|3(?:[0-5]\\d|6[1-6])))(?![T]$|[T][\\d]+Z$)(?:[T\\s](?:(?:(?:[01]\\d|2[0-3])(?:(:?)[0-5]\\d)?|24\\:?00)(?:[.,]\\d+(?!:))?)(?:\\2[0-5]\\d(?:[.,]\\d+)?)?(?:[Z]|(?:[+-])(?:[01]\\d|2[0-3])(?::?[0-5]\\d)?)?)?)?$/};t.version=a.version,t.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:\"iso\",errors:{escapeHtml:!1,label:\"path\",language:null,render:!0,stack:!1,wrap:{label:'\"',array:\"[]\"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:\"optional\",skipFunctions:!1,stripUnknown:!1,warnings:!1},t.symbols={any:Symbol.for(\"@hapi/joi/schema\"),arraySingle:Symbol(\"arraySingle\"),deepDefault:Symbol(\"deepDefault\"),errors:Symbol(\"errors\"),literal:Symbol(\"literal\"),override:Symbol(\"override\"),parent:Symbol(\"parent\"),prefs:Symbol(\"prefs\"),ref:Symbol(\"ref\"),template:Symbol(\"template\"),values:Symbol(\"values\")},t.assertOptions=function(e,t,r=\"Options\"){s(e&&\"object\"==typeof e&&!Array.isArray(e),\"Options must be of type object\");const n=Object.keys(e).filter((e=>!t.includes(e)));s(0===n.length,\"\".concat(r,\" contain unknown keys: \").concat(n))},t.checkPreferences=function(e){i=i||r(3378);const t=i.preferences.validate(e);if(t.error)throw new n([t.error.details[0].message])},t.compare=function(e,t,r){switch(r){case\"=\":return e===t;case\">\":return e>t;case\"<\":return e<t;case\">=\":return e>=t;case\"<=\":return e<=t}},t.default=function(e,t){return void 0===e?t:e},t.isIsoDate=function(e){return l.isoDate.test(e)},t.isNumber=function(e){return\"number\"==typeof e&&!isNaN(e)},t.isResolvable=function(e){return!!e&&(e[t.symbols.ref]||e[t.symbols.template])},t.isSchema=function(e,r={}){const n=e&&e[t.symbols.any];return!!n&&(s(r.legacy||n.version===t.version,\"Cannot mix different versions of joi schemas\"),!0)},t.isValues=function(e){return e[t.symbols.values]},t.limit=function(e){return Number.isSafeInteger(e)&&e>=0},t.preferences=function(e,s){o=o||r(6914),e=e||{},s=s||{};const n=Object.assign({},e,s);return s.errors&&e.errors&&(n.errors=Object.assign({},e.errors,s.errors),n.errors.wrap=Object.assign({},e.errors.wrap,s.errors.wrap)),s.messages&&(n.messages=o.compile(s.messages,e.messages)),delete n[t.symbols.prefs],n},t.tryWithPath=function(e,t,r={}){try{return e()}catch(e){throw void 0!==e.path?e.path=t+\".\"+e.path:e.path=t,r.append&&(e.message=\"\".concat(e.message,\" (\").concat(e.path,\")\")),e}},t.validateArg=function(e,r,{assert:s,message:n}){if(t.isSchema(s)){const t=s.validate(e);if(!t.error)return;return t.error.message}if(!s(e))return r?\"\".concat(r,\" \").concat(n):n},t.verifyFlat=function(e,t){for(const r of e)s(!Array.isArray(r),\"Method no longer accepts array arguments:\",t)}},3292:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8160),a=r(6133),o={};t.schema=function(e,t,r={}){n.assertOptions(r,[\"appendPath\",\"override\"]);try{return o.schema(e,t,r)}catch(e){throw r.appendPath&&void 0!==e.path&&(e.message=\"\".concat(e.message,\" (\").concat(e.path,\")\")),e}},o.schema=function(e,t,r){s(void 0!==t,\"Invalid undefined schema\"),Array.isArray(t)&&(s(t.length,\"Invalid empty array schema\"),1===t.length&&(t=t[0]));const a=(t,...s)=>!1!==r.override?t.valid(e.override,...s):t.valid(...s);if(o.simple(t))return a(e,t);if(\"function\"==typeof t)return e.custom(t);if(s(\"object\"==typeof t,\"Invalid schema content:\",typeof t),n.isResolvable(t))return a(e,t);if(n.isSchema(t))return t;if(Array.isArray(t)){for(const r of t)if(!o.simple(r))return e.alternatives().try(...t);return a(e,...t)}return t instanceof RegExp?e.string().regex(t):t instanceof Date?a(e.date(),t):(s(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),\"Schema can only contain plain objects\"),e.object().keys(t))},t.ref=function(e,t){return a.isRef(e)?e:a.create(e,t)},t.compile=function(e,r,a={}){n.assertOptions(a,[\"legacy\"]);const i=r&&r[n.symbols.any];if(i)return s(a.legacy||i.version===n.version,\"Cannot mix different versions of joi schemas:\",i.version,n.version),r;if(\"object\"!=typeof r||!a.legacy)return t.schema(e,r,{appendPath:!0});const l=o.walk(r);return l?l.compile(l.root,r):t.schema(e,r,{appendPath:!0})},o.walk=function(e){if(\"object\"!=typeof e)return null;if(Array.isArray(e)){for(const t of e){const e=o.walk(t);if(e)return e}return null}const t=e[n.symbols.any];if(t)return{root:e[t.root],compile:t.compile};s(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),\"Schema can only contain plain objects\");for(const t in e){const r=o.walk(e[t]);if(r)return r}return null},o.simple=function(e){return null===e||[\"boolean\",\"string\",\"number\"].includes(typeof e)},t.when=function(e,r,i){if(void 0===i&&(s(r&&\"object\"==typeof r,\"Missing options\"),i=r,r=a.create(\".\")),Array.isArray(i)&&(i={switch:i}),n.assertOptions(i,[\"is\",\"not\",\"then\",\"otherwise\",\"switch\",\"break\"]),n.isSchema(r))return s(void 0===i.is,'\"is\" can not be used with a schema condition'),s(void 0===i.not,'\"not\" can not be used with a schema condition'),s(void 0===i.switch,'\"switch\" can not be used with a schema condition'),o.condition(e,{is:r,then:i.then,otherwise:i.otherwise,break:i.break});if(s(a.isRef(r)||\"string\"==typeof r,\"Invalid condition:\",r),s(void 0===i.not||void 0===i.is,'Cannot combine \"is\" with \"not\"'),void 0===i.switch){let l=i;void 0!==i.not&&(l={is:i.not,then:i.otherwise,otherwise:i.then,break:i.break});let c=void 0!==l.is?e.$_compile(l.is):e.$_root.invalid(null,!1,0,\"\").required();return s(void 0!==l.then||void 0!==l.otherwise,'options must have at least one of \"then\", \"otherwise\", or \"switch\"'),s(void 0===l.break||void 0===l.then||void 0===l.otherwise,\"Cannot specify then, otherwise, and break all together\"),void 0===i.is||a.isRef(i.is)||n.isSchema(i.is)||(c=c.required()),o.condition(e,{ref:t.ref(r),is:c,then:l.then,otherwise:l.otherwise,break:l.break})}s(Array.isArray(i.switch),'\"switch\" must be an array'),s(void 0===i.is,'Cannot combine \"switch\" with \"is\"'),s(void 0===i.not,'Cannot combine \"switch\" with \"not\"'),s(void 0===i.then,'Cannot combine \"switch\" with \"then\"');const l={ref:t.ref(r),switch:[],break:i.break};for(let t=0;t<i.switch.length;++t){const r=i.switch[t],o=t===i.switch.length-1;n.assertOptions(r,o?[\"is\",\"then\",\"otherwise\"]:[\"is\",\"then\"]),s(void 0!==r.is,'Switch statement missing \"is\"'),s(void 0!==r.then,'Switch statement missing \"then\"');const c={is:e.$_compile(r.is),then:e.$_compile(r.then)};if(a.isRef(r.is)||n.isSchema(r.is)||(c.is=c.is.required()),o){s(void 0===i.otherwise||void 0===r.otherwise,'Cannot specify \"otherwise\" inside and outside a \"switch\"');const t=void 0!==i.otherwise?i.otherwise:r.otherwise;void 0!==t&&(s(void 0===l.break,\"Cannot specify both otherwise and break\"),c.otherwise=e.$_compile(t))}l.switch.push(c)}return l},o.condition=function(e,t){for(const r of[\"then\",\"otherwise\"])void 0===t[r]?delete t[r]:t[r]=e.$_compile(t[r]);return t}},6354:(e,t,r)=>{\"use strict\";const s=r(5688),n=r(8160),a=r(3328);t.Report=class{constructor(e,r,s,n,a,o,i){if(this.code=e,this.flags=n,this.messages=a,this.path=o.path,this.prefs=i,this.state=o,this.value=r,this.message=null,this.template=null,this.local=s||{},this.local.label=t.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty(\"value\")||(this.local.value=this.value),this.path.length){const e=this.path[this.path.length-1];\"object\"!=typeof e&&(this.local.key=e)}}_setTemplate(e){if(this.template=e,!this.flags.label&&0===this.path.length){const e=this._template(this.template,\"root\");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const e=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===t?'Error code \"'.concat(e,'\" is not defined, your custom type is missing the correct messages definition'):(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^\"\" /,\"\").trim()),this.message)}_template(e,r){return t.template(this.value,e,r||this.code,this.state,this.prefs)}},t.path=function(e){let t=\"\";for(const r of e)\"object\"!=typeof r&&(\"string\"==typeof r?(t&&(t+=\".\"),t+=r):t+=\"[\".concat(r,\"]\"));return t},t.template=function(e,t,r,s,o){if(!t)return;if(a.isTemplate(t))return\"root\"!==r?t:null;let i=o.errors.language;if(n.isResolvable(i)&&(i=i.resolve(e,s,o)),i&&t[i]){if(void 0!==t[i][r])return t[i][r];if(void 0!==t[i][\"*\"])return t[i][\"*\"]}return t[r]?t[r]:t[\"*\"]},t.label=function(e,r,s,n){if(e.label)return e.label;if(!s.errors.label)return\"\";let a=r.path;\"key\"===s.errors.label&&r.path.length>1&&(a=r.path.slice(-1));return t.path(a)||t.template(null,s.messages,\"root\",r,s)||n&&t.template(null,n,\"root\",r,s)||\"value\"},t.process=function(e,r,s){if(!e)return null;const{override:n,message:a,details:o}=t.details(e);if(n)return n;if(s.errors.stack)return new t.ValidationError(a,o,r);const i=Error.stackTraceLimit;Error.stackTraceLimit=0;const l=new t.ValidationError(a,o,r);return Error.stackTraceLimit=i,l},t.details=function(e,t={}){let r=[];const s=[];for(const n of e){if(n instanceof Error){if(!1!==t.override)return{override:n};const e=n.toString();r.push(e),s.push({message:e,type:\"override\",context:{error:n}});continue}const e=n.toString();r.push(e),s.push({message:e,path:n.path.filter((e=>\"object\"!=typeof e)),type:n.code,context:n.local})}return r.length>1&&(r=[...new Set(r)]),{message:r.join(\". \"),details:s}},t.ValidationError=class extends Error{constructor(e,t,r){super(e),this._original=r,this.details=t}static isError(e){return e instanceof t.ValidationError}},t.ValidationError.prototype.isJoi=!0,t.ValidationError.prototype.name=\"ValidationError\",t.ValidationError.prototype.annotate=s.error},8901:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(8160),o=r(6914),i={};t.type=function(e,t){const r=Object.getPrototypeOf(e),l=n(r),c=e._assign(Object.create(l)),u=Object.assign({},t);delete u.base,l._definition=u;const f=r._definition||{};u.messages=o.merge(f.messages,u.messages),u.properties=Object.assign({},f.properties,u.properties),c.type=u.type,u.flags=Object.assign({},f.flags,u.flags);const m=Object.assign({},f.terms);if(u.terms)for(const e in u.terms){const t=u.terms[e];s(void 0===c.$_terms[e],\"Invalid term override for\",u.type,e),c.$_terms[e]=t.init,m[e]=t}u.terms=m,u.args||(u.args=f.args),u.prepare=i.prepare(u.prepare,f.prepare),u.coerce&&(\"function\"==typeof u.coerce&&(u.coerce={method:u.coerce}),u.coerce.from&&!Array.isArray(u.coerce.from)&&(u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)})),u.coerce=i.coerce(u.coerce,f.coerce),u.validate=i.validate(u.validate,f.validate);const h=Object.assign({},f.rules);if(u.rules)for(const e in u.rules){const t=u.rules[e];s(\"object\"==typeof t,\"Invalid rule definition for\",u.type,e);let r=t.method;if(void 0===r&&(r=function(){return this.$_addRule(e)}),r&&(s(!l[e],\"Rule conflict in\",u.type,e),l[e]=r),s(!h[e],\"Rule conflict in\",u.type,e),h[e]=t,t.alias){const e=[].concat(t.alias);for(const r of e)l[r]=t.method}t.args&&(t.argsByName=new Map,t.args=t.args.map((e=>(\"string\"==typeof e&&(e={name:e}),s(!t.argsByName.has(e.name),\"Duplicated argument name\",e.name),a.isSchema(e.assert)&&(e.assert=e.assert.strict().label(e.name)),t.argsByName.set(e.name,e),e))))}u.rules=h;const d=Object.assign({},f.modifiers);if(u.modifiers)for(const e in u.modifiers){s(!l[e],\"Rule conflict in\",u.type,e);const t=u.modifiers[e];s(\"function\"==typeof t,\"Invalid modifier definition for\",u.type,e);const r=function(t){return this.rule({[e]:t})};l[e]=r,d[e]=t}if(u.modifiers=d,u.overrides){l._super=r,c.$_super={};for(const e in u.overrides)s(r[e],\"Cannot override missing\",e),u.overrides[e][a.symbols.parent]=r[e],c.$_super[e]=r[e].bind(c);Object.assign(l,u.overrides)}u.cast=Object.assign({},f.cast,u.cast);const p=Object.assign({},f.manifest,u.manifest);return p.build=i.build(u.manifest&&u.manifest.build,f.manifest&&f.manifest.build),u.manifest=p,u.rebuild=i.rebuild(u.rebuild,f.rebuild),c},i.build=function(e,t){return e&&t?function(r,s){return t(e(r,s),s)}:e||t},i.coerce=function(e,t){return e&&t?{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(r,s){let n;if((!t.from||t.from.includes(typeof r))&&(n=t.method(r,s),n)){if(n.errors||void 0===n.value)return n;r=n.value}if(!e.from||e.from.includes(typeof r)){const t=e.method(r,s);if(t)return t}return n}}:e||t},i.prepare=function(e,t){return e&&t?function(r,s){const n=e(r,s);if(n){if(n.errors||void 0===n.value)return n;r=n.value}return t(r,s)||n}:e||t},i.rebuild=function(e,t){return e&&t?function(r){t(r),e(r)}:e||t},i.validate=function(e,t){return e&&t?function(r,s){const n=t(r,s);if(n){if(n.errors&&(!Array.isArray(n.errors)||n.errors.length))return n;r=n.value}return e(r,s)||n}:e||t}},5107:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(8652),o=r(8160),i=r(3292),l=r(6354),c=r(8901),u=r(9708),f=r(6133),m=r(3328),h=r(1152);let d;const p={types:{alternatives:r(4946),any:r(8068),array:r(546),boolean:r(4937),date:r(7500),function:r(390),link:r(8785),number:r(3832),object:r(8966),string:r(7417),symbol:r(8826)},aliases:{alt:\"alternatives\",bool:\"boolean\",func:\"function\"},root:function(){const e={_types:new Set(Object.keys(p.types))};for(const t of e._types)e[t]=function(...e){return s(!e.length||[\"alternatives\",\"link\",\"object\"].includes(t),\"The\",t,\"type does not allow arguments\"),p.generate(this,p.types[t],e)};for(const t of[\"allow\",\"custom\",\"disallow\",\"equal\",\"exist\",\"forbidden\",\"invalid\",\"not\",\"only\",\"optional\",\"options\",\"prefs\",\"preferences\",\"required\",\"strip\",\"valid\",\"when\"])e[t]=function(...e){return this.any()[t](...e)};Object.assign(e,p.methods);for(const t in p.aliases){const r=p.aliases[t];e[t]=e[r]}return e.x=e.expression,h.setup&&h.setup(e),e}};p.methods={ValidationError:l.ValidationError,version:o.version,cache:a.provider,assert(e,t,...r){p.assert(e,t,!0,r)},attempt:(e,t,...r)=>p.assert(e,t,!1,r),build(e){return s(\"function\"==typeof u.build,\"Manifest functionality disabled\"),u.build(this,e)},checkPreferences(e){o.checkPreferences(e)},compile(e,t){return i.compile(this,e,t)},defaults(e){s(\"function\"==typeof e,\"modifier must be a function\");const t=Object.assign({},this);for(const r of t._types){const n=e(t[r]());s(o.isSchema(n),\"modifier must return a valid schema object\"),t[r]=function(...e){return p.generate(this,n,e)}}return t},expression:(...e)=>new m(...e),extend(...e){o.verifyFlat(e,\"extend\"),d=d||r(3378),s(e.length,\"You need to provide at least one extension\"),this.assert(e,d.extensions);const t=Object.assign({},this);t._types=new Set(t._types);for(let r of e){\"function\"==typeof r&&(r=r(t)),this.assert(r,d.extension);const e=p.expandExtension(r,t);for(const r of e){s(void 0===t[r.type]||t._types.has(r.type),\"Cannot override name\",r.type);const e=r.base||this.any(),n=c.type(e,r);t._types.add(r.type),t[r.type]=function(...e){return p.generate(this,n,e)}}}return t},isError:l.ValidationError.isError,isExpression:m.isTemplate,isRef:f.isRef,isSchema:o.isSchema,in:(...e)=>f.in(...e),override:o.symbols.override,ref:(...e)=>f.create(...e),types(){const e={};for(const t of this._types)e[t]=this[t]();for(const t in p.aliases)e[t]=this[t]();return e}},p.assert=function(e,t,r,s){const a=s[0]instanceof Error||\"string\"==typeof s[0]?s[0]:null,i=a?s[1]:s[0],c=t.validate(e,o.preferences({errors:{stack:!0}},i||{}));let u=c.error;if(!u)return c.value;if(a instanceof Error)throw a;const f=r&&\"function\"==typeof u.annotate?u.annotate():u.message;throw u instanceof l.ValidationError==0&&(u=n(u)),u.message=a?\"\".concat(a,\" \").concat(f):f,u},p.generate=function(e,t,r){return s(e,\"Must be invoked on a Joi instance.\"),t.$_root=e,t._definition.args&&r.length?t._definition.args(t,...r):t},p.expandExtension=function(e,t){if(\"string\"==typeof e.type)return[e];const r=[];for(const s of t._types)if(e.type.test(s)){const n=Object.assign({},e);n.type=s,n.base=t[s](),r.push(n)}return r},e.exports=p.root()},6914:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(3328);t.compile=function(e,t){if(\"string\"==typeof e)return s(!t,\"Cannot set single message string\"),new a(e);if(a.isTemplate(e))return s(!t,\"Cannot set single message template\"),e;s(\"object\"==typeof e&&!Array.isArray(e),\"Invalid message options\"),t=t?n(t):{};for(let r in e){const n=e[r];if(\"root\"===r||a.isTemplate(n)){t[r]=n;continue}if(\"string\"==typeof n){t[r]=new a(n);continue}s(\"object\"==typeof n&&!Array.isArray(n),\"Invalid message for\",r);const o=r;for(r in t[o]=t[o]||{},n){const e=n[r];\"root\"===r||a.isTemplate(e)?t[o][r]=e:(s(\"string\"==typeof e,\"Invalid message for\",r,\"in\",o),t[o][r]=new a(e))}}return t},t.decompile=function(e){const t={};for(let r in e){const s=e[r];if(\"root\"===r){t.root=s;continue}if(a.isTemplate(s)){t[r]=s.describe({compact:!0});continue}const n=r;for(r in t[n]={},s){const e=s[r];\"root\"!==r?t[n][r]=e.describe({compact:!0}):t[n].root=e}}return t},t.merge=function(e,r){if(!e)return t.compile(r);if(!r)return e;if(\"string\"==typeof r)return new a(r);if(a.isTemplate(r))return r;const o=n(e);for(let e in r){const t=r[e];if(\"root\"===e||a.isTemplate(t)){o[e]=t;continue}if(\"string\"==typeof t){o[e]=new a(t);continue}s(\"object\"==typeof t&&!Array.isArray(t),\"Invalid message for\",e);const n=e;for(e in o[n]=o[n]||{},t){const r=t[e];\"root\"===e||a.isTemplate(r)?o[n][e]=r:(s(\"string\"==typeof r,\"Invalid message for\",e,\"in\",n),o[n][e]=new a(r))}}return o}},2294:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(8160),l=r(6133),c={};t.Ids=c.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new c.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[t,r]of e._byId.entries())o(!this._byKey.has(t),\"Schema id conflicts with existing key:\",t),this._byId.set(t,r);for(const[t,r]of e._byKey.entries())o(!this._byId.has(t),\"Schema key conflicts with existing id:\",t),this._byKey.set(t,r)}fork(e,t,r){const s=this._collect(e);s.push({schema:r});const n=s.shift();let a={id:n.id,schema:t(n.schema)};o(i.isSchema(a.schema),\"adjuster function failed to return a joi schema type\");for(const e of s)a={id:e.id,schema:c.fork(e.schema,a.id,a.schema)};return a.schema}labels(e,t=[]){const r=e[0],s=this._get(r);if(!s)return[...t,...e].join(\".\");const n=e.slice(1);return t=[...t,s.schema._flags.label||r],n.length?s.schema._ids.labels(n,t):t.join(\".\")}reach(e,t=[]){const r=e[0],s=this._get(r);o(s,\"Schema does not contain path\",[...t,...e].join(\".\"));const n=e.slice(1);return n.length?s.schema._ids.reach(n,[...t,r]):s.schema}register(e,{key:t}={}){if(!e||!i.isSchema(e))return;(e.$_property(\"schemaChain\")||e._ids._schemaChain)&&(this._schemaChain=!0);const r=e._flags.id;if(r){const t=this._byId.get(r);o(!t||t.schema===e,\"Cannot add different schemas with the same id:\",r),o(!this._byKey.has(r),\"Schema id conflicts with existing key:\",r),this._byId.set(r,{schema:e,id:r})}t&&(o(!this._byKey.has(t),\"Schema already contains key:\",t),o(!this._byId.has(t),\"Schema key conflicts with existing id:\",t),this._byKey.set(t,{schema:e,id:t}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,t=[],r=[]){const s=e[0],n=this._get(s);o(n,\"Schema does not contain path\",[...t,...e].join(\".\")),r=[n,...r];const a=e.slice(1);return a.length?n.schema._ids._collect(a,[...t,s],r):r}_get(e){return this._byId.get(e)||this._byKey.get(e)}},c.fork=function(e,r,s){const n=t.schema(e,{each:(e,{key:t})=>{if(r===(e._flags.id||t))return s},ref:!1});return n?n.$_mutateRebuild():e},t.schema=function(e,t){let r;for(const s in e._flags){if(\"_\"===s[0])continue;const n=c.scan(e._flags[s],{source:\"flags\",name:s},t);void 0!==n&&(r=r||e.clone(),r._flags[s]=n)}for(let s=0;s<e._rules.length;++s){const n=e._rules[s],a=c.scan(n.args,{source:\"rules\",name:n.name},t);if(void 0!==a){r=r||e.clone();const t=Object.assign({},n);t.args=a,r._rules[s]=t,r._singleRules.get(n.name)===n&&r._singleRules.set(n.name,t)}}for(const s in e.$_terms){if(\"_\"===s[0])continue;const n=c.scan(e.$_terms[s],{source:\"terms\",name:s},t);void 0!==n&&(r=r||e.clone(),r.$_terms[s]=n)}return r},c.scan=function(e,t,r,s,a){const o=s||[];if(null===e||\"object\"!=typeof e)return;let u;if(Array.isArray(e)){for(let s=0;s<e.length;++s){const n=\"terms\"===t.source&&\"keys\"===t.name&&e[s].key,a=c.scan(e[s],t,r,[s,...o],n);void 0!==a&&(u=u||e.slice(),u[s]=a)}return u}if(!1!==r.schema&&i.isSchema(e)||!1!==r.ref&&l.isRef(e)){const s=r.each(e,n(n({},t),{},{path:o,key:a}));if(s===e)return;return s}for(const s in e){if(\"_\"===s[0])continue;const n=c.scan(e[s],t,r,[s,...o],a);void 0!==n&&(u=u||Object.assign({},e),u[s]=n)}return u}},6133:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(8571),l=r(9621),c=r(8160);let u;const f={symbol:Symbol(\"ref\"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:\".\",type:\"value\"}};t.create=function(e,t={}){o(\"string\"==typeof e,\"Invalid reference key:\",e),c.assertOptions(t,[\"adjust\",\"ancestor\",\"in\",\"iterables\",\"map\",\"prefix\",\"render\",\"separator\"]),o(!t.prefix||\"object\"==typeof t.prefix,\"options.prefix must be of type object\");const r=Object.assign({},f.defaults,t);delete r.prefix;const s=r.separator,n=f.context(e,s,t.prefix);if(r.type=n.type,e=n.key,\"value\"===r.type)if(n.root&&(o(!s||e[0]!==s,\"Cannot specify relative path with root prefix\"),r.ancestor=\"root\",e||(e=null)),s&&s===e)e=null,r.ancestor=0;else if(void 0!==r.ancestor)o(!s||!e||e[0]!==s,\"Cannot combine prefix with ancestor option\");else{const[t,n]=f.ancestor(e,s);n&&\"\"===(e=e.slice(n))&&(e=null),r.ancestor=t}return r.path=s?null===e?[]:e.split(s):[e],new f.Ref(r)},t.in=function(e,r={}){return t.create(e,n(n({},r),{},{in:!0}))},t.isRef=function(e){return!!e&&!!e[c.symbols.ref]},f.Ref=class{constructor(e){o(\"object\"==typeof e,\"Invalid reference construction\"),c.assertOptions(e,[\"adjust\",\"ancestor\",\"in\",\"iterables\",\"map\",\"path\",\"render\",\"separator\",\"type\",\"depth\",\"key\",\"root\",\"display\"]),o([!1,void 0].includes(e.separator)||\"string\"==typeof e.separator&&1===e.separator.length,\"Invalid separator\"),o(!e.adjust||\"function\"==typeof e.adjust,\"options.adjust must be a function\"),o(!e.map||Array.isArray(e.map),\"options.map must be an array\"),o(!e.map||!e.adjust,\"Cannot set both map and adjust options\"),Object.assign(this,f.defaults,e),o(\"value\"===this.type||void 0===this.ancestor,\"Non-value references cannot reference ancestors\"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(e,t,r,s,n={}){return o(!this.in||n.in,\"Invalid in() reference usage\"),\"global\"===this.type?this._resolve(r.context,t,n):\"local\"===this.type?this._resolve(s,t,n):this.ancestor?\"root\"===this.ancestor?this._resolve(t.ancestors[t.ancestors.length-1],t,n):(o(this.ancestor<=t.ancestors.length,\"Invalid reference exceeds the schema root:\",this.display),this._resolve(t.ancestors[this.ancestor-1],t,n)):this._resolve(e,t,n)}_resolve(e,t,r){let s;if(\"value\"===this.type&&t.mainstay.shadow&&!1!==r.shadow&&(s=t.mainstay.shadow.get(this.absolute(t))),void 0===s&&(s=l(e,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(s=this.adjust(s)),this.map){const e=this.map.get(s);void 0!==e&&(s=e)}return t.mainstay&&t.mainstay.tracer.resolve(t,this,s),s}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const e={path:this.path};\"value\"!==this.type&&(e.type=this.type),\".\"!==this.separator&&(e.separator=this.separator),\"value\"===this.type&&1!==this.ancestor&&(e.ancestor=this.ancestor),this.map&&(e.map=[...this.map]);for(const t of[\"adjust\",\"iterables\",\"render\"])null!==this[t]&&void 0!==this[t]&&(e[t]=this[t]);return!1!==this.in&&(e.in=!0),{ref:e}}updateDisplay(){const e=null!==this.key?this.key:\"\";if(\"value\"!==this.type)return void(this.display=\"ref:\".concat(this.type,\":\").concat(e));if(!this.separator)return void(this.display=\"ref:\".concat(e));if(!this.ancestor)return void(this.display=\"ref:\".concat(this.separator).concat(e));if(\"root\"===this.ancestor)return void(this.display=\"ref:root:\".concat(e));if(1===this.ancestor)return void(this.display=\"ref:\".concat(e||\"..\"));const t=new Array(this.ancestor+1).fill(this.separator).join(\"\");this.display=\"ref:\".concat(t).concat(e||\"\")}},f.Ref.prototype[c.symbols.ref]=!0,t.build=function(e){return\"value\"===(e=Object.assign({},f.defaults,e)).type&&void 0===e.ancestor&&(e.ancestor=1),new f.Ref(e)},f.context=function(e,t,r={}){if(e=e.trim(),r){const s=void 0===r.global?\"$\":r.global;if(s!==t&&e.startsWith(s))return{key:e.slice(s.length),type:\"global\"};const n=void 0===r.local?\"#\":r.local;if(n!==t&&e.startsWith(n))return{key:e.slice(n.length),type:\"local\"};const a=void 0===r.root?\"/\":r.root;if(a!==t&&e.startsWith(a))return{key:e.slice(a.length),type:\"value\",root:!0}}return{key:e,type:\"value\"}},f.ancestor=function(e,t){if(!t)return[1,0];if(e[0]!==t)return[1,0];if(e[1]!==t)return[0,1];let r=2;for(;e[r]===t;)++r;return[r-1,r]},t.toSibling=0,t.toParent=1,t.Manager=class{constructor(){this.refs=[]}register(e,s){if(e)if(s=void 0===s?t.toParent:s,Array.isArray(e))for(const t of e)this.register(t,s);else if(c.isSchema(e))for(const t of e._refs.refs)t.ancestor-s>=0&&this.refs.push({ancestor:t.ancestor-s,root:t.root});else t.isRef(e)&&\"value\"===e.type&&e.ancestor-s>=0&&this.refs.push({ancestor:e.ancestor-s,root:e.root}),u=u||r(3328),u.isTemplate(e)&&this.register(e.refs(),s)}get length(){return this.refs.length}clone(){const e=new t.Manager;return e.refs=i(this.refs),e}reset(){this.refs=[]}roots(){return this.refs.filter((e=>!e.ancestor)).map((e=>e.root))}}},3378:(e,t,r)=>{\"use strict\";const s=r(5107),n={};n.wrap=s.string().min(1).max(2).allow(!1),t.preferences=s.object({allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),context:s.object(),convert:s.boolean(),dateFormat:s.valid(\"date\",\"iso\",\"string\",\"time\",\"utc\"),debug:s.boolean(),errors:{escapeHtml:s.boolean(),label:s.valid(\"path\",\"key\",!1),language:[s.string(),s.object().ref()],render:s.boolean(),stack:s.boolean(),wrap:{label:n.wrap,array:n.wrap,string:n.wrap}},externals:s.boolean(),messages:s.object(),noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:s.valid(\"required\",\"optional\",\"forbidden\"),skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or(\"arrays\",\"objects\").allow(!0,!1),warnings:s.boolean()}).strict(),n.nameRx=/^[a-zA-Z0-9]\\w*$/,n.rule=s.object({alias:s.array().items(s.string().pattern(n.nameRx)).single(),args:s.array().items(s.string(),s.object({name:s.string().pattern(n.nameRx).required(),ref:s.boolean(),assert:s.alternatives([s.function(),s.object().schema()]).conditional(\"ref\",{is:!0,then:s.required()}),normalize:s.function(),message:s.string().when(\"assert\",{is:s.function(),then:s.required()})})),convert:s.boolean(),manifest:s.boolean(),method:s.function().allow(!1),multi:s.boolean(),validate:s.function()}),t.extension=s.object({type:s.alternatives([s.string(),s.object().regex()]).required(),args:s.function(),cast:s.object().pattern(n.nameRx,s.object({from:s.function().maxArity(1).required(),to:s.function().minArity(1).maxArity(2).required()})),base:s.object().schema().when(\"type\",{is:s.object().regex(),then:s.forbidden()}),coerce:[s.function().maxArity(3),s.object({method:s.function().maxArity(3).required(),from:s.array().items(s.string()).single()})],flags:s.object().pattern(n.nameRx,s.object({setter:s.string(),default:s.any()})),manifest:{build:s.function().arity(2)},messages:[s.object(),s.string()],modifiers:s.object().pattern(n.nameRx,s.function().minArity(1).maxArity(2)),overrides:s.object().pattern(n.nameRx,s.function()),prepare:s.function().maxArity(3),rebuild:s.function().arity(1),rules:s.object().pattern(n.nameRx,n.rule),terms:s.object().pattern(n.nameRx,s.object({init:s.array().allow(null).required(),manifest:s.object().pattern(/.+/,[s.valid(\"schema\",\"single\"),s.object({mapped:s.object({from:s.string().required(),to:s.string().required()}).required()})])})),validate:s.function().maxArity(3)}).strict(),t.extensions=s.array().items(s.object(),s.function().arity(1)).strict(),n.desc={buffer:s.object({buffer:s.string()}),func:s.object({function:s.function().required(),options:{literal:!0}}),override:s.object({override:!0}),ref:s.object({ref:s.object({type:s.valid(\"value\",\"global\",\"local\"),path:s.array().required(),separator:s.string().length(1).allow(!1),ancestor:s.number().min(0).integer().allow(\"root\"),map:s.array().items(s.array().length(2)).min(1),adjust:s.function(),iterables:s.boolean(),in:s.boolean(),render:s.boolean()}).required()}),regex:s.object({regex:s.string().min(3)}),special:s.object({special:s.valid(\"deep\").required()}),template:s.object({template:s.string().required(),options:s.object()}),value:s.object({value:s.alternatives([s.object(),s.array()]).required()})},n.desc.entity=s.alternatives([s.array().items(s.link(\"...\")),s.boolean(),s.function(),s.number(),s.string(),n.desc.buffer,n.desc.func,n.desc.ref,n.desc.regex,n.desc.special,n.desc.template,n.desc.value,s.link(\"/\")]),n.desc.values=s.array().items(null,s.boolean(),s.function(),s.number().allow(1/0,-1/0),s.string().allow(\"\"),s.symbol(),n.desc.buffer,n.desc.func,n.desc.override,n.desc.ref,n.desc.regex,n.desc.template,n.desc.value),n.desc.messages=s.object().pattern(/.+/,[s.string(),n.desc.template,s.object().pattern(/.+/,[s.string(),n.desc.template])]),t.description=s.object({type:s.string().required(),flags:s.object({cast:s.string(),default:s.any(),description:s.string(),empty:s.link(\"/\"),failover:n.desc.entity,id:s.string(),label:s.string(),only:!0,presence:[\"optional\",\"required\",\"forbidden\"],result:[\"raw\",\"strip\"],strip:s.boolean(),unit:s.string()}).unknown(),preferences:{allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),convert:s.boolean(),dateFormat:[\"date\",\"iso\",\"string\",\"time\",\"utc\"],errors:{escapeHtml:s.boolean(),label:[\"path\",\"key\"],language:[s.string(),n.desc.ref],wrap:{label:n.wrap,array:n.wrap}},externals:s.boolean(),messages:n.desc.messages,noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:[\"required\",\"optional\",\"forbidden\"],skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or(\"arrays\",\"objects\").allow(!0,!1),warnings:s.boolean()},allow:n.desc.values,invalid:n.desc.values,rules:s.array().min(1).items({name:s.string().required(),args:s.object().min(1),keep:s.boolean(),message:[s.string(),n.desc.messages],warn:s.boolean()}),keys:s.object().pattern(/.*/,s.link(\"/\")),link:n.desc.ref}).pattern(/^[a-z]\\w*$/,s.any())},493:(e,t,r)=>{\"use strict\";const s=r(8571),n=r(9621),a=r(8160),o={value:Symbol(\"value\")};e.exports=o.State=class{constructor(e,t,r){this.path=e,this.ancestors=t,this.mainstay=r.mainstay,this.schemas=r.schemas,this.debug=null}localize(e,t=null,r=null){const s=new o.State(e,t,this);return r&&s.schemas&&(s.schemas=[o.schemas(r),...s.schemas]),s}nest(e,t){const r=new o.State(this.path,this.ancestors,this);return r.schemas=r.schemas&&[o.schemas(e),...r.schemas],r.debug=t,r}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new o.Shadow,this.mainstay.shadow.set(this.path,e,t)}snapshot(){this.mainstay.shadow&&(this._snapshot=s(this.mainstay.shadow.node(this.path)))}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0)}},o.schemas=function(e){return a.isSchema(e)?{schema:e}:e},o.Shadow=class{constructor(){this._values=null}set(e,t,r){if(!e.length)return;if(\"strip\"===r&&\"number\"==typeof e[e.length-1])return;this._values=this._values||new Map;let s=this._values;for(let t=0;t<e.length;++t){const r=e[t];let n=s.get(r);n||(n=new Map,s.set(r,n)),s=n}s[o.value]=t}get(e){const t=this.node(e);if(t)return t[o.value]}node(e){if(this._values)return n(this._values,e,{iterables:!0})}override(e,t){if(!this._values)return;const r=e.slice(0,-1),s=e[e.length-1],a=n(this._values,r,{iterables:!0});t?a.set(s,t):a&&a.delete(s)}}},3328:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(8571),l=r(5277),c=r(1447),u=r(8160),f=r(6354),m=r(6133),h={symbol:Symbol(\"template\"),opens:new Array(1e3).join(\"\\0\"),closes:new Array(1e3).join(\"\u0001\"),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=h.Template=class{constructor(e,t){o(\"string\"==typeof e,\"Template source must be a string\"),o(!e.includes(\"\\0\")&&!e.includes(\"\u0001\"),\"Template source cannot contain reserved control characters\"),this.source=e,this.rendered=e,this._template=null,this._settings=i(t),this._parse()}_parse(){if(!this.source.includes(\"{\"))return;const e=h.encode(this.source),t=h.split(e);let r=!1;const s=[],n=t.shift();n&&s.push(n);for(const e of t){const t=\"{\"!==e[0],n=t?\"}\":\"}}\",a=e.indexOf(n);if(-1===a||\"{\"===e[1]){s.push(\"{\".concat(h.decode(e)));continue}let o=e.slice(t?0:1,a);const i=\":\"===o[0];i&&(o=o.slice(1));const l=this._ref(h.decode(o),{raw:t,wrapped:i});s.push(l),\"string\"!=typeof l&&(r=!0);const c=e.slice(a+n.length);c&&s.push(h.decode(c))}r?this._template=s:this.rendered=s.join(\"\")}static date(e,t){return h.dateFormat[t.dateFormat].call(e)}describe(e={}){if(!this._settings&&e.compact)return this.source;const t={template:this.source};return this._settings&&(t.options=this._settings),t}static build(e){return new h.Template(e.template,e.options)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[u.symbols.template]}refs(){if(!this._template)return;const e=[];for(const t of this._template)\"string\"!=typeof t&&e.push(...t.refs);return e}resolve(e,t,r,s){return this._template&&1===this._template.length?this._part(this._template[0],e,t,r,s,{}):this.render(e,t,r,s)}_part(e,...t){return e.ref?e.ref.resolve(...t):e.formula.evaluate(t)}render(e,t,r,s,n={}){if(!this.isDynamic())return this.rendered;const a=[];for(const o of this._template)if(\"string\"==typeof o)a.push(o);else{const i=this._part(o,e,t,r,s,n),c=h.stringify(i,e,t,r,s,n);if(void 0!==c){const e=o.raw||!1===(n.errors&&n.errors.escapeHtml)?c:l(c);a.push(h.wrap(e,o.wrapped&&r.errors.wrap.label))}}return a.join(\"\")}_ref(e,{raw:t,wrapped:r}){const s=[],n=e=>{const t=m.create(e,this._settings);return s.push(t),e=>t.resolve(...e)};try{var a=new c.Parser(e,{reference:n,functions:h.functions,constants:h.constants})}catch(t){throw t.message='Invalid template variable \"'.concat(e,'\" fails due to: ').concat(t.message),t}if(a.single){if(\"reference\"===a.single.type){const e=s[0];return{ref:e,raw:t,refs:s,wrapped:r||\"local\"===e.type&&\"label\"===e.key}}return h.stringify(a.single.value)}return{formula:a,raw:t,refs:s}}toString(){return this.source}},h.Template.prototype[u.symbols.template]=!0,h.Template.prototype.isImmutable=!0,h.encode=function(e){return e.replace(/\\\\(\\{+)/g,((e,t)=>h.opens.slice(0,t.length))).replace(/\\\\(\\}+)/g,((e,t)=>h.closes.slice(0,t.length)))},h.decode=function(e){return e.replace(/\\u0000/g,\"{\").replace(/\\u0001/g,\"}\")},h.split=function(e){const t=[];let r=\"\";for(let s=0;s<e.length;++s){const n=e[s];if(\"{\"===n){let n=\"\";for(;s+1<e.length&&\"{\"===e[s+1];)n+=\"{\",++s;t.push(r),r=n}else r+=n}return t.push(r),t},h.wrap=function(e,t){return t?1===t.length?\"\".concat(t).concat(e).concat(t):\"\".concat(t[0]).concat(e).concat(t[1]):e},h.stringify=function(e,t,r,s,a,o={}){const i=typeof e,l=s&&s.errors&&s.errors.wrap||{};let c=!1;if(m.isRef(e)&&e.render&&(c=e.in,e=e.resolve(t,r,s,a,n({in:e.in},o))),null===e)return\"null\";if(\"string\"===i)return h.wrap(e,o.arrayItems&&l.string);if(\"number\"===i||\"function\"===i||\"symbol\"===i)return e.toString();if(\"object\"!==i)return JSON.stringify(e);if(e instanceof Date)return h.Template.date(e,s);if(e instanceof Map){const t=[];for(const[r,s]of e.entries())t.push(\"\".concat(r.toString(),\" -> \").concat(s.toString()));e=t}if(!Array.isArray(e))return e.toString();const u=[];for(const i of e)u.push(h.stringify(i,t,r,s,a,n({arrayItems:!0},o)));return h.wrap(u.join(\", \"),!c&&l.array)},h.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},h.functions={if:(e,t,r)=>e?t:r,msg(e){const[t,r,s,n,a]=this,o=a.messages;if(!o)return\"\";const i=f.template(t,o[0],e,r,s)||f.template(t,o[1],e,r,s);return i?i.render(t,r,s,n,a):\"\"},number:e=>\"number\"==typeof e?e:\"string\"==typeof e?parseFloat(e):\"boolean\"==typeof e?e?1:0:e instanceof Date?e.getTime():null}},4946:(e,t,r)=>{\"use strict\";const s=r(375),n=r(1687),a=r(8068),o=r(8160),i=r(3292),l=r(6354),c=r(6133),u={};e.exports=a.extend({type:\"alternatives\",flags:{match:{default:\"any\"}},terms:{matches:{init:[],register:c.toSibling}},args:(e,...t)=>1===t.length&&Array.isArray(t[0])?e.try(...t[0]):e.try(...t),validate(e,t){const{schema:r,error:s,state:a,prefs:o}=t;if(r._flags.match){const t=[],i=[];for(let s=0;s<r.$_terms.matches.length;++s){const n=r.$_terms.matches[s],l=a.nest(n.schema,\"match.\".concat(s));l.snapshot();const c=n.schema.$_validate(e,l,o);c.errors?(i.push(c.errors),l.restore()):t.push(c.value)}if(0===t.length)return{errors:s(\"alternatives.any\",{details:i.map((e=>l.details(e,{override:!1})))})};if(\"one\"===r._flags.match)return 1===t.length?{value:t[0]}:{errors:s(\"alternatives.one\")};if(t.length!==r.$_terms.matches.length)return{errors:s(\"alternatives.all\",{details:i.map((e=>l.details(e,{override:!1})))})};const c=e=>e.$_terms.matches.some((e=>\"object\"===e.schema.type||\"alternatives\"===e.schema.type&&c(e.schema)));return c(r)?{value:t.reduce(((e,t)=>n(e,t,{mergeArrays:!1})))}:{value:t[t.length-1]}}const i=[];for(let t=0;t<r.$_terms.matches.length;++t){const s=r.$_terms.matches[t];if(s.schema){const r=a.nest(s.schema,\"match.\".concat(t));r.snapshot();const n=s.schema.$_validate(e,r,o);if(!n.errors)return n;r.restore(),i.push({schema:s.schema,reports:n.errors});continue}const n=s.ref?s.ref.resolve(e,a,o):e,l=s.is?[s]:s.switch;for(let r=0;r<l.length;++r){const i=l[r],{is:c,then:u,otherwise:f}=i,m=\"match.\".concat(t).concat(s.switch?\".\"+r:\"\");if(c.$_match(n,a.nest(c,\"\".concat(m,\".is\")),o)){if(u)return u.$_validate(e,a.nest(u,\"\".concat(m,\".then\")),o)}else if(f)return f.$_validate(e,a.nest(f,\"\".concat(m,\".otherwise\")),o)}}return u.errors(i,t)},rules:{conditional:{method(e,t){s(!this._flags._endedSwitch,\"Unreachable condition\"),s(!this._flags.match,\"Cannot combine match mode\",this._flags.match,\"with conditional rule\"),s(void 0===t.break,\"Cannot use break option with alternatives conditional\");const r=this.clone(),n=i.when(r,e,t),a=n.is?[n]:n.switch;for(const e of a)if(e.then&&e.otherwise){r.$_setFlag(\"_endedSwitch\",!0,{clone:!1});break}return r.$_terms.matches.push(n),r.$_mutateRebuild()}},match:{method(e){if(s([\"any\",\"one\",\"all\"].includes(e),\"Invalid alternatives match mode\",e),\"any\"!==e)for(const t of this.$_terms.matches)s(t.schema,\"Cannot combine match mode\",e,\"with conditional rules\");return this.$_setFlag(\"match\",e)}},try:{method(...e){s(e.length,\"Missing alternative schemas\"),o.verifyFlat(e,\"try\"),s(!this._flags._endedSwitch,\"Unreachable condition\");const t=this.clone();for(const r of e)t.$_terms.matches.push({schema:t.$_compile(r)});return t.$_mutateRebuild()}}},overrides:{label(e){return this.$_parent(\"label\",e).$_modify({each:(t,r)=>\"is\"!==r.path[0]?t.label(e):void 0,ref:!1})}},rebuild(e){e.$_modify({each:t=>{o.isSchema(t)&&\"array\"===t.type&&e.$_setFlag(\"_arrayItems\",!0,{clone:!1})}})},manifest:{build(e,t){if(t.matches)for(const r of t.matches){const{schema:t,ref:s,is:n,not:a,then:o,otherwise:i}=r;e=t?e.try(t):s?e.conditional(s,{is:n,then:o,not:a,otherwise:i,switch:r.switch}):e.conditional(n,{then:o,otherwise:i})}return e}},messages:{\"alternatives.all\":\"{{#label}} does not match all of the required types\",\"alternatives.any\":\"{{#label}} does not match any of the allowed types\",\"alternatives.match\":\"{{#label}} does not match any of the allowed types\",\"alternatives.one\":\"{{#label}} matches more than one allowed type\",\"alternatives.types\":\"{{#label}} must be one of {{#types}}\"}}),u.errors=function(e,{error:t,state:r}){if(!e.length)return{errors:t(\"alternatives.any\")};if(1===e.length)return{errors:e[0].reports};const s=new Set,n=[];for(const{reports:a,schema:o}of e){if(a.length>1)return u.unmatched(e,t);const i=a[0];if(i instanceof l.Report==0)return u.unmatched(e,t);if(i.state.path.length!==r.path.length){n.push({type:o.type,report:i});continue}if(\"any.only\"===i.code){for(const e of i.local.valids)s.add(e);continue}const[c,f]=i.code.split(\".\");\"base\"===f?s.add(c):n.push({type:o.type,report:i})}return n.length?1===n.length?{errors:n[0].report}:u.unmatched(e,t):{errors:t(\"alternatives.types\",{types:[...s]})}},u.unmatched=function(e,t){const r=[];for(const t of e)r.push(...t.reports);return{errors:t(\"alternatives.match\",l.details(r,{override:!1}))}}},8068:(e,t,r)=>{\"use strict\";const s=r(375),n=r(7629),a=r(8160),o=r(6914);e.exports=n.extend({type:\"any\",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){return s(\"function\"==typeof e,\"Method must be a function\"),s(void 0===t||t&&\"string\"==typeof t,\"Description must be a non-empty string\"),this.$_addRule({name:\"custom\",args:{method:e,description:t}})},validate(e,t,{method:r}){try{return r(e,t)}catch(e){return t.error(\"any.custom\",{error:e})}},args:[\"method\",\"description\"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){s(a.isSchema(e)&&e._flags.id,\"Schema must be a schema with an id\");const t=this.clone();return t.$_terms.shared=t.$_terms.shared||[],t.$_terms.shared.push(e),t.$_mutateRegister(e),t}},warning:{method(e,t){return s(e&&\"string\"==typeof e,\"Invalid warning code\"),this.$_addRule({name:\"warning\",args:{code:e,local:t},warn:!0})},validate:(e,t,{code:r,local:s})=>t.error(r,s),args:[\"code\",\"local\"],multi:!0}},modifiers:{keep(e,t=!0){e.keep=t},message(e,t){e.message=o.compile(t)},warn(e,t=!0){e.warn=t}},manifest:{build(e,t){for(const r in t){const s=t[r];if([\"examples\",\"externals\",\"metas\",\"notes\",\"tags\"].includes(r))for(const t of s)e=e[r.slice(0,-1)](t);else if(\"alterations\"!==r)if(\"whens\"!==r){if(\"shared\"===r)for(const t of s)e=e.shared(t)}else for(const t of s){const{ref:r,is:s,not:n,then:a,otherwise:o,concat:i}=t;e=i?e.concat(i):r?e.when(r,{is:s,not:n,then:a,otherwise:o,switch:t.switch,break:t.break}):e.when(s,{then:a,otherwise:o,break:t.break})}else{const t={};for(const{target:e,adjuster:r}of s)t[e]=r;e=e.alter(t)}}return e}},messages:{\"any.custom\":\"{{#label}} failed custom validation because {{#error.message}}\",\"any.default\":\"{{#label}} threw an error when running default method\",\"any.failover\":\"{{#label}} threw an error when running failover method\",\"any.invalid\":\"{{#label}} contains an invalid value\",\"any.only\":'{{#label}} must be {if(#valids.length == 1, \"\", \"one of \")}{{#valids}}',\"any.ref\":\"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}\",\"any.required\":\"{{#label}} is required\",\"any.unknown\":\"{{#label}} is not allowed\"}})},546:(e,t,r)=>{\"use strict\";const s=r(375),n=r(9474),a=r(9621),o=r(8068),i=r(8160),l=r(3292),c={};e.exports=o.extend({type:\"array\",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:\"schema\"},ordered:{init:[],manifest:\"schema\"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:\"object\",method(e,{schema:t,state:r,prefs:s}){if(!Array.isArray(e))return;const n=t.$_getRule(\"sort\");return n?c.sort(t,e,n.args.options,r,s):void 0}},validate(e,{schema:t,error:r}){if(!Array.isArray(e)){if(t._flags.single){const t=[e];return t[i.symbols.arraySingle]=!0,{value:t}}return{errors:r(\"array.base\")}}if(t.$_getRule(\"items\")||t.$_terms.externals)return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:!0});const t=this.$_addRule({name:\"has\",args:{schema:e}});return t.$_mutateRegister(e),t},validate(e,{state:t,prefs:r,error:s},{schema:n}){const a=[e,...t.ancestors];for(let s=0;s<e.length;++s){const o=t.localize([...t.path,s],a,n);if(n.$_match(e[s],o,r))return e}const o=n._flags.label;return o?s(\"array.hasKnown\",{patternLabel:o}):s(\"array.hasUnknown\",null)},multi:!0},items:{method(...e){i.verifyFlat(e,\"items\");const t=this.$_addRule(\"items\");for(let r=0;r<e.length;++r){const s=i.tryWithPath((()=>this.$_compile(e[r])),r,{append:!0});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(e,{schema:t,error:r,state:s,prefs:n,errorsArray:a}){const o=t.$_terms._requireds.slice(),l=t.$_terms.ordered.slice(),u=[...t.$_terms._inclusions,...o],f=!e[i.symbols.arraySingle];delete e[i.symbols.arraySingle];const m=a();let h=e.length;for(let a=0;a<h;++a){const i=e[a];let d=!1,p=!1;const g=f?a:new Number(a),y=[...s.path,g];if(!t._flags.sparse&&void 0===i){if(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),n.abortEarly)return m;l.shift();continue}const b=[e,...s.ancestors];for(const e of t.$_terms._exclusions)if(e.$_match(i,s.localize(y,b,e),n,{presence:\"ignore\"})){if(m.push(r(\"array.excludes\",{pos:a,value:i},s.localize(y))),n.abortEarly)return m;d=!0,l.shift();break}if(d)continue;if(t.$_terms.ordered.length){if(l.length){const o=l.shift(),u=o.$_validate(i,s.localize(y,b,o),n);if(u.errors){if(m.push(...u.errors),n.abortEarly)return m}else if(\"strip\"===o._flags.result)c.fastSplice(e,a),--a,--h;else{if(!t._flags.sparse&&void 0===u.value){if(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),n.abortEarly)return m;continue}e[a]=u.value}continue}if(!t.$_terms.items.length){if(m.push(r(\"array.orderedLength\",{pos:a,limit:t.$_terms.ordered.length})),n.abortEarly)return m;break}}const v=[];let _=o.length;for(let l=0;l<_;++l){const u=s.localize(y,b,o[l]);u.snapshot();const f=o[l].$_validate(i,u,n);if(v[l]=f,!f.errors){if(e[a]=f.value,p=!0,c.fastSplice(o,l),--l,--_,!t._flags.sparse&&void 0===f.value&&(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),n.abortEarly))return m;break}u.restore()}if(p)continue;const w=n.stripUnknown&&!!n.stripUnknown.arrays||!1;_=u.length;for(const l of u){let u;const f=o.indexOf(l);if(-1!==f)u=v[f];else{const o=s.localize(y,b,l);if(o.snapshot(),u=l.$_validate(i,o,n),!u.errors){\"strip\"===l._flags.result?(c.fastSplice(e,a),--a,--h):t._flags.sparse||void 0!==u.value?e[a]=u.value:(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),d=!0),p=!0;break}o.restore()}if(1===_){if(w){c.fastSplice(e,a),--a,--h,p=!0;break}if(m.push(...u.errors),n.abortEarly)return m;d=!0;break}}if(!d&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!p){if(w){c.fastSplice(e,a),--a,--h;continue}if(m.push(r(\"array.includes\",{pos:a,value:i},s.localize(y))),n.abortEarly)return m}}return o.length&&c.fillMissedErrors(t,m,o,e,s,n),l.length&&(c.fillOrderedErrors(t,m,l,e,s,n),m.length||c.fillDefault(l,e,s,n)),m.length?m:e},priority:!0,manifest:!1},length:{method(e){return this.$_addRule({name:\"length\",args:{limit:e},operator:\"=\"})},validate:(e,t,{limit:r},{name:s,operator:n,args:a})=>i.compare(e.length,r,n)?e:t.error(\"array.\"+s,{limit:a.limit,value:e}),args:[{name:\"limit\",ref:!0,assert:i.limit,message:\"must be a positive integer\"}]},max:{method(e){return this.$_addRule({name:\"max\",method:\"length\",args:{limit:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"length\",args:{limit:e},operator:\">=\"})}},ordered:{method(...e){i.verifyFlat(e,\"ordered\");const t=this.$_addRule(\"items\");for(let r=0;r<e.length;++r){const s=i.tryWithPath((()=>this.$_compile(e[r])),r,{append:!0});c.validateSingle(s,t),t.$_mutateRegister(s),t.$_terms.ordered.push(s)}return t.$_mutateRebuild()}},single:{method(e){const t=void 0===e||!!e;return s(!t||!this._flags._arrayItems,\"Cannot specify single rule when array has array items\"),this.$_setFlag(\"single\",t)}},sort:{method(e={}){i.assertOptions(e,[\"by\",\"order\"]);const t={order:e.order||\"ascending\"};return e.by&&(t.by=l.ref(e.by,{ancestor:0}),s(!t.by.ancestor,\"Cannot sort by ancestor\")),this.$_addRule({name:\"sort\",args:{options:t}})},validate(e,{error:t,state:r,prefs:s,schema:n},{options:a}){const{value:o,errors:i}=c.sort(n,e,a,r,s);if(i)return i;for(let r=0;r<e.length;++r)if(e[r]!==o[r])return t(\"array.sort\",{order:a.order,by:a.by?a.by.key:\"value\"});return e},convert:!0},sparse:{method(e){const t=void 0===e||!!e;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule(\"items\")).$_setFlag(\"sparse\",t,{clone:!1})}},unique:{method(e,t={}){s(!e||\"function\"==typeof e||\"string\"==typeof e,\"comparator must be a function or a string\"),i.assertOptions(t,[\"ignoreUndefined\",\"separator\"]);const r={name:\"unique\",args:{options:t,comparator:e}};if(e)if(\"string\"==typeof e){const s=i.default(t.separator,\".\");r.path=s?e.split(s):[e]}else r.comparator=e;return this.$_addRule(r)},validate(e,{state:t,error:r,schema:o},{comparator:i,options:l},{comparator:c,path:u}){const f={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},m=c||n,h=l.ignoreUndefined;for(let n=0;n<e.length;++n){const o=u?a(e[n],u):e[n],l=c?f.custom:f[typeof o];if(s(l,\"Failed to find unique map container for type\",typeof o),l instanceof Map){const s=l.entries();let a;for(;!(a=s.next()).done;)if(m(a.value[0],o)){const s=t.localize([...t.path,n],[e,...t.ancestors]),o={pos:n,value:e[n],dupePos:a.value[1],dupeValue:e[a.value[1]]};return u&&(o.path=i),r(\"array.unique\",o,s)}l.set(o,n)}else{if((!h||void 0!==o)&&void 0!==l[o]){const s={pos:n,value:e[n],dupePos:l[o],dupeValue:e[l[o]]};return u&&(s.path=i),r(\"array.unique\",s,t.localize([...t.path,n],[e,...t.ancestors]))}l[o]=n}}return e},args:[\"comparator\",\"options\"],multi:!0}},cast:{set:{from:Array.isArray,to:(e,t)=>new Set(e)}},rebuild(e){e.$_terms._inclusions=[],e.$_terms._exclusions=[],e.$_terms._requireds=[];for(const t of e.$_terms.items)c.validateSingle(t,e),\"required\"===t._flags.presence?e.$_terms._requireds.push(t):\"forbidden\"===t._flags.presence?e.$_terms._exclusions.push(t):e.$_terms._inclusions.push(t);for(const t of e.$_terms.ordered)c.validateSingle(t,e)},manifest:{build:(e,t)=>(t.items&&(e=e.items(...t.items)),t.ordered&&(e=e.ordered(...t.ordered)),e)},messages:{\"array.base\":\"{{#label}} must be an array\",\"array.excludes\":\"{{#label}} contains an excluded value\",\"array.hasKnown\":\"{{#label}} does not contain at least one required match for type {:#patternLabel}\",\"array.hasUnknown\":\"{{#label}} does not contain at least one required match\",\"array.includes\":\"{{#label}} does not match any of the allowed types\",\"array.includesRequiredBoth\":\"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)\",\"array.includesRequiredKnowns\":\"{{#label}} does not contain {{#knownMisses}}\",\"array.includesRequiredUnknowns\":\"{{#label}} does not contain {{#unknownMisses}} required value(s)\",\"array.length\":\"{{#label}} must contain {{#limit}} items\",\"array.max\":\"{{#label}} must contain less than or equal to {{#limit}} items\",\"array.min\":\"{{#label}} must contain at least {{#limit}} items\",\"array.orderedLength\":\"{{#label}} must contain at most {{#limit}} items\",\"array.sort\":\"{{#label}} must be sorted in {#order} order by {{#by}}\",\"array.sort.mismatching\":\"{{#label}} cannot be sorted due to mismatching types\",\"array.sort.unsupported\":\"{{#label}} cannot be sorted due to unsupported type {#type}\",\"array.sparse\":\"{{#label}} must not be a sparse array item\",\"array.unique\":\"{{#label}} contains a duplicate value\"}}),c.fillMissedErrors=function(e,t,r,s,n,a){const o=[];let i=0;for(const e of r){const t=e._flags.label;t?o.push(t):++i}o.length?i?t.push(e.$_createError(\"array.includesRequiredBoth\",s,{knownMisses:o,unknownMisses:i},n,a)):t.push(e.$_createError(\"array.includesRequiredKnowns\",s,{knownMisses:o},n,a)):t.push(e.$_createError(\"array.includesRequiredUnknowns\",s,{unknownMisses:i},n,a))},c.fillOrderedErrors=function(e,t,r,s,n,a){const o=[];for(const e of r)\"required\"===e._flags.presence&&o.push(e);o.length&&c.fillMissedErrors(e,t,o,s,n,a)},c.fillDefault=function(e,t,r,s){const n=[];let a=!0;for(let o=e.length-1;o>=0;--o){const i=e[o],l=[t,...r.ancestors],c=i.$_validate(void 0,r.localize(r.path,l,i),s).value;if(a){if(void 0===c)continue;a=!1}n.unshift(c)}n.length&&t.push(...n)},c.fastSplice=function(e,t){let r=t;for(;r<e.length;)e[r++]=e[r];--e.length},c.validateSingle=function(e,t){(\"array\"===e.type||e._flags._arrayItems)&&(s(!t._flags.single,\"Cannot specify array item with single rule enabled\"),t.$_setFlag(\"_arrayItems\",!0,{clone:!1}))},c.sort=function(e,t,r,s,n){const a=\"ascending\"===r.order?1:-1,o=-1*a,i=a,l=(l,u)=>{let f=c.compare(l,u,o,i);if(null!==f)return f;if(r.by&&(l=r.by.resolve(l,s,n),u=r.by.resolve(u,s,n)),f=c.compare(l,u,o,i),null!==f)return f;const m=typeof l;if(m!==typeof u)throw e.$_createError(\"array.sort.mismatching\",t,null,s,n);if(\"number\"!==m&&\"string\"!==m)throw e.$_createError(\"array.sort.unsupported\",t,{type:m},s,n);return\"number\"===m?(l-u)*a:l<u?o:i};try{return{value:t.slice().sort(l)}}catch(e){return{errors:e}}},c.compare=function(e,t,r,s){return e===t?0:void 0===e?1:void 0===t?-1:null===e?s:null===t?r:null}},4937:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o=r(2036),i={isBool:function(e){return\"boolean\"==typeof e}};e.exports=n.extend({type:\"boolean\",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:\"values\"},truthy:{init:null,manifest:\"values\"}},coerce(e,{schema:t}){if(\"boolean\"!=typeof e){if(\"string\"==typeof e){const r=t._flags.sensitive?e:e.toLowerCase();e=\"true\"===r||\"false\"!==r&&e}return\"boolean\"!=typeof e&&(e=t.$_terms.truthy&&t.$_terms.truthy.has(e,null,null,!t._flags.sensitive)||(!t.$_terms.falsy||!t.$_terms.falsy.has(e,null,null,!t._flags.sensitive))&&e),{value:e}}},validate(e,{error:t}){if(\"boolean\"!=typeof e)return{value:e,errors:t(\"boolean.base\")}},rules:{truthy:{method(...e){a.verifyFlat(e,\"truthy\");const t=this.clone();t.$_terms.truthy=t.$_terms.truthy||new o;for(let r=0;r<e.length;++r){const n=e[r];s(void 0!==n,\"Cannot call truthy with undefined\"),t.$_terms.truthy.add(n)}return t}},falsy:{method(...e){a.verifyFlat(e,\"falsy\");const t=this.clone();t.$_terms.falsy=t.$_terms.falsy||new o;for(let r=0;r<e.length;++r){const n=e[r];s(void 0!==n,\"Cannot call falsy with undefined\"),t.$_terms.falsy.add(n)}return t}},sensitive:{method(e=!0){return this.$_setFlag(\"sensitive\",e)}}},cast:{number:{from:i.isBool,to:(e,t)=>e?1:0},string:{from:i.isBool,to:(e,t)=>e?\"true\":\"false\"}},manifest:{build:(e,t)=>(t.truthy&&(e=e.truthy(...t.truthy)),t.falsy&&(e=e.falsy(...t.falsy)),e)},messages:{\"boolean.base\":\"{{#label}} must be a boolean\"}})},7500:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o=r(3328),i={isDate:function(e){return e instanceof Date}};e.exports=n.extend({type:\"date\",coerce:{from:[\"number\",\"string\"],method:(e,{schema:t})=>({value:i.parse(e,t._flags.format)||e})},validate(e,{schema:t,error:r,prefs:s}){if(e instanceof Date&&!isNaN(e.getTime()))return;const n=t._flags.format;return s.convert&&n&&\"string\"==typeof e?{value:e,errors:r(\"date.format\",{format:n})}:{value:e,errors:r(\"date.base\")}},rules:{compare:{method:!1,validate(e,t,{date:r},{name:s,operator:n,args:o}){const i=\"now\"===r?Date.now():r.getTime();return a.compare(e.getTime(),i,n)?e:t.error(\"date.\"+s,{limit:o.date,value:e})},args:[{name:\"date\",ref:!0,normalize:e=>\"now\"===e?e:i.parse(e),assert:e=>null!==e,message:\"must have a valid date format\"}]},format:{method(e){return s([\"iso\",\"javascript\",\"unix\"].includes(e),\"Unknown date format\",e),this.$_setFlag(\"format\",e)}},greater:{method(e){return this.$_addRule({name:\"greater\",method:\"compare\",args:{date:e},operator:\">\"})}},iso:{method(){return this.format(\"iso\")}},less:{method(e){return this.$_addRule({name:\"less\",method:\"compare\",args:{date:e},operator:\"<\"})}},max:{method(e){return this.$_addRule({name:\"max\",method:\"compare\",args:{date:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"compare\",args:{date:e},operator:\">=\"})}},timestamp:{method(e=\"javascript\"){return s([\"javascript\",\"unix\"].includes(e),'\"type\" must be one of \"javascript, unix\"'),this.format(e)}}},cast:{number:{from:i.isDate,to:(e,t)=>e.getTime()},string:{from:i.isDate,to:(e,{prefs:t})=>o.date(e,t)}},messages:{\"date.base\":\"{{#label}} must be a valid date\",\"date.format\":'{{#label}} must be in {msg(\"date.format.\" + #format) || #format} format',\"date.greater\":\"{{#label}} must be greater than {{:#limit}}\",\"date.less\":\"{{#label}} must be less than {{:#limit}}\",\"date.max\":\"{{#label}} must be less than or equal to {{:#limit}}\",\"date.min\":\"{{#label}} must be greater than or equal to {{:#limit}}\",\"date.format.iso\":\"ISO 8601 date\",\"date.format.javascript\":\"timestamp or number of milliseconds\",\"date.format.unix\":\"timestamp or number of seconds\"}}),i.parse=function(e,t){if(e instanceof Date)return e;if(\"string\"!=typeof e&&(isNaN(e)||!isFinite(e)))return null;if(/^\\s*$/.test(e))return null;if(\"iso\"===t)return a.isIsoDate(e)?i.date(e.toString()):null;const r=e;if(\"string\"==typeof e&&/^[+-]?\\d+(\\.\\d+)?$/.test(e)&&(e=parseFloat(e)),t){if(\"javascript\"===t)return i.date(1*e);if(\"unix\"===t)return i.date(1e3*e);if(\"string\"==typeof r)return null}return i.date(e)},i.date=function(e){const t=new Date(e);return isNaN(t.getTime())?null:t}},390:(e,t,r)=>{\"use strict\";const s=r(375),n=r(7824);e.exports=n.extend({type:\"function\",properties:{typeof:\"function\"},rules:{arity:{method(e){return s(Number.isSafeInteger(e)&&e>=0,\"n must be a positive integer\"),this.$_addRule({name:\"arity\",args:{n:e}})},validate:(e,t,{n:r})=>e.length===r?e:t.error(\"function.arity\",{n:r})},class:{method(){return this.$_addRule(\"class\")},validate:(e,t)=>/^\\s*class\\s/.test(e.toString())?e:t.error(\"function.class\",{value:e})},minArity:{method(e){return s(Number.isSafeInteger(e)&&e>0,\"n must be a strict positive integer\"),this.$_addRule({name:\"minArity\",args:{n:e}})},validate:(e,t,{n:r})=>e.length>=r?e:t.error(\"function.minArity\",{n:r})},maxArity:{method(e){return s(Number.isSafeInteger(e)&&e>=0,\"n must be a positive integer\"),this.$_addRule({name:\"maxArity\",args:{n:e}})},validate:(e,t,{n:r})=>e.length<=r?e:t.error(\"function.maxArity\",{n:r})}},messages:{\"function.arity\":\"{{#label}} must have an arity of {{#n}}\",\"function.class\":\"{{#label}} must be a class\",\"function.maxArity\":\"{{#label}} must have an arity lesser or equal to {{#n}}\",\"function.minArity\":\"{{#label}} must have an arity greater or equal to {{#n}}\"}})},7824:(e,t,r)=>{\"use strict\";const s=r(978),n=r(375),a=r(8571),o=r(3652),i=r(8068),l=r(8160),c=r(3292),u=r(6354),f=r(6133),m=r(3328),h={renameDefaults:{alias:!1,multiple:!1,override:!1}};e.exports=i.extend({type:\"_keys\",properties:{typeof:\"object\"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:\"schema\",to:\"key\"}}},patterns:{init:null},renames:{init:null}},args:(e,t)=>e.keys(t),validate(e,{schema:t,error:r,state:s,prefs:n}){if(!e||typeof e!==t.$_property(\"typeof\")||Array.isArray(e))return{value:e,errors:r(\"object.base\",{type:t.$_property(\"typeof\")})};if(!(t.$_terms.renames||t.$_terms.dependencies||t.$_terms.keys||t.$_terms.patterns||t.$_terms.externals))return;e=h.clone(e,n);const a=[];if(t.$_terms.renames&&!h.rename(t,e,s,n,a))return{value:e,errors:a};if(!t.$_terms.keys&&!t.$_terms.patterns&&!t.$_terms.dependencies)return{value:e,errors:a};const o=new Set(Object.keys(e));if(t.$_terms.keys){const r=[e,...s.ancestors];for(const i of t.$_terms.keys){const t=i.key,l=e[t];o.delete(t);const c=s.localize([...s.path,t],r,i),u=i.schema.$_validate(l,c,n);if(u.errors){if(n.abortEarly)return{value:e,errors:u.errors};void 0!==u.value&&(e[t]=u.value),a.push(...u.errors)}else\"strip\"===i.schema._flags.result||void 0===u.value&&void 0!==l?delete e[t]:void 0!==u.value&&(e[t]=u.value)}}if(o.size||t._flags._hasPatternMatch){const r=h.unknown(t,e,o,a,s,n);if(r)return r}if(t.$_terms.dependencies)for(const r of t.$_terms.dependencies){if(r.key&&void 0===r.key.resolve(e,s,n,null,{shadow:!1}))continue;const o=h.dependencies[r.rel](t,r,e,s,n);if(o){const r=t.$_createError(o.code,e,o.context,s,n);if(n.abortEarly)return{value:e,errors:r};a.push(r)}}return{value:e,errors:a}},rules:{and:{method(...e){return l.verifyFlat(e,\"and\"),h.dependency(this,\"and\",null,e)}},append:{method(e){return null==e||0===Object.keys(e).length?this:this.keys(e)}},assert:{method(e,t,r){m.isTemplate(e)||(e=c.ref(e)),n(void 0===r||\"string\"==typeof r,\"Message must be a string\"),t=this.$_compile(t,{appendPath:!0});const s=this.$_addRule({name:\"assert\",args:{subject:e,schema:t,message:r}});return s.$_mutateRegister(e),s.$_mutateRegister(t),s},validate(e,{error:t,prefs:r,state:s},{subject:n,schema:a,message:o}){const i=n.resolve(e,s,r),l=f.isRef(n)?n.absolute(s):[];return a.$_match(i,s.localize(l,[e,...s.ancestors],a),r)?e:t(\"object.assert\",{subject:n,message:o})},args:[\"subject\",\"schema\",\"message\"],multi:!0},instance:{method(e,t){return n(\"function\"==typeof e,\"constructor must be a function\"),t=t||e.name,this.$_addRule({name:\"instance\",args:{constructor:e,name:t}})},validate:(e,t,{constructor:r,name:s})=>e instanceof r?e:t.error(\"object.instance\",{type:s,value:e}),args:[\"constructor\",\"name\"]},keys:{method(e){n(void 0===e||\"object\"==typeof e,\"Object schema must be a valid object\"),n(!l.isSchema(e),\"Object schema cannot be a joi schema\");const t=this.clone();if(e)if(Object.keys(e).length){t.$_terms.keys=t.$_terms.keys?t.$_terms.keys.filter((t=>!e.hasOwnProperty(t.key))):new h.Keys;for(const r in e)l.tryWithPath((()=>t.$_terms.keys.push({key:r,schema:this.$_compile(e[r])})),r)}else t.$_terms.keys=new h.Keys;else t.$_terms.keys=null;return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:\"length\",args:{limit:e},operator:\"=\"})},validate:(e,t,{limit:r},{name:s,operator:n,args:a})=>l.compare(Object.keys(e).length,r,n)?e:t.error(\"object.\"+s,{limit:a.limit,value:e}),args:[{name:\"limit\",ref:!0,assert:l.limit,message:\"must be a positive integer\"}]},max:{method(e){return this.$_addRule({name:\"max\",method:\"length\",args:{limit:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"length\",args:{limit:e},operator:\">=\"})}},nand:{method(...e){return l.verifyFlat(e,\"nand\"),h.dependency(this,\"nand\",null,e)}},or:{method(...e){return l.verifyFlat(e,\"or\"),h.dependency(this,\"or\",null,e)}},oxor:{method(...e){return h.dependency(this,\"oxor\",null,e)}},pattern:{method(e,t,r={}){const s=e instanceof RegExp;s||(e=this.$_compile(e,{appendPath:!0})),n(void 0!==t,\"Invalid rule\"),l.assertOptions(r,[\"fallthrough\",\"matches\"]),s&&n(!e.flags.includes(\"g\")&&!e.flags.includes(\"y\"),\"pattern should not use global or sticky mode\"),t=this.$_compile(t,{appendPath:!0});const a=this.clone();a.$_terms.patterns=a.$_terms.patterns||[];const o={[s?\"regex\":\"schema\"]:e,rule:t};return r.matches&&(o.matches=this.$_compile(r.matches),\"array\"!==o.matches.type&&(o.matches=o.matches.$_root.array().items(o.matches)),a.$_mutateRegister(o.matches),a.$_setFlag(\"_hasPatternMatch\",!0,{clone:!1})),r.fallthrough&&(o.fallthrough=!0),a.$_terms.patterns.push(o),a.$_mutateRegister(t),a}},ref:{method(){return this.$_addRule(\"ref\")},validate:(e,t)=>f.isRef(e)?e:t.error(\"object.refType\",{value:e})},regex:{method(){return this.$_addRule(\"regex\")},validate:(e,t)=>e instanceof RegExp?e:t.error(\"object.regex\",{value:e})},rename:{method(e,t,r={}){n(\"string\"==typeof e||e instanceof RegExp,\"Rename missing the from argument\"),n(\"string\"==typeof t||t instanceof m,\"Invalid rename to argument\"),n(t!==e,\"Cannot rename key to same name:\",e),l.assertOptions(r,[\"alias\",\"ignoreUndefined\",\"override\",\"multiple\"]);const a=this.clone();a.$_terms.renames=a.$_terms.renames||[];for(const t of a.$_terms.renames)n(t.from!==e,\"Cannot rename the same key multiple times\");return t instanceof m&&a.$_mutateRegister(t),a.$_terms.renames.push({from:e,to:t,options:s(h.renameDefaults,r)}),a}},schema:{method(e=\"any\"){return this.$_addRule({name:\"schema\",args:{type:e}})},validate:(e,t,{type:r})=>!l.isSchema(e)||\"any\"!==r&&e.type!==r?t.error(\"object.schema\",{type:r}):e},unknown:{method(e){return this.$_setFlag(\"unknown\",!1!==e)}},with:{method(e,t,r={}){return h.dependency(this,\"with\",e,t,r)}},without:{method(e,t,r={}){return h.dependency(this,\"without\",e,t,r)}},xor:{method(...e){return l.verifyFlat(e,\"xor\"),h.dependency(this,\"xor\",null,e)}}},overrides:{default(e,t){return void 0===e&&(e=l.symbols.deepDefault),this.$_parent(\"default\",e,t)}},rebuild(e){if(e.$_terms.keys){const t=new o.Sorter;for(const r of e.$_terms.keys)l.tryWithPath((()=>t.add(r,{after:r.schema.$_rootReferences(),group:r.key})),r.key);e.$_terms.keys=new h.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys&&(e=e.keys(t.keys)),t.dependencies)for(const{rel:r,key:s=null,peers:n,options:a}of t.dependencies)e=h.dependency(e,r,s,n,a);if(t.patterns)for(const{regex:r,schema:s,rule:n,fallthrough:a,matches:o}of t.patterns)e=e.pattern(r||s,n,{fallthrough:a,matches:o});if(t.renames)for(const{from:r,to:s,options:n}of t.renames)e=e.rename(r,s,n);return e}},messages:{\"object.and\":\"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}\",\"object.assert\":'{{#label}} is invalid because {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}',\"object.base\":\"{{#label}} must be of type {{#type}}\",\"object.instance\":\"{{#label}} must be an instance of {{:#type}}\",\"object.length\":'{{#label}} must have {{#limit}} key{if(#limit == 1, \"\", \"s\")}',\"object.max\":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, \"\", \"s\")}',\"object.min\":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, \"\", \"s\")}',\"object.missing\":\"{{#label}} must contain at least one of {{#peersWithLabels}}\",\"object.nand\":\"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}\",\"object.oxor\":\"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}\",\"object.pattern.match\":\"{{#label}} keys failed to match pattern requirements\",\"object.refType\":\"{{#label}} must be a Joi reference\",\"object.regex\":\"{{#label}} must be a RegExp object\",\"object.rename.multiple\":\"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}\",\"object.rename.override\":\"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists\",\"object.schema\":\"{{#label}} must be a Joi schema of {{#type}} type\",\"object.unknown\":\"{{#label}} is not allowed\",\"object.with\":\"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}\",\"object.without\":\"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}\",\"object.xor\":\"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}\"}}),h.clone=function(e,t){if(\"object\"==typeof e){if(t.nonEnumerables)return a(e,{shallow:!0});const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}const r=function(...t){return e.apply(this,t)};return r.prototype=a(e.prototype),Object.defineProperty(r,\"name\",{value:e.name,writable:!1}),Object.defineProperty(r,\"length\",{value:e.length,writable:!1}),Object.assign(r,e),r},h.dependency=function(e,t,r,s,a){n(null===r||\"string\"==typeof r,t,\"key must be a strings\"),a||(a=s.length>1&&\"object\"==typeof s[s.length-1]?s.pop():{}),l.assertOptions(a,[\"separator\"]),s=[].concat(s);const o=l.default(a.separator,\".\"),i=[];for(const e of s)n(\"string\"==typeof e,t,\"peers must be strings\"),i.push(c.ref(e,{separator:o,ancestor:0,prefix:!1}));null!==r&&(r=c.ref(r,{separator:o,ancestor:0,prefix:!1}));const u=e.clone();return u.$_terms.dependencies=u.$_terms.dependencies||[],u.$_terms.dependencies.push(new h.Dependency(t,r,i,s)),u},h.dependencies={and(e,t,r,s,n){const a=[],o=[],i=t.peers.length;for(const e of t.peers)void 0===e.resolve(r,s,n,null,{shadow:!1})?a.push(e.key):o.push(e.key);if(a.length!==i&&o.length!==i)return{code:\"object.and\",context:{present:o,presentWithLabels:h.keysToLabels(e,o),missing:a,missingWithLabels:h.keysToLabels(e,a)}}},nand(e,t,r,s,n){const a=[];for(const e of t.peers)void 0!==e.resolve(r,s,n,null,{shadow:!1})&&a.push(e.key);if(a.length!==t.peers.length)return;const o=t.paths[0],i=t.paths.slice(1);return{code:\"object.nand\",context:{main:o,mainWithLabel:h.keysToLabels(e,o),peers:i,peersWithLabels:h.keysToLabels(e,i)}}},or(e,t,r,s,n){for(const e of t.peers)if(void 0!==e.resolve(r,s,n,null,{shadow:!1}))return;return{code:\"object.missing\",context:{peers:t.paths,peersWithLabels:h.keysToLabels(e,t.paths)}}},oxor(e,t,r,s,n){const a=[];for(const e of t.peers)void 0!==e.resolve(r,s,n,null,{shadow:!1})&&a.push(e.key);if(!a.length||1===a.length)return;const o={peers:t.paths,peersWithLabels:h.keysToLabels(e,t.paths)};return o.present=a,o.presentWithLabels=h.keysToLabels(e,a),{code:\"object.oxor\",context:o}},with(e,t,r,s,n){for(const a of t.peers)if(void 0===a.resolve(r,s,n,null,{shadow:!1}))return{code:\"object.with\",context:{main:t.key.key,mainWithLabel:h.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:h.keysToLabels(e,a.key)}}},without(e,t,r,s,n){for(const a of t.peers)if(void 0!==a.resolve(r,s,n,null,{shadow:!1}))return{code:\"object.without\",context:{main:t.key.key,mainWithLabel:h.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:h.keysToLabels(e,a.key)}}},xor(e,t,r,s,n){const a=[];for(const e of t.peers)void 0!==e.resolve(r,s,n,null,{shadow:!1})&&a.push(e.key);if(1===a.length)return;const o={peers:t.paths,peersWithLabels:h.keysToLabels(e,t.paths)};return 0===a.length?{code:\"object.missing\",context:o}:(o.present=a,o.presentWithLabels=h.keysToLabels(e,a),{code:\"object.xor\",context:o})}},h.keysToLabels=function(e,t){return Array.isArray(t)?t.map((t=>e.$_mapLabels(t))):e.$_mapLabels(t)},h.rename=function(e,t,r,s,n){const a={};for(const o of e.$_terms.renames){const i=[],l=\"string\"!=typeof o.from;if(l)for(const e in t){if(void 0===t[e]&&o.options.ignoreUndefined)continue;if(e===o.to)continue;const r=o.from.exec(e);r&&i.push({from:e,to:o.to,match:r})}else!Object.prototype.hasOwnProperty.call(t,o.from)||void 0===t[o.from]&&o.options.ignoreUndefined||i.push(o);for(const c of i){const i=c.from;let u=c.to;if(u instanceof m&&(u=u.render(t,r,s,c.match)),i!==u){if(!o.options.multiple&&a[u]&&(n.push(e.$_createError(\"object.rename.multiple\",t,{from:i,to:u,pattern:l},r,s)),s.abortEarly))return!1;if(Object.prototype.hasOwnProperty.call(t,u)&&!o.options.override&&!a[u]&&(n.push(e.$_createError(\"object.rename.override\",t,{from:i,to:u,pattern:l},r,s)),s.abortEarly))return!1;void 0===t[i]?delete t[u]:t[u]=t[i],a[u]=!0,o.options.alias||delete t[i]}}}return!0},h.unknown=function(e,t,r,s,n,a){if(e.$_terms.patterns){let o=!1;const i=e.$_terms.patterns.map((e=>{if(e.matches)return o=!0,[]})),l=[t,...n.ancestors];for(const o of r){const c=t[o],u=[...n.path,o];for(let f=0;f<e.$_terms.patterns.length;++f){const m=e.$_terms.patterns[f];if(m.regex){const e=m.regex.test(o);if(n.mainstay.tracer.debug(n,\"rule\",\"pattern.\".concat(f),e?\"pass\":\"error\"),!e)continue}else if(!m.schema.$_match(o,n.nest(m.schema,\"pattern.\".concat(f)),a))continue;r.delete(o);const h=n.localize(u,l,{schema:m.rule,key:o}),d=m.rule.$_validate(c,h,a);if(d.errors){if(a.abortEarly)return{value:t,errors:d.errors};s.push(...d.errors)}if(m.matches&&i[f].push(o),t[o]=d.value,!m.fallthrough)break}}if(o)for(let r=0;r<i.length;++r){const o=i[r];if(!o)continue;const c=e.$_terms.patterns[r].matches,f=n.localize(n.path,l,c),m=c.$_validate(o,f,a);if(m.errors){const r=u.details(m.errors,{override:!1});r.matches=o;const i=e.$_createError(\"object.pattern.match\",t,r,n,a);if(a.abortEarly)return{value:t,errors:i};s.push(i)}}}if(r.size&&(e.$_terms.keys||e.$_terms.patterns)){if(a.stripUnknown&&!e._flags.unknown||a.skipFunctions){const e=!(!a.stripUnknown||!0!==a.stripUnknown&&!a.stripUnknown.objects);for(const s of r)e?(delete t[s],r.delete(s)):\"function\"==typeof t[s]&&r.delete(s)}if(!l.default(e._flags.unknown,a.allowUnknown))for(const o of r){const r=n.localize([...n.path,o],[]),i=e.$_createError(\"object.unknown\",t[o],{child:o},r,a,{flags:!1});if(a.abortEarly)return{value:t,errors:i};s.push(i)}}},h.Dependency=class{constructor(e,t,r,s){this.rel=e,this.key=t,this.peers=r,this.paths=s}describe(){const e={rel:this.rel,peers:this.paths};return null!==this.key&&(e.key=this.key.key),\".\"!==this.peers[0].separator&&(e.options={separator:this.peers[0].separator}),e}},h.Keys=class extends Array{concat(e){const t=this.slice(),r=new Map;for(let e=0;e<t.length;++e)r.set(t[e].key,e);for(const s of e){const e=s.key,n=r.get(e);void 0!==n?t[n]={key:e,schema:t[n].schema.concat(s.schema)}:t.push(s)}return t}}},8785:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o=r(3292),i=r(6354),l={};e.exports=n.extend({type:\"link\",properties:{schemaChain:!0},terms:{link:{init:null,manifest:\"single\",register:!1}},args:(e,t)=>e.ref(t),validate(e,{schema:t,state:r,prefs:n}){s(t.$_terms.link,\"Uninitialized link schema\");const a=l.generate(t,e,r,n),o=t.$_terms.link[0].ref;return a.$_validate(e,r.nest(a,\"link:\".concat(o.display,\":\").concat(a.type)),n)},generate:(e,t,r,s)=>l.generate(e,t,r,s),rules:{ref:{method(e){s(!this.$_terms.link,\"Cannot reinitialize schema\"),e=o.ref(e),s(\"value\"===e.type||\"local\"===e.type,\"Invalid reference type:\",e.type),s(\"local\"===e.type||\"root\"===e.ancestor||e.ancestor>0,\"Link cannot reference itself\");const t=this.clone();return t.$_terms.link=[{ref:e}],t}},relative:{method(e=!0){return this.$_setFlag(\"relative\",e)}}},overrides:{concat(e){s(this.$_terms.link,\"Uninitialized link schema\"),s(a.isSchema(e),\"Invalid schema object\"),s(\"link\"!==e.type,\"Cannot merge type link with another link\");const t=this.clone();return t.$_terms.whens||(t.$_terms.whens=[]),t.$_terms.whens.push({concat:e}),t.$_mutateRebuild()}},manifest:{build:(e,t)=>(s(t.link,\"Invalid link description missing link\"),e.ref(t.link))}}),l.generate=function(e,t,r,s){let n=r.mainstay.links.get(e);if(n)return n._generate(t,r,s).schema;const a=e.$_terms.link[0].ref,{perspective:o,path:i}=l.perspective(a,r);l.assert(o,\"which is outside of schema boundaries\",a,e,r,s);try{n=i.length?o.$_reach(i):o}catch(t){l.assert(!1,\"to non-existing schema\",a,e,r,s)}return l.assert(\"link\"!==n.type,\"which is another link\",a,e,r,s),e._flags.relative||r.mainstay.links.set(e,n),n._generate(t,r,s).schema},l.perspective=function(e,t){if(\"local\"===e.type){for(const{schema:r,key:s}of t.schemas){if((r._flags.id||s)===e.path[0])return{perspective:r,path:e.path.slice(1)};if(r.$_terms.shared)for(const t of r.$_terms.shared)if(t._flags.id===e.path[0])return{perspective:t,path:e.path.slice(1)}}return{perspective:null,path:null}}return\"root\"===e.ancestor?{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}:{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}},l.assert=function(e,t,r,n,a,o){e||s(!1,'\"'.concat(i.label(n._flags,a,o),'\" contains link reference \"').concat(r.display,'\" ').concat(t))}},3832:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o={numberRx:/^\\s*[+-]?(?:(?:\\d+(?:\\.\\d*)?)|(?:\\.\\d+))(?:e([+-]?\\d+))?\\s*$/i,precisionRx:/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/};e.exports=n.extend({type:\"number\",flags:{unsafe:{default:!1}},coerce:{from:\"string\",method(e,{schema:t,error:r}){const s=e.match(o.numberRx);if(!s)return;e=e.trim();const n={value:parseFloat(e)};if(0===n.value&&(n.value=0),!t._flags.unsafe)if(e.match(/e/i)){if(o.normalizeExponent(\"\".concat(n.value/Math.pow(10,s[1]),\"e\").concat(s[1]))!==o.normalizeExponent(e))return n.errors=r(\"number.unsafe\"),n}else{const t=n.value.toString();if(t.match(/e/i))return n;if(t!==o.normalizeDecimal(e))return n.errors=r(\"number.unsafe\"),n}return n}},validate(e,{schema:t,error:r,prefs:s}){if(e===1/0||e===-1/0)return{value:e,errors:r(\"number.infinity\")};if(!a.isNumber(e))return{value:e,errors:r(\"number.base\")};const n={value:e};if(s.convert){const e=t.$_getRule(\"precision\");if(e){const t=Math.pow(10,e.args.limit);n.value=Math.round(n.value*t)/t}}return 0===n.value&&(n.value=0),!t._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(n.errors=r(\"number.unsafe\")),n},rules:{compare:{method:!1,validate:(e,t,{limit:r},{name:s,operator:n,args:o})=>a.compare(e,r,n)?e:t.error(\"number.\"+s,{limit:o.limit,value:e}),args:[{name:\"limit\",ref:!0,assert:a.isNumber,message:\"must be a number\"}]},greater:{method(e){return this.$_addRule({name:\"greater\",method:\"compare\",args:{limit:e},operator:\">\"})}},integer:{method(){return this.$_addRule(\"integer\")},validate:(e,t)=>Math.trunc(e)-e==0?e:t.error(\"number.integer\")},less:{method(e){return this.$_addRule({name:\"less\",method:\"compare\",args:{limit:e},operator:\"<\"})}},max:{method(e){return this.$_addRule({name:\"max\",method:\"compare\",args:{limit:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"compare\",args:{limit:e},operator:\">=\"})}},multiple:{method(e){return this.$_addRule({name:\"multiple\",args:{base:e}})},validate:(e,t,{base:r},s)=>e*(1/r)%1==0?e:t.error(\"number.multiple\",{multiple:s.args.base,value:e}),args:[{name:\"base\",ref:!0,assert:e=>\"number\"==typeof e&&isFinite(e)&&e>0,message:\"must be a positive number\"}],multi:!0},negative:{method(){return this.sign(\"negative\")}},port:{method(){return this.$_addRule(\"port\")},validate:(e,t)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:t.error(\"number.port\")},positive:{method(){return this.sign(\"positive\")}},precision:{method(e){return s(Number.isSafeInteger(e),\"limit must be an integer\"),this.$_addRule({name:\"precision\",args:{limit:e}})},validate(e,t,{limit:r}){const s=e.toString().match(o.precisionRx);return Math.max((s[1]?s[1].length:0)-(s[2]?parseInt(s[2],10):0),0)<=r?e:t.error(\"number.precision\",{limit:r,value:e})},convert:!0},sign:{method(e){return s([\"negative\",\"positive\"].includes(e),\"Invalid sign\",e),this.$_addRule({name:\"sign\",args:{sign:e}})},validate:(e,t,{sign:r})=>\"negative\"===r&&e<0||\"positive\"===r&&e>0?e:t.error(\"number.\".concat(r))},unsafe:{method(e=!0){return s(\"boolean\"==typeof e,\"enabled must be a boolean\"),this.$_setFlag(\"unsafe\",e)}}},cast:{string:{from:e=>\"number\"==typeof e,to:(e,t)=>e.toString()}},messages:{\"number.base\":\"{{#label}} must be a number\",\"number.greater\":\"{{#label}} must be greater than {{#limit}}\",\"number.infinity\":\"{{#label}} cannot be infinity\",\"number.integer\":\"{{#label}} must be an integer\",\"number.less\":\"{{#label}} must be less than {{#limit}}\",\"number.max\":\"{{#label}} must be less than or equal to {{#limit}}\",\"number.min\":\"{{#label}} must be greater than or equal to {{#limit}}\",\"number.multiple\":\"{{#label}} must be a multiple of {{#multiple}}\",\"number.negative\":\"{{#label}} must be a negative number\",\"number.port\":\"{{#label}} must be a valid port\",\"number.positive\":\"{{#label}} must be a positive number\",\"number.precision\":\"{{#label}} must have no more than {{#limit}} decimal places\",\"number.unsafe\":\"{{#label}} must be a safe number\"}}),o.normalizeExponent=function(e){return e.replace(/E/,\"e\").replace(/\\.(\\d*[1-9])?0+e/,\".$1e\").replace(/\\.e/,\"e\").replace(/e\\+/,\"e\").replace(/^\\+/,\"\").replace(/^(-?)0+([1-9])/,\"$1$2\")},o.normalizeDecimal=function(e){return(e=e.replace(/^\\+/,\"\").replace(/\\.0*$/,\"\").replace(/^(-?)\\.([^\\.]*)$/,\"$10.$2\").replace(/^(-?)0+([0-9])/,\"$1$2\")).includes(\".\")&&e.endsWith(\"0\")&&(e=e.replace(/0+$/,\"\")),\"-0\"===e?\"0\":e}},8966:(e,t,r)=>{\"use strict\";const s=r(7824);e.exports=s.extend({type:\"object\",cast:{map:{from:e=>e&&\"object\"==typeof e,to:(e,t)=>new Map(Object.entries(e))}}})},7417:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(5380),l=r(1745),c=r(9959),u=r(6064),f=r(9926),m=r(5752),h=r(8068),d=r(8160),p={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\\w\\-]{2}[\\w\\-]{2})*(?:[\\w\\-]{2}==|[\\w\\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\\/]{2}[A-Za-z0-9+\\/]{2})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$/},false:{true:/^(?:[\\w\\-]{2}[\\w\\-]{2})*(?:[\\w\\-]{2}(==)?|[\\w\\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\\/]{2}[A-Za-z0-9+\\/]{2})*(?:[A-Za-z0-9+\\/]{2}(==)?|[A-Za-z0-9+\\/]{3}=?)?$/}},dataUriRegex:/^data:[\\w+.-]+\\/[\\w+.-]+;((charset=[\\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:c.regex({cidr:\"forbidden\"}).regex,isoDurationRegex:/^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$/,guidBrackets:{\"{\":\"}\",\"[\":\"]\",\"(\":\")\",\"\":\"\"},guidVersions:{uuidv1:\"1\",uuidv2:\"2\",uuidv3:\"3\",uuidv4:\"4\",uuidv5:\"5\"},guidSeparators:new Set([void 0,!0,!1,\"-\",\":\"]),normalizationForms:[\"NFC\",\"NFD\",\"NFKC\",\"NFKD\"]};e.exports=h.extend({type:\"string\",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:\"string\",method(e,{schema:t,state:r,prefs:s}){const n=t.$_getRule(\"normalize\");n&&(e=e.normalize(n.args.form));const a=t.$_getRule(\"case\");a&&(e=\"upper\"===a.args.direction?e.toLocaleUpperCase():e.toLocaleLowerCase());const o=t.$_getRule(\"trim\");if(o&&o.args.enabled&&(e=e.trim()),t.$_terms.replacements)for(const r of t.$_terms.replacements)e=e.replace(r.pattern,r.replacement);const i=t.$_getRule(\"hex\");if(i&&i.args.options.byteAligned&&e.length%2!=0&&(e=\"0\".concat(e)),t.$_getRule(\"isoDate\")){const t=p.isoDate(e);t&&(e=t)}if(t._flags.truncate){const n=t.$_getRule(\"max\");if(n){let a=n.args.limit;if(d.isResolvable(a)&&(a=a.resolve(e,r,s),!d.limit(a)))return{value:e,errors:t.$_createError(\"any.ref\",a,{ref:n.args.limit,arg:\"limit\",reason:\"must be a positive integer\"},r,s)};e=e.slice(0,a)}}return{value:e}}},validate(e,{schema:t,error:r}){if(\"string\"!=typeof e)return{value:e,errors:r(\"string.base\")};if(\"\"===e){const s=t.$_getRule(\"min\");if(s&&0===s.args.limit)return;return{value:e,errors:r(\"string.empty\")}}},rules:{alphanum:{method(){return this.$_addRule(\"alphanum\")},validate:(e,t)=>/^[a-zA-Z0-9]+$/.test(e)?e:t.error(\"string.alphanum\")},base64:{method(e={}){return d.assertOptions(e,[\"paddingRequired\",\"urlSafe\"]),e=n({urlSafe:!1,paddingRequired:!0},e),o(\"boolean\"==typeof e.paddingRequired,\"paddingRequired must be boolean\"),o(\"boolean\"==typeof e.urlSafe,\"urlSafe must be boolean\"),this.$_addRule({name:\"base64\",args:{options:e}})},validate:(e,t,{options:r})=>p.base64Regex[r.paddingRequired][r.urlSafe].test(e)?e:t.error(\"string.base64\")},case:{method(e){return o([\"lower\",\"upper\"].includes(e),\"Invalid case:\",e),this.$_addRule({name:\"case\",args:{direction:e}})},validate:(e,t,{direction:r})=>\"lower\"===r&&e===e.toLocaleLowerCase()||\"upper\"===r&&e===e.toLocaleUpperCase()?e:t.error(\"string.\".concat(r,\"case\")),convert:!0},creditCard:{method(){return this.$_addRule(\"creditCard\")},validate(e,t){let r=e.length,s=0,n=1;for(;r--;){const t=e.charAt(r)*n;s+=t-9*(t>9),n^=3}return s>0&&s%10==0?e:t.error(\"string.creditCard\")}},dataUri:{method(e={}){return d.assertOptions(e,[\"paddingRequired\"]),e=n({paddingRequired:!0},e),o(\"boolean\"==typeof e.paddingRequired,\"paddingRequired must be boolean\"),this.$_addRule({name:\"dataUri\",args:{options:e}})},validate(e,t,{options:r}){const s=e.match(p.dataUriRegex);if(s){if(!s[2])return e;if(\"base64\"!==s[2])return e;if(p.base64Regex[r.paddingRequired].false.test(s[3]))return e}return t.error(\"string.dataUri\")}},domain:{method(e){e&&d.assertOptions(e,[\"allowFullyQualified\",\"allowUnicode\",\"maxDomainSegments\",\"minDomainSegments\",\"tlds\"]);const t=p.addressOptions(e);return this.$_addRule({name:\"domain\",args:{options:e},address:t})},validate:(e,t,r,{address:s})=>i.isValid(e,s)?e:t.error(\"string.domain\")},email:{method(e={}){d.assertOptions(e,[\"allowFullyQualified\",\"allowUnicode\",\"ignoreLength\",\"maxDomainSegments\",\"minDomainSegments\",\"multiple\",\"separator\",\"tlds\"]),o(void 0===e.multiple||\"boolean\"==typeof e.multiple,\"multiple option must be an boolean\");const t=p.addressOptions(e),r=new RegExp(\"\\\\s*[\".concat(e.separator?u(e.separator):\",\",\"]\\\\s*\"));return this.$_addRule({name:\"email\",args:{options:e},regex:r,address:t})},validate(e,t,{options:r},{regex:s,address:n}){const a=r.multiple?e.split(s):[e],o=[];for(const e of a)l.isValid(e,n)||o.push(e);return o.length?t.error(\"string.email\",{value:e,invalids:o}):e}},guid:{alias:\"uuid\",method(e={}){d.assertOptions(e,[\"version\",\"separator\"]);let t=\"\";if(e.version){const r=[].concat(e.version);o(r.length>=1,\"version must have at least 1 valid version specified\");const s=new Set;for(let e=0;e<r.length;++e){const n=r[e];o(\"string\"==typeof n,\"version at position \"+e+\" must be a string\");const a=p.guidVersions[n.toLowerCase()];o(a,\"version at position \"+e+\" must be one of \"+Object.keys(p.guidVersions).join(\", \")),o(!s.has(a),\"version at position \"+e+\" must not be a duplicate\"),t+=a,s.add(a)}}o(p.guidSeparators.has(e.separator),'separator must be one of true, false, \"-\", or \":\"');const r=void 0===e.separator?\"[:-]?\":!0===e.separator?\"[:-]\":!1===e.separator?\"[]?\":\"\\\\\".concat(e.separator),s=new RegExp(\"^([\\\\[{\\\\(]?)[0-9A-F]{8}(\".concat(r,\")[0-9A-F]{4}\\\\2?[\").concat(t||\"0-9A-F\",\"][0-9A-F]{3}\\\\2?[\").concat(t?\"89AB\":\"0-9A-F\",\"][0-9A-F]{3}\\\\2?[0-9A-F]{12}([\\\\]}\\\\)]?)$\"),\"i\");return this.$_addRule({name:\"guid\",args:{options:e},regex:s})},validate(e,t,r,{regex:s}){const n=s.exec(e);return n?p.guidBrackets[n[1]]!==n[n.length-1]?t.error(\"string.guid\"):e:t.error(\"string.guid\")}},hex:{method(e={}){return d.assertOptions(e,[\"byteAligned\"]),e=n({byteAligned:!1},e),o(\"boolean\"==typeof e.byteAligned,\"byteAligned must be boolean\"),this.$_addRule({name:\"hex\",args:{options:e}})},validate:(e,t,{options:r})=>p.hexRegex.test(e)?r.byteAligned&&e.length%2!=0?t.error(\"string.hexAlign\"):e:t.error(\"string.hex\")},hostname:{method(){return this.$_addRule(\"hostname\")},validate:(e,t)=>i.isValid(e,{minDomainSegments:1})||p.ipRegex.test(e)?e:t.error(\"string.hostname\")},insensitive:{method(){return this.$_setFlag(\"insensitive\",!0)}},ip:{method(e={}){d.assertOptions(e,[\"cidr\",\"version\"]);const{cidr:t,versions:r,regex:s}=c.regex(e),n=e.version?r:void 0;return this.$_addRule({name:\"ip\",args:{options:{cidr:t,version:n}},regex:s})},validate:(e,t,{options:r},{regex:s})=>s.test(e)?e:r.version?t.error(\"string.ipVersion\",{value:e,cidr:r.cidr,version:r.version}):t.error(\"string.ip\",{value:e,cidr:r.cidr})},isoDate:{method(){return this.$_addRule(\"isoDate\")},validate:(e,{error:t})=>p.isoDate(e)?e:t(\"string.isoDate\")},isoDuration:{method(){return this.$_addRule(\"isoDuration\")},validate:(e,t)=>p.isoDurationRegex.test(e)?e:t.error(\"string.isoDuration\")},length:{method(e,t){return p.length(this,\"length\",e,\"=\",t)},validate(e,t,{limit:r,encoding:s},{name:n,operator:a,args:o}){const i=!s&&e.length;return d.compare(i,r,a)?e:t.error(\"string.\"+n,{limit:o.limit,value:e,encoding:s})},args:[{name:\"limit\",ref:!0,assert:d.limit,message:\"must be a positive integer\"},\"encoding\"]},lowercase:{method(){return this.case(\"lower\")}},max:{method(e,t){return p.length(this,\"max\",e,\"<=\",t)},args:[\"limit\",\"encoding\"]},min:{method(e,t){return p.length(this,\"min\",e,\">=\",t)},args:[\"limit\",\"encoding\"]},normalize:{method(e=\"NFC\"){return o(p.normalizationForms.includes(e),\"normalization form must be one of \"+p.normalizationForms.join(\", \")),this.$_addRule({name:\"normalize\",args:{form:e}})},validate:(e,{error:t},{form:r})=>e===e.normalize(r)?e:t(\"string.normalize\",{value:e,form:r}),convert:!0},pattern:{alias:\"regex\",method(e,t={}){o(e instanceof RegExp,\"regex must be a RegExp\"),o(!e.flags.includes(\"g\")&&!e.flags.includes(\"y\"),\"regex should not use global or sticky mode\"),\"string\"==typeof t&&(t={name:t}),d.assertOptions(t,[\"invert\",\"name\"]);const r=[\"string.pattern\",t.invert?\".invert\":\"\",t.name?\".name\":\".base\"].join(\"\");return this.$_addRule({name:\"pattern\",args:{regex:e,options:t},errorCode:r})},validate:(e,t,{regex:r,options:s},{errorCode:n})=>r.test(e)^s.invert?e:t.error(n,{name:s.name,regex:r,value:e}),args:[\"regex\",\"options\"],multi:!0},replace:{method(e,t){\"string\"==typeof e&&(e=new RegExp(u(e),\"g\")),o(e instanceof RegExp,\"pattern must be a RegExp\"),o(\"string\"==typeof t,\"replacement must be a String\");const r=this.clone();return r.$_terms.replacements||(r.$_terms.replacements=[]),r.$_terms.replacements.push({pattern:e,replacement:t}),r}},token:{method(){return this.$_addRule(\"token\")},validate:(e,t)=>/^\\w+$/.test(e)?e:t.error(\"string.token\")},trim:{method(e=!0){return o(\"boolean\"==typeof e,\"enabled must be a boolean\"),this.$_addRule({name:\"trim\",args:{enabled:e}})},validate:(e,t,{enabled:r})=>r&&e!==e.trim()?t.error(\"string.trim\"):e,convert:!0},truncate:{method(e=!0){return o(\"boolean\"==typeof e,\"enabled must be a boolean\"),this.$_setFlag(\"truncate\",e)}},uppercase:{method(){return this.case(\"upper\")}},uri:{method(e={}){d.assertOptions(e,[\"allowRelative\",\"allowQuerySquareBrackets\",\"domain\",\"relativeOnly\",\"scheme\"]),e.domain&&d.assertOptions(e.domain,[\"allowFullyQualified\",\"allowUnicode\",\"maxDomainSegments\",\"minDomainSegments\",\"tlds\"]);const{regex:t,scheme:r}=m.regex(e),s=e.domain?p.addressOptions(e.domain):null;return this.$_addRule({name:\"uri\",args:{options:e},regex:t,domain:s,scheme:r})},validate(e,t,{options:r},{regex:s,domain:n,scheme:a}){if([\"http:/\",\"https:/\"].includes(e))return t.error(\"string.uri\");const o=s.exec(e);if(o){const s=o[1]||o[2];return!n||r.allowRelative&&!s||i.isValid(s,n)?e:t.error(\"string.domain\",{value:s})}return r.relativeOnly?t.error(\"string.uriRelativeOnly\"):r.scheme?t.error(\"string.uriCustomScheme\",{scheme:a,value:e}):t.error(\"string.uri\")}}},manifest:{build(e,t){if(t.replacements)for(const{pattern:r,replacement:s}of t.replacements)e=e.replace(r,s);return e}},messages:{\"string.alphanum\":\"{{#label}} must only contain alpha-numeric characters\",\"string.base\":\"{{#label}} must be a string\",\"string.base64\":\"{{#label}} must be a valid base64 string\",\"string.creditCard\":\"{{#label}} must be a credit card\",\"string.dataUri\":\"{{#label}} must be a valid dataUri string\",\"string.domain\":\"{{#label}} must contain a valid domain name\",\"string.email\":\"{{#label}} must be a valid email\",\"string.empty\":\"{{#label}} is not allowed to be empty\",\"string.guid\":\"{{#label}} must be a valid GUID\",\"string.hex\":\"{{#label}} must only contain hexadecimal characters\",\"string.hexAlign\":\"{{#label}} hex decoded representation must be byte aligned\",\"string.hostname\":\"{{#label}} must be a valid hostname\",\"string.ip\":\"{{#label}} must be a valid ip address with a {{#cidr}} CIDR\",\"string.ipVersion\":\"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR\",\"string.isoDate\":\"{{#label}} must be in iso format\",\"string.isoDuration\":\"{{#label}} must be a valid ISO 8601 duration\",\"string.length\":\"{{#label}} length must be {{#limit}} characters long\",\"string.lowercase\":\"{{#label}} must only contain lowercase characters\",\"string.max\":\"{{#label}} length must be less than or equal to {{#limit}} characters long\",\"string.min\":\"{{#label}} length must be at least {{#limit}} characters long\",\"string.normalize\":\"{{#label}} must be unicode normalized in the {{#form}} form\",\"string.token\":\"{{#label}} must only contain alpha-numeric and underscore characters\",\"string.pattern.base\":\"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}\",\"string.pattern.name\":\"{{#label}} with value {:[.]} fails to match the {{#name}} pattern\",\"string.pattern.invert.base\":\"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}\",\"string.pattern.invert.name\":\"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern\",\"string.trim\":\"{{#label}} must not have leading or trailing whitespace\",\"string.uri\":\"{{#label}} must be a valid uri\",\"string.uriCustomScheme\":\"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern\",\"string.uriRelativeOnly\":\"{{#label}} must be a valid relative uri\",\"string.uppercase\":\"{{#label}} must only contain uppercase characters\"}}),p.addressOptions=function(e){if(!e)return e;if(o(void 0===e.minDomainSegments||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,\"minDomainSegments must be a positive integer\"),o(void 0===e.maxDomainSegments||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,\"maxDomainSegments must be a positive integer\"),!1===e.tlds)return e;if(!0===e.tlds||void 0===e.tlds)return o(p.tlds,\"Built-in TLD list disabled\"),Object.assign({},e,p.tlds);o(\"object\"==typeof e.tlds,\"tlds must be true, false, or an object\");const t=e.tlds.deny;if(t)return Array.isArray(t)&&(e=Object.assign({},e,{tlds:{deny:new Set(t)}})),o(e.tlds.deny instanceof Set,\"tlds.deny must be an array, Set, or boolean\"),o(!e.tlds.allow,\"Cannot specify both tlds.allow and tlds.deny lists\"),p.validateTlds(e.tlds.deny,\"tlds.deny\"),e;const r=e.tlds.allow;return r?!0===r?(o(p.tlds,\"Built-in TLD list disabled\"),Object.assign({},e,p.tlds)):(Array.isArray(r)&&(e=Object.assign({},e,{tlds:{allow:new Set(r)}})),o(e.tlds.allow instanceof Set,\"tlds.allow must be an array, Set, or boolean\"),p.validateTlds(e.tlds.allow,\"tlds.allow\"),e):e},p.validateTlds=function(e,t){for(const r of e)o(i.isValid(r,{minDomainSegments:1,maxDomainSegments:1}),\"\".concat(t,\" must contain valid top level domain names\"))},p.isoDate=function(e){if(!d.isIsoDate(e))return null;/.*T.*[+-]\\d\\d$/.test(e)&&(e+=\"00\");const t=new Date(e);return isNaN(t.getTime())?null:t.toISOString()},p.length=function(e,t,r,s,n){return o(!n||!1,\"Invalid encoding:\",n),e.$_addRule({name:t,method:\"length\",args:{limit:r,encoding:n},operator:s})}},8826:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a={};a.Map=class extends Map{slice(){return new a.Map(this)}},e.exports=n.extend({type:\"symbol\",terms:{map:{init:new a.Map}},coerce:{method(e,{schema:t,error:r}){const s=t.$_terms.map.get(e);return s&&(e=s),t._flags.only&&\"symbol\"!=typeof e?{value:e,errors:r(\"symbol.map\",{map:t.$_terms.map})}:{value:e}}},validate(e,{error:t}){if(\"symbol\"!=typeof e)return{value:e,errors:t(\"symbol.base\")}},rules:{map:{method(e){e&&!e[Symbol.iterator]&&\"object\"==typeof e&&(e=Object.entries(e)),s(e&&e[Symbol.iterator],\"Iterable must be an iterable or object\");const t=this.clone(),r=[];for(const n of e){s(n&&n[Symbol.iterator],\"Entry must be an iterable\");const[e,a]=n;s(\"object\"!=typeof e&&\"function\"!=typeof e&&\"symbol\"!=typeof e,\"Key must not be of type object, function, or Symbol\"),s(\"symbol\"==typeof a,\"Value must be a Symbol\"),t.$_terms.map.set(e,a),r.push(a)}return t.valid(...r)}}},manifest:{build:(e,t)=>(t.map&&(e=e.map(t.map)),e)},messages:{\"symbol.base\":\"{{#label}} must be a symbol\",\"symbol.map\":\"{{#label}} must be one of {{#map}}\"}})},8863:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(738),o=r(9621),i=r(8160),l=r(6354),c=r(493),u={result:Symbol(\"result\")};t.entry=function(e,t,r){let n=i.defaults;r&&(s(void 0===r.warnings,\"Cannot override warnings preference in synchronous validation\"),s(void 0===r.artifacts,\"Cannot override artifacts preference in synchronous validation\"),n=i.preferences(i.defaults,r));const a=u.entry(e,t,n);s(!a.mainstay.externals.length,\"Schema with external rules must use validateAsync()\");const o={value:a.value};return a.error&&(o.error=a.error),a.mainstay.warnings.length&&(o.warning=l.details(a.mainstay.warnings)),a.mainstay.debug&&(o.debug=a.mainstay.debug),a.mainstay.artifacts&&(o.artifacts=a.mainstay.artifacts),o},t.entryAsync=async function(e,t,r){let s=i.defaults;r&&(s=i.preferences(i.defaults,r));const n=u.entry(e,t,s),a=n.mainstay;if(n.error)throw a.debug&&(n.error.debug=a.debug),n.error;if(a.externals.length){let e=n.value;for(const{method:t,path:n,label:i}of a.externals){let a,l,c=e;n.length&&(a=n[n.length-1],l=o(e,n.slice(0,-1)),c=l[a]);try{const s=await t(c,{prefs:r});if(void 0===s||s===c)continue;l?l[a]=s:e=s}catch(e){throw s.errors.label&&(e.message+=\" (\".concat(i,\")\")),e}}n.value=e}if(!s.warnings&&!s.debug&&!s.artifacts)return n.value;const c={value:n.value};return a.warnings.length&&(c.warning=l.details(a.warnings)),a.debug&&(c.debug=a.debug),a.artifacts&&(c.artifacts=a.artifacts),c},u.entry=function(e,r,s){const{tracer:n,cleanup:a}=u.tracer(r,s),o={externals:[],warnings:[],tracer:n,debug:s.debug?[]:null,links:r._ids._schemaChain?new Map:null},i=r._ids._schemaChain?[{schema:r}]:null,f=new c([],[],{mainstay:o,schemas:i}),m=t.validate(e,r,f,s);a&&r.$_root.untrace();const h=l.process(m.errors,e,s);return{value:m.value,error:h,mainstay:o}},u.tracer=function(e,t){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:t.debug?(s(e.$_root.trace,\"Debug mode not supported\"),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:u.ignore}},t.validate=function(e,t,r,s,n={}){if(t.$_terms.whens&&(t=t._generate(e,r,s).schema),t._preferences&&(s=u.prefs(t,s)),t._cache&&s.cache){const s=t._cache.get(e);if(r.mainstay.tracer.debug(r,\"validate\",\"cached\",!!s),s)return s}const a=(n,a,o)=>t.$_createError(n,e,a,o||r,s),o={original:e,prefs:s,schema:t,state:r,error:a,errorsArray:u.errorsArray,warn:(e,t,s)=>r.mainstay.warnings.push(a(e,t,s)),message:(n,a)=>t.$_createError(\"custom\",e,a,r,s,{messages:n})};r.mainstay.tracer.entry(t,r);const l=t._definition;if(l.prepare&&void 0!==e&&s.convert){const t=l.prepare(e,o);if(t){if(r.mainstay.tracer.value(r,\"prepare\",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),o);e=t.value}}if(l.coerce&&void 0!==e&&s.convert&&(!l.coerce.from||l.coerce.from.includes(typeof e))){const t=l.coerce.method(e,o);if(t){if(r.mainstay.tracer.value(r,\"coerced\",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),o);e=t.value}}const c=t._flags.empty;c&&c.$_match(u.trim(e,t),r.nest(c),i.defaults)&&(r.mainstay.tracer.value(r,\"empty\",e,void 0),e=void 0);const f=n.presence||t._flags.presence||(t._flags._endedSwitch?null:s.presence);if(void 0===e){if(\"forbidden\"===f)return u.finalize(e,null,o);if(\"required\"===f)return u.finalize(e,[t.$_createError(\"any.required\",e,null,r,s)],o);if(\"optional\"===f){if(t._flags.default!==i.symbols.deepDefault)return u.finalize(e,null,o);r.mainstay.tracer.value(r,\"default\",e,{}),e={}}}else if(\"forbidden\"===f)return u.finalize(e,[t.$_createError(\"any.unknown\",e,null,r,s)],o);const m=[];if(t._valids){const n=t._valids.get(e,r,s,t._flags.insensitive);if(n)return s.convert&&(r.mainstay.tracer.value(r,\"valids\",e,n.value),e=n.value),r.mainstay.tracer.filter(t,r,\"valid\",n),u.finalize(e,null,o);if(t._flags.only){const n=t.$_createError(\"any.only\",e,{valids:t._valids.values({display:!0})},r,s);if(s.abortEarly)return u.finalize(e,[n],o);m.push(n)}}if(t._invalids){const n=t._invalids.get(e,r,s,t._flags.insensitive);if(n){r.mainstay.tracer.filter(t,r,\"invalid\",n);const a=t.$_createError(\"any.invalid\",e,{invalids:t._invalids.values({display:!0})},r,s);if(s.abortEarly)return u.finalize(e,[a],o);m.push(a)}}if(l.validate){const t=l.validate(e,o);if(t&&(r.mainstay.tracer.value(r,\"base\",e,t.value),e=t.value,t.errors)){if(!Array.isArray(t.errors))return m.push(t.errors),u.finalize(e,m,o);if(t.errors.length)return m.push(...t.errors),u.finalize(e,m,o)}}return t._rules.length?u.rules(e,m,o):u.finalize(e,m,o)},u.rules=function(e,t,r){const{schema:s,state:n,prefs:a}=r;for(const o of s._rules){const l=s._definition.rules[o.method];if(l.convert&&a.convert){n.mainstay.tracer.log(s,n,\"rule\",o.name,\"full\");continue}let c,f=o.args;if(o._resolve.length){f=Object.assign({},f);for(const t of o._resolve){const r=l.argsByName.get(t),o=f[t].resolve(e,n,a),u=r.normalize?r.normalize(o):o,m=i.validateArg(u,null,r);if(m){c=s.$_createError(\"any.ref\",o,{arg:t,ref:f[t],reason:m},n,a);break}f[t]=u}}c=c||l.validate(e,r,f,o);const m=u.rule(c,o);if(m.errors){if(n.mainstay.tracer.log(s,n,\"rule\",o.name,\"error\"),o.warn){n.mainstay.warnings.push(...m.errors);continue}if(a.abortEarly)return u.finalize(e,m.errors,r);t.push(...m.errors)}else n.mainstay.tracer.log(s,n,\"rule\",o.name,\"pass\"),n.mainstay.tracer.value(n,\"rule\",e,m.value,o.name),e=m.value}return u.finalize(e,t,r)},u.rule=function(e,t){return e instanceof l.Report?(u.error(e,t),{errors:[e],value:null}):Array.isArray(e)&&e[i.symbols.errors]?(e.forEach((e=>u.error(e,t))),{errors:e,value:null}):{errors:null,value:e}},u.error=function(e,t){return t.message&&e._setTemplate(t.message),e},u.finalize=function(e,t,r){t=t||[];const{schema:n,state:a,prefs:o}=r;if(t.length){const s=u.default(\"failover\",void 0,t,r);void 0!==s&&(a.mainstay.tracer.value(a,\"failover\",e,s),e=s,t=[])}if(t.length&&n._flags.error)if(\"function\"==typeof n._flags.error){t=n._flags.error(t),Array.isArray(t)||(t=[t]);for(const e of t)s(e instanceof Error||e instanceof l.Report,\"error() must return an Error object\")}else t=[n._flags.error];if(void 0===e){const s=u.default(\"default\",e,t,r);a.mainstay.tracer.value(a,\"default\",e,s),e=s}if(n._flags.cast&&void 0!==e){const t=n._definition.cast[n._flags.cast];if(t.from(e)){const s=t.to(e,r);a.mainstay.tracer.value(a,\"cast\",e,s,n._flags.cast),e=s}}if(n.$_terms.externals&&o.externals&&!1!==o._externals)for(const{method:e}of n.$_terms.externals)a.mainstay.externals.push({method:e,path:a.path,label:l.label(n._flags,a,o)});const i={value:e,errors:t.length?t:null};return n._flags.result&&(i.value=\"strip\"===n._flags.result?void 0:r.original,a.mainstay.tracer.value(a,n._flags.result,e,i.value),a.shadow(e,n._flags.result)),n._cache&&!1!==o.cache&&!n._refs.length&&n._cache.set(r.original,i),void 0===e||i.errors||void 0===n._flags.artifact||(a.mainstay.artifacts=a.mainstay.artifacts||new Map,a.mainstay.artifacts.has(n._flags.artifact)||a.mainstay.artifacts.set(n._flags.artifact,[]),a.mainstay.artifacts.get(n._flags.artifact).push(a.path)),i},u.prefs=function(e,t){const r=t===i.defaults;return r&&e._preferences[i.symbols.prefs]?e._preferences[i.symbols.prefs]:(t=i.preferences(t,e._preferences),r&&(e._preferences[i.symbols.prefs]=t),t)},u.default=function(e,t,r,s){const{schema:a,state:o,prefs:l}=s,c=a._flags[e];if(l.noDefaults||void 0===c)return t;if(o.mainstay.tracer.log(a,o,\"rule\",e,\"full\"),!c)return c;if(\"function\"==typeof c){const t=c.length?[n(o.ancestors[0]),s]:[];try{return c(...t)}catch(t){return void r.push(a.$_createError(\"any.\".concat(e),null,{error:t},o,l))}}return\"object\"!=typeof c?c:c[i.symbols.literal]?c.literal:i.isResolvable(c)?c.resolve(t,o,l):n(c)},u.trim=function(e,t){if(\"string\"!=typeof e)return e;const r=t.$_getRule(\"trim\");return r&&r.args.enabled?e.trim():e},u.ignore={active:!1,debug:a,entry:a,filter:a,log:a,resolve:a,value:a},u.errorsArray=function(){const e=[];return e[i.symbols.errors]=!0,e}},2036:(e,t,r)=>{\"use strict\";const s=r(375),n=r(9474),a=r(8160),o={};e.exports=o.Values=class{constructor(e,t){this._values=new Set(e),this._refs=new Set(t),this._lowercase=o.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,t){a.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),t&&t.register(e)):this.has(e,null,null,!1)||(this._values.add(e),\"string\"==typeof e&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,t,r){if(e=e||new o.Values,t){if(t._override)return t.clone();for(const r of[...t._values,...t._refs])e.add(r)}if(r)for(const t of[...r._values,...r._refs])e.remove(t);return e.length?e:null}remove(e){a.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),\"string\"==typeof e&&this._lowercase.delete(e.toLowerCase()))}has(e,t,r,s){return!!this.get(e,t,r,s)}get(e,t,r,s){if(!this.length)return!1;if(this._values.has(e))return{value:e};if(\"string\"==typeof e&&e&&s){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&\"object\"!=typeof e)return!1;if(\"object\"==typeof e)for(const t of this._values)if(n(t,e))return{value:t};if(t)for(const a of this._refs){const o=a.resolve(e,t,r,null,{in:!0});if(void 0===o)continue;const i=a.in&&\"object\"==typeof o?Array.isArray(o)?o:Object.keys(o):[o];for(const t of i)if(typeof t==typeof e)if(s&&e&&\"string\"==typeof e){if(t.toLowerCase()===e.toLowerCase())return{value:t,ref:a}}else if(n(t,e))return{value:t,ref:a}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const e=[];for(const t of[...this._values,...this._refs])void 0!==t&&e.push(t);return e}return Array.from([...this._values,...this._refs])}clone(){const e=new o.Values(this._values,this._refs);return e._override=this._override,e}concat(e){s(!e._override,\"Cannot concat override set of values\");const t=new o.Values([...this._values,...e._values],[...this._refs,...e._refs]);return t._override=this._override,t}describe(){const e=[];this._override&&e.push({override:!0});for(const t of this._values.values())e.push(t&&\"object\"==typeof t?{value:t}:t);for(const t of this._refs.values())e.push(t.describe());return e}},o.Values.prototype[a.symbols.values]=!0,o.Values.prototype.slice=o.Values.prototype.clone,o.lowercases=function(e){const t=new Map;if(e)for(const r of e)\"string\"==typeof r&&t.set(r.toLowerCase(),r);return t}},978:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(1687),o=r(9621),i={};e.exports=function(e,t,r={}){if(s(e&&\"object\"==typeof e,\"Invalid defaults value: must be an object\"),s(!t||!0===t||\"object\"==typeof t,\"Invalid source value: must be true, falsy or an object\"),s(\"object\"==typeof r,\"Invalid options: must be an object\"),!t)return null;if(r.shallow)return i.applyToDefaultsWithShallow(e,t,r);const o=n(e);if(!0===t)return o;const l=void 0!==r.nullOverride&&r.nullOverride;return a(o,t,{nullOverride:l,mergeArrays:!1})},i.applyToDefaultsWithShallow=function(e,t,r){const l=r.shallow;s(Array.isArray(l),\"Invalid keys\");const c=new Map,u=!0===t?null:new Set;for(let r of l){r=Array.isArray(r)?r:r.split(\".\");const s=o(e,r);s&&\"object\"==typeof s?c.set(s,u&&o(t,r)||s):u&&u.add(r)}const f=n(e,{},c);if(!u)return f;for(const e of u)i.reachCopy(f,t,e);const m=void 0!==r.nullOverride&&r.nullOverride;return a(f,t,{nullOverride:m,mergeArrays:!1})},i.reachCopy=function(e,t,r){for(const e of r){if(!(e in t))return;const r=t[e];if(\"object\"!=typeof r||null===r)return;t=r}const s=t;let n=e;for(let e=0;e<r.length-1;++e){const t=r[e];\"object\"!=typeof n[t]&&(n[t]={}),n=n[t]}n[r[r.length-1]]=s}},375:(e,t,r)=>{\"use strict\";const s=r(7916);e.exports=function(e,...t){if(!e){if(1===t.length&&t[0]instanceof Error)throw t[0];throw new s(t)}}},8571:(e,t,r)=>{\"use strict\";const s=r(9621),n=r(4277),a=r(7043),o={needsProtoHack:new Set([n.set,n.map,n.weakSet,n.weakMap])};e.exports=o.clone=function(e,t={},r=null){if(\"object\"!=typeof e||null===e)return e;let s=o.clone,i=r;if(t.shallow){if(!0!==t.shallow)return o.cloneWithShallow(e,t);s=e=>e}else if(i){const t=i.get(e);if(t)return t}else i=new Map;const l=n.getInternalProto(e);if(l===n.buffer)return!1;if(l===n.date)return new Date(e.getTime());if(l===n.regex)return new RegExp(e);const c=o.base(e,l,t);if(c===e)return e;if(i&&i.set(e,c),l===n.set)for(const r of e)c.add(s(r,t,i));else if(l===n.map)for(const[r,n]of e)c.set(r,s(n,t,i));const u=a.keys(e,t);for(const r of u){if(\"__proto__\"===r)continue;if(l===n.array&&\"length\"===r){c.length=e.length;continue}const a=Object.getOwnPropertyDescriptor(e,r);a?a.get||a.set?Object.defineProperty(c,r,a):a.enumerable?c[r]=s(e[r],t,i):Object.defineProperty(c,r,{enumerable:!1,writable:!0,configurable:!0,value:s(e[r],t,i)}):Object.defineProperty(c,r,{enumerable:!0,writable:!0,configurable:!0,value:s(e[r],t,i)})}return c},o.cloneWithShallow=function(e,t){const r=t.shallow;(t=Object.assign({},t)).shallow=!1;const n=new Map;for(const t of r){const r=s(e,t);\"object\"!=typeof r&&\"function\"!=typeof r||n.set(r,r)}return o.clone(e,t,n)},o.base=function(e,t,r){if(!1===r.prototype)return o.needsProtoHack.has(t)?new t.constructor:t===n.array?[]:{};const s=Object.getPrototypeOf(e);if(s&&s.isImmutable)return e;if(t===n.array){const e=[];return s!==t&&Object.setPrototypeOf(e,s),e}if(o.needsProtoHack.has(t)){const e=new s.constructor;return s!==t&&Object.setPrototypeOf(e,s),e}return Object.create(s)}},9474:(e,t,r)=>{\"use strict\";const s=r(4277),n={mismatched:null};e.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!n.isDeepEqual(e,t,r,[])},n.isDeepEqual=function(e,t,r,a){if(e===t)return 0!==e||1/e==1/t;const o=typeof e;if(o!==typeof t)return!1;if(null===e||null===t)return!1;if(\"function\"===o){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(\"object\"!==o)return e!=e&&t!=t;const i=n.getSharedType(e,t,!!r.prototype);switch(i){case s.buffer:return!1;case s.promise:return e===t;case s.regex:return e.toString()===t.toString();case n.mismatched:return!1}for(let r=a.length-1;r>=0;--r)if(a[r].isSame(e,t))return!0;a.push(new n.SeenEntry(e,t));try{return!!n.isDeepEqualObj(i,e,t,r,a)}finally{a.pop()}},n.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?n.mismatched:s.getInternalProto(e);const a=s.getInternalProto(e);return a!==s.getInternalProto(t)?n.mismatched:a},n.valueOf=function(e){const t=e.valueOf;if(void 0===t)return e;try{return t.call(e)}catch(e){return e}},n.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)},n.isSetSimpleEqual=function(e,t){for(const r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0},n.isDeepEqualObj=function(e,t,r,a,o){const{isDeepEqual:i,valueOf:l,hasOwnEnumerableProperty:c}=n,{keys:u,getOwnPropertySymbols:f}=Object;if(e===s.array){if(!a.part){if(t.length!==r.length)return!1;for(let e=0;e<t.length;++e)if(!i(t[e],r[e],a,o))return!1;return!0}for(const e of t)for(const t of r)if(i(e,t,a,o))return!0}else if(e===s.set){if(t.size!==r.size)return!1;if(!n.isSetSimpleEqual(t,r)){const e=new Set(Set.prototype.values.call(r));for(const r of Set.prototype.values.call(t)){if(e.delete(r))continue;let t=!1;for(const s of e)if(i(r,s,a,o)){e.delete(s),t=!0;break}if(!t)return!1}}}else if(e===s.map){if(t.size!==r.size)return!1;for(const[e,s]of Map.prototype.entries.call(t)){if(void 0===s&&!Map.prototype.has.call(r,e))return!1;if(!i(s,Map.prototype.get.call(r,e),a,o))return!1}}else if(e===s.error&&(t.name!==r.name||t.message!==r.message))return!1;const m=l(t),h=l(r);if((t!==m||r!==h)&&!i(m,h,a,o))return!1;const d=u(t);if(!a.part&&d.length!==u(r).length&&!a.skip)return!1;let p=0;for(const e of d)if(a.skip&&a.skip.includes(e))void 0===r[e]&&++p;else{if(!c(r,e))return!1;if(!i(t[e],r[e],a,o))return!1}if(!a.part&&d.length-p!==u(r).length)return!1;if(!1!==a.symbols){const e=f(t),s=new Set(f(r));for(const n of e){if(!a.skip||!a.skip.includes(n))if(c(t,n)){if(!c(r,n))return!1;if(!i(t[n],r[n],a,o))return!1}else if(c(r,n))return!1;s.delete(n)}for(const e of s)if(c(r,e))return!1}return!0},n.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}},7916:(e,t,r)=>{\"use strict\";const s=r(8761);e.exports=class extends Error{constructor(e){super(e.filter((e=>\"\"!==e)).map((e=>\"string\"==typeof e?e:e instanceof Error?e.message:s(e))).join(\" \")||\"Unknown error\"),\"function\"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t.assert)}}},5277:e=>{\"use strict\";const t={};e.exports=function(e){if(!e)return\"\";let r=\"\";for(let s=0;s<e.length;++s){const n=e.charCodeAt(s);t.isSafe(n)?r+=e[s]:r+=t.escapeHtmlChar(n)}return r},t.escapeHtmlChar=function(e){const r=t.namedHtml[e];if(void 0!==r)return r;if(e>=256)return\"&#\"+e+\";\";const s=e.toString(16).padStart(2,\"0\");return\"&#x\".concat(s,\";\")},t.isSafe=function(e){return void 0!==t.safeCharCodes[e]},t.namedHtml={38:\"&amp;\",60:\"&lt;\",62:\"&gt;\",34:\"&quot;\",160:\"&nbsp;\",162:\"&cent;\",163:\"&pound;\",164:\"&curren;\",169:\"&copy;\",174:\"&reg;\"},t.safeCharCodes=function(){const e={};for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&(e[t]=null);return e}()},6064:e=>{\"use strict\";e.exports=function(e){return e.replace(/[\\^\\$\\.\\*\\+\\-\\?\\=\\!\\:\\|\\\\\\/\\(\\)\\[\\]\\{\\}\\,]/g,\"\\\\$&\")}},738:e=>{\"use strict\";e.exports=function(){}},1687:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(7043),o={};e.exports=o.merge=function(e,t,r){if(s(e&&\"object\"==typeof e,\"Invalid target value: must be an object\"),s(null==t||\"object\"==typeof t,\"Invalid source value: must be null, undefined, or an object\"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){s(Array.isArray(e),\"Cannot merge array onto an object\"),r.mergeArrays||(e.length=0);for(let s=0;s<t.length;++s)e.push(n(t[s],{symbols:r.symbols}));return e}const i=a.keys(t,r);for(let s=0;s<i.length;++s){const a=i[s];if(\"__proto__\"===a||!Object.prototype.propertyIsEnumerable.call(t,a))continue;const l=t[a];if(l&&\"object\"==typeof l){if(e[a]===l)continue;!e[a]||\"object\"!=typeof e[a]||Array.isArray(e[a])!==Array.isArray(l)||l instanceof Date||l instanceof RegExp?e[a]=n(l,{symbols:r.symbols}):o.merge(e[a],l,r)}else(null!=l||r.nullOverride)&&(e[a]=l)}return e}},9621:(e,t,r)=>{\"use strict\";const s=r(375),n={};e.exports=function(e,t,r){if(!1===t||null==t)return e;\"string\"==typeof(r=r||{})&&(r={separator:r});const a=Array.isArray(t);s(!a||!r.separator,\"Separator option no valid for array-based chain\");const o=a?t:t.split(r.separator||\".\");let i=e;for(let e=0;e<o.length;++e){let a=o[e];const l=r.iterables&&n.iterables(i);if(Array.isArray(i)||\"set\"===l){const e=Number(a);Number.isInteger(e)&&(a=e<0?i.length+e:e)}if(!i||\"function\"==typeof i&&!1===r.functions||!l&&void 0===i[a]){s(!r.strict||e+1===o.length,\"Missing segment\",a,\"in reach path \",t),s(\"object\"==typeof i||!0===r.functions||\"function\"!=typeof i,\"Invalid segment\",a,\"in reach path \",t),i=r.default;break}i=l?\"set\"===l?[...i][a]:i.get(a):i[a]}return i},n.iterables=function(e){return e instanceof Set?\"set\":e instanceof Map?\"map\":void 0}},8761:e=>{\"use strict\";e.exports=function(...e){try{return JSON.stringify.apply(null,e)}catch(e){return\"[Cannot display object: \"+e.message+\"]\"}}},4277:(e,t)=>{\"use strict\";const r={};t=e.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},r.typeMap=new Map([[\"[object Error]\",t.error],[\"[object Map]\",t.map],[\"[object Promise]\",t.promise],[\"[object Set]\",t.set],[\"[object WeakMap]\",t.weakMap],[\"[object WeakSet]\",t.weakSet]]),t.getInternalProto=function(e){if(Array.isArray(e))return t.array;if(e instanceof Date)return t.date;if(e instanceof RegExp)return t.regex;if(e instanceof Error)return t.error;const s=Object.prototype.toString.call(e);return r.typeMap.get(s)||t.generic}},7043:(e,t)=>{\"use strict\";t.keys=function(e,t={}){return!1!==t.symbols?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}},3652:(e,t,r)=>{\"use strict\";const s=r(375),n={};t.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(e,t){const r=[].concat((t=t||{}).before||[]),n=[].concat(t.after||[]),a=t.group||\"?\",o=t.sort||0;s(!r.includes(a),\"Item cannot come before itself: \".concat(a)),s(!r.includes(\"?\"),\"Item cannot come before unassociated items\"),s(!n.includes(a),\"Item cannot come after itself: \".concat(a)),s(!n.includes(\"?\"),\"Item cannot come after unassociated items\"),Array.isArray(e)||(e=[e]);for(const t of e){const e={seq:this._items.length,sort:o,before:r,after:n,group:a,node:t};this._items.push(e)}if(!t.manual){const e=this._sort();s(e,\"item\",\"?\"!==a?\"added into group \".concat(a):\"\",\"created a dependencies error\")}return this.nodes}merge(e){Array.isArray(e)||(e=[e]);for(const t of e)if(t)for(const e of t._items)this._items.push(Object.assign({},e));this._items.sort(n.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const t=this._sort();return s(t,\"merge created a dependencies error\"),this.nodes}sort(){const e=this._sort();return s(e,\"sort created a dependencies error\"),this.nodes}_sort(){const e={},t=Object.create(null),r=Object.create(null);for(const s of this._items){const n=s.seq,a=s.group;r[a]=r[a]||[],r[a].push(n),e[n]=s.before;for(const e of s.after)t[e]=t[e]||[],t[e].push(n)}for(const t in e){const s=[];for(const n in e[t]){const a=e[t][n];r[a]=r[a]||[],s.push(...r[a])}e[t]=s}for(const s in t)if(r[s])for(const n of r[s])e[n].push(...t[s]);const s={};for(const t in e){const r=e[t];for(const e of r)s[e]=s[e]||[],s[e].push(t)}const n={},a=[];for(let e=0;e<this._items.length;++e){let t=e;if(s[e]){t=null;for(let e=0;e<this._items.length;++e){if(!0===n[e])continue;s[e]||(s[e]=[]);const r=s[e].length;let a=0;for(let t=0;t<r;++t)n[s[e][t]]&&++a;if(a===r){t=e;break}}}null!==t&&(n[t]=!0,a.push(t))}if(a.length!==this._items.length)return!1;const o={};for(const e of this._items)o[e.seq]=e;this._items=[],this.nodes=[];for(const e of a){const t=o[e];this.nodes.push(t.node),this._items.push(t)}return!0}},n.mergeSort=(e,t)=>e.sort===t.sort?0:e.sort<t.sort?-1:1},5380:(e,t,r)=>{\"use strict\";const s=r(443),n=r(2178),a={minDomainSegments:2,nonAsciiRx:/[^\\x00-\\x7f]/,domainControlRx:/[\\x00-\\x20@\\:\\/\\\\#!\\$&\\'\\(\\)\\*\\+,;=\\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\\-]*[a-zA-Z0-9])?$/,URL:s.URL||URL};t.analyze=function(e,t={}){if(!e)return n.code(\"DOMAIN_NON_EMPTY_STRING\");if(\"string\"!=typeof e)throw new Error(\"Invalid input: domain must be a string\");if(e.length>256)return n.code(\"DOMAIN_TOO_LONG\");if(a.nonAsciiRx.test(e)){if(!1===t.allowUnicode)return n.code(\"DOMAIN_INVALID_UNICODE_CHARS\");e=e.normalize(\"NFC\")}if(a.domainControlRx.test(e))return n.code(\"DOMAIN_INVALID_CHARS\");e=a.punycode(e),t.allowFullyQualified&&\".\"===e[e.length-1]&&(e=e.slice(0,-1));const r=t.minDomainSegments||a.minDomainSegments,s=e.split(\".\");if(s.length<r)return n.code(\"DOMAIN_SEGMENTS_COUNT\");if(t.maxDomainSegments&&s.length>t.maxDomainSegments)return n.code(\"DOMAIN_SEGMENTS_COUNT_MAX\");const o=t.tlds;if(o){const e=s[s.length-1].toLowerCase();if(o.deny&&o.deny.has(e)||o.allow&&!o.allow.has(e))return n.code(\"DOMAIN_FORBIDDEN_TLDS\")}for(let e=0;e<s.length;++e){const t=s[e];if(!t.length)return n.code(\"DOMAIN_EMPTY_SEGMENT\");if(t.length>63)return n.code(\"DOMAIN_LONG_SEGMENT\");if(e<s.length-1){if(!a.domainSegmentRx.test(t))return n.code(\"DOMAIN_INVALID_CHARS\")}else if(!a.tldSegmentRx.test(t))return n.code(\"DOMAIN_INVALID_TLDS_CHARS\")}return null},t.isValid=function(e,r){return!t.analyze(e,r)},a.punycode=function(e){e.includes(\"%\")&&(e=e.replace(/%/g,\"%25\"));try{return new a.URL(\"http://\".concat(e)).host}catch(t){return e}}},1745:(e,t,r)=>{\"use strict\";const s=r(9848),n=r(5380),a=r(2178),o={nonAsciiRx:/[^\\x00-\\x7f]/,encoder:new(s.TextEncoder||TextEncoder)};t.analyze=function(e,t){return o.email(e,t)},t.isValid=function(e,t){return!o.email(e,t)},o.email=function(e,t={}){if(\"string\"!=typeof e)throw new Error(\"Invalid input: email must be a string\");if(!e)return a.code(\"EMPTY_STRING\");const r=!o.nonAsciiRx.test(e);if(!r){if(!1===t.allowUnicode)return a.code(\"FORBIDDEN_UNICODE\");e=e.normalize(\"NFC\")}const s=e.split(\"@\");if(2!==s.length)return s.length>2?a.code(\"MULTIPLE_AT_CHAR\"):a.code(\"MISSING_AT_CHAR\");const[i,l]=s;if(!i)return a.code(\"EMPTY_LOCAL\");if(!t.ignoreLength){if(e.length>254)return a.code(\"ADDRESS_TOO_LONG\");if(o.encoder.encode(i).length>64)return a.code(\"LOCAL_TOO_LONG\")}return o.local(i,r)||n.analyze(l,t)},o.local=function(e,t){const r=e.split(\".\");for(const e of r){if(!e.length)return a.code(\"EMPTY_LOCAL_SEGMENT\");if(t){if(!o.atextRx.test(e))return a.code(\"INVALID_LOCAL_CHARS\")}else for(const t of e){if(o.atextRx.test(t))continue;const e=o.binary(t);if(!o.atomRx.test(e))return a.code(\"INVALID_LOCAL_CHARS\")}}},o.binary=function(e){return Array.from(o.encoder.encode(e)).map((e=>String.fromCharCode(e))).join(\"\")},o.atextRx=/^[\\w!#\\$%&'\\*\\+\\-/=\\?\\^`\\{\\|\\}~]+$/,o.atomRx=new RegExp([\"(?:[\\\\xc2-\\\\xdf][\\\\x80-\\\\xbf])\",\"(?:\\\\xe0[\\\\xa0-\\\\xbf][\\\\x80-\\\\xbf])|(?:[\\\\xe1-\\\\xec][\\\\x80-\\\\xbf]{2})|(?:\\\\xed[\\\\x80-\\\\x9f][\\\\x80-\\\\xbf])|(?:[\\\\xee-\\\\xef][\\\\x80-\\\\xbf]{2})\",\"(?:\\\\xf0[\\\\x90-\\\\xbf][\\\\x80-\\\\xbf]{2})|(?:[\\\\xf1-\\\\xf3][\\\\x80-\\\\xbf]{3})|(?:\\\\xf4[\\\\x80-\\\\x8f][\\\\x80-\\\\xbf]{2})\"].join(\"|\"))},2178:(e,t)=>{\"use strict\";t.codes={EMPTY_STRING:\"Address must be a non-empty string\",FORBIDDEN_UNICODE:\"Address contains forbidden Unicode characters\",MULTIPLE_AT_CHAR:\"Address cannot contain more than one @ character\",MISSING_AT_CHAR:\"Address must contain one @ character\",EMPTY_LOCAL:\"Address local part cannot be empty\",ADDRESS_TOO_LONG:\"Address too long\",LOCAL_TOO_LONG:\"Address local part too long\",EMPTY_LOCAL_SEGMENT:\"Address local part contains empty dot-separated segment\",INVALID_LOCAL_CHARS:\"Address local part contains invalid character\",DOMAIN_NON_EMPTY_STRING:\"Domain must be a non-empty string\",DOMAIN_TOO_LONG:\"Domain too long\",DOMAIN_INVALID_UNICODE_CHARS:\"Domain contains forbidden Unicode characters\",DOMAIN_INVALID_CHARS:\"Domain contains invalid character\",DOMAIN_INVALID_TLDS_CHARS:\"Domain contains invalid tld character\",DOMAIN_SEGMENTS_COUNT:\"Domain lacks the minimum required number of segments\",DOMAIN_SEGMENTS_COUNT_MAX:\"Domain contains too many segments\",DOMAIN_FORBIDDEN_TLDS:\"Domain uses forbidden TLD\",DOMAIN_EMPTY_SEGMENT:\"Domain contains empty dot-separated segment\",DOMAIN_LONG_SEGMENT:\"Domain contains dot-separated segment that is too long\"},t.code=function(e){return{code:e,error:t.codes[e]}}},9959:(e,t,r)=>{\"use strict\";const s=r(375),n=r(5752);t.regex=function(e={}){s(void 0===e.cidr||\"string\"==typeof e.cidr,\"options.cidr must be a string\");const t=e.cidr?e.cidr.toLowerCase():\"optional\";s([\"required\",\"optional\",\"forbidden\"].includes(t),\"options.cidr must be one of required, optional, forbidden\"),s(void 0===e.version||\"string\"==typeof e.version||Array.isArray(e.version),\"options.version must be a string or an array of string\");let r=e.version||[\"ipv4\",\"ipv6\",\"ipvfuture\"];Array.isArray(r)||(r=[r]),s(r.length>=1,\"options.version must have at least 1 version specified\");for(let e=0;e<r.length;++e)s(\"string\"==typeof r[e],\"options.version must only contain strings\"),r[e]=r[e].toLowerCase(),s([\"ipv4\",\"ipv6\",\"ipvfuture\"].includes(r[e]),\"options.version contains unknown version \"+r[e]+\" - must be one of ipv4, ipv6, ipvfuture\");r=Array.from(new Set(r));const a=r.map((e=>{if(\"forbidden\"===t)return n.ip[e];const r=\"\\\\/\".concat(\"ipv4\"===e?n.ip.v4Cidr:n.ip.v6Cidr);return\"required\"===t?\"\".concat(n.ip[e]).concat(r):\"\".concat(n.ip[e],\"(?:\").concat(r,\")?\")})),o=\"(?:\".concat(a.join(\"|\"),\")\"),i=new RegExp(\"^\".concat(o,\"$\"));return{cidr:t,versions:r,regex:i,raw:o}}},5752:(e,t,r)=>{\"use strict\";const s=r(375),n=r(6064),a={generate:function(){const e={},t=\"!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=\",r=\"\\\\w-\\\\.~%\\\\dA-Fa-f\"+t+\":@\",s=\"[\"+r+\"]\",n=\"(?:0{0,2}\\\\d|0?[1-9]\\\\d|1\\\\d\\\\d|2[0-4]\\\\d|25[0-5])\";e.ipv4address=\"(?:\"+n+\"\\\\.){3}\"+n;const a=\"[\\\\dA-Fa-f]{1,4}\",o=\"(?:\"+a+\":\"+a+\"|\"+e.ipv4address+\")\",i=\"(?:\"+a+\":){6}\"+o,l=\"::(?:\"+a+\":){5}\"+o,c=\"(?:\"+a+\")?::(?:\"+a+\":){4}\"+o,u=\"(?:(?:\"+a+\":){0,1}\"+a+\")?::(?:\"+a+\":){3}\"+o,f=\"(?:(?:\"+a+\":){0,2}\"+a+\")?::(?:\"+a+\":){2}\"+o,m=\"(?:(?:\"+a+\":){0,3}\"+a+\")?::\"+a+\":\"+o,h=\"(?:(?:\"+a+\":){0,4}\"+a+\")?::\"+o;e.ipv4Cidr=\"(?:\\\\d|[1-2]\\\\d|3[0-2])\",e.ipv6Cidr=\"(?:0{0,2}\\\\d|0?[1-9]\\\\d|1[01]\\\\d|12[0-8])\",e.ipv6address=\"(?:\"+i+\"|\"+l+\"|\"+c+\"|\"+u+\"|\"+f+\"|\"+m+\"|\"+h+\"|(?:(?:[\\\\dA-Fa-f]{1,4}:){0,5}[\\\\dA-Fa-f]{1,4})?::[\\\\dA-Fa-f]{1,4}|(?:(?:[\\\\dA-Fa-f]{1,4}:){0,6}[\\\\dA-Fa-f]{1,4})?::)\",e.ipvFuture=\"v[\\\\dA-Fa-f]+\\\\.[\\\\w-\\\\.~\"+t+\":]+\",e.scheme=\"[a-zA-Z][a-zA-Z\\\\d+-\\\\.]*\",e.schemeRegex=new RegExp(e.scheme);const d=\"[\\\\w-\\\\.~%\\\\dA-Fa-f\"+t+\":]*\",p=\"(?:\\\\[(?:\"+e.ipv6address+\"|\"+e.ipvFuture+\")\\\\]|\"+e.ipv4address+\"|[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=]{1,255})\",g=\"(?:\"+d+\"@)?\"+p+\"(?::\\\\d*)?\",y=\"(?:\"+d+\"@)?(\"+p+\")(?::\\\\d*)?\",b=s+\"+\",v=\"(?:\\\\/[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@]*)*\",_=\"\\\\/(?:\"+b+v+\")?\",w=b+v,$=\"[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=@]+\"+v;return e.hierPart=\"(?:(?:\\\\/\\\\/\"+g+v+\")|\"+_+\"|\"+w+\"|(?:\\\\/\\\\/\\\\/[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@]*(?:\\\\/[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@]*)*))\",e.hierPartCapture=\"(?:(?:\\\\/\\\\/\"+y+v+\")|\"+_+\"|\"+w+\")\",e.relativeRef=\"(?:(?:\\\\/\\\\/\"+g+v+\")|\"+_+\"|\"+$+\"|)\",e.relativeRefCapture=\"(?:(?:\\\\/\\\\/\"+y+v+\")|\"+_+\"|\"+$+\"|)\",e.query=\"[\"+r+\"\\\\/\\\\?]*(?=#|$)\",e.queryWithSquareBrackets=\"[\"+r+\"\\\\[\\\\]\\\\/\\\\?]*(?=#|$)\",e.fragment=\"[\"+r+\"\\\\/\\\\?]*\",e}};a.rfc3986=a.generate(),t.ip={v4Cidr:a.rfc3986.ipv4Cidr,v6Cidr:a.rfc3986.ipv6Cidr,ipv4:a.rfc3986.ipv4address,ipv6:a.rfc3986.ipv6address,ipvfuture:a.rfc3986.ipvFuture},a.createRegex=function(e){const t=a.rfc3986,r=\"(?:\\\\?\"+(e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+\")?(?:#\"+t.fragment+\")?\",o=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly)return a.wrap(o+r);let i=\"\";if(e.scheme){s(e.scheme instanceof RegExp||\"string\"==typeof e.scheme||Array.isArray(e.scheme),\"scheme must be a RegExp, String, or Array\");const r=[].concat(e.scheme);s(r.length>=1,\"scheme must have at least 1 scheme specified\");const a=[];for(let e=0;e<r.length;++e){const o=r[e];s(o instanceof RegExp||\"string\"==typeof o,\"scheme at position \"+e+\" must be a RegExp or String\"),o instanceof RegExp?a.push(o.source.toString()):(s(t.schemeRegex.test(o),\"scheme at position \"+e+\" must be a valid scheme\"),a.push(n(o)))}i=a.join(\"|\")}const l=\"(?:\"+(i?\"(?:\"+i+\")\":t.scheme)+\":\"+(e.domain?t.hierPartCapture:t.hierPart)+\")\",c=e.allowRelative?\"(?:\"+l+\"|\"+o+\")\":l;return a.wrap(c+r,i)},a.wrap=function(e,t){return{raw:e=\"(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])\".concat(e),regex:new RegExp(\"^\".concat(e,\"$\")),scheme:t}},a.uriRegex=a.createRegex({}),t.regex=function(e={}){return e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain?a.createRegex(e):a.uriRegex}},1447:(e,t)=>{\"use strict\";const r={operators:[\"!\",\"^\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\"<=\",\">\",\">=\",\"==\",\"!=\",\"&&\",\"||\",\"??\"],operatorCharacters:[\"!\",\"^\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\"=\",\">\",\"&\",\"|\",\"?\"],operatorsOrder:[[\"^\"],[\"*\",\"/\",\"%\"],[\"+\",\"-\"],[\"<\",\"<=\",\">\",\">=\"],[\"==\",\"!=\"],[\"&&\"],[\"||\",\"??\"]],operatorsPrefix:[\"!\",\"n\"],literals:{'\"':'\"',\"`\":\"`\",\"'\":\"'\",\"[\":\"]\"},numberRx:/^(?:[0-9]*\\.?[0-9]*){1}$/,tokenRx:/^[\\w\\$\\#\\.\\@\\:\\{\\}]+$/,symbol:Symbol(\"formula\"),settings:Symbol(\"settings\")};t.Parser=class{constructor(e,t={}){if(!t[r.settings]&&t.constants)for(const e in t.constants){const r=t.constants[e];if(null!==r&&![\"boolean\",\"number\",\"string\"].includes(typeof r))throw new Error(\"Formula constant \".concat(e,\" contains invalid \").concat(typeof r,\" value type\"))}this.settings=t[r.settings]?t:Object.assign({[r.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let s=[],n=\"\",a=0,o=!1;const i=e=>{if(a)throw new Error(\"Formula missing closing parenthesis\");const i=s.length?s[s.length-1]:null;if(o||n||e){if(i&&\"reference\"===i.type&&\")\"===e)return i.type=\"function\",i.value=this._subFormula(n,i.value),void(n=\"\");if(\")\"===e){const e=new t.Parser(n,this.settings);s.push({type:\"segment\",value:e})}else if(o){if(\"]\"===o)return s.push({type:\"reference\",value:n}),void(n=\"\");s.push({type:\"literal\",value:n})}else if(r.operatorCharacters.includes(n))i&&\"operator\"===i.type&&r.operators.includes(i.value+n)?i.value+=n:s.push({type:\"operator\",value:n});else if(n.match(r.numberRx))s.push({type:\"constant\",value:parseFloat(n)});else if(void 0!==this.settings.constants[n])s.push({type:\"constant\",value:this.settings.constants[n]});else{if(!n.match(r.tokenRx))throw new Error(\"Formula contains invalid token: \".concat(n));s.push({type:\"reference\",value:n})}n=\"\"}};for(const t of e)o?t===o?(i(),o=!1):n+=t:a?\"(\"===t?(n+=t,++a):\")\"===t?(--a,a?n+=t:i(t)):n+=t:t in r.literals?o=r.literals[t]:\"(\"===t?(i(),++a):r.operatorCharacters.includes(t)?(i(),n=t,i()):\" \"!==t?n+=t:i();i(),s=s.map(((e,t)=>\"operator\"!==e.type||\"-\"!==e.value||t&&\"operator\"!==s[t-1].type?e:{type:\"operator\",value:\"n\"}));let l=!1;for(const e of s){if(\"operator\"===e.type){if(r.operatorsPrefix.includes(e.value))continue;if(!l)throw new Error(\"Formula contains an operator in invalid position\");if(!r.operators.includes(e.value))throw new Error(\"Formula contains an unknown operator \".concat(e.value))}else if(l)throw new Error(\"Formula missing expected operator\");l=!l}if(!l)throw new Error(\"Formula contains invalid trailing operator\");1===s.length&&[\"reference\",\"literal\",\"constant\"].includes(s[0].type)&&(this.single={type:\"reference\"===s[0].type?\"reference\":\"value\",value:s[0].value}),this._parts=s.map((e=>{if(\"operator\"===e.type)return r.operatorsPrefix.includes(e.value)?e:e.value;if(\"reference\"!==e.type)return e.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value))throw new Error(\"Formula contains invalid reference \".concat(e.value));return this.settings.reference?this.settings.reference(e.value):r.reference(e.value)}))}_subFormula(e,s){const n=this.settings.functions[s];if(\"function\"!=typeof n)throw new Error(\"Formula contains unknown function \".concat(s));let a=[];if(e){let t=\"\",n=0,o=!1;const i=()=>{if(!t)throw new Error(\"Formula contains function \".concat(s,\" with invalid arguments \").concat(e));a.push(t),t=\"\"};for(let s=0;s<e.length;++s){const a=e[s];o?(t+=a,a===o&&(o=!1)):a in r.literals&&!n?(t+=a,o=r.literals[a]):\",\"!==a||n?(t+=a,\"(\"===a?++n:\")\"===a&&--n):i()}i()}return a=a.map((e=>new t.Parser(e,this.settings))),function(e){const t=[];for(const r of a)t.push(r.evaluate(e));return n.call(e,...t)}}evaluate(e){const t=this._parts.slice();for(let s=t.length-2;s>=0;--s){const n=t[s];if(n&&\"operator\"===n.type){const a=t[s+1];t.splice(s+1,1);const o=r.evaluate(a,e);t[s]=r.single(n.value,o)}}return r.operatorsOrder.forEach((s=>{for(let n=1;n<t.length-1;)if(s.includes(t[n])){const s=t[n],a=r.evaluate(t[n-1],e),o=r.evaluate(t[n+1],e);t.splice(n,2);const i=r.calculate(s,a,o);t[n-1]=0===i?0:i}else n+=2})),r.evaluate(t[0],e)}},t.Parser.prototype[r.symbol]=!0,r.reference=function(e){return function(t){return t&&void 0!==t[e]?t[e]:null}},r.evaluate=function(e,t){return null===e?null:\"function\"==typeof e?e(t):e[r.symbol]?e.evaluate(t):e},r.single=function(e,t){if(\"!\"===e)return!t;const r=-t;return 0===r?0:r},r.calculate=function(e,t,s){if(\"??\"===e)return r.exists(t)?t:s;if(\"string\"==typeof t||\"string\"==typeof s){if(\"+\"===e)return(t=r.exists(t)?t:\"\")+(r.exists(s)?s:\"\")}else switch(e){case\"^\":return Math.pow(t,s);case\"*\":return t*s;case\"/\":return t/s;case\"%\":return t%s;case\"+\":return t+s;case\"-\":return t-s}switch(e){case\"<\":return t<s;case\"<=\":return t<=s;case\">\":return t>s;case\">=\":return t>=s;case\"==\":return t===s;case\"!=\":return t!==s;case\"&&\":return t&&s;case\"||\":return t||s}return null},r.exists=function(e){return null!=e}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{}},t={},function r(s){var n=t[s];if(void 0!==n)return n.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,r),a.exports}(5107);var e,t}));\n\n//# sourceURL=webpack://open-lens/./node_modules/joi/dist/joi-browser.min.js?");
14558
+ eval("!function(e,t){ true?module.exports=t():0}(self,(function(){return e={1238:e=>{\"use strict\";e.exports={version:\"17.6.0\"}},7629:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(9474),o=r(1687),i=r(8652),l=r(8160),c=r(3292),u=r(6354),f=r(8901),m=r(9708),h=r(6914),d=r(2294),p=r(6133),g=r(1152),y=r(8863),b=r(2036),v={Base:class{constructor(e){this.type=e,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new d.Ids,this._preferences=null,this._refs=new p.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return s(\"function\"==typeof m.describe,\"Manifest functionality disabled\"),m.describe(this)}allow(...e){return l.verifyFlat(e,\"allow\"),this._values(e,\"_valids\")}alter(e){s(e&&\"object\"==typeof e&&!Array.isArray(e),\"Invalid targets argument\"),s(!this._inRuleset(),\"Cannot set alterations inside a ruleset\");const t=this.clone();t.$_terms.alterations=t.$_terms.alterations||[];for(const r in e){const n=e[r];s(\"function\"==typeof n,\"Alteration adjuster for\",r,\"must be a function\"),t.$_terms.alterations.push({target:r,adjuster:n})}return t.$_temp.ruleset=!1,t}artifact(e){return s(void 0!==e,\"Artifact cannot be undefined\"),s(!this._cache,\"Cannot set an artifact with a rule cache\"),this.$_setFlag(\"artifact\",e)}cast(e){return s(!1===e||\"string\"==typeof e,\"Invalid to value\"),s(!1===e||this._definition.cast[e],\"Type\",this.type,\"does not support casting to\",e),this.$_setFlag(\"cast\",!1===e?void 0:e)}default(e,t){return this._default(\"default\",e,t)}description(e){return s(e&&\"string\"==typeof e,\"Description must be a non-empty string\"),this.$_setFlag(\"description\",e)}empty(e){const t=this.clone();return void 0!==e&&(e=t.$_compile(e,{override:!1})),t.$_setFlag(\"empty\",e,{clone:!1})}error(e){return s(e,\"Missing error\"),s(e instanceof Error||\"function\"==typeof e,\"Must provide a valid Error object or a function\"),this.$_setFlag(\"error\",e)}example(e,t={}){return s(void 0!==e,\"Missing example\"),l.assertOptions(t,[\"override\"]),this._inner(\"examples\",e,{single:!0,override:t.override})}external(e,t){return\"object\"==typeof e&&(s(!t,\"Cannot combine options with description\"),t=e.description,e=e.method),s(\"function\"==typeof e,\"Method must be a function\"),s(void 0===t||t&&\"string\"==typeof t,\"Description must be a non-empty string\"),this._inner(\"externals\",{method:e,description:t},{single:!0})}failover(e,t){return this._default(\"failover\",e,t)}forbidden(){return this.presence(\"forbidden\")}id(e){return e?(s(\"string\"==typeof e,\"id must be a non-empty string\"),s(/^[^\\.]+$/.test(e),\"id cannot contain period character\"),this.$_setFlag(\"id\",e)):this.$_setFlag(\"id\",void 0)}invalid(...e){return this._values(e,\"_invalids\")}label(e){return s(e&&\"string\"==typeof e,\"Label name must be a non-empty string\"),this.$_setFlag(\"label\",e)}meta(e){return s(void 0!==e,\"Meta cannot be undefined\"),this._inner(\"metas\",e,{single:!0})}note(...e){s(e.length,\"Missing notes\");for(const t of e)s(t&&\"string\"==typeof t,\"Notes must be non-empty strings\");return this._inner(\"notes\",e)}only(e=!0){return s(\"boolean\"==typeof e,\"Invalid mode:\",e),this.$_setFlag(\"only\",e)}optional(){return this.presence(\"optional\")}prefs(e){s(e,\"Missing preferences\"),s(void 0===e.context,\"Cannot override context\"),s(void 0===e.externals,\"Cannot override externals\"),s(void 0===e.warnings,\"Cannot override warnings\"),s(void 0===e.debug,\"Cannot override debug\"),l.checkPreferences(e);const t=this.clone();return t._preferences=l.preferences(t._preferences,e),t}presence(e){return s([\"optional\",\"required\",\"forbidden\"].includes(e),\"Unknown presence mode\",e),this.$_setFlag(\"presence\",e)}raw(e=!0){return this.$_setFlag(\"result\",e?\"raw\":void 0)}result(e){return s([\"raw\",\"strip\"].includes(e),\"Unknown result mode\",e),this.$_setFlag(\"result\",e)}required(){return this.presence(\"required\")}strict(e){const t=this.clone(),r=void 0!==e&&!e;return t._preferences=l.preferences(t._preferences,{convert:r}),t}strip(e=!0){return this.$_setFlag(\"result\",e?\"strip\":void 0)}tag(...e){s(e.length,\"Missing tags\");for(const t of e)s(t&&\"string\"==typeof t,\"Tags must be non-empty strings\");return this._inner(\"tags\",e)}unit(e){return s(e&&\"string\"==typeof e,\"Unit name must be a non-empty string\"),this.$_setFlag(\"unit\",e)}valid(...e){l.verifyFlat(e,\"valid\");const t=this.allow(...e);return t.$_setFlag(\"only\",!!t._valids,{clone:!1}),t}when(e,t){const r=this.clone();r.$_terms.whens||(r.$_terms.whens=[]);const n=c.when(r,e,t);if(![\"any\",\"link\"].includes(r.type)){const e=n.is?[n]:n.switch;for(const t of e)s(!t.then||\"any\"===t.then.type||t.then.type===r.type,\"Cannot combine\",r.type,\"with\",t.then&&t.then.type),s(!t.otherwise||\"any\"===t.otherwise.type||t.otherwise.type===r.type,\"Cannot combine\",r.type,\"with\",t.otherwise&&t.otherwise.type)}return r.$_terms.whens.push(n),r.$_mutateRebuild()}cache(e){s(!this._inRuleset(),\"Cannot set caching inside a ruleset\"),s(!this._cache,\"Cannot override schema cache\"),s(void 0===this._flags.artifact,\"Cannot cache a rule with an artifact\");const t=this.clone();return t._cache=e||i.provider.provision(),t.$_temp.ruleset=!1,t}clone(){const e=Object.create(Object.getPrototypeOf(this));return this._assign(e)}concat(e){s(l.isSchema(e),\"Invalid schema object\"),s(\"any\"===this.type||\"any\"===e.type||e.type===this.type,\"Cannot merge type\",this.type,\"with another type:\",e.type),s(!this._inRuleset(),\"Cannot concatenate onto a schema with open ruleset\"),s(!e._inRuleset(),\"Cannot concatenate a schema with open ruleset\");let t=this.clone();if(\"any\"===this.type&&\"any\"!==e.type){const r=e.clone();for(const e of Object.keys(t))\"type\"!==e&&(r[e]=t[e]);t=r}t._ids.concat(e._ids),t._refs.register(e,p.toSibling),t._preferences=t._preferences?l.preferences(t._preferences,e._preferences):e._preferences,t._valids=b.merge(t._valids,e._valids,e._invalids),t._invalids=b.merge(t._invalids,e._invalids,e._valids);for(const r of e._singleRules.keys())t._singleRules.has(r)&&(t._rules=t._rules.filter((e=>e.keep||e.name!==r)),t._singleRules.delete(r));for(const r of e._rules)e._definition.rules[r.method].multi||t._singleRules.set(r.name,r),t._rules.push(r);if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);const r=Object.assign({},e._flags);delete r.empty,o(t._flags,r)}else if(e._flags.empty){t._flags.empty=e._flags.empty;const r=Object.assign({},e._flags);delete r.empty,o(t._flags,r)}else o(t._flags,e._flags);for(const r in e.$_terms){const s=e.$_terms[r];s?t.$_terms[r]?t.$_terms[r]=t.$_terms[r].concat(s):t.$_terms[r]=s.slice():t.$_terms[r]||(t.$_terms[r]=s)}return this.$_root._tracer&&this.$_root._tracer._combine(t,[this,e]),t.$_mutateRebuild()}extend(e){return s(!e.base,\"Cannot extend type with another base\"),f.type(this,e)}extract(e){return e=Array.isArray(e)?e:e.split(\".\"),this._ids.reach(e)}fork(e,t){s(!this._inRuleset(),\"Cannot fork inside a ruleset\");let r=this;for(let s of[].concat(e))s=Array.isArray(s)?s:s.split(\".\"),r=r._ids.fork(s,t,r);return r.$_temp.ruleset=!1,r}rule(e){const t=this._definition;l.assertOptions(e,Object.keys(t.modifiers)),s(!1!==this.$_temp.ruleset,\"Cannot apply rules to empty ruleset or the last rule added does not support rule properties\");const r=null===this.$_temp.ruleset?this._rules.length-1:this.$_temp.ruleset;s(r>=0&&r<this._rules.length,\"Cannot apply rules to empty ruleset\");const a=this.clone();for(let o=r;o<a._rules.length;++o){const r=a._rules[o],i=n(r);for(const n in e)t.modifiers[n](i,e[n]),s(i.name===r.name,\"Cannot change rule name\");a._rules[o]=i,a._singleRules.get(i.name)===r&&a._singleRules.set(i.name,i)}return a.$_temp.ruleset=!1,a.$_mutateRebuild()}get ruleset(){s(!this._inRuleset(),\"Cannot start a new ruleset without closing the previous one\");const e=this.clone();return e.$_temp.ruleset=e._rules.length,e}get $(){return this.ruleset}tailor(e){e=[].concat(e),s(!this._inRuleset(),\"Cannot tailor inside a ruleset\");let t=this;if(this.$_terms.alterations)for(const{target:r,adjuster:n}of this.$_terms.alterations)e.includes(r)&&(t=n(t),s(l.isSchema(t),\"Alteration adjuster for\",r,\"failed to return a schema object\"));return t=t.$_modify({each:t=>t.tailor(e),ref:!1}),t.$_temp.ruleset=!1,t.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(e,t){return y.entry(e,this,t)}validateAsync(e,t){return y.entryAsync(e,this,t)}$_addRule(e){\"string\"==typeof e&&(e={name:e}),s(e&&\"object\"==typeof e,\"Invalid options\"),s(e.name&&\"string\"==typeof e.name,\"Invalid rule name\");for(const t in e)s(\"_\"!==t[0],\"Cannot set private rule properties\");const t=Object.assign({},e);t._resolve=[],t.method=t.method||t.name;const r=this._definition.rules[t.method],n=t.args;s(r,\"Unknown rule\",t.method);const a=this.clone();if(n){s(1===Object.keys(n).length||Object.keys(n).length===this._definition.rules[t.name].args.length,\"Invalid rule definition for\",this.type,t.name);for(const e in n){let o=n[e];if(void 0!==o){if(r.argsByName){const i=r.argsByName.get(e);if(i.ref&&l.isResolvable(o))t._resolve.push(e),a.$_mutateRegister(o);else if(i.normalize&&(o=i.normalize(o),n[e]=o),i.assert){const t=l.validateArg(o,e,i);s(!t,t,\"or reference\")}}n[e]=o}else delete n[e]}}return r.multi||(a._ruleRemove(t.name,{clone:!1}),a._singleRules.set(t.name,t)),!1===a.$_temp.ruleset&&(a.$_temp.ruleset=null),r.priority?a._rules.unshift(t):a._rules.push(t),a}$_compile(e,t){return c.schema(this.$_root,e,t)}$_createError(e,t,r,s,n,a={}){const o=!1!==a.flags?this._flags:{},i=a.messages?h.merge(this._definition.messages,a.messages):this._definition.messages;return new u.Report(e,t,r,o,i,s,n)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){return e=Array.isArray(e)?e:e.split(\".\"),this._ids.labels(e)}$_match(e,t,r,s){(r=Object.assign({},r)).abortEarly=!0,r._externals=!1,t.snapshot();const n=!y.validate(e,this,t,r,s).errors;return t.restore(),n}$_modify(e){return l.assertOptions(e,[\"each\",\"once\",\"ref\",\"schema\"]),d.schema(this,e)||this}$_mutateRebuild(){return s(!this._inRuleset(),\"Cannot add this rule inside a ruleset\"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(e,{source:t,name:r,path:s,key:n})=>{const a=this._definition[t][r]&&this._definition[t][r].register;!1!==a&&this.$_mutateRegister(e,{family:a,key:n})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(e,{family:t,key:r}={}){this._refs.register(e,t),this._ids.register(e,{key:r})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t,r={}){s(\"_\"===e[0]||!this._inRuleset(),\"Cannot set flag inside a ruleset\");const n=this._definition.flags[e]||{};if(a(t,n.default)&&(t=void 0),a(t,this._flags[e]))return this;const o=!1!==r.clone?this.clone():this;return void 0!==t?(o._flags[e]=t,o.$_mutateRegister(t)):delete o._flags[e],\"_\"!==e[0]&&(o.$_temp.ruleset=!1),o}$_parent(e,...t){return this[e][l.symbols.parent].call(this,...t)}$_validate(e,t,r){return y.validate(e,this,t,r)}_assign(e){e.type=this.type,e.$_root=this.$_root,e.$_temp=Object.assign({},this.$_temp),e.$_temp.whens={},e._ids=this._ids.clone(),e._preferences=this._preferences,e._valids=this._valids&&this._valids.clone(),e._invalids=this._invalids&&this._invalids.clone(),e._rules=this._rules.slice(),e._singleRules=n(this._singleRules,{shallow:!0}),e._refs=this._refs.clone(),e._flags=Object.assign({},this._flags),e._cache=null,e.$_terms={};for(const t in this.$_terms)e.$_terms[t]=this.$_terms[t]?this.$_terms[t].slice():null;e.$_super={};for(const t in this.$_super)e.$_super[t]=this._super[t].bind(e);return e}_bare(){const e=this.clone();e._reset();const t=e._definition.terms;for(const r in t){const s=t[r];e.$_terms[r]=s.init}return e.$_mutateRebuild()}_default(e,t,r={}){return l.assertOptions(r,\"literal\"),s(void 0!==t,\"Missing\",e,\"value\"),s(\"function\"==typeof t||!r.literal,\"Only function value supports literal option\"),\"function\"==typeof t&&r.literal&&(t={[l.symbols.literal]:!0,literal:t}),this.$_setFlag(e,t)}_generate(e,t,r){if(!this.$_terms.whens)return{schema:this};const s=[],n=[];for(let a=0;a<this.$_terms.whens.length;++a){const o=this.$_terms.whens[a];if(o.concat){s.push(o.concat),n.push(\"\".concat(a,\".concat\"));continue}const i=o.ref?o.ref.resolve(e,t,r):e,l=o.is?[o]:o.switch,c=n.length;for(let c=0;c<l.length;++c){const{is:u,then:f,otherwise:m}=l[c],h=\"\".concat(a).concat(o.switch?\".\"+c:\"\");if(u.$_match(i,t.nest(u,\"\".concat(h,\".is\")),r)){if(f){const a=t.localize([...t.path,\"\".concat(h,\".then\")],t.ancestors,t.schemas),{schema:o,id:i}=f._generate(e,a,r);s.push(o),n.push(\"\".concat(h,\".then\").concat(i?\"(\".concat(i,\")\"):\"\"));break}}else if(m){const a=t.localize([...t.path,\"\".concat(h,\".otherwise\")],t.ancestors,t.schemas),{schema:o,id:i}=m._generate(e,a,r);s.push(o),n.push(\"\".concat(h,\".otherwise\").concat(i?\"(\".concat(i,\")\"):\"\"));break}}if(o.break&&n.length>c)break}const a=n.join(\", \");if(t.mainstay.tracer.debug(t,\"rule\",\"when\",a),!a)return{schema:this};if(!t.mainstay.tracer.active&&this.$_temp.whens[a])return{schema:this.$_temp.whens[a],id:a};let o=this;this._definition.generate&&(o=this._definition.generate(this,e,t,r));for(const e of s)o=o.concat(e);return this.$_root._tracer&&this.$_root._tracer._combine(o,[this,...s]),this.$_temp.whens[a]=o,{schema:o,id:a}}_inner(e,t,r={}){s(!this._inRuleset(),\"Cannot set \".concat(e,\" inside a ruleset\"));const n=this.clone();return n.$_terms[e]&&!r.override||(n.$_terms[e]=[]),r.single?n.$_terms[e].push(t):n.$_terms[e].push(...t),n.$_temp.ruleset=!1,n}_inRuleset(){return null!==this.$_temp.ruleset&&!1!==this.$_temp.ruleset}_ruleRemove(e,t={}){if(!this._singleRules.has(e))return this;const r=!1!==t.clone?this.clone():this;r._singleRules.delete(e);const s=[];for(let t=0;t<r._rules.length;++t){const n=r._rules[t];n.name!==e||n.keep?s.push(n):r._inRuleset()&&t<r.$_temp.ruleset&&--r.$_temp.ruleset}return r._rules=s,r}_values(e,t){l.verifyFlat(e,t.slice(1,-1));const r=this.clone(),n=e[0]===l.symbols.override;if(n&&(e=e.slice(1)),!r[t]&&e.length?r[t]=new b:n&&(r[t]=e.length?new b:null,r.$_mutateRebuild()),!r[t])return r;n&&r[t].override();for(const n of e){s(void 0!==n,\"Cannot call allow/valid/invalid with undefined\"),s(n!==l.symbols.override,\"Override must be the first value\");const e=\"_invalids\"===t?\"_valids\":\"_invalids\";r[e]&&(r[e].remove(n),r[e].length||(s(\"_valids\"===t||!r._flags.only,\"Setting invalid value\",n,\"leaves schema rejecting all values due to previous valid rule\"),r[e]=null)),r[t].add(n,r._refs)}return r}}};v.Base.prototype[l.symbols.any]={version:l.version,compile:c.compile,root:\"$_root\"},v.Base.prototype.isImmutable=!0,v.Base.prototype.deny=v.Base.prototype.invalid,v.Base.prototype.disallow=v.Base.prototype.invalid,v.Base.prototype.equal=v.Base.prototype.valid,v.Base.prototype.exist=v.Base.prototype.required,v.Base.prototype.not=v.Base.prototype.invalid,v.Base.prototype.options=v.Base.prototype.prefs,v.Base.prototype.preferences=v.Base.prototype.prefs,e.exports=new v.Base},8652:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(8160),o={max:1e3,supported:new Set([\"undefined\",\"boolean\",\"number\",\"string\"])};t.provider={provision:e=>new o.Cache(e)},o.Cache=class{constructor(e={}){a.assertOptions(e,[\"max\"]),s(void 0===e.max||e.max&&e.max>0&&isFinite(e.max),\"Invalid max cache size\"),this._max=e.max||o.max,this._map=new Map,this._list=new o.List}get length(){return this._map.size}set(e,t){if(null!==e&&!o.supported.has(typeof e))return;let r=this._map.get(e);if(r)return r.value=t,void this._list.first(r);r=this._list.unshift({key:e,value:t}),this._map.set(e,r),this._compact()}get(e){const t=this._map.get(e);if(t)return this._list.first(t),n(t.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},o.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:t,prev:r}=e;return t.prev=r,r&&(r.next=t),e===this.tail&&(this.tail=t),e.prev=null,e.next=null,e}}},8160:(e,t,r)=>{\"use strict\";const s=r(375),n=r(7916),a=r(1238);let o,i;const l={isoDate:/^(?:[-+]\\d{2})?(?:\\d{4}(?!\\d{2}\\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\\1(?:[12]\\d|0[1-9]|3[01]))?|W(?:[0-4]\\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\\d|[12]\\d{2}|3(?:[0-5]\\d|6[1-6])))(?![T]$|[T][\\d]+Z$)(?:[T\\s](?:(?:(?:[01]\\d|2[0-3])(?:(:?)[0-5]\\d)?|24\\:?00)(?:[.,]\\d+(?!:))?)(?:\\2[0-5]\\d(?:[.,]\\d+)?)?(?:[Z]|(?:[+-])(?:[01]\\d|2[0-3])(?::?[0-5]\\d)?)?)?)?$/};t.version=a.version,t.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:\"iso\",errors:{escapeHtml:!1,label:\"path\",language:null,render:!0,stack:!1,wrap:{label:'\"',array:\"[]\"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:\"optional\",skipFunctions:!1,stripUnknown:!1,warnings:!1},t.symbols={any:Symbol.for(\"@hapi/joi/schema\"),arraySingle:Symbol(\"arraySingle\"),deepDefault:Symbol(\"deepDefault\"),errors:Symbol(\"errors\"),literal:Symbol(\"literal\"),override:Symbol(\"override\"),parent:Symbol(\"parent\"),prefs:Symbol(\"prefs\"),ref:Symbol(\"ref\"),template:Symbol(\"template\"),values:Symbol(\"values\")},t.assertOptions=function(e,t,r=\"Options\"){s(e&&\"object\"==typeof e&&!Array.isArray(e),\"Options must be of type object\");const n=Object.keys(e).filter((e=>!t.includes(e)));s(0===n.length,\"\".concat(r,\" contain unknown keys: \").concat(n))},t.checkPreferences=function(e){i=i||r(3378);const t=i.preferences.validate(e);if(t.error)throw new n([t.error.details[0].message])},t.compare=function(e,t,r){switch(r){case\"=\":return e===t;case\">\":return e>t;case\"<\":return e<t;case\">=\":return e>=t;case\"<=\":return e<=t}},t.default=function(e,t){return void 0===e?t:e},t.isIsoDate=function(e){return l.isoDate.test(e)},t.isNumber=function(e){return\"number\"==typeof e&&!isNaN(e)},t.isResolvable=function(e){return!!e&&(e[t.symbols.ref]||e[t.symbols.template])},t.isSchema=function(e,r={}){const n=e&&e[t.symbols.any];return!!n&&(s(r.legacy||n.version===t.version,\"Cannot mix different versions of joi schemas\"),!0)},t.isValues=function(e){return e[t.symbols.values]},t.limit=function(e){return Number.isSafeInteger(e)&&e>=0},t.preferences=function(e,s){o=o||r(6914),e=e||{},s=s||{};const n=Object.assign({},e,s);return s.errors&&e.errors&&(n.errors=Object.assign({},e.errors,s.errors),n.errors.wrap=Object.assign({},e.errors.wrap,s.errors.wrap)),s.messages&&(n.messages=o.compile(s.messages,e.messages)),delete n[t.symbols.prefs],n},t.tryWithPath=function(e,t,r={}){try{return e()}catch(e){throw void 0!==e.path?e.path=t+\".\"+e.path:e.path=t,r.append&&(e.message=\"\".concat(e.message,\" (\").concat(e.path,\")\")),e}},t.validateArg=function(e,r,{assert:s,message:n}){if(t.isSchema(s)){const t=s.validate(e);if(!t.error)return;return t.error.message}if(!s(e))return r?\"\".concat(r,\" \").concat(n):n},t.verifyFlat=function(e,t){for(const r of e)s(!Array.isArray(r),\"Method no longer accepts array arguments:\",t)}},3292:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8160),a=r(6133),o={};t.schema=function(e,t,r={}){n.assertOptions(r,[\"appendPath\",\"override\"]);try{return o.schema(e,t,r)}catch(e){throw r.appendPath&&void 0!==e.path&&(e.message=\"\".concat(e.message,\" (\").concat(e.path,\")\")),e}},o.schema=function(e,t,r){s(void 0!==t,\"Invalid undefined schema\"),Array.isArray(t)&&(s(t.length,\"Invalid empty array schema\"),1===t.length&&(t=t[0]));const a=(t,...s)=>!1!==r.override?t.valid(e.override,...s):t.valid(...s);if(o.simple(t))return a(e,t);if(\"function\"==typeof t)return e.custom(t);if(s(\"object\"==typeof t,\"Invalid schema content:\",typeof t),n.isResolvable(t))return a(e,t);if(n.isSchema(t))return t;if(Array.isArray(t)){for(const r of t)if(!o.simple(r))return e.alternatives().try(...t);return a(e,...t)}return t instanceof RegExp?e.string().regex(t):t instanceof Date?a(e.date(),t):(s(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),\"Schema can only contain plain objects\"),e.object().keys(t))},t.ref=function(e,t){return a.isRef(e)?e:a.create(e,t)},t.compile=function(e,r,a={}){n.assertOptions(a,[\"legacy\"]);const i=r&&r[n.symbols.any];if(i)return s(a.legacy||i.version===n.version,\"Cannot mix different versions of joi schemas:\",i.version,n.version),r;if(\"object\"!=typeof r||!a.legacy)return t.schema(e,r,{appendPath:!0});const l=o.walk(r);return l?l.compile(l.root,r):t.schema(e,r,{appendPath:!0})},o.walk=function(e){if(\"object\"!=typeof e)return null;if(Array.isArray(e)){for(const t of e){const e=o.walk(t);if(e)return e}return null}const t=e[n.symbols.any];if(t)return{root:e[t.root],compile:t.compile};s(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),\"Schema can only contain plain objects\");for(const t in e){const r=o.walk(e[t]);if(r)return r}return null},o.simple=function(e){return null===e||[\"boolean\",\"string\",\"number\"].includes(typeof e)},t.when=function(e,r,i){if(void 0===i&&(s(r&&\"object\"==typeof r,\"Missing options\"),i=r,r=a.create(\".\")),Array.isArray(i)&&(i={switch:i}),n.assertOptions(i,[\"is\",\"not\",\"then\",\"otherwise\",\"switch\",\"break\"]),n.isSchema(r))return s(void 0===i.is,'\"is\" can not be used with a schema condition'),s(void 0===i.not,'\"not\" can not be used with a schema condition'),s(void 0===i.switch,'\"switch\" can not be used with a schema condition'),o.condition(e,{is:r,then:i.then,otherwise:i.otherwise,break:i.break});if(s(a.isRef(r)||\"string\"==typeof r,\"Invalid condition:\",r),s(void 0===i.not||void 0===i.is,'Cannot combine \"is\" with \"not\"'),void 0===i.switch){let l=i;void 0!==i.not&&(l={is:i.not,then:i.otherwise,otherwise:i.then,break:i.break});let c=void 0!==l.is?e.$_compile(l.is):e.$_root.invalid(null,!1,0,\"\").required();return s(void 0!==l.then||void 0!==l.otherwise,'options must have at least one of \"then\", \"otherwise\", or \"switch\"'),s(void 0===l.break||void 0===l.then||void 0===l.otherwise,\"Cannot specify then, otherwise, and break all together\"),void 0===i.is||a.isRef(i.is)||n.isSchema(i.is)||(c=c.required()),o.condition(e,{ref:t.ref(r),is:c,then:l.then,otherwise:l.otherwise,break:l.break})}s(Array.isArray(i.switch),'\"switch\" must be an array'),s(void 0===i.is,'Cannot combine \"switch\" with \"is\"'),s(void 0===i.not,'Cannot combine \"switch\" with \"not\"'),s(void 0===i.then,'Cannot combine \"switch\" with \"then\"');const l={ref:t.ref(r),switch:[],break:i.break};for(let t=0;t<i.switch.length;++t){const r=i.switch[t],o=t===i.switch.length-1;n.assertOptions(r,o?[\"is\",\"then\",\"otherwise\"]:[\"is\",\"then\"]),s(void 0!==r.is,'Switch statement missing \"is\"'),s(void 0!==r.then,'Switch statement missing \"then\"');const c={is:e.$_compile(r.is),then:e.$_compile(r.then)};if(a.isRef(r.is)||n.isSchema(r.is)||(c.is=c.is.required()),o){s(void 0===i.otherwise||void 0===r.otherwise,'Cannot specify \"otherwise\" inside and outside a \"switch\"');const t=void 0!==i.otherwise?i.otherwise:r.otherwise;void 0!==t&&(s(void 0===l.break,\"Cannot specify both otherwise and break\"),c.otherwise=e.$_compile(t))}l.switch.push(c)}return l},o.condition=function(e,t){for(const r of[\"then\",\"otherwise\"])void 0===t[r]?delete t[r]:t[r]=e.$_compile(t[r]);return t}},6354:(e,t,r)=>{\"use strict\";const s=r(5688),n=r(8160),a=r(3328);t.Report=class{constructor(e,r,s,n,a,o,i){if(this.code=e,this.flags=n,this.messages=a,this.path=o.path,this.prefs=i,this.state=o,this.value=r,this.message=null,this.template=null,this.local=s||{},this.local.label=t.label(this.flags,this.state,this.prefs,this.messages),void 0===this.value||this.local.hasOwnProperty(\"value\")||(this.local.value=this.value),this.path.length){const e=this.path[this.path.length-1];\"object\"!=typeof e&&(this.local.key=e)}}_setTemplate(e){if(this.template=e,!this.flags.label&&0===this.path.length){const e=this._template(this.template,\"root\");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const e=this.code;if(!this.prefs.errors.render)return this.code;const t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return void 0===t?'Error code \"'.concat(e,'\" is not defined, your custom type is missing the correct messages definition'):(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^\"\" /,\"\").trim()),this.message)}_template(e,r){return t.template(this.value,e,r||this.code,this.state,this.prefs)}},t.path=function(e){let t=\"\";for(const r of e)\"object\"!=typeof r&&(\"string\"==typeof r?(t&&(t+=\".\"),t+=r):t+=\"[\".concat(r,\"]\"));return t},t.template=function(e,t,r,s,o){if(!t)return;if(a.isTemplate(t))return\"root\"!==r?t:null;let i=o.errors.language;if(n.isResolvable(i)&&(i=i.resolve(e,s,o)),i&&t[i]){if(void 0!==t[i][r])return t[i][r];if(void 0!==t[i][\"*\"])return t[i][\"*\"]}return t[r]?t[r]:t[\"*\"]},t.label=function(e,r,s,n){if(e.label)return e.label;if(!s.errors.label)return\"\";let a=r.path;\"key\"===s.errors.label&&r.path.length>1&&(a=r.path.slice(-1));return t.path(a)||t.template(null,s.messages,\"root\",r,s)||n&&t.template(null,n,\"root\",r,s)||\"value\"},t.process=function(e,r,s){if(!e)return null;const{override:n,message:a,details:o}=t.details(e);if(n)return n;if(s.errors.stack)return new t.ValidationError(a,o,r);const i=Error.stackTraceLimit;Error.stackTraceLimit=0;const l=new t.ValidationError(a,o,r);return Error.stackTraceLimit=i,l},t.details=function(e,t={}){let r=[];const s=[];for(const n of e){if(n instanceof Error){if(!1!==t.override)return{override:n};const e=n.toString();r.push(e),s.push({message:e,type:\"override\",context:{error:n}});continue}const e=n.toString();r.push(e),s.push({message:e,path:n.path.filter((e=>\"object\"!=typeof e)),type:n.code,context:n.local})}return r.length>1&&(r=[...new Set(r)]),{message:r.join(\". \"),details:s}},t.ValidationError=class extends Error{constructor(e,t,r){super(e),this._original=r,this.details=t}static isError(e){return e instanceof t.ValidationError}},t.ValidationError.prototype.isJoi=!0,t.ValidationError.prototype.name=\"ValidationError\",t.ValidationError.prototype.annotate=s.error},8901:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(8160),o=r(6914),i={};t.type=function(e,t){const r=Object.getPrototypeOf(e),l=n(r),c=e._assign(Object.create(l)),u=Object.assign({},t);delete u.base,l._definition=u;const f=r._definition||{};u.messages=o.merge(f.messages,u.messages),u.properties=Object.assign({},f.properties,u.properties),c.type=u.type,u.flags=Object.assign({},f.flags,u.flags);const m=Object.assign({},f.terms);if(u.terms)for(const e in u.terms){const t=u.terms[e];s(void 0===c.$_terms[e],\"Invalid term override for\",u.type,e),c.$_terms[e]=t.init,m[e]=t}u.terms=m,u.args||(u.args=f.args),u.prepare=i.prepare(u.prepare,f.prepare),u.coerce&&(\"function\"==typeof u.coerce&&(u.coerce={method:u.coerce}),u.coerce.from&&!Array.isArray(u.coerce.from)&&(u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)})),u.coerce=i.coerce(u.coerce,f.coerce),u.validate=i.validate(u.validate,f.validate);const h=Object.assign({},f.rules);if(u.rules)for(const e in u.rules){const t=u.rules[e];s(\"object\"==typeof t,\"Invalid rule definition for\",u.type,e);let r=t.method;if(void 0===r&&(r=function(){return this.$_addRule(e)}),r&&(s(!l[e],\"Rule conflict in\",u.type,e),l[e]=r),s(!h[e],\"Rule conflict in\",u.type,e),h[e]=t,t.alias){const e=[].concat(t.alias);for(const r of e)l[r]=t.method}t.args&&(t.argsByName=new Map,t.args=t.args.map((e=>(\"string\"==typeof e&&(e={name:e}),s(!t.argsByName.has(e.name),\"Duplicated argument name\",e.name),a.isSchema(e.assert)&&(e.assert=e.assert.strict().label(e.name)),t.argsByName.set(e.name,e),e))))}u.rules=h;const d=Object.assign({},f.modifiers);if(u.modifiers)for(const e in u.modifiers){s(!l[e],\"Rule conflict in\",u.type,e);const t=u.modifiers[e];s(\"function\"==typeof t,\"Invalid modifier definition for\",u.type,e);const r=function(t){return this.rule({[e]:t})};l[e]=r,d[e]=t}if(u.modifiers=d,u.overrides){l._super=r,c.$_super={};for(const e in u.overrides)s(r[e],\"Cannot override missing\",e),u.overrides[e][a.symbols.parent]=r[e],c.$_super[e]=r[e].bind(c);Object.assign(l,u.overrides)}u.cast=Object.assign({},f.cast,u.cast);const p=Object.assign({},f.manifest,u.manifest);return p.build=i.build(u.manifest&&u.manifest.build,f.manifest&&f.manifest.build),u.manifest=p,u.rebuild=i.rebuild(u.rebuild,f.rebuild),c},i.build=function(e,t){return e&&t?function(r,s){return t(e(r,s),s)}:e||t},i.coerce=function(e,t){return e&&t?{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(r,s){let n;if((!t.from||t.from.includes(typeof r))&&(n=t.method(r,s),n)){if(n.errors||void 0===n.value)return n;r=n.value}if(!e.from||e.from.includes(typeof r)){const t=e.method(r,s);if(t)return t}return n}}:e||t},i.prepare=function(e,t){return e&&t?function(r,s){const n=e(r,s);if(n){if(n.errors||void 0===n.value)return n;r=n.value}return t(r,s)||n}:e||t},i.rebuild=function(e,t){return e&&t?function(r){t(r),e(r)}:e||t},i.validate=function(e,t){return e&&t?function(r,s){const n=t(r,s);if(n){if(n.errors&&(!Array.isArray(n.errors)||n.errors.length))return n;r=n.value}return e(r,s)||n}:e||t}},5107:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(8652),o=r(8160),i=r(3292),l=r(6354),c=r(8901),u=r(9708),f=r(6133),m=r(3328),h=r(1152);let d;const p={types:{alternatives:r(4946),any:r(8068),array:r(546),boolean:r(4937),date:r(7500),function:r(390),link:r(8785),number:r(3832),object:r(8966),string:r(7417),symbol:r(8826)},aliases:{alt:\"alternatives\",bool:\"boolean\",func:\"function\"},root:function(){const e={_types:new Set(Object.keys(p.types))};for(const t of e._types)e[t]=function(...e){return s(!e.length||[\"alternatives\",\"link\",\"object\"].includes(t),\"The\",t,\"type does not allow arguments\"),p.generate(this,p.types[t],e)};for(const t of[\"allow\",\"custom\",\"disallow\",\"equal\",\"exist\",\"forbidden\",\"invalid\",\"not\",\"only\",\"optional\",\"options\",\"prefs\",\"preferences\",\"required\",\"strip\",\"valid\",\"when\"])e[t]=function(...e){return this.any()[t](...e)};Object.assign(e,p.methods);for(const t in p.aliases){const r=p.aliases[t];e[t]=e[r]}return e.x=e.expression,h.setup&&h.setup(e),e}};p.methods={ValidationError:l.ValidationError,version:o.version,cache:a.provider,assert(e,t,...r){p.assert(e,t,!0,r)},attempt:(e,t,...r)=>p.assert(e,t,!1,r),build(e){return s(\"function\"==typeof u.build,\"Manifest functionality disabled\"),u.build(this,e)},checkPreferences(e){o.checkPreferences(e)},compile(e,t){return i.compile(this,e,t)},defaults(e){s(\"function\"==typeof e,\"modifier must be a function\");const t=Object.assign({},this);for(const r of t._types){const n=e(t[r]());s(o.isSchema(n),\"modifier must return a valid schema object\"),t[r]=function(...e){return p.generate(this,n,e)}}return t},expression:(...e)=>new m(...e),extend(...e){o.verifyFlat(e,\"extend\"),d=d||r(3378),s(e.length,\"You need to provide at least one extension\"),this.assert(e,d.extensions);const t=Object.assign({},this);t._types=new Set(t._types);for(let r of e){\"function\"==typeof r&&(r=r(t)),this.assert(r,d.extension);const e=p.expandExtension(r,t);for(const r of e){s(void 0===t[r.type]||t._types.has(r.type),\"Cannot override name\",r.type);const e=r.base||this.any(),n=c.type(e,r);t._types.add(r.type),t[r.type]=function(...e){return p.generate(this,n,e)}}}return t},isError:l.ValidationError.isError,isExpression:m.isTemplate,isRef:f.isRef,isSchema:o.isSchema,in:(...e)=>f.in(...e),override:o.symbols.override,ref:(...e)=>f.create(...e),types(){const e={};for(const t of this._types)e[t]=this[t]();for(const t in p.aliases)e[t]=this[t]();return e}},p.assert=function(e,t,r,s){const a=s[0]instanceof Error||\"string\"==typeof s[0]?s[0]:null,i=a?s[1]:s[0],c=t.validate(e,o.preferences({errors:{stack:!0}},i||{}));let u=c.error;if(!u)return c.value;if(a instanceof Error)throw a;const f=r&&\"function\"==typeof u.annotate?u.annotate():u.message;throw u instanceof l.ValidationError==0&&(u=n(u)),u.message=a?\"\".concat(a,\" \").concat(f):f,u},p.generate=function(e,t,r){return s(e,\"Must be invoked on a Joi instance.\"),t.$_root=e,t._definition.args&&r.length?t._definition.args(t,...r):t},p.expandExtension=function(e,t){if(\"string\"==typeof e.type)return[e];const r=[];for(const s of t._types)if(e.type.test(s)){const n=Object.assign({},e);n.type=s,n.base=t[s](),r.push(n)}return r},e.exports=p.root()},6914:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(3328);t.compile=function(e,t){if(\"string\"==typeof e)return s(!t,\"Cannot set single message string\"),new a(e);if(a.isTemplate(e))return s(!t,\"Cannot set single message template\"),e;s(\"object\"==typeof e&&!Array.isArray(e),\"Invalid message options\"),t=t?n(t):{};for(let r in e){const n=e[r];if(\"root\"===r||a.isTemplate(n)){t[r]=n;continue}if(\"string\"==typeof n){t[r]=new a(n);continue}s(\"object\"==typeof n&&!Array.isArray(n),\"Invalid message for\",r);const o=r;for(r in t[o]=t[o]||{},n){const e=n[r];\"root\"===r||a.isTemplate(e)?t[o][r]=e:(s(\"string\"==typeof e,\"Invalid message for\",r,\"in\",o),t[o][r]=new a(e))}}return t},t.decompile=function(e){const t={};for(let r in e){const s=e[r];if(\"root\"===r){t.root=s;continue}if(a.isTemplate(s)){t[r]=s.describe({compact:!0});continue}const n=r;for(r in t[n]={},s){const e=s[r];\"root\"!==r?t[n][r]=e.describe({compact:!0}):t[n].root=e}}return t},t.merge=function(e,r){if(!e)return t.compile(r);if(!r)return e;if(\"string\"==typeof r)return new a(r);if(a.isTemplate(r))return r;const o=n(e);for(let e in r){const t=r[e];if(\"root\"===e||a.isTemplate(t)){o[e]=t;continue}if(\"string\"==typeof t){o[e]=new a(t);continue}s(\"object\"==typeof t&&!Array.isArray(t),\"Invalid message for\",e);const n=e;for(e in o[n]=o[n]||{},t){const r=t[e];\"root\"===e||a.isTemplate(r)?o[n][e]=r:(s(\"string\"==typeof r,\"Invalid message for\",e,\"in\",n),o[n][e]=new a(r))}}return o}},2294:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(8160),l=r(6133),c={};t.Ids=c.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new c.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[t,r]of e._byId.entries())o(!this._byKey.has(t),\"Schema id conflicts with existing key:\",t),this._byId.set(t,r);for(const[t,r]of e._byKey.entries())o(!this._byId.has(t),\"Schema key conflicts with existing id:\",t),this._byKey.set(t,r)}fork(e,t,r){const s=this._collect(e);s.push({schema:r});const n=s.shift();let a={id:n.id,schema:t(n.schema)};o(i.isSchema(a.schema),\"adjuster function failed to return a joi schema type\");for(const e of s)a={id:e.id,schema:c.fork(e.schema,a.id,a.schema)};return a.schema}labels(e,t=[]){const r=e[0],s=this._get(r);if(!s)return[...t,...e].join(\".\");const n=e.slice(1);return t=[...t,s.schema._flags.label||r],n.length?s.schema._ids.labels(n,t):t.join(\".\")}reach(e,t=[]){const r=e[0],s=this._get(r);o(s,\"Schema does not contain path\",[...t,...e].join(\".\"));const n=e.slice(1);return n.length?s.schema._ids.reach(n,[...t,r]):s.schema}register(e,{key:t}={}){if(!e||!i.isSchema(e))return;(e.$_property(\"schemaChain\")||e._ids._schemaChain)&&(this._schemaChain=!0);const r=e._flags.id;if(r){const t=this._byId.get(r);o(!t||t.schema===e,\"Cannot add different schemas with the same id:\",r),o(!this._byKey.has(r),\"Schema id conflicts with existing key:\",r),this._byId.set(r,{schema:e,id:r})}t&&(o(!this._byKey.has(t),\"Schema already contains key:\",t),o(!this._byId.has(t),\"Schema key conflicts with existing id:\",t),this._byKey.set(t,{schema:e,id:t}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,t=[],r=[]){const s=e[0],n=this._get(s);o(n,\"Schema does not contain path\",[...t,...e].join(\".\")),r=[n,...r];const a=e.slice(1);return a.length?n.schema._ids._collect(a,[...t,s],r):r}_get(e){return this._byId.get(e)||this._byKey.get(e)}},c.fork=function(e,r,s){const n=t.schema(e,{each:(e,{key:t})=>{if(r===(e._flags.id||t))return s},ref:!1});return n?n.$_mutateRebuild():e},t.schema=function(e,t){let r;for(const s in e._flags){if(\"_\"===s[0])continue;const n=c.scan(e._flags[s],{source:\"flags\",name:s},t);void 0!==n&&(r=r||e.clone(),r._flags[s]=n)}for(let s=0;s<e._rules.length;++s){const n=e._rules[s],a=c.scan(n.args,{source:\"rules\",name:n.name},t);if(void 0!==a){r=r||e.clone();const t=Object.assign({},n);t.args=a,r._rules[s]=t,r._singleRules.get(n.name)===n&&r._singleRules.set(n.name,t)}}for(const s in e.$_terms){if(\"_\"===s[0])continue;const n=c.scan(e.$_terms[s],{source:\"terms\",name:s},t);void 0!==n&&(r=r||e.clone(),r.$_terms[s]=n)}return r},c.scan=function(e,t,r,s,a){const o=s||[];if(null===e||\"object\"!=typeof e)return;let u;if(Array.isArray(e)){for(let s=0;s<e.length;++s){const n=\"terms\"===t.source&&\"keys\"===t.name&&e[s].key,a=c.scan(e[s],t,r,[s,...o],n);void 0!==a&&(u=u||e.slice(),u[s]=a)}return u}if(!1!==r.schema&&i.isSchema(e)||!1!==r.ref&&l.isRef(e)){const s=r.each(e,n(n({},t),{},{path:o,key:a}));if(s===e)return;return s}for(const s in e){if(\"_\"===s[0])continue;const n=c.scan(e[s],t,r,[s,...o],a);void 0!==n&&(u=u||Object.assign({},e),u[s]=n)}return u}},6133:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(8571),l=r(9621),c=r(8160);let u;const f={symbol:Symbol(\"ref\"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:\".\",type:\"value\"}};t.create=function(e,t={}){o(\"string\"==typeof e,\"Invalid reference key:\",e),c.assertOptions(t,[\"adjust\",\"ancestor\",\"in\",\"iterables\",\"map\",\"prefix\",\"render\",\"separator\"]),o(!t.prefix||\"object\"==typeof t.prefix,\"options.prefix must be of type object\");const r=Object.assign({},f.defaults,t);delete r.prefix;const s=r.separator,n=f.context(e,s,t.prefix);if(r.type=n.type,e=n.key,\"value\"===r.type)if(n.root&&(o(!s||e[0]!==s,\"Cannot specify relative path with root prefix\"),r.ancestor=\"root\",e||(e=null)),s&&s===e)e=null,r.ancestor=0;else if(void 0!==r.ancestor)o(!s||!e||e[0]!==s,\"Cannot combine prefix with ancestor option\");else{const[t,n]=f.ancestor(e,s);n&&\"\"===(e=e.slice(n))&&(e=null),r.ancestor=t}return r.path=s?null===e?[]:e.split(s):[e],new f.Ref(r)},t.in=function(e,r={}){return t.create(e,n(n({},r),{},{in:!0}))},t.isRef=function(e){return!!e&&!!e[c.symbols.ref]},f.Ref=class{constructor(e){o(\"object\"==typeof e,\"Invalid reference construction\"),c.assertOptions(e,[\"adjust\",\"ancestor\",\"in\",\"iterables\",\"map\",\"path\",\"render\",\"separator\",\"type\",\"depth\",\"key\",\"root\",\"display\"]),o([!1,void 0].includes(e.separator)||\"string\"==typeof e.separator&&1===e.separator.length,\"Invalid separator\"),o(!e.adjust||\"function\"==typeof e.adjust,\"options.adjust must be a function\"),o(!e.map||Array.isArray(e.map),\"options.map must be an array\"),o(!e.map||!e.adjust,\"Cannot set both map and adjust options\"),Object.assign(this,f.defaults,e),o(\"value\"===this.type||void 0===this.ancestor,\"Non-value references cannot reference ancestors\"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(e,t,r,s,n={}){return o(!this.in||n.in,\"Invalid in() reference usage\"),\"global\"===this.type?this._resolve(r.context,t,n):\"local\"===this.type?this._resolve(s,t,n):this.ancestor?\"root\"===this.ancestor?this._resolve(t.ancestors[t.ancestors.length-1],t,n):(o(this.ancestor<=t.ancestors.length,\"Invalid reference exceeds the schema root:\",this.display),this._resolve(t.ancestors[this.ancestor-1],t,n)):this._resolve(e,t,n)}_resolve(e,t,r){let s;if(\"value\"===this.type&&t.mainstay.shadow&&!1!==r.shadow&&(s=t.mainstay.shadow.get(this.absolute(t))),void 0===s&&(s=l(e,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(s=this.adjust(s)),this.map){const e=this.map.get(s);void 0!==e&&(s=e)}return t.mainstay&&t.mainstay.tracer.resolve(t,this,s),s}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new f.Ref(this)}describe(){const e={path:this.path};\"value\"!==this.type&&(e.type=this.type),\".\"!==this.separator&&(e.separator=this.separator),\"value\"===this.type&&1!==this.ancestor&&(e.ancestor=this.ancestor),this.map&&(e.map=[...this.map]);for(const t of[\"adjust\",\"iterables\",\"render\"])null!==this[t]&&void 0!==this[t]&&(e[t]=this[t]);return!1!==this.in&&(e.in=!0),{ref:e}}updateDisplay(){const e=null!==this.key?this.key:\"\";if(\"value\"!==this.type)return void(this.display=\"ref:\".concat(this.type,\":\").concat(e));if(!this.separator)return void(this.display=\"ref:\".concat(e));if(!this.ancestor)return void(this.display=\"ref:\".concat(this.separator).concat(e));if(\"root\"===this.ancestor)return void(this.display=\"ref:root:\".concat(e));if(1===this.ancestor)return void(this.display=\"ref:\".concat(e||\"..\"));const t=new Array(this.ancestor+1).fill(this.separator).join(\"\");this.display=\"ref:\".concat(t).concat(e||\"\")}},f.Ref.prototype[c.symbols.ref]=!0,t.build=function(e){return\"value\"===(e=Object.assign({},f.defaults,e)).type&&void 0===e.ancestor&&(e.ancestor=1),new f.Ref(e)},f.context=function(e,t,r={}){if(e=e.trim(),r){const s=void 0===r.global?\"$\":r.global;if(s!==t&&e.startsWith(s))return{key:e.slice(s.length),type:\"global\"};const n=void 0===r.local?\"#\":r.local;if(n!==t&&e.startsWith(n))return{key:e.slice(n.length),type:\"local\"};const a=void 0===r.root?\"/\":r.root;if(a!==t&&e.startsWith(a))return{key:e.slice(a.length),type:\"value\",root:!0}}return{key:e,type:\"value\"}},f.ancestor=function(e,t){if(!t)return[1,0];if(e[0]!==t)return[1,0];if(e[1]!==t)return[0,1];let r=2;for(;e[r]===t;)++r;return[r-1,r]},t.toSibling=0,t.toParent=1,t.Manager=class{constructor(){this.refs=[]}register(e,s){if(e)if(s=void 0===s?t.toParent:s,Array.isArray(e))for(const t of e)this.register(t,s);else if(c.isSchema(e))for(const t of e._refs.refs)t.ancestor-s>=0&&this.refs.push({ancestor:t.ancestor-s,root:t.root});else t.isRef(e)&&\"value\"===e.type&&e.ancestor-s>=0&&this.refs.push({ancestor:e.ancestor-s,root:e.root}),u=u||r(3328),u.isTemplate(e)&&this.register(e.refs(),s)}get length(){return this.refs.length}clone(){const e=new t.Manager;return e.refs=i(this.refs),e}reset(){this.refs=[]}roots(){return this.refs.filter((e=>!e.ancestor)).map((e=>e.root))}}},3378:(e,t,r)=>{\"use strict\";const s=r(5107),n={};n.wrap=s.string().min(1).max(2).allow(!1),t.preferences=s.object({allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),context:s.object(),convert:s.boolean(),dateFormat:s.valid(\"date\",\"iso\",\"string\",\"time\",\"utc\"),debug:s.boolean(),errors:{escapeHtml:s.boolean(),label:s.valid(\"path\",\"key\",!1),language:[s.string(),s.object().ref()],render:s.boolean(),stack:s.boolean(),wrap:{label:n.wrap,array:n.wrap,string:n.wrap}},externals:s.boolean(),messages:s.object(),noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:s.valid(\"required\",\"optional\",\"forbidden\"),skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or(\"arrays\",\"objects\").allow(!0,!1),warnings:s.boolean()}).strict(),n.nameRx=/^[a-zA-Z0-9]\\w*$/,n.rule=s.object({alias:s.array().items(s.string().pattern(n.nameRx)).single(),args:s.array().items(s.string(),s.object({name:s.string().pattern(n.nameRx).required(),ref:s.boolean(),assert:s.alternatives([s.function(),s.object().schema()]).conditional(\"ref\",{is:!0,then:s.required()}),normalize:s.function(),message:s.string().when(\"assert\",{is:s.function(),then:s.required()})})),convert:s.boolean(),manifest:s.boolean(),method:s.function().allow(!1),multi:s.boolean(),validate:s.function()}),t.extension=s.object({type:s.alternatives([s.string(),s.object().regex()]).required(),args:s.function(),cast:s.object().pattern(n.nameRx,s.object({from:s.function().maxArity(1).required(),to:s.function().minArity(1).maxArity(2).required()})),base:s.object().schema().when(\"type\",{is:s.object().regex(),then:s.forbidden()}),coerce:[s.function().maxArity(3),s.object({method:s.function().maxArity(3).required(),from:s.array().items(s.string()).single()})],flags:s.object().pattern(n.nameRx,s.object({setter:s.string(),default:s.any()})),manifest:{build:s.function().arity(2)},messages:[s.object(),s.string()],modifiers:s.object().pattern(n.nameRx,s.function().minArity(1).maxArity(2)),overrides:s.object().pattern(n.nameRx,s.function()),prepare:s.function().maxArity(3),rebuild:s.function().arity(1),rules:s.object().pattern(n.nameRx,n.rule),terms:s.object().pattern(n.nameRx,s.object({init:s.array().allow(null).required(),manifest:s.object().pattern(/.+/,[s.valid(\"schema\",\"single\"),s.object({mapped:s.object({from:s.string().required(),to:s.string().required()}).required()})])})),validate:s.function().maxArity(3)}).strict(),t.extensions=s.array().items(s.object(),s.function().arity(1)).strict(),n.desc={buffer:s.object({buffer:s.string()}),func:s.object({function:s.function().required(),options:{literal:!0}}),override:s.object({override:!0}),ref:s.object({ref:s.object({type:s.valid(\"value\",\"global\",\"local\"),path:s.array().required(),separator:s.string().length(1).allow(!1),ancestor:s.number().min(0).integer().allow(\"root\"),map:s.array().items(s.array().length(2)).min(1),adjust:s.function(),iterables:s.boolean(),in:s.boolean(),render:s.boolean()}).required()}),regex:s.object({regex:s.string().min(3)}),special:s.object({special:s.valid(\"deep\").required()}),template:s.object({template:s.string().required(),options:s.object()}),value:s.object({value:s.alternatives([s.object(),s.array()]).required()})},n.desc.entity=s.alternatives([s.array().items(s.link(\"...\")),s.boolean(),s.function(),s.number(),s.string(),n.desc.buffer,n.desc.func,n.desc.ref,n.desc.regex,n.desc.special,n.desc.template,n.desc.value,s.link(\"/\")]),n.desc.values=s.array().items(null,s.boolean(),s.function(),s.number().allow(1/0,-1/0),s.string().allow(\"\"),s.symbol(),n.desc.buffer,n.desc.func,n.desc.override,n.desc.ref,n.desc.regex,n.desc.template,n.desc.value),n.desc.messages=s.object().pattern(/.+/,[s.string(),n.desc.template,s.object().pattern(/.+/,[s.string(),n.desc.template])]),t.description=s.object({type:s.string().required(),flags:s.object({cast:s.string(),default:s.any(),description:s.string(),empty:s.link(\"/\"),failover:n.desc.entity,id:s.string(),label:s.string(),only:!0,presence:[\"optional\",\"required\",\"forbidden\"],result:[\"raw\",\"strip\"],strip:s.boolean(),unit:s.string()}).unknown(),preferences:{allowUnknown:s.boolean(),abortEarly:s.boolean(),artifacts:s.boolean(),cache:s.boolean(),convert:s.boolean(),dateFormat:[\"date\",\"iso\",\"string\",\"time\",\"utc\"],errors:{escapeHtml:s.boolean(),label:[\"path\",\"key\"],language:[s.string(),n.desc.ref],wrap:{label:n.wrap,array:n.wrap}},externals:s.boolean(),messages:n.desc.messages,noDefaults:s.boolean(),nonEnumerables:s.boolean(),presence:[\"required\",\"optional\",\"forbidden\"],skipFunctions:s.boolean(),stripUnknown:s.object({arrays:s.boolean(),objects:s.boolean()}).or(\"arrays\",\"objects\").allow(!0,!1),warnings:s.boolean()},allow:n.desc.values,invalid:n.desc.values,rules:s.array().min(1).items({name:s.string().required(),args:s.object().min(1),keep:s.boolean(),message:[s.string(),n.desc.messages],warn:s.boolean()}),keys:s.object().pattern(/.*/,s.link(\"/\")),link:n.desc.ref}).pattern(/^[a-z]\\w*$/,s.any())},493:(e,t,r)=>{\"use strict\";const s=r(8571),n=r(9621),a=r(8160),o={value:Symbol(\"value\")};e.exports=o.State=class{constructor(e,t,r){this.path=e,this.ancestors=t,this.mainstay=r.mainstay,this.schemas=r.schemas,this.debug=null}localize(e,t=null,r=null){const s=new o.State(e,t,this);return r&&s.schemas&&(s.schemas=[o.schemas(r),...s.schemas]),s}nest(e,t){const r=new o.State(this.path,this.ancestors,this);return r.schemas=r.schemas&&[o.schemas(e),...r.schemas],r.debug=t,r}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new o.Shadow,this.mainstay.shadow.set(this.path,e,t)}snapshot(){this.mainstay.shadow&&(this._snapshot=s(this.mainstay.shadow.node(this.path)))}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0)}},o.schemas=function(e){return a.isSchema(e)?{schema:e}:e},o.Shadow=class{constructor(){this._values=null}set(e,t,r){if(!e.length)return;if(\"strip\"===r&&\"number\"==typeof e[e.length-1])return;this._values=this._values||new Map;let s=this._values;for(let t=0;t<e.length;++t){const r=e[t];let n=s.get(r);n||(n=new Map,s.set(r,n)),s=n}s[o.value]=t}get(e){const t=this.node(e);if(t)return t[o.value]}node(e){if(this._values)return n(this._values,e,{iterables:!0})}override(e,t){if(!this._values)return;const r=e.slice(0,-1),s=e[e.length-1],a=n(this._values,r,{iterables:!0});t?a.set(s,t):a&&a.delete(s)}}},3328:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(8571),l=r(5277),c=r(1447),u=r(8160),f=r(6354),m=r(6133),h={symbol:Symbol(\"template\"),opens:new Array(1e3).join(\"\\0\"),closes:new Array(1e3).join(\"\u0001\"),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=h.Template=class{constructor(e,t){o(\"string\"==typeof e,\"Template source must be a string\"),o(!e.includes(\"\\0\")&&!e.includes(\"\u0001\"),\"Template source cannot contain reserved control characters\"),this.source=e,this.rendered=e,this._template=null,this._settings=i(t),this._parse()}_parse(){if(!this.source.includes(\"{\"))return;const e=h.encode(this.source),t=h.split(e);let r=!1;const s=[],n=t.shift();n&&s.push(n);for(const e of t){const t=\"{\"!==e[0],n=t?\"}\":\"}}\",a=e.indexOf(n);if(-1===a||\"{\"===e[1]){s.push(\"{\".concat(h.decode(e)));continue}let o=e.slice(t?0:1,a);const i=\":\"===o[0];i&&(o=o.slice(1));const l=this._ref(h.decode(o),{raw:t,wrapped:i});s.push(l),\"string\"!=typeof l&&(r=!0);const c=e.slice(a+n.length);c&&s.push(h.decode(c))}r?this._template=s:this.rendered=s.join(\"\")}static date(e,t){return h.dateFormat[t.dateFormat].call(e)}describe(e={}){if(!this._settings&&e.compact)return this.source;const t={template:this.source};return this._settings&&(t.options=this._settings),t}static build(e){return new h.Template(e.template,e.options)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[u.symbols.template]}refs(){if(!this._template)return;const e=[];for(const t of this._template)\"string\"!=typeof t&&e.push(...t.refs);return e}resolve(e,t,r,s){return this._template&&1===this._template.length?this._part(this._template[0],e,t,r,s,{}):this.render(e,t,r,s)}_part(e,...t){return e.ref?e.ref.resolve(...t):e.formula.evaluate(t)}render(e,t,r,s,n={}){if(!this.isDynamic())return this.rendered;const a=[];for(const o of this._template)if(\"string\"==typeof o)a.push(o);else{const i=this._part(o,e,t,r,s,n),c=h.stringify(i,e,t,r,s,n);if(void 0!==c){const e=o.raw||!1===(n.errors&&n.errors.escapeHtml)?c:l(c);a.push(h.wrap(e,o.wrapped&&r.errors.wrap.label))}}return a.join(\"\")}_ref(e,{raw:t,wrapped:r}){const s=[],n=e=>{const t=m.create(e,this._settings);return s.push(t),e=>t.resolve(...e)};try{var a=new c.Parser(e,{reference:n,functions:h.functions,constants:h.constants})}catch(t){throw t.message='Invalid template variable \"'.concat(e,'\" fails due to: ').concat(t.message),t}if(a.single){if(\"reference\"===a.single.type){const e=s[0];return{ref:e,raw:t,refs:s,wrapped:r||\"local\"===e.type&&\"label\"===e.key}}return h.stringify(a.single.value)}return{formula:a,raw:t,refs:s}}toString(){return this.source}},h.Template.prototype[u.symbols.template]=!0,h.Template.prototype.isImmutable=!0,h.encode=function(e){return e.replace(/\\\\(\\{+)/g,((e,t)=>h.opens.slice(0,t.length))).replace(/\\\\(\\}+)/g,((e,t)=>h.closes.slice(0,t.length)))},h.decode=function(e){return e.replace(/\\u0000/g,\"{\").replace(/\\u0001/g,\"}\")},h.split=function(e){const t=[];let r=\"\";for(let s=0;s<e.length;++s){const n=e[s];if(\"{\"===n){let n=\"\";for(;s+1<e.length&&\"{\"===e[s+1];)n+=\"{\",++s;t.push(r),r=n}else r+=n}return t.push(r),t},h.wrap=function(e,t){return t?1===t.length?\"\".concat(t).concat(e).concat(t):\"\".concat(t[0]).concat(e).concat(t[1]):e},h.stringify=function(e,t,r,s,a,o={}){const i=typeof e,l=s&&s.errors&&s.errors.wrap||{};let c=!1;if(m.isRef(e)&&e.render&&(c=e.in,e=e.resolve(t,r,s,a,n({in:e.in},o))),null===e)return\"null\";if(\"string\"===i)return h.wrap(e,o.arrayItems&&l.string);if(\"number\"===i||\"function\"===i||\"symbol\"===i)return e.toString();if(\"object\"!==i)return JSON.stringify(e);if(e instanceof Date)return h.Template.date(e,s);if(e instanceof Map){const t=[];for(const[r,s]of e.entries())t.push(\"\".concat(r.toString(),\" -> \").concat(s.toString()));e=t}if(!Array.isArray(e))return e.toString();const u=[];for(const i of e)u.push(h.stringify(i,t,r,s,a,n({arrayItems:!0},o)));return h.wrap(u.join(\", \"),!c&&l.array)},h.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},h.functions={if:(e,t,r)=>e?t:r,length:e=>\"string\"==typeof e?e.length:e&&\"object\"==typeof e?Array.isArray(e)?e.length:Object.keys(e).length:null,msg(e){const[t,r,s,n,a]=this,o=a.messages;if(!o)return\"\";const i=f.template(t,o[0],e,r,s)||f.template(t,o[1],e,r,s);return i?i.render(t,r,s,n,a):\"\"},number:e=>\"number\"==typeof e?e:\"string\"==typeof e?parseFloat(e):\"boolean\"==typeof e?e?1:0:e instanceof Date?e.getTime():null}},4946:(e,t,r)=>{\"use strict\";const s=r(375),n=r(1687),a=r(8068),o=r(8160),i=r(3292),l=r(6354),c=r(6133),u={};e.exports=a.extend({type:\"alternatives\",flags:{match:{default:\"any\"}},terms:{matches:{init:[],register:c.toSibling}},args:(e,...t)=>1===t.length&&Array.isArray(t[0])?e.try(...t[0]):e.try(...t),validate(e,t){const{schema:r,error:s,state:a,prefs:o}=t;if(r._flags.match){const t=[],i=[];for(let s=0;s<r.$_terms.matches.length;++s){const n=r.$_terms.matches[s],l=a.nest(n.schema,\"match.\".concat(s));l.snapshot();const c=n.schema.$_validate(e,l,o);c.errors?(i.push(c.errors),l.restore()):t.push(c.value)}if(0===t.length)return{errors:s(\"alternatives.any\",{details:i.map((e=>l.details(e,{override:!1})))})};if(\"one\"===r._flags.match)return 1===t.length?{value:t[0]}:{errors:s(\"alternatives.one\")};if(t.length!==r.$_terms.matches.length)return{errors:s(\"alternatives.all\",{details:i.map((e=>l.details(e,{override:!1})))})};const c=e=>e.$_terms.matches.some((e=>\"object\"===e.schema.type||\"alternatives\"===e.schema.type&&c(e.schema)));return c(r)?{value:t.reduce(((e,t)=>n(e,t,{mergeArrays:!1})))}:{value:t[t.length-1]}}const i=[];for(let t=0;t<r.$_terms.matches.length;++t){const s=r.$_terms.matches[t];if(s.schema){const r=a.nest(s.schema,\"match.\".concat(t));r.snapshot();const n=s.schema.$_validate(e,r,o);if(!n.errors)return n;r.restore(),i.push({schema:s.schema,reports:n.errors});continue}const n=s.ref?s.ref.resolve(e,a,o):e,l=s.is?[s]:s.switch;for(let r=0;r<l.length;++r){const i=l[r],{is:c,then:u,otherwise:f}=i,m=\"match.\".concat(t).concat(s.switch?\".\"+r:\"\");if(c.$_match(n,a.nest(c,\"\".concat(m,\".is\")),o)){if(u)return u.$_validate(e,a.nest(u,\"\".concat(m,\".then\")),o)}else if(f)return f.$_validate(e,a.nest(f,\"\".concat(m,\".otherwise\")),o)}}return u.errors(i,t)},rules:{conditional:{method(e,t){s(!this._flags._endedSwitch,\"Unreachable condition\"),s(!this._flags.match,\"Cannot combine match mode\",this._flags.match,\"with conditional rule\"),s(void 0===t.break,\"Cannot use break option with alternatives conditional\");const r=this.clone(),n=i.when(r,e,t),a=n.is?[n]:n.switch;for(const e of a)if(e.then&&e.otherwise){r.$_setFlag(\"_endedSwitch\",!0,{clone:!1});break}return r.$_terms.matches.push(n),r.$_mutateRebuild()}},match:{method(e){if(s([\"any\",\"one\",\"all\"].includes(e),\"Invalid alternatives match mode\",e),\"any\"!==e)for(const t of this.$_terms.matches)s(t.schema,\"Cannot combine match mode\",e,\"with conditional rules\");return this.$_setFlag(\"match\",e)}},try:{method(...e){s(e.length,\"Missing alternative schemas\"),o.verifyFlat(e,\"try\"),s(!this._flags._endedSwitch,\"Unreachable condition\");const t=this.clone();for(const r of e)t.$_terms.matches.push({schema:t.$_compile(r)});return t.$_mutateRebuild()}}},overrides:{label(e){return this.$_parent(\"label\",e).$_modify({each:(t,r)=>\"is\"!==r.path[0]?t.label(e):void 0,ref:!1})}},rebuild(e){e.$_modify({each:t=>{o.isSchema(t)&&\"array\"===t.type&&e.$_setFlag(\"_arrayItems\",!0,{clone:!1})}})},manifest:{build(e,t){if(t.matches)for(const r of t.matches){const{schema:t,ref:s,is:n,not:a,then:o,otherwise:i}=r;e=t?e.try(t):s?e.conditional(s,{is:n,then:o,not:a,otherwise:i,switch:r.switch}):e.conditional(n,{then:o,otherwise:i})}return e}},messages:{\"alternatives.all\":\"{{#label}} does not match all of the required types\",\"alternatives.any\":\"{{#label}} does not match any of the allowed types\",\"alternatives.match\":\"{{#label}} does not match any of the allowed types\",\"alternatives.one\":\"{{#label}} matches more than one allowed type\",\"alternatives.types\":\"{{#label}} must be one of {{#types}}\"}}),u.errors=function(e,{error:t,state:r}){if(!e.length)return{errors:t(\"alternatives.any\")};if(1===e.length)return{errors:e[0].reports};const s=new Set,n=[];for(const{reports:a,schema:o}of e){if(a.length>1)return u.unmatched(e,t);const i=a[0];if(i instanceof l.Report==0)return u.unmatched(e,t);if(i.state.path.length!==r.path.length){n.push({type:o.type,report:i});continue}if(\"any.only\"===i.code){for(const e of i.local.valids)s.add(e);continue}const[c,f]=i.code.split(\".\");\"base\"===f?s.add(c):n.push({type:o.type,report:i})}return n.length?1===n.length?{errors:n[0].report}:u.unmatched(e,t):{errors:t(\"alternatives.types\",{types:[...s]})}},u.unmatched=function(e,t){const r=[];for(const t of e)r.push(...t.reports);return{errors:t(\"alternatives.match\",l.details(r,{override:!1}))}}},8068:(e,t,r)=>{\"use strict\";const s=r(375),n=r(7629),a=r(8160),o=r(6914);e.exports=n.extend({type:\"any\",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){return s(\"function\"==typeof e,\"Method must be a function\"),s(void 0===t||t&&\"string\"==typeof t,\"Description must be a non-empty string\"),this.$_addRule({name:\"custom\",args:{method:e,description:t}})},validate(e,t,{method:r}){try{return r(e,t)}catch(e){return t.error(\"any.custom\",{error:e})}},args:[\"method\",\"description\"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){s(a.isSchema(e)&&e._flags.id,\"Schema must be a schema with an id\");const t=this.clone();return t.$_terms.shared=t.$_terms.shared||[],t.$_terms.shared.push(e),t.$_mutateRegister(e),t}},warning:{method(e,t){return s(e&&\"string\"==typeof e,\"Invalid warning code\"),this.$_addRule({name:\"warning\",args:{code:e,local:t},warn:!0})},validate:(e,t,{code:r,local:s})=>t.error(r,s),args:[\"code\",\"local\"],multi:!0}},modifiers:{keep(e,t=!0){e.keep=t},message(e,t){e.message=o.compile(t)},warn(e,t=!0){e.warn=t}},manifest:{build(e,t){for(const r in t){const s=t[r];if([\"examples\",\"externals\",\"metas\",\"notes\",\"tags\"].includes(r))for(const t of s)e=e[r.slice(0,-1)](t);else if(\"alterations\"!==r)if(\"whens\"!==r){if(\"shared\"===r)for(const t of s)e=e.shared(t)}else for(const t of s){const{ref:r,is:s,not:n,then:a,otherwise:o,concat:i}=t;e=i?e.concat(i):r?e.when(r,{is:s,not:n,then:a,otherwise:o,switch:t.switch,break:t.break}):e.when(s,{then:a,otherwise:o,break:t.break})}else{const t={};for(const{target:e,adjuster:r}of s)t[e]=r;e=e.alter(t)}}return e}},messages:{\"any.custom\":\"{{#label}} failed custom validation because {{#error.message}}\",\"any.default\":\"{{#label}} threw an error when running default method\",\"any.failover\":\"{{#label}} threw an error when running failover method\",\"any.invalid\":\"{{#label}} contains an invalid value\",\"any.only\":'{{#label}} must be {if(#valids.length == 1, \"\", \"one of \")}{{#valids}}',\"any.ref\":\"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}\",\"any.required\":\"{{#label}} is required\",\"any.unknown\":\"{{#label}} is not allowed\"}})},546:(e,t,r)=>{\"use strict\";const s=r(375),n=r(9474),a=r(9621),o=r(8068),i=r(8160),l=r(3292),c={};e.exports=o.extend({type:\"array\",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:\"schema\"},ordered:{init:[],manifest:\"schema\"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:\"object\",method(e,{schema:t,state:r,prefs:s}){if(!Array.isArray(e))return;const n=t.$_getRule(\"sort\");return n?c.sort(t,e,n.args.options,r,s):void 0}},validate(e,{schema:t,error:r}){if(!Array.isArray(e)){if(t._flags.single){const t=[e];return t[i.symbols.arraySingle]=!0,{value:t}}return{errors:r(\"array.base\")}}if(t.$_getRule(\"items\")||t.$_terms.externals)return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:!0});const t=this.$_addRule({name:\"has\",args:{schema:e}});return t.$_mutateRegister(e),t},validate(e,{state:t,prefs:r,error:s},{schema:n}){const a=[e,...t.ancestors];for(let s=0;s<e.length;++s){const o=t.localize([...t.path,s],a,n);if(n.$_match(e[s],o,r))return e}const o=n._flags.label;return o?s(\"array.hasKnown\",{patternLabel:o}):s(\"array.hasUnknown\",null)},multi:!0},items:{method(...e){i.verifyFlat(e,\"items\");const t=this.$_addRule(\"items\");for(let r=0;r<e.length;++r){const s=i.tryWithPath((()=>this.$_compile(e[r])),r,{append:!0});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(e,{schema:t,error:r,state:s,prefs:n,errorsArray:a}){const o=t.$_terms._requireds.slice(),l=t.$_terms.ordered.slice(),u=[...t.$_terms._inclusions,...o],f=!e[i.symbols.arraySingle];delete e[i.symbols.arraySingle];const m=a();let h=e.length;for(let a=0;a<h;++a){const i=e[a];let d=!1,p=!1;const g=f?a:new Number(a),y=[...s.path,g];if(!t._flags.sparse&&void 0===i){if(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),n.abortEarly)return m;l.shift();continue}const b=[e,...s.ancestors];for(const e of t.$_terms._exclusions)if(e.$_match(i,s.localize(y,b,e),n,{presence:\"ignore\"})){if(m.push(r(\"array.excludes\",{pos:a,value:i},s.localize(y))),n.abortEarly)return m;d=!0,l.shift();break}if(d)continue;if(t.$_terms.ordered.length){if(l.length){const o=l.shift(),u=o.$_validate(i,s.localize(y,b,o),n);if(u.errors){if(m.push(...u.errors),n.abortEarly)return m}else if(\"strip\"===o._flags.result)c.fastSplice(e,a),--a,--h;else{if(!t._flags.sparse&&void 0===u.value){if(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),n.abortEarly)return m;continue}e[a]=u.value}continue}if(!t.$_terms.items.length){if(m.push(r(\"array.orderedLength\",{pos:a,limit:t.$_terms.ordered.length})),n.abortEarly)return m;break}}const v=[];let _=o.length;for(let l=0;l<_;++l){const u=s.localize(y,b,o[l]);u.snapshot();const f=o[l].$_validate(i,u,n);if(v[l]=f,!f.errors){if(e[a]=f.value,p=!0,c.fastSplice(o,l),--l,--_,!t._flags.sparse&&void 0===f.value&&(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),n.abortEarly))return m;break}u.restore()}if(p)continue;const w=n.stripUnknown&&!!n.stripUnknown.arrays||!1;_=u.length;for(const l of u){let u;const f=o.indexOf(l);if(-1!==f)u=v[f];else{const o=s.localize(y,b,l);if(o.snapshot(),u=l.$_validate(i,o,n),!u.errors){\"strip\"===l._flags.result?(c.fastSplice(e,a),--a,--h):t._flags.sparse||void 0!==u.value?e[a]=u.value:(m.push(r(\"array.sparse\",{key:g,path:y,pos:a,value:void 0},s.localize(y))),d=!0),p=!0;break}o.restore()}if(1===_){if(w){c.fastSplice(e,a),--a,--h,p=!0;break}if(m.push(...u.errors),n.abortEarly)return m;d=!0;break}}if(!d&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!p){if(w){c.fastSplice(e,a),--a,--h;continue}if(m.push(r(\"array.includes\",{pos:a,value:i},s.localize(y))),n.abortEarly)return m}}return o.length&&c.fillMissedErrors(t,m,o,e,s,n),l.length&&(c.fillOrderedErrors(t,m,l,e,s,n),m.length||c.fillDefault(l,e,s,n)),m.length?m:e},priority:!0,manifest:!1},length:{method(e){return this.$_addRule({name:\"length\",args:{limit:e},operator:\"=\"})},validate:(e,t,{limit:r},{name:s,operator:n,args:a})=>i.compare(e.length,r,n)?e:t.error(\"array.\"+s,{limit:a.limit,value:e}),args:[{name:\"limit\",ref:!0,assert:i.limit,message:\"must be a positive integer\"}]},max:{method(e){return this.$_addRule({name:\"max\",method:\"length\",args:{limit:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"length\",args:{limit:e},operator:\">=\"})}},ordered:{method(...e){i.verifyFlat(e,\"ordered\");const t=this.$_addRule(\"items\");for(let r=0;r<e.length;++r){const s=i.tryWithPath((()=>this.$_compile(e[r])),r,{append:!0});c.validateSingle(s,t),t.$_mutateRegister(s),t.$_terms.ordered.push(s)}return t.$_mutateRebuild()}},single:{method(e){const t=void 0===e||!!e;return s(!t||!this._flags._arrayItems,\"Cannot specify single rule when array has array items\"),this.$_setFlag(\"single\",t)}},sort:{method(e={}){i.assertOptions(e,[\"by\",\"order\"]);const t={order:e.order||\"ascending\"};return e.by&&(t.by=l.ref(e.by,{ancestor:0}),s(!t.by.ancestor,\"Cannot sort by ancestor\")),this.$_addRule({name:\"sort\",args:{options:t}})},validate(e,{error:t,state:r,prefs:s,schema:n},{options:a}){const{value:o,errors:i}=c.sort(n,e,a,r,s);if(i)return i;for(let r=0;r<e.length;++r)if(e[r]!==o[r])return t(\"array.sort\",{order:a.order,by:a.by?a.by.key:\"value\"});return e},convert:!0},sparse:{method(e){const t=void 0===e||!!e;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule(\"items\")).$_setFlag(\"sparse\",t,{clone:!1})}},unique:{method(e,t={}){s(!e||\"function\"==typeof e||\"string\"==typeof e,\"comparator must be a function or a string\"),i.assertOptions(t,[\"ignoreUndefined\",\"separator\"]);const r={name:\"unique\",args:{options:t,comparator:e}};if(e)if(\"string\"==typeof e){const s=i.default(t.separator,\".\");r.path=s?e.split(s):[e]}else r.comparator=e;return this.$_addRule(r)},validate(e,{state:t,error:r,schema:o},{comparator:i,options:l},{comparator:c,path:u}){const f={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},m=c||n,h=l.ignoreUndefined;for(let n=0;n<e.length;++n){const o=u?a(e[n],u):e[n],l=c?f.custom:f[typeof o];if(s(l,\"Failed to find unique map container for type\",typeof o),l instanceof Map){const s=l.entries();let a;for(;!(a=s.next()).done;)if(m(a.value[0],o)){const s=t.localize([...t.path,n],[e,...t.ancestors]),o={pos:n,value:e[n],dupePos:a.value[1],dupeValue:e[a.value[1]]};return u&&(o.path=i),r(\"array.unique\",o,s)}l.set(o,n)}else{if((!h||void 0!==o)&&void 0!==l[o]){const s={pos:n,value:e[n],dupePos:l[o],dupeValue:e[l[o]]};return u&&(s.path=i),r(\"array.unique\",s,t.localize([...t.path,n],[e,...t.ancestors]))}l[o]=n}}return e},args:[\"comparator\",\"options\"],multi:!0}},cast:{set:{from:Array.isArray,to:(e,t)=>new Set(e)}},rebuild(e){e.$_terms._inclusions=[],e.$_terms._exclusions=[],e.$_terms._requireds=[];for(const t of e.$_terms.items)c.validateSingle(t,e),\"required\"===t._flags.presence?e.$_terms._requireds.push(t):\"forbidden\"===t._flags.presence?e.$_terms._exclusions.push(t):e.$_terms._inclusions.push(t);for(const t of e.$_terms.ordered)c.validateSingle(t,e)},manifest:{build:(e,t)=>(t.items&&(e=e.items(...t.items)),t.ordered&&(e=e.ordered(...t.ordered)),e)},messages:{\"array.base\":\"{{#label}} must be an array\",\"array.excludes\":\"{{#label}} contains an excluded value\",\"array.hasKnown\":\"{{#label}} does not contain at least one required match for type {:#patternLabel}\",\"array.hasUnknown\":\"{{#label}} does not contain at least one required match\",\"array.includes\":\"{{#label}} does not match any of the allowed types\",\"array.includesRequiredBoth\":\"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)\",\"array.includesRequiredKnowns\":\"{{#label}} does not contain {{#knownMisses}}\",\"array.includesRequiredUnknowns\":\"{{#label}} does not contain {{#unknownMisses}} required value(s)\",\"array.length\":\"{{#label}} must contain {{#limit}} items\",\"array.max\":\"{{#label}} must contain less than or equal to {{#limit}} items\",\"array.min\":\"{{#label}} must contain at least {{#limit}} items\",\"array.orderedLength\":\"{{#label}} must contain at most {{#limit}} items\",\"array.sort\":\"{{#label}} must be sorted in {#order} order by {{#by}}\",\"array.sort.mismatching\":\"{{#label}} cannot be sorted due to mismatching types\",\"array.sort.unsupported\":\"{{#label}} cannot be sorted due to unsupported type {#type}\",\"array.sparse\":\"{{#label}} must not be a sparse array item\",\"array.unique\":\"{{#label}} contains a duplicate value\"}}),c.fillMissedErrors=function(e,t,r,s,n,a){const o=[];let i=0;for(const e of r){const t=e._flags.label;t?o.push(t):++i}o.length?i?t.push(e.$_createError(\"array.includesRequiredBoth\",s,{knownMisses:o,unknownMisses:i},n,a)):t.push(e.$_createError(\"array.includesRequiredKnowns\",s,{knownMisses:o},n,a)):t.push(e.$_createError(\"array.includesRequiredUnknowns\",s,{unknownMisses:i},n,a))},c.fillOrderedErrors=function(e,t,r,s,n,a){const o=[];for(const e of r)\"required\"===e._flags.presence&&o.push(e);o.length&&c.fillMissedErrors(e,t,o,s,n,a)},c.fillDefault=function(e,t,r,s){const n=[];let a=!0;for(let o=e.length-1;o>=0;--o){const i=e[o],l=[t,...r.ancestors],c=i.$_validate(void 0,r.localize(r.path,l,i),s).value;if(a){if(void 0===c)continue;a=!1}n.unshift(c)}n.length&&t.push(...n)},c.fastSplice=function(e,t){let r=t;for(;r<e.length;)e[r++]=e[r];--e.length},c.validateSingle=function(e,t){(\"array\"===e.type||e._flags._arrayItems)&&(s(!t._flags.single,\"Cannot specify array item with single rule enabled\"),t.$_setFlag(\"_arrayItems\",!0,{clone:!1}))},c.sort=function(e,t,r,s,n){const a=\"ascending\"===r.order?1:-1,o=-1*a,i=a,l=(l,u)=>{let f=c.compare(l,u,o,i);if(null!==f)return f;if(r.by&&(l=r.by.resolve(l,s,n),u=r.by.resolve(u,s,n)),f=c.compare(l,u,o,i),null!==f)return f;const m=typeof l;if(m!==typeof u)throw e.$_createError(\"array.sort.mismatching\",t,null,s,n);if(\"number\"!==m&&\"string\"!==m)throw e.$_createError(\"array.sort.unsupported\",t,{type:m},s,n);return\"number\"===m?(l-u)*a:l<u?o:i};try{return{value:t.slice().sort(l)}}catch(e){return{errors:e}}},c.compare=function(e,t,r,s){return e===t?0:void 0===e?1:void 0===t?-1:null===e?s:null===t?r:null}},4937:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o=r(2036),i={isBool:function(e){return\"boolean\"==typeof e}};e.exports=n.extend({type:\"boolean\",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:\"values\"},truthy:{init:null,manifest:\"values\"}},coerce(e,{schema:t}){if(\"boolean\"!=typeof e){if(\"string\"==typeof e){const r=t._flags.sensitive?e:e.toLowerCase();e=\"true\"===r||\"false\"!==r&&e}return\"boolean\"!=typeof e&&(e=t.$_terms.truthy&&t.$_terms.truthy.has(e,null,null,!t._flags.sensitive)||(!t.$_terms.falsy||!t.$_terms.falsy.has(e,null,null,!t._flags.sensitive))&&e),{value:e}}},validate(e,{error:t}){if(\"boolean\"!=typeof e)return{value:e,errors:t(\"boolean.base\")}},rules:{truthy:{method(...e){a.verifyFlat(e,\"truthy\");const t=this.clone();t.$_terms.truthy=t.$_terms.truthy||new o;for(let r=0;r<e.length;++r){const n=e[r];s(void 0!==n,\"Cannot call truthy with undefined\"),t.$_terms.truthy.add(n)}return t}},falsy:{method(...e){a.verifyFlat(e,\"falsy\");const t=this.clone();t.$_terms.falsy=t.$_terms.falsy||new o;for(let r=0;r<e.length;++r){const n=e[r];s(void 0!==n,\"Cannot call falsy with undefined\"),t.$_terms.falsy.add(n)}return t}},sensitive:{method(e=!0){return this.$_setFlag(\"sensitive\",e)}}},cast:{number:{from:i.isBool,to:(e,t)=>e?1:0},string:{from:i.isBool,to:(e,t)=>e?\"true\":\"false\"}},manifest:{build:(e,t)=>(t.truthy&&(e=e.truthy(...t.truthy)),t.falsy&&(e=e.falsy(...t.falsy)),e)},messages:{\"boolean.base\":\"{{#label}} must be a boolean\"}})},7500:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o=r(3328),i={isDate:function(e){return e instanceof Date}};e.exports=n.extend({type:\"date\",coerce:{from:[\"number\",\"string\"],method:(e,{schema:t})=>({value:i.parse(e,t._flags.format)||e})},validate(e,{schema:t,error:r,prefs:s}){if(e instanceof Date&&!isNaN(e.getTime()))return;const n=t._flags.format;return s.convert&&n&&\"string\"==typeof e?{value:e,errors:r(\"date.format\",{format:n})}:{value:e,errors:r(\"date.base\")}},rules:{compare:{method:!1,validate(e,t,{date:r},{name:s,operator:n,args:o}){const i=\"now\"===r?Date.now():r.getTime();return a.compare(e.getTime(),i,n)?e:t.error(\"date.\"+s,{limit:o.date,value:e})},args:[{name:\"date\",ref:!0,normalize:e=>\"now\"===e?e:i.parse(e),assert:e=>null!==e,message:\"must have a valid date format\"}]},format:{method(e){return s([\"iso\",\"javascript\",\"unix\"].includes(e),\"Unknown date format\",e),this.$_setFlag(\"format\",e)}},greater:{method(e){return this.$_addRule({name:\"greater\",method:\"compare\",args:{date:e},operator:\">\"})}},iso:{method(){return this.format(\"iso\")}},less:{method(e){return this.$_addRule({name:\"less\",method:\"compare\",args:{date:e},operator:\"<\"})}},max:{method(e){return this.$_addRule({name:\"max\",method:\"compare\",args:{date:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"compare\",args:{date:e},operator:\">=\"})}},timestamp:{method(e=\"javascript\"){return s([\"javascript\",\"unix\"].includes(e),'\"type\" must be one of \"javascript, unix\"'),this.format(e)}}},cast:{number:{from:i.isDate,to:(e,t)=>e.getTime()},string:{from:i.isDate,to:(e,{prefs:t})=>o.date(e,t)}},messages:{\"date.base\":\"{{#label}} must be a valid date\",\"date.format\":'{{#label}} must be in {msg(\"date.format.\" + #format) || #format} format',\"date.greater\":\"{{#label}} must be greater than {{:#limit}}\",\"date.less\":\"{{#label}} must be less than {{:#limit}}\",\"date.max\":\"{{#label}} must be less than or equal to {{:#limit}}\",\"date.min\":\"{{#label}} must be greater than or equal to {{:#limit}}\",\"date.format.iso\":\"ISO 8601 date\",\"date.format.javascript\":\"timestamp or number of milliseconds\",\"date.format.unix\":\"timestamp or number of seconds\"}}),i.parse=function(e,t){if(e instanceof Date)return e;if(\"string\"!=typeof e&&(isNaN(e)||!isFinite(e)))return null;if(/^\\s*$/.test(e))return null;if(\"iso\"===t)return a.isIsoDate(e)?i.date(e.toString()):null;const r=e;if(\"string\"==typeof e&&/^[+-]?\\d+(\\.\\d+)?$/.test(e)&&(e=parseFloat(e)),t){if(\"javascript\"===t)return i.date(1*e);if(\"unix\"===t)return i.date(1e3*e);if(\"string\"==typeof r)return null}return i.date(e)},i.date=function(e){const t=new Date(e);return isNaN(t.getTime())?null:t}},390:(e,t,r)=>{\"use strict\";const s=r(375),n=r(7824);e.exports=n.extend({type:\"function\",properties:{typeof:\"function\"},rules:{arity:{method(e){return s(Number.isSafeInteger(e)&&e>=0,\"n must be a positive integer\"),this.$_addRule({name:\"arity\",args:{n:e}})},validate:(e,t,{n:r})=>e.length===r?e:t.error(\"function.arity\",{n:r})},class:{method(){return this.$_addRule(\"class\")},validate:(e,t)=>/^\\s*class\\s/.test(e.toString())?e:t.error(\"function.class\",{value:e})},minArity:{method(e){return s(Number.isSafeInteger(e)&&e>0,\"n must be a strict positive integer\"),this.$_addRule({name:\"minArity\",args:{n:e}})},validate:(e,t,{n:r})=>e.length>=r?e:t.error(\"function.minArity\",{n:r})},maxArity:{method(e){return s(Number.isSafeInteger(e)&&e>=0,\"n must be a positive integer\"),this.$_addRule({name:\"maxArity\",args:{n:e}})},validate:(e,t,{n:r})=>e.length<=r?e:t.error(\"function.maxArity\",{n:r})}},messages:{\"function.arity\":\"{{#label}} must have an arity of {{#n}}\",\"function.class\":\"{{#label}} must be a class\",\"function.maxArity\":\"{{#label}} must have an arity lesser or equal to {{#n}}\",\"function.minArity\":\"{{#label}} must have an arity greater or equal to {{#n}}\"}})},7824:(e,t,r)=>{\"use strict\";const s=r(978),n=r(375),a=r(8571),o=r(3652),i=r(8068),l=r(8160),c=r(3292),u=r(6354),f=r(6133),m=r(3328),h={renameDefaults:{alias:!1,multiple:!1,override:!1}};e.exports=i.extend({type:\"_keys\",properties:{typeof:\"object\"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:\"schema\",to:\"key\"}}},patterns:{init:null},renames:{init:null}},args:(e,t)=>e.keys(t),validate(e,{schema:t,error:r,state:s,prefs:n}){if(!e||typeof e!==t.$_property(\"typeof\")||Array.isArray(e))return{value:e,errors:r(\"object.base\",{type:t.$_property(\"typeof\")})};if(!(t.$_terms.renames||t.$_terms.dependencies||t.$_terms.keys||t.$_terms.patterns||t.$_terms.externals))return;e=h.clone(e,n);const a=[];if(t.$_terms.renames&&!h.rename(t,e,s,n,a))return{value:e,errors:a};if(!t.$_terms.keys&&!t.$_terms.patterns&&!t.$_terms.dependencies)return{value:e,errors:a};const o=new Set(Object.keys(e));if(t.$_terms.keys){const r=[e,...s.ancestors];for(const i of t.$_terms.keys){const t=i.key,l=e[t];o.delete(t);const c=s.localize([...s.path,t],r,i),u=i.schema.$_validate(l,c,n);if(u.errors){if(n.abortEarly)return{value:e,errors:u.errors};void 0!==u.value&&(e[t]=u.value),a.push(...u.errors)}else\"strip\"===i.schema._flags.result||void 0===u.value&&void 0!==l?delete e[t]:void 0!==u.value&&(e[t]=u.value)}}if(o.size||t._flags._hasPatternMatch){const r=h.unknown(t,e,o,a,s,n);if(r)return r}if(t.$_terms.dependencies)for(const r of t.$_terms.dependencies){if(r.key&&void 0===r.key.resolve(e,s,n,null,{shadow:!1}))continue;const o=h.dependencies[r.rel](t,r,e,s,n);if(o){const r=t.$_createError(o.code,e,o.context,s,n);if(n.abortEarly)return{value:e,errors:r};a.push(r)}}return{value:e,errors:a}},rules:{and:{method(...e){return l.verifyFlat(e,\"and\"),h.dependency(this,\"and\",null,e)}},append:{method(e){return null==e||0===Object.keys(e).length?this:this.keys(e)}},assert:{method(e,t,r){m.isTemplate(e)||(e=c.ref(e)),n(void 0===r||\"string\"==typeof r,\"Message must be a string\"),t=this.$_compile(t,{appendPath:!0});const s=this.$_addRule({name:\"assert\",args:{subject:e,schema:t,message:r}});return s.$_mutateRegister(e),s.$_mutateRegister(t),s},validate(e,{error:t,prefs:r,state:s},{subject:n,schema:a,message:o}){const i=n.resolve(e,s,r),l=f.isRef(n)?n.absolute(s):[];return a.$_match(i,s.localize(l,[e,...s.ancestors],a),r)?e:t(\"object.assert\",{subject:n,message:o})},args:[\"subject\",\"schema\",\"message\"],multi:!0},instance:{method(e,t){return n(\"function\"==typeof e,\"constructor must be a function\"),t=t||e.name,this.$_addRule({name:\"instance\",args:{constructor:e,name:t}})},validate:(e,t,{constructor:r,name:s})=>e instanceof r?e:t.error(\"object.instance\",{type:s,value:e}),args:[\"constructor\",\"name\"]},keys:{method(e){n(void 0===e||\"object\"==typeof e,\"Object schema must be a valid object\"),n(!l.isSchema(e),\"Object schema cannot be a joi schema\");const t=this.clone();if(e)if(Object.keys(e).length){t.$_terms.keys=t.$_terms.keys?t.$_terms.keys.filter((t=>!e.hasOwnProperty(t.key))):new h.Keys;for(const r in e)l.tryWithPath((()=>t.$_terms.keys.push({key:r,schema:this.$_compile(e[r])})),r)}else t.$_terms.keys=new h.Keys;else t.$_terms.keys=null;return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:\"length\",args:{limit:e},operator:\"=\"})},validate:(e,t,{limit:r},{name:s,operator:n,args:a})=>l.compare(Object.keys(e).length,r,n)?e:t.error(\"object.\"+s,{limit:a.limit,value:e}),args:[{name:\"limit\",ref:!0,assert:l.limit,message:\"must be a positive integer\"}]},max:{method(e){return this.$_addRule({name:\"max\",method:\"length\",args:{limit:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"length\",args:{limit:e},operator:\">=\"})}},nand:{method(...e){return l.verifyFlat(e,\"nand\"),h.dependency(this,\"nand\",null,e)}},or:{method(...e){return l.verifyFlat(e,\"or\"),h.dependency(this,\"or\",null,e)}},oxor:{method(...e){return h.dependency(this,\"oxor\",null,e)}},pattern:{method(e,t,r={}){const s=e instanceof RegExp;s||(e=this.$_compile(e,{appendPath:!0})),n(void 0!==t,\"Invalid rule\"),l.assertOptions(r,[\"fallthrough\",\"matches\"]),s&&n(!e.flags.includes(\"g\")&&!e.flags.includes(\"y\"),\"pattern should not use global or sticky mode\"),t=this.$_compile(t,{appendPath:!0});const a=this.clone();a.$_terms.patterns=a.$_terms.patterns||[];const o={[s?\"regex\":\"schema\"]:e,rule:t};return r.matches&&(o.matches=this.$_compile(r.matches),\"array\"!==o.matches.type&&(o.matches=o.matches.$_root.array().items(o.matches)),a.$_mutateRegister(o.matches),a.$_setFlag(\"_hasPatternMatch\",!0,{clone:!1})),r.fallthrough&&(o.fallthrough=!0),a.$_terms.patterns.push(o),a.$_mutateRegister(t),a}},ref:{method(){return this.$_addRule(\"ref\")},validate:(e,t)=>f.isRef(e)?e:t.error(\"object.refType\",{value:e})},regex:{method(){return this.$_addRule(\"regex\")},validate:(e,t)=>e instanceof RegExp?e:t.error(\"object.regex\",{value:e})},rename:{method(e,t,r={}){n(\"string\"==typeof e||e instanceof RegExp,\"Rename missing the from argument\"),n(\"string\"==typeof t||t instanceof m,\"Invalid rename to argument\"),n(t!==e,\"Cannot rename key to same name:\",e),l.assertOptions(r,[\"alias\",\"ignoreUndefined\",\"override\",\"multiple\"]);const a=this.clone();a.$_terms.renames=a.$_terms.renames||[];for(const t of a.$_terms.renames)n(t.from!==e,\"Cannot rename the same key multiple times\");return t instanceof m&&a.$_mutateRegister(t),a.$_terms.renames.push({from:e,to:t,options:s(h.renameDefaults,r)}),a}},schema:{method(e=\"any\"){return this.$_addRule({name:\"schema\",args:{type:e}})},validate:(e,t,{type:r})=>!l.isSchema(e)||\"any\"!==r&&e.type!==r?t.error(\"object.schema\",{type:r}):e},unknown:{method(e){return this.$_setFlag(\"unknown\",!1!==e)}},with:{method(e,t,r={}){return h.dependency(this,\"with\",e,t,r)}},without:{method(e,t,r={}){return h.dependency(this,\"without\",e,t,r)}},xor:{method(...e){return l.verifyFlat(e,\"xor\"),h.dependency(this,\"xor\",null,e)}}},overrides:{default(e,t){return void 0===e&&(e=l.symbols.deepDefault),this.$_parent(\"default\",e,t)}},rebuild(e){if(e.$_terms.keys){const t=new o.Sorter;for(const r of e.$_terms.keys)l.tryWithPath((()=>t.add(r,{after:r.schema.$_rootReferences(),group:r.key})),r.key);e.$_terms.keys=new h.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys&&(e=e.keys(t.keys)),t.dependencies)for(const{rel:r,key:s=null,peers:n,options:a}of t.dependencies)e=h.dependency(e,r,s,n,a);if(t.patterns)for(const{regex:r,schema:s,rule:n,fallthrough:a,matches:o}of t.patterns)e=e.pattern(r||s,n,{fallthrough:a,matches:o});if(t.renames)for(const{from:r,to:s,options:n}of t.renames)e=e.rename(r,s,n);return e}},messages:{\"object.and\":\"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}\",\"object.assert\":'{{#label}} is invalid because {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}',\"object.base\":\"{{#label}} must be of type {{#type}}\",\"object.instance\":\"{{#label}} must be an instance of {{:#type}}\",\"object.length\":'{{#label}} must have {{#limit}} key{if(#limit == 1, \"\", \"s\")}',\"object.max\":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, \"\", \"s\")}',\"object.min\":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, \"\", \"s\")}',\"object.missing\":\"{{#label}} must contain at least one of {{#peersWithLabels}}\",\"object.nand\":\"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}\",\"object.oxor\":\"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}\",\"object.pattern.match\":\"{{#label}} keys failed to match pattern requirements\",\"object.refType\":\"{{#label}} must be a Joi reference\",\"object.regex\":\"{{#label}} must be a RegExp object\",\"object.rename.multiple\":\"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}\",\"object.rename.override\":\"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists\",\"object.schema\":\"{{#label}} must be a Joi schema of {{#type}} type\",\"object.unknown\":\"{{#label}} is not allowed\",\"object.with\":\"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}\",\"object.without\":\"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}\",\"object.xor\":\"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}\"}}),h.clone=function(e,t){if(\"object\"==typeof e){if(t.nonEnumerables)return a(e,{shallow:!0});const r=Object.create(Object.getPrototypeOf(e));return Object.assign(r,e),r}const r=function(...t){return e.apply(this,t)};return r.prototype=a(e.prototype),Object.defineProperty(r,\"name\",{value:e.name,writable:!1}),Object.defineProperty(r,\"length\",{value:e.length,writable:!1}),Object.assign(r,e),r},h.dependency=function(e,t,r,s,a){n(null===r||\"string\"==typeof r,t,\"key must be a strings\"),a||(a=s.length>1&&\"object\"==typeof s[s.length-1]?s.pop():{}),l.assertOptions(a,[\"separator\"]),s=[].concat(s);const o=l.default(a.separator,\".\"),i=[];for(const e of s)n(\"string\"==typeof e,t,\"peers must be strings\"),i.push(c.ref(e,{separator:o,ancestor:0,prefix:!1}));null!==r&&(r=c.ref(r,{separator:o,ancestor:0,prefix:!1}));const u=e.clone();return u.$_terms.dependencies=u.$_terms.dependencies||[],u.$_terms.dependencies.push(new h.Dependency(t,r,i,s)),u},h.dependencies={and(e,t,r,s,n){const a=[],o=[],i=t.peers.length;for(const e of t.peers)void 0===e.resolve(r,s,n,null,{shadow:!1})?a.push(e.key):o.push(e.key);if(a.length!==i&&o.length!==i)return{code:\"object.and\",context:{present:o,presentWithLabels:h.keysToLabels(e,o),missing:a,missingWithLabels:h.keysToLabels(e,a)}}},nand(e,t,r,s,n){const a=[];for(const e of t.peers)void 0!==e.resolve(r,s,n,null,{shadow:!1})&&a.push(e.key);if(a.length!==t.peers.length)return;const o=t.paths[0],i=t.paths.slice(1);return{code:\"object.nand\",context:{main:o,mainWithLabel:h.keysToLabels(e,o),peers:i,peersWithLabels:h.keysToLabels(e,i)}}},or(e,t,r,s,n){for(const e of t.peers)if(void 0!==e.resolve(r,s,n,null,{shadow:!1}))return;return{code:\"object.missing\",context:{peers:t.paths,peersWithLabels:h.keysToLabels(e,t.paths)}}},oxor(e,t,r,s,n){const a=[];for(const e of t.peers)void 0!==e.resolve(r,s,n,null,{shadow:!1})&&a.push(e.key);if(!a.length||1===a.length)return;const o={peers:t.paths,peersWithLabels:h.keysToLabels(e,t.paths)};return o.present=a,o.presentWithLabels=h.keysToLabels(e,a),{code:\"object.oxor\",context:o}},with(e,t,r,s,n){for(const a of t.peers)if(void 0===a.resolve(r,s,n,null,{shadow:!1}))return{code:\"object.with\",context:{main:t.key.key,mainWithLabel:h.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:h.keysToLabels(e,a.key)}}},without(e,t,r,s,n){for(const a of t.peers)if(void 0!==a.resolve(r,s,n,null,{shadow:!1}))return{code:\"object.without\",context:{main:t.key.key,mainWithLabel:h.keysToLabels(e,t.key.key),peer:a.key,peerWithLabel:h.keysToLabels(e,a.key)}}},xor(e,t,r,s,n){const a=[];for(const e of t.peers)void 0!==e.resolve(r,s,n,null,{shadow:!1})&&a.push(e.key);if(1===a.length)return;const o={peers:t.paths,peersWithLabels:h.keysToLabels(e,t.paths)};return 0===a.length?{code:\"object.missing\",context:o}:(o.present=a,o.presentWithLabels=h.keysToLabels(e,a),{code:\"object.xor\",context:o})}},h.keysToLabels=function(e,t){return Array.isArray(t)?t.map((t=>e.$_mapLabels(t))):e.$_mapLabels(t)},h.rename=function(e,t,r,s,n){const a={};for(const o of e.$_terms.renames){const i=[],l=\"string\"!=typeof o.from;if(l)for(const e in t){if(void 0===t[e]&&o.options.ignoreUndefined)continue;if(e===o.to)continue;const r=o.from.exec(e);r&&i.push({from:e,to:o.to,match:r})}else!Object.prototype.hasOwnProperty.call(t,o.from)||void 0===t[o.from]&&o.options.ignoreUndefined||i.push(o);for(const c of i){const i=c.from;let u=c.to;if(u instanceof m&&(u=u.render(t,r,s,c.match)),i!==u){if(!o.options.multiple&&a[u]&&(n.push(e.$_createError(\"object.rename.multiple\",t,{from:i,to:u,pattern:l},r,s)),s.abortEarly))return!1;if(Object.prototype.hasOwnProperty.call(t,u)&&!o.options.override&&!a[u]&&(n.push(e.$_createError(\"object.rename.override\",t,{from:i,to:u,pattern:l},r,s)),s.abortEarly))return!1;void 0===t[i]?delete t[u]:t[u]=t[i],a[u]=!0,o.options.alias||delete t[i]}}}return!0},h.unknown=function(e,t,r,s,n,a){if(e.$_terms.patterns){let o=!1;const i=e.$_terms.patterns.map((e=>{if(e.matches)return o=!0,[]})),l=[t,...n.ancestors];for(const o of r){const c=t[o],u=[...n.path,o];for(let f=0;f<e.$_terms.patterns.length;++f){const m=e.$_terms.patterns[f];if(m.regex){const e=m.regex.test(o);if(n.mainstay.tracer.debug(n,\"rule\",\"pattern.\".concat(f),e?\"pass\":\"error\"),!e)continue}else if(!m.schema.$_match(o,n.nest(m.schema,\"pattern.\".concat(f)),a))continue;r.delete(o);const h=n.localize(u,l,{schema:m.rule,key:o}),d=m.rule.$_validate(c,h,a);if(d.errors){if(a.abortEarly)return{value:t,errors:d.errors};s.push(...d.errors)}if(m.matches&&i[f].push(o),t[o]=d.value,!m.fallthrough)break}}if(o)for(let r=0;r<i.length;++r){const o=i[r];if(!o)continue;const c=e.$_terms.patterns[r].matches,f=n.localize(n.path,l,c),m=c.$_validate(o,f,a);if(m.errors){const r=u.details(m.errors,{override:!1});r.matches=o;const i=e.$_createError(\"object.pattern.match\",t,r,n,a);if(a.abortEarly)return{value:t,errors:i};s.push(i)}}}if(r.size&&(e.$_terms.keys||e.$_terms.patterns)){if(a.stripUnknown&&!e._flags.unknown||a.skipFunctions){const e=!(!a.stripUnknown||!0!==a.stripUnknown&&!a.stripUnknown.objects);for(const s of r)e?(delete t[s],r.delete(s)):\"function\"==typeof t[s]&&r.delete(s)}if(!l.default(e._flags.unknown,a.allowUnknown))for(const o of r){const r=n.localize([...n.path,o],[]),i=e.$_createError(\"object.unknown\",t[o],{child:o},r,a,{flags:!1});if(a.abortEarly)return{value:t,errors:i};s.push(i)}}},h.Dependency=class{constructor(e,t,r,s){this.rel=e,this.key=t,this.peers=r,this.paths=s}describe(){const e={rel:this.rel,peers:this.paths};return null!==this.key&&(e.key=this.key.key),\".\"!==this.peers[0].separator&&(e.options={separator:this.peers[0].separator}),e}},h.Keys=class extends Array{concat(e){const t=this.slice(),r=new Map;for(let e=0;e<t.length;++e)r.set(t[e].key,e);for(const s of e){const e=s.key,n=r.get(e);void 0!==n?t[n]={key:e,schema:t[n].schema.concat(s.schema)}:t.push(s)}return t}}},8785:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o=r(3292),i=r(6354),l={};e.exports=n.extend({type:\"link\",properties:{schemaChain:!0},terms:{link:{init:null,manifest:\"single\",register:!1}},args:(e,t)=>e.ref(t),validate(e,{schema:t,state:r,prefs:n}){s(t.$_terms.link,\"Uninitialized link schema\");const a=l.generate(t,e,r,n),o=t.$_terms.link[0].ref;return a.$_validate(e,r.nest(a,\"link:\".concat(o.display,\":\").concat(a.type)),n)},generate:(e,t,r,s)=>l.generate(e,t,r,s),rules:{ref:{method(e){s(!this.$_terms.link,\"Cannot reinitialize schema\"),e=o.ref(e),s(\"value\"===e.type||\"local\"===e.type,\"Invalid reference type:\",e.type),s(\"local\"===e.type||\"root\"===e.ancestor||e.ancestor>0,\"Link cannot reference itself\");const t=this.clone();return t.$_terms.link=[{ref:e}],t}},relative:{method(e=!0){return this.$_setFlag(\"relative\",e)}}},overrides:{concat(e){s(this.$_terms.link,\"Uninitialized link schema\"),s(a.isSchema(e),\"Invalid schema object\"),s(\"link\"!==e.type,\"Cannot merge type link with another link\");const t=this.clone();return t.$_terms.whens||(t.$_terms.whens=[]),t.$_terms.whens.push({concat:e}),t.$_mutateRebuild()}},manifest:{build:(e,t)=>(s(t.link,\"Invalid link description missing link\"),e.ref(t.link))}}),l.generate=function(e,t,r,s){let n=r.mainstay.links.get(e);if(n)return n._generate(t,r,s).schema;const a=e.$_terms.link[0].ref,{perspective:o,path:i}=l.perspective(a,r);l.assert(o,\"which is outside of schema boundaries\",a,e,r,s);try{n=i.length?o.$_reach(i):o}catch(t){l.assert(!1,\"to non-existing schema\",a,e,r,s)}return l.assert(\"link\"!==n.type,\"which is another link\",a,e,r,s),e._flags.relative||r.mainstay.links.set(e,n),n._generate(t,r,s).schema},l.perspective=function(e,t){if(\"local\"===e.type){for(const{schema:r,key:s}of t.schemas){if((r._flags.id||s)===e.path[0])return{perspective:r,path:e.path.slice(1)};if(r.$_terms.shared)for(const t of r.$_terms.shared)if(t._flags.id===e.path[0])return{perspective:t,path:e.path.slice(1)}}return{perspective:null,path:null}}return\"root\"===e.ancestor?{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}:{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}},l.assert=function(e,t,r,n,a,o){e||s(!1,'\"'.concat(i.label(n._flags,a,o),'\" contains link reference \"').concat(r.display,'\" ').concat(t))}},3832:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a=r(8160),o={numberRx:/^\\s*[+-]?(?:(?:\\d+(?:\\.\\d*)?)|(?:\\.\\d+))(?:e([+-]?\\d+))?\\s*$/i,precisionRx:/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/};e.exports=n.extend({type:\"number\",flags:{unsafe:{default:!1}},coerce:{from:\"string\",method(e,{schema:t,error:r}){const s=e.match(o.numberRx);if(!s)return;e=e.trim();const n={value:parseFloat(e)};if(0===n.value&&(n.value=0),!t._flags.unsafe)if(e.match(/e/i)){if(o.normalizeExponent(\"\".concat(n.value/Math.pow(10,s[1]),\"e\").concat(s[1]))!==o.normalizeExponent(e))return n.errors=r(\"number.unsafe\"),n}else{const t=n.value.toString();if(t.match(/e/i))return n;if(t!==o.normalizeDecimal(e))return n.errors=r(\"number.unsafe\"),n}return n}},validate(e,{schema:t,error:r,prefs:s}){if(e===1/0||e===-1/0)return{value:e,errors:r(\"number.infinity\")};if(!a.isNumber(e))return{value:e,errors:r(\"number.base\")};const n={value:e};if(s.convert){const e=t.$_getRule(\"precision\");if(e){const t=Math.pow(10,e.args.limit);n.value=Math.round(n.value*t)/t}}return 0===n.value&&(n.value=0),!t._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(n.errors=r(\"number.unsafe\")),n},rules:{compare:{method:!1,validate:(e,t,{limit:r},{name:s,operator:n,args:o})=>a.compare(e,r,n)?e:t.error(\"number.\"+s,{limit:o.limit,value:e}),args:[{name:\"limit\",ref:!0,assert:a.isNumber,message:\"must be a number\"}]},greater:{method(e){return this.$_addRule({name:\"greater\",method:\"compare\",args:{limit:e},operator:\">\"})}},integer:{method(){return this.$_addRule(\"integer\")},validate:(e,t)=>Math.trunc(e)-e==0?e:t.error(\"number.integer\")},less:{method(e){return this.$_addRule({name:\"less\",method:\"compare\",args:{limit:e},operator:\"<\"})}},max:{method(e){return this.$_addRule({name:\"max\",method:\"compare\",args:{limit:e},operator:\"<=\"})}},min:{method(e){return this.$_addRule({name:\"min\",method:\"compare\",args:{limit:e},operator:\">=\"})}},multiple:{method(e){return this.$_addRule({name:\"multiple\",args:{base:e}})},validate:(e,t,{base:r},s)=>e*(1/r)%1==0?e:t.error(\"number.multiple\",{multiple:s.args.base,value:e}),args:[{name:\"base\",ref:!0,assert:e=>\"number\"==typeof e&&isFinite(e)&&e>0,message:\"must be a positive number\"}],multi:!0},negative:{method(){return this.sign(\"negative\")}},port:{method(){return this.$_addRule(\"port\")},validate:(e,t)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:t.error(\"number.port\")},positive:{method(){return this.sign(\"positive\")}},precision:{method(e){return s(Number.isSafeInteger(e),\"limit must be an integer\"),this.$_addRule({name:\"precision\",args:{limit:e}})},validate(e,t,{limit:r}){const s=e.toString().match(o.precisionRx);return Math.max((s[1]?s[1].length:0)-(s[2]?parseInt(s[2],10):0),0)<=r?e:t.error(\"number.precision\",{limit:r,value:e})},convert:!0},sign:{method(e){return s([\"negative\",\"positive\"].includes(e),\"Invalid sign\",e),this.$_addRule({name:\"sign\",args:{sign:e}})},validate:(e,t,{sign:r})=>\"negative\"===r&&e<0||\"positive\"===r&&e>0?e:t.error(\"number.\".concat(r))},unsafe:{method(e=!0){return s(\"boolean\"==typeof e,\"enabled must be a boolean\"),this.$_setFlag(\"unsafe\",e)}}},cast:{string:{from:e=>\"number\"==typeof e,to:(e,t)=>e.toString()}},messages:{\"number.base\":\"{{#label}} must be a number\",\"number.greater\":\"{{#label}} must be greater than {{#limit}}\",\"number.infinity\":\"{{#label}} cannot be infinity\",\"number.integer\":\"{{#label}} must be an integer\",\"number.less\":\"{{#label}} must be less than {{#limit}}\",\"number.max\":\"{{#label}} must be less than or equal to {{#limit}}\",\"number.min\":\"{{#label}} must be greater than or equal to {{#limit}}\",\"number.multiple\":\"{{#label}} must be a multiple of {{#multiple}}\",\"number.negative\":\"{{#label}} must be a negative number\",\"number.port\":\"{{#label}} must be a valid port\",\"number.positive\":\"{{#label}} must be a positive number\",\"number.precision\":\"{{#label}} must have no more than {{#limit}} decimal places\",\"number.unsafe\":\"{{#label}} must be a safe number\"}}),o.normalizeExponent=function(e){return e.replace(/E/,\"e\").replace(/\\.(\\d*[1-9])?0+e/,\".$1e\").replace(/\\.e/,\"e\").replace(/e\\+/,\"e\").replace(/^\\+/,\"\").replace(/^(-?)0+([1-9])/,\"$1$2\")},o.normalizeDecimal=function(e){return(e=e.replace(/^\\+/,\"\").replace(/\\.0*$/,\"\").replace(/^(-?)\\.([^\\.]*)$/,\"$10.$2\").replace(/^(-?)0+([0-9])/,\"$1$2\")).includes(\".\")&&e.endsWith(\"0\")&&(e=e.replace(/0+$/,\"\")),\"-0\"===e?\"0\":e}},8966:(e,t,r)=>{\"use strict\";const s=r(7824);e.exports=s.extend({type:\"object\",cast:{map:{from:e=>e&&\"object\"==typeof e,to:(e,t)=>new Map(Object.entries(e))}}})},7417:(e,t,r)=>{\"use strict\";function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function n(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const o=r(375),i=r(5380),l=r(1745),c=r(9959),u=r(6064),f=r(9926),m=r(5752),h=r(8068),d=r(8160),p={tlds:f instanceof Set&&{tlds:{allow:f,deny:null}},base64Regex:{true:{true:/^(?:[\\w\\-]{2}[\\w\\-]{2})*(?:[\\w\\-]{2}==|[\\w\\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\\/]{2}[A-Za-z0-9+\\/]{2})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$/},false:{true:/^(?:[\\w\\-]{2}[\\w\\-]{2})*(?:[\\w\\-]{2}(==)?|[\\w\\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\\/]{2}[A-Za-z0-9+\\/]{2})*(?:[A-Za-z0-9+\\/]{2}(==)?|[A-Za-z0-9+\\/]{3}=?)?$/}},dataUriRegex:/^data:[\\w+.-]+\\/[\\w+.-]+;((charset=[\\w-]+|base64),)?(.*)$/,hexRegex:/^[a-f0-9]+$/i,ipRegex:c.regex({cidr:\"forbidden\"}).regex,isoDurationRegex:/^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$/,guidBrackets:{\"{\":\"}\",\"[\":\"]\",\"(\":\")\",\"\":\"\"},guidVersions:{uuidv1:\"1\",uuidv2:\"2\",uuidv3:\"3\",uuidv4:\"4\",uuidv5:\"5\"},guidSeparators:new Set([void 0,!0,!1,\"-\",\":\"]),normalizationForms:[\"NFC\",\"NFD\",\"NFKC\",\"NFKD\"]};e.exports=h.extend({type:\"string\",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:\"string\",method(e,{schema:t,state:r,prefs:s}){const n=t.$_getRule(\"normalize\");n&&(e=e.normalize(n.args.form));const a=t.$_getRule(\"case\");a&&(e=\"upper\"===a.args.direction?e.toLocaleUpperCase():e.toLocaleLowerCase());const o=t.$_getRule(\"trim\");if(o&&o.args.enabled&&(e=e.trim()),t.$_terms.replacements)for(const r of t.$_terms.replacements)e=e.replace(r.pattern,r.replacement);const i=t.$_getRule(\"hex\");if(i&&i.args.options.byteAligned&&e.length%2!=0&&(e=\"0\".concat(e)),t.$_getRule(\"isoDate\")){const t=p.isoDate(e);t&&(e=t)}if(t._flags.truncate){const n=t.$_getRule(\"max\");if(n){let a=n.args.limit;if(d.isResolvable(a)&&(a=a.resolve(e,r,s),!d.limit(a)))return{value:e,errors:t.$_createError(\"any.ref\",a,{ref:n.args.limit,arg:\"limit\",reason:\"must be a positive integer\"},r,s)};e=e.slice(0,a)}}return{value:e}}},validate(e,{schema:t,error:r}){if(\"string\"!=typeof e)return{value:e,errors:r(\"string.base\")};if(\"\"===e){const s=t.$_getRule(\"min\");if(s&&0===s.args.limit)return;return{value:e,errors:r(\"string.empty\")}}},rules:{alphanum:{method(){return this.$_addRule(\"alphanum\")},validate:(e,t)=>/^[a-zA-Z0-9]+$/.test(e)?e:t.error(\"string.alphanum\")},base64:{method(e={}){return d.assertOptions(e,[\"paddingRequired\",\"urlSafe\"]),e=n({urlSafe:!1,paddingRequired:!0},e),o(\"boolean\"==typeof e.paddingRequired,\"paddingRequired must be boolean\"),o(\"boolean\"==typeof e.urlSafe,\"urlSafe must be boolean\"),this.$_addRule({name:\"base64\",args:{options:e}})},validate:(e,t,{options:r})=>p.base64Regex[r.paddingRequired][r.urlSafe].test(e)?e:t.error(\"string.base64\")},case:{method(e){return o([\"lower\",\"upper\"].includes(e),\"Invalid case:\",e),this.$_addRule({name:\"case\",args:{direction:e}})},validate:(e,t,{direction:r})=>\"lower\"===r&&e===e.toLocaleLowerCase()||\"upper\"===r&&e===e.toLocaleUpperCase()?e:t.error(\"string.\".concat(r,\"case\")),convert:!0},creditCard:{method(){return this.$_addRule(\"creditCard\")},validate(e,t){let r=e.length,s=0,n=1;for(;r--;){const t=e.charAt(r)*n;s+=t-9*(t>9),n^=3}return s>0&&s%10==0?e:t.error(\"string.creditCard\")}},dataUri:{method(e={}){return d.assertOptions(e,[\"paddingRequired\"]),e=n({paddingRequired:!0},e),o(\"boolean\"==typeof e.paddingRequired,\"paddingRequired must be boolean\"),this.$_addRule({name:\"dataUri\",args:{options:e}})},validate(e,t,{options:r}){const s=e.match(p.dataUriRegex);if(s){if(!s[2])return e;if(\"base64\"!==s[2])return e;if(p.base64Regex[r.paddingRequired].false.test(s[3]))return e}return t.error(\"string.dataUri\")}},domain:{method(e){e&&d.assertOptions(e,[\"allowFullyQualified\",\"allowUnicode\",\"maxDomainSegments\",\"minDomainSegments\",\"tlds\"]);const t=p.addressOptions(e);return this.$_addRule({name:\"domain\",args:{options:e},address:t})},validate:(e,t,r,{address:s})=>i.isValid(e,s)?e:t.error(\"string.domain\")},email:{method(e={}){d.assertOptions(e,[\"allowFullyQualified\",\"allowUnicode\",\"ignoreLength\",\"maxDomainSegments\",\"minDomainSegments\",\"multiple\",\"separator\",\"tlds\"]),o(void 0===e.multiple||\"boolean\"==typeof e.multiple,\"multiple option must be an boolean\");const t=p.addressOptions(e),r=new RegExp(\"\\\\s*[\".concat(e.separator?u(e.separator):\",\",\"]\\\\s*\"));return this.$_addRule({name:\"email\",args:{options:e},regex:r,address:t})},validate(e,t,{options:r},{regex:s,address:n}){const a=r.multiple?e.split(s):[e],o=[];for(const e of a)l.isValid(e,n)||o.push(e);return o.length?t.error(\"string.email\",{value:e,invalids:o}):e}},guid:{alias:\"uuid\",method(e={}){d.assertOptions(e,[\"version\",\"separator\"]);let t=\"\";if(e.version){const r=[].concat(e.version);o(r.length>=1,\"version must have at least 1 valid version specified\");const s=new Set;for(let e=0;e<r.length;++e){const n=r[e];o(\"string\"==typeof n,\"version at position \"+e+\" must be a string\");const a=p.guidVersions[n.toLowerCase()];o(a,\"version at position \"+e+\" must be one of \"+Object.keys(p.guidVersions).join(\", \")),o(!s.has(a),\"version at position \"+e+\" must not be a duplicate\"),t+=a,s.add(a)}}o(p.guidSeparators.has(e.separator),'separator must be one of true, false, \"-\", or \":\"');const r=void 0===e.separator?\"[:-]?\":!0===e.separator?\"[:-]\":!1===e.separator?\"[]?\":\"\\\\\".concat(e.separator),s=new RegExp(\"^([\\\\[{\\\\(]?)[0-9A-F]{8}(\".concat(r,\")[0-9A-F]{4}\\\\2?[\").concat(t||\"0-9A-F\",\"][0-9A-F]{3}\\\\2?[\").concat(t?\"89AB\":\"0-9A-F\",\"][0-9A-F]{3}\\\\2?[0-9A-F]{12}([\\\\]}\\\\)]?)$\"),\"i\");return this.$_addRule({name:\"guid\",args:{options:e},regex:s})},validate(e,t,r,{regex:s}){const n=s.exec(e);return n?p.guidBrackets[n[1]]!==n[n.length-1]?t.error(\"string.guid\"):e:t.error(\"string.guid\")}},hex:{method(e={}){return d.assertOptions(e,[\"byteAligned\"]),e=n({byteAligned:!1},e),o(\"boolean\"==typeof e.byteAligned,\"byteAligned must be boolean\"),this.$_addRule({name:\"hex\",args:{options:e}})},validate:(e,t,{options:r})=>p.hexRegex.test(e)?r.byteAligned&&e.length%2!=0?t.error(\"string.hexAlign\"):e:t.error(\"string.hex\")},hostname:{method(){return this.$_addRule(\"hostname\")},validate:(e,t)=>i.isValid(e,{minDomainSegments:1})||p.ipRegex.test(e)?e:t.error(\"string.hostname\")},insensitive:{method(){return this.$_setFlag(\"insensitive\",!0)}},ip:{method(e={}){d.assertOptions(e,[\"cidr\",\"version\"]);const{cidr:t,versions:r,regex:s}=c.regex(e),n=e.version?r:void 0;return this.$_addRule({name:\"ip\",args:{options:{cidr:t,version:n}},regex:s})},validate:(e,t,{options:r},{regex:s})=>s.test(e)?e:r.version?t.error(\"string.ipVersion\",{value:e,cidr:r.cidr,version:r.version}):t.error(\"string.ip\",{value:e,cidr:r.cidr})},isoDate:{method(){return this.$_addRule(\"isoDate\")},validate:(e,{error:t})=>p.isoDate(e)?e:t(\"string.isoDate\")},isoDuration:{method(){return this.$_addRule(\"isoDuration\")},validate:(e,t)=>p.isoDurationRegex.test(e)?e:t.error(\"string.isoDuration\")},length:{method(e,t){return p.length(this,\"length\",e,\"=\",t)},validate(e,t,{limit:r,encoding:s},{name:n,operator:a,args:o}){const i=!s&&e.length;return d.compare(i,r,a)?e:t.error(\"string.\"+n,{limit:o.limit,value:e,encoding:s})},args:[{name:\"limit\",ref:!0,assert:d.limit,message:\"must be a positive integer\"},\"encoding\"]},lowercase:{method(){return this.case(\"lower\")}},max:{method(e,t){return p.length(this,\"max\",e,\"<=\",t)},args:[\"limit\",\"encoding\"]},min:{method(e,t){return p.length(this,\"min\",e,\">=\",t)},args:[\"limit\",\"encoding\"]},normalize:{method(e=\"NFC\"){return o(p.normalizationForms.includes(e),\"normalization form must be one of \"+p.normalizationForms.join(\", \")),this.$_addRule({name:\"normalize\",args:{form:e}})},validate:(e,{error:t},{form:r})=>e===e.normalize(r)?e:t(\"string.normalize\",{value:e,form:r}),convert:!0},pattern:{alias:\"regex\",method(e,t={}){o(e instanceof RegExp,\"regex must be a RegExp\"),o(!e.flags.includes(\"g\")&&!e.flags.includes(\"y\"),\"regex should not use global or sticky mode\"),\"string\"==typeof t&&(t={name:t}),d.assertOptions(t,[\"invert\",\"name\"]);const r=[\"string.pattern\",t.invert?\".invert\":\"\",t.name?\".name\":\".base\"].join(\"\");return this.$_addRule({name:\"pattern\",args:{regex:e,options:t},errorCode:r})},validate:(e,t,{regex:r,options:s},{errorCode:n})=>r.test(e)^s.invert?e:t.error(n,{name:s.name,regex:r,value:e}),args:[\"regex\",\"options\"],multi:!0},replace:{method(e,t){\"string\"==typeof e&&(e=new RegExp(u(e),\"g\")),o(e instanceof RegExp,\"pattern must be a RegExp\"),o(\"string\"==typeof t,\"replacement must be a String\");const r=this.clone();return r.$_terms.replacements||(r.$_terms.replacements=[]),r.$_terms.replacements.push({pattern:e,replacement:t}),r}},token:{method(){return this.$_addRule(\"token\")},validate:(e,t)=>/^\\w+$/.test(e)?e:t.error(\"string.token\")},trim:{method(e=!0){return o(\"boolean\"==typeof e,\"enabled must be a boolean\"),this.$_addRule({name:\"trim\",args:{enabled:e}})},validate:(e,t,{enabled:r})=>r&&e!==e.trim()?t.error(\"string.trim\"):e,convert:!0},truncate:{method(e=!0){return o(\"boolean\"==typeof e,\"enabled must be a boolean\"),this.$_setFlag(\"truncate\",e)}},uppercase:{method(){return this.case(\"upper\")}},uri:{method(e={}){d.assertOptions(e,[\"allowRelative\",\"allowQuerySquareBrackets\",\"domain\",\"relativeOnly\",\"scheme\"]),e.domain&&d.assertOptions(e.domain,[\"allowFullyQualified\",\"allowUnicode\",\"maxDomainSegments\",\"minDomainSegments\",\"tlds\"]);const{regex:t,scheme:r}=m.regex(e),s=e.domain?p.addressOptions(e.domain):null;return this.$_addRule({name:\"uri\",args:{options:e},regex:t,domain:s,scheme:r})},validate(e,t,{options:r},{regex:s,domain:n,scheme:a}){if([\"http:/\",\"https:/\"].includes(e))return t.error(\"string.uri\");const o=s.exec(e);if(o){const s=o[1]||o[2];return!n||r.allowRelative&&!s||i.isValid(s,n)?e:t.error(\"string.domain\",{value:s})}return r.relativeOnly?t.error(\"string.uriRelativeOnly\"):r.scheme?t.error(\"string.uriCustomScheme\",{scheme:a,value:e}):t.error(\"string.uri\")}}},manifest:{build(e,t){if(t.replacements)for(const{pattern:r,replacement:s}of t.replacements)e=e.replace(r,s);return e}},messages:{\"string.alphanum\":\"{{#label}} must only contain alpha-numeric characters\",\"string.base\":\"{{#label}} must be a string\",\"string.base64\":\"{{#label}} must be a valid base64 string\",\"string.creditCard\":\"{{#label}} must be a credit card\",\"string.dataUri\":\"{{#label}} must be a valid dataUri string\",\"string.domain\":\"{{#label}} must contain a valid domain name\",\"string.email\":\"{{#label}} must be a valid email\",\"string.empty\":\"{{#label}} is not allowed to be empty\",\"string.guid\":\"{{#label}} must be a valid GUID\",\"string.hex\":\"{{#label}} must only contain hexadecimal characters\",\"string.hexAlign\":\"{{#label}} hex decoded representation must be byte aligned\",\"string.hostname\":\"{{#label}} must be a valid hostname\",\"string.ip\":\"{{#label}} must be a valid ip address with a {{#cidr}} CIDR\",\"string.ipVersion\":\"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR\",\"string.isoDate\":\"{{#label}} must be in iso format\",\"string.isoDuration\":\"{{#label}} must be a valid ISO 8601 duration\",\"string.length\":\"{{#label}} length must be {{#limit}} characters long\",\"string.lowercase\":\"{{#label}} must only contain lowercase characters\",\"string.max\":\"{{#label}} length must be less than or equal to {{#limit}} characters long\",\"string.min\":\"{{#label}} length must be at least {{#limit}} characters long\",\"string.normalize\":\"{{#label}} must be unicode normalized in the {{#form}} form\",\"string.token\":\"{{#label}} must only contain alpha-numeric and underscore characters\",\"string.pattern.base\":\"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}\",\"string.pattern.name\":\"{{#label}} with value {:[.]} fails to match the {{#name}} pattern\",\"string.pattern.invert.base\":\"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}\",\"string.pattern.invert.name\":\"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern\",\"string.trim\":\"{{#label}} must not have leading or trailing whitespace\",\"string.uri\":\"{{#label}} must be a valid uri\",\"string.uriCustomScheme\":\"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern\",\"string.uriRelativeOnly\":\"{{#label}} must be a valid relative uri\",\"string.uppercase\":\"{{#label}} must only contain uppercase characters\"}}),p.addressOptions=function(e){if(!e)return e;if(o(void 0===e.minDomainSegments||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,\"minDomainSegments must be a positive integer\"),o(void 0===e.maxDomainSegments||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,\"maxDomainSegments must be a positive integer\"),!1===e.tlds)return e;if(!0===e.tlds||void 0===e.tlds)return o(p.tlds,\"Built-in TLD list disabled\"),Object.assign({},e,p.tlds);o(\"object\"==typeof e.tlds,\"tlds must be true, false, or an object\");const t=e.tlds.deny;if(t)return Array.isArray(t)&&(e=Object.assign({},e,{tlds:{deny:new Set(t)}})),o(e.tlds.deny instanceof Set,\"tlds.deny must be an array, Set, or boolean\"),o(!e.tlds.allow,\"Cannot specify both tlds.allow and tlds.deny lists\"),p.validateTlds(e.tlds.deny,\"tlds.deny\"),e;const r=e.tlds.allow;return r?!0===r?(o(p.tlds,\"Built-in TLD list disabled\"),Object.assign({},e,p.tlds)):(Array.isArray(r)&&(e=Object.assign({},e,{tlds:{allow:new Set(r)}})),o(e.tlds.allow instanceof Set,\"tlds.allow must be an array, Set, or boolean\"),p.validateTlds(e.tlds.allow,\"tlds.allow\"),e):e},p.validateTlds=function(e,t){for(const r of e)o(i.isValid(r,{minDomainSegments:1,maxDomainSegments:1}),\"\".concat(t,\" must contain valid top level domain names\"))},p.isoDate=function(e){if(!d.isIsoDate(e))return null;/.*T.*[+-]\\d\\d$/.test(e)&&(e+=\"00\");const t=new Date(e);return isNaN(t.getTime())?null:t.toISOString()},p.length=function(e,t,r,s,n){return o(!n||!1,\"Invalid encoding:\",n),e.$_addRule({name:t,method:\"length\",args:{limit:r,encoding:n},operator:s})}},8826:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8068),a={};a.Map=class extends Map{slice(){return new a.Map(this)}},e.exports=n.extend({type:\"symbol\",terms:{map:{init:new a.Map}},coerce:{method(e,{schema:t,error:r}){const s=t.$_terms.map.get(e);return s&&(e=s),t._flags.only&&\"symbol\"!=typeof e?{value:e,errors:r(\"symbol.map\",{map:t.$_terms.map})}:{value:e}}},validate(e,{error:t}){if(\"symbol\"!=typeof e)return{value:e,errors:t(\"symbol.base\")}},rules:{map:{method(e){e&&!e[Symbol.iterator]&&\"object\"==typeof e&&(e=Object.entries(e)),s(e&&e[Symbol.iterator],\"Iterable must be an iterable or object\");const t=this.clone(),r=[];for(const n of e){s(n&&n[Symbol.iterator],\"Entry must be an iterable\");const[e,a]=n;s(\"object\"!=typeof e&&\"function\"!=typeof e&&\"symbol\"!=typeof e,\"Key must not be of type object, function, or Symbol\"),s(\"symbol\"==typeof a,\"Value must be a Symbol\"),t.$_terms.map.set(e,a),r.push(a)}return t.valid(...r)}}},manifest:{build:(e,t)=>(t.map&&(e=e.map(t.map)),e)},messages:{\"symbol.base\":\"{{#label}} must be a symbol\",\"symbol.map\":\"{{#label}} must be one of {{#map}}\"}})},8863:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(738),o=r(9621),i=r(8160),l=r(6354),c=r(493),u={result:Symbol(\"result\")};t.entry=function(e,t,r){let n=i.defaults;r&&(s(void 0===r.warnings,\"Cannot override warnings preference in synchronous validation\"),s(void 0===r.artifacts,\"Cannot override artifacts preference in synchronous validation\"),n=i.preferences(i.defaults,r));const a=u.entry(e,t,n);s(!a.mainstay.externals.length,\"Schema with external rules must use validateAsync()\");const o={value:a.value};return a.error&&(o.error=a.error),a.mainstay.warnings.length&&(o.warning=l.details(a.mainstay.warnings)),a.mainstay.debug&&(o.debug=a.mainstay.debug),a.mainstay.artifacts&&(o.artifacts=a.mainstay.artifacts),o},t.entryAsync=async function(e,t,r){let s=i.defaults;r&&(s=i.preferences(i.defaults,r));const n=u.entry(e,t,s),a=n.mainstay;if(n.error)throw a.debug&&(n.error.debug=a.debug),n.error;if(a.externals.length){let e=n.value;for(const{method:t,path:n,label:i}of a.externals){let a,l,c=e;n.length&&(a=n[n.length-1],l=o(e,n.slice(0,-1)),c=l[a]);try{const s=await t(c,{prefs:r});if(void 0===s||s===c)continue;l?l[a]=s:e=s}catch(e){throw s.errors.label&&(e.message+=\" (\".concat(i,\")\")),e}}n.value=e}if(!s.warnings&&!s.debug&&!s.artifacts)return n.value;const c={value:n.value};return a.warnings.length&&(c.warning=l.details(a.warnings)),a.debug&&(c.debug=a.debug),a.artifacts&&(c.artifacts=a.artifacts),c},u.entry=function(e,r,s){const{tracer:n,cleanup:a}=u.tracer(r,s),o={externals:[],warnings:[],tracer:n,debug:s.debug?[]:null,links:r._ids._schemaChain?new Map:null},i=r._ids._schemaChain?[{schema:r}]:null,f=new c([],[],{mainstay:o,schemas:i}),m=t.validate(e,r,f,s);a&&r.$_root.untrace();const h=l.process(m.errors,e,s);return{value:m.value,error:h,mainstay:o}},u.tracer=function(e,t){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:t.debug?(s(e.$_root.trace,\"Debug mode not supported\"),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:u.ignore}},t.validate=function(e,t,r,s,n={}){if(t.$_terms.whens&&(t=t._generate(e,r,s).schema),t._preferences&&(s=u.prefs(t,s)),t._cache&&s.cache){const s=t._cache.get(e);if(r.mainstay.tracer.debug(r,\"validate\",\"cached\",!!s),s)return s}const a=(n,a,o)=>t.$_createError(n,e,a,o||r,s),o={original:e,prefs:s,schema:t,state:r,error:a,errorsArray:u.errorsArray,warn:(e,t,s)=>r.mainstay.warnings.push(a(e,t,s)),message:(n,a)=>t.$_createError(\"custom\",e,a,r,s,{messages:n})};r.mainstay.tracer.entry(t,r);const l=t._definition;if(l.prepare&&void 0!==e&&s.convert){const t=l.prepare(e,o);if(t){if(r.mainstay.tracer.value(r,\"prepare\",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),o);e=t.value}}if(l.coerce&&void 0!==e&&s.convert&&(!l.coerce.from||l.coerce.from.includes(typeof e))){const t=l.coerce.method(e,o);if(t){if(r.mainstay.tracer.value(r,\"coerced\",e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),o);e=t.value}}const c=t._flags.empty;c&&c.$_match(u.trim(e,t),r.nest(c),i.defaults)&&(r.mainstay.tracer.value(r,\"empty\",e,void 0),e=void 0);const f=n.presence||t._flags.presence||(t._flags._endedSwitch?null:s.presence);if(void 0===e){if(\"forbidden\"===f)return u.finalize(e,null,o);if(\"required\"===f)return u.finalize(e,[t.$_createError(\"any.required\",e,null,r,s)],o);if(\"optional\"===f){if(t._flags.default!==i.symbols.deepDefault)return u.finalize(e,null,o);r.mainstay.tracer.value(r,\"default\",e,{}),e={}}}else if(\"forbidden\"===f)return u.finalize(e,[t.$_createError(\"any.unknown\",e,null,r,s)],o);const m=[];if(t._valids){const n=t._valids.get(e,r,s,t._flags.insensitive);if(n)return s.convert&&(r.mainstay.tracer.value(r,\"valids\",e,n.value),e=n.value),r.mainstay.tracer.filter(t,r,\"valid\",n),u.finalize(e,null,o);if(t._flags.only){const n=t.$_createError(\"any.only\",e,{valids:t._valids.values({display:!0})},r,s);if(s.abortEarly)return u.finalize(e,[n],o);m.push(n)}}if(t._invalids){const n=t._invalids.get(e,r,s,t._flags.insensitive);if(n){r.mainstay.tracer.filter(t,r,\"invalid\",n);const a=t.$_createError(\"any.invalid\",e,{invalids:t._invalids.values({display:!0})},r,s);if(s.abortEarly)return u.finalize(e,[a],o);m.push(a)}}if(l.validate){const t=l.validate(e,o);if(t&&(r.mainstay.tracer.value(r,\"base\",e,t.value),e=t.value,t.errors)){if(!Array.isArray(t.errors))return m.push(t.errors),u.finalize(e,m,o);if(t.errors.length)return m.push(...t.errors),u.finalize(e,m,o)}}return t._rules.length?u.rules(e,m,o):u.finalize(e,m,o)},u.rules=function(e,t,r){const{schema:s,state:n,prefs:a}=r;for(const o of s._rules){const l=s._definition.rules[o.method];if(l.convert&&a.convert){n.mainstay.tracer.log(s,n,\"rule\",o.name,\"full\");continue}let c,f=o.args;if(o._resolve.length){f=Object.assign({},f);for(const t of o._resolve){const r=l.argsByName.get(t),o=f[t].resolve(e,n,a),u=r.normalize?r.normalize(o):o,m=i.validateArg(u,null,r);if(m){c=s.$_createError(\"any.ref\",o,{arg:t,ref:f[t],reason:m},n,a);break}f[t]=u}}c=c||l.validate(e,r,f,o);const m=u.rule(c,o);if(m.errors){if(n.mainstay.tracer.log(s,n,\"rule\",o.name,\"error\"),o.warn){n.mainstay.warnings.push(...m.errors);continue}if(a.abortEarly)return u.finalize(e,m.errors,r);t.push(...m.errors)}else n.mainstay.tracer.log(s,n,\"rule\",o.name,\"pass\"),n.mainstay.tracer.value(n,\"rule\",e,m.value,o.name),e=m.value}return u.finalize(e,t,r)},u.rule=function(e,t){return e instanceof l.Report?(u.error(e,t),{errors:[e],value:null}):Array.isArray(e)&&e[i.symbols.errors]?(e.forEach((e=>u.error(e,t))),{errors:e,value:null}):{errors:null,value:e}},u.error=function(e,t){return t.message&&e._setTemplate(t.message),e},u.finalize=function(e,t,r){t=t||[];const{schema:n,state:a,prefs:o}=r;if(t.length){const s=u.default(\"failover\",void 0,t,r);void 0!==s&&(a.mainstay.tracer.value(a,\"failover\",e,s),e=s,t=[])}if(t.length&&n._flags.error)if(\"function\"==typeof n._flags.error){t=n._flags.error(t),Array.isArray(t)||(t=[t]);for(const e of t)s(e instanceof Error||e instanceof l.Report,\"error() must return an Error object\")}else t=[n._flags.error];if(void 0===e){const s=u.default(\"default\",e,t,r);a.mainstay.tracer.value(a,\"default\",e,s),e=s}if(n._flags.cast&&void 0!==e){const t=n._definition.cast[n._flags.cast];if(t.from(e)){const s=t.to(e,r);a.mainstay.tracer.value(a,\"cast\",e,s,n._flags.cast),e=s}}if(n.$_terms.externals&&o.externals&&!1!==o._externals)for(const{method:e}of n.$_terms.externals)a.mainstay.externals.push({method:e,path:a.path,label:l.label(n._flags,a,o)});const i={value:e,errors:t.length?t:null};return n._flags.result&&(i.value=\"strip\"===n._flags.result?void 0:r.original,a.mainstay.tracer.value(a,n._flags.result,e,i.value),a.shadow(e,n._flags.result)),n._cache&&!1!==o.cache&&!n._refs.length&&n._cache.set(r.original,i),void 0===e||i.errors||void 0===n._flags.artifact||(a.mainstay.artifacts=a.mainstay.artifacts||new Map,a.mainstay.artifacts.has(n._flags.artifact)||a.mainstay.artifacts.set(n._flags.artifact,[]),a.mainstay.artifacts.get(n._flags.artifact).push(a.path)),i},u.prefs=function(e,t){const r=t===i.defaults;return r&&e._preferences[i.symbols.prefs]?e._preferences[i.symbols.prefs]:(t=i.preferences(t,e._preferences),r&&(e._preferences[i.symbols.prefs]=t),t)},u.default=function(e,t,r,s){const{schema:a,state:o,prefs:l}=s,c=a._flags[e];if(l.noDefaults||void 0===c)return t;if(o.mainstay.tracer.log(a,o,\"rule\",e,\"full\"),!c)return c;if(\"function\"==typeof c){const t=c.length?[n(o.ancestors[0]),s]:[];try{return c(...t)}catch(t){return void r.push(a.$_createError(\"any.\".concat(e),null,{error:t},o,l))}}return\"object\"!=typeof c?c:c[i.symbols.literal]?c.literal:i.isResolvable(c)?c.resolve(t,o,l):n(c)},u.trim=function(e,t){if(\"string\"!=typeof e)return e;const r=t.$_getRule(\"trim\");return r&&r.args.enabled?e.trim():e},u.ignore={active:!1,debug:a,entry:a,filter:a,log:a,resolve:a,value:a},u.errorsArray=function(){const e=[];return e[i.symbols.errors]=!0,e}},2036:(e,t,r)=>{\"use strict\";const s=r(375),n=r(9474),a=r(8160),o={};e.exports=o.Values=class{constructor(e,t){this._values=new Set(e),this._refs=new Set(t),this._lowercase=o.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,t){a.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),t&&t.register(e)):this.has(e,null,null,!1)||(this._values.add(e),\"string\"==typeof e&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,t,r){if(e=e||new o.Values,t){if(t._override)return t.clone();for(const r of[...t._values,...t._refs])e.add(r)}if(r)for(const t of[...r._values,...r._refs])e.remove(t);return e.length?e:null}remove(e){a.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),\"string\"==typeof e&&this._lowercase.delete(e.toLowerCase()))}has(e,t,r,s){return!!this.get(e,t,r,s)}get(e,t,r,s){if(!this.length)return!1;if(this._values.has(e))return{value:e};if(\"string\"==typeof e&&e&&s){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&\"object\"!=typeof e)return!1;if(\"object\"==typeof e)for(const t of this._values)if(n(t,e))return{value:t};if(t)for(const a of this._refs){const o=a.resolve(e,t,r,null,{in:!0});if(void 0===o)continue;const i=a.in&&\"object\"==typeof o?Array.isArray(o)?o:Object.keys(o):[o];for(const t of i)if(typeof t==typeof e)if(s&&e&&\"string\"==typeof e){if(t.toLowerCase()===e.toLowerCase())return{value:t,ref:a}}else if(n(t,e))return{value:t,ref:a}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const e=[];for(const t of[...this._values,...this._refs])void 0!==t&&e.push(t);return e}return Array.from([...this._values,...this._refs])}clone(){const e=new o.Values(this._values,this._refs);return e._override=this._override,e}concat(e){s(!e._override,\"Cannot concat override set of values\");const t=new o.Values([...this._values,...e._values],[...this._refs,...e._refs]);return t._override=this._override,t}describe(){const e=[];this._override&&e.push({override:!0});for(const t of this._values.values())e.push(t&&\"object\"==typeof t?{value:t}:t);for(const t of this._refs.values())e.push(t.describe());return e}},o.Values.prototype[a.symbols.values]=!0,o.Values.prototype.slice=o.Values.prototype.clone,o.lowercases=function(e){const t=new Map;if(e)for(const r of e)\"string\"==typeof r&&t.set(r.toLowerCase(),r);return t}},978:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(1687),o=r(9621),i={};e.exports=function(e,t,r={}){if(s(e&&\"object\"==typeof e,\"Invalid defaults value: must be an object\"),s(!t||!0===t||\"object\"==typeof t,\"Invalid source value: must be true, falsy or an object\"),s(\"object\"==typeof r,\"Invalid options: must be an object\"),!t)return null;if(r.shallow)return i.applyToDefaultsWithShallow(e,t,r);const o=n(e);if(!0===t)return o;const l=void 0!==r.nullOverride&&r.nullOverride;return a(o,t,{nullOverride:l,mergeArrays:!1})},i.applyToDefaultsWithShallow=function(e,t,r){const l=r.shallow;s(Array.isArray(l),\"Invalid keys\");const c=new Map,u=!0===t?null:new Set;for(let r of l){r=Array.isArray(r)?r:r.split(\".\");const s=o(e,r);s&&\"object\"==typeof s?c.set(s,u&&o(t,r)||s):u&&u.add(r)}const f=n(e,{},c);if(!u)return f;for(const e of u)i.reachCopy(f,t,e);const m=void 0!==r.nullOverride&&r.nullOverride;return a(f,t,{nullOverride:m,mergeArrays:!1})},i.reachCopy=function(e,t,r){for(const e of r){if(!(e in t))return;const r=t[e];if(\"object\"!=typeof r||null===r)return;t=r}const s=t;let n=e;for(let e=0;e<r.length-1;++e){const t=r[e];\"object\"!=typeof n[t]&&(n[t]={}),n=n[t]}n[r[r.length-1]]=s}},375:(e,t,r)=>{\"use strict\";const s=r(7916);e.exports=function(e,...t){if(!e){if(1===t.length&&t[0]instanceof Error)throw t[0];throw new s(t)}}},8571:(e,t,r)=>{\"use strict\";const s=r(9621),n=r(4277),a=r(7043),o={needsProtoHack:new Set([n.set,n.map,n.weakSet,n.weakMap])};e.exports=o.clone=function(e,t={},r=null){if(\"object\"!=typeof e||null===e)return e;let s=o.clone,i=r;if(t.shallow){if(!0!==t.shallow)return o.cloneWithShallow(e,t);s=e=>e}else if(i){const t=i.get(e);if(t)return t}else i=new Map;const l=n.getInternalProto(e);if(l===n.buffer)return!1;if(l===n.date)return new Date(e.getTime());if(l===n.regex)return new RegExp(e);const c=o.base(e,l,t);if(c===e)return e;if(i&&i.set(e,c),l===n.set)for(const r of e)c.add(s(r,t,i));else if(l===n.map)for(const[r,n]of e)c.set(r,s(n,t,i));const u=a.keys(e,t);for(const r of u){if(\"__proto__\"===r)continue;if(l===n.array&&\"length\"===r){c.length=e.length;continue}const a=Object.getOwnPropertyDescriptor(e,r);a?a.get||a.set?Object.defineProperty(c,r,a):a.enumerable?c[r]=s(e[r],t,i):Object.defineProperty(c,r,{enumerable:!1,writable:!0,configurable:!0,value:s(e[r],t,i)}):Object.defineProperty(c,r,{enumerable:!0,writable:!0,configurable:!0,value:s(e[r],t,i)})}return c},o.cloneWithShallow=function(e,t){const r=t.shallow;(t=Object.assign({},t)).shallow=!1;const n=new Map;for(const t of r){const r=s(e,t);\"object\"!=typeof r&&\"function\"!=typeof r||n.set(r,r)}return o.clone(e,t,n)},o.base=function(e,t,r){if(!1===r.prototype)return o.needsProtoHack.has(t)?new t.constructor:t===n.array?[]:{};const s=Object.getPrototypeOf(e);if(s&&s.isImmutable)return e;if(t===n.array){const e=[];return s!==t&&Object.setPrototypeOf(e,s),e}if(o.needsProtoHack.has(t)){const e=new s.constructor;return s!==t&&Object.setPrototypeOf(e,s),e}return Object.create(s)}},9474:(e,t,r)=>{\"use strict\";const s=r(4277),n={mismatched:null};e.exports=function(e,t,r){return r=Object.assign({prototype:!0},r),!!n.isDeepEqual(e,t,r,[])},n.isDeepEqual=function(e,t,r,a){if(e===t)return 0!==e||1/e==1/t;const o=typeof e;if(o!==typeof t)return!1;if(null===e||null===t)return!1;if(\"function\"===o){if(!r.deepFunction||e.toString()!==t.toString())return!1}else if(\"object\"!==o)return e!=e&&t!=t;const i=n.getSharedType(e,t,!!r.prototype);switch(i){case s.buffer:return!1;case s.promise:return e===t;case s.regex:return e.toString()===t.toString();case n.mismatched:return!1}for(let r=a.length-1;r>=0;--r)if(a[r].isSame(e,t))return!0;a.push(new n.SeenEntry(e,t));try{return!!n.isDeepEqualObj(i,e,t,r,a)}finally{a.pop()}},n.getSharedType=function(e,t,r){if(r)return Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?n.mismatched:s.getInternalProto(e);const a=s.getInternalProto(e);return a!==s.getInternalProto(t)?n.mismatched:a},n.valueOf=function(e){const t=e.valueOf;if(void 0===t)return e;try{return t.call(e)}catch(e){return e}},n.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)},n.isSetSimpleEqual=function(e,t){for(const r of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,r))return!1;return!0},n.isDeepEqualObj=function(e,t,r,a,o){const{isDeepEqual:i,valueOf:l,hasOwnEnumerableProperty:c}=n,{keys:u,getOwnPropertySymbols:f}=Object;if(e===s.array){if(!a.part){if(t.length!==r.length)return!1;for(let e=0;e<t.length;++e)if(!i(t[e],r[e],a,o))return!1;return!0}for(const e of t)for(const t of r)if(i(e,t,a,o))return!0}else if(e===s.set){if(t.size!==r.size)return!1;if(!n.isSetSimpleEqual(t,r)){const e=new Set(Set.prototype.values.call(r));for(const r of Set.prototype.values.call(t)){if(e.delete(r))continue;let t=!1;for(const s of e)if(i(r,s,a,o)){e.delete(s),t=!0;break}if(!t)return!1}}}else if(e===s.map){if(t.size!==r.size)return!1;for(const[e,s]of Map.prototype.entries.call(t)){if(void 0===s&&!Map.prototype.has.call(r,e))return!1;if(!i(s,Map.prototype.get.call(r,e),a,o))return!1}}else if(e===s.error&&(t.name!==r.name||t.message!==r.message))return!1;const m=l(t),h=l(r);if((t!==m||r!==h)&&!i(m,h,a,o))return!1;const d=u(t);if(!a.part&&d.length!==u(r).length&&!a.skip)return!1;let p=0;for(const e of d)if(a.skip&&a.skip.includes(e))void 0===r[e]&&++p;else{if(!c(r,e))return!1;if(!i(t[e],r[e],a,o))return!1}if(!a.part&&d.length-p!==u(r).length)return!1;if(!1!==a.symbols){const e=f(t),s=new Set(f(r));for(const n of e){if(!a.skip||!a.skip.includes(n))if(c(t,n)){if(!c(r,n))return!1;if(!i(t[n],r[n],a,o))return!1}else if(c(r,n))return!1;s.delete(n)}for(const e of s)if(c(r,e))return!1}return!0},n.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}},7916:(e,t,r)=>{\"use strict\";const s=r(8761);e.exports=class extends Error{constructor(e){super(e.filter((e=>\"\"!==e)).map((e=>\"string\"==typeof e?e:e instanceof Error?e.message:s(e))).join(\" \")||\"Unknown error\"),\"function\"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t.assert)}}},5277:e=>{\"use strict\";const t={};e.exports=function(e){if(!e)return\"\";let r=\"\";for(let s=0;s<e.length;++s){const n=e.charCodeAt(s);t.isSafe(n)?r+=e[s]:r+=t.escapeHtmlChar(n)}return r},t.escapeHtmlChar=function(e){const r=t.namedHtml[e];if(void 0!==r)return r;if(e>=256)return\"&#\"+e+\";\";const s=e.toString(16).padStart(2,\"0\");return\"&#x\".concat(s,\";\")},t.isSafe=function(e){return void 0!==t.safeCharCodes[e]},t.namedHtml={38:\"&amp;\",60:\"&lt;\",62:\"&gt;\",34:\"&quot;\",160:\"&nbsp;\",162:\"&cent;\",163:\"&pound;\",164:\"&curren;\",169:\"&copy;\",174:\"&reg;\"},t.safeCharCodes=function(){const e={};for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||32===t||46===t||44===t||45===t||58===t||95===t)&&(e[t]=null);return e}()},6064:e=>{\"use strict\";e.exports=function(e){return e.replace(/[\\^\\$\\.\\*\\+\\-\\?\\=\\!\\:\\|\\\\\\/\\(\\)\\[\\]\\{\\}\\,]/g,\"\\\\$&\")}},738:e=>{\"use strict\";e.exports=function(){}},1687:(e,t,r)=>{\"use strict\";const s=r(375),n=r(8571),a=r(7043),o={};e.exports=o.merge=function(e,t,r){if(s(e&&\"object\"==typeof e,\"Invalid target value: must be an object\"),s(null==t||\"object\"==typeof t,\"Invalid source value: must be null, undefined, or an object\"),!t)return e;if(r=Object.assign({nullOverride:!0,mergeArrays:!0},r),Array.isArray(t)){s(Array.isArray(e),\"Cannot merge array onto an object\"),r.mergeArrays||(e.length=0);for(let s=0;s<t.length;++s)e.push(n(t[s],{symbols:r.symbols}));return e}const i=a.keys(t,r);for(let s=0;s<i.length;++s){const a=i[s];if(\"__proto__\"===a||!Object.prototype.propertyIsEnumerable.call(t,a))continue;const l=t[a];if(l&&\"object\"==typeof l){if(e[a]===l)continue;!e[a]||\"object\"!=typeof e[a]||Array.isArray(e[a])!==Array.isArray(l)||l instanceof Date||l instanceof RegExp?e[a]=n(l,{symbols:r.symbols}):o.merge(e[a],l,r)}else(null!=l||r.nullOverride)&&(e[a]=l)}return e}},9621:(e,t,r)=>{\"use strict\";const s=r(375),n={};e.exports=function(e,t,r){if(!1===t||null==t)return e;\"string\"==typeof(r=r||{})&&(r={separator:r});const a=Array.isArray(t);s(!a||!r.separator,\"Separator option no valid for array-based chain\");const o=a?t:t.split(r.separator||\".\");let i=e;for(let e=0;e<o.length;++e){let a=o[e];const l=r.iterables&&n.iterables(i);if(Array.isArray(i)||\"set\"===l){const e=Number(a);Number.isInteger(e)&&(a=e<0?i.length+e:e)}if(!i||\"function\"==typeof i&&!1===r.functions||!l&&void 0===i[a]){s(!r.strict||e+1===o.length,\"Missing segment\",a,\"in reach path \",t),s(\"object\"==typeof i||!0===r.functions||\"function\"!=typeof i,\"Invalid segment\",a,\"in reach path \",t),i=r.default;break}i=l?\"set\"===l?[...i][a]:i.get(a):i[a]}return i},n.iterables=function(e){return e instanceof Set?\"set\":e instanceof Map?\"map\":void 0}},8761:e=>{\"use strict\";e.exports=function(...e){try{return JSON.stringify.apply(null,e)}catch(e){return\"[Cannot display object: \"+e.message+\"]\"}}},4277:(e,t)=>{\"use strict\";const r={};t=e.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},r.typeMap=new Map([[\"[object Error]\",t.error],[\"[object Map]\",t.map],[\"[object Promise]\",t.promise],[\"[object Set]\",t.set],[\"[object WeakMap]\",t.weakMap],[\"[object WeakSet]\",t.weakSet]]),t.getInternalProto=function(e){if(Array.isArray(e))return t.array;if(e instanceof Date)return t.date;if(e instanceof RegExp)return t.regex;if(e instanceof Error)return t.error;const s=Object.prototype.toString.call(e);return r.typeMap.get(s)||t.generic}},7043:(e,t)=>{\"use strict\";t.keys=function(e,t={}){return!1!==t.symbols?Reflect.ownKeys(e):Object.getOwnPropertyNames(e)}},3652:(e,t,r)=>{\"use strict\";const s=r(375),n={};t.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(e,t){const r=[].concat((t=t||{}).before||[]),n=[].concat(t.after||[]),a=t.group||\"?\",o=t.sort||0;s(!r.includes(a),\"Item cannot come before itself: \".concat(a)),s(!r.includes(\"?\"),\"Item cannot come before unassociated items\"),s(!n.includes(a),\"Item cannot come after itself: \".concat(a)),s(!n.includes(\"?\"),\"Item cannot come after unassociated items\"),Array.isArray(e)||(e=[e]);for(const t of e){const e={seq:this._items.length,sort:o,before:r,after:n,group:a,node:t};this._items.push(e)}if(!t.manual){const e=this._sort();s(e,\"item\",\"?\"!==a?\"added into group \".concat(a):\"\",\"created a dependencies error\")}return this.nodes}merge(e){Array.isArray(e)||(e=[e]);for(const t of e)if(t)for(const e of t._items)this._items.push(Object.assign({},e));this._items.sort(n.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const t=this._sort();return s(t,\"merge created a dependencies error\"),this.nodes}sort(){const e=this._sort();return s(e,\"sort created a dependencies error\"),this.nodes}_sort(){const e={},t=Object.create(null),r=Object.create(null);for(const s of this._items){const n=s.seq,a=s.group;r[a]=r[a]||[],r[a].push(n),e[n]=s.before;for(const e of s.after)t[e]=t[e]||[],t[e].push(n)}for(const t in e){const s=[];for(const n in e[t]){const a=e[t][n];r[a]=r[a]||[],s.push(...r[a])}e[t]=s}for(const s in t)if(r[s])for(const n of r[s])e[n].push(...t[s]);const s={};for(const t in e){const r=e[t];for(const e of r)s[e]=s[e]||[],s[e].push(t)}const n={},a=[];for(let e=0;e<this._items.length;++e){let t=e;if(s[e]){t=null;for(let e=0;e<this._items.length;++e){if(!0===n[e])continue;s[e]||(s[e]=[]);const r=s[e].length;let a=0;for(let t=0;t<r;++t)n[s[e][t]]&&++a;if(a===r){t=e;break}}}null!==t&&(n[t]=!0,a.push(t))}if(a.length!==this._items.length)return!1;const o={};for(const e of this._items)o[e.seq]=e;this._items=[],this.nodes=[];for(const e of a){const t=o[e];this.nodes.push(t.node),this._items.push(t)}return!0}},n.mergeSort=(e,t)=>e.sort===t.sort?0:e.sort<t.sort?-1:1},5380:(e,t,r)=>{\"use strict\";const s=r(443),n=r(2178),a={minDomainSegments:2,nonAsciiRx:/[^\\x00-\\x7f]/,domainControlRx:/[\\x00-\\x20@\\:\\/\\\\#!\\$&\\'\\(\\)\\*\\+,;=\\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\\-]*[a-zA-Z0-9])?$/,URL:s.URL||URL};t.analyze=function(e,t={}){if(!e)return n.code(\"DOMAIN_NON_EMPTY_STRING\");if(\"string\"!=typeof e)throw new Error(\"Invalid input: domain must be a string\");if(e.length>256)return n.code(\"DOMAIN_TOO_LONG\");if(a.nonAsciiRx.test(e)){if(!1===t.allowUnicode)return n.code(\"DOMAIN_INVALID_UNICODE_CHARS\");e=e.normalize(\"NFC\")}if(a.domainControlRx.test(e))return n.code(\"DOMAIN_INVALID_CHARS\");e=a.punycode(e),t.allowFullyQualified&&\".\"===e[e.length-1]&&(e=e.slice(0,-1));const r=t.minDomainSegments||a.minDomainSegments,s=e.split(\".\");if(s.length<r)return n.code(\"DOMAIN_SEGMENTS_COUNT\");if(t.maxDomainSegments&&s.length>t.maxDomainSegments)return n.code(\"DOMAIN_SEGMENTS_COUNT_MAX\");const o=t.tlds;if(o){const e=s[s.length-1].toLowerCase();if(o.deny&&o.deny.has(e)||o.allow&&!o.allow.has(e))return n.code(\"DOMAIN_FORBIDDEN_TLDS\")}for(let e=0;e<s.length;++e){const t=s[e];if(!t.length)return n.code(\"DOMAIN_EMPTY_SEGMENT\");if(t.length>63)return n.code(\"DOMAIN_LONG_SEGMENT\");if(e<s.length-1){if(!a.domainSegmentRx.test(t))return n.code(\"DOMAIN_INVALID_CHARS\")}else if(!a.tldSegmentRx.test(t))return n.code(\"DOMAIN_INVALID_TLDS_CHARS\")}return null},t.isValid=function(e,r){return!t.analyze(e,r)},a.punycode=function(e){e.includes(\"%\")&&(e=e.replace(/%/g,\"%25\"));try{return new a.URL(\"http://\".concat(e)).host}catch(t){return e}}},1745:(e,t,r)=>{\"use strict\";const s=r(9848),n=r(5380),a=r(2178),o={nonAsciiRx:/[^\\x00-\\x7f]/,encoder:new(s.TextEncoder||TextEncoder)};t.analyze=function(e,t){return o.email(e,t)},t.isValid=function(e,t){return!o.email(e,t)},o.email=function(e,t={}){if(\"string\"!=typeof e)throw new Error(\"Invalid input: email must be a string\");if(!e)return a.code(\"EMPTY_STRING\");const r=!o.nonAsciiRx.test(e);if(!r){if(!1===t.allowUnicode)return a.code(\"FORBIDDEN_UNICODE\");e=e.normalize(\"NFC\")}const s=e.split(\"@\");if(2!==s.length)return s.length>2?a.code(\"MULTIPLE_AT_CHAR\"):a.code(\"MISSING_AT_CHAR\");const[i,l]=s;if(!i)return a.code(\"EMPTY_LOCAL\");if(!t.ignoreLength){if(e.length>254)return a.code(\"ADDRESS_TOO_LONG\");if(o.encoder.encode(i).length>64)return a.code(\"LOCAL_TOO_LONG\")}return o.local(i,r)||n.analyze(l,t)},o.local=function(e,t){const r=e.split(\".\");for(const e of r){if(!e.length)return a.code(\"EMPTY_LOCAL_SEGMENT\");if(t){if(!o.atextRx.test(e))return a.code(\"INVALID_LOCAL_CHARS\")}else for(const t of e){if(o.atextRx.test(t))continue;const e=o.binary(t);if(!o.atomRx.test(e))return a.code(\"INVALID_LOCAL_CHARS\")}}},o.binary=function(e){return Array.from(o.encoder.encode(e)).map((e=>String.fromCharCode(e))).join(\"\")},o.atextRx=/^[\\w!#\\$%&'\\*\\+\\-/=\\?\\^`\\{\\|\\}~]+$/,o.atomRx=new RegExp([\"(?:[\\\\xc2-\\\\xdf][\\\\x80-\\\\xbf])\",\"(?:\\\\xe0[\\\\xa0-\\\\xbf][\\\\x80-\\\\xbf])|(?:[\\\\xe1-\\\\xec][\\\\x80-\\\\xbf]{2})|(?:\\\\xed[\\\\x80-\\\\x9f][\\\\x80-\\\\xbf])|(?:[\\\\xee-\\\\xef][\\\\x80-\\\\xbf]{2})\",\"(?:\\\\xf0[\\\\x90-\\\\xbf][\\\\x80-\\\\xbf]{2})|(?:[\\\\xf1-\\\\xf3][\\\\x80-\\\\xbf]{3})|(?:\\\\xf4[\\\\x80-\\\\x8f][\\\\x80-\\\\xbf]{2})\"].join(\"|\"))},2178:(e,t)=>{\"use strict\";t.codes={EMPTY_STRING:\"Address must be a non-empty string\",FORBIDDEN_UNICODE:\"Address contains forbidden Unicode characters\",MULTIPLE_AT_CHAR:\"Address cannot contain more than one @ character\",MISSING_AT_CHAR:\"Address must contain one @ character\",EMPTY_LOCAL:\"Address local part cannot be empty\",ADDRESS_TOO_LONG:\"Address too long\",LOCAL_TOO_LONG:\"Address local part too long\",EMPTY_LOCAL_SEGMENT:\"Address local part contains empty dot-separated segment\",INVALID_LOCAL_CHARS:\"Address local part contains invalid character\",DOMAIN_NON_EMPTY_STRING:\"Domain must be a non-empty string\",DOMAIN_TOO_LONG:\"Domain too long\",DOMAIN_INVALID_UNICODE_CHARS:\"Domain contains forbidden Unicode characters\",DOMAIN_INVALID_CHARS:\"Domain contains invalid character\",DOMAIN_INVALID_TLDS_CHARS:\"Domain contains invalid tld character\",DOMAIN_SEGMENTS_COUNT:\"Domain lacks the minimum required number of segments\",DOMAIN_SEGMENTS_COUNT_MAX:\"Domain contains too many segments\",DOMAIN_FORBIDDEN_TLDS:\"Domain uses forbidden TLD\",DOMAIN_EMPTY_SEGMENT:\"Domain contains empty dot-separated segment\",DOMAIN_LONG_SEGMENT:\"Domain contains dot-separated segment that is too long\"},t.code=function(e){return{code:e,error:t.codes[e]}}},9959:(e,t,r)=>{\"use strict\";const s=r(375),n=r(5752);t.regex=function(e={}){s(void 0===e.cidr||\"string\"==typeof e.cidr,\"options.cidr must be a string\");const t=e.cidr?e.cidr.toLowerCase():\"optional\";s([\"required\",\"optional\",\"forbidden\"].includes(t),\"options.cidr must be one of required, optional, forbidden\"),s(void 0===e.version||\"string\"==typeof e.version||Array.isArray(e.version),\"options.version must be a string or an array of string\");let r=e.version||[\"ipv4\",\"ipv6\",\"ipvfuture\"];Array.isArray(r)||(r=[r]),s(r.length>=1,\"options.version must have at least 1 version specified\");for(let e=0;e<r.length;++e)s(\"string\"==typeof r[e],\"options.version must only contain strings\"),r[e]=r[e].toLowerCase(),s([\"ipv4\",\"ipv6\",\"ipvfuture\"].includes(r[e]),\"options.version contains unknown version \"+r[e]+\" - must be one of ipv4, ipv6, ipvfuture\");r=Array.from(new Set(r));const a=r.map((e=>{if(\"forbidden\"===t)return n.ip[e];const r=\"\\\\/\".concat(\"ipv4\"===e?n.ip.v4Cidr:n.ip.v6Cidr);return\"required\"===t?\"\".concat(n.ip[e]).concat(r):\"\".concat(n.ip[e],\"(?:\").concat(r,\")?\")})),o=\"(?:\".concat(a.join(\"|\"),\")\"),i=new RegExp(\"^\".concat(o,\"$\"));return{cidr:t,versions:r,regex:i,raw:o}}},5752:(e,t,r)=>{\"use strict\";const s=r(375),n=r(6064),a={generate:function(){const e={},t=\"!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=\",r=\"\\\\w-\\\\.~%\\\\dA-Fa-f\"+t+\":@\",s=\"[\"+r+\"]\",n=\"(?:0{0,2}\\\\d|0?[1-9]\\\\d|1\\\\d\\\\d|2[0-4]\\\\d|25[0-5])\";e.ipv4address=\"(?:\"+n+\"\\\\.){3}\"+n;const a=\"[\\\\dA-Fa-f]{1,4}\",o=\"(?:\"+a+\":\"+a+\"|\"+e.ipv4address+\")\",i=\"(?:\"+a+\":){6}\"+o,l=\"::(?:\"+a+\":){5}\"+o,c=\"(?:\"+a+\")?::(?:\"+a+\":){4}\"+o,u=\"(?:(?:\"+a+\":){0,1}\"+a+\")?::(?:\"+a+\":){3}\"+o,f=\"(?:(?:\"+a+\":){0,2}\"+a+\")?::(?:\"+a+\":){2}\"+o,m=\"(?:(?:\"+a+\":){0,3}\"+a+\")?::\"+a+\":\"+o,h=\"(?:(?:\"+a+\":){0,4}\"+a+\")?::\"+o;e.ipv4Cidr=\"(?:\\\\d|[1-2]\\\\d|3[0-2])\",e.ipv6Cidr=\"(?:0{0,2}\\\\d|0?[1-9]\\\\d|1[01]\\\\d|12[0-8])\",e.ipv6address=\"(?:\"+i+\"|\"+l+\"|\"+c+\"|\"+u+\"|\"+f+\"|\"+m+\"|\"+h+\"|(?:(?:[\\\\dA-Fa-f]{1,4}:){0,5}[\\\\dA-Fa-f]{1,4})?::[\\\\dA-Fa-f]{1,4}|(?:(?:[\\\\dA-Fa-f]{1,4}:){0,6}[\\\\dA-Fa-f]{1,4})?::)\",e.ipvFuture=\"v[\\\\dA-Fa-f]+\\\\.[\\\\w-\\\\.~\"+t+\":]+\",e.scheme=\"[a-zA-Z][a-zA-Z\\\\d+-\\\\.]*\",e.schemeRegex=new RegExp(e.scheme);const d=\"[\\\\w-\\\\.~%\\\\dA-Fa-f\"+t+\":]*\",p=\"(?:\\\\[(?:\"+e.ipv6address+\"|\"+e.ipvFuture+\")\\\\]|\"+e.ipv4address+\"|[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=]{1,255})\",g=\"(?:\"+d+\"@)?\"+p+\"(?::\\\\d*)?\",y=\"(?:\"+d+\"@)?(\"+p+\")(?::\\\\d*)?\",b=s+\"+\",v=\"(?:\\\\/[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@]*)*\",_=\"\\\\/(?:\"+b+v+\")?\",w=b+v,$=\"[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=@]+\"+v;return e.hierPart=\"(?:(?:\\\\/\\\\/\"+g+v+\")|\"+_+\"|\"+w+\"|(?:\\\\/\\\\/\\\\/[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@]*(?:\\\\/[\\\\w-\\\\.~%\\\\dA-Fa-f!\\\\$&'\\\\(\\\\)\\\\*\\\\+,;=:@]*)*))\",e.hierPartCapture=\"(?:(?:\\\\/\\\\/\"+y+v+\")|\"+_+\"|\"+w+\")\",e.relativeRef=\"(?:(?:\\\\/\\\\/\"+g+v+\")|\"+_+\"|\"+$+\"|)\",e.relativeRefCapture=\"(?:(?:\\\\/\\\\/\"+y+v+\")|\"+_+\"|\"+$+\"|)\",e.query=\"[\"+r+\"\\\\/\\\\?]*(?=#|$)\",e.queryWithSquareBrackets=\"[\"+r+\"\\\\[\\\\]\\\\/\\\\?]*(?=#|$)\",e.fragment=\"[\"+r+\"\\\\/\\\\?]*\",e}};a.rfc3986=a.generate(),t.ip={v4Cidr:a.rfc3986.ipv4Cidr,v6Cidr:a.rfc3986.ipv6Cidr,ipv4:a.rfc3986.ipv4address,ipv6:a.rfc3986.ipv6address,ipvfuture:a.rfc3986.ipvFuture},a.createRegex=function(e){const t=a.rfc3986,r=\"(?:\\\\?\"+(e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+\")?(?:#\"+t.fragment+\")?\",o=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly)return a.wrap(o+r);let i=\"\";if(e.scheme){s(e.scheme instanceof RegExp||\"string\"==typeof e.scheme||Array.isArray(e.scheme),\"scheme must be a RegExp, String, or Array\");const r=[].concat(e.scheme);s(r.length>=1,\"scheme must have at least 1 scheme specified\");const a=[];for(let e=0;e<r.length;++e){const o=r[e];s(o instanceof RegExp||\"string\"==typeof o,\"scheme at position \"+e+\" must be a RegExp or String\"),o instanceof RegExp?a.push(o.source.toString()):(s(t.schemeRegex.test(o),\"scheme at position \"+e+\" must be a valid scheme\"),a.push(n(o)))}i=a.join(\"|\")}const l=\"(?:\"+(i?\"(?:\"+i+\")\":t.scheme)+\":\"+(e.domain?t.hierPartCapture:t.hierPart)+\")\",c=e.allowRelative?\"(?:\"+l+\"|\"+o+\")\":l;return a.wrap(c+r,i)},a.wrap=function(e,t){return{raw:e=\"(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])\".concat(e),regex:new RegExp(\"^\".concat(e,\"$\")),scheme:t}},a.uriRegex=a.createRegex({}),t.regex=function(e={}){return e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain?a.createRegex(e):a.uriRegex}},1447:(e,t)=>{\"use strict\";const r={operators:[\"!\",\"^\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\"<=\",\">\",\">=\",\"==\",\"!=\",\"&&\",\"||\",\"??\"],operatorCharacters:[\"!\",\"^\",\"*\",\"/\",\"%\",\"+\",\"-\",\"<\",\"=\",\">\",\"&\",\"|\",\"?\"],operatorsOrder:[[\"^\"],[\"*\",\"/\",\"%\"],[\"+\",\"-\"],[\"<\",\"<=\",\">\",\">=\"],[\"==\",\"!=\"],[\"&&\"],[\"||\",\"??\"]],operatorsPrefix:[\"!\",\"n\"],literals:{'\"':'\"',\"`\":\"`\",\"'\":\"'\",\"[\":\"]\"},numberRx:/^(?:[0-9]*\\.?[0-9]*){1}$/,tokenRx:/^[\\w\\$\\#\\.\\@\\:\\{\\}]+$/,symbol:Symbol(\"formula\"),settings:Symbol(\"settings\")};t.Parser=class{constructor(e,t={}){if(!t[r.settings]&&t.constants)for(const e in t.constants){const r=t.constants[e];if(null!==r&&![\"boolean\",\"number\",\"string\"].includes(typeof r))throw new Error(\"Formula constant \".concat(e,\" contains invalid \").concat(typeof r,\" value type\"))}this.settings=t[r.settings]?t:Object.assign({[r.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let s=[],n=\"\",a=0,o=!1;const i=e=>{if(a)throw new Error(\"Formula missing closing parenthesis\");const i=s.length?s[s.length-1]:null;if(o||n||e){if(i&&\"reference\"===i.type&&\")\"===e)return i.type=\"function\",i.value=this._subFormula(n,i.value),void(n=\"\");if(\")\"===e){const e=new t.Parser(n,this.settings);s.push({type:\"segment\",value:e})}else if(o){if(\"]\"===o)return s.push({type:\"reference\",value:n}),void(n=\"\");s.push({type:\"literal\",value:n})}else if(r.operatorCharacters.includes(n))i&&\"operator\"===i.type&&r.operators.includes(i.value+n)?i.value+=n:s.push({type:\"operator\",value:n});else if(n.match(r.numberRx))s.push({type:\"constant\",value:parseFloat(n)});else if(void 0!==this.settings.constants[n])s.push({type:\"constant\",value:this.settings.constants[n]});else{if(!n.match(r.tokenRx))throw new Error(\"Formula contains invalid token: \".concat(n));s.push({type:\"reference\",value:n})}n=\"\"}};for(const t of e)o?t===o?(i(),o=!1):n+=t:a?\"(\"===t?(n+=t,++a):\")\"===t?(--a,a?n+=t:i(t)):n+=t:t in r.literals?o=r.literals[t]:\"(\"===t?(i(),++a):r.operatorCharacters.includes(t)?(i(),n=t,i()):\" \"!==t?n+=t:i();i(),s=s.map(((e,t)=>\"operator\"!==e.type||\"-\"!==e.value||t&&\"operator\"!==s[t-1].type?e:{type:\"operator\",value:\"n\"}));let l=!1;for(const e of s){if(\"operator\"===e.type){if(r.operatorsPrefix.includes(e.value))continue;if(!l)throw new Error(\"Formula contains an operator in invalid position\");if(!r.operators.includes(e.value))throw new Error(\"Formula contains an unknown operator \".concat(e.value))}else if(l)throw new Error(\"Formula missing expected operator\");l=!l}if(!l)throw new Error(\"Formula contains invalid trailing operator\");1===s.length&&[\"reference\",\"literal\",\"constant\"].includes(s[0].type)&&(this.single={type:\"reference\"===s[0].type?\"reference\":\"value\",value:s[0].value}),this._parts=s.map((e=>{if(\"operator\"===e.type)return r.operatorsPrefix.includes(e.value)?e:e.value;if(\"reference\"!==e.type)return e.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value))throw new Error(\"Formula contains invalid reference \".concat(e.value));return this.settings.reference?this.settings.reference(e.value):r.reference(e.value)}))}_subFormula(e,s){const n=this.settings.functions[s];if(\"function\"!=typeof n)throw new Error(\"Formula contains unknown function \".concat(s));let a=[];if(e){let t=\"\",n=0,o=!1;const i=()=>{if(!t)throw new Error(\"Formula contains function \".concat(s,\" with invalid arguments \").concat(e));a.push(t),t=\"\"};for(let s=0;s<e.length;++s){const a=e[s];o?(t+=a,a===o&&(o=!1)):a in r.literals&&!n?(t+=a,o=r.literals[a]):\",\"!==a||n?(t+=a,\"(\"===a?++n:\")\"===a&&--n):i()}i()}return a=a.map((e=>new t.Parser(e,this.settings))),function(e){const t=[];for(const r of a)t.push(r.evaluate(e));return n.call(e,...t)}}evaluate(e){const t=this._parts.slice();for(let s=t.length-2;s>=0;--s){const n=t[s];if(n&&\"operator\"===n.type){const a=t[s+1];t.splice(s+1,1);const o=r.evaluate(a,e);t[s]=r.single(n.value,o)}}return r.operatorsOrder.forEach((s=>{for(let n=1;n<t.length-1;)if(s.includes(t[n])){const s=t[n],a=r.evaluate(t[n-1],e),o=r.evaluate(t[n+1],e);t.splice(n,2);const i=r.calculate(s,a,o);t[n-1]=0===i?0:i}else n+=2})),r.evaluate(t[0],e)}},t.Parser.prototype[r.symbol]=!0,r.reference=function(e){return function(t){return t&&void 0!==t[e]?t[e]:null}},r.evaluate=function(e,t){return null===e?null:\"function\"==typeof e?e(t):e[r.symbol]?e.evaluate(t):e},r.single=function(e,t){if(\"!\"===e)return!t;const r=-t;return 0===r?0:r},r.calculate=function(e,t,s){if(\"??\"===e)return r.exists(t)?t:s;if(\"string\"==typeof t||\"string\"==typeof s){if(\"+\"===e)return(t=r.exists(t)?t:\"\")+(r.exists(s)?s:\"\")}else switch(e){case\"^\":return Math.pow(t,s);case\"*\":return t*s;case\"/\":return t/s;case\"%\":return t%s;case\"+\":return t+s;case\"-\":return t-s}switch(e){case\"<\":return t<s;case\"<=\":return t<=s;case\">\":return t>s;case\">=\":return t>=s;case\"==\":return t===s;case\"!=\":return t!==s;case\"&&\":return t&&s;case\"||\":return t||s}return null},r.exists=function(e){return null!=e}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{}},t={},function r(s){var n=t[s];if(void 0!==n)return n.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,r),a.exports}(5107);var e,t}));\n\n//# sourceURL=webpack://open-lens/./node_modules/joi/dist/joi-browser.min.js?");
14559
14559
 
14560
14560
  /***/ }),
14561
14561
 
@@ -18357,7 +18357,7 @@ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ?
18357
18357
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
18358
18358
 
18359
18359
  "use strict";
18360
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ObservableHistory = exports.createObservableHistory = void 0;\nconst mobx_1 = __webpack_require__(/*! mobx */ \"./node_modules/mobx-observable-history/node_modules/mobx/dist/mobx.esm.js\");\nconst history_1 = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\nconst observable_search_params_1 = __webpack_require__(/*! ./observable-search-params */ \"./node_modules/mobx-observable-history/lib/observable-search-params.js\");\nfunction createObservableHistory(history, opts) {\n return new ObservableHistory(history, opts);\n}\nexports.createObservableHistory = createObservableHistory;\nclass ObservableHistory {\n constructor(history = history_1.createBrowserHistory(), opts = {}) {\n Object.defineProperty(this, \"opts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: opts\n });\n Object.defineProperty(this, \"history\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"unbindEvents\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"action\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"location\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"searchParams\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n mobx_1.makeObservable(this);\n this.history = history;\n this.action = this.history.action;\n this.location = this.history.location;\n this.searchParams = new observable_search_params_1.ObservableSearchParams(this.location.search, opts.searchParams);\n this.unbindEvents = this.bindEvents();\n return new Proxy(this, {\n get: (target, prop, context) => {\n let fieldRef = Reflect.get(target, prop, context);\n if (!(prop in target)) {\n return Reflect.get(this.history, prop, context); // handle history.js native apis\n }\n return fieldRef;\n },\n });\n }\n bindEvents() {\n const disposers = [\n // normalize direct updates of `history.location = string | LocationDescriptor`\n mobx_1.intercept(this, change => {\n if (change.type === \"update\") {\n switch (change.name) {\n case \"location\":\n change.newValue = this.normalize(change.newValue);\n break;\n }\n }\n return change;\n }),\n // normalize partial updates of `history.location.(search|hash|pathname) = string`\n mobx_1.intercept(this.location, change => {\n if (change.type === \"update\") {\n switch (change.name) {\n case \"search\":\n change.newValue = this.normalize(change.newValue).search;\n break;\n case \"hash\":\n change.newValue = this.normalize(change.newValue).hash;\n break;\n }\n }\n return change;\n }),\n // sync location.search with URLSearchParams()-helper\n mobx_1.reaction(() => this.location.search, search => {\n const params = this.searchParams.toString({ withPrefix: true });\n if (search !== params) {\n this.searchParams.replace(search);\n }\n }),\n // sync from URLSearchParams()-api updates\n mobx_1.reaction(() => this.searchParams.toString({ withPrefix: true }), search => {\n if (this.location.search !== search) {\n this.location.search = search;\n }\n }),\n // update history.js state from observable location changes\n mobx_1.reaction(() => history_1.createPath(this.location), path => {\n let currentPath = history_1.createPath(this.history.location);\n if (currentPath !== path) {\n this.history.push(path);\n }\n }),\n // sync state updates from history.js native apis\n this.history.listen(mobx_1.action((location, action) => {\n this.action = action;\n this.location = this.normalize(location);\n })),\n ];\n return () => {\n disposers.forEach(dispose => dispose());\n };\n }\n normalize(location, { skipEmpty = false } = {}) {\n if (typeof location === \"string\")\n location = history_1.parsePath(location);\n if (location.search == \"?\")\n location.search = \"\";\n if (location.hash == \"#\")\n location.hash = \"\";\n if (skipEmpty) {\n location = Object.fromEntries(Object.entries(location).filter(([chunk, value]) => !!value));\n }\n return location;\n }\n merge(location, replace = false) {\n location = Object.assign(Object.assign({}, this.location), this.normalize(location));\n if (replace) {\n this.history.replace(location);\n }\n else {\n this.history.push(location);\n }\n }\n destroy() {\n var _a;\n (_a = this.unbindEvents) === null || _a === void 0 ? void 0 : _a.call(this);\n return this.history;\n }\n toString() {\n return history_1.createPath(this.location);\n }\n}\n__decorate([\n mobx_1.observable\n], ObservableHistory.prototype, \"action\", void 0);\n__decorate([\n mobx_1.observable\n], ObservableHistory.prototype, \"location\", void 0);\n__decorate([\n mobx_1.observable.ref\n], ObservableHistory.prototype, \"searchParams\", void 0);\nexports.ObservableHistory = ObservableHistory;\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-observable-history/lib/observable-history.js?");
18360
+ eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ObservableHistory = exports.createObservableHistory = void 0;\nconst mobx_1 = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\nconst history_1 = __webpack_require__(/*! history */ \"./node_modules/history/esm/history.js\");\nconst observable_search_params_1 = __webpack_require__(/*! ./observable-search-params */ \"./node_modules/mobx-observable-history/lib/observable-search-params.js\");\nfunction createObservableHistory(history, opts) {\n return new ObservableHistory(history, opts);\n}\nexports.createObservableHistory = createObservableHistory;\nclass ObservableHistory {\n constructor(history = history_1.createBrowserHistory(), opts = {}) {\n Object.defineProperty(this, \"opts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: opts\n });\n Object.defineProperty(this, \"history\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"unbindEvents\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"action\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"location\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"searchParams\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n mobx_1.makeObservable(this);\n this.history = history;\n this.action = this.history.action;\n this.location = this.history.location;\n this.searchParams = new observable_search_params_1.ObservableSearchParams(this.location.search, opts.searchParams);\n this.unbindEvents = this.bindEvents();\n return new Proxy(this, {\n get: (target, prop, context) => {\n let fieldRef = Reflect.get(target, prop, context);\n if (!(prop in target)) {\n return Reflect.get(this.history, prop, context); // handle history.js native apis\n }\n return fieldRef;\n },\n });\n }\n bindEvents() {\n const disposers = [\n // normalize direct updates of `history.location = string | LocationDescriptor`\n mobx_1.intercept(this, change => {\n if (change.type === \"update\") {\n switch (change.name) {\n case \"location\":\n change.newValue = this.normalize(change.newValue);\n break;\n }\n }\n return change;\n }),\n // normalize partial updates of `history.location.(search|hash|pathname) = string`\n mobx_1.intercept(this.location, change => {\n if (change.type === \"update\") {\n switch (change.name) {\n case \"search\":\n change.newValue = this.normalize(change.newValue).search;\n break;\n case \"hash\":\n change.newValue = this.normalize(change.newValue).hash;\n break;\n }\n }\n return change;\n }),\n // sync location.search with URLSearchParams()-helper\n mobx_1.reaction(() => this.location.search, search => {\n const params = this.searchParams.toString({ withPrefix: true });\n if (search !== params) {\n this.searchParams.replace(search);\n }\n }),\n // sync from URLSearchParams()-api updates\n mobx_1.reaction(() => this.searchParams.toString({ withPrefix: true }), search => {\n if (this.location.search !== search) {\n this.location.search = search;\n }\n }),\n // update history.js state from observable location changes\n mobx_1.reaction(() => history_1.createPath(this.location), path => {\n let currentPath = history_1.createPath(this.history.location);\n if (currentPath !== path) {\n this.history.push(path);\n }\n }),\n // sync state updates from history.js native apis\n this.history.listen(mobx_1.action((location, action) => {\n this.action = action;\n this.location = this.normalize(location);\n })),\n ];\n return () => {\n disposers.forEach(dispose => dispose());\n };\n }\n normalize(location, { skipEmpty = false } = {}) {\n if (typeof location === \"string\")\n location = history_1.parsePath(location);\n if (location.search == \"?\")\n location.search = \"\";\n if (location.hash == \"#\")\n location.hash = \"\";\n if (skipEmpty) {\n location = Object.fromEntries(Object.entries(location).filter(([chunk, value]) => !!value));\n }\n return location;\n }\n merge(location, replace = false) {\n location = Object.assign(Object.assign({}, this.location), this.normalize(location));\n if (replace) {\n this.history.replace(location);\n }\n else {\n this.history.push(location);\n }\n }\n destroy() {\n var _a;\n (_a = this.unbindEvents) === null || _a === void 0 ? void 0 : _a.call(this);\n return this.history;\n }\n toString() {\n return history_1.createPath(this.location);\n }\n}\n__decorate([\n mobx_1.observable\n], ObservableHistory.prototype, \"action\", void 0);\n__decorate([\n mobx_1.observable\n], ObservableHistory.prototype, \"location\", void 0);\n__decorate([\n mobx_1.observable.ref\n], ObservableHistory.prototype, \"searchParams\", void 0);\nexports.ObservableHistory = ObservableHistory;\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-observable-history/lib/observable-history.js?");
18361
18361
 
18362
18362
  /***/ }),
18363
18363
 
@@ -18368,18 +18368,7 @@ eval("\nvar __decorate = (this && this.__decorate) || function (decorators, targ
18368
18368
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
18369
18369
 
18370
18370
  "use strict";
18371
- eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ObservableSearchParams = void 0;\nconst mobx_1 = __webpack_require__(/*! mobx */ \"./node_modules/mobx-observable-history/node_modules/mobx/dist/mobx.esm.js\");\nclass ObservableSearchParams {\n constructor(init, opts = {}) {\n Object.defineProperty(this, \"opts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: opts\n });\n Object.defineProperty(this, \"search\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"\"\n });\n Object.defineProperty(this, \"searchParams\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n mobx_1.makeObservable(this);\n this.opts = Object.assign({ skipEmpty: true, joinArrays: false, joinArraysWith: \",\" }, opts);\n this.search = this.normalize(init);\n this.searchParams = new URLSearchParams(init);\n return new Proxy(this, {\n getPrototypeOf(target) {\n return URLSearchParams.prototype;\n },\n get: (target, prop, context) => {\n let fieldRef = Reflect.get(target, prop, context);\n // handle native URLSearchParams()-api updates via proxy-object\n if (!(prop in target)) {\n fieldRef = Reflect.get(this.searchParams, prop, context);\n if (typeof fieldRef === \"function\") {\n return (...args) => {\n let oldValue = this.searchParams.toString();\n let result = Reflect.apply(fieldRef, this.searchParams, args);\n let newValue = this.searchParams.toString();\n let isChanged = oldValue !== newValue;\n if (isChanged) {\n this.replace(newValue);\n }\n return result;\n };\n }\n }\n return fieldRef;\n },\n });\n }\n normalize(search = \"\") {\n const { joinArrays, joinArraysWith, skipEmpty } = this.opts;\n const params = {};\n const normalizedParams = [];\n Array.from(new URLSearchParams(search)).forEach(([param, value]) => {\n var _a;\n if (skipEmpty && !value)\n return;\n const values = joinArrays ? value.split(joinArraysWith) : [value];\n (_a = params[param]) !== null && _a !== void 0 ? _a : (params[param] = []);\n params[param].push(...values);\n });\n Object.entries(params).forEach(([name, values]) => {\n if (joinArrays) {\n normalizedParams.push([name, values.join(joinArraysWith)]);\n }\n else {\n const multiParamsWithSameKey = values.map(value => [name, value]);\n normalizedParams.push(...multiParamsWithSameKey);\n }\n });\n return new URLSearchParams(normalizedParams).toString();\n }\n replace(search) {\n search = this.normalize(search);\n if (this.search !== search) {\n this.search = search;\n this.searchParams = new URLSearchParams(search);\n }\n }\n merge(search) {\n search = this.normalize(search);\n this.replace(`${this.search}&${search}`);\n }\n deleteAll() {\n this.search = \"\";\n Array.from(this.searchParams.keys()).forEach(key => {\n this.searchParams.delete(key);\n });\n }\n getAll(param) {\n const values = this.searchParams.getAll(param);\n const { joinArrays, joinArraysWith } = this.opts;\n if (joinArrays) {\n return values.flatMap(param => param.split(joinArraysWith));\n }\n return values;\n }\n toString({ withPrefix = false } = {}) {\n if (!this.search)\n return \"\";\n return `${withPrefix ? \"?\" : \"\"}${this.search}`;\n }\n}\n__decorate([\n mobx_1.observable\n], ObservableSearchParams.prototype, \"search\", void 0);\n__decorate([\n mobx_1.observable.ref\n], ObservableSearchParams.prototype, \"searchParams\", void 0);\n__decorate([\n mobx_1.action\n], ObservableSearchParams.prototype, \"replace\", null);\n__decorate([\n mobx_1.action\n], ObservableSearchParams.prototype, \"deleteAll\", null);\nexports.ObservableSearchParams = ObservableSearchParams;\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-observable-history/lib/observable-search-params.js?");
18372
-
18373
- /***/ }),
18374
-
18375
- /***/ "./node_modules/mobx-observable-history/node_modules/mobx/dist/mobx.esm.js":
18376
- /*!*********************************************************************************!*\
18377
- !*** ./node_modules/mobx-observable-history/node_modules/mobx/dist/mobx.esm.js ***!
18378
- \*********************************************************************************/
18379
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18380
-
18381
- "use strict";
18382
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"$mobx\": () => (/* binding */ $mobx),\n/* harmony export */ \"FlowCancellationError\": () => (/* binding */ FlowCancellationError),\n/* harmony export */ \"ObservableMap\": () => (/* binding */ ObservableMap),\n/* harmony export */ \"ObservableSet\": () => (/* binding */ ObservableSet),\n/* harmony export */ \"Reaction\": () => (/* binding */ Reaction),\n/* harmony export */ \"_allowStateChanges\": () => (/* binding */ allowStateChanges),\n/* harmony export */ \"_allowStateChangesInsideComputed\": () => (/* binding */ runInAction),\n/* harmony export */ \"_allowStateReadsEnd\": () => (/* binding */ allowStateReadsEnd),\n/* harmony export */ \"_allowStateReadsStart\": () => (/* binding */ allowStateReadsStart),\n/* harmony export */ \"_autoAction\": () => (/* binding */ autoAction),\n/* harmony export */ \"_endAction\": () => (/* binding */ _endAction),\n/* harmony export */ \"_getAdministration\": () => (/* binding */ getAdministration),\n/* harmony export */ \"_getGlobalState\": () => (/* binding */ getGlobalState),\n/* harmony export */ \"_interceptReads\": () => (/* binding */ interceptReads),\n/* harmony export */ \"_isComputingDerivation\": () => (/* binding */ isComputingDerivation),\n/* harmony export */ \"_resetGlobalState\": () => (/* binding */ resetGlobalState),\n/* harmony export */ \"_startAction\": () => (/* binding */ _startAction),\n/* harmony export */ \"action\": () => (/* binding */ action),\n/* harmony export */ \"autorun\": () => (/* binding */ autorun),\n/* harmony export */ \"comparer\": () => (/* binding */ comparer),\n/* harmony export */ \"computed\": () => (/* binding */ computed),\n/* harmony export */ \"configure\": () => (/* binding */ configure),\n/* harmony export */ \"createAtom\": () => (/* binding */ createAtom),\n/* harmony export */ \"defineProperty\": () => (/* binding */ apiDefineProperty),\n/* harmony export */ \"entries\": () => (/* binding */ entries),\n/* harmony export */ \"extendObservable\": () => (/* binding */ extendObservable),\n/* harmony export */ \"flow\": () => (/* binding */ flow),\n/* harmony export */ \"flowResult\": () => (/* binding */ flowResult),\n/* harmony export */ \"get\": () => (/* binding */ get),\n/* harmony export */ \"getAtom\": () => (/* binding */ getAtom),\n/* harmony export */ \"getDebugName\": () => (/* binding */ getDebugName),\n/* harmony export */ \"getDependencyTree\": () => (/* binding */ getDependencyTree),\n/* harmony export */ \"getObserverTree\": () => (/* binding */ getObserverTree),\n/* harmony export */ \"has\": () => (/* binding */ has),\n/* harmony export */ \"intercept\": () => (/* binding */ intercept),\n/* harmony export */ \"isAction\": () => (/* binding */ isAction),\n/* harmony export */ \"isBoxedObservable\": () => (/* binding */ isObservableValue),\n/* harmony export */ \"isComputed\": () => (/* binding */ isComputed),\n/* harmony export */ \"isComputedProp\": () => (/* binding */ isComputedProp),\n/* harmony export */ \"isFlow\": () => (/* binding */ isFlow),\n/* harmony export */ \"isFlowCancellationError\": () => (/* binding */ isFlowCancellationError),\n/* harmony export */ \"isObservable\": () => (/* binding */ isObservable),\n/* harmony export */ \"isObservableArray\": () => (/* binding */ isObservableArray),\n/* harmony export */ \"isObservableMap\": () => (/* binding */ isObservableMap),\n/* harmony export */ \"isObservableObject\": () => (/* binding */ isObservableObject),\n/* harmony export */ \"isObservableProp\": () => (/* binding */ isObservableProp),\n/* harmony export */ \"isObservableSet\": () => (/* binding */ isObservableSet),\n/* harmony export */ \"keys\": () => (/* binding */ keys),\n/* harmony export */ \"makeAutoObservable\": () => (/* binding */ makeAutoObservable),\n/* harmony export */ \"makeObservable\": () => (/* binding */ makeObservable),\n/* harmony export */ \"observable\": () => (/* binding */ observable),\n/* harmony export */ \"observe\": () => (/* binding */ observe),\n/* harmony export */ \"onBecomeObserved\": () => (/* binding */ onBecomeObserved),\n/* harmony export */ \"onBecomeUnobserved\": () => (/* binding */ onBecomeUnobserved),\n/* harmony export */ \"onReactionError\": () => (/* binding */ onReactionError),\n/* harmony export */ \"override\": () => (/* binding */ override),\n/* harmony export */ \"ownKeys\": () => (/* binding */ apiOwnKeys),\n/* harmony export */ \"reaction\": () => (/* binding */ reaction),\n/* harmony export */ \"remove\": () => (/* binding */ remove),\n/* harmony export */ \"runInAction\": () => (/* binding */ runInAction),\n/* harmony export */ \"set\": () => (/* binding */ set),\n/* harmony export */ \"spy\": () => (/* binding */ spy),\n/* harmony export */ \"toJS\": () => (/* binding */ toJS),\n/* harmony export */ \"trace\": () => (/* binding */ trace),\n/* harmony export */ \"transaction\": () => (/* binding */ transaction),\n/* harmony export */ \"untracked\": () => (/* binding */ untracked),\n/* harmony export */ \"values\": () => (/* binding */ values),\n/* harmony export */ \"when\": () => (/* binding */ when)\n/* harmony export */ });\nvar niceErrors = {\n 0: \"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'\",\n 1: function _(annotationType, key) {\n return \"Cannot apply '\" + annotationType + \"' to '\" + key.toString() + \"': Field not found.\";\n },\n\n /*\r\n 2(prop) {\r\n return `invalid decorator for '${prop.toString()}'`\r\n },\r\n 3(prop) {\r\n return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.`\r\n },\r\n 4(prop) {\r\n return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.`\r\n },\r\n */\n 5: \"'keys()' can only be used on observable objects, arrays, sets and maps\",\n 6: \"'values()' can only be used on observable objects, arrays, sets and maps\",\n 7: \"'entries()' can only be used on observable objects, arrays and maps\",\n 8: \"'set()' can only be used on observable objects, arrays and maps\",\n 9: \"'remove()' can only be used on observable objects, arrays and maps\",\n 10: \"'has()' can only be used on observable objects, arrays and maps\",\n 11: \"'get()' can only be used on observable objects, arrays and maps\",\n 12: \"Invalid annotation\",\n 13: \"Dynamic observable objects cannot be frozen\",\n 14: \"Intercept handlers should return nothing or a change object\",\n 15: \"Observable arrays cannot be frozen\",\n 16: \"Modification exception: the internal structure of an observable array was changed.\",\n 17: function _(index, length) {\n return \"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + length;\n },\n 18: \"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\",\n 19: function _(other) {\n return \"Cannot initialize from classes that inherit from Map: \" + other.constructor.name;\n },\n 20: function _(other) {\n return \"Cannot initialize map from \" + other;\n },\n 21: function _(dataStructure) {\n return \"Cannot convert to map from '\" + dataStructure + \"'\";\n },\n 22: \"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\",\n 23: \"It is not possible to get index atoms from arrays\",\n 24: function _(thing) {\n return \"Cannot obtain administration from \" + thing;\n },\n 25: function _(property, name) {\n return \"the entry '\" + property + \"' does not exist in the observable map '\" + name + \"'\";\n },\n 26: \"please specify a property\",\n 27: function _(property, name) {\n return \"no observable property '\" + property.toString() + \"' found on the observable object '\" + name + \"'\";\n },\n 28: function _(thing) {\n return \"Cannot obtain atom from \" + thing;\n },\n 29: \"Expecting some object\",\n 30: \"invalid action stack. did you forget to finish an action?\",\n 31: \"missing option for computed: get\",\n 32: function _(name, derivation) {\n return \"Cycle detected in computation \" + name + \": \" + derivation;\n },\n 33: function _(name) {\n return \"The setter of computed value '\" + name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\";\n },\n 34: function _(name) {\n return \"[ComputedValue '\" + name + \"'] It is not possible to assign a new value to a computed value.\";\n },\n 35: \"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\",\n 36: \"isolateGlobalState should be called before MobX is running any reactions\",\n 37: function _(method) {\n return \"[mobx] `observableArray.\" + method + \"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice().\" + method + \"()` instead\";\n },\n 38: \"'ownKeys()' can only be used on observable objects\",\n 39: \"'defineProperty()' can only be used on observable objects\"\n};\nvar errors = true ? niceErrors : 0;\nfunction die(error) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (true) {\n var e = typeof error === \"string\" ? error : errors[error];\n if (typeof e === \"function\") e = e.apply(null, args);\n throw new Error(\"[MobX] \" + e);\n }\n\n throw new Error(typeof error === \"number\" ? \"[MobX] minified error nr: \" + error + (args.length ? \" \" + args.map(String).join(\",\") : \"\") + \". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts\" : \"[MobX] \" + error);\n}\n\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n\n if (typeof window !== \"undefined\") {\n return window;\n }\n\n if (typeof global !== \"undefined\") {\n return global;\n }\n\n if (typeof self !== \"undefined\") {\n return self;\n }\n\n return mockGlobal;\n}\n\nvar assign = Object.assign;\nvar getDescriptor = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar objectPrototype = Object.prototype;\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nvar hasProxy = typeof Proxy !== \"undefined\";\nvar plainObjectString = /*#__PURE__*/Object.toString();\nfunction assertProxies() {\n if (!hasProxy) {\n die( true ? \"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`\" : 0);\n }\n}\nfunction warnAboutProxyRequirement(msg) {\n if ( true && globalState.verifyProxies) {\n die(\"MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to \" + msg);\n }\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\n/**\r\n * Makes sure that the provided function is invoked at most once.\r\n */\n\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked) return;\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function noop() {};\nfunction isFunction(fn) {\n return typeof fn === \"function\";\n}\nfunction isStringish(value) {\n var t = typeof value;\n\n switch (t) {\n case \"string\":\n case \"symbol\":\n case \"number\":\n return true;\n }\n\n return false;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n var _proto$constructor;\n\n if (!isObject(value)) return false;\n var proto = Object.getPrototypeOf(value);\n if (proto == null) return true;\n return ((_proto$constructor = proto.constructor) == null ? void 0 : _proto$constructor.toString()) === plainObjectString;\n} // https://stackoverflow.com/a/37865170\n\nfunction isGenerator(obj) {\n var constructor = obj == null ? void 0 : obj.constructor;\n if (!constructor) return false;\n if (\"GeneratorFunction\" === constructor.name || \"GeneratorFunction\" === constructor.displayName) return true;\n return false;\n}\nfunction addHiddenProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction createInstanceofPredicate(name, theClass) {\n var propName = \"isMobX\" + name;\n theClass.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\nfunction isES6Map(thing) {\n return thing instanceof Map;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\nvar hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== \"undefined\";\n/**\r\n * Returns the following: own enumerable keys and symbols.\r\n */\n\nfunction getPlainObjectKeys(object) {\n var keys = Object.keys(object); // Not supported in IE, so there are not going to be symbol props anyway...\n\n if (!hasGetOwnPropertySymbols) return keys;\n var symbols = Object.getOwnPropertySymbols(object);\n if (!symbols.length) return keys;\n return [].concat(keys, symbols.filter(function (s) {\n return objectPrototype.propertyIsEnumerable.call(object, s);\n }));\n} // From Immer utils\n// Returns all own keys, including non-enumerable and symbolic\n\nvar ownKeys = typeof Reflect !== \"undefined\" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {\n return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));\n} :\n/* istanbul ignore next */\nObject.getOwnPropertyNames;\nfunction stringifyKey(key) {\n if (typeof key === \"string\") return key;\n if (typeof key === \"symbol\") return key.toString();\n return new String(key).toString();\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\nfunction hasProp(target, prop) {\n return objectPrototype.hasOwnProperty.call(target, prop);\n} // From Immer utils\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(target) {\n // Polyfill needed for Hermes and IE, see https://github.com/facebook/hermes/issues/274\n var res = {}; // Note: without polyfill for ownKeys, symbols won't be picked up\n\n ownKeys(target).forEach(function (key) {\n res[key] = getDescriptor(target, key);\n });\n return res;\n};\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n}\n\nvar storedAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-stored-annotations\");\n/**\r\n * Creates a function that acts as\r\n * - decorator\r\n * - annotation object\r\n */\n\nfunction createDecoratorAnnotation(annotation) {\n function decorator(target, property) {\n storeAnnotation(target, property, annotation);\n }\n\n return Object.assign(decorator, annotation);\n}\n/**\r\n * Stores annotation to prototype,\r\n * so it can be inspected later by `makeObservable` called from constructor\r\n */\n\nfunction storeAnnotation(prototype, key, annotation) {\n if (!hasProp(prototype, storedAnnotationsSymbol)) {\n addHiddenProp(prototype, storedAnnotationsSymbol, _extends({}, prototype[storedAnnotationsSymbol]));\n } // @override must override something\n\n\n if ( true && isOverride(annotation) && !hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n die(\"'\" + fieldName + \"' is decorated with 'override', \" + \"but no such decorated member was found on prototype.\");\n } // Cannot re-decorate\n\n\n assertNotDecorated(prototype, annotation, key); // Ignore override\n\n if (!isOverride(annotation)) {\n prototype[storedAnnotationsSymbol][key] = annotation;\n }\n}\n\nfunction assertNotDecorated(prototype, annotation, key) {\n if ( true && !isOverride(annotation) && hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '@\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already decorated with '@\" + currentAnnotationType + \"'.\") + \"\\nRe-decorating fields is not allowed.\" + \"\\nUse '@override' decorator for methods overriden by subclass.\");\n }\n}\n/**\r\n * Collects annotations from prototypes and stores them on target (instance)\r\n */\n\n\nfunction collectStoredAnnotations(target) {\n if (!hasProp(target, storedAnnotationsSymbol)) {\n if ( true && !target[storedAnnotationsSymbol]) {\n die(\"No annotations were passed to makeObservable, but no decorated members have been found either\");\n } // We need a copy as we will remove annotation from the list once it's applied.\n\n\n addHiddenProp(target, storedAnnotationsSymbol, _extends({}, target[storedAnnotationsSymbol]));\n }\n\n return target[storedAnnotationsSymbol];\n}\n\nvar $mobx = /*#__PURE__*/Symbol(\"mobx administration\");\nvar Atom = /*#__PURE__*/function () {\n // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n\n /**\r\n * Create a new atom. For debugging purposes it is recommended to give it a name.\r\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\r\n */\n function Atom(name_) {\n if (name_ === void 0) {\n name_ = true ? \"Atom@\" + getNextId() : 0;\n }\n\n this.name_ = void 0;\n this.isPendingUnobservation_ = false;\n this.isBeingObserved_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.NOT_TRACKING_;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n this.name_ = name_;\n } // onBecomeObservedListeners\n\n\n var _proto = Atom.prototype;\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Invoke this method to notify mobx that your atom has been used somehow.\r\n * Returns true if there is currently a reactive context.\r\n */\n ;\n\n _proto.reportObserved = function reportObserved$1() {\n return reportObserved(this);\n }\n /**\r\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\r\n */\n ;\n\n _proto.reportChanged = function reportChanged() {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n\n _proto.toString = function toString() {\n return this.name_;\n };\n\n return Atom;\n}();\nvar isAtom = /*#__PURE__*/createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) {\n onBecomeObservedHandler = noop;\n }\n\n if (onBecomeUnobservedHandler === void 0) {\n onBecomeUnobservedHandler = noop;\n }\n\n var atom = new Atom(name); // default `noop` listener will not initialize the hook Set\n\n if (onBecomeObservedHandler !== noop) {\n onBecomeObserved(atom, onBecomeObservedHandler);\n }\n\n if (onBecomeUnobservedHandler !== noop) {\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n }\n\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\n\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\n\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\n\nfunction defaultComparer(a, b) {\n return Object.is(a, b);\n}\n\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n \"default\": defaultComparer,\n shallow: shallowComparer\n};\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v)) return v; // something that can be converted and mutated?\n\n if (Array.isArray(v)) return observable.array(v, {\n name: name\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name\n });\n\n if (typeof v === \"function\" && !isAction(v) && !isFlow(v)) {\n if (isGenerator(v)) {\n return flow(v);\n } else {\n return autoAction(name, v);\n }\n }\n\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null) return v;\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v)) return v;\n if (Array.isArray(v)) return observable.array(v, {\n name: name,\n deep: false\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name,\n deep: false\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name,\n deep: false\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name,\n deep: false\n });\n if (true) die(\"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue) {\n if ( true && isObservable(v)) die(\"observable.struct should not be used with observable values\");\n if (deepEqual(v, oldValue)) return oldValue;\n return v;\n}\n\nvar OVERRIDE = \"override\";\nvar override = /*#__PURE__*/createDecoratorAnnotation({\n annotationType_: OVERRIDE,\n make_: make_,\n extend_: extend_\n});\nfunction isOverride(annotation) {\n return annotation.annotationType_ === OVERRIDE;\n}\n\nfunction make_(adm, key) {\n // Must not be plain object\n if ( true && adm.isPlainObject_) {\n die(\"Cannot apply '\" + this.annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + this.annotationType_ + \"' cannot be used on plain objects.\"));\n } // Must override something\n\n\n if ( true && !hasProp(adm.appliedAnnotations_, key)) {\n die(\"'\" + adm.name_ + \".\" + key.toString() + \"' is annotated with '\" + this.annotationType_ + \"', \" + \"but no such annotated member was found on prototype.\");\n }\n\n return 0\n /* Cancel */\n ;\n}\n\nfunction extend_(adm, key, descriptor, proxyTrap) {\n die(\"'\" + this.annotationType_ + \"' can only be used with 'makeObservable'\");\n}\n\nfunction createActionAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$1,\n extend_: extend_$1\n };\n}\n\nfunction make_$1(adm, key, descriptor, source) {\n var _this$options_;\n\n // bound\n if ((_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n } // own\n\n\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // prototype\n\n\n if (isAction(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1\n /* Break */\n ;\n }\n\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false);\n defineProperty(source, key, actionDescriptor);\n return 2\n /* Continue */\n ;\n}\n\nfunction extend_$1(adm, key, descriptor, proxyTrap) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, actionDescriptor, proxyTrap);\n}\n\nfunction assertActionDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if ( true && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a function value.\"));\n }\n}\n\nfunction createActionDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n var _annotation$options_, _annotation$options_$, _annotation$options_2, _annotation$options_$2, _annotation$options_3;\n\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertActionDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n\n if ((_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.bound) {\n var _adm$proxy_;\n\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return {\n value: createAction((_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), value, (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createFlowAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$2,\n extend_: extend_$2\n };\n}\n\nfunction make_$2(adm, key, descriptor, source) {\n var _this$options_;\n\n // own\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // prototype\n // bound - must annotate protos to support super.flow()\n\n\n if (((_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) && !isFlow(adm.target_[key])) {\n if (this.extend_(adm, key, descriptor, false) === null) return 0\n /* Cancel */\n ;\n }\n\n if (isFlow(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1\n /* Break */\n ;\n }\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false);\n defineProperty(source, key, flowDescriptor);\n return 2\n /* Continue */\n ;\n}\n\nfunction extend_$2(adm, key, descriptor, proxyTrap) {\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, flowDescriptor, proxyTrap);\n}\n\nfunction assertFlowDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if ( true && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a generator function value.\"));\n }\n}\n\nfunction createFlowDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n var _annotation$options_;\n\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertFlowDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n\n if ((_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.bound) {\n var _adm$proxy_;\n\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return {\n value: flow(value),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createComputedAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$3,\n extend_: extend_$3\n };\n}\n\nfunction make_$3(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n}\n\nfunction extend_$3(adm, key, descriptor, proxyTrap) {\n assertComputedDescriptor(adm, this, key, descriptor);\n return adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }), proxyTrap);\n}\n\nfunction assertComputedDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var get = _ref2.get;\n\n if ( true && !get) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on getter(+setter) properties.\"));\n }\n}\n\nfunction createObservableAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$4,\n extend_: extend_$4\n };\n}\n\nfunction make_$4(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n}\n\nfunction extend_$4(adm, key, descriptor, proxyTrap) {\n var _this$options_$enhanc, _this$options_;\n\n assertObservableDescriptor(adm, this, key, descriptor);\n return adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc = (_this$options_ = this.options_) == null ? void 0 : _this$options_.enhancer) != null ? _this$options_$enhanc : deepEnhancer, proxyTrap);\n}\n\nfunction assertObservableDescriptor(adm, _ref, key, descriptor) {\n var annotationType_ = _ref.annotationType_;\n\n if ( true && !(\"value\" in descriptor)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' cannot be used on getter/setter properties\"));\n }\n}\n\nvar AUTO = \"true\";\nvar autoAnnotation = /*#__PURE__*/createAutoAnnotation();\nfunction createAutoAnnotation(options) {\n return {\n annotationType_: AUTO,\n options_: options,\n make_: make_$5,\n extend_: extend_$5\n };\n}\n\nfunction make_$5(adm, key, descriptor, source) {\n var _this$options_2, _this$options_3;\n\n // getter -> computed\n if (descriptor.get) {\n return computed.make_(adm, key, descriptor, source);\n } // lone setter -> action setter\n\n\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.make_\n var set = createAction(key.toString(), descriptor.set); // own\n\n if (source === adm.target_) {\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: set\n }) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // proto\n\n\n defineProperty(source, key, {\n configurable: true,\n set: set\n });\n return 2\n /* Continue */\n ;\n } // function on proto -> autoAction/flow\n\n\n if (source !== adm.target_ && typeof descriptor.value === \"function\") {\n var _this$options_;\n\n if (isGenerator(descriptor.value)) {\n return flow.make_(adm, key, descriptor, source);\n }\n\n var actionAnnotation = ((_this$options_ = this.options_) == null ? void 0 : _this$options_.autoBind) ? autoAction.bound : autoAction;\n return actionAnnotation.make_(adm, key, descriptor, source);\n } // other -> observable\n // Copy props from proto as well, see test:\n // \"decorate should work with Object.create\"\n\n\n var observableAnnotation = ((_this$options_2 = this.options_) == null ? void 0 : _this$options_2.deep) === false ? observable.ref : observable; // if function respect autoBind option\n\n if (typeof descriptor.value === \"function\" && ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.autoBind)) {\n var _adm$proxy_;\n\n descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return observableAnnotation.make_(adm, key, descriptor, source);\n}\n\nfunction extend_$5(adm, key, descriptor, proxyTrap) {\n var _this$options_4, _this$options_5;\n\n // getter -> computed\n if (descriptor.get) {\n return computed.extend_(adm, key, descriptor, proxyTrap);\n } // lone setter -> action setter\n\n\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.extend_\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: createAction(key.toString(), descriptor.set)\n }, proxyTrap);\n } // other -> observable\n // if function respect autoBind option\n\n\n if (typeof descriptor.value === \"function\" && ((_this$options_4 = this.options_) == null ? void 0 : _this$options_4.autoBind)) {\n var _adm$proxy_2;\n\n descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);\n }\n\n var observableAnnotation = ((_this$options_5 = this.options_) == null ? void 0 : _this$options_5.deep) === false ? observable.ref : observable;\n return observableAnnotation.extend_(adm, key, descriptor, proxyTrap);\n}\n\n// in the majority of cases\n\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined,\n proxy: true\n};\nObject.freeze(defaultCreateObservableOptions);\nfunction asCreateObservableOptions(thing) {\n return thing || defaultCreateObservableOptions;\n}\nvar observableAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable\");\nvar observableRefAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.ref\", {\n enhancer: referenceEnhancer\n});\nvar observableShallowAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.shallow\", {\n enhancer: shallowEnhancer\n});\nvar observableStructAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.struct\", {\n enhancer: refStructEnhancer\n});\nvar observableDecoratorAnnotation = /*#__PURE__*/createDecoratorAnnotation(observableAnnotation);\nfunction getEnhancerFromOptions(options) {\n return options.deep === true ? deepEnhancer : options.deep === false ? referenceEnhancer : getEnhancerFromAnnotation(options.defaultDecorator);\n}\nfunction getAnnotationFromOptions(options) {\n var _options$defaultDecor;\n\n return options ? (_options$defaultDecor = options.defaultDecorator) != null ? _options$defaultDecor : createAutoAnnotation(options) : undefined;\n}\nfunction getEnhancerFromAnnotation(annotation) {\n var _annotation$options_$, _annotation$options_;\n\n return !annotation ? deepEnhancer : (_annotation$options_$ = (_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.enhancer) != null ? _annotation$options_$ : deepEnhancer;\n}\n/**\r\n * Turns an object, array or function into a reactive structure.\r\n * @param v the value which should become observable.\r\n */\n\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (isStringish(arg2)) {\n storeAnnotation(v, arg2, observableAnnotation);\n return;\n } // already observable - ignore\n\n\n if (isObservable(v)) return v; // plain object\n\n if (isPlainObject(v)) return observable.object(v, arg2, arg3); // Array\n\n if (Array.isArray(v)) return observable.array(v, arg2); // Map\n\n if (isES6Map(v)) return observable.map(v, arg2); // Set\n\n if (isES6Set(v)) return observable.set(v, arg2); // other object - ignore\n\n if (typeof v === \"object\" && v !== null) return v; // anything else\n\n return observable.box(v, arg2);\n}\n\nObject.assign(createObservable, observableDecoratorAnnotation);\nvar observableFactories = {\n box: function box(value, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n array: function array(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return (globalState.useProxies === false || o.proxy === false ? createLegacyArray : createObservableArray)(initialValues, getEnhancerFromOptions(o), o.name);\n },\n map: function map(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n set: function set(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function object(props, decorators, options) {\n return extendObservable(globalState.useProxies === false || (options == null ? void 0 : options.proxy) === false ? asObservableObject({}, options) : asDynamicObservableObject({}, options), props, decorators);\n },\n ref: /*#__PURE__*/createDecoratorAnnotation(observableRefAnnotation),\n shallow: /*#__PURE__*/createDecoratorAnnotation(observableShallowAnnotation),\n deep: observableDecoratorAnnotation,\n struct: /*#__PURE__*/createDecoratorAnnotation(observableStructAnnotation)\n}; // eslint-disable-next-line\n\nvar observable = /*#__PURE__*/assign(createObservable, observableFactories);\n\nvar COMPUTED = \"computed\";\nvar COMPUTED_STRUCT = \"computed.struct\";\nvar computedAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED);\nvar computedStructAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED_STRUCT, {\n equals: comparer.structural\n});\n/**\r\n * Decorator for class properties: @computed get value() { return expr; }.\r\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\r\n */\n\nvar computed = function computed(arg1, arg2) {\n if (isStringish(arg2)) {\n // @computed\n return storeAnnotation(arg1, arg2, computedAnnotation);\n }\n\n if (isPlainObject(arg1)) {\n // @computed({ options })\n return createDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1));\n } // computed(expr, options?)\n\n\n if (true) {\n if (!isFunction(arg1)) die(\"First argument to `computed` should be an expression.\");\n if (isFunction(arg2)) die(\"A setter as second argument is no longer supported, use `{ set: fn }` option instead\");\n }\n\n var opts = isPlainObject(arg2) ? arg2 : {};\n opts.get = arg1;\n opts.name || (opts.name = arg1.name || \"\");\n /* for generated name */\n\n return new ComputedValue(opts);\n};\nObject.assign(computed, computedAnnotation);\ncomputed.struct = /*#__PURE__*/createDecoratorAnnotation(computedStructAnnotation);\n\nvar _getDescriptor$config, _getDescriptor;\n// mobx versions\n\nvar currentActionId = 0;\nvar nextActionId = 1;\nvar isFunctionNameConfigurable = (_getDescriptor$config = (_getDescriptor = /*#__PURE__*/getDescriptor(function () {}, \"name\")) == null ? void 0 : _getDescriptor.configurable) != null ? _getDescriptor$config : false; // we can safely recycle this object\n\nvar tmpNameDescriptor = {\n value: \"action\",\n configurable: true,\n writable: false,\n enumerable: false\n};\nfunction createAction(actionName, fn, autoAction, ref) {\n if (autoAction === void 0) {\n autoAction = false;\n }\n\n if (true) {\n if (!isFunction(fn)) die(\"`action` can only be invoked on functions\");\n if (typeof actionName !== \"string\" || !actionName) die(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n\n function res() {\n return executeAction(actionName, autoAction, fn, ref || this, arguments);\n }\n\n res.isMobxAction = true;\n\n if (isFunctionNameConfigurable) {\n tmpNameDescriptor.value = actionName;\n Object.defineProperty(res, \"name\", tmpNameDescriptor);\n }\n\n return res;\n}\nfunction executeAction(actionName, canRunAsDerivation, fn, scope, args) {\n var runInfo = _startAction(actionName, canRunAsDerivation, scope, args);\n\n try {\n return fn.apply(scope, args);\n } catch (err) {\n runInfo.error_ = err;\n throw err;\n } finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, canRunAsDerivation, // true for autoAction\nscope, args) {\n var notifySpy_ = true && isSpyEnabled() && !!actionName;\n var startTime_ = 0;\n\n if ( true && notifySpy_) {\n startTime_ = Date.now();\n var flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY;\n spyReportStart({\n type: ACTION,\n name: actionName,\n object: scope,\n arguments: flattenedArgs\n });\n }\n\n var prevDerivation_ = globalState.trackingDerivation;\n var runAsAction = !canRunAsDerivation || !prevDerivation_;\n startBatch();\n var prevAllowStateChanges_ = globalState.allowStateChanges; // by default preserve previous allow\n\n if (runAsAction) {\n untrackedStart();\n prevAllowStateChanges_ = allowStateChangesStart(true);\n }\n\n var prevAllowStateReads_ = allowStateReadsStart(true);\n var runInfo = {\n runAsAction_: runAsAction,\n prevDerivation_: prevDerivation_,\n prevAllowStateChanges_: prevAllowStateChanges_,\n prevAllowStateReads_: prevAllowStateReads_,\n notifySpy_: notifySpy_,\n startTime_: startTime_,\n actionId_: nextActionId++,\n parentActionId_: currentActionId\n };\n currentActionId = runInfo.actionId_;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId_) {\n die(30);\n }\n\n currentActionId = runInfo.parentActionId_;\n\n if (runInfo.error_ !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n\n allowStateChangesEnd(runInfo.prevAllowStateChanges_);\n allowStateReadsEnd(runInfo.prevAllowStateReads_);\n endBatch();\n if (runInfo.runAsAction_) untrackedEnd(runInfo.prevDerivation_);\n\n if ( true && runInfo.notifySpy_) {\n spyReportEnd({\n time: Date.now() - runInfo.startTime_\n });\n }\n\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n\n try {\n return func();\n } finally {\n allowStateChangesEnd(prev);\n }\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\n\nvar _Symbol$toPrimitive;\nvar CREATE = \"create\";\n_Symbol$toPrimitive = Symbol.toPrimitive;\nvar ObservableValue = /*#__PURE__*/function (_Atom) {\n _inheritsLoose(ObservableValue, _Atom);\n\n function ObservableValue(value, enhancer, name_, notifySpy, equals) {\n var _this;\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableValue@\" + getNextId() : 0;\n }\n\n if (notifySpy === void 0) {\n notifySpy = true;\n }\n\n if (equals === void 0) {\n equals = comparer[\"default\"];\n }\n\n _this = _Atom.call(this, name_) || this;\n _this.enhancer = void 0;\n _this.name_ = void 0;\n _this.equals = void 0;\n _this.hasUnreportedChange_ = false;\n _this.interceptors_ = void 0;\n _this.changeListeners_ = void 0;\n _this.value_ = void 0;\n _this.dehancer = void 0;\n _this.enhancer = enhancer;\n _this.name_ = name_;\n _this.equals = equals;\n _this.value_ = enhancer(value, undefined, name_);\n\n if ( true && notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({\n type: CREATE,\n object: _assertThisInitialized(_this),\n observableKind: \"value\",\n debugObjectName: _this.name_,\n newValue: \"\" + _this.value_\n });\n }\n\n return _this;\n }\n\n var _proto = ObservableValue.prototype;\n\n _proto.dehanceValue = function dehanceValue(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.set = function set(newValue) {\n var oldValue = this.value_;\n newValue = this.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n\n if ( true && notifySpy) {\n spyReportStart({\n type: UPDATE,\n object: this,\n observableKind: \"value\",\n debugObjectName: this.name_,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n\n this.setNewValue_(newValue);\n if ( true && notifySpy) spyReportEnd();\n }\n };\n\n _proto.prepareNewValue_ = function prepareNewValue_(newValue) {\n checkIfStateModificationsAreAllowed(this);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: UPDATE,\n newValue: newValue\n });\n if (!change) return globalState.UNCHANGED;\n newValue = change.newValue;\n } // apply modifier\n\n\n newValue = this.enhancer(newValue, this.value_, this.name_);\n return this.equals(this.value_, newValue) ? globalState.UNCHANGED : newValue;\n };\n\n _proto.setNewValue_ = function setNewValue_(newValue) {\n var oldValue = this.value_;\n this.value_ = newValue;\n this.reportChanged();\n\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: UPDATE,\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n\n _proto.get = function get() {\n this.reportObserved();\n return this.dehanceValue(this.value_);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately) listener({\n observableKind: \"value\",\n debugObjectName: this.name_,\n object: this,\n type: UPDATE,\n newValue: this.value_,\n oldValue: undefined\n });\n return registerListener(this, listener);\n };\n\n _proto.raw = function raw() {\n // used by MST ot get undehanced value\n return this.value_;\n };\n\n _proto.toJSON = function toJSON() {\n return this.get();\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.value_ + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive] = function () {\n return this.valueOf();\n };\n\n return ObservableValue;\n}(Atom);\nvar isObservableValue = /*#__PURE__*/createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\nvar _Symbol$toPrimitive$1;\n/**\r\n * A node in the state dependency root that observes other nodes, and can be observed itself.\r\n *\r\n * ComputedValue will remember the result of the computation for the duration of the batch, or\r\n * while being observed.\r\n *\r\n * During this time it will recompute only when one of its direct dependencies changed,\r\n * but only when it is being accessed with `ComputedValue.get()`.\r\n *\r\n * Implementation description:\r\n * 1. First time it's being accessed it will compute and remember result\r\n * give back remembered result until 2. happens\r\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\r\n * 3. When it's being accessed, recompute if any shallow dependency changed.\r\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\r\n * go to step 2. either way\r\n *\r\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\r\n */\n\n_Symbol$toPrimitive$1 = Symbol.toPrimitive;\nvar ComputedValue = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n // during tracking it's an array with new observed observers\n // to check for cycles\n // N.B: unminified as it is used by MST\n\n /**\r\n * Create a new computed value based on a function expression.\r\n *\r\n * The `name` property is for debug purposes only.\r\n *\r\n * The `equals` property specifies the comparer function to use to determine if a newly produced\r\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\r\n * compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.\r\n * Structural comparison can be convenient if you always produce a new aggregated object and\r\n * don't want to notify observers if it is structurally the same.\r\n * This is useful for working with vectors, mouse coordinates etc.\r\n */\n function ComputedValue(options) {\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.observing_ = [];\n this.newObserving_ = null;\n this.isBeingObserved_ = false;\n this.isPendingUnobservation_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n this.unboundDepsCount_ = 0;\n this.value_ = new CaughtException(null);\n this.name_ = void 0;\n this.triggeredBy_ = void 0;\n this.isComputing_ = false;\n this.isRunningSetter_ = false;\n this.derivation = void 0;\n this.setter_ = void 0;\n this.isTracing_ = TraceMode.NONE;\n this.scope_ = void 0;\n this.equals_ = void 0;\n this.requiresReaction_ = void 0;\n this.keepAlive_ = void 0;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n if (!options.get) die(31);\n this.derivation = options.get;\n this.name_ = options.name || ( true ? \"ComputedValue@\" + getNextId() : 0);\n\n if (options.set) {\n this.setter_ = createAction( true ? this.name_ + \"-setter\" : 0, options.set);\n }\n\n this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer[\"default\"]);\n this.scope_ = options.context;\n this.requiresReaction_ = !!options.requiresReaction;\n this.keepAlive_ = !!options.keepAlive;\n }\n\n var _proto = ComputedValue.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n propagateMaybeChanged(this);\n };\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Returns the current value of this computed value.\r\n * Will evaluate its computation first if needed.\r\n */\n ;\n\n _proto.get = function get() {\n if (this.isComputing_) die(32, this.name_, this.derivation);\n\n if (globalState.inBatch === 0 && // !globalState.trackingDerivatpion &&\n this.observers_.size === 0 && !this.keepAlive_) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead_();\n startBatch(); // See perf test 'computed memoization'\n\n this.value_ = this.computeValue_(false);\n endBatch();\n }\n } else {\n reportObserved(this);\n\n if (shouldCompute(this)) {\n var prevTrackingContext = globalState.trackingContext;\n if (this.keepAlive_ && !prevTrackingContext) globalState.trackingContext = this;\n if (this.trackAndCompute()) propagateChangeConfirmed(this);\n globalState.trackingContext = prevTrackingContext;\n }\n }\n\n var result = this.value_;\n if (isCaughtException(result)) throw result.cause;\n return result;\n };\n\n _proto.set = function set(value) {\n if (this.setter_) {\n if (this.isRunningSetter_) die(33, this.name_);\n this.isRunningSetter_ = true;\n\n try {\n this.setter_.call(this.scope_, value);\n } finally {\n this.isRunningSetter_ = false;\n }\n } else die(34, this.name_);\n };\n\n _proto.trackAndCompute = function trackAndCompute() {\n // N.B: unminified as it is used by MST\n var oldValue = this.value_;\n var wasSuspended =\n /* see #1208 */\n this.dependenciesState_ === IDerivationState_.NOT_TRACKING_;\n var newValue = this.computeValue_(true);\n\n if ( true && isSpyEnabled()) {\n spyReport({\n observableKind: \"computed\",\n debugObjectName: this.name_,\n object: this.scope_,\n type: \"update\",\n oldValue: this.value_,\n newValue: newValue\n });\n }\n\n var changed = wasSuspended || isCaughtException(oldValue) || isCaughtException(newValue) || !this.equals_(oldValue, newValue);\n\n if (changed) {\n this.value_ = newValue;\n }\n\n return changed;\n };\n\n _proto.computeValue_ = function computeValue_(track) {\n this.isComputing_ = true; // don't allow state changes during computation\n\n var prev = allowStateChangesStart(false);\n var res;\n\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope_);\n } else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope_);\n } else {\n try {\n res = this.derivation.call(this.scope_);\n } catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n\n allowStateChangesEnd(prev);\n this.isComputing_ = false;\n return res;\n };\n\n _proto.suspend_ = function suspend_() {\n if (!this.keepAlive_) {\n clearObserving(this);\n this.value_ = undefined; // don't hold on to computed value!\n }\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n var _this = this;\n\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n // TODO: why is this in a different place than the spyReport() function? in all other observables it's called in the same place\n var newValue = _this.get();\n\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n observableKind: \"computed\",\n debugObjectName: _this.name_,\n type: UPDATE,\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n\n firstTime = false;\n prevValue = newValue;\n });\n };\n\n _proto.warnAboutUntrackedRead_ = function warnAboutUntrackedRead_() {\n if (false) {}\n\n if (this.requiresReaction_ === true) {\n die(\"[mobx] Computed value \" + this.name_ + \" is read outside a reactive context\");\n }\n\n if (this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute\");\n }\n\n if (globalState.computedRequiresReaction) {\n console.warn(\"[mobx] Computed value \" + this.name_ + \" is being read outside a reactive context. Doing a full recompute\");\n }\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.derivation.toString() + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive$1] = function () {\n return this.valueOf();\n };\n\n return ComputedValue;\n}();\nvar isComputedValue = /*#__PURE__*/createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\nvar IDerivationState_;\n\n(function (IDerivationState_) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState_[IDerivationState_[\"NOT_TRACKING_\"] = -1] = \"NOT_TRACKING_\"; // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n\n IDerivationState_[IDerivationState_[\"UP_TO_DATE_\"] = 0] = \"UP_TO_DATE_\"; // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n\n IDerivationState_[IDerivationState_[\"POSSIBLY_STALE_\"] = 1] = \"POSSIBLY_STALE_\"; // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n\n IDerivationState_[IDerivationState_[\"STALE_\"] = 2] = \"STALE_\";\n})(IDerivationState_ || (IDerivationState_ = {}));\n\nvar TraceMode;\n\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\n\nvar CaughtException = function CaughtException(cause) {\n this.cause = void 0;\n this.cause = cause; // Empty\n};\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\r\n * Finds out whether any dependency of the derivation has actually changed.\r\n * If dependenciesState is 1 then it will recalculate dependencies,\r\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\r\n *\r\n * By iterating over the dependencies in the same order that they were reported and\r\n * stopping on the first change, all the recalculations are only called for ComputedValues\r\n * that will be tracked by derivation. That is because we assume that if the first x\r\n * dependencies of the derivation doesn't change then the derivation should run the same way\r\n * up until accessing x-th dependency.\r\n */\n\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState_) {\n case IDerivationState_.UP_TO_DATE_:\n return false;\n\n case IDerivationState_.NOT_TRACKING_:\n case IDerivationState_.STALE_:\n return true;\n\n case IDerivationState_.POSSIBLY_STALE_:\n {\n // state propagation can occur outside of action/reactive context #2195\n var prevAllowStateReads = allowStateReadsStart(true);\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n\n var obs = derivation.observing_,\n l = obs.length;\n\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n } else {\n try {\n obj.get();\n } catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n } // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n\n\n if (derivation.dependenciesState_ === IDerivationState_.STALE_) {\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n }\n\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return false;\n }\n }\n}\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n if (false) {}\n\n var hasObservers = atom.observers_.size > 0; // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"always\")) console.warn(\"[MobX] \" + (globalState.enforceActions ? \"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: \" : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: \") + atom.name_);\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if ( true && !globalState.allowStateReads && globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable \" + observable.name_ + \" being read outside a reactive context\");\n }\n}\n/**\r\n * Executes the provided function `f` and tracks which observables are being accessed.\r\n * The tracking information is stored on the `derivation` object and the derivation is registered\r\n * as observer of any of the accessed observables.\r\n */\n\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true); // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n\n changeDependenciesStateTo0(derivation);\n derivation.newObserving_ = new Array(derivation.observing_.length + 100);\n derivation.unboundDepsCount_ = 0;\n derivation.runId_ = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n globalState.inBatch++;\n var result;\n\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n\n globalState.inBatch--;\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\n\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (false) {}\n if (derivation.observing_.length !== 0) return;\n\n if (globalState.reactionRequiresObservable || derivation.requiresObservable_) {\n console.warn(\"[mobx] Derivation \" + derivation.name_ + \" is created/updated without reading any observable value\");\n }\n}\n/**\r\n * diffs newObserving with observing.\r\n * update observing to be newObserving with unique observables\r\n * notify observers that become observed/unobserved\r\n */\n\n\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing_;\n var observing = derivation.observing_ = derivation.newObserving_;\n var lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_; // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n\n var i0 = 0,\n l = derivation.unboundDepsCount_;\n\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n\n if (dep.diffValue_ === 0) {\n dep.diffValue_ = 1;\n if (i0 !== i) observing[i0] = dep;\n i0++;\n } // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n\n\n if (dep.dependenciesState_ > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState_;\n }\n }\n\n observing.length = i0;\n derivation.newObserving_ = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n\n l = prevObserving.length;\n\n while (l--) {\n var _dep = prevObserving[l];\n\n if (_dep.diffValue_ === 0) {\n removeObserver(_dep, derivation);\n }\n\n _dep.diffValue_ = 0;\n } // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n\n\n while (i0--) {\n var _dep2 = observing[i0];\n\n if (_dep2.diffValue_ === 1) {\n _dep2.diffValue_ = 0;\n addObserver(_dep2, derivation);\n }\n } // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n\n\n if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) {\n derivation.dependenciesState_ = lowestNewObservingDerivationState;\n derivation.onBecomeStale_();\n }\n}\n\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing_;\n derivation.observing_ = [];\n var i = obs.length;\n\n while (i--) {\n removeObserver(obs[i], derivation);\n }\n\n derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n\n try {\n return action();\n } finally {\n untrackedEnd(prev);\n }\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\r\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\r\n *\r\n */\n\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) return;\n derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_;\n var obs = derivation.observing_;\n var i = obs.length;\n\n while (i--) {\n obs[i].lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n}\n\n/**\r\n * These values will persist if global state is reset\r\n */\n\nvar persistentKeys = [\"mobxGuid\", \"spyListeners\", \"enforceActions\", \"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"allowStateReads\", \"disableErrorBoundaries\", \"runId\", \"UNCHANGED\", \"useProxies\"];\nvar MobXGlobals = function MobXGlobals() {\n this.version = 6;\n this.UNCHANGED = {};\n this.trackingDerivation = null;\n this.trackingContext = null;\n this.runId = 0;\n this.mobxGuid = 0;\n this.inBatch = 0;\n this.pendingUnobservations = [];\n this.pendingReactions = [];\n this.isRunningReactions = false;\n this.allowStateChanges = false;\n this.allowStateReads = true;\n this.enforceActions = true;\n this.spyListeners = [];\n this.globalReactionErrorHandlers = [];\n this.computedRequiresReaction = false;\n this.reactionRequiresObservable = false;\n this.observableRequiresReaction = false;\n this.disableErrorBoundaries = false;\n this.suppressReactionErrors = false;\n this.useProxies = true;\n this.verifyProxies = false;\n this.safeDescriptors = true;\n};\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = /*#__PURE__*/function () {\n var global = /*#__PURE__*/getGlobal();\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals) canMergeGlobalState = false;\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version) canMergeGlobalState = false;\n\n if (!canMergeGlobalState) {\n setTimeout(function () {\n if (!isolateCalled) {\n die(35);\n }\n }, 1);\n return new MobXGlobals();\n } else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n if (!global.__mobxGlobals.UNCHANGED) global.__mobxGlobals.UNCHANGED = {}; // make merge backward compatible\n\n return global.__mobxGlobals;\n } else {\n global.__mobxInstanceCount = 1;\n return global.__mobxGlobals = /*#__PURE__*/new MobXGlobals();\n }\n}();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length || globalState.inBatch || globalState.isRunningReactions) die(36);\n isolateCalled = true;\n\n if (canMergeGlobalState) {\n var global = getGlobal();\n if (--global.__mobxInstanceCount === 0) global.__mobxGlobals = undefined;\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\r\n * For testing purposes only; this will break the internal state of existing observables,\r\n * but can be used to get back at a stable state after throwing errors\r\n */\n\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n\n for (var key in defaultGlobals) {\n if (persistentKeys.indexOf(key) === -1) globalState[key] = defaultGlobals[key];\n }\n\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers_ && observable.observers_.size > 0;\n}\nfunction getObservers(observable) {\n return observable.observers_;\n} // function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\n\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n observable.observers_.add(node);\n if (observable.lowestObserverState_ > node.dependenciesState_) observable.lowestObserverState_ = node.dependenciesState_; // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n observable.observers_[\"delete\"](node);\n\n if (observable.observers_.size === 0) {\n // deleting last observer\n queueForUnobservation(observable);\n } // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n\n}\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation_ === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation_ = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\r\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\r\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\r\n * Avoids unnecessary recalculations.\r\n */\n\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions(); // the batch is actually about to finish, all unobserving should happen here.\n\n var list = globalState.pendingUnobservations;\n\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation_ = false;\n\n if (observable.observers_.size === 0) {\n if (observable.isBeingObserved_) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved_ = false;\n observable.onBUO();\n }\n\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observabe of another, etc..\n observable.suspend_();\n }\n }\n }\n\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n\n if (derivation !== null) {\n /**\r\n * Simple optimization, give each derivation run an unique id (runId)\r\n * Check if last time this observable was accessed the same runId is used\r\n * if this is the case, the relation is already known\r\n */\n if (derivation.runId_ !== observable.lastAccessedBy_) {\n observable.lastAccessedBy_ = derivation.runId_; // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n\n derivation.newObserving_[derivation.unboundDepsCount_++] = observable;\n\n if (!observable.isBeingObserved_ && globalState.trackingContext) {\n observable.isBeingObserved_ = true;\n observable.onBO();\n }\n }\n\n return true;\n } else if (observable.observers_.size === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n\n return false;\n} // function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n\n/**\r\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\r\n * It will propagate changes to observers from previous run\r\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\r\n * Hopefully self reruning autoruns aren't a feature people should depend on\r\n * Also most basic use cases should be ok\r\n */\n// Called by Atom when its value changes\n\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_; // Ideally we use for..of here, but the downcompiled version is really slow...\n\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n if ( true && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n\n d.onBecomeStale_();\n }\n\n d.dependenciesState_ = IDerivationState_.STALE_;\n }); // invariantLOS(observable, \"changed end\");\n} // Called by ComputedValue when it recalculate and its value changed\n\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) {\n d.dependenciesState_ = IDerivationState_.STALE_;\n\n if ( true && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n } else if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.\n ) {\n observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n }); // invariantLOS(observable, \"confirmed end\");\n} // Used by computed when its dependency changed, but we don't wan't to immediately recompute.\n\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) return;\n observable.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n d.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_;\n d.onBecomeStale_();\n }\n }); // invariantLOS(observable, \"maybe end\");\n}\n\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' is invalidated due to a change in: '\" + observable.name_ + \"'\");\n\n if (derivation.isTracing_ === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1); // prettier-ignore\n\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name_ + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name_ + \"' is being traced and '\" + observable.name_ + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\n\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n\n lines.push(\"\" + new Array(depth).join(\"\\t\") + tree.name); // MWE: not the fastest, but the easiest way :)\n\n if (tree.dependencies) tree.dependencies.forEach(function (child) {\n return printDepTree(child, lines, depth + 1);\n });\n}\n\nvar Reaction = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n function Reaction(name_, onInvalidate_, errorHandler_, requiresObservable_) {\n if (name_ === void 0) {\n name_ = true ? \"Reaction@\" + getNextId() : 0;\n }\n\n if (requiresObservable_ === void 0) {\n requiresObservable_ = false;\n }\n\n this.name_ = void 0;\n this.onInvalidate_ = void 0;\n this.errorHandler_ = void 0;\n this.requiresObservable_ = void 0;\n this.observing_ = [];\n this.newObserving_ = [];\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.unboundDepsCount_ = 0;\n this.isDisposed_ = false;\n this.isScheduled_ = false;\n this.isTrackPending_ = false;\n this.isRunning_ = false;\n this.isTracing_ = TraceMode.NONE;\n this.name_ = name_;\n this.onInvalidate_ = onInvalidate_;\n this.errorHandler_ = errorHandler_;\n this.requiresObservable_ = requiresObservable_;\n }\n\n var _proto = Reaction.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n this.schedule_();\n };\n\n _proto.schedule_ = function schedule_() {\n if (!this.isScheduled_) {\n this.isScheduled_ = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n\n _proto.isScheduled = function isScheduled() {\n return this.isScheduled_;\n }\n /**\r\n * internal, use schedule() if you intend to kick off a reaction\r\n */\n ;\n\n _proto.runReaction_ = function runReaction_() {\n if (!this.isDisposed_) {\n startBatch();\n this.isScheduled_ = false;\n var prev = globalState.trackingContext;\n globalState.trackingContext = this;\n\n if (shouldCompute(this)) {\n this.isTrackPending_ = true;\n\n try {\n this.onInvalidate_();\n\n if ( true && this.isTrackPending_ && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name_,\n type: \"scheduled-reaction\"\n });\n }\n } catch (e) {\n this.reportExceptionInDerivation_(e);\n }\n }\n\n globalState.trackingContext = prev;\n endBatch();\n }\n };\n\n _proto.track = function track(fn) {\n if (this.isDisposed_) {\n return; // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n }\n\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n\n if ( true && notify) {\n startTime = Date.now();\n spyReportStart({\n name: this.name_,\n type: \"reaction\"\n });\n }\n\n this.isRunning_ = true;\n var prevReaction = globalState.trackingContext; // reactions could create reactions...\n\n globalState.trackingContext = this;\n var result = trackDerivedFunction(this, fn, undefined);\n globalState.trackingContext = prevReaction;\n this.isRunning_ = false;\n this.isTrackPending_ = false;\n\n if (this.isDisposed_) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n\n if (isCaughtException(result)) this.reportExceptionInDerivation_(result.cause);\n\n if ( true && notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n\n endBatch();\n };\n\n _proto.reportExceptionInDerivation_ = function reportExceptionInDerivation_(error) {\n var _this = this;\n\n if (this.errorHandler_) {\n this.errorHandler_(error, this);\n return;\n }\n\n if (globalState.disableErrorBoundaries) throw error;\n var message = true ? \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\" : 0;\n\n if (!globalState.suppressReactionErrors) {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n } else if (true) console.warn(\"[mobx] (error in reaction '\" + this.name_ + \"' suppressed, fix error of causing action below)\"); // prettier-ignore\n\n\n if ( true && isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name_,\n message: message,\n error: \"\" + error\n });\n }\n\n globalState.globalReactionErrorHandlers.forEach(function (f) {\n return f(error, _this);\n });\n };\n\n _proto.dispose = function dispose() {\n if (!this.isDisposed_) {\n this.isDisposed_ = true;\n\n if (!this.isRunning_) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n\n _proto.getDisposer_ = function getDisposer_() {\n var r = this.dispose.bind(this);\n r[$mobx] = this;\n return r;\n };\n\n _proto.toString = function toString() {\n return \"Reaction[\" + this.name_ + \"]\";\n };\n\n _proto.trace = function trace$1(enterBreakPoint) {\n if (enterBreakPoint === void 0) {\n enterBreakPoint = false;\n }\n\n trace(this, enterBreakPoint);\n };\n\n return Reaction;\n}();\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0) globalState.globalReactionErrorHandlers.splice(idx, 1);\n };\n}\n/**\r\n * Magic number alert!\r\n * Defines within how many times a reaction is allowed to re-trigger itself\r\n * until it is assumed that this is gonna be a never ending loop...\r\n */\n\nvar MAX_REACTION_ITERATIONS = 100;\n\nvar reactionScheduler = function reactionScheduler(f) {\n return f();\n};\n\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions) return;\n reactionScheduler(runReactionsHelper);\n}\n\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0; // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error( true ? \"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" + (\" Probably there is a cycle in the reactive function: \" + allReactions[0]) : 0);\n allReactions.splice(0); // clear reactions\n }\n\n var remainingReactions = allReactions.splice(0);\n\n for (var i = 0, l = remainingReactions.length; i < l; i++) {\n remainingReactions[i].runReaction_();\n }\n }\n\n globalState.isRunningReactions = false;\n}\n\nvar isReaction = /*#__PURE__*/createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n\n reactionScheduler = function reactionScheduler(f) {\n return fn(function () {\n return baseScheduler(f);\n });\n };\n}\n\nfunction isSpyEnabled() {\n return true && !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (false) {} // dead code elimination can do the rest\n\n if (!globalState.spyListeners.length) return;\n var listeners = globalState.spyListeners;\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](event);\n }\n}\nfunction spyReportStart(event) {\n if (false) {}\n\n var change = _extends({}, event, {\n spyReportStart: true\n });\n\n spyReport(change);\n}\nvar END_EVENT = {\n type: \"report-end\",\n spyReportEnd: true\n};\nfunction spyReportEnd(change) {\n if (false) {}\n if (change) spyReport(_extends({}, change, {\n type: \"report-end\",\n spyReportEnd: true\n }));else spyReport(END_EVENT);\n}\nfunction spy(listener) {\n if (false) {} else {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) {\n return l !== listener;\n });\n });\n }\n}\n\nvar ACTION = \"action\";\nvar ACTION_BOUND = \"action.bound\";\nvar AUTOACTION = \"autoAction\";\nvar AUTOACTION_BOUND = \"autoAction.bound\";\nvar DEFAULT_ACTION_NAME = \"<unnamed action>\";\nvar actionAnnotation = /*#__PURE__*/createActionAnnotation(ACTION);\nvar actionBoundAnnotation = /*#__PURE__*/createActionAnnotation(ACTION_BOUND, {\n bound: true\n});\nvar autoActionAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION, {\n autoAction: true\n});\nvar autoActionBoundAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION_BOUND, {\n autoAction: true,\n bound: true\n});\n\nfunction createActionFactory(autoAction) {\n var res = function action(arg1, arg2) {\n // action(fn() {})\n if (isFunction(arg1)) return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction); // action(\"name\", fn() {})\n\n if (isFunction(arg2)) return createAction(arg1, arg2, autoAction); // @action\n\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, autoAction ? autoActionAnnotation : actionAnnotation);\n } // action(\"name\") & @action(\"name\")\n\n\n if (isStringish(arg1)) {\n return createDecoratorAnnotation(createActionAnnotation(autoAction ? AUTOACTION : ACTION, {\n name: arg1,\n autoAction: autoAction\n }));\n }\n\n if (true) die(\"Invalid arguments for `action`\");\n };\n\n return res;\n}\n\nvar action = /*#__PURE__*/createActionFactory(false);\nObject.assign(action, actionAnnotation);\nvar autoAction = /*#__PURE__*/createActionFactory(true);\nObject.assign(autoAction, autoActionAnnotation);\naction.bound = /*#__PURE__*/createDecoratorAnnotation(actionBoundAnnotation);\nautoAction.bound = /*#__PURE__*/createDecoratorAnnotation(autoActionBoundAnnotation);\nfunction runInAction(fn) {\n return executeAction(fn.name || DEFAULT_ACTION_NAME, false, fn, this, undefined);\n}\nfunction isAction(thing) {\n return isFunction(thing) && thing.isMobxAction === true;\n}\n\n/**\r\n * Creates a named reactive view and keeps it alive, so that the view is always\r\n * updated if one of the dependencies changes, even when the view is not further used by something else.\r\n * @param view The reactive view\r\n * @returns disposer function, which can be used to stop the view from being updated in the future.\r\n */\n\nfunction autorun(view, opts) {\n var _opts$name, _opts;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (true) {\n if (!isFunction(view)) die(\"Autorun expects a function as first argument\");\n if (isAction(view)) die(\"Autorun does not accept actions since actions are untrackable\");\n }\n\n var name = (_opts$name = (_opts = opts) == null ? void 0 : _opts.name) != null ? _opts$name : true ? view.name || \"Autorun@\" + getNextId() : 0;\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n } else {\n var scheduler = createSchedulerFromOptions(opts); // debounced autorun\n\n var isScheduled = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled) {\n isScheduled = true;\n scheduler(function () {\n isScheduled = false;\n if (!reaction.isDisposed_) reaction.track(reactionRunner);\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n\n function reactionRunner() {\n view(reaction);\n }\n\n reaction.schedule_();\n return reaction.getDisposer_();\n}\n\nvar run = function run(f) {\n return f();\n};\n\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler ? opts.scheduler : opts.delay ? function (f) {\n return setTimeout(f, opts.delay);\n } : run;\n}\n\nfunction reaction(expression, effect, opts) {\n var _opts$name2;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (true) {\n if (!isFunction(expression) || !isFunction(effect)) die(\"First and second argument to reaction should be functions\");\n if (!isPlainObject(opts)) die(\"Third argument of reactions should be an object\");\n }\n\n var name = (_opts$name2 = opts.name) != null ? _opts$name2 : true ? \"Reaction@\" + getNextId() : 0;\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var oldValue = undefined; // only an issue with fireImmediately\n\n var equals = opts.compareStructural ? comparer.structural : opts.equals || comparer[\"default\"];\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n } else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n\n function reactionRunner() {\n isScheduled = false;\n if (r.isDisposed_) return;\n var changed = false;\n r.track(function () {\n var nextValue = allowStateChanges(false, function () {\n return expression(r);\n });\n changed = firstTime || !equals(value, nextValue);\n oldValue = value;\n value = nextValue;\n });\n if (firstTime && opts.fireImmediately) effectAction(value, oldValue, r);else if (!firstTime && changed) effectAction(value, oldValue, r);\n firstTime = false;\n }\n\n r.schedule_();\n return r.getDisposer_();\n}\n\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n } catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nvar ON_BECOME_OBSERVED = \"onBO\";\nvar ON_BECOME_UNOBSERVED = \"onBUO\";\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3);\n}\n\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = isFunction(arg3) ? arg3 : arg2;\n var listenersKey = hook + \"L\";\n\n if (atom[listenersKey]) {\n atom[listenersKey].add(cb);\n } else {\n atom[listenersKey] = new Set([cb]);\n }\n\n return function () {\n var hookListeners = atom[listenersKey];\n\n if (hookListeners) {\n hookListeners[\"delete\"](cb);\n\n if (hookListeners.size === 0) {\n delete atom[listenersKey];\n }\n }\n };\n}\n\nvar NEVER = \"never\";\nvar ALWAYS = \"always\";\nvar OBSERVED = \"observed\"; // const IF_AVAILABLE = \"ifavailable\"\n\nfunction configure(options) {\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n\n var useProxies = options.useProxies,\n enforceActions = options.enforceActions;\n\n if (useProxies !== undefined) {\n globalState.useProxies = useProxies === ALWAYS ? true : useProxies === NEVER ? false : typeof Proxy !== \"undefined\";\n }\n\n if (useProxies === \"ifavailable\") globalState.verifyProxies = true;\n\n if (enforceActions !== undefined) {\n var ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED;\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true;\n }\n [\"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"disableErrorBoundaries\", \"safeDescriptors\"].forEach(function (key) {\n if (key in options) globalState[key] = !!options[key];\n });\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n\n if ( true && globalState.disableErrorBoundaries === true) {\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\");\n }\n\n if (options.reactionScheduler) {\n setReactionScheduler(options.reactionScheduler);\n }\n}\n\nfunction extendObservable(target, properties, annotations, options) {\n if (true) {\n if (arguments.length > 4) die(\"'extendObservable' expected 2-4 arguments\");\n if (typeof target !== \"object\") die(\"'extendObservable' expects an object as first argument\");\n if (isObservableMap(target)) die(\"'extendObservable' should not be used on maps, use map.merge instead\");\n if (!isPlainObject(properties)) die(\"'extendObservabe' only accepts plain objects as second argument\");\n if (isObservable(properties) || isObservable(annotations)) die(\"Extending an object with another observable (object) is not supported\");\n } // Pull descriptors first, so we don't have to deal with props added by administration ($mobx)\n\n\n var descriptors = getOwnPropertyDescriptors(properties);\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n ownKeys(descriptors).forEach(function (key) {\n adm.extend_(key, descriptors[key], // must pass \"undefined\" for { key: undefined }\n !annotations ? true : key in annotations ? annotations[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\n\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name_\n };\n if (node.observing_ && node.observing_.length > 0) result.dependencies = unique(node.observing_).map(nodeToDependencyTree);\n return result;\n}\n\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\n\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name_\n };\n if (hasObservers(node)) result.observers = Array.from(getObservers(node)).map(nodeToObserverTree);\n return result;\n}\n\nfunction unique(list) {\n return Array.from(new Set(list));\n}\n\nvar generatorId = 0;\nfunction FlowCancellationError() {\n this.message = \"FLOW_CANCELLED\";\n}\nFlowCancellationError.prototype = /*#__PURE__*/Object.create(Error.prototype);\nfunction isFlowCancellationError(error) {\n return error instanceof FlowCancellationError;\n}\nvar flowAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow\");\nvar flowBoundAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow.bound\", {\n bound: true\n});\nvar flow = /*#__PURE__*/Object.assign(function flow(arg1, arg2) {\n // @flow\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, flowAnnotation);\n } // flow(fn)\n\n\n if ( true && arguments.length !== 1) die(\"Flow expects single argument with generator function\");\n var generator = arg1;\n var name = generator.name || \"<unnamed flow>\"; // Implementation based on https://github.com/tj/co/blob/master/index.js\n\n var res = function res() {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var promise = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen[\"throw\"]).call(gen, err);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function next(ret) {\n if (isFunction(ret == null ? void 0 : ret.then)) {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n\n if (ret.done) return resolve(ret.value);\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n\n onFulfilled(undefined); // kick off the process\n });\n promise.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise) cancelPromise(pendingPromise); // Finally block can return (or yield) stuff..\n\n var _res = gen[\"return\"](undefined); // eat anything that promise would do, it's cancelled!\n\n\n var yieldedPromise = Promise.resolve(_res.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n\n rejector(new FlowCancellationError());\n } catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n return promise;\n };\n\n res.isMobXFlow = true;\n return res;\n}, flowAnnotation);\nflow.bound = /*#__PURE__*/createDecoratorAnnotation(flowBoundAnnotation);\n\nfunction cancelPromise(promise) {\n if (isFunction(promise.cancel)) promise.cancel();\n}\n\nfunction flowResult(result) {\n return result; // just tricking TypeScript :)\n}\nfunction isFlow(fn) {\n return (fn == null ? void 0 : fn.isMobXFlow) === true;\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n } else if (isObservableObject(thing)) {\n if ( true && !isStringish(propOrHandler)) return die(\"InterceptReads can only be used with a specific property, not with an object in general\");\n target = getAdministration(thing, propOrHandler);\n } else if (true) {\n return die(\"Expected observable map, object or array as first array\");\n }\n\n if ( true && target.dehancer !== undefined) return die(\"An intercept reader was already established\");\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (isFunction(handler)) return interceptProperty(thing, propOrHandler, handler);else return interceptInterceptable(thing, propOrHandler);\n}\n\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept_(handler);\n}\n\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept_(handler);\n}\n\nfunction _isComputed(value, property) {\n if (property !== undefined) {\n if (isObservableObject(value) === false) return false;\n if (!value[$mobx].values_.has(property)) return false;\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n }\n\n return isComputedValue(value);\n}\nfunction isComputed(value) {\n if ( true && arguments.length > 1) return die(\"isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property\");\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if ( true && !isStringish(propName)) return die(\"isComputed expected a property name as second argument\");\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (!value) return false;\n\n if (property !== undefined) {\n if ( true && (isObservableMap(value) || isObservableArray(value))) return die(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n\n if (isObservableObject(value)) {\n return value[$mobx].values_.has(property);\n }\n\n return false;\n } // For first check, see #701\n\n\n return isObservableObject(value) || !!value[$mobx] || isAtom(value) || isReaction(value) || isComputedValue(value);\n}\n\nfunction isObservable(value) {\n if ( true && arguments.length !== 1) die(\"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if ( true && !isStringish(propName)) return die(\"expected a property name as second argument\");\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].keys_();\n }\n\n if (isObservableMap(obj) || isObservableSet(obj)) {\n return Array.from(obj.keys());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) {\n return index;\n });\n }\n\n die(5);\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return obj[key];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return obj.get(key);\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.values());\n }\n\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n\n die(6);\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj.get(key)];\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.entries());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) {\n return [index, key];\n });\n }\n\n die(7);\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var _values = key;\n\n try {\n for (var _key in _values) {\n set(obj, _key, _values[_key]);\n }\n } finally {\n endBatch();\n }\n\n return;\n }\n\n if (isObservableObject(obj)) {\n obj[$mobx].set_(key, value);\n } else if (isObservableMap(obj)) {\n obj.set(key, value);\n } else if (isObservableSet(obj)) {\n obj.add(key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n if (key < 0) die(\"Invalid index: '\" + key + \"'\");\n startBatch();\n if (key >= obj.length) obj.length = key + 1;\n obj[key] = value;\n endBatch();\n } else die(8);\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj[$mobx].delete_(key);\n } else if (isObservableMap(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableSet(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n obj.splice(key, 1);\n } else {\n die(9);\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n return obj[$mobx].has_(key);\n } else if (isObservableMap(obj)) {\n return obj.has(key);\n } else if (isObservableSet(obj)) {\n return obj.has(key);\n } else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n\n die(10);\n}\nfunction get(obj, key) {\n if (!has(obj, key)) return undefined;\n\n if (isObservableObject(obj)) {\n return obj[$mobx].get_(key);\n } else if (isObservableMap(obj)) {\n return obj.get(key);\n } else if (isObservableArray(obj)) {\n return obj[key];\n }\n\n die(11);\n}\nfunction apiDefineProperty(obj, key, descriptor) {\n if (isObservableObject(obj)) {\n return obj[$mobx].defineProperty_(key, descriptor);\n }\n\n die(39);\n}\nfunction apiOwnKeys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].ownKeys_();\n }\n\n die(38);\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (isFunction(cbOrFire)) return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);else return observeObservable(thing, propOrCb, cbOrFire);\n}\n\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe_(listener, fireImmediately);\n}\n\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe_(listener, fireImmediately);\n}\n\nfunction cache(map, key, value) {\n map.set(key, value);\n return value;\n}\n\nfunction toJSHelper(source, __alreadySeen) {\n if (source == null || typeof source !== \"object\" || source instanceof Date || !isObservable(source)) return source;\n if (isObservableValue(source) || isComputedValue(source)) return toJSHelper(source.get(), __alreadySeen);\n\n if (__alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n\n if (isObservableArray(source)) {\n var res = cache(__alreadySeen, source, new Array(source.length));\n source.forEach(function (value, idx) {\n res[idx] = toJSHelper(value, __alreadySeen);\n });\n return res;\n }\n\n if (isObservableSet(source)) {\n var _res = cache(__alreadySeen, source, new Set());\n\n source.forEach(function (value) {\n _res.add(toJSHelper(value, __alreadySeen));\n });\n return _res;\n }\n\n if (isObservableMap(source)) {\n var _res2 = cache(__alreadySeen, source, new Map());\n\n source.forEach(function (value, key) {\n _res2.set(key, toJSHelper(value, __alreadySeen));\n });\n return _res2;\n } else {\n // must be observable object\n var _res3 = cache(__alreadySeen, source, {});\n\n apiOwnKeys(source).forEach(function (key) {\n if (objectPrototype.propertyIsEnumerable.call(source, key)) {\n _res3[key] = toJSHelper(source[key], __alreadySeen);\n }\n });\n return _res3;\n }\n}\n/**\r\n * Basically, a deep clone, so that no reactive property will exist anymore.\r\n */\n\n\nfunction toJS(source, options) {\n if ( true && options) die(\"toJS no longer supports options\");\n return toJSHelper(source, new Map());\n}\n\nfunction trace() {\n if (false) {}\n var enterBreakPoint = false;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (typeof args[args.length - 1] === \"boolean\") enterBreakPoint = args.pop();\n var derivation = getAtomFromArgs(args);\n\n if (!derivation) {\n return die(\"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n\n if (derivation.isTracing_ === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' tracing enabled\");\n }\n\n derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\n\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n\n case 1:\n return getAtom(args[0]);\n\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\r\n * During a transaction no views are updated until the end of the transaction.\r\n * The transaction will be run synchronously nonetheless.\r\n *\r\n * @param action a function that updates some reactive state\r\n * @returns any value that was returned by the 'action' parameter.\r\n */\n\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) {\n thisArg = undefined;\n }\n\n startBatch();\n\n try {\n return action.apply(thisArg);\n } finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || arg1 && typeof arg1 === \"object\") return whenPromise(predicate, arg1);\n return _when(predicate, arg1, arg2 || {});\n}\n\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n\n if (typeof opts.timeout === \"number\") {\n timeoutHandle = setTimeout(function () {\n if (!disposer[$mobx].isDisposed_) {\n disposer();\n var error = new Error(\"WHEN_TIMEOUT\");\n if (opts.onError) opts.onError(error);else throw error;\n }\n }, opts.timeout);\n }\n\n opts.name = true ? opts.name || \"When@\" + getNextId() : 0;\n var effectAction = createAction( true ? opts.name + \"-effect\" : 0, effect); // eslint-disable-next-line\n\n var disposer = autorun(function (r) {\n // predicate should not change state\n var cond = allowStateChanges(false, predicate);\n\n if (cond) {\n r.dispose();\n if (timeoutHandle) clearTimeout(timeoutHandle);\n effectAction();\n }\n }, opts);\n return disposer;\n}\n\nfunction whenPromise(predicate, opts) {\n if ( true && opts && opts.onError) return die(\"the options 'onError' and 'promise' cannot be combined\");\n var cancel;\n var res = new Promise(function (resolve, reject) {\n var disposer = _when(predicate, resolve, _extends({}, opts, {\n onError: reject\n }));\n\n cancel = function cancel() {\n disposer();\n reject(\"WHEN_CANCELLED\");\n };\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction getAdm(target) {\n return target[$mobx];\n} // Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\n\n\nvar objectProxyTraps = {\n has: function has(target, name) {\n if ( true && globalState.trackingDerivation) warnAboutProxyRequirement(\"detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.\");\n return getAdm(target).has_(name);\n },\n get: function get(target, name) {\n return getAdm(target).get_(name);\n },\n set: function set(target, name, value) {\n var _getAdm$set_;\n\n if (!isStringish(name)) return false;\n\n if ( true && !getAdm(target).values_.has(name)) {\n warnAboutProxyRequirement(\"add a new observable property through direct assignment. Use 'set' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$set_ = getAdm(target).set_(name, value, true)) != null ? _getAdm$set_ : true;\n },\n deleteProperty: function deleteProperty(target, name) {\n var _getAdm$delete_;\n\n if (true) {\n warnAboutProxyRequirement(\"delete properties from an observable object. Use 'remove' from 'mobx' instead.\");\n }\n\n if (!isStringish(name)) return false; // null (intercepted) -> true (success)\n\n return (_getAdm$delete_ = getAdm(target).delete_(name, true)) != null ? _getAdm$delete_ : true;\n },\n defineProperty: function defineProperty(target, name, descriptor) {\n var _getAdm$definePropert;\n\n if (true) {\n warnAboutProxyRequirement(\"define property on an observable object. Use 'defineProperty' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$definePropert = getAdm(target).defineProperty_(name, descriptor)) != null ? _getAdm$definePropert : true;\n },\n ownKeys: function ownKeys(target) {\n if ( true && globalState.trackingDerivation) warnAboutProxyRequirement(\"iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead.\");\n return getAdm(target).ownKeys_();\n },\n preventExtensions: function preventExtensions(target) {\n die(13);\n }\n};\nfunction asDynamicObservableObject(target, options) {\n var _target$$mobx, _target$$mobx$proxy_;\n\n assertProxies();\n target = asObservableObject(target, options);\n return (_target$$mobx$proxy_ = (_target$$mobx = target[$mobx]).proxy_) != null ? _target$$mobx$proxy_ : _target$$mobx.proxy_ = new Proxy(target, objectProxyTraps);\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors_ !== undefined && interceptable.interceptors_.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1) interceptors.splice(idx, 1);\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n\n try {\n // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n var interceptors = [].concat(interceptable.interceptors_ || []);\n\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n if (change && !change.type) die(14);\n if (!change) break;\n }\n\n return change;\n } finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners_ !== undefined && listenable.changeListeners_.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners_ || (listenable.changeListeners_ = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1) listeners.splice(idx, 1);\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners_;\n if (!listeners) return;\n listeners = listeners.slice();\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n\n untrackedEnd(prevU);\n}\n\nfunction makeObservable(target, annotations, options) {\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n var _annotations;\n\n // Default to decorators\n (_annotations = annotations) != null ? _annotations : annotations = collectStoredAnnotations(target); // Annotate\n\n ownKeys(annotations).forEach(function (key) {\n return adm.make_(key, annotations[key]);\n });\n } finally {\n endBatch();\n }\n\n return target;\n} // proto[keysSymbol] = new Set<PropertyKey>()\n\nvar keysSymbol = /*#__PURE__*/Symbol(\"mobx-keys\");\nfunction makeAutoObservable(target, overrides, options) {\n if (true) {\n if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) die(\"'makeAutoObservable' can only be used for classes that don't have a superclass\");\n if (isObservableObject(target)) die(\"makeAutoObservable can only be used on objects not already made observable\");\n } // Optimization: avoid visiting protos\n // Assumes that annotation.make_/.extend_ works the same for plain objects\n\n\n if (isPlainObject(target)) {\n return extendObservable(target, target, overrides, options);\n }\n\n var adm = asObservableObject(target, options)[$mobx]; // Optimization: cache keys on proto\n // Assumes makeAutoObservable can be called only once per object and can't be used in subclass\n\n if (!target[keysSymbol]) {\n var proto = Object.getPrototypeOf(target);\n var keys = new Set([].concat(ownKeys(target), ownKeys(proto)));\n keys[\"delete\"](\"constructor\");\n keys[\"delete\"]($mobx);\n addHiddenProp(proto, keysSymbol, keys);\n }\n\n startBatch();\n\n try {\n target[keysSymbol].forEach(function (key) {\n return adm.make_(key, // must pass \"undefined\" for { key: undefined }\n !overrides ? true : key in overrides ? overrides[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nvar SPLICE = \"splice\";\nvar UPDATE = \"update\";\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\n\nvar arrayTraps = {\n get: function get(target, name) {\n var adm = target[$mobx];\n if (name === $mobx) return adm;\n if (name === \"length\") return adm.getArrayLength_();\n\n if (typeof name === \"string\" && !isNaN(name)) {\n return adm.get_(parseInt(name));\n }\n\n if (hasProp(arrayExtensions, name)) {\n return arrayExtensions[name];\n }\n\n return target[name];\n },\n set: function set(target, name, value) {\n var adm = target[$mobx];\n\n if (name === \"length\") {\n adm.setArrayLength_(value);\n }\n\n if (typeof name === \"symbol\" || isNaN(name)) {\n target[name] = value;\n } else {\n // numeric string\n adm.set_(parseInt(name), value);\n }\n\n return true;\n },\n preventExtensions: function preventExtensions() {\n die(15);\n }\n};\nvar ObservableArrayAdministration = /*#__PURE__*/function () {\n // this is the prop that gets proxied, so can't replace it!\n function ObservableArrayAdministration(name, enhancer, owned_, legacyMode_) {\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n this.owned_ = void 0;\n this.legacyMode_ = void 0;\n this.atom_ = void 0;\n this.values_ = [];\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.enhancer_ = void 0;\n this.dehancer = void 0;\n this.proxy_ = void 0;\n this.lastKnownLength_ = 0;\n this.owned_ = owned_;\n this.legacyMode_ = legacyMode_;\n this.atom_ = new Atom(name);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, true ? name + \"[..]\" : 0);\n };\n }\n\n var _proto = ObservableArrayAdministration.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.dehanceValues_ = function dehanceValues_(values) {\n if (this.dehancer !== undefined && values.length > 0) return values.map(this.dehancer);\n return values;\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately === void 0) {\n fireImmediately = false;\n }\n\n if (fireImmediately) {\n listener({\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: \"splice\",\n index: 0,\n added: this.values_.slice(),\n addedCount: this.values_.length,\n removed: [],\n removedCount: 0\n });\n }\n\n return registerListener(this, listener);\n };\n\n _proto.getArrayLength_ = function getArrayLength_() {\n this.atom_.reportObserved();\n return this.values_.length;\n };\n\n _proto.setArrayLength_ = function setArrayLength_(newLength) {\n if (typeof newLength !== \"number\" || newLength < 0) die(\"Out of range: \" + newLength);\n var currentLength = this.values_.length;\n if (newLength === currentLength) return;else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n\n for (var i = 0; i < newLength - currentLength; i++) {\n newItems[i] = undefined;\n } // No Array.fill everywhere...\n\n\n this.spliceWithArray_(currentLength, 0, newItems);\n } else this.spliceWithArray_(newLength, currentLength - newLength);\n };\n\n _proto.updateArrayLength_ = function updateArrayLength_(oldLength, delta) {\n if (oldLength !== this.lastKnownLength_) die(16);\n this.lastKnownLength_ += delta;\n if (this.legacyMode_ && delta > 0) reserveArrayBuffer(oldLength + delta + 1);\n };\n\n _proto.spliceWithArray_ = function spliceWithArray_(index, deleteCount, newItems) {\n var _this = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n var length = this.values_.length;\n if (index === undefined) index = 0;else if (index > length) index = length;else if (index < 0) index = Math.max(0, length + index);\n if (arguments.length === 1) deleteCount = length - index;else if (deleteCount === undefined || deleteCount === null) deleteCount = 0;else deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n if (newItems === undefined) newItems = EMPTY_ARRAY;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_,\n type: SPLICE,\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change) return EMPTY_ARRAY;\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n\n newItems = newItems.length === 0 ? newItems : newItems.map(function (v) {\n return _this.enhancer_(v, undefined);\n });\n\n if (this.legacyMode_ || \"development\" !== \"production\") {\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength_(length, lengthDelta); // checks if internal array wasn't modified\n }\n\n var res = this.spliceItemsIntoValues_(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0) this.notifyArraySplice_(index, newItems, res);\n return this.dehanceValues_(res);\n };\n\n _proto.spliceItemsIntoValues_ = function spliceItemsIntoValues_(index, deleteCount, newItems) {\n if (newItems.length < MAX_SPLICE_SIZE) {\n var _this$values_;\n\n return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));\n } else {\n var res = this.values_.slice(index, index + deleteCount);\n var oldItems = this.values_.slice(index + deleteCount);\n this.values_.length = index + newItems.length - deleteCount;\n\n for (var i = 0; i < newItems.length; i++) {\n this.values_[index + i] = newItems[i];\n }\n\n for (var _i = 0; _i < oldItems.length; _i++) {\n this.values_[index + newItems.length + _i] = oldItems[_i];\n }\n\n return res;\n }\n };\n\n _proto.notifyArrayChildUpdate_ = function notifyArrayChildUpdate_(index, newValue, oldValue) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n type: UPDATE,\n debugObjectName: this.atom_.name_,\n index: index,\n newValue: newValue,\n oldValue: oldValue\n } : null; // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n\n if ( true && notifySpy) spyReportStart(change);\n this.atom_.reportChanged();\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n };\n\n _proto.notifyArraySplice_ = function notifyArraySplice_(index, added, removed) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: SPLICE,\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n this.atom_.reportChanged(); // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n };\n\n _proto.get_ = function get_(index) {\n if (index < this.values_.length) {\n this.atom_.reportObserved();\n return this.dehanceValue_(this.values_[index]);\n }\n\n console.warn( true ? \"[mobx] Out of bounds read: \" + index : 0);\n };\n\n _proto.set_ = function set_(index, newValue) {\n var values = this.values_;\n\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(this.atom_);\n var oldValue = values[index];\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_,\n index: index,\n newValue: newValue\n });\n if (!change) return;\n newValue = change.newValue;\n }\n\n newValue = this.enhancer_(newValue, oldValue);\n var changed = newValue !== oldValue;\n\n if (changed) {\n values[index] = newValue;\n this.notifyArrayChildUpdate_(index, newValue, oldValue);\n }\n } else if (index === values.length) {\n // add a new item\n this.spliceWithArray_(index, 0, [newValue]);\n } else {\n // out of bounds\n die(17, index, values.length);\n }\n };\n\n return ObservableArrayAdministration;\n}();\nfunction createObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n assertProxies();\n var adm = new ObservableArrayAdministration(name, enhancer, owned, false);\n addHiddenFinalProp(adm.values_, $mobx, adm);\n var proxy = new Proxy(adm.values_, arrayTraps);\n adm.proxy_ = proxy;\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true);\n adm.spliceWithArray_(0, 0, initialValues);\n allowStateChangesEnd(prev);\n }\n\n return proxy;\n} // eslint-disable-next-line\n\nvar arrayExtensions = {\n clear: function clear() {\n return this.splice(0);\n },\n replace: function replace(newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray_(0, adm.values_.length, newItems);\n },\n // Used by JSON.stringify\n toJSON: function toJSON() {\n return this.slice();\n },\n\n /*\r\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\r\n * since these functions alter the inner structure of the array, the have side effects.\r\n * Because the have side effects, they should not be used in computed function,\r\n * and for that reason the do not call dependencyState.notifyObserved\r\n */\n splice: function splice(index, deleteCount) {\n for (var _len = arguments.length, newItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n newItems[_key - 2] = arguments[_key];\n }\n\n var adm = this[$mobx];\n\n switch (arguments.length) {\n case 0:\n return [];\n\n case 1:\n return adm.spliceWithArray_(index);\n\n case 2:\n return adm.spliceWithArray_(index, deleteCount);\n }\n\n return adm.spliceWithArray_(index, deleteCount, newItems);\n },\n spliceWithArray: function spliceWithArray(index, deleteCount, newItems) {\n return this[$mobx].spliceWithArray_(index, deleteCount, newItems);\n },\n push: function push() {\n var adm = this[$mobx];\n\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n adm.spliceWithArray_(adm.values_.length, 0, items);\n return adm.values_.length;\n },\n pop: function pop() {\n return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0];\n },\n shift: function shift() {\n return this.splice(0, 1)[0];\n },\n unshift: function unshift() {\n var adm = this[$mobx];\n\n for (var _len3 = arguments.length, items = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n items[_key3] = arguments[_key3];\n }\n\n adm.spliceWithArray_(0, 0, items);\n return adm.values_.length;\n },\n reverse: function reverse() {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n if (globalState.trackingDerivation) {\n die(37, \"reverse\");\n }\n\n this.replace(this.slice().reverse());\n return this;\n },\n sort: function sort() {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n if (globalState.trackingDerivation) {\n die(37, \"sort\");\n }\n\n var copy = this.slice();\n copy.sort.apply(copy, arguments);\n this.replace(copy);\n return this;\n },\n remove: function remove(value) {\n var adm = this[$mobx];\n var idx = adm.dehanceValues_(adm.values_).indexOf(value);\n\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n\n return false;\n }\n};\n/**\r\n * Wrap function from prototype\r\n * Without this, everything works as well, but this works\r\n * faster as everything works on unproxied values\r\n */\n\naddArrayExtension(\"concat\", simpleFunc);\naddArrayExtension(\"flat\", simpleFunc);\naddArrayExtension(\"includes\", simpleFunc);\naddArrayExtension(\"indexOf\", simpleFunc);\naddArrayExtension(\"join\", simpleFunc);\naddArrayExtension(\"lastIndexOf\", simpleFunc);\naddArrayExtension(\"slice\", simpleFunc);\naddArrayExtension(\"toString\", simpleFunc);\naddArrayExtension(\"toLocaleString\", simpleFunc); // map\n\naddArrayExtension(\"every\", mapLikeFunc);\naddArrayExtension(\"filter\", mapLikeFunc);\naddArrayExtension(\"find\", mapLikeFunc);\naddArrayExtension(\"findIndex\", mapLikeFunc);\naddArrayExtension(\"flatMap\", mapLikeFunc);\naddArrayExtension(\"forEach\", mapLikeFunc);\naddArrayExtension(\"map\", mapLikeFunc);\naddArrayExtension(\"some\", mapLikeFunc); // reduce\n\naddArrayExtension(\"reduce\", reduceLikeFunc);\naddArrayExtension(\"reduceRight\", reduceLikeFunc);\n\nfunction addArrayExtension(funcName, funcFactory) {\n if (typeof Array.prototype[funcName] === \"function\") {\n arrayExtensions[funcName] = funcFactory(funcName);\n }\n} // Report and delegate to dehanced array\n\n\nfunction simpleFunc(funcName) {\n return function () {\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction mapLikeFunc(funcName) {\n return function (callback, thisArg) {\n var _this2 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName](function (element, index) {\n return callback.call(thisArg, element, index, _this2);\n });\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction reduceLikeFunc(funcName) {\n return function () {\n var _this3 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_); // #2432 - reduce behavior depends on arguments.length\n\n var callback = arguments[0];\n\n arguments[0] = function (accumulator, currentValue, index) {\n return callback(accumulator, currentValue, index, _this3);\n };\n\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n}\n\nvar isObservableArrayAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing[$mobx]);\n}\n\nvar _Symbol$iterator, _Symbol$toStringTag;\nvar ObservableMapMarker = {};\nvar ADD = \"add\";\nvar DELETE = \"delete\"; // just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\n\n_Symbol$iterator = Symbol.iterator;\n_Symbol$toStringTag = Symbol.toStringTag;\nvar ObservableMap = /*#__PURE__*/function () {\n // hasMap, not hashMap >-).\n function ObservableMap(initialData, enhancer_, name_) {\n if (enhancer_ === void 0) {\n enhancer_ = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableMap@\" + getNextId() : 0;\n }\n\n this.enhancer_ = void 0;\n this.name_ = void 0;\n this[$mobx] = ObservableMapMarker;\n this.data_ = void 0;\n this.hasMap_ = void 0;\n this.keysAtom_ = void 0;\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = enhancer_;\n this.name_ = name_;\n\n if (!isFunction(Map)) {\n die(18);\n }\n\n this.keysAtom_ = createAtom( true ? this.name_ + \".keys()\" : 0);\n this.data_ = new Map();\n this.hasMap_ = new Map();\n this.merge(initialData);\n }\n\n var _proto = ObservableMap.prototype;\n\n _proto.has_ = function has_(key) {\n return this.data_.has(key);\n };\n\n _proto.has = function has(key) {\n var _this = this;\n\n if (!globalState.trackingDerivation) return this.has_(key);\n var entry = this.hasMap_.get(key);\n\n if (!entry) {\n var newEntry = entry = new ObservableValue(this.has_(key), referenceEnhancer, true ? this.name_ + \".\" + stringifyKey(key) + \"?\" : 0, false);\n this.hasMap_.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () {\n return _this.hasMap_[\"delete\"](key);\n });\n }\n\n return entry.get();\n };\n\n _proto.set = function set(key, value) {\n var hasKey = this.has_(key);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? UPDATE : ADD,\n object: this,\n newValue: value,\n name: key\n });\n if (!change) return this;\n value = change.newValue;\n }\n\n if (hasKey) {\n this.updateValue_(key, value);\n } else {\n this.addValue_(key, value);\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(key) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n name: key\n });\n if (!change) return false;\n }\n\n if (this.has_(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: this.data_.get(key).value_,\n name: key\n } : null;\n\n if ( true && notifySpy) spyReportStart(_change);\n transaction(function () {\n _this2.keysAtom_.reportChanged();\n\n _this2.updateHasMapEntry_(key, false);\n\n var observable = _this2.data_.get(key);\n\n observable.setNewValue_(undefined);\n\n _this2.data_[\"delete\"](key);\n });\n if (notify) notifyListeners(this, _change);\n if ( true && notifySpy) spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.updateHasMapEntry_ = function updateHasMapEntry_(key, value) {\n var entry = this.hasMap_.get(key);\n\n if (entry) {\n entry.setNewValue_(value);\n }\n };\n\n _proto.updateValue_ = function updateValue_(key, newValue) {\n var observable = this.data_.get(key);\n newValue = observable.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: UPDATE,\n object: this,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n }\n };\n\n _proto.addValue_ = function addValue_(key, newValue) {\n var _this3 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n transaction(function () {\n var observable = new ObservableValue(newValue, _this3.enhancer_, true ? _this3.name_ + \".\" + stringifyKey(key) : 0, false);\n\n _this3.data_.set(key, observable);\n\n newValue = observable.value_; // value might have been changed\n\n _this3.updateHasMapEntry_(key, true);\n\n _this3.keysAtom_.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n name: key,\n newValue: newValue\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n };\n\n _proto.get = function get(key) {\n if (this.has(key)) return this.dehanceValue_(this.data_.get(key).get());\n return this.dehanceValue_(undefined);\n };\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.keys = function keys() {\n this.keysAtom_.reportObserved();\n return this.data_.keys();\n };\n\n _proto.values = function values() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next = keys.next(),\n done = _keys$next.done,\n value = _keys$next.value;\n\n return {\n done: done,\n value: done ? undefined : self.get(value)\n };\n }\n });\n };\n\n _proto.entries = function entries() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next2 = keys.next(),\n done = _keys$next2.done,\n value = _keys$next2.value;\n\n return {\n done: done,\n value: done ? undefined : [value, self.get(value)]\n };\n }\n });\n };\n\n _proto[_Symbol$iterator] = function () {\n return this.entries();\n };\n\n _proto.forEach = function forEach(callback, thisArg) {\n for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n value = _step$value[1];\n callback.call(thisArg, value, key, this);\n }\n }\n /** Merge another object into this object, returns this. */\n ;\n\n _proto.merge = function merge(other) {\n var _this4 = this;\n\n if (isObservableMap(other)) {\n other = new Map(other);\n }\n\n transaction(function () {\n if (isPlainObject(other)) getPlainObjectKeys(other).forEach(function (key) {\n return _this4.set(key, other[key]);\n });else if (Array.isArray(other)) other.forEach(function (_ref) {\n var key = _ref[0],\n value = _ref[1];\n return _this4.set(key, value);\n });else if (isES6Map(other)) {\n if (other.constructor !== Map) die(19, other);\n other.forEach(function (value, key) {\n return _this4.set(key, value);\n });\n } else if (other !== null && other !== undefined) die(20, other);\n });\n return this;\n };\n\n _proto.clear = function clear() {\n var _this5 = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator2 = _createForOfIteratorHelperLoose(_this5.keys()), _step2; !(_step2 = _iterator2()).done;) {\n var key = _step2.value;\n\n _this5[\"delete\"](key);\n }\n });\n });\n };\n\n _proto.replace = function replace(values) {\n var _this6 = this;\n\n // Implementation requirements:\n // - respect ordering of replacement map\n // - allow interceptors to run and potentially prevent individual operations\n // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n // - note that result map may differ from replacement map due to the interceptors\n transaction(function () {\n // Convert to map so we can do quick key lookups\n var replacementMap = convertToMap(values);\n var orderedData = new Map(); // Used for optimization\n\n var keysReportChangedCalled = false; // Delete keys that don't exist in replacement map\n // if the key deletion is prevented by interceptor\n // add entry at the beginning of the result map\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(_this6.data_.keys()), _step3; !(_step3 = _iterator3()).done;) {\n var key = _step3.value;\n\n // Concurrently iterating/deleting keys\n // iterator should handle this correctly\n if (!replacementMap.has(key)) {\n var deleted = _this6[\"delete\"](key); // Was the key removed?\n\n\n if (deleted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n } else {\n // Delete prevented by interceptor\n var value = _this6.data_.get(key);\n\n orderedData.set(key, value);\n }\n }\n } // Merge entries\n\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(replacementMap.entries()), _step4; !(_step4 = _iterator4()).done;) {\n var _step4$value = _step4.value,\n _key = _step4$value[0],\n _value = _step4$value[1];\n\n // We will want to know whether a new key is added\n var keyExisted = _this6.data_.has(_key); // Add or update value\n\n\n _this6.set(_key, _value); // The addition could have been prevent by interceptor\n\n\n if (_this6.data_.has(_key)) {\n // The update could have been prevented by interceptor\n // and also we want to preserve existing values\n // so use value from _data map (instead of replacement map)\n var _value2 = _this6.data_.get(_key);\n\n orderedData.set(_key, _value2); // Was a new key added?\n\n if (!keyExisted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n }\n } // Check for possible key order change\n\n\n if (!keysReportChangedCalled) {\n if (_this6.data_.size !== orderedData.size) {\n // If size differs, keys are definitely modified\n _this6.keysAtom_.reportChanged();\n } else {\n var iter1 = _this6.data_.keys();\n\n var iter2 = orderedData.keys();\n var next1 = iter1.next();\n var next2 = iter2.next();\n\n while (!next1.done) {\n if (next1.value !== next2.value) {\n _this6.keysAtom_.reportChanged();\n\n break;\n }\n\n next1 = iter1.next();\n next2 = iter2.next();\n }\n }\n } // Use correctly ordered map\n\n\n _this6.data_ = orderedData;\n });\n return this;\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableMap]\";\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if ( true && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with maps.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _createClass(ObservableMap, [{\n key: \"size\",\n get: function get() {\n this.keysAtom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag,\n get: function get() {\n return \"Map\";\n }\n }]);\n\n return ObservableMap;\n}(); // eslint-disable-next-line\n\nvar isObservableMap = /*#__PURE__*/createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n } else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n } else if (isPlainObject(dataStructure)) {\n var map = new Map();\n\n for (var key in dataStructure) {\n map.set(key, dataStructure[key]);\n }\n\n return map;\n } else {\n return die(21, dataStructure);\n }\n}\n\nvar _Symbol$iterator$1, _Symbol$toStringTag$1;\nvar ObservableSetMarker = {};\n_Symbol$iterator$1 = Symbol.iterator;\n_Symbol$toStringTag$1 = Symbol.toStringTag;\nvar ObservableSet = /*#__PURE__*/function () {\n function ObservableSet(initialData, enhancer, name_) {\n if (enhancer === void 0) {\n enhancer = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableSet@\" + getNextId() : 0;\n }\n\n this.name_ = void 0;\n this[$mobx] = ObservableSetMarker;\n this.data_ = new Set();\n this.atom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = void 0;\n this.name_ = name_;\n\n if (!isFunction(Set)) {\n die(22);\n }\n\n this.atom_ = createAtom(this.name_);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, name_);\n };\n\n if (initialData) {\n this.replace(initialData);\n }\n }\n\n var _proto = ObservableSet.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.clear = function clear() {\n var _this = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator = _createForOfIteratorHelperLoose(_this.data_.values()), _step; !(_step = _iterator()).done;) {\n var value = _step.value;\n\n _this[\"delete\"](value);\n }\n });\n });\n };\n\n _proto.forEach = function forEach(callbackFn, thisArg) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this), _step2; !(_step2 = _iterator2()).done;) {\n var value = _step2.value;\n callbackFn.call(thisArg, value, value, this);\n }\n };\n\n _proto.add = function add(value) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: ADD,\n object: this,\n newValue: value\n });\n if (!change) return this; // ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n }\n\n if (!this.has(value)) {\n transaction(function () {\n _this2.data_.add(_this2.enhancer_(value, undefined));\n\n _this2.atom_.reportChanged();\n });\n var notifySpy = true && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n newValue: value\n } : null;\n\n if (notifySpy && \"development\" !== \"production\") spyReportStart(_change);\n if (notify) notifyListeners(this, _change);\n if (notifySpy && \"development\" !== \"production\") spyReportEnd();\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(value) {\n var _this3 = this;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n oldValue: value\n });\n if (!change) return false;\n }\n\n if (this.has(value)) {\n var notifySpy = true && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change2 = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: value\n } : null;\n\n if (notifySpy && \"development\" !== \"production\") spyReportStart(_change2);\n transaction(function () {\n _this3.atom_.reportChanged();\n\n _this3.data_[\"delete\"](value);\n });\n if (notify) notifyListeners(this, _change2);\n if (notifySpy && \"development\" !== \"production\") spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.has = function has(value) {\n this.atom_.reportObserved();\n return this.data_.has(this.dehanceValue_(value));\n };\n\n _proto.entries = function entries() {\n var nextIndex = 0;\n var keys = Array.from(this.keys());\n var values = Array.from(this.values());\n return makeIterable({\n next: function next() {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length ? {\n value: [keys[index], values[index]],\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.keys = function keys() {\n return this.values();\n };\n\n _proto.values = function values() {\n this.atom_.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues = Array.from(this.data_.values());\n return makeIterable({\n next: function next() {\n return nextIndex < observableValues.length ? {\n value: self.dehanceValue_(observableValues[nextIndex++]),\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.replace = function replace(other) {\n var _this4 = this;\n\n if (isObservableSet(other)) {\n other = new Set(other);\n }\n\n transaction(function () {\n if (Array.isArray(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (isES6Set(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (other !== null && other !== undefined) {\n die(\"Cannot initialize set from \" + other);\n }\n });\n return this;\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n // ... 'fireImmediately' could also be true?\n if ( true && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with sets.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableSet]\";\n };\n\n _proto[_Symbol$iterator$1] = function () {\n return this.values();\n };\n\n _createClass(ObservableSet, [{\n key: \"size\",\n get: function get() {\n this.atom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag$1,\n get: function get() {\n return \"Set\";\n }\n }]);\n\n return ObservableSet;\n}(); // eslint-disable-next-line\n\nvar isObservableSet = /*#__PURE__*/createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar descriptorCache = /*#__PURE__*/Object.create(null);\nvar REMOVE = \"remove\";\nvar ObservableObjectAdministration = /*#__PURE__*/function () {\n function ObservableObjectAdministration(target_, values_, name_, // Used anytime annotation is not explicitely provided\n defaultAnnotation_) {\n if (values_ === void 0) {\n values_ = new Map();\n }\n\n if (defaultAnnotation_ === void 0) {\n defaultAnnotation_ = autoAnnotation;\n }\n\n this.target_ = void 0;\n this.values_ = void 0;\n this.name_ = void 0;\n this.defaultAnnotation_ = void 0;\n this.keysAtom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.proxy_ = void 0;\n this.isPlainObject_ = void 0;\n this.appliedAnnotations_ = void 0;\n this.pendingKeys_ = void 0;\n this.target_ = target_;\n this.values_ = values_;\n this.name_ = name_;\n this.defaultAnnotation_ = defaultAnnotation_;\n this.keysAtom_ = new Atom( true ? this.name_ + \".keys\" : 0); // Optimization: we use this frequently\n\n this.isPlainObject_ = isPlainObject(this.target_);\n\n if ( true && !isAnnotation(this.defaultAnnotation_)) {\n die(\"defaultAnnotation must be valid annotation\");\n }\n\n if (true) {\n // Prepare structure for tracking which fields were already annotated\n this.appliedAnnotations_ = {};\n }\n }\n\n var _proto = ObservableObjectAdministration.prototype;\n\n _proto.getObservablePropValue_ = function getObservablePropValue_(key) {\n return this.values_.get(key).get();\n };\n\n _proto.setObservablePropValue_ = function setObservablePropValue_(key, newValue) {\n var observable = this.values_.get(key);\n\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return true;\n } // intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: newValue\n });\n if (!change) return null;\n newValue = change.newValue;\n }\n\n newValue = observable.prepareNewValue_(newValue); // notify spy & observers\n\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n\n var _change = notify || notifySpy ? {\n type: UPDATE,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n\n if ( true && notifySpy) spyReportStart(_change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, _change);\n if ( true && notifySpy) spyReportEnd();\n }\n\n return true;\n };\n\n _proto.get_ = function get_(key) {\n if (globalState.trackingDerivation && !hasProp(this.target_, key)) {\n // Key doesn't exist yet, subscribe for it in case it's added later\n this.has_(key);\n }\n\n return this.target_[key];\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {any} value\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.set_ = function set_(key, value, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // Don't use .has(key) - we care about own\n if (hasProp(this.target_, key)) {\n // Existing prop\n if (this.values_.has(key)) {\n // Observable (can be intercepted)\n return this.setObservablePropValue_(key, value);\n } else if (proxyTrap) {\n // Non-observable - proxy\n return Reflect.set(this.target_, key, value);\n } else {\n // Non-observable\n this.target_[key] = value;\n return true;\n }\n } else {\n // New prop\n return this.extend_(key, {\n value: value,\n enumerable: true,\n writable: true,\n configurable: true\n }, this.defaultAnnotation_, proxyTrap);\n }\n } // Trap for \"in\"\n ;\n\n _proto.has_ = function has_(key) {\n if (!globalState.trackingDerivation) {\n // Skip key subscription outside derivation\n return key in this.target_;\n }\n\n this.pendingKeys_ || (this.pendingKeys_ = new Map());\n var entry = this.pendingKeys_.get(key);\n\n if (!entry) {\n entry = new ObservableValue(key in this.target_, referenceEnhancer, true ? this.name_ + \".\" + stringifyKey(key) + \"?\" : 0, false);\n this.pendingKeys_.set(key, entry);\n }\n\n return entry.get();\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - ignore prop\r\n */\n ;\n\n _proto.make_ = function make_(key, annotation) {\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n\n if (annotation === false) {\n return;\n }\n\n assertAnnotable(this, annotation, key);\n\n if (!(key in this.target_)) {\n var _this$target_$storedA;\n\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n if ((_this$target_$storedA = this.target_[storedAnnotationsSymbol]) == null ? void 0 : _this$target_$storedA[key]) {\n return; // will be annotated by subclass constructor\n } else {\n die(1, annotation.annotationType_, this.name_ + \".\" + key.toString());\n }\n }\n\n var source = this.target_;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n var outcome = annotation.make_(this, key, descriptor, source);\n if (outcome === 0\n /* Cancel */\n ) return;\n if (outcome === 1\n /* Break */\n ) break;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n recordAnnotationApplied(this, annotation, key);\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.extend_ = function extend_(key, descriptor, annotation, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n\n if (annotation === false) {\n return this.defineProperty_(key, descriptor, proxyTrap);\n }\n\n assertAnnotable(this, annotation, key);\n var outcome = annotation.extend_(this, key, descriptor, proxyTrap);\n\n if (outcome) {\n recordAnnotationApplied(this, annotation, key);\n }\n\n return outcome;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.defineProperty_ = function defineProperty_(key, descriptor, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: descriptor.value\n });\n if (!change) return null;\n var newValue = change.newValue;\n\n if (descriptor.value !== newValue) {\n descriptor = _extends({}, descriptor, {\n value: newValue\n });\n }\n } // Define\n\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n } // Notify\n\n\n this.notifyPropertyAddition_(key, descriptor.value);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: value\n });\n if (!change) return null;\n value = change.newValue;\n }\n\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: true,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n var observable = new ObservableValue(value, enhancer, true ? this.name_ + \".\" + key.toString() : 0, false);\n this.values_.set(key, observable); // Notify (value possibly changed by ObservableValue)\n\n this.notifyPropertyAddition_(key, observable.value_);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: undefined\n });\n if (!change) return null;\n }\n\n options.name || (options.name = true ? this.name_ + \".\" + key.toString() : 0);\n options.context = this.proxy_ || this.target_;\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: false,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n this.values_.set(key, new ComputedValue(options)); // Notify\n\n this.notifyPropertyAddition_(key, undefined);\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.delete_ = function delete_(key, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // No such prop\n if (!hasProp(this.target_, key)) {\n return true;\n } // Intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: REMOVE\n }); // Cancelled\n\n if (!change) return null;\n } // Delete\n\n\n try {\n var _this$pendingKeys_, _this$pendingKeys_$ge;\n\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n var observable = this.values_.get(key); // Value needed for spies/listeners\n\n var value = undefined; // Optimization: don't pull the value unless we will need it\n\n if (!observable && (notify || notifySpy)) {\n var _getDescriptor;\n\n value = (_getDescriptor = getDescriptor(this.target_, key)) == null ? void 0 : _getDescriptor.value;\n } // delete prop (do first, may fail)\n\n\n if (proxyTrap) {\n if (!Reflect.deleteProperty(this.target_, key)) {\n return false;\n }\n } else {\n delete this.target_[key];\n } // Allow re-annotating this field\n\n\n if (true) {\n delete this.appliedAnnotations_[key];\n } // Clear observable\n\n\n if (observable) {\n this.values_[\"delete\"](key); // for computed, value is undefined\n\n if (observable instanceof ObservableValue) {\n value = observable.value_;\n } // Notify: autorun(() => obj[key]), see #1796\n\n\n propagateChanged(observable);\n } // Notify \"keys/entries/values\" observers\n\n\n this.keysAtom_.reportChanged(); // Notify \"has\" observers\n // \"in\" as it may still exist in proto\n\n (_this$pendingKeys_ = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_$ge = _this$pendingKeys_.get(key)) == null ? void 0 : _this$pendingKeys_$ge.set(key in this.target_); // Notify spies/listeners\n\n if (notify || notifySpy) {\n var _change2 = {\n type: REMOVE,\n observableKind: \"object\",\n object: this.proxy_ || this.target_,\n debugObjectName: this.name_,\n oldValue: value,\n name: key\n };\n if ( true && notifySpy) spyReportStart(_change2);\n if (notify) notifyListeners(this, _change2);\n if ( true && notifySpy) spyReportEnd();\n }\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n ;\n\n _proto.observe_ = function observe_(callback, fireImmediately) {\n if ( true && fireImmediately === true) die(\"`observe` doesn't support the fire immediately property for observable objects.\");\n return registerListener(this, callback);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.notifyPropertyAddition_ = function notifyPropertyAddition_(key, value) {\n var _this$pendingKeys_2, _this$pendingKeys_2$g;\n\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n\n if (notify || notifySpy) {\n var change = notify || notifySpy ? {\n type: ADD,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: value\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n }\n\n (_this$pendingKeys_2 = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_2$g = _this$pendingKeys_2.get(key)) == null ? void 0 : _this$pendingKeys_2$g.set(true); // Notify \"keys/entries/values\" observers\n\n this.keysAtom_.reportChanged();\n };\n\n _proto.ownKeys_ = function ownKeys_() {\n this.keysAtom_.reportObserved();\n return ownKeys(this.target_);\n };\n\n _proto.keys_ = function keys_() {\n // Returns enumerable && own, but unfortunately keysAtom will report on ANY key change.\n // There is no way to distinguish between Object.keys(object) and Reflect.ownKeys(object) - both are handled by ownKeys trap.\n // We can either over-report in Object.keys(object) or under-report in Reflect.ownKeys(object)\n // We choose to over-report in Object.keys(object), because:\n // - typically it's used with simple data objects\n // - when symbolic/non-enumerable keys are relevant Reflect.ownKeys works as expected\n this.keysAtom_.reportObserved();\n return Object.keys(this.target_);\n };\n\n return ObservableObjectAdministration;\n}();\nfunction asObservableObject(target, options) {\n var _options$name;\n\n if ( true && options && isObservableObject(target)) {\n die(\"Options can't be provided for already observable objects.\");\n }\n\n if (hasProp(target, $mobx)) {\n if ( true && !(getAdministration(target) instanceof ObservableObjectAdministration)) {\n die(\"Cannot convert '\" + getDebugName(target) + \"' into observable object:\" + \"\\nThe target is already observable of different type.\" + \"\\nExtending builtins is not supported.\");\n }\n\n return target;\n }\n\n if ( true && !Object.isExtensible(target)) die(\"Cannot make the designated object observable; it is not extensible\");\n var name = (_options$name = options == null ? void 0 : options.name) != null ? _options$name : true ? (isPlainObject(target) ? \"ObservableObject\" : target.constructor.name) + \"@\" + getNextId() : 0;\n var adm = new ObservableObjectAdministration(target, new Map(), String(name), getAnnotationFromOptions(options));\n addHiddenProp(target, $mobx, adm);\n return target;\n}\nvar isObservableObjectAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\n\nfunction getCachedObservablePropDescriptor(key) {\n return descriptorCache[key] || (descriptorCache[key] = {\n get: function get() {\n return this[$mobx].getObservablePropValue_(key);\n },\n set: function set(value) {\n return this[$mobx].setObservablePropValue_(key, value);\n }\n });\n}\n\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n return isObservableObjectAdministration(thing[$mobx]);\n }\n\n return false;\n}\nfunction recordAnnotationApplied(adm, annotation, key) {\n var _adm$target_$storedAn;\n\n if (true) {\n adm.appliedAnnotations_[key] = annotation;\n } // Remove applied decorator annotation so we don't try to apply it again in subclass constructor\n\n\n (_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? true : delete _adm$target_$storedAn[key];\n}\n\nfunction assertAnnotable(adm, annotation, key) {\n // Valid annotation\n if ( true && !isAnnotation(annotation)) {\n die(\"Cannot annotate '\" + adm.name_ + \".\" + key.toString() + \"': Invalid annotation.\");\n }\n /*\r\n // Configurable, not sealed, not frozen\r\n // Possibly not needed, just a little better error then the one thrown by engine.\r\n // Cases where this would be useful the most (subclass field initializer) are not interceptable by this.\r\n if (__DEV__) {\r\n const configurable = getDescriptor(adm.target_, key)?.configurable\r\n const frozen = Object.isFrozen(adm.target_)\r\n const sealed = Object.isSealed(adm.target_)\r\n if (!configurable || frozen || sealed) {\r\n const fieldName = `${adm.name_}.${key.toString()}`\r\n const requestedAnnotationType = annotation.annotationType_\r\n let error = `Cannot apply '${requestedAnnotationType}' to '${fieldName}':`\r\n if (frozen) {\r\n error += `\\nObject is frozen.`\r\n }\r\n if (sealed) {\r\n error += `\\nObject is sealed.`\r\n }\r\n if (!configurable) {\r\n error += `\\nproperty is not configurable.`\r\n // Mention only if caused by us to avoid confusion\r\n if (hasProp(adm.appliedAnnotations!, key)) {\r\n error += `\\nTo prevent accidental re-definition of a field by a subclass, `\r\n error += `all annotated fields of non-plain objects (classes) are not configurable.`\r\n }\r\n }\r\n die(error)\r\n }\r\n }\r\n */\n // Not annotated\n\n\n if ( true && !isOverride(annotation) && hasProp(adm.appliedAnnotations_, key)) {\n var fieldName = adm.name_ + \".\" + key.toString();\n var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already annotated with '\" + currentAnnotationType + \"'.\") + \"\\nRe-annotating fields is not allowed.\" + \"\\nUse 'override' annotation for methods overriden by subclass.\");\n }\n}\n\n/**\r\n * This array buffer contains two lists of properties, so that all arrays\r\n * can recycle their property definitions, which significantly improves performance of creating\r\n * properties on the fly.\r\n */\n\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array\n\nvar StubArray = function StubArray() {};\n\nfunction inherit(ctor, proto) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(ctor.prototype, proto);\n } else if (ctor.prototype.__proto__ !== undefined) {\n ctor.prototype.__proto__ = proto;\n } else {\n ctor.prototype = proto;\n }\n}\n\ninherit(StubArray, Array.prototype); // Weex proto freeze protection was here,\n// but it is unclear why the hack is need as MobX never changed the prototype\n// anyway, so removed it in V6\n\nvar LegacyObservableArray = /*#__PURE__*/function (_StubArray) {\n _inheritsLoose(LegacyObservableArray, _StubArray);\n\n function LegacyObservableArray(initialValues, enhancer, name, owned) {\n var _this;\n\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n _this = _StubArray.call(this) || this;\n var adm = new ObservableArrayAdministration(name, enhancer, owned, true);\n adm.proxy_ = _assertThisInitialized(_this);\n addHiddenFinalProp(_assertThisInitialized(_this), $mobx, adm);\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true); // @ts-ignore\n\n _this.spliceWithArray(0, 0, initialValues);\n\n allowStateChangesEnd(prev);\n }\n\n return _this;\n }\n\n var _proto = LegacyObservableArray.prototype;\n\n _proto.concat = function concat() {\n this[$mobx].atom_.reportObserved();\n\n for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {\n arrays[_key] = arguments[_key];\n }\n\n return Array.prototype.concat.apply(this.slice(), //@ts-ignore\n arrays.map(function (a) {\n return isObservableArray(a) ? a.slice() : a;\n }));\n };\n\n _proto[Symbol.iterator] = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function next() {\n // @ts-ignore\n return nextIndex < self.length ? {\n value: self[nextIndex++],\n done: false\n } : {\n done: true,\n value: undefined\n };\n }\n });\n };\n\n _createClass(LegacyObservableArray, [{\n key: \"length\",\n get: function get() {\n return this[$mobx].getArrayLength_();\n },\n set: function set(newLength) {\n this[$mobx].setArrayLength_(newLength);\n }\n }, {\n key: Symbol.toStringTag,\n get: function get() {\n return \"Array\";\n }\n }]);\n\n return LegacyObservableArray;\n}(StubArray);\n\nObject.entries(arrayExtensions).forEach(function (_ref) {\n var prop = _ref[0],\n fn = _ref[1];\n if (prop !== \"concat\") addHiddenProp(LegacyObservableArray.prototype, prop, fn);\n});\n\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: true,\n get: function get() {\n return this[$mobx].get_(index);\n },\n set: function set(value) {\n this[$mobx].set_(index, value);\n }\n };\n}\n\nfunction createArrayBufferItem(index) {\n defineProperty(LegacyObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\n\nfunction reserveArrayBuffer(max) {\n if (max > OBSERVABLE_ARRAY_BUFFER_SIZE) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max + 100; index++) {\n createArrayBufferItem(index);\n }\n\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n }\n}\nreserveArrayBuffer(1000);\nfunction createLegacyArray(initialValues, enhancer, name) {\n return new LegacyObservableArray(initialValues, enhancer, name);\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined) die(23);\n return thing[$mobx].atom_;\n }\n\n if (isObservableSet(thing)) {\n return thing[$mobx];\n }\n\n if (isObservableMap(thing)) {\n if (property === undefined) return thing.keysAtom_;\n var observable = thing.data_.get(property) || thing.hasMap_.get(property);\n if (!observable) die(25, property, getDebugName(thing));\n return observable;\n }\n\n if (isObservableObject(thing)) {\n if (!property) return die(26);\n\n var _observable = thing[$mobx].values_.get(property);\n\n if (!_observable) die(27, property, getDebugName(thing));\n return _observable;\n }\n\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n } else if (isFunction(thing)) {\n if (isReaction(thing[$mobx])) {\n // disposer function\n return thing[$mobx];\n }\n }\n\n die(28);\n}\nfunction getAdministration(thing, property) {\n if (!thing) die(29);\n if (property !== undefined) return getAdministration(getAtom(thing, property));\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) return thing;\n if (isObservableMap(thing) || isObservableSet(thing)) return thing;\n if (thing[$mobx]) return thing[$mobx];\n die(24, thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n\n if (property !== undefined) {\n named = getAtom(thing, property);\n } else if (isAction(thing)) {\n return thing.name;\n } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) {\n named = getAdministration(thing);\n } else {\n // valid for arrays as well\n named = getAtom(thing);\n }\n\n return named.name_;\n}\n\nvar toString = objectPrototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) {\n depth = -1;\n }\n\n return eq(a, b, depth);\n} // Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\n\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison).\n\n if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive.\n\n if (a !== a) return b !== b; // Exhaust primitive checks\n\n var type = typeof a;\n if (!isFunction(type) && type !== \"object\" && typeof b != \"object\") return false; // Compare `[[Class]]` names.\n\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\": // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values.\n\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n\n case \"[object Symbol]\":\n return typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b);\n\n case \"[object Map]\":\n case \"[object Set]\":\n // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n // Hide this extra level by increasing the depth.\n if (depth >= 0) {\n depth++;\n }\n\n break;\n } // Unwrap any wrapped objects.\n\n\n a = unwrap(a);\n b = unwrap(b);\n var areArrays = className === \"[object Array]\";\n\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\") return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n\n var aCtor = a.constructor,\n bCtor = b.constructor;\n\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && \"constructor\" in a && \"constructor\" in b) {\n return false;\n }\n }\n\n if (depth === 0) {\n return false;\n } else if (depth < 0) {\n depth = -1;\n } // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n\n\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n } // Add the first object to the stack of traversed objects.\n\n\n aStack.push(a);\n bStack.push(b); // Recursively compare objects and arrays.\n\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties.\n\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key;\n length = keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality.\n\n if (Object.keys(b).length !== length) return false;\n\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) return false;\n }\n } // Remove the first object from the stack of traversed objects.\n\n\n aStack.pop();\n bStack.pop();\n return true;\n}\n\nfunction unwrap(a) {\n if (isObservableArray(a)) return a.slice();\n if (isES6Map(a) || isObservableMap(a)) return Array.from(a.entries());\n if (isES6Set(a) || isObservableSet(a)) return Array.from(a.entries());\n return a;\n}\n\nfunction makeIterable(iterator) {\n iterator[Symbol.iterator] = getSelf;\n return iterator;\n}\n\nfunction getSelf() {\n return this;\n}\n\nfunction isAnnotation(thing) {\n return (// Can be function\n thing instanceof Object && typeof thing.annotationType_ === \"string\" && isFunction(thing.make_) && isFunction(thing.extend_)\n );\n}\n\n/**\r\n * (c) Michel Weststrate 2015 - 2020\r\n * MIT Licensed\r\n *\r\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\r\n * this is a good place to start:\r\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\r\n *\r\n * Source folders:\r\n * ===============\r\n *\r\n * - api/ Most of the public static methods exposed by the module can be found here.\r\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\r\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\r\n * - utils/ Utility stuff.\r\n *\r\n */\n[\"Symbol\", \"Map\", \"Set\", \"Symbol\"].forEach(function (m) {\n var g = getGlobal();\n\n if (typeof g[m] === \"undefined\") {\n die(\"MobX requires global '\" + m + \"' to be available or polyfilled\");\n }\n});\n\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n\n\n//# sourceMappingURL=mobx.esm.js.map\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-observable-history/node_modules/mobx/dist/mobx.esm.js?");
18371
+ eval("\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ObservableSearchParams = void 0;\nconst mobx_1 = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\nclass ObservableSearchParams {\n constructor(init, opts = {}) {\n Object.defineProperty(this, \"opts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: opts\n });\n Object.defineProperty(this, \"search\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"\"\n });\n Object.defineProperty(this, \"searchParams\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n mobx_1.makeObservable(this);\n this.opts = Object.assign({ skipEmpty: true, joinArrays: false, joinArraysWith: \",\" }, opts);\n this.search = this.normalize(init);\n this.searchParams = new URLSearchParams(init);\n return new Proxy(this, {\n getPrototypeOf(target) {\n return URLSearchParams.prototype;\n },\n get: (target, prop, context) => {\n let fieldRef = Reflect.get(target, prop, context);\n // handle native URLSearchParams()-api updates via proxy-object\n if (!(prop in target)) {\n fieldRef = Reflect.get(this.searchParams, prop, context);\n if (typeof fieldRef === \"function\") {\n return (...args) => {\n let oldValue = this.searchParams.toString();\n let result = Reflect.apply(fieldRef, this.searchParams, args);\n let newValue = this.searchParams.toString();\n let isChanged = oldValue !== newValue;\n if (isChanged) {\n this.replace(newValue);\n }\n return result;\n };\n }\n }\n return fieldRef;\n },\n });\n }\n normalize(search = \"\") {\n const { joinArrays, joinArraysWith, skipEmpty } = this.opts;\n const params = {};\n const normalizedParams = [];\n Array.from(new URLSearchParams(search)).forEach(([param, value]) => {\n var _a;\n if (skipEmpty && !value)\n return;\n const values = joinArrays ? value.split(joinArraysWith) : [value];\n (_a = params[param]) !== null && _a !== void 0 ? _a : (params[param] = []);\n params[param].push(...values);\n });\n Object.entries(params).forEach(([name, values]) => {\n if (joinArrays) {\n normalizedParams.push([name, values.join(joinArraysWith)]);\n }\n else {\n const multiParamsWithSameKey = values.map(value => [name, value]);\n normalizedParams.push(...multiParamsWithSameKey);\n }\n });\n return new URLSearchParams(normalizedParams).toString();\n }\n replace(search) {\n search = this.normalize(search);\n if (this.search !== search) {\n this.search = search;\n this.searchParams = new URLSearchParams(search);\n }\n }\n merge(search) {\n search = this.normalize(search);\n this.replace(`${this.search}&${search}`);\n }\n deleteAll() {\n this.search = \"\";\n Array.from(this.searchParams.keys()).forEach(key => {\n this.searchParams.delete(key);\n });\n }\n getAll(param) {\n const values = this.searchParams.getAll(param);\n const { joinArrays, joinArraysWith } = this.opts;\n if (joinArrays) {\n return values.flatMap(param => param.split(joinArraysWith));\n }\n return values;\n }\n toString({ withPrefix = false } = {}) {\n if (!this.search)\n return \"\";\n return `${withPrefix ? \"?\" : \"\"}${this.search}`;\n }\n}\n__decorate([\n mobx_1.observable\n], ObservableSearchParams.prototype, \"search\", void 0);\n__decorate([\n mobx_1.observable.ref\n], ObservableSearchParams.prototype, \"searchParams\", void 0);\n__decorate([\n mobx_1.action\n], ObservableSearchParams.prototype, \"replace\", null);\n__decorate([\n mobx_1.action\n], ObservableSearchParams.prototype, \"deleteAll\", null);\nexports.ObservableSearchParams = ObservableSearchParams;\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-observable-history/lib/observable-search-params.js?");
18383
18372
 
18384
18373
  /***/ }),
18385
18374
 
@@ -18412,7 +18401,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
18412
18401
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18413
18402
 
18414
18403
  "use strict";
18415
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"observer\": () => (/* binding */ observer)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _staticRendering__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./staticRendering */ \"./node_modules/mobx-react-lite/es/staticRendering.js\");\n/* harmony import */ var _useObserver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useObserver */ \"./node_modules/mobx-react-lite/es/useObserver.js\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n// n.b. base case is not used for actual typings or exported in the typing files\nfunction observer(baseComponent, options) {\n // The working of observer is explained step by step in this talk: https://www.youtube.com/watch?v=cPF4iBedoF0&feature=youtu.be&t=1307\n if ((0,_staticRendering__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)()) {\n return baseComponent;\n }\n var realOptions = __assign({ forwardRef: false }, options);\n var baseComponentName = baseComponent.displayName || baseComponent.name;\n var wrappedComponent = function (props, ref) {\n return (0,_useObserver__WEBPACK_IMPORTED_MODULE_2__.useObserver)(function () { return baseComponent(props, ref); }, baseComponentName);\n };\n wrappedComponent.displayName = baseComponentName;\n // memo; we are not interested in deep updates\n // in props; we assume that if deep objects are changed,\n // this is in observables, which would have been tracked anyway\n var memoComponent;\n if (realOptions.forwardRef) {\n // we have to use forwardRef here because:\n // 1. it cannot go before memo, only after it\n // 2. forwardRef converts the function into an actual component, so we can't let the baseComponent do it\n // since it wouldn't be a callable function anymore\n memoComponent = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)((0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(wrappedComponent));\n }\n else {\n memoComponent = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(wrappedComponent);\n }\n copyStaticProperties(baseComponent, memoComponent);\n memoComponent.displayName = baseComponentName;\n return memoComponent;\n}\n// based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\nvar hoistBlackList = {\n $$typeof: true,\n render: true,\n compare: true,\n type: true\n};\nfunction copyStaticProperties(base, target) {\n Object.keys(base).forEach(function (key) {\n if (!hoistBlackList[key]) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n//# sourceMappingURL=observer.js.map\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react-lite/es/observer.js?");
18404
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"observer\": () => (/* binding */ observer)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _staticRendering__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./staticRendering */ \"./node_modules/mobx-react-lite/es/staticRendering.js\");\n/* harmony import */ var _useObserver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useObserver */ \"./node_modules/mobx-react-lite/es/useObserver.js\");\n\n\n\nvar warnObserverOptionsDeprecated = true;\nvar hasSymbol = typeof Symbol === \"function\" && Symbol.for;\n// Using react-is had some issues (and operates on elements, not on types), see #608 / #609\nvar ReactForwardRefSymbol = hasSymbol\n ? Symbol.for(\"react.forward_ref\")\n : typeof react__WEBPACK_IMPORTED_MODULE_0__.forwardRef === \"function\" && (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props) { return null; })[\"$$typeof\"];\nvar ReactMemoSymbol = hasSymbol\n ? Symbol.for(\"react.memo\")\n : typeof react__WEBPACK_IMPORTED_MODULE_0__.memo === \"function\" && (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function (props) { return null; })[\"$$typeof\"];\n// n.b. base case is not used for actual typings or exported in the typing files\nfunction observer(baseComponent, \n// TODO remove in next major\noptions) {\n var _a;\n if ( true && warnObserverOptionsDeprecated && options) {\n warnObserverOptionsDeprecated = false;\n console.warn(\"[mobx-react-lite] `observer(fn, { forwardRef: true })` is depreacted, use `observer(React.forwardRef(fn))`\");\n }\n if (ReactMemoSymbol && baseComponent[\"$$typeof\"] === ReactMemoSymbol) {\n throw new Error(\"[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.\");\n }\n // The working of observer is explained step by step in this talk: https://www.youtube.com/watch?v=cPF4iBedoF0&feature=youtu.be&t=1307\n if ((0,_staticRendering__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)()) {\n return baseComponent;\n }\n var useForwardRef = (_a = options === null || options === void 0 ? void 0 : options.forwardRef) !== null && _a !== void 0 ? _a : false;\n var render = baseComponent;\n var baseComponentName = baseComponent.displayName || baseComponent.name;\n // If already wrapped with forwardRef, unwrap,\n // so we can patch render and apply memo\n if (ReactForwardRefSymbol && baseComponent[\"$$typeof\"] === ReactForwardRefSymbol) {\n useForwardRef = true;\n render = baseComponent[\"render\"];\n if (typeof render !== \"function\") {\n throw new Error(\"[mobx-react-lite] `render` property of ForwardRef was not a function\");\n }\n }\n var observerComponent = function (props, ref) {\n return (0,_useObserver__WEBPACK_IMPORTED_MODULE_2__.useObserver)(function () { return render(props, ref); }, baseComponentName);\n };\n // Don't set `displayName` for anonymous components,\n // so the `displayName` can be customized by user, see #3192.\n if (baseComponentName !== \"\") {\n ;\n observerComponent.displayName = baseComponentName;\n }\n // Support legacy context: `contextTypes` must be applied before `memo`\n if (baseComponent.contextTypes) {\n ;\n observerComponent.contextTypes = baseComponent.contextTypes;\n }\n if (useForwardRef) {\n // `forwardRef` must be applied prior `memo`\n // `forwardRef(observer(cmp))` throws:\n // \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))\"\n observerComponent = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(observerComponent);\n }\n // memo; we are not interested in deep updates\n // in props; we assume that if deep objects are changed,\n // this is in observables, which would have been tracked anyway\n observerComponent = (0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(observerComponent);\n copyStaticProperties(baseComponent, observerComponent);\n if (true) {\n Object.defineProperty(observerComponent, \"contextTypes\", {\n set: function () {\n var _a;\n throw new Error(\"[mobx-react-lite] `\".concat(this.displayName || ((_a = this.type) === null || _a === void 0 ? void 0 : _a.displayName) || \"Component\", \".contextTypes` must be set before applying `observer`.\"));\n }\n });\n }\n return observerComponent;\n}\n// based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\nvar hoistBlackList = {\n $$typeof: true,\n render: true,\n compare: true,\n type: true,\n // Don't redefine `displayName`,\n // it's defined as getter-setter pair on `memo` (see #3192).\n displayName: true\n};\nfunction copyStaticProperties(base, target) {\n Object.keys(base).forEach(function (key) {\n if (!hoistBlackList[key]) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n//# sourceMappingURL=observer.js.map\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react-lite/es/observer.js?");
18416
18405
 
18417
18406
  /***/ }),
18418
18407
 
@@ -18467,7 +18456,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
18467
18456
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18468
18457
 
18469
18458
  "use strict";
18470
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"useObserver\": () => (/* binding */ useObserver)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _utils_printDebugValue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/printDebugValue */ \"./node_modules/mobx-react-lite/es/utils/printDebugValue.js\");\n/* harmony import */ var _utils_reactionCleanupTracking__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/reactionCleanupTracking */ \"./node_modules/mobx-react-lite/es/utils/reactionCleanupTracking.js\");\n/* harmony import */ var _staticRendering__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./staticRendering */ \"./node_modules/mobx-react-lite/es/staticRendering.js\");\n/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/utils */ \"./node_modules/mobx-react-lite/es/utils/utils.js\");\nvar __read = (undefined && undefined.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\n\n\n\n\n\n\nfunction observerComponentNameFor(baseComponentName) {\n return \"observer\" + baseComponentName;\n}\n/**\n * We use class to make it easier to detect in heap snapshots by name\n */\nvar ObjectToBeRetainedByReact = /** @class */ (function () {\n function ObjectToBeRetainedByReact() {\n }\n return ObjectToBeRetainedByReact;\n}());\nfunction useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if ((0,_staticRendering__WEBPACK_IMPORTED_MODULE_3__.isUsingStaticRendering)()) {\n return fn();\n }\n var _a = __read(react__WEBPACK_IMPORTED_MODULE_0__.useState(new ObjectToBeRetainedByReact()), 1), objectRetainedByReact = _a[0];\n var forceUpdate = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_4__.useForceUpdate)();\n // StrictMode/ConcurrentMode/Suspense may mean that our component is\n // rendered and abandoned multiple times, so we need to track leaked\n // Reactions.\n var reactionTrackingRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n if (!reactionTrackingRef.current) {\n // First render for this component (or first time since a previous\n // reaction from an abandoned render was disposed).\n var newReaction = new mobx__WEBPACK_IMPORTED_MODULE_5__.Reaction(observerComponentNameFor(baseComponentName), function () {\n // Observable has changed, meaning we want to re-render\n // BUT if we're a component that hasn't yet got to the useEffect()\n // stage, we might be a component that _started_ to render, but\n // got dropped, and we don't want to make state changes then.\n // (It triggers warnings in StrictMode, for a start.)\n if (trackingData_1.mounted) {\n // We have reached useEffect(), so we're mounted, and can trigger an update\n forceUpdate();\n }\n else {\n // We haven't yet reached useEffect(), so we'll need to trigger a re-render\n // when (and if) useEffect() arrives.\n trackingData_1.changedBeforeMount = true;\n }\n });\n var trackingData_1 = (0,_utils_reactionCleanupTracking__WEBPACK_IMPORTED_MODULE_2__.addReactionToTrack)(reactionTrackingRef, newReaction, objectRetainedByReact);\n }\n var reaction = reactionTrackingRef.current.reaction;\n react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue(reaction, _utils_printDebugValue__WEBPACK_IMPORTED_MODULE_1__.printDebugValue);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n // Called on first mount only\n (0,_utils_reactionCleanupTracking__WEBPACK_IMPORTED_MODULE_2__.recordReactionAsCommitted)(reactionTrackingRef);\n if (reactionTrackingRef.current) {\n // Great. We've already got our reaction from our render;\n // all we need to do is to record that it's now mounted,\n // to allow future observable changes to trigger re-renders\n reactionTrackingRef.current.mounted = true;\n // Got a change before first mount, force an update\n if (reactionTrackingRef.current.changedBeforeMount) {\n reactionTrackingRef.current.changedBeforeMount = false;\n forceUpdate();\n }\n }\n else {\n // The reaction we set up in our render has been disposed.\n // This can be due to bad timings of renderings, e.g. our\n // component was paused for a _very_ long time, and our\n // reaction got cleaned up\n // Re-create the reaction\n reactionTrackingRef.current = {\n reaction: new mobx__WEBPACK_IMPORTED_MODULE_5__.Reaction(observerComponentNameFor(baseComponentName), function () {\n // We've definitely already been mounted at this point\n forceUpdate();\n }),\n mounted: true,\n changedBeforeMount: false,\n cleanAt: Infinity\n };\n forceUpdate();\n }\n return function () {\n reactionTrackingRef.current.reaction.dispose();\n reactionTrackingRef.current = null;\n };\n }, []);\n // render the original component, but have the\n // reaction track the observables, so that rendering\n // can be invalidated (see above) once a dependency changes\n var rendering;\n var exception;\n reaction.track(function () {\n try {\n rendering = fn();\n }\n catch (e) {\n exception = e;\n }\n });\n if (exception) {\n throw exception; // re-throw any exceptions caught during rendering\n }\n return rendering;\n}\n//# sourceMappingURL=useObserver.js.map\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react-lite/es/useObserver.js?");
18459
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"useObserver\": () => (/* binding */ useObserver)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _utils_printDebugValue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/printDebugValue */ \"./node_modules/mobx-react-lite/es/utils/printDebugValue.js\");\n/* harmony import */ var _utils_reactionCleanupTracking__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/reactionCleanupTracking */ \"./node_modules/mobx-react-lite/es/utils/reactionCleanupTracking.js\");\n/* harmony import */ var _staticRendering__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./staticRendering */ \"./node_modules/mobx-react-lite/es/staticRendering.js\");\nvar __read = (undefined && undefined.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\n\n\n\n\n\nfunction observerComponentNameFor(baseComponentName) {\n return \"observer\".concat(baseComponentName);\n}\n/**\n * We use class to make it easier to detect in heap snapshots by name\n */\nvar ObjectToBeRetainedByReact = /** @class */ (function () {\n function ObjectToBeRetainedByReact() {\n }\n return ObjectToBeRetainedByReact;\n}());\nfunction objectToBeRetainedByReactFactory() {\n return new ObjectToBeRetainedByReact();\n}\nfunction useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if ((0,_staticRendering__WEBPACK_IMPORTED_MODULE_3__.isUsingStaticRendering)()) {\n return fn();\n }\n var _a = __read(react__WEBPACK_IMPORTED_MODULE_0__.useState(objectToBeRetainedByReactFactory), 1), objectRetainedByReact = _a[0];\n // Force update, see #2982\n var _b = __read(react__WEBPACK_IMPORTED_MODULE_0__.useState(), 2), setState = _b[1];\n var forceUpdate = function () { return setState([]); };\n // StrictMode/ConcurrentMode/Suspense may mean that our component is\n // rendered and abandoned multiple times, so we need to track leaked\n // Reactions.\n var reactionTrackingRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n if (!reactionTrackingRef.current) {\n // First render for this component (or first time since a previous\n // reaction from an abandoned render was disposed).\n var newReaction = new mobx__WEBPACK_IMPORTED_MODULE_4__.Reaction(observerComponentNameFor(baseComponentName), function () {\n // Observable has changed, meaning we want to re-render\n // BUT if we're a component that hasn't yet got to the useEffect()\n // stage, we might be a component that _started_ to render, but\n // got dropped, and we don't want to make state changes then.\n // (It triggers warnings in StrictMode, for a start.)\n if (trackingData_1.mounted) {\n // We have reached useEffect(), so we're mounted, and can trigger an update\n forceUpdate();\n }\n else {\n // We haven't yet reached useEffect(), so we'll need to trigger a re-render\n // when (and if) useEffect() arrives.\n trackingData_1.changedBeforeMount = true;\n }\n });\n var trackingData_1 = (0,_utils_reactionCleanupTracking__WEBPACK_IMPORTED_MODULE_2__.addReactionToTrack)(reactionTrackingRef, newReaction, objectRetainedByReact);\n }\n var reaction = reactionTrackingRef.current.reaction;\n react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue(reaction, _utils_printDebugValue__WEBPACK_IMPORTED_MODULE_1__.printDebugValue);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n // Called on first mount only\n (0,_utils_reactionCleanupTracking__WEBPACK_IMPORTED_MODULE_2__.recordReactionAsCommitted)(reactionTrackingRef);\n if (reactionTrackingRef.current) {\n // Great. We've already got our reaction from our render;\n // all we need to do is to record that it's now mounted,\n // to allow future observable changes to trigger re-renders\n reactionTrackingRef.current.mounted = true;\n // Got a change before first mount, force an update\n if (reactionTrackingRef.current.changedBeforeMount) {\n reactionTrackingRef.current.changedBeforeMount = false;\n forceUpdate();\n }\n }\n else {\n // The reaction we set up in our render has been disposed.\n // This can be due to bad timings of renderings, e.g. our\n // component was paused for a _very_ long time, and our\n // reaction got cleaned up\n // Re-create the reaction\n reactionTrackingRef.current = {\n reaction: new mobx__WEBPACK_IMPORTED_MODULE_4__.Reaction(observerComponentNameFor(baseComponentName), function () {\n // We've definitely already been mounted at this point\n forceUpdate();\n }),\n mounted: true,\n changedBeforeMount: false,\n cleanAt: Infinity\n };\n forceUpdate();\n }\n return function () {\n reactionTrackingRef.current.reaction.dispose();\n reactionTrackingRef.current = null;\n };\n }, []);\n // render the original component, but have the\n // reaction track the observables, so that rendering\n // can be invalidated (see above) once a dependency changes\n var rendering;\n var exception;\n reaction.track(function () {\n try {\n rendering = fn();\n }\n catch (e) {\n exception = e;\n }\n });\n if (exception) {\n throw exception; // re-throw any exceptions caught during rendering\n }\n return rendering;\n}\n//# sourceMappingURL=useObserver.js.map\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react-lite/es/useObserver.js?");
18471
18460
 
18472
18461
  /***/ }),
18473
18462
 
@@ -18577,7 +18566,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
18577
18566
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18578
18567
 
18579
18568
  "use strict";
18580
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"useDeprecated\": () => (/* binding */ useDeprecated),\n/* harmony export */ \"useForceUpdate\": () => (/* binding */ useForceUpdate)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\nvar __read = (undefined && undefined.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\n\nvar EMPTY_ARRAY = [];\nfunction useForceUpdate() {\n var _a = __read((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), 2), setTick = _a[1];\n var update = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {\n setTick(function (tick) { return tick + 1; });\n }, EMPTY_ARRAY);\n return update;\n}\nvar deprecatedMessages = [];\nfunction useDeprecated(msg) {\n if (!deprecatedMessages.includes(msg)) {\n deprecatedMessages.push(msg);\n console.warn(msg);\n }\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react-lite/es/utils/utils.js?");
18569
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"useDeprecated\": () => (/* binding */ useDeprecated)\n/* harmony export */ });\nvar deprecatedMessages = [];\nfunction useDeprecated(msg) {\n if (!deprecatedMessages.includes(msg)) {\n deprecatedMessages.push(msg);\n console.warn(msg);\n }\n}\n//# sourceMappingURL=utils.js.map\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react-lite/es/utils/utils.js?");
18581
18570
 
18582
18571
  /***/ }),
18583
18572
 
@@ -18588,7 +18577,18 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
18588
18577
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18589
18578
 
18590
18579
  "use strict";
18591
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MobXProviderContext\": () => (/* binding */ MobXProviderContext),\n/* harmony export */ \"Observer\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.Observer),\n/* harmony export */ \"PropTypes\": () => (/* binding */ PropTypes),\n/* harmony export */ \"Provider\": () => (/* binding */ Provider),\n/* harmony export */ \"disposeOnUnmount\": () => (/* binding */ disposeOnUnmount),\n/* harmony export */ \"enableStaticRendering\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.enableStaticRendering),\n/* harmony export */ \"inject\": () => (/* binding */ inject),\n/* harmony export */ \"isUsingStaticRendering\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering),\n/* harmony export */ \"observer\": () => (/* binding */ observer),\n/* harmony export */ \"observerBatching\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.observerBatching),\n/* harmony export */ \"useAsObservableSource\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useAsObservableSource),\n/* harmony export */ \"useLocalObservable\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useLocalObservable),\n/* harmony export */ \"useLocalStore\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useLocalStore),\n/* harmony export */ \"useObserver\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useObserver),\n/* harmony export */ \"useStaticRendering\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useStaticRendering)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx-react-lite */ \"./node_modules/mobx-react-lite/es/index.js\");\n\n\n\n\n\nvar symbolId = 0;\n\nfunction createSymbol(name) {\n if (typeof Symbol === \"function\") {\n return Symbol(name);\n }\n\n var symbol = \"__$mobx-react \" + name + \" (\" + symbolId + \")\";\n symbolId++;\n return symbol;\n}\n\nvar createdSymbols = {};\nfunction newSymbol(name) {\n if (!createdSymbols[name]) {\n createdSymbols[name] = createSymbol(name);\n }\n\n return createdSymbols[name];\n}\nfunction shallowEqual(objA, objB) {\n //From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (is(objA, objB)) return true;\n\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n\n for (var i = 0; i < keysA.length; i++) {\n if (!Object.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction is(x, y) {\n // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n} // based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\n\n\nvar hoistBlackList = {\n $$typeof: 1,\n render: 1,\n compare: 1,\n type: 1,\n childContextTypes: 1,\n contextType: 1,\n contextTypes: 1,\n defaultProps: 1,\n getDefaultProps: 1,\n getDerivedStateFromError: 1,\n getDerivedStateFromProps: 1,\n mixins: 1,\n displayName: 1,\n propTypes: 1\n};\nfunction copyStaticProperties(base, target) {\n var protoProps = Object.getOwnPropertyNames(Object.getPrototypeOf(base));\n Object.getOwnPropertyNames(base).forEach(function (key) {\n if (!hoistBlackList[key] && protoProps.indexOf(key) === -1) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n/**\r\n * Helper to set `prop` to `this` as non-enumerable (hidden prop)\r\n * @param target\r\n * @param prop\r\n * @param value\r\n */\n\nfunction setHiddenProp(target, prop, value) {\n if (!Object.hasOwnProperty.call(target, prop)) {\n Object.defineProperty(target, prop, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n target[prop] = value;\n }\n}\n/**\r\n * Utilities for patching componentWillUnmount, to make sure @disposeOnUnmount works correctly icm with user defined hooks\r\n * and the handler provided by mobx-react\r\n */\n\nvar mobxMixins = /*#__PURE__*/newSymbol(\"patchMixins\");\nvar mobxPatchedDefinition = /*#__PURE__*/newSymbol(\"patchedDefinition\");\n\nfunction getMixins(target, methodName) {\n var mixins = target[mobxMixins] = target[mobxMixins] || {};\n var methodMixins = mixins[methodName] = mixins[methodName] || {};\n methodMixins.locks = methodMixins.locks || 0;\n methodMixins.methods = methodMixins.methods || [];\n return methodMixins;\n}\n\nfunction wrapper(realMethod, mixins) {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n // locks are used to ensure that mixins are invoked only once per invocation, even on recursive calls\n mixins.locks++;\n\n try {\n var retVal;\n\n if (realMethod !== undefined && realMethod !== null) {\n retVal = realMethod.apply(this, args);\n }\n\n return retVal;\n } finally {\n mixins.locks--;\n\n if (mixins.locks === 0) {\n mixins.methods.forEach(function (mx) {\n mx.apply(_this, args);\n });\n }\n }\n}\n\nfunction wrapFunction(realMethod, mixins) {\n var fn = function fn() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n wrapper.call.apply(wrapper, [this, realMethod, mixins].concat(args));\n };\n\n return fn;\n}\n\nfunction patch(target, methodName, mixinMethod) {\n var mixins = getMixins(target, methodName);\n\n if (mixins.methods.indexOf(mixinMethod) < 0) {\n mixins.methods.push(mixinMethod);\n }\n\n var oldDefinition = Object.getOwnPropertyDescriptor(target, methodName);\n\n if (oldDefinition && oldDefinition[mobxPatchedDefinition]) {\n // already patched definition, do not repatch\n return;\n }\n\n var originalMethod = target[methodName];\n var newDefinition = createDefinition(target, methodName, oldDefinition ? oldDefinition.enumerable : undefined, mixins, originalMethod);\n Object.defineProperty(target, methodName, newDefinition);\n}\n\nfunction createDefinition(target, methodName, enumerable, mixins, originalMethod) {\n var _ref;\n\n var wrappedFunc = wrapFunction(originalMethod, mixins);\n return _ref = {}, _ref[mobxPatchedDefinition] = true, _ref.get = function get() {\n return wrappedFunc;\n }, _ref.set = function set(value) {\n if (this === target) {\n wrappedFunc = wrapFunction(value, mixins);\n } else {\n // when it is an instance of the prototype/a child prototype patch that particular case again separately\n // since we need to store separate values depending on wether it is the actual instance, the prototype, etc\n // e.g. the method for super might not be the same as the method for the prototype which might be not the same\n // as the method for the instance\n var newDefinition = createDefinition(this, methodName, enumerable, mixins, value);\n Object.defineProperty(this, methodName, newDefinition);\n }\n }, _ref.configurable = true, _ref.enumerable = enumerable, _ref;\n}\n\nvar mobxAdminProperty = mobx__WEBPACK_IMPORTED_MODULE_2__.$mobx || \"$mobx\";\nvar mobxObserverProperty = /*#__PURE__*/newSymbol(\"isMobXReactObserver\");\nvar mobxIsUnmounted = /*#__PURE__*/newSymbol(\"isUnmounted\");\nvar skipRenderKey = /*#__PURE__*/newSymbol(\"skipRender\");\nvar isForcingUpdateKey = /*#__PURE__*/newSymbol(\"isForcingUpdate\");\nfunction makeClassComponentObserver(componentClass) {\n var target = componentClass.prototype;\n\n if (componentClass[mobxObserverProperty]) {\n var displayName = getDisplayName(target);\n console.warn(\"The provided component class (\" + displayName + \") \\n has already been declared as an observer component.\");\n } else {\n componentClass[mobxObserverProperty] = true;\n }\n\n if (target.componentWillReact) throw new Error(\"The componentWillReact life-cycle event is no longer supported\");\n\n if (componentClass[\"__proto__\"] !== react__WEBPACK_IMPORTED_MODULE_0__.PureComponent) {\n if (!target.shouldComponentUpdate) target.shouldComponentUpdate = observerSCU;else if (target.shouldComponentUpdate !== observerSCU) // n.b. unequal check, instead of existence check, as @observer might be on superclass as well\n throw new Error(\"It is not allowed to use shouldComponentUpdate in observer based components.\");\n } // this.props and this.state are made observable, just to make sure @computed fields that\n // are defined inside the component, and which rely on state or props, re-compute if state or props change\n // (otherwise the computed wouldn't update and become stale on props change, since props are not observable)\n // However, this solution is not without it's own problems: https://github.com/mobxjs/mobx-react/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Aobservable-props-or-not+\n\n\n makeObservableProp(target, \"props\");\n makeObservableProp(target, \"state\");\n var baseRender = target.render;\n\n if (typeof baseRender !== 'function') {\n var _displayName = getDisplayName(target);\n\n throw new Error(\"[mobx-react] class component (\" + _displayName + \") is missing `render` method.\" + \"\\n`observer` requires `render` being a function defined on prototype.\" + \"\\n`render = () => {}` or `render = function() {}` is not supported.\");\n }\n\n target.render = function () {\n return makeComponentReactive.call(this, baseRender);\n };\n\n patch(target, \"componentWillUnmount\", function () {\n var _this$render$mobxAdmi;\n\n if ((0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)() === true) return;\n (_this$render$mobxAdmi = this.render[mobxAdminProperty]) == null ? void 0 : _this$render$mobxAdmi.dispose();\n this[mobxIsUnmounted] = true;\n\n if (!this.render[mobxAdminProperty]) {\n // Render may have been hot-swapped and/or overriden by a subclass.\n var _displayName2 = getDisplayName(this);\n\n console.warn(\"The reactive render of an observer class component (\" + _displayName2 + \") \\n was overriden after MobX attached. This may result in a memory leak if the \\n overriden reactive render was not properly disposed.\");\n }\n });\n return componentClass;\n} // Generates a friendly name for debugging\n\nfunction getDisplayName(comp) {\n return comp.displayName || comp.name || comp.constructor && (comp.constructor.displayName || comp.constructor.name) || \"<component>\";\n}\n\nfunction makeComponentReactive(render) {\n var _this = this;\n\n if ((0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)() === true) return render.call(this);\n /**\r\n * If props are shallowly modified, react will render anyway,\r\n * so atom.reportChanged() should not result in yet another re-render\r\n */\n\n setHiddenProp(this, skipRenderKey, false);\n /**\r\n * forceUpdate will re-assign this.props. We don't want that to cause a loop,\r\n * so detect these changes\r\n */\n\n setHiddenProp(this, isForcingUpdateKey, false);\n var initialName = getDisplayName(this);\n var baseRender = render.bind(this);\n var isRenderingPending = false;\n var reaction = new mobx__WEBPACK_IMPORTED_MODULE_2__.Reaction(initialName + \".render()\", function () {\n if (!isRenderingPending) {\n // N.B. Getting here *before mounting* means that a component constructor has side effects (see the relevant test in misc.js)\n // This unidiomatic React usage but React will correctly warn about this so we continue as usual\n // See #85 / Pull #44\n isRenderingPending = true;\n\n if (_this[mobxIsUnmounted] !== true) {\n var hasError = true;\n\n try {\n setHiddenProp(_this, isForcingUpdateKey, true);\n if (!_this[skipRenderKey]) react__WEBPACK_IMPORTED_MODULE_0__.Component.prototype.forceUpdate.call(_this);\n hasError = false;\n } finally {\n setHiddenProp(_this, isForcingUpdateKey, false);\n if (hasError) reaction.dispose();\n }\n }\n }\n });\n reaction[\"reactComponent\"] = this;\n reactiveRender[mobxAdminProperty] = reaction;\n this.render = reactiveRender;\n\n function reactiveRender() {\n isRenderingPending = false;\n var exception = undefined;\n var rendering = undefined;\n reaction.track(function () {\n try {\n rendering = (0,mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateChanges)(false, baseRender);\n } catch (e) {\n exception = e;\n }\n });\n\n if (exception) {\n throw exception;\n }\n\n return rendering;\n }\n\n return reactiveRender.call(this);\n}\n\nfunction observerSCU(nextProps, nextState) {\n if ((0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)()) {\n console.warn(\"[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side.\");\n } // update on any state changes (as is the default)\n\n\n if (this.state !== nextState) {\n return true;\n } // update if props are shallowly not equal, inspired by PureRenderMixin\n // we could return just 'false' here, and avoid the `skipRender` checks etc\n // however, it is nicer if lifecycle events are triggered like usually,\n // so we return true here if props are shallowly modified.\n\n\n return !shallowEqual(this.props, nextProps);\n}\n\nfunction makeObservableProp(target, propName) {\n var valueHolderKey = newSymbol(\"reactProp_\" + propName + \"_valueHolder\");\n var atomHolderKey = newSymbol(\"reactProp_\" + propName + \"_atomHolder\");\n\n function getAtom() {\n if (!this[atomHolderKey]) {\n setHiddenProp(this, atomHolderKey, (0,mobx__WEBPACK_IMPORTED_MODULE_2__.createAtom)(\"reactive \" + propName));\n }\n\n return this[atomHolderKey];\n }\n\n Object.defineProperty(target, propName, {\n configurable: true,\n enumerable: true,\n get: function get() {\n var prevReadState = false;\n\n if (mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsStart && mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsEnd) {\n prevReadState = (0,mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsStart)(true);\n }\n\n getAtom.call(this).reportObserved();\n\n if (mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsStart && mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsEnd) {\n (0,mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsEnd)(prevReadState);\n }\n\n return this[valueHolderKey];\n },\n set: function set(v) {\n if (!this[isForcingUpdateKey] && !shallowEqual(this[valueHolderKey], v)) {\n setHiddenProp(this, valueHolderKey, v);\n setHiddenProp(this, skipRenderKey, true);\n getAtom.call(this).reportChanged();\n setHiddenProp(this, skipRenderKey, false);\n } else {\n setHiddenProp(this, valueHolderKey, v);\n }\n }\n });\n}\n\nvar hasSymbol = typeof Symbol === \"function\" && Symbol[\"for\"]; // Using react-is had some issues (and operates on elements, not on types), see #608 / #609\n\nvar ReactForwardRefSymbol = hasSymbol ? /*#__PURE__*/Symbol[\"for\"](\"react.forward_ref\") : typeof react__WEBPACK_IMPORTED_MODULE_0__.forwardRef === \"function\" && /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props) {\n return null;\n})[\"$$typeof\"];\nvar ReactMemoSymbol = hasSymbol ? /*#__PURE__*/Symbol[\"for\"](\"react.memo\") : typeof react__WEBPACK_IMPORTED_MODULE_0__.memo === \"function\" && /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function (props) {\n return null;\n})[\"$$typeof\"];\n/**\r\n * Observer function / decorator\r\n */\n\nfunction observer(component) {\n if (component[\"isMobxInjector\"] === true) {\n console.warn(\"Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'\");\n }\n\n if (ReactMemoSymbol && component[\"$$typeof\"] === ReactMemoSymbol) {\n throw new Error(\"Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.\");\n } // Unwrap forward refs into `<Observer>` component\n // we need to unwrap the render, because it is the inner render that needs to be tracked,\n // not the ForwardRef HoC\n\n\n if (ReactForwardRefSymbol && component[\"$$typeof\"] === ReactForwardRefSymbol) {\n var baseRender = component[\"render\"];\n if (typeof baseRender !== \"function\") throw new Error(\"render property of ForwardRef was not a function\");\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function ObserverForwardRef() {\n var args = arguments;\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.Observer, null, function () {\n return baseRender.apply(undefined, args);\n });\n });\n } // Function component\n\n\n if (typeof component === \"function\" && (!component.prototype || !component.prototype.render) && !component[\"isReactClass\"] && !Object.prototype.isPrototypeOf.call(react__WEBPACK_IMPORTED_MODULE_0__.Component, component)) {\n return (0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.observer)(component);\n }\n\n return makeClassComponentObserver(component);\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar MobXProviderContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});\nfunction Provider(props) {\n var children = props.children,\n stores = _objectWithoutPropertiesLoose(props, [\"children\"]);\n\n var parentValue = react__WEBPACK_IMPORTED_MODULE_0__.useContext(MobXProviderContext);\n var mutableProviderRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(_extends({}, parentValue, stores));\n var value = mutableProviderRef.current;\n\n if (true) {\n var newValue = _extends({}, value, stores); // spread in previous state for the context based stores\n\n\n if (!shallowEqual(value, newValue)) {\n throw new Error(\"MobX Provider: The set of provided stores has changed. See: https://github.com/mobxjs/mobx-react#the-set-of-provided-stores-has-changed-error.\");\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(MobXProviderContext.Provider, {\n value: value\n }, children);\n}\nProvider.displayName = \"MobXProvider\";\n\n/**\r\n * Store Injection\r\n */\n\nfunction createStoreInjector(grabStoresFn, component, injectNames, makeReactive) {\n // Support forward refs\n var Injector = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {\n var newProps = _extends({}, props);\n\n var context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(MobXProviderContext);\n Object.assign(newProps, grabStoresFn(context || {}, newProps) || {});\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(component, newProps);\n });\n if (makeReactive) Injector = observer(Injector);\n Injector[\"isMobxInjector\"] = true; // assigned late to suppress observer warning\n // Static fields from component should be visible on the generated Injector\n\n copyStaticProperties(component, Injector);\n Injector[\"wrappedComponent\"] = component;\n Injector.displayName = getInjectName(component, injectNames);\n return Injector;\n}\n\nfunction getInjectName(component, injectNames) {\n var displayName;\n var componentName = component.displayName || component.name || component.constructor && component.constructor.name || \"Component\";\n if (injectNames) displayName = \"inject-with-\" + injectNames + \"(\" + componentName + \")\";else displayName = \"inject(\" + componentName + \")\";\n return displayName;\n}\n\nfunction grabStoresByName(storeNames) {\n return function (baseStores, nextProps) {\n storeNames.forEach(function (storeName) {\n if (storeName in nextProps // prefer props over stores\n ) return;\n if (!(storeName in baseStores)) throw new Error(\"MobX injector: Store '\" + storeName + \"' is not available! Make sure it is provided by some Provider\");\n nextProps[storeName] = baseStores[storeName];\n });\n return nextProps;\n };\n}\n/**\r\n * higher order component that injects stores to a child.\r\n * takes either a varargs list of strings, which are stores read from the context,\r\n * or a function that manually maps the available stores from the context to props:\r\n * storesToProps(mobxStores, props, context) => newProps\r\n */\n\n\nfunction inject() {\n for (var _len = arguments.length, storeNames = new Array(_len), _key = 0; _key < _len; _key++) {\n storeNames[_key] = arguments[_key];\n }\n\n if (typeof arguments[0] === \"function\") {\n var grabStoresFn = arguments[0];\n return function (componentClass) {\n return createStoreInjector(grabStoresFn, componentClass, grabStoresFn.name, true);\n };\n } else {\n return function (componentClass) {\n return createStoreInjector(grabStoresByName(storeNames), componentClass, storeNames.join(\"-\"), false);\n };\n }\n}\n\nvar protoStoreKey = /*#__PURE__*/newSymbol(\"disposeOnUnmountProto\");\nvar instStoreKey = /*#__PURE__*/newSymbol(\"disposeOnUnmountInst\");\n\nfunction runDisposersOnWillUnmount() {\n var _this = this;\n [].concat(this[protoStoreKey] || [], this[instStoreKey] || []).forEach(function (propKeyOrFunction) {\n var prop = typeof propKeyOrFunction === \"string\" ? _this[propKeyOrFunction] : propKeyOrFunction;\n\n if (prop !== undefined && prop !== null) {\n if (Array.isArray(prop)) prop.map(function (f) {\n return f();\n });else prop();\n }\n });\n}\n\nfunction disposeOnUnmount(target, propertyKeyOrFunction) {\n if (Array.isArray(propertyKeyOrFunction)) {\n return propertyKeyOrFunction.map(function (fn) {\n return disposeOnUnmount(target, fn);\n });\n }\n\n var c = Object.getPrototypeOf(target).constructor;\n var c2 = Object.getPrototypeOf(target.constructor); // Special case for react-hot-loader\n\n var c3 = Object.getPrototypeOf(Object.getPrototypeOf(target));\n\n if (!(c === react__WEBPACK_IMPORTED_MODULE_0__.Component || c === react__WEBPACK_IMPORTED_MODULE_0__.PureComponent || c2 === react__WEBPACK_IMPORTED_MODULE_0__.Component || c2 === react__WEBPACK_IMPORTED_MODULE_0__.PureComponent || c3 === react__WEBPACK_IMPORTED_MODULE_0__.Component || c3 === react__WEBPACK_IMPORTED_MODULE_0__.PureComponent)) {\n throw new Error(\"[mobx-react] disposeOnUnmount only supports direct subclasses of React.Component or React.PureComponent.\");\n }\n\n if (typeof propertyKeyOrFunction !== \"string\" && typeof propertyKeyOrFunction !== \"function\" && !Array.isArray(propertyKeyOrFunction)) {\n throw new Error(\"[mobx-react] disposeOnUnmount only works if the parameter is either a property key or a function.\");\n } // decorator's target is the prototype, so it doesn't have any instance properties like props\n\n\n var isDecorator = typeof propertyKeyOrFunction === \"string\"; // add property key / function we want run (disposed) to the store\n\n var componentWasAlreadyModified = !!target[protoStoreKey] || !!target[instStoreKey];\n var store = isDecorator ? // decorators are added to the prototype store\n target[protoStoreKey] || (target[protoStoreKey] = []) : // functions are added to the instance store\n target[instStoreKey] || (target[instStoreKey] = []);\n store.push(propertyKeyOrFunction); // tweak the component class componentWillUnmount if not done already\n\n if (!componentWasAlreadyModified) {\n patch(target, \"componentWillUnmount\", runDisposersOnWillUnmount);\n } // return the disposer as is if invoked as a non decorator\n\n\n if (typeof propertyKeyOrFunction !== \"string\") {\n return propertyKeyOrFunction;\n }\n}\n\nfunction createChainableTypeChecker(validator) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = new Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n rest[_key - 6] = arguments[_key];\n }\n\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.untracked)(function () {\n componentName = componentName || \"<<anonymous>>\";\n propFullName = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n var actual = props[propName] === null ? \"null\" : \"undefined\";\n return new Error(\"The \" + location + \" `\" + propFullName + \"` is marked as required \" + \"in `\" + componentName + \"`, but its value is `\" + actual + \"`.\");\n }\n\n return null;\n } else {\n // @ts-ignore rest arg is necessary for some React internals - fails tests otherwise\n return validator.apply(void 0, [props, propName, componentName, location, propFullName].concat(rest));\n }\n });\n }\n\n var chainedCheckType = checkType.bind(null, false); // Add isRequired to satisfy Requirable\n\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n} // Copied from React.PropTypes\n\n\nfunction isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === \"symbol\") {\n return true;\n } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n\n\n if (propValue[\"@@toStringTag\"] === \"Symbol\") {\n return true;\n } // Fallback for non-spec compliant Symbols which are polyfilled.\n\n\n if (typeof Symbol === \"function\" && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n} // Copied from React.PropTypes\n\n\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n\n if (Array.isArray(propValue)) {\n return \"array\";\n }\n\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return \"object\";\n }\n\n if (isSymbol(propType, propValue)) {\n return \"symbol\";\n }\n\n return propType;\n} // This handles more types than `getPropType`. Only used for error messages.\n// Copied from React.PropTypes\n\n\nfunction getPreciseType(propValue) {\n var propType = getPropType(propValue);\n\n if (propType === \"object\") {\n if (propValue instanceof Date) {\n return \"date\";\n } else if (propValue instanceof RegExp) {\n return \"regexp\";\n }\n }\n\n return propType;\n}\n\nfunction createObservableTypeCheckerCreator(allowNativeType, mobxType) {\n return createChainableTypeChecker(function (props, propName, componentName, location, propFullName) {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.untracked)(function () {\n if (allowNativeType) {\n if (getPropType(props[propName]) === mobxType.toLowerCase()) return null;\n }\n\n var mobxChecker;\n\n switch (mobxType) {\n case \"Array\":\n mobxChecker = mobx__WEBPACK_IMPORTED_MODULE_2__.isObservableArray;\n break;\n\n case \"Object\":\n mobxChecker = mobx__WEBPACK_IMPORTED_MODULE_2__.isObservableObject;\n break;\n\n case \"Map\":\n mobxChecker = mobx__WEBPACK_IMPORTED_MODULE_2__.isObservableMap;\n break;\n\n default:\n throw new Error(\"Unexpected mobxType: \" + mobxType);\n }\n\n var propValue = props[propName];\n\n if (!mobxChecker(propValue)) {\n var preciseType = getPreciseType(propValue);\n var nativeTypeExpectationMessage = allowNativeType ? \" or javascript `\" + mobxType.toLowerCase() + \"`\" : \"\";\n return new Error(\"Invalid prop `\" + propFullName + \"` of type `\" + preciseType + \"` supplied to\" + \" `\" + componentName + \"`, expected `mobx.Observable\" + mobxType + \"`\" + nativeTypeExpectationMessage + \".\");\n }\n\n return null;\n });\n });\n}\n\nfunction createObservableArrayOfTypeChecker(allowNativeType, typeChecker) {\n return createChainableTypeChecker(function (props, propName, componentName, location, propFullName) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 5 ? _len2 - 5 : 0), _key2 = 5; _key2 < _len2; _key2++) {\n rest[_key2 - 5] = arguments[_key2];\n }\n\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.untracked)(function () {\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Property `\" + propFullName + \"` of component `\" + componentName + \"` has \" + \"invalid PropType notation.\");\n } else {\n var error = createObservableTypeCheckerCreator(allowNativeType, \"Array\")(props, propName, componentName, location, propFullName);\n if (error instanceof Error) return error;\n var propValue = props[propName];\n\n for (var i = 0; i < propValue.length; i++) {\n error = typeChecker.apply(void 0, [propValue, i, componentName, location, propFullName + \"[\" + i + \"]\"].concat(rest));\n if (error instanceof Error) return error;\n }\n\n return null;\n }\n });\n });\n}\n\nvar observableArray = /*#__PURE__*/createObservableTypeCheckerCreator(false, \"Array\");\nvar observableArrayOf = /*#__PURE__*/createObservableArrayOfTypeChecker.bind(null, false);\nvar observableMap = /*#__PURE__*/createObservableTypeCheckerCreator(false, \"Map\");\nvar observableObject = /*#__PURE__*/createObservableTypeCheckerCreator(false, \"Object\");\nvar arrayOrObservableArray = /*#__PURE__*/createObservableTypeCheckerCreator(true, \"Array\");\nvar arrayOrObservableArrayOf = /*#__PURE__*/createObservableArrayOfTypeChecker.bind(null, true);\nvar objectOrObservableObject = /*#__PURE__*/createObservableTypeCheckerCreator(true, \"Object\");\nvar PropTypes = {\n observableArray: observableArray,\n observableArrayOf: observableArrayOf,\n observableMap: observableMap,\n observableObject: observableObject,\n arrayOrObservableArray: arrayOrObservableArray,\n arrayOrObservableArrayOf: arrayOrObservableArrayOf,\n objectOrObservableObject: objectOrObservableObject\n};\n\nif (!react__WEBPACK_IMPORTED_MODULE_0__.Component) throw new Error(\"mobx-react requires React to be available\");\nif (!mobx__WEBPACK_IMPORTED_MODULE_2__.observable) throw new Error(\"mobx-react requires mobx to be available\");\n\n\n//# sourceMappingURL=mobxreact.esm.js.map\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react/dist/mobxreact.esm.js?");
18580
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"MobXProviderContext\": () => (/* binding */ MobXProviderContext),\n/* harmony export */ \"Observer\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.Observer),\n/* harmony export */ \"PropTypes\": () => (/* binding */ PropTypes),\n/* harmony export */ \"Provider\": () => (/* binding */ Provider),\n/* harmony export */ \"disposeOnUnmount\": () => (/* binding */ disposeOnUnmount),\n/* harmony export */ \"enableStaticRendering\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.enableStaticRendering),\n/* harmony export */ \"inject\": () => (/* binding */ inject),\n/* harmony export */ \"isUsingStaticRendering\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering),\n/* harmony export */ \"observer\": () => (/* binding */ observer),\n/* harmony export */ \"observerBatching\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.observerBatching),\n/* harmony export */ \"useAsObservableSource\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useAsObservableSource),\n/* harmony export */ \"useLocalObservable\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useLocalObservable),\n/* harmony export */ \"useLocalStore\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useLocalStore),\n/* harmony export */ \"useObserver\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useObserver),\n/* harmony export */ \"useStaticRendering\": () => (/* reexport safe */ mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.useStaticRendering)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mobx-react-lite */ \"./node_modules/mobx-react-lite/es/index.js\");\n\n\n\n\n\nvar symbolId = 0;\n\nfunction createSymbol(name) {\n if (typeof Symbol === \"function\") {\n return Symbol(name);\n }\n\n var symbol = \"__$mobx-react \" + name + \" (\" + symbolId + \")\";\n symbolId++;\n return symbol;\n}\n\nvar createdSymbols = {};\nfunction newSymbol(name) {\n if (!createdSymbols[name]) {\n createdSymbols[name] = createSymbol(name);\n }\n\n return createdSymbols[name];\n}\nfunction shallowEqual(objA, objB) {\n //From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n for (var i = 0; i < keysA.length; i++) {\n if (!Object.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction is(x, y) {\n // From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n} // based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\n\n\nvar hoistBlackList = {\n $$typeof: 1,\n render: 1,\n compare: 1,\n type: 1,\n childContextTypes: 1,\n contextType: 1,\n contextTypes: 1,\n defaultProps: 1,\n getDefaultProps: 1,\n getDerivedStateFromError: 1,\n getDerivedStateFromProps: 1,\n mixins: 1,\n displayName: 1,\n propTypes: 1\n};\nfunction copyStaticProperties(base, target) {\n var protoProps = Object.getOwnPropertyNames(Object.getPrototypeOf(base));\n Object.getOwnPropertyNames(base).forEach(function (key) {\n if (!hoistBlackList[key] && protoProps.indexOf(key) === -1) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n/**\r\n * Helper to set `prop` to `this` as non-enumerable (hidden prop)\r\n * @param target\r\n * @param prop\r\n * @param value\r\n */\n\nfunction setHiddenProp(target, prop, value) {\n if (!Object.hasOwnProperty.call(target, prop)) {\n Object.defineProperty(target, prop, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n } else {\n target[prop] = value;\n }\n}\n/**\r\n * Utilities for patching componentWillUnmount, to make sure @disposeOnUnmount works correctly icm with user defined hooks\r\n * and the handler provided by mobx-react\r\n */\n\nvar mobxMixins = /*#__PURE__*/newSymbol(\"patchMixins\");\nvar mobxPatchedDefinition = /*#__PURE__*/newSymbol(\"patchedDefinition\");\n\nfunction getMixins(target, methodName) {\n var mixins = target[mobxMixins] = target[mobxMixins] || {};\n var methodMixins = mixins[methodName] = mixins[methodName] || {};\n methodMixins.locks = methodMixins.locks || 0;\n methodMixins.methods = methodMixins.methods || [];\n return methodMixins;\n}\n\nfunction wrapper(realMethod, mixins) {\n var _this = this;\n\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n // locks are used to ensure that mixins are invoked only once per invocation, even on recursive calls\n mixins.locks++;\n\n try {\n var retVal;\n\n if (realMethod !== undefined && realMethod !== null) {\n retVal = realMethod.apply(this, args);\n }\n\n return retVal;\n } finally {\n mixins.locks--;\n\n if (mixins.locks === 0) {\n mixins.methods.forEach(function (mx) {\n mx.apply(_this, args);\n });\n }\n }\n}\n\nfunction wrapFunction(realMethod, mixins) {\n var fn = function fn() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n wrapper.call.apply(wrapper, [this, realMethod, mixins].concat(args));\n };\n\n return fn;\n}\n\nfunction patch(target, methodName, mixinMethod) {\n var mixins = getMixins(target, methodName);\n\n if (mixins.methods.indexOf(mixinMethod) < 0) {\n mixins.methods.push(mixinMethod);\n }\n\n var oldDefinition = Object.getOwnPropertyDescriptor(target, methodName);\n\n if (oldDefinition && oldDefinition[mobxPatchedDefinition]) {\n // already patched definition, do not repatch\n return;\n }\n\n var originalMethod = target[methodName];\n var newDefinition = createDefinition(target, methodName, oldDefinition ? oldDefinition.enumerable : undefined, mixins, originalMethod);\n Object.defineProperty(target, methodName, newDefinition);\n}\n\nfunction createDefinition(target, methodName, enumerable, mixins, originalMethod) {\n var _ref;\n\n var wrappedFunc = wrapFunction(originalMethod, mixins);\n return _ref = {}, _ref[mobxPatchedDefinition] = true, _ref.get = function get() {\n return wrappedFunc;\n }, _ref.set = function set(value) {\n if (this === target) {\n wrappedFunc = wrapFunction(value, mixins);\n } else {\n // when it is an instance of the prototype/a child prototype patch that particular case again separately\n // since we need to store separate values depending on wether it is the actual instance, the prototype, etc\n // e.g. the method for super might not be the same as the method for the prototype which might be not the same\n // as the method for the instance\n var newDefinition = createDefinition(this, methodName, enumerable, mixins, value);\n Object.defineProperty(this, methodName, newDefinition);\n }\n }, _ref.configurable = true, _ref.enumerable = enumerable, _ref;\n}\n\nvar mobxAdminProperty = mobx__WEBPACK_IMPORTED_MODULE_2__.$mobx || \"$mobx\";\nvar mobxObserverProperty = /*#__PURE__*/newSymbol(\"isMobXReactObserver\");\nvar mobxIsUnmounted = /*#__PURE__*/newSymbol(\"isUnmounted\");\nvar skipRenderKey = /*#__PURE__*/newSymbol(\"skipRender\");\nvar isForcingUpdateKey = /*#__PURE__*/newSymbol(\"isForcingUpdate\");\nfunction makeClassComponentObserver(componentClass) {\n var target = componentClass.prototype;\n\n if (componentClass[mobxObserverProperty]) {\n var displayName = getDisplayName(target);\n console.warn(\"The provided component class (\" + displayName + \") \\n has already been declared as an observer component.\");\n } else {\n componentClass[mobxObserverProperty] = true;\n }\n\n if (target.componentWillReact) throw new Error(\"The componentWillReact life-cycle event is no longer supported\");\n\n if (componentClass[\"__proto__\"] !== react__WEBPACK_IMPORTED_MODULE_0__.PureComponent) {\n if (!target.shouldComponentUpdate) target.shouldComponentUpdate = observerSCU;else if (target.shouldComponentUpdate !== observerSCU) // n.b. unequal check, instead of existence check, as @observer might be on superclass as well\n throw new Error(\"It is not allowed to use shouldComponentUpdate in observer based components.\");\n } // this.props and this.state are made observable, just to make sure @computed fields that\n // are defined inside the component, and which rely on state or props, re-compute if state or props change\n // (otherwise the computed wouldn't update and become stale on props change, since props are not observable)\n // However, this solution is not without it's own problems: https://github.com/mobxjs/mobx-react/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3Aobservable-props-or-not+\n\n\n makeObservableProp(target, \"props\");\n makeObservableProp(target, \"state\");\n var baseRender = target.render;\n\n if (typeof baseRender !== \"function\") {\n var _displayName = getDisplayName(target);\n\n throw new Error(\"[mobx-react] class component (\" + _displayName + \") is missing `render` method.\" + \"\\n`observer` requires `render` being a function defined on prototype.\" + \"\\n`render = () => {}` or `render = function() {}` is not supported.\");\n }\n\n target.render = function () {\n return makeComponentReactive.call(this, baseRender);\n };\n\n patch(target, \"componentWillUnmount\", function () {\n var _this$render$mobxAdmi;\n\n if ((0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)() === true) return;\n (_this$render$mobxAdmi = this.render[mobxAdminProperty]) == null ? void 0 : _this$render$mobxAdmi.dispose();\n this[mobxIsUnmounted] = true;\n\n if (!this.render[mobxAdminProperty]) {\n // Render may have been hot-swapped and/or overriden by a subclass.\n var _displayName2 = getDisplayName(this);\n\n console.warn(\"The reactive render of an observer class component (\" + _displayName2 + \") \\n was overriden after MobX attached. This may result in a memory leak if the \\n overriden reactive render was not properly disposed.\");\n }\n });\n return componentClass;\n} // Generates a friendly name for debugging\n\nfunction getDisplayName(comp) {\n return comp.displayName || comp.name || comp.constructor && (comp.constructor.displayName || comp.constructor.name) || \"<component>\";\n}\n\nfunction makeComponentReactive(render) {\n var _this = this;\n\n if ((0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)() === true) return render.call(this);\n /**\r\n * If props are shallowly modified, react will render anyway,\r\n * so atom.reportChanged() should not result in yet another re-render\r\n */\n\n setHiddenProp(this, skipRenderKey, false);\n /**\r\n * forceUpdate will re-assign this.props. We don't want that to cause a loop,\r\n * so detect these changes\r\n */\n\n setHiddenProp(this, isForcingUpdateKey, false);\n var initialName = getDisplayName(this);\n var baseRender = render.bind(this);\n var isRenderingPending = false;\n var reaction = new mobx__WEBPACK_IMPORTED_MODULE_2__.Reaction(initialName + \".render()\", function () {\n if (!isRenderingPending) {\n // N.B. Getting here *before mounting* means that a component constructor has side effects (see the relevant test in misc.js)\n // This unidiomatic React usage but React will correctly warn about this so we continue as usual\n // See #85 / Pull #44\n isRenderingPending = true;\n\n if (_this[mobxIsUnmounted] !== true) {\n var hasError = true;\n\n try {\n setHiddenProp(_this, isForcingUpdateKey, true);\n if (!_this[skipRenderKey]) react__WEBPACK_IMPORTED_MODULE_0__.Component.prototype.forceUpdate.call(_this);\n hasError = false;\n } finally {\n setHiddenProp(_this, isForcingUpdateKey, false);\n if (hasError) reaction.dispose();\n }\n }\n }\n });\n reaction[\"reactComponent\"] = this;\n reactiveRender[mobxAdminProperty] = reaction;\n this.render = reactiveRender;\n\n function reactiveRender() {\n isRenderingPending = false;\n var exception = undefined;\n var rendering = undefined;\n reaction.track(function () {\n try {\n rendering = (0,mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateChanges)(false, baseRender);\n } catch (e) {\n exception = e;\n }\n });\n\n if (exception) {\n throw exception;\n }\n\n return rendering;\n }\n\n return reactiveRender.call(this);\n}\n\nfunction observerSCU(nextProps, nextState) {\n if ((0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.isUsingStaticRendering)()) {\n console.warn(\"[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side.\");\n } // update on any state changes (as is the default)\n\n\n if (this.state !== nextState) {\n return true;\n } // update if props are shallowly not equal, inspired by PureRenderMixin\n // we could return just 'false' here, and avoid the `skipRender` checks etc\n // however, it is nicer if lifecycle events are triggered like usually,\n // so we return true here if props are shallowly modified.\n\n\n return !shallowEqual(this.props, nextProps);\n}\n\nfunction makeObservableProp(target, propName) {\n var valueHolderKey = newSymbol(\"reactProp_\" + propName + \"_valueHolder\");\n var atomHolderKey = newSymbol(\"reactProp_\" + propName + \"_atomHolder\");\n\n function getAtom() {\n if (!this[atomHolderKey]) {\n setHiddenProp(this, atomHolderKey, (0,mobx__WEBPACK_IMPORTED_MODULE_2__.createAtom)(\"reactive \" + propName));\n }\n\n return this[atomHolderKey];\n }\n\n Object.defineProperty(target, propName, {\n configurable: true,\n enumerable: true,\n get: function get() {\n var prevReadState = false; // Why this check? BC?\n // @ts-expect-error\n\n if (mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsStart && mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsEnd) {\n prevReadState = (0,mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsStart)(true);\n }\n\n getAtom.call(this).reportObserved(); // Why this check? BC?\n // @ts-expect-error\n\n if (mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsStart && mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsEnd) {\n (0,mobx__WEBPACK_IMPORTED_MODULE_2__._allowStateReadsEnd)(prevReadState);\n }\n\n return this[valueHolderKey];\n },\n set: function set(v) {\n if (!this[isForcingUpdateKey] && !shallowEqual(this[valueHolderKey], v)) {\n setHiddenProp(this, valueHolderKey, v);\n setHiddenProp(this, skipRenderKey, true);\n getAtom.call(this).reportChanged();\n setHiddenProp(this, skipRenderKey, false);\n } else {\n setHiddenProp(this, valueHolderKey, v);\n }\n }\n });\n}\n\n/**\r\n * Observer function / decorator\r\n */\n\nfunction observer(component) {\n if (component[\"isMobxInjector\"] === true) {\n console.warn(\"Mobx observer: You are trying to use `observer` on a component that already has `inject`. Please apply `observer` before applying `inject`\");\n }\n\n if (Object.prototype.isPrototypeOf.call(react__WEBPACK_IMPORTED_MODULE_0__.Component, component) || Object.prototype.isPrototypeOf.call(react__WEBPACK_IMPORTED_MODULE_0__.PureComponent, component)) {\n // Class component\n return makeClassComponentObserver(component);\n } else {\n // Function component\n return (0,mobx_react_lite__WEBPACK_IMPORTED_MODULE_1__.observer)(component);\n }\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"children\"];\nvar MobXProviderContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});\nfunction Provider(props) {\n var children = props.children,\n stores = _objectWithoutPropertiesLoose(props, _excluded);\n\n var parentValue = react__WEBPACK_IMPORTED_MODULE_0__.useContext(MobXProviderContext);\n var mutableProviderRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(_extends({}, parentValue, stores));\n var value = mutableProviderRef.current;\n\n if (true) {\n var newValue = _extends({}, value, stores); // spread in previous state for the context based stores\n\n\n if (!shallowEqual(value, newValue)) {\n throw new Error(\"MobX Provider: The set of provided stores has changed. See: https://github.com/mobxjs/mobx-react#the-set-of-provided-stores-has-changed-error.\");\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(MobXProviderContext.Provider, {\n value: value\n }, children);\n}\nProvider.displayName = \"MobXProvider\";\n\n/**\r\n * Store Injection\r\n */\n\nfunction createStoreInjector(grabStoresFn, component, injectNames, makeReactive) {\n // Support forward refs\n var Injector = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {\n var newProps = _extends({}, props);\n\n var context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(MobXProviderContext);\n Object.assign(newProps, grabStoresFn(context || {}, newProps) || {});\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(component, newProps);\n });\n if (makeReactive) Injector = observer(Injector);\n Injector[\"isMobxInjector\"] = true; // assigned late to suppress observer warning\n // Static fields from component should be visible on the generated Injector\n\n copyStaticProperties(component, Injector);\n Injector[\"wrappedComponent\"] = component;\n Injector.displayName = getInjectName(component, injectNames);\n return Injector;\n}\n\nfunction getInjectName(component, injectNames) {\n var displayName;\n var componentName = component.displayName || component.name || component.constructor && component.constructor.name || \"Component\";\n if (injectNames) displayName = \"inject-with-\" + injectNames + \"(\" + componentName + \")\";else displayName = \"inject(\" + componentName + \")\";\n return displayName;\n}\n\nfunction grabStoresByName(storeNames) {\n return function (baseStores, nextProps) {\n storeNames.forEach(function (storeName) {\n if (storeName in nextProps // prefer props over stores\n ) return;\n if (!(storeName in baseStores)) throw new Error(\"MobX injector: Store '\" + storeName + \"' is not available! Make sure it is provided by some Provider\");\n nextProps[storeName] = baseStores[storeName];\n });\n return nextProps;\n };\n}\n/**\r\n * higher order component that injects stores to a child.\r\n * takes either a varargs list of strings, which are stores read from the context,\r\n * or a function that manually maps the available stores from the context to props:\r\n * storesToProps(mobxStores, props, context) => newProps\r\n */\n\n\nfunction inject() {\n for (var _len = arguments.length, storeNames = new Array(_len), _key = 0; _key < _len; _key++) {\n storeNames[_key] = arguments[_key];\n }\n\n if (typeof arguments[0] === \"function\") {\n var grabStoresFn = arguments[0];\n return function (componentClass) {\n return createStoreInjector(grabStoresFn, componentClass, grabStoresFn.name, true);\n };\n } else {\n return function (componentClass) {\n return createStoreInjector(grabStoresByName(storeNames), componentClass, storeNames.join(\"-\"), false);\n };\n }\n}\n\nvar protoStoreKey = /*#__PURE__*/newSymbol(\"disposeOnUnmountProto\");\nvar instStoreKey = /*#__PURE__*/newSymbol(\"disposeOnUnmountInst\");\n\nfunction runDisposersOnWillUnmount() {\n var _this = this;\n [].concat(this[protoStoreKey] || [], this[instStoreKey] || []).forEach(function (propKeyOrFunction) {\n var prop = typeof propKeyOrFunction === \"string\" ? _this[propKeyOrFunction] : propKeyOrFunction;\n\n if (prop !== undefined && prop !== null) {\n if (Array.isArray(prop)) prop.map(function (f) {\n return f();\n });else prop();\n }\n });\n}\n\nfunction disposeOnUnmount(target, propertyKeyOrFunction) {\n if (Array.isArray(propertyKeyOrFunction)) {\n return propertyKeyOrFunction.map(function (fn) {\n return disposeOnUnmount(target, fn);\n });\n }\n\n var c = Object.getPrototypeOf(target).constructor;\n var c2 = Object.getPrototypeOf(target.constructor); // Special case for react-hot-loader\n\n var c3 = Object.getPrototypeOf(Object.getPrototypeOf(target));\n\n if (!(c === react__WEBPACK_IMPORTED_MODULE_0__.Component || c === react__WEBPACK_IMPORTED_MODULE_0__.PureComponent || c2 === react__WEBPACK_IMPORTED_MODULE_0__.Component || c2 === react__WEBPACK_IMPORTED_MODULE_0__.PureComponent || c3 === react__WEBPACK_IMPORTED_MODULE_0__.Component || c3 === react__WEBPACK_IMPORTED_MODULE_0__.PureComponent)) {\n throw new Error(\"[mobx-react] disposeOnUnmount only supports direct subclasses of React.Component or React.PureComponent.\");\n }\n\n if (typeof propertyKeyOrFunction !== \"string\" && typeof propertyKeyOrFunction !== \"function\" && !Array.isArray(propertyKeyOrFunction)) {\n throw new Error(\"[mobx-react] disposeOnUnmount only works if the parameter is either a property key or a function.\");\n } // decorator's target is the prototype, so it doesn't have any instance properties like props\n\n\n var isDecorator = typeof propertyKeyOrFunction === \"string\"; // add property key / function we want run (disposed) to the store\n\n var componentWasAlreadyModified = !!target[protoStoreKey] || !!target[instStoreKey];\n var store = isDecorator ? // decorators are added to the prototype store\n target[protoStoreKey] || (target[protoStoreKey] = []) : // functions are added to the instance store\n target[instStoreKey] || (target[instStoreKey] = []);\n store.push(propertyKeyOrFunction); // tweak the component class componentWillUnmount if not done already\n\n if (!componentWasAlreadyModified) {\n patch(target, \"componentWillUnmount\", runDisposersOnWillUnmount);\n } // return the disposer as is if invoked as a non decorator\n\n\n if (typeof propertyKeyOrFunction !== \"string\") {\n return propertyKeyOrFunction;\n }\n}\n\nfunction createChainableTypeChecker(validator) {\n function checkType(isRequired, props, propName, componentName, location, propFullName) {\n for (var _len = arguments.length, rest = new Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {\n rest[_key - 6] = arguments[_key];\n }\n\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.untracked)(function () {\n componentName = componentName || \"<<anonymous>>\";\n propFullName = propFullName || propName;\n\n if (props[propName] == null) {\n if (isRequired) {\n var actual = props[propName] === null ? \"null\" : \"undefined\";\n return new Error(\"The \" + location + \" `\" + propFullName + \"` is marked as required \" + \"in `\" + componentName + \"`, but its value is `\" + actual + \"`.\");\n }\n\n return null;\n } else {\n // @ts-ignore rest arg is necessary for some React internals - fails tests otherwise\n return validator.apply(void 0, [props, propName, componentName, location, propFullName].concat(rest));\n }\n });\n }\n\n var chainedCheckType = checkType.bind(null, false); // Add isRequired to satisfy Requirable\n\n chainedCheckType.isRequired = checkType.bind(null, true);\n return chainedCheckType;\n} // Copied from React.PropTypes\n\n\nfunction isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === \"symbol\") {\n return true;\n } // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n\n\n if (propValue[\"@@toStringTag\"] === \"Symbol\") {\n return true;\n } // Fallback for non-spec compliant Symbols which are polyfilled.\n\n\n if (typeof Symbol === \"function\" && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n} // Copied from React.PropTypes\n\n\nfunction getPropType(propValue) {\n var propType = typeof propValue;\n\n if (Array.isArray(propValue)) {\n return \"array\";\n }\n\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return \"object\";\n }\n\n if (isSymbol(propType, propValue)) {\n return \"symbol\";\n }\n\n return propType;\n} // This handles more types than `getPropType`. Only used for error messages.\n// Copied from React.PropTypes\n\n\nfunction getPreciseType(propValue) {\n var propType = getPropType(propValue);\n\n if (propType === \"object\") {\n if (propValue instanceof Date) {\n return \"date\";\n } else if (propValue instanceof RegExp) {\n return \"regexp\";\n }\n }\n\n return propType;\n}\n\nfunction createObservableTypeCheckerCreator(allowNativeType, mobxType) {\n return createChainableTypeChecker(function (props, propName, componentName, location, propFullName) {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.untracked)(function () {\n if (allowNativeType) {\n if (getPropType(props[propName]) === mobxType.toLowerCase()) return null;\n }\n\n var mobxChecker;\n\n switch (mobxType) {\n case \"Array\":\n mobxChecker = mobx__WEBPACK_IMPORTED_MODULE_2__.isObservableArray;\n break;\n\n case \"Object\":\n mobxChecker = mobx__WEBPACK_IMPORTED_MODULE_2__.isObservableObject;\n break;\n\n case \"Map\":\n mobxChecker = mobx__WEBPACK_IMPORTED_MODULE_2__.isObservableMap;\n break;\n\n default:\n throw new Error(\"Unexpected mobxType: \" + mobxType);\n }\n\n var propValue = props[propName];\n\n if (!mobxChecker(propValue)) {\n var preciseType = getPreciseType(propValue);\n var nativeTypeExpectationMessage = allowNativeType ? \" or javascript `\" + mobxType.toLowerCase() + \"`\" : \"\";\n return new Error(\"Invalid prop `\" + propFullName + \"` of type `\" + preciseType + \"` supplied to\" + \" `\" + componentName + \"`, expected `mobx.Observable\" + mobxType + \"`\" + nativeTypeExpectationMessage + \".\");\n }\n\n return null;\n });\n });\n}\n\nfunction createObservableArrayOfTypeChecker(allowNativeType, typeChecker) {\n return createChainableTypeChecker(function (props, propName, componentName, location, propFullName) {\n for (var _len2 = arguments.length, rest = new Array(_len2 > 5 ? _len2 - 5 : 0), _key2 = 5; _key2 < _len2; _key2++) {\n rest[_key2 - 5] = arguments[_key2];\n }\n\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.untracked)(function () {\n if (typeof typeChecker !== \"function\") {\n return new Error(\"Property `\" + propFullName + \"` of component `\" + componentName + \"` has \" + \"invalid PropType notation.\");\n } else {\n var error = createObservableTypeCheckerCreator(allowNativeType, \"Array\")(props, propName, componentName, location, propFullName);\n if (error instanceof Error) return error;\n var propValue = props[propName];\n\n for (var i = 0; i < propValue.length; i++) {\n error = typeChecker.apply(void 0, [propValue, i, componentName, location, propFullName + \"[\" + i + \"]\"].concat(rest));\n if (error instanceof Error) return error;\n }\n\n return null;\n }\n });\n });\n}\n\nvar observableArray = /*#__PURE__*/createObservableTypeCheckerCreator(false, \"Array\");\nvar observableArrayOf = /*#__PURE__*/createObservableArrayOfTypeChecker.bind(null, false);\nvar observableMap = /*#__PURE__*/createObservableTypeCheckerCreator(false, \"Map\");\nvar observableObject = /*#__PURE__*/createObservableTypeCheckerCreator(false, \"Object\");\nvar arrayOrObservableArray = /*#__PURE__*/createObservableTypeCheckerCreator(true, \"Array\");\nvar arrayOrObservableArrayOf = /*#__PURE__*/createObservableArrayOfTypeChecker.bind(null, true);\nvar objectOrObservableObject = /*#__PURE__*/createObservableTypeCheckerCreator(true, \"Object\");\nvar PropTypes = {\n observableArray: observableArray,\n observableArrayOf: observableArrayOf,\n observableMap: observableMap,\n observableObject: observableObject,\n arrayOrObservableArray: arrayOrObservableArray,\n arrayOrObservableArrayOf: arrayOrObservableArrayOf,\n objectOrObservableObject: objectOrObservableObject\n};\n\nif (!react__WEBPACK_IMPORTED_MODULE_0__.Component) throw new Error(\"mobx-react requires React to be available\");\nif (!mobx__WEBPACK_IMPORTED_MODULE_2__.observable) throw new Error(\"mobx-react requires mobx to be available\");\n\n\n//# sourceMappingURL=mobxreact.esm.js.map\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-react/dist/mobxreact.esm.js?");
18581
+
18582
+ /***/ }),
18583
+
18584
+ /***/ "./node_modules/mobx-utils/mobx-utils.module.js":
18585
+ /*!******************************************************!*\
18586
+ !*** ./node_modules/mobx-utils/mobx-utils.module.js ***!
18587
+ \******************************************************/
18588
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18589
+
18590
+ "use strict";
18591
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"FULFILLED\": () => (/* binding */ FULFILLED),\n/* harmony export */ \"IDENTITY\": () => (/* binding */ IDENTITY),\n/* harmony export */ \"NOOP\": () => (/* binding */ NOOP),\n/* harmony export */ \"ObservableGroupMap\": () => (/* binding */ ObservableGroupMap),\n/* harmony export */ \"PENDING\": () => (/* binding */ PENDING),\n/* harmony export */ \"REJECTED\": () => (/* binding */ REJECTED),\n/* harmony export */ \"ViewModel\": () => (/* binding */ ViewModel),\n/* harmony export */ \"addHiddenProp\": () => (/* binding */ addHiddenProp),\n/* harmony export */ \"chunkProcessor\": () => (/* binding */ chunkProcessor),\n/* harmony export */ \"computedFn\": () => (/* binding */ computedFn),\n/* harmony export */ \"createTransformer\": () => (/* binding */ createTransformer),\n/* harmony export */ \"createViewModel\": () => (/* binding */ createViewModel),\n/* harmony export */ \"deepObserve\": () => (/* binding */ deepObserve),\n/* harmony export */ \"expr\": () => (/* binding */ expr),\n/* harmony export */ \"fail\": () => (/* binding */ fail),\n/* harmony export */ \"fromPromise\": () => (/* binding */ fromPromise),\n/* harmony export */ \"fromResource\": () => (/* binding */ fromResource),\n/* harmony export */ \"fromStream\": () => (/* binding */ fromStream),\n/* harmony export */ \"getAllMethodsAndProperties\": () => (/* binding */ getAllMethodsAndProperties),\n/* harmony export */ \"invariant\": () => (/* binding */ invariant),\n/* harmony export */ \"isPromiseBasedObservable\": () => (/* binding */ isPromiseBasedObservable),\n/* harmony export */ \"keepAlive\": () => (/* binding */ keepAlive),\n/* harmony export */ \"lazyObservable\": () => (/* binding */ lazyObservable),\n/* harmony export */ \"moveItem\": () => (/* binding */ moveItem),\n/* harmony export */ \"now\": () => (/* binding */ now),\n/* harmony export */ \"queueProcessor\": () => (/* binding */ queueProcessor),\n/* harmony export */ \"toStream\": () => (/* binding */ toStream)\n/* harmony export */ });\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n\n\nvar NOOP = function () { };\r\nvar IDENTITY = function (_) { return _; };\r\nfunction fail(message) {\r\n throw new Error(\"[mobx-utils] \" + message);\r\n}\r\nfunction invariant(cond, message) {\r\n if (message === void 0) { message = \"Illegal state\"; }\r\n if (!cond)\r\n fail(message);\r\n}\r\nfunction addHiddenProp(object, propName, value) {\r\n Object.defineProperty(object, propName, {\r\n enumerable: false,\r\n writable: true,\r\n configurable: true,\r\n value: value,\r\n });\r\n}\r\nvar deepFields = function (x) {\r\n return (x &&\r\n x !== Object.prototype &&\r\n Object.getOwnPropertyNames(x).concat(deepFields(Object.getPrototypeOf(x)) || []));\r\n};\r\nvar distinctDeepFields = function (x) {\r\n var deepFieldsIndistinct = deepFields(x);\r\n var deepFieldsDistinct = deepFieldsIndistinct.filter(function (item, index) { return deepFieldsIndistinct.indexOf(item) === index; });\r\n return deepFieldsDistinct;\r\n};\r\nvar getAllMethodsAndProperties = function (x) {\r\n return distinctDeepFields(x).filter(function (name) { return name !== \"constructor\" && !~name.indexOf(\"__\"); });\r\n};\n\nvar PENDING = \"pending\";\r\nvar FULFILLED = \"fulfilled\";\r\nvar REJECTED = \"rejected\";\r\nfunction caseImpl(handlers) {\r\n switch (this.state) {\r\n case PENDING:\r\n return handlers.pending && handlers.pending(this.value);\r\n case REJECTED:\r\n return handlers.rejected && handlers.rejected(this.value);\r\n case FULFILLED:\r\n return handlers.fulfilled ? handlers.fulfilled(this.value) : this.value;\r\n }\r\n}\r\n/**\r\n * `fromPromise` takes a Promise, extends it with 2 observable properties that track\r\n * the status of the promise and returns it. The returned object has the following observable properties:\r\n * - `value`: either the initial value, the value the Promise resolved to, or the value the Promise was rejected with. use `.state` if you need to be able to tell the difference.\r\n * - `state`: one of `\"pending\"`, `\"fulfilled\"` or `\"rejected\"`\r\n *\r\n * And the following methods:\r\n * - `case({fulfilled, rejected, pending})`: maps over the result using the provided handlers, or returns `undefined` if a handler isn't available for the current promise state.\r\n * - `then((value: TValue) => TResult1 | PromiseLike<TResult1>, [(rejectReason: any) => any])`: chains additional handlers to the provided promise.\r\n *\r\n * The returned object implements `PromiseLike<TValue>`, so you can chain additional `Promise` handlers using `then`. You may also use it with `await` in `async` functions.\r\n *\r\n * Note that the status strings are available as constants:\r\n * `mobxUtils.PENDING`, `mobxUtils.REJECTED`, `mobxUtil.FULFILLED`\r\n *\r\n * fromPromise takes an optional second argument, a previously created `fromPromise` based observable.\r\n * This is useful to replace one promise based observable with another, without going back to an intermediate\r\n * \"pending\" promise state while fetching data. For example:\r\n *\r\n * @example\r\n * \\@observer\r\n * class SearchResults extends React.Component {\r\n * \\@observable.ref searchResults\r\n *\r\n * componentDidUpdate(nextProps) {\r\n * if (nextProps.query !== this.props.query)\r\n * this.searchResults = fromPromise(\r\n * window.fetch(\"/search?q=\" + nextProps.query),\r\n * // by passing, we won't render a pending state if we had a successful search query before\r\n * // rather, we will keep showing the previous search results, until the new promise resolves (or rejects)\r\n * this.searchResults\r\n * )\r\n * }\r\n *\r\n * render() {\r\n * return this.searchResults.case({\r\n * pending: (staleValue) => {\r\n * return staleValue || \"searching\" // <- value might set to previous results while the promise is still pending\r\n * },\r\n * fulfilled: (value) => {\r\n * return value // the fresh results\r\n * },\r\n * rejected: (error) => {\r\n * return \"Oops: \" + error\r\n * }\r\n * })\r\n * }\r\n * }\r\n *\r\n * Observable promises can be created immediately in a certain state using\r\n * `fromPromise.reject(reason)` or `fromPromise.resolve(value?)`.\r\n * The main advantage of `fromPromise.resolve(value)` over `fromPromise(Promise.resolve(value))` is that the first _synchronously_ starts in the desired state.\r\n *\r\n * It is possible to directly create a promise using a resolve, reject function:\r\n * `fromPromise((resolve, reject) => setTimeout(() => resolve(true), 1000))`\r\n *\r\n * @example\r\n * const fetchResult = fromPromise(fetch(\"http://someurl\"))\r\n *\r\n * // combine with when..\r\n * when(\r\n * () => fetchResult.state !== \"pending\",\r\n * () => {\r\n * console.log(\"Got \", fetchResult.value)\r\n * }\r\n * )\r\n *\r\n * // or a mobx-react component..\r\n * const myComponent = observer(({ fetchResult }) => {\r\n * switch(fetchResult.state) {\r\n * case \"pending\": return <div>Loading...</div>\r\n * case \"rejected\": return <div>Ooops... {fetchResult.value}</div>\r\n * case \"fulfilled\": return <div>Gotcha: {fetchResult.value}</div>\r\n * }\r\n * })\r\n *\r\n * // or using the case method instead of switch:\r\n *\r\n * const myComponent = observer(({ fetchResult }) =>\r\n * fetchResult.case({\r\n * pending: () => <div>Loading...</div>,\r\n * rejected: error => <div>Ooops.. {error}</div>,\r\n * fulfilled: value => <div>Gotcha: {value}</div>,\r\n * }))\r\n *\r\n * // chain additional handler(s) to the resolve/reject:\r\n *\r\n * fetchResult.then(\r\n * (result) => doSomeTransformation(result),\r\n * (rejectReason) => console.error('fetchResult was rejected, reason: ' + rejectReason)\r\n * ).then(\r\n * (transformedResult) => console.log('transformed fetchResult: ' + transformedResult)\r\n * )\r\n *\r\n * @param {IThenable<T>} promise The promise which will be observed\r\n * @param {IThenable<T>} oldPromise? The previously observed promise\r\n * @returns {IPromiseBasedObservable<T>}\r\n */\r\nfunction fromPromise(origPromise, oldPromise) {\r\n invariant(arguments.length <= 2, \"fromPromise expects up to two arguments\");\r\n invariant(typeof origPromise === \"function\" ||\r\n (typeof origPromise === \"object\" &&\r\n origPromise &&\r\n typeof origPromise.then === \"function\"), \"Please pass a promise or function to fromPromise\");\r\n if (origPromise.isPromiseBasedObservable === true)\r\n return origPromise;\r\n if (typeof origPromise === \"function\") {\r\n // If it is a (reject, resolve function, wrap it)\r\n origPromise = new Promise(origPromise);\r\n }\r\n var promise = origPromise;\r\n origPromise.then((0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(\"observableFromPromise-resolve\", function (value) {\r\n promise.value = value;\r\n promise.state = FULFILLED;\r\n }), (0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(\"observableFromPromise-reject\", function (reason) {\r\n promise.value = reason;\r\n promise.state = REJECTED;\r\n }));\r\n promise.isPromiseBasedObservable = true;\r\n promise.case = caseImpl;\r\n var oldData = oldPromise && oldPromise.state === FULFILLED\r\n ? oldPromise.value\r\n : undefined;\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.extendObservable)(promise, {\r\n value: oldData,\r\n state: PENDING,\r\n }, {}, { deep: false });\r\n return promise;\r\n}\r\n(function (fromPromise) {\r\n fromPromise.reject = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(\"fromPromise.reject\", function (reason) {\r\n var p = fromPromise(Promise.reject(reason));\r\n p.state = REJECTED;\r\n p.value = reason;\r\n return p;\r\n });\r\n function resolveBase(value) {\r\n if (value === void 0) { value = undefined; }\r\n var p = fromPromise(Promise.resolve(value));\r\n p.state = FULFILLED;\r\n p.value = value;\r\n return p;\r\n }\r\n fromPromise.resolve = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(\"fromPromise.resolve\", resolveBase);\r\n})(fromPromise || (fromPromise = {}));\r\n/**\r\n * Returns true if the provided value is a promise-based observable.\r\n * @param value any\r\n * @returns {boolean}\r\n */\r\nfunction isPromiseBasedObservable(value) {\r\n return value && value.isPromiseBasedObservable === true;\r\n}\n\nvar __spreadArrays = ( false) || function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n/**\r\n * Moves an item from one position to another, checking that the indexes given are within bounds.\r\n *\r\n * @example\r\n * const source = observable([1, 2, 3])\r\n * moveItem(source, 0, 1)\r\n * console.log(source.map(x => x)) // [2, 1, 3]\r\n *\r\n * @export\r\n * @param {ObservableArray<T>} target\r\n * @param {number} fromIndex\r\n * @param {number} toIndex\r\n * @returns {ObservableArray<T>}\r\n */\r\nfunction moveItem(target, fromIndex, toIndex) {\r\n checkIndex(target, fromIndex);\r\n checkIndex(target, toIndex);\r\n if (fromIndex === toIndex) {\r\n return;\r\n }\r\n var oldItems = target.slice();\r\n var newItems;\r\n if (fromIndex < toIndex) {\r\n newItems = __spreadArrays(oldItems.slice(0, fromIndex), oldItems.slice(fromIndex + 1, toIndex + 1), [\r\n oldItems[fromIndex]\r\n ], oldItems.slice(toIndex + 1));\r\n }\r\n else {\r\n // toIndex < fromIndex\r\n newItems = __spreadArrays(oldItems.slice(0, toIndex), [\r\n oldItems[fromIndex]\r\n ], oldItems.slice(toIndex, fromIndex), oldItems.slice(fromIndex + 1));\r\n }\r\n target.replace(newItems);\r\n return target;\r\n}\r\n/**\r\n * Checks whether the specified index is within bounds. Throws if not.\r\n *\r\n * @private\r\n * @param {ObservableArray<any>} target\r\n * @param {number }index\r\n */\r\nfunction checkIndex(target, index) {\r\n if (index < 0) {\r\n throw new Error(\"[mobx.array] Index out of bounds: \" + index + \" is negative\");\r\n }\r\n var length = target.length;\r\n if (index >= length) {\r\n throw new Error(\"[mobx.array] Index out of bounds: \" + index + \" is not smaller than \" + length);\r\n }\r\n}\n\n/**\r\n * `lazyObservable` creates an observable around a `fetch` method that will not be invoked\r\n * until the observable is needed the first time.\r\n * The fetch method receives a `sink` callback which can be used to replace the\r\n * current value of the lazyObservable. It is allowed to call `sink` multiple times\r\n * to keep the lazyObservable up to date with some external resource.\r\n *\r\n * Note that it is the `current()` call itself which is being tracked by MobX,\r\n * so make sure that you don't dereference to early.\r\n *\r\n * @example\r\n * const userProfile = lazyObservable(\r\n * sink => fetch(\"/myprofile\").then(profile => sink(profile))\r\n * )\r\n *\r\n * // use the userProfile in a React component:\r\n * const Profile = observer(({ userProfile }) =>\r\n * userProfile.current() === undefined\r\n * ? <div>Loading user profile...</div>\r\n * : <div>{userProfile.current().displayName}</div>\r\n * )\r\n *\r\n * // triggers refresh the userProfile\r\n * userProfile.refresh()\r\n *\r\n * @param {(sink: (newValue: T) => void) => void} fetch method that will be called the first time the value of this observable is accessed. The provided sink can be used to produce a new value, synchronously or asynchronously\r\n * @param {T} [initialValue=undefined] optional initialValue that will be returned from `current` as long as the `sink` has not been called at least once\r\n * @returns {{\r\n * current(): T,\r\n * refresh(): T,\r\n * reset(): T\r\n * pending: boolean\r\n * }}\r\n */\r\nfunction lazyObservable(fetch, initialValue) {\r\n if (initialValue === void 0) { initialValue = undefined; }\r\n var started = false;\r\n var value = mobx__WEBPACK_IMPORTED_MODULE_0__.observable.box(initialValue, { deep: false });\r\n var pending = mobx__WEBPACK_IMPORTED_MODULE_0__.observable.box(false);\r\n var currentFnc = function () {\r\n if (!started) {\r\n started = true;\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__._allowStateChanges)(true, function () {\r\n pending.set(true);\r\n });\r\n fetch(function (newValue) {\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__._allowStateChanges)(true, function () {\r\n value.set(newValue);\r\n pending.set(false);\r\n });\r\n });\r\n }\r\n return value.get();\r\n };\r\n var resetFnc = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(\"lazyObservable-reset\", function () {\r\n started = false;\r\n value.set(initialValue);\r\n return value.get();\r\n });\r\n return {\r\n current: currentFnc,\r\n refresh: function () {\r\n if (started) {\r\n started = false;\r\n return currentFnc();\r\n }\r\n else {\r\n return value.get();\r\n }\r\n },\r\n reset: function () {\r\n return resetFnc();\r\n },\r\n get pending() {\r\n return pending.get();\r\n },\r\n };\r\n}\n\n/**\r\n * `fromResource` creates an observable whose current state can be inspected using `.current()`,\r\n * and which can be kept in sync with some external datasource that can be subscribed to.\r\n *\r\n * The created observable will only subscribe to the datasource if it is in use somewhere,\r\n * (un)subscribing when needed. To enable `fromResource` to do that two callbacks need to be provided,\r\n * one to subscribe, and one to unsubscribe. The subscribe callback itself will receive a `sink` callback, which can be used\r\n * to update the current state of the observable, allowing observes to react.\r\n *\r\n * Whatever is passed to `sink` will be returned by `current()`. The values passed to the sink will not be converted to\r\n * observables automatically, but feel free to do so.\r\n * It is the `current()` call itself which is being tracked,\r\n * so make sure that you don't dereference to early.\r\n *\r\n * For inspiration, an example integration with the apollo-client on [github](https://github.com/apollostack/apollo-client/issues/503#issuecomment-241101379),\r\n * or the [implementation](https://github.com/mobxjs/mobx-utils/blob/1d17cf7f7f5200937f68cc0b5e7ec7f3f71dccba/src/now.ts#L43-L57) of `mobxUtils.now`\r\n *\r\n * The following example code creates an observable that connects to a `dbUserRecord`,\r\n * which comes from an imaginary database and notifies when it has changed.\r\n *\r\n * @example\r\n * function createObservableUser(dbUserRecord) {\r\n * let currentSubscription;\r\n * return fromResource(\r\n * (sink) => {\r\n * // sink the current state\r\n * sink(dbUserRecord.fields)\r\n * // subscribe to the record, invoke the sink callback whenever new data arrives\r\n * currentSubscription = dbUserRecord.onUpdated(() => {\r\n * sink(dbUserRecord.fields)\r\n * })\r\n * },\r\n * () => {\r\n * // the user observable is not in use at the moment, unsubscribe (for now)\r\n * dbUserRecord.unsubscribe(currentSubscription)\r\n * }\r\n * )\r\n * }\r\n *\r\n * // usage:\r\n * const myUserObservable = createObservableUser(myDatabaseConnector.query(\"name = 'Michel'\"))\r\n *\r\n * // use the observable in autorun\r\n * autorun(() => {\r\n * // printed everytime the database updates its records\r\n * console.log(myUserObservable.current().displayName)\r\n * })\r\n *\r\n * // ... or a component\r\n * const userComponent = observer(({ user }) =>\r\n * <div>{user.current().displayName}</div>\r\n * )\r\n *\r\n * @export\r\n * @template T\r\n * @param {(sink: (newValue: T) => void) => void} subscriber\r\n * @param {IDisposer} [unsubscriber=NOOP]\r\n * @param {T} [initialValue=undefined] the data that will be returned by `get()` until the `sink` has emitted its first data\r\n * @returns {{\r\n * current(): T;\r\n * dispose(): void;\r\n * isAlive(): boolean;\r\n * }}\r\n */\r\nfunction fromResource(subscriber, unsubscriber, initialValue) {\r\n if (unsubscriber === void 0) { unsubscriber = NOOP; }\r\n if (initialValue === void 0) { initialValue = undefined; }\r\n var isActive = false;\r\n var isDisposed = false;\r\n var value = initialValue;\r\n var suspender = function () {\r\n if (isActive) {\r\n isActive = false;\r\n unsubscriber();\r\n }\r\n };\r\n var atom = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.createAtom)(\"ResourceBasedObservable\", function () {\r\n invariant(!isActive && !isDisposed);\r\n isActive = true;\r\n subscriber(function (newValue) {\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__._allowStateChanges)(true, function () {\r\n value = newValue;\r\n atom.reportChanged();\r\n });\r\n });\r\n }, suspender);\r\n return {\r\n current: function () {\r\n invariant(!isDisposed, \"subscribingObservable has already been disposed\");\r\n var isBeingTracked = atom.reportObserved();\r\n if (!isBeingTracked && !isActive)\r\n console.warn(\"Called `get` of a subscribingObservable outside a reaction. Current value will be returned but no new subscription has started\");\r\n return value;\r\n },\r\n dispose: function () {\r\n isDisposed = true;\r\n suspender();\r\n },\r\n isAlive: function () { return isActive; },\r\n };\r\n}\n\nvar __decorate = ( false) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nfunction observableSymbol() {\r\n return (typeof Symbol === \"function\" && Symbol.observable) || \"@@observable\";\r\n}\r\n/**\r\n * Converts an expression to an observable stream (a.k.a. TC 39 Observable / RxJS observable).\r\n * The provided expression is tracked by mobx as long as there are subscribers, automatically\r\n * emitting when new values become available. The expressions respect (trans)actions.\r\n *\r\n * @example\r\n *\r\n * const user = observable({\r\n * firstName: \"C.S\",\r\n * lastName: \"Lewis\"\r\n * })\r\n *\r\n * Rx.Observable\r\n * .from(mobxUtils.toStream(() => user.firstname + user.lastName))\r\n * .scan(nameChanges => nameChanges + 1, 0)\r\n * .subscribe(nameChanges => console.log(\"Changed name \", nameChanges, \"times\"))\r\n *\r\n * @export\r\n * @template T\r\n * @param {() => T} expression\r\n * @param {boolean} fireImmediately (by default false)\r\n * @returns {IObservableStream<T>}\r\n */\r\nfunction toStream(expression, fireImmediately) {\r\n var _a;\r\n if (fireImmediately === void 0) { fireImmediately = false; }\r\n var computedValue = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.computed)(expression);\r\n return _a = {\r\n subscribe: function (observer) {\r\n if (\"function\" === typeof observer) {\r\n return {\r\n unsubscribe: (0,mobx__WEBPACK_IMPORTED_MODULE_0__.observe)(computedValue, function (_a) {\r\n var newValue = _a.newValue;\r\n return observer(newValue);\r\n }, fireImmediately),\r\n };\r\n }\r\n if (observer && \"object\" === typeof observer && observer.next) {\r\n return {\r\n unsubscribe: (0,mobx__WEBPACK_IMPORTED_MODULE_0__.observe)(computedValue, function (_a) {\r\n var newValue = _a.newValue;\r\n return observer.next(newValue);\r\n }, fireImmediately),\r\n };\r\n }\r\n return {\r\n unsubscribe: function () { },\r\n };\r\n }\r\n },\r\n _a[observableSymbol()] = function () {\r\n return this;\r\n },\r\n _a;\r\n}\r\nvar StreamListener = /** @class */ (function () {\r\n function StreamListener(observable, initialValue) {\r\n var _this = this;\r\n Object.defineProperty(this, \"current\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n Object.defineProperty(this, \"subscription\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.makeObservable)(this);\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.runInAction)(function () {\r\n _this.current = initialValue;\r\n _this.subscription = observable.subscribe(_this);\r\n });\r\n }\r\n Object.defineProperty(StreamListener.prototype, \"dispose\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n if (this.subscription) {\r\n this.subscription.unsubscribe();\r\n }\r\n }\r\n });\r\n Object.defineProperty(StreamListener.prototype, \"next\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (value) {\r\n this.current = value;\r\n }\r\n });\r\n Object.defineProperty(StreamListener.prototype, \"complete\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n this.dispose();\r\n }\r\n });\r\n Object.defineProperty(StreamListener.prototype, \"error\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (value) {\r\n this.current = value;\r\n this.dispose();\r\n }\r\n });\r\n __decorate([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.observable.ref\r\n ], StreamListener.prototype, \"current\", void 0);\r\n __decorate([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.action.bound\r\n ], StreamListener.prototype, \"next\", null);\r\n __decorate([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.action.bound\r\n ], StreamListener.prototype, \"complete\", null);\r\n __decorate([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.action.bound\r\n ], StreamListener.prototype, \"error\", null);\r\n return StreamListener;\r\n}());\r\nfunction fromStream(observable, initialValue) {\r\n if (initialValue === void 0) { initialValue = undefined; }\r\n return new StreamListener(observable, initialValue);\r\n}\n\nvar __assign = ( false) || function () {\r\n __assign = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\nvar __decorate$1 = ( false) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar RESERVED_NAMES = [\"model\", \"reset\", \"submit\", \"isDirty\", \"isPropertyDirty\", \"resetProperty\"];\r\nvar ViewModel = /** @class */ (function () {\r\n function ViewModel(model) {\r\n var _this = this;\r\n Object.defineProperty(this, \"model\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: model\r\n });\r\n Object.defineProperty(this, \"localValues\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: mobx__WEBPACK_IMPORTED_MODULE_0__.observable.map({})\r\n });\r\n Object.defineProperty(this, \"localComputedValues\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: mobx__WEBPACK_IMPORTED_MODULE_0__.observable.map({})\r\n });\r\n Object.defineProperty(this, \"isPropertyDirty\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: function (key) {\r\n return _this.localValues.has(key);\r\n }\r\n });\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.makeObservable)(this);\r\n invariant((0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableObject)(model), \"createViewModel expects an observable object\");\r\n // use this helper as Object.getOwnPropertyNames doesn't return getters\r\n getAllMethodsAndProperties(model).forEach(function (key) {\r\n var _a;\r\n if (key === mobx__WEBPACK_IMPORTED_MODULE_0__.$mobx || key === \"__mobxDidRunLazyInitializers\") {\r\n return;\r\n }\r\n invariant(RESERVED_NAMES.indexOf(key) === -1, \"The propertyname \" + key + \" is reserved and cannot be used with viewModels\");\r\n if ((0,mobx__WEBPACK_IMPORTED_MODULE_0__.isComputedProp)(model, key)) {\r\n var computedBox = (0,mobx__WEBPACK_IMPORTED_MODULE_0__._getAdministration)(model, key); // Fixme: there is no clear api to get the derivation\r\n var get = computedBox.derivation.bind(_this);\r\n var set = (_a = computedBox.setter_) === null || _a === void 0 ? void 0 : _a.bind(_this);\r\n _this.localComputedValues.set(key, (0,mobx__WEBPACK_IMPORTED_MODULE_0__.computed)(get, { set: set }));\r\n }\r\n var descriptor = Object.getOwnPropertyDescriptor(model, key);\r\n var additionalDescriptor = descriptor ? { enumerable: descriptor.enumerable } : {};\r\n Object.defineProperty(_this, key, __assign(__assign({}, additionalDescriptor), { configurable: true, get: function () {\r\n if ((0,mobx__WEBPACK_IMPORTED_MODULE_0__.isComputedProp)(model, key))\r\n return _this.localComputedValues.get(key).get();\r\n if (_this.isPropertyDirty(key))\r\n return _this.localValues.get(key);\r\n else\r\n return _this.model[key];\r\n }, set: (0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(function (value) {\r\n if ((0,mobx__WEBPACK_IMPORTED_MODULE_0__.isComputedProp)(model, key)) {\r\n _this.localComputedValues.get(key).set(value);\r\n }\r\n else if (value !== _this.model[key]) {\r\n _this.localValues.set(key, value);\r\n }\r\n else {\r\n _this.localValues.delete(key);\r\n }\r\n }) }));\r\n });\r\n }\r\n Object.defineProperty(ViewModel.prototype, \"isDirty\", {\r\n get: function () {\r\n return this.localValues.size > 0;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ViewModel.prototype, \"changedValues\", {\r\n get: function () {\r\n return new Map(this.localValues);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(ViewModel.prototype, \"submit\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n var _this = this;\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.keys)(this.localValues).forEach(function (key) {\r\n var source = _this.localValues.get(key);\r\n var destination = _this.model[key];\r\n if ((0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableArray)(destination)) {\r\n destination.replace(source);\r\n }\r\n else if ((0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableMap)(destination)) {\r\n destination.clear();\r\n destination.merge(source);\r\n }\r\n else if (!(0,mobx__WEBPACK_IMPORTED_MODULE_0__.isComputed)(source)) {\r\n _this.model[key] = source;\r\n }\r\n });\r\n this.localValues.clear();\r\n }\r\n });\r\n Object.defineProperty(ViewModel.prototype, \"reset\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n this.localValues.clear();\r\n }\r\n });\r\n Object.defineProperty(ViewModel.prototype, \"resetProperty\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (key) {\r\n this.localValues.delete(key);\r\n }\r\n });\r\n __decorate$1([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.computed\r\n ], ViewModel.prototype, \"isDirty\", null);\r\n __decorate$1([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.computed\r\n ], ViewModel.prototype, \"changedValues\", null);\r\n __decorate$1([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.action.bound\r\n ], ViewModel.prototype, \"submit\", null);\r\n __decorate$1([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.action.bound\r\n ], ViewModel.prototype, \"reset\", null);\r\n __decorate$1([\r\n mobx__WEBPACK_IMPORTED_MODULE_0__.action.bound\r\n ], ViewModel.prototype, \"resetProperty\", null);\r\n return ViewModel;\r\n}());\r\n/**\r\n * `createViewModel` takes an object with observable properties (model)\r\n * and wraps a viewmodel around it. The viewmodel proxies all enumerable properties of the original model with the following behavior:\r\n * - as long as no new value has been assigned to the viewmodel property, the original property will be returned.\r\n * - any future change in the model will be visible in the viewmodel as well unless the viewmodel property was dirty at the time of the attempted change.\r\n * - once a new value has been assigned to a property of the viewmodel, that value will be returned during a read of that property in the future. However, the original model remain untouched until `submit()` is called.\r\n *\r\n * The viewmodel exposes the following additional methods, besides all the enumerable properties of the model:\r\n * - `submit()`: copies all the values of the viewmodel to the model and resets the state\r\n * - `reset()`: resets the state of the viewmodel, abandoning all local modifications\r\n * - `resetProperty(propName)`: resets the specified property of the viewmodel\r\n * - `isDirty`: observable property indicating if the viewModel contains any modifications\r\n * - `isPropertyDirty(propName)`: returns true if the specified property is dirty\r\n * - `changedValues`: returns a key / value map with the properties that have been changed in the model so far\r\n * - `model`: The original model object for which this viewModel was created\r\n *\r\n * You may use observable arrays, maps and objects with `createViewModel` but keep in mind to assign fresh instances of those to the viewmodel's properties, otherwise you would end up modifying the properties of the original model.\r\n * Note that if you read a non-dirty property, viewmodel only proxies the read to the model. You therefore need to assign a fresh instance not only the first time you make the assignment but also after calling `reset()` or `submit()`.\r\n *\r\n * @example\r\n * class Todo {\r\n * \\@observable title = \"Test\"\r\n * }\r\n *\r\n * const model = new Todo()\r\n * const viewModel = createViewModel(model);\r\n *\r\n * autorun(() => console.log(viewModel.model.title, \",\", viewModel.title))\r\n * // prints \"Test, Test\"\r\n * model.title = \"Get coffee\"\r\n * // prints \"Get coffee, Get coffee\", viewModel just proxies to model\r\n * viewModel.title = \"Get tea\"\r\n * // prints \"Get coffee, Get tea\", viewModel's title is now dirty, and the local value will be printed\r\n * viewModel.submit()\r\n * // prints \"Get tea, Get tea\", changes submitted from the viewModel to the model, viewModel is proxying again\r\n * viewModel.title = \"Get cookie\"\r\n * // prints \"Get tea, Get cookie\" // viewModel has diverged again\r\n * viewModel.reset()\r\n * // prints \"Get tea, Get tea\", changes of the viewModel have been abandoned\r\n *\r\n * @param {T} model\r\n * @returns {(T & IViewModel<T>)}\r\n * ```\r\n */\r\nfunction createViewModel(model) {\r\n return new ViewModel(model);\r\n}\n\n/**\r\n * MobX normally suspends any computed value that is not in use by any reaction,\r\n * and lazily re-evaluates the expression if needed outside a reaction while not in use.\r\n * `keepAlive` marks a computed value as always in use, meaning that it will always fresh, but never disposed automatically.\r\n *\r\n * @example\r\n * const obj = observable({\r\n * number: 3,\r\n * doubler: function() { return this.number * 2 }\r\n * })\r\n * const stop = keepAlive(obj, \"doubler\")\r\n *\r\n * @param {Object} target an object that has a computed property, created by `@computed` or `extendObservable`\r\n * @param {string} property the name of the property to keep alive\r\n * @returns {IDisposer} stops this keep alive so that the computed value goes back to normal behavior\r\n */\r\n/**\r\n * @example\r\n * const number = observable(3)\r\n * const doubler = computed(() => number.get() * 2)\r\n * const stop = keepAlive(doubler)\r\n * // doubler will now stay in sync reactively even when there are no further observers\r\n * stop()\r\n * // normal behavior, doubler results will be recomputed if not observed but needed, but lazily\r\n *\r\n * @param {IComputedValue<any>} computedValue created using the `computed` function\r\n * @returns {IDisposer} stops this keep alive so that the computed value goes back to normal behavior\r\n */\r\nfunction keepAlive(_1, _2) {\r\n var computed = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.getAtom)(_1, _2);\r\n if (!computed)\r\n throw new Error(\"No computed provided, please provide an object created with `computed(() => expr)` or an object + property name\");\r\n return (0,mobx__WEBPACK_IMPORTED_MODULE_0__.observe)(computed, function () { });\r\n}\n\n/**\r\n * `queueProcessor` takes an observable array, observes it and calls `processor`\r\n * once for each item added to the observable array, optionally debouncing the action\r\n *\r\n * @example\r\n * const pendingNotifications = observable([])\r\n * const stop = queueProcessor(pendingNotifications, msg => {\r\n * // show Desktop notification\r\n * new Notification(msg);\r\n * })\r\n *\r\n * // usage:\r\n * pendingNotifications.push(\"test!\")\r\n *\r\n * @param {T[]} observableArray observable array instance to track\r\n * @param {(item: T) => void} processor action to call per item\r\n * @param {number} [debounce=0] optional debounce time in ms. With debounce 0 the processor will run synchronously\r\n * @returns {IDisposer} stops the processor\r\n */\r\nfunction queueProcessor(observableArray, processor, debounce) {\r\n if (debounce === void 0) { debounce = 0; }\r\n if (!(0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableArray)(observableArray))\r\n throw new Error(\"Expected observable array as first argument\");\r\n if (!(0,mobx__WEBPACK_IMPORTED_MODULE_0__.isAction)(processor))\r\n processor = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(\"queueProcessor\", processor);\r\n var runner = function () {\r\n // construct a final set\r\n var items = observableArray.slice(0);\r\n // clear the queue for next iteration\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.runInAction)(function () { return observableArray.splice(0); });\r\n // fire processor\r\n items.forEach(processor);\r\n };\r\n if (debounce > 0)\r\n return (0,mobx__WEBPACK_IMPORTED_MODULE_0__.autorun)(runner, { delay: debounce });\r\n else\r\n return (0,mobx__WEBPACK_IMPORTED_MODULE_0__.autorun)(runner);\r\n}\n\n/**\r\n * `chunkProcessor` takes an observable array, observes it and calls `processor`\r\n * once for a chunk of items added to the observable array, optionally deboucing the action.\r\n * The maximum chunk size can be limited by number.\r\n * This allows both, splitting larger into smaller chunks or (when debounced) combining smaller\r\n * chunks and/or single items into reasonable chunks of work.\r\n *\r\n * @example\r\n * const trackedActions = observable([])\r\n * const stop = chunkProcessor(trackedActions, chunkOfMax10Items => {\r\n * sendTrackedActionsToServer(chunkOfMax10Items);\r\n * }, 100, 10)\r\n *\r\n * // usage:\r\n * trackedActions.push(\"scrolled\")\r\n * trackedActions.push(\"hoveredButton\")\r\n * // when both pushes happen within 100ms, there will be only one call to server\r\n *\r\n * @param {T[]} observableArray observable array instance to track\r\n * @param {(item: T[]) => void} processor action to call per item\r\n * @param {number} [debounce=0] optional debounce time in ms. With debounce 0 the processor will run synchronously\r\n * @param {number} [maxChunkSize=0] optionally do not call on full array but smaller chunks. With 0 it will process the full array.\r\n * @returns {IDisposer} stops the processor\r\n */\r\nfunction chunkProcessor(observableArray, processor, debounce, maxChunkSize) {\r\n if (debounce === void 0) { debounce = 0; }\r\n if (maxChunkSize === void 0) { maxChunkSize = 0; }\r\n if (!(0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableArray)(observableArray))\r\n throw new Error(\"Expected observable array as first argument\");\r\n if (!(0,mobx__WEBPACK_IMPORTED_MODULE_0__.isAction)(processor))\r\n processor = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.action)(\"chunkProcessor\", processor);\r\n var runner = function () {\r\n var _loop_1 = function () {\r\n var chunkSize = maxChunkSize === 0\r\n ? observableArray.length\r\n : Math.min(observableArray.length, maxChunkSize);\r\n // construct a final set\r\n var items = observableArray.slice(0, chunkSize);\r\n // clear the slice for next iteration\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.runInAction)(function () { return observableArray.splice(0, chunkSize); });\r\n // fire processor\r\n processor(items);\r\n };\r\n while (observableArray.length > 0) {\r\n _loop_1();\r\n }\r\n };\r\n if (debounce > 0)\r\n return (0,mobx__WEBPACK_IMPORTED_MODULE_0__.autorun)(runner, { delay: debounce });\r\n else\r\n return (0,mobx__WEBPACK_IMPORTED_MODULE_0__.autorun)(runner);\r\n}\n\nvar tickers = {};\r\n/**\r\n * Returns the current date time as epoch number.\r\n * The date time is read from an observable which is updated automatically after the given interval.\r\n * So basically it treats time as an observable.\r\n *\r\n * The function takes an interval as parameter, which indicates how often `now()` will return a new value.\r\n * If no interval is given, it will update each second. If \"frame\" is specified, it will update each time a\r\n * `requestAnimationFrame` is available.\r\n *\r\n * Multiple clocks with the same interval will automatically be synchronized.\r\n *\r\n * Countdown example: https://jsfiddle.net/mweststrate/na0qdmkw/\r\n *\r\n * @example\r\n *\r\n * const start = Date.now()\r\n *\r\n * autorun(() => {\r\n * console.log(\"Seconds elapsed: \", (mobxUtils.now() - start) / 1000)\r\n * })\r\n *\r\n *\r\n * @export\r\n * @param {(number | \"frame\")} [interval=1000] interval in milliseconds about how often the interval should update\r\n * @returns\r\n */\r\nfunction now(interval) {\r\n if (interval === void 0) { interval = 1000; }\r\n if (!(0,mobx__WEBPACK_IMPORTED_MODULE_0__._isComputingDerivation)()) {\r\n // See #40\r\n return Date.now();\r\n }\r\n if (!tickers[interval]) {\r\n if (typeof interval === \"number\")\r\n tickers[interval] = createIntervalTicker(interval);\r\n else\r\n tickers[interval] = createAnimationFrameTicker();\r\n }\r\n return tickers[interval].current();\r\n}\r\nfunction createIntervalTicker(interval) {\r\n var subscriptionHandle;\r\n return fromResource(function (sink) {\r\n sink(Date.now());\r\n subscriptionHandle = setInterval(function () { return sink(Date.now()); }, interval);\r\n }, function () {\r\n clearInterval(subscriptionHandle);\r\n }, Date.now());\r\n}\r\nfunction createAnimationFrameTicker() {\r\n var frameBasedTicker = fromResource(function (sink) {\r\n sink(Date.now());\r\n function scheduleTick() {\r\n window.requestAnimationFrame(function () {\r\n sink(Date.now());\r\n if (frameBasedTicker.isAlive())\r\n scheduleTick();\r\n });\r\n }\r\n scheduleTick();\r\n }, function () { }, Date.now());\r\n return frameBasedTicker;\r\n}\n\n/**\r\n * expr can be used to create temporarily views inside views.\r\n * This can be improved to improve performance if a value changes often, but usually doesn't affect the outcome of an expression.\r\n *\r\n * In the following example the expression prevents that a component is rerender _each time_ the selection changes;\r\n * instead it will only rerenders when the current todo is (de)selected.\r\n *\r\n * @example\r\n * const Todo = observer((props) => {\r\n * const todo = props.todo;\r\n * const isSelected = mobxUtils.expr(() => props.viewState.selection === todo);\r\n * return <div className={isSelected ? \"todo todo-selected\" : \"todo\"}>{todo.title}</div>\r\n * });\r\n *\r\n */\r\nfunction expr(expr) {\r\n if (!(0,mobx__WEBPACK_IMPORTED_MODULE_0__._isComputingDerivation)())\r\n console.warn(\"'expr' should only be used inside other reactive functions.\");\r\n // optimization: would be more efficient if the expr itself wouldn't be evaluated first on the next change, but just a 'changed' signal would be fired\r\n return (0,mobx__WEBPACK_IMPORTED_MODULE_0__.computed)(expr).get();\r\n}\n\nvar __assign$1 = ( false) || function () {\r\n __assign$1 = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign$1.apply(this, arguments);\r\n};\r\nvar memoizationId = 0;\r\nfunction createTransformer(transformer, arg2) {\r\n invariant(typeof transformer === \"function\" && transformer.length < 2, \"createTransformer expects a function that accepts one argument\");\r\n // Memoizes: object id -> reactive view that applies transformer to the object\r\n var views = {};\r\n var onCleanup = undefined;\r\n var keepAlive = false;\r\n var debugNameGenerator = undefined;\r\n if (typeof arg2 === \"object\") {\r\n onCleanup = arg2.onCleanup;\r\n keepAlive = arg2.keepAlive !== undefined ? arg2.keepAlive : false;\r\n debugNameGenerator = arg2.debugNameGenerator;\r\n }\r\n else if (typeof arg2 === \"function\") {\r\n onCleanup = arg2;\r\n }\r\n function createView(sourceIdentifier, sourceObject) {\r\n var latestValue;\r\n var computedValueOptions = {};\r\n if (typeof arg2 === \"object\") {\r\n onCleanup = arg2.onCleanup;\r\n debugNameGenerator = arg2.debugNameGenerator;\r\n computedValueOptions = arg2;\r\n }\r\n else if (typeof arg2 === \"function\") {\r\n onCleanup = arg2;\r\n }\r\n else {\r\n onCleanup = undefined;\r\n debugNameGenerator = undefined;\r\n }\r\n var prettifiedName = debugNameGenerator\r\n ? debugNameGenerator(sourceObject)\r\n : \"Transformer-\" + transformer.name + \"-\" + sourceIdentifier;\r\n var expr = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {\r\n return (latestValue = transformer(sourceObject));\r\n }, __assign$1(__assign$1({}, computedValueOptions), { name: prettifiedName }));\r\n if (!keepAlive) {\r\n var disposer_1 = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.onBecomeUnobserved)(expr, function () {\r\n delete views[sourceIdentifier];\r\n disposer_1();\r\n if (onCleanup)\r\n onCleanup(latestValue, sourceObject);\r\n });\r\n }\r\n return expr;\r\n }\r\n var memoWarned = false;\r\n return function (object) {\r\n var identifier = getMemoizationId(object);\r\n var reactiveView = views[identifier];\r\n if (reactiveView)\r\n return reactiveView.get();\r\n if (!keepAlive && !(0,mobx__WEBPACK_IMPORTED_MODULE_0__._isComputingDerivation)()) {\r\n if (!memoWarned) {\r\n console.warn(\"invoking a transformer from outside a reactive context won't memorized \" +\r\n \"and is cleaned up immediately, unless keepAlive is set\");\r\n memoWarned = true;\r\n }\r\n var value = transformer(object);\r\n if (onCleanup)\r\n onCleanup(value, object);\r\n return value;\r\n }\r\n // Not in cache; create a reactive view\r\n reactiveView = views[identifier] = createView(identifier, object);\r\n return reactiveView.get();\r\n };\r\n}\r\nfunction getMemoizationId(object) {\r\n var objectType = typeof object;\r\n if (objectType === \"string\")\r\n return \"string:\" + object;\r\n if (objectType === \"number\")\r\n return \"number:\" + object;\r\n if (object === null || (objectType !== \"object\" && objectType !== \"function\"))\r\n throw new Error(\"[mobx-utils] transform expected an object, function, string or number, got: \" + String(object));\r\n var tid = object.$transformId;\r\n if (tid === undefined) {\r\n tid = \"memoizationId:\" + ++memoizationId;\r\n addHiddenProp(object, \"$transformId\", tid);\r\n }\r\n return tid;\r\n}\n\nfunction buildPath(entry) {\r\n if (!entry)\r\n return \"ROOT\";\r\n var res = [];\r\n while (entry.parent) {\r\n res.push(entry.path);\r\n entry = entry.parent;\r\n }\r\n return res.reverse().join(\"/\");\r\n}\r\nfunction isRecursivelyObservable(thing) {\r\n return (0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableObject)(thing) || (0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableArray)(thing) || (0,mobx__WEBPACK_IMPORTED_MODULE_0__.isObservableMap)(thing);\r\n}\r\n/**\r\n * Given an object, deeply observes the given object.\r\n * It is like `observe` from mobx, but applied recursively, including all future children.\r\n *\r\n * Note that the given object cannot ever contain cycles and should be a tree.\r\n *\r\n * As benefit: path and root will be provided in the callback, so the signature of the listener is\r\n * (change, path, root) => void\r\n *\r\n * The returned disposer can be invoked to clean up the listener\r\n *\r\n * deepObserve cannot be used on computed values.\r\n *\r\n * @example\r\n * const disposer = deepObserve(target, (change, path) => {\r\n * console.dir(change)\r\n * })\r\n */\r\nfunction deepObserve(target, listener) {\r\n var entrySet = new WeakMap();\r\n function genericListener(change) {\r\n var entry = entrySet.get(change.object);\r\n processChange(change, entry);\r\n listener(change, buildPath(entry), target);\r\n }\r\n function processChange(change, parent) {\r\n switch (change.type) {\r\n // Object changes\r\n case \"add\": // also for map\r\n observeRecursively(change.newValue, parent, change.name);\r\n break;\r\n case \"update\": // also for array and map\r\n unobserveRecursively(change.oldValue);\r\n observeRecursively(change.newValue, parent, change.name || \"\" + change.index);\r\n break;\r\n case \"remove\": // object\r\n case \"delete\": // map\r\n unobserveRecursively(change.oldValue);\r\n break;\r\n // Array changes\r\n case \"splice\":\r\n change.removed.map(unobserveRecursively);\r\n change.added.forEach(function (value, idx) {\r\n return observeRecursively(value, parent, \"\" + (change.index + idx));\r\n });\r\n // update paths\r\n for (var i = change.index + change.addedCount; i < change.object.length; i++) {\r\n if (isRecursivelyObservable(change.object[i])) {\r\n var entry = entrySet.get(change.object[i]);\r\n if (entry)\r\n entry.path = \"\" + i;\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n function observeRecursively(thing, parent, path) {\r\n if (isRecursivelyObservable(thing)) {\r\n var entry = entrySet.get(thing);\r\n if (entry) {\r\n if (entry.parent !== parent || entry.path !== path)\r\n // MWE: this constraint is artificial, and this tool could be made to work with cycles,\r\n // but it increases administration complexity, has tricky edge cases and the meaning of 'path'\r\n // would become less clear. So doesn't seem to be needed for now\r\n throw new Error(\"The same observable object cannot appear twice in the same tree,\" +\r\n (\" trying to assign it to '\" + buildPath(parent) + \"/\" + path + \"',\") +\r\n (\" but it already exists at '\" + buildPath(entry.parent) + \"/\" + entry.path + \"'\"));\r\n }\r\n else {\r\n var entry_1 = {\r\n parent: parent,\r\n path: path,\r\n dispose: (0,mobx__WEBPACK_IMPORTED_MODULE_0__.observe)(thing, genericListener),\r\n };\r\n entrySet.set(thing, entry_1);\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.entries)(thing).forEach(function (_a) {\r\n var key = _a[0], value = _a[1];\r\n return observeRecursively(value, entry_1, key);\r\n });\r\n }\r\n }\r\n }\r\n function unobserveRecursively(thing) {\r\n if (isRecursivelyObservable(thing)) {\r\n var entry = entrySet.get(thing);\r\n if (!entry)\r\n return;\r\n entrySet.delete(thing);\r\n entry.dispose();\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.values)(thing).forEach(unobserveRecursively);\r\n }\r\n }\r\n observeRecursively(target, undefined, \"\");\r\n return function () {\r\n unobserveRecursively(target);\r\n };\r\n}\n\nvar __extends = ( false) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\n/**\r\n * Reactively sorts a base observable array into multiple observable arrays based on the value of a\r\n * `groupBy: (item: T) => G` function.\r\n *\r\n * This observes the individual computed groupBy values and only updates the source and dest arrays\r\n * when there is an actual change, so this is far more efficient than, for example\r\n * `base.filter(i => groupBy(i) === 'we')`. Call #dispose() to stop tracking.\r\n *\r\n * No guarantees are made about the order of items in the grouped arrays.\r\n *\r\n * The resulting map of arrays is read-only. clear(), set(), delete() are not supported and\r\n * modifying the group arrays will lead to undefined behavior.\r\n *\r\n * NB: ObservableGroupMap relies on `Symbol`s. If you are targeting a platform which doesn't\r\n * support these natively, you will need to provide a polyfill.\r\n *\r\n * @param {array} base The array to sort into groups.\r\n * @param {function} groupBy The function used for grouping.\r\n * @param options Object with properties:\r\n * `name`: Debug name of this ObservableGroupMap.\r\n * `keyToName`: Function to create the debug names of the observable group arrays.\r\n *\r\n * @example\r\n * const slices = observable([\r\n * { day: \"mo\", hours: 12 },\r\n * { day: \"tu\", hours: 2 },\r\n * ])\r\n * const slicesByDay = new ObservableGroupMap(slices, (slice) => slice.day)\r\n * autorun(() => console.log(\r\n * slicesByDay.get(\"mo\")?.length ?? 0,\r\n * slicesByDay.get(\"we\"))) // outputs 1, undefined\r\n * slices[0].day = \"we\" // outputs 0, [{ day: \"we\", hours: 12 }]\r\n */\r\nvar ObservableGroupMap = /** @class */ (function (_super) {\r\n __extends(ObservableGroupMap, _super);\r\n function ObservableGroupMap(base, groupBy, _a) {\r\n var _b = _a === void 0 ? {} : _a, _c = _b.name, name = _c === void 0 ? \"ogm\" + ((Math.random() * 1000) | 0) : _c, _d = _b.keyToName, keyToName = _d === void 0 ? function (x) { return \"\" + x; } : _d;\r\n var _this = _super.call(this) || this;\r\n /**\r\n * Base observable array which is being sorted into groups.\r\n */\r\n Object.defineProperty(_this, \"_base\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n /**\r\n * The ObservableGroupMap needs to track some state per-item. This is the name/symbol of the\r\n * property used to attach the state.\r\n */\r\n Object.defineProperty(_this, \"_ogmInfoKey\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n /**\r\n * The function used to group the items.\r\n */\r\n Object.defineProperty(_this, \"_groupBy\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n /**\r\n * This function is used to generate the mobx debug names of the observable group arrays.\r\n */\r\n Object.defineProperty(_this, \"_keyToName\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n Object.defineProperty(_this, \"_disposeBaseObserver\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n _this._keyToName = keyToName;\r\n _this._groupBy = groupBy;\r\n _this._ogmInfoKey = Symbol(\"ogmInfo\" + name);\r\n _this._base = base;\r\n for (var i = 0; i < base.length; i++) {\r\n _this._addItem(base[i]);\r\n }\r\n _this._disposeBaseObserver = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.observe)(_this._base, function (change) {\r\n if (\"splice\" === change.type) {\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.transaction)(function () {\r\n for (var _i = 0, _a = change.removed; _i < _a.length; _i++) {\r\n var removed = _a[_i];\r\n _this._removeItem(removed);\r\n }\r\n for (var _b = 0, _c = change.added; _b < _c.length; _b++) {\r\n var added = _c[_b];\r\n _this._addItem(added);\r\n }\r\n });\r\n }\r\n else if (\"update\" === change.type) {\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.transaction)(function () {\r\n _this._removeItem(change.oldValue);\r\n _this._addItem(change.newValue);\r\n });\r\n }\r\n else {\r\n throw new Error(\"illegal state\");\r\n }\r\n });\r\n return _this;\r\n }\r\n Object.defineProperty(ObservableGroupMap.prototype, \"clear\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n throw new Error(\"not supported\");\r\n }\r\n });\r\n Object.defineProperty(ObservableGroupMap.prototype, \"delete\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (_key) {\r\n throw new Error(\"not supported\");\r\n }\r\n });\r\n Object.defineProperty(ObservableGroupMap.prototype, \"set\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (_key, _value) {\r\n throw new Error(\"not supported\");\r\n }\r\n });\r\n /**\r\n * Disposes all observers created during construction and removes state added to base array\r\n * items.\r\n */\r\n Object.defineProperty(ObservableGroupMap.prototype, \"dispose\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n this._disposeBaseObserver();\r\n for (var i = 0; i < this._base.length; i++) {\r\n var item = this._base[i];\r\n var grouperItemInfo = item[this._ogmInfoKey];\r\n grouperItemInfo.reaction();\r\n delete item[this._ogmInfoKey];\r\n }\r\n }\r\n });\r\n Object.defineProperty(ObservableGroupMap.prototype, \"_getGroupArr\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (key) {\r\n var result = _super.prototype.get.call(this, key);\r\n if (undefined === result) {\r\n result = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.observable)([], { name: \"GroupArray[\" + this._keyToName(key) + \"]\", deep: false });\r\n _super.prototype.set.call(this, key, result);\r\n }\r\n return result;\r\n }\r\n });\r\n Object.defineProperty(ObservableGroupMap.prototype, \"_removeFromGroupArr\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (key, itemIndex) {\r\n var arr = _super.prototype.get.call(this, key);\r\n if (1 === arr.length) {\r\n _super.prototype.delete.call(this, key);\r\n }\r\n else if (itemIndex === arr.length - 1) {\r\n // last position in array\r\n arr.length--;\r\n }\r\n else {\r\n arr[itemIndex] = arr[arr.length - 1];\r\n arr[itemIndex][this._ogmInfoKey].groupArrIndex = itemIndex;\r\n arr.length--;\r\n }\r\n }\r\n });\r\n Object.defineProperty(ObservableGroupMap.prototype, \"_addItem\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (item) {\r\n var _this = this;\r\n var groupByValue = this._groupBy(item);\r\n var groupArr = this._getGroupArr(groupByValue);\r\n var value = {\r\n groupByValue: groupByValue,\r\n groupArrIndex: groupArr.length,\r\n reaction: (0,mobx__WEBPACK_IMPORTED_MODULE_0__.reaction)(function () { return _this._groupBy(item); }, function (newGroupByValue, _r) {\r\n var grouperItemInfo = item[_this._ogmInfoKey];\r\n _this._removeFromGroupArr(grouperItemInfo.groupByValue, grouperItemInfo.groupArrIndex);\r\n var newGroupArr = _this._getGroupArr(newGroupByValue);\r\n var newGroupArrIndex = newGroupArr.length;\r\n newGroupArr.push(item);\r\n grouperItemInfo.groupByValue = newGroupByValue;\r\n grouperItemInfo.groupArrIndex = newGroupArrIndex;\r\n }),\r\n };\r\n Object.defineProperty(item, this._ogmInfoKey, {\r\n configurable: true,\r\n enumerable: false,\r\n value: value,\r\n });\r\n groupArr.push(item);\r\n }\r\n });\r\n Object.defineProperty(ObservableGroupMap.prototype, \"_removeItem\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (item) {\r\n var grouperItemInfo = item[this._ogmInfoKey];\r\n this._removeFromGroupArr(grouperItemInfo.groupByValue, grouperItemInfo.groupArrIndex);\r\n grouperItemInfo.reaction();\r\n delete item[this._ogmInfoKey];\r\n }\r\n });\r\n return ObservableGroupMap;\r\n}(mobx__WEBPACK_IMPORTED_MODULE_0__.ObservableMap));\n\n/**\r\n * @private\r\n */\r\nvar DeepMapEntry = /** @class */ (function () {\r\n function DeepMapEntry(base, args) {\r\n Object.defineProperty(this, \"base\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: base\r\n });\r\n Object.defineProperty(this, \"args\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: args\r\n });\r\n Object.defineProperty(this, \"root\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n Object.defineProperty(this, \"closest\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n Object.defineProperty(this, \"closestIdx\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: 0\r\n });\r\n Object.defineProperty(this, \"isDisposed\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: false\r\n });\r\n var current = (this.closest = this.root = base);\r\n var i = 0;\r\n for (; i < this.args.length - 1; i++) {\r\n current = current.get(args[i]);\r\n if (current)\r\n this.closest = current;\r\n else\r\n break;\r\n }\r\n this.closestIdx = i;\r\n }\r\n Object.defineProperty(DeepMapEntry.prototype, \"exists\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n this.assertNotDisposed();\r\n var l = this.args.length;\r\n return this.closestIdx >= l - 1 && this.closest.has(this.args[l - 1]);\r\n }\r\n });\r\n Object.defineProperty(DeepMapEntry.prototype, \"get\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n this.assertNotDisposed();\r\n if (!this.exists())\r\n throw new Error(\"Entry doesn't exist\");\r\n return this.closest.get(this.args[this.args.length - 1]);\r\n }\r\n });\r\n Object.defineProperty(DeepMapEntry.prototype, \"set\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (value) {\r\n this.assertNotDisposed();\r\n var l = this.args.length;\r\n var current = this.closest;\r\n // create remaining maps\r\n for (var i = this.closestIdx; i < l - 1; i++) {\r\n var m = new Map();\r\n current.set(this.args[i], m);\r\n current = m;\r\n }\r\n this.closestIdx = l - 1;\r\n this.closest = current;\r\n current.set(this.args[l - 1], value);\r\n }\r\n });\r\n Object.defineProperty(DeepMapEntry.prototype, \"delete\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n this.assertNotDisposed();\r\n if (!this.exists())\r\n throw new Error(\"Entry doesn't exist\");\r\n var l = this.args.length;\r\n this.closest.delete(this.args[l - 1]);\r\n // clean up remaining maps if needed (reconstruct stack first)\r\n var c = this.root;\r\n var maps = [c];\r\n for (var i = 0; i < l - 1; i++) {\r\n c = c.get(this.args[i]);\r\n maps.push(c);\r\n }\r\n for (var i = maps.length - 1; i > 0; i--) {\r\n if (maps[i].size === 0)\r\n maps[i - 1].delete(this.args[i - 1]);\r\n }\r\n this.isDisposed = true;\r\n }\r\n });\r\n Object.defineProperty(DeepMapEntry.prototype, \"assertNotDisposed\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function () {\r\n // TODO: once this becomes annoying, we should introduce a reset method to re-run the constructor logic\r\n if (this.isDisposed)\r\n throw new Error(\"Concurrent modification exception\");\r\n }\r\n });\r\n return DeepMapEntry;\r\n}());\r\n/**\r\n * @private\r\n */\r\nvar DeepMap = /** @class */ (function () {\r\n function DeepMap() {\r\n Object.defineProperty(this, \"store\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: new Map()\r\n });\r\n Object.defineProperty(this, \"argsLength\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: -1\r\n });\r\n Object.defineProperty(this, \"last\", {\r\n enumerable: true,\r\n configurable: true,\r\n writable: true,\r\n value: void 0\r\n });\r\n }\r\n Object.defineProperty(DeepMap.prototype, \"entry\", {\r\n enumerable: false,\r\n configurable: true,\r\n writable: true,\r\n value: function (args) {\r\n if (this.argsLength === -1)\r\n this.argsLength = args.length;\r\n else if (this.argsLength !== args.length)\r\n throw new Error(\"DeepMap should be used with functions with a consistent length, expected: \" + this.argsLength + \", got: \" + args.length);\r\n if (this.last)\r\n this.last.isDisposed = true;\r\n return (this.last = new DeepMapEntry(this.store, args));\r\n }\r\n });\r\n return DeepMap;\r\n}());\n\nvar __assign$2 = ( false) || function () {\r\n __assign$2 = Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign$2.apply(this, arguments);\r\n};\r\n/**\r\n * computedFn takes a function with an arbitrary amount of arguments,\r\n * and memoizes the output of the function based on the arguments passed in.\r\n *\r\n * computedFn(fn) returns a function with the very same signature. There is no limit on the amount of arguments\r\n * that is accepted. However, the amount of arguments must be constant and default arguments are not supported.\r\n *\r\n * By default the output of a function call will only be memoized as long as the\r\n * output is being observed.\r\n *\r\n * The function passes into `computedFn` should be pure, not be an action and only be relying on\r\n * observables.\r\n *\r\n * Setting `keepAlive` to `true` will cause the output to be forcefully cached forever.\r\n * Note that this might introduce memory leaks!\r\n *\r\n * @example\r\n * const store = observable({\r\n a: 1,\r\n b: 2,\r\n c: 3,\r\n m: computedFn(function(x) {\r\n return this.a * this.b * x\r\n })\r\n })\r\n\r\n const d = autorun(() => {\r\n // store.m(3) will be cached as long as this autorun is running\r\n console.log(store.m(3) * store.c)\r\n })\r\n *\r\n * @param fn\r\n * @param keepAliveOrOptions\r\n */\r\nfunction computedFn(fn, keepAliveOrOptions) {\r\n if (keepAliveOrOptions === void 0) { keepAliveOrOptions = false; }\r\n if ((0,mobx__WEBPACK_IMPORTED_MODULE_0__.isAction)(fn))\r\n throw new Error(\"computedFn shouldn't be used on actions\");\r\n var memoWarned = false;\r\n var i = 0;\r\n var opts = typeof keepAliveOrOptions === \"boolean\"\r\n ? { keepAlive: keepAliveOrOptions }\r\n : keepAliveOrOptions;\r\n var d = new DeepMap();\r\n return function () {\r\n var _this = this;\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var entry = d.entry(args);\r\n // cache hit, return\r\n if (entry.exists())\r\n return entry.get().get();\r\n // if function is invoked, and its a cache miss without reactive, there is no point in caching...\r\n if (!opts.keepAlive && !(0,mobx__WEBPACK_IMPORTED_MODULE_0__._isComputingDerivation)()) {\r\n if (!memoWarned) {\r\n console.warn(\"invoking a computedFn from outside an reactive context won't be memoized, unless keepAlive is set\");\r\n memoWarned = true;\r\n }\r\n return fn.apply(this, args);\r\n }\r\n // create new entry\r\n var c = (0,mobx__WEBPACK_IMPORTED_MODULE_0__.computed)(function () {\r\n return fn.apply(_this, args);\r\n }, __assign$2(__assign$2({}, opts), { name: \"computedFn(\" + (opts.name || fn.name) + \"#\" + ++i + \")\" }));\r\n entry.set(c);\r\n // clean up if no longer observed\r\n if (!opts.keepAlive)\r\n (0,mobx__WEBPACK_IMPORTED_MODULE_0__.onBecomeUnobserved)(c, function () {\r\n d.entry(args).delete();\r\n });\r\n // return current val\r\n return c.get();\r\n };\r\n}\n\n\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx-utils/mobx-utils.module.js?");
18592
18592
 
18593
18593
  /***/ }),
18594
18594
 
@@ -18599,7 +18599,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
18599
18599
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18600
18600
 
18601
18601
  "use strict";
18602
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"$mobx\": () => (/* binding */ $mobx),\n/* harmony export */ \"FlowCancellationError\": () => (/* binding */ FlowCancellationError),\n/* harmony export */ \"ObservableMap\": () => (/* binding */ ObservableMap),\n/* harmony export */ \"ObservableSet\": () => (/* binding */ ObservableSet),\n/* harmony export */ \"Reaction\": () => (/* binding */ Reaction),\n/* harmony export */ \"_allowStateChanges\": () => (/* binding */ allowStateChanges),\n/* harmony export */ \"_allowStateChangesInsideComputed\": () => (/* binding */ runInAction),\n/* harmony export */ \"_allowStateReadsEnd\": () => (/* binding */ allowStateReadsEnd),\n/* harmony export */ \"_allowStateReadsStart\": () => (/* binding */ allowStateReadsStart),\n/* harmony export */ \"_autoAction\": () => (/* binding */ autoAction),\n/* harmony export */ \"_endAction\": () => (/* binding */ _endAction),\n/* harmony export */ \"_getAdministration\": () => (/* binding */ getAdministration),\n/* harmony export */ \"_getGlobalState\": () => (/* binding */ getGlobalState),\n/* harmony export */ \"_interceptReads\": () => (/* binding */ interceptReads),\n/* harmony export */ \"_isComputingDerivation\": () => (/* binding */ isComputingDerivation),\n/* harmony export */ \"_resetGlobalState\": () => (/* binding */ resetGlobalState),\n/* harmony export */ \"_startAction\": () => (/* binding */ _startAction),\n/* harmony export */ \"action\": () => (/* binding */ action),\n/* harmony export */ \"autorun\": () => (/* binding */ autorun),\n/* harmony export */ \"comparer\": () => (/* binding */ comparer),\n/* harmony export */ \"computed\": () => (/* binding */ computed),\n/* harmony export */ \"configure\": () => (/* binding */ configure),\n/* harmony export */ \"createAtom\": () => (/* binding */ createAtom),\n/* harmony export */ \"defineProperty\": () => (/* binding */ apiDefineProperty),\n/* harmony export */ \"entries\": () => (/* binding */ entries),\n/* harmony export */ \"extendObservable\": () => (/* binding */ extendObservable),\n/* harmony export */ \"flow\": () => (/* binding */ flow),\n/* harmony export */ \"flowResult\": () => (/* binding */ flowResult),\n/* harmony export */ \"get\": () => (/* binding */ get),\n/* harmony export */ \"getAtom\": () => (/* binding */ getAtom),\n/* harmony export */ \"getDebugName\": () => (/* binding */ getDebugName),\n/* harmony export */ \"getDependencyTree\": () => (/* binding */ getDependencyTree),\n/* harmony export */ \"getObserverTree\": () => (/* binding */ getObserverTree),\n/* harmony export */ \"has\": () => (/* binding */ has),\n/* harmony export */ \"intercept\": () => (/* binding */ intercept),\n/* harmony export */ \"isAction\": () => (/* binding */ isAction),\n/* harmony export */ \"isBoxedObservable\": () => (/* binding */ isObservableValue),\n/* harmony export */ \"isComputed\": () => (/* binding */ isComputed),\n/* harmony export */ \"isComputedProp\": () => (/* binding */ isComputedProp),\n/* harmony export */ \"isFlow\": () => (/* binding */ isFlow),\n/* harmony export */ \"isFlowCancellationError\": () => (/* binding */ isFlowCancellationError),\n/* harmony export */ \"isObservable\": () => (/* binding */ isObservable),\n/* harmony export */ \"isObservableArray\": () => (/* binding */ isObservableArray),\n/* harmony export */ \"isObservableMap\": () => (/* binding */ isObservableMap),\n/* harmony export */ \"isObservableObject\": () => (/* binding */ isObservableObject),\n/* harmony export */ \"isObservableProp\": () => (/* binding */ isObservableProp),\n/* harmony export */ \"isObservableSet\": () => (/* binding */ isObservableSet),\n/* harmony export */ \"keys\": () => (/* binding */ keys),\n/* harmony export */ \"makeAutoObservable\": () => (/* binding */ makeAutoObservable),\n/* harmony export */ \"makeObservable\": () => (/* binding */ makeObservable),\n/* harmony export */ \"observable\": () => (/* binding */ observable),\n/* harmony export */ \"observe\": () => (/* binding */ observe),\n/* harmony export */ \"onBecomeObserved\": () => (/* binding */ onBecomeObserved),\n/* harmony export */ \"onBecomeUnobserved\": () => (/* binding */ onBecomeUnobserved),\n/* harmony export */ \"onReactionError\": () => (/* binding */ onReactionError),\n/* harmony export */ \"override\": () => (/* binding */ override),\n/* harmony export */ \"ownKeys\": () => (/* binding */ apiOwnKeys),\n/* harmony export */ \"reaction\": () => (/* binding */ reaction),\n/* harmony export */ \"remove\": () => (/* binding */ remove),\n/* harmony export */ \"runInAction\": () => (/* binding */ runInAction),\n/* harmony export */ \"set\": () => (/* binding */ set),\n/* harmony export */ \"spy\": () => (/* binding */ spy),\n/* harmony export */ \"toJS\": () => (/* binding */ toJS),\n/* harmony export */ \"trace\": () => (/* binding */ trace),\n/* harmony export */ \"transaction\": () => (/* binding */ transaction),\n/* harmony export */ \"untracked\": () => (/* binding */ untracked),\n/* harmony export */ \"values\": () => (/* binding */ values),\n/* harmony export */ \"when\": () => (/* binding */ when)\n/* harmony export */ });\nvar niceErrors = {\n 0: \"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'\",\n 1: function _(annotationType, key) {\n return \"Cannot apply '\" + annotationType + \"' to '\" + key.toString() + \"': Field not found.\";\n },\n\n /*\r\n 2(prop) {\r\n return `invalid decorator for '${prop.toString()}'`\r\n },\r\n 3(prop) {\r\n return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.`\r\n },\r\n 4(prop) {\r\n return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.`\r\n },\r\n */\n 5: \"'keys()' can only be used on observable objects, arrays, sets and maps\",\n 6: \"'values()' can only be used on observable objects, arrays, sets and maps\",\n 7: \"'entries()' can only be used on observable objects, arrays and maps\",\n 8: \"'set()' can only be used on observable objects, arrays and maps\",\n 9: \"'remove()' can only be used on observable objects, arrays and maps\",\n 10: \"'has()' can only be used on observable objects, arrays and maps\",\n 11: \"'get()' can only be used on observable objects, arrays and maps\",\n 12: \"Invalid annotation\",\n 13: \"Dynamic observable objects cannot be frozen\",\n 14: \"Intercept handlers should return nothing or a change object\",\n 15: \"Observable arrays cannot be frozen\",\n 16: \"Modification exception: the internal structure of an observable array was changed.\",\n 17: function _(index, length) {\n return \"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + length;\n },\n 18: \"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\",\n 19: function _(other) {\n return \"Cannot initialize from classes that inherit from Map: \" + other.constructor.name;\n },\n 20: function _(other) {\n return \"Cannot initialize map from \" + other;\n },\n 21: function _(dataStructure) {\n return \"Cannot convert to map from '\" + dataStructure + \"'\";\n },\n 22: \"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\",\n 23: \"It is not possible to get index atoms from arrays\",\n 24: function _(thing) {\n return \"Cannot obtain administration from \" + thing;\n },\n 25: function _(property, name) {\n return \"the entry '\" + property + \"' does not exist in the observable map '\" + name + \"'\";\n },\n 26: \"please specify a property\",\n 27: function _(property, name) {\n return \"no observable property '\" + property.toString() + \"' found on the observable object '\" + name + \"'\";\n },\n 28: function _(thing) {\n return \"Cannot obtain atom from \" + thing;\n },\n 29: \"Expecting some object\",\n 30: \"invalid action stack. did you forget to finish an action?\",\n 31: \"missing option for computed: get\",\n 32: function _(name, derivation) {\n return \"Cycle detected in computation \" + name + \": \" + derivation;\n },\n 33: function _(name) {\n return \"The setter of computed value '\" + name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\";\n },\n 34: function _(name) {\n return \"[ComputedValue '\" + name + \"'] It is not possible to assign a new value to a computed value.\";\n },\n 35: \"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\",\n 36: \"isolateGlobalState should be called before MobX is running any reactions\",\n 37: function _(method) {\n return \"[mobx] `observableArray.\" + method + \"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice().\" + method + \"()` instead\";\n },\n 38: \"'ownKeys()' can only be used on observable objects\",\n 39: \"'defineProperty()' can only be used on observable objects\"\n};\nvar errors = true ? niceErrors : 0;\nfunction die(error) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (true) {\n var e = typeof error === \"string\" ? error : errors[error];\n if (typeof e === \"function\") e = e.apply(null, args);\n throw new Error(\"[MobX] \" + e);\n }\n\n throw new Error(typeof error === \"number\" ? \"[MobX] minified error nr: \" + error + (args.length ? \" \" + args.map(String).join(\",\") : \"\") + \". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts\" : \"[MobX] \" + error);\n}\n\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n\n if (typeof window !== \"undefined\") {\n return window;\n }\n\n if (typeof global !== \"undefined\") {\n return global;\n }\n\n if (typeof self !== \"undefined\") {\n return self;\n }\n\n return mockGlobal;\n}\n\nvar assign = Object.assign;\nvar getDescriptor = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar objectPrototype = Object.prototype;\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nvar hasProxy = typeof Proxy !== \"undefined\";\nvar plainObjectString = /*#__PURE__*/Object.toString();\nfunction assertProxies() {\n if (!hasProxy) {\n die( true ? \"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`\" : 0);\n }\n}\nfunction warnAboutProxyRequirement(msg) {\n if ( true && globalState.verifyProxies) {\n die(\"MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to \" + msg);\n }\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\n/**\r\n * Makes sure that the provided function is invoked at most once.\r\n */\n\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked) return;\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function noop() {};\nfunction isFunction(fn) {\n return typeof fn === \"function\";\n}\nfunction isStringish(value) {\n var t = typeof value;\n\n switch (t) {\n case \"string\":\n case \"symbol\":\n case \"number\":\n return true;\n }\n\n return false;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n var _proto$constructor;\n\n if (!isObject(value)) return false;\n var proto = Object.getPrototypeOf(value);\n if (proto == null) return true;\n return ((_proto$constructor = proto.constructor) == null ? void 0 : _proto$constructor.toString()) === plainObjectString;\n} // https://stackoverflow.com/a/37865170\n\nfunction isGenerator(obj) {\n var constructor = obj == null ? void 0 : obj.constructor;\n if (!constructor) return false;\n if (\"GeneratorFunction\" === constructor.name || \"GeneratorFunction\" === constructor.displayName) return true;\n return false;\n}\nfunction addHiddenProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction createInstanceofPredicate(name, theClass) {\n var propName = \"isMobX\" + name;\n theClass.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\nfunction isES6Map(thing) {\n return thing instanceof Map;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\nvar hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== \"undefined\";\n/**\r\n * Returns the following: own enumerable keys and symbols.\r\n */\n\nfunction getPlainObjectKeys(object) {\n var keys = Object.keys(object); // Not supported in IE, so there are not going to be symbol props anyway...\n\n if (!hasGetOwnPropertySymbols) return keys;\n var symbols = Object.getOwnPropertySymbols(object);\n if (!symbols.length) return keys;\n return [].concat(keys, symbols.filter(function (s) {\n return objectPrototype.propertyIsEnumerable.call(object, s);\n }));\n} // From Immer utils\n// Returns all own keys, including non-enumerable and symbolic\n\nvar ownKeys = typeof Reflect !== \"undefined\" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {\n return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));\n} :\n/* istanbul ignore next */\nObject.getOwnPropertyNames;\nfunction stringifyKey(key) {\n if (typeof key === \"string\") return key;\n if (typeof key === \"symbol\") return key.toString();\n return new String(key).toString();\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\nfunction hasProp(target, prop) {\n return objectPrototype.hasOwnProperty.call(target, prop);\n} // From Immer utils\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(target) {\n // Polyfill needed for Hermes and IE, see https://github.com/facebook/hermes/issues/274\n var res = {}; // Note: without polyfill for ownKeys, symbols won't be picked up\n\n ownKeys(target).forEach(function (key) {\n res[key] = getDescriptor(target, key);\n });\n return res;\n};\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n}\n\nvar storedAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-stored-annotations\");\n/**\r\n * Creates a function that acts as\r\n * - decorator\r\n * - annotation object\r\n */\n\nfunction createDecoratorAnnotation(annotation) {\n function decorator(target, property) {\n storeAnnotation(target, property, annotation);\n }\n\n return Object.assign(decorator, annotation);\n}\n/**\r\n * Stores annotation to prototype,\r\n * so it can be inspected later by `makeObservable` called from constructor\r\n */\n\nfunction storeAnnotation(prototype, key, annotation) {\n if (!hasProp(prototype, storedAnnotationsSymbol)) {\n addHiddenProp(prototype, storedAnnotationsSymbol, _extends({}, prototype[storedAnnotationsSymbol]));\n } // @override must override something\n\n\n if ( true && isOverride(annotation) && !hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n die(\"'\" + fieldName + \"' is decorated with 'override', \" + \"but no such decorated member was found on prototype.\");\n } // Cannot re-decorate\n\n\n assertNotDecorated(prototype, annotation, key); // Ignore override\n\n if (!isOverride(annotation)) {\n prototype[storedAnnotationsSymbol][key] = annotation;\n }\n}\n\nfunction assertNotDecorated(prototype, annotation, key) {\n if ( true && !isOverride(annotation) && hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '@\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already decorated with '@\" + currentAnnotationType + \"'.\") + \"\\nRe-decorating fields is not allowed.\" + \"\\nUse '@override' decorator for methods overriden by subclass.\");\n }\n}\n/**\r\n * Collects annotations from prototypes and stores them on target (instance)\r\n */\n\n\nfunction collectStoredAnnotations(target) {\n if (!hasProp(target, storedAnnotationsSymbol)) {\n if ( true && !target[storedAnnotationsSymbol]) {\n die(\"No annotations were passed to makeObservable, but no decorated members have been found either\");\n } // We need a copy as we will remove annotation from the list once it's applied.\n\n\n addHiddenProp(target, storedAnnotationsSymbol, _extends({}, target[storedAnnotationsSymbol]));\n }\n\n return target[storedAnnotationsSymbol];\n}\n\nvar $mobx = /*#__PURE__*/Symbol(\"mobx administration\");\nvar Atom = /*#__PURE__*/function () {\n // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n\n /**\r\n * Create a new atom. For debugging purposes it is recommended to give it a name.\r\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\r\n */\n function Atom(name_) {\n if (name_ === void 0) {\n name_ = true ? \"Atom@\" + getNextId() : 0;\n }\n\n this.name_ = void 0;\n this.isPendingUnobservation_ = false;\n this.isBeingObserved_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.NOT_TRACKING_;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n this.name_ = name_;\n } // onBecomeObservedListeners\n\n\n var _proto = Atom.prototype;\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Invoke this method to notify mobx that your atom has been used somehow.\r\n * Returns true if there is currently a reactive context.\r\n */\n ;\n\n _proto.reportObserved = function reportObserved$1() {\n return reportObserved(this);\n }\n /**\r\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\r\n */\n ;\n\n _proto.reportChanged = function reportChanged() {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n\n _proto.toString = function toString() {\n return this.name_;\n };\n\n return Atom;\n}();\nvar isAtom = /*#__PURE__*/createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) {\n onBecomeObservedHandler = noop;\n }\n\n if (onBecomeUnobservedHandler === void 0) {\n onBecomeUnobservedHandler = noop;\n }\n\n var atom = new Atom(name); // default `noop` listener will not initialize the hook Set\n\n if (onBecomeObservedHandler !== noop) {\n onBecomeObserved(atom, onBecomeObservedHandler);\n }\n\n if (onBecomeUnobservedHandler !== noop) {\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n }\n\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\n\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\n\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\n\nfunction defaultComparer(a, b) {\n if (Object.is) return Object.is(a, b);\n return a === b ? a !== 0 || 1 / a === 1 / b : a !== a && b !== b;\n}\n\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n \"default\": defaultComparer,\n shallow: shallowComparer\n};\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v)) return v; // something that can be converted and mutated?\n\n if (Array.isArray(v)) return observable.array(v, {\n name: name\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name\n });\n\n if (typeof v === \"function\" && !isAction(v) && !isFlow(v)) {\n if (isGenerator(v)) {\n return flow(v);\n } else {\n return autoAction(name, v);\n }\n }\n\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null) return v;\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v)) return v;\n if (Array.isArray(v)) return observable.array(v, {\n name: name,\n deep: false\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name,\n deep: false\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name,\n deep: false\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name,\n deep: false\n });\n if (true) die(\"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue) {\n if ( true && isObservable(v)) die(\"observable.struct should not be used with observable values\");\n if (deepEqual(v, oldValue)) return oldValue;\n return v;\n}\n\nvar OVERRIDE = \"override\";\nvar override = /*#__PURE__*/createDecoratorAnnotation({\n annotationType_: OVERRIDE,\n make_: make_,\n extend_: extend_\n});\nfunction isOverride(annotation) {\n return annotation.annotationType_ === OVERRIDE;\n}\n\nfunction make_(adm, key) {\n // Must not be plain object\n if ( true && adm.isPlainObject_) {\n die(\"Cannot apply '\" + this.annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + this.annotationType_ + \"' cannot be used on plain objects.\"));\n } // Must override something\n\n\n if ( true && !hasProp(adm.appliedAnnotations_, key)) {\n die(\"'\" + adm.name_ + \".\" + key.toString() + \"' is annotated with '\" + this.annotationType_ + \"', \" + \"but no such annotated member was found on prototype.\");\n }\n\n return 0\n /* Cancel */\n ;\n}\n\nfunction extend_(adm, key, descriptor, proxyTrap) {\n die(\"'\" + this.annotationType_ + \"' can only be used with 'makeObservable'\");\n}\n\nfunction createActionAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$1,\n extend_: extend_$1\n };\n}\n\nfunction make_$1(adm, key, descriptor, source) {\n var _this$options_;\n\n // bound\n if ((_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n } // own\n\n\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // prototype\n\n\n if (isAction(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1\n /* Break */\n ;\n }\n\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false);\n defineProperty(source, key, actionDescriptor);\n return 2\n /* Continue */\n ;\n}\n\nfunction extend_$1(adm, key, descriptor, proxyTrap) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, actionDescriptor, proxyTrap);\n}\n\nfunction assertActionDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if ( true && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a function value.\"));\n }\n}\n\nfunction createActionDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n var _annotation$options_, _annotation$options_$, _annotation$options_2, _annotation$options_$2, _annotation$options_3, _annotation$options_4, _adm$proxy_2;\n\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertActionDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n\n if ((_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.bound) {\n var _adm$proxy_;\n\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return {\n value: createAction((_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), value, (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false, // https://github.com/mobxjs/mobx/discussions/3140\n ((_annotation$options_4 = annotation.options_) == null ? void 0 : _annotation$options_4.bound) ? (_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_ : undefined),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createFlowAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$2,\n extend_: extend_$2\n };\n}\n\nfunction make_$2(adm, key, descriptor, source) {\n var _this$options_;\n\n // own\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // prototype\n // bound - must annotate protos to support super.flow()\n\n\n if (((_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) && !isFlow(adm.target_[key])) {\n if (this.extend_(adm, key, descriptor, false) === null) return 0\n /* Cancel */\n ;\n }\n\n if (isFlow(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1\n /* Break */\n ;\n }\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false, false);\n defineProperty(source, key, flowDescriptor);\n return 2\n /* Continue */\n ;\n}\n\nfunction extend_$2(adm, key, descriptor, proxyTrap) {\n var _this$options_2;\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, (_this$options_2 = this.options_) == null ? void 0 : _this$options_2.bound);\n return adm.defineProperty_(key, flowDescriptor, proxyTrap);\n}\n\nfunction assertFlowDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if ( true && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a generator function value.\"));\n }\n}\n\nfunction createFlowDescriptor(adm, annotation, key, descriptor, bound, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertFlowDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n\n if (bound) {\n var _adm$proxy_;\n\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return {\n value: flow(value),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createComputedAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$3,\n extend_: extend_$3\n };\n}\n\nfunction make_$3(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n}\n\nfunction extend_$3(adm, key, descriptor, proxyTrap) {\n assertComputedDescriptor(adm, this, key, descriptor);\n return adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }), proxyTrap);\n}\n\nfunction assertComputedDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var get = _ref2.get;\n\n if ( true && !get) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on getter(+setter) properties.\"));\n }\n}\n\nfunction createObservableAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$4,\n extend_: extend_$4\n };\n}\n\nfunction make_$4(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n}\n\nfunction extend_$4(adm, key, descriptor, proxyTrap) {\n var _this$options_$enhanc, _this$options_;\n\n assertObservableDescriptor(adm, this, key, descriptor);\n return adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc = (_this$options_ = this.options_) == null ? void 0 : _this$options_.enhancer) != null ? _this$options_$enhanc : deepEnhancer, proxyTrap);\n}\n\nfunction assertObservableDescriptor(adm, _ref, key, descriptor) {\n var annotationType_ = _ref.annotationType_;\n\n if ( true && !(\"value\" in descriptor)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' cannot be used on getter/setter properties\"));\n }\n}\n\nvar AUTO = \"true\";\nvar autoAnnotation = /*#__PURE__*/createAutoAnnotation();\nfunction createAutoAnnotation(options) {\n return {\n annotationType_: AUTO,\n options_: options,\n make_: make_$5,\n extend_: extend_$5\n };\n}\n\nfunction make_$5(adm, key, descriptor, source) {\n var _this$options_3, _this$options_4;\n\n // getter -> computed\n if (descriptor.get) {\n return computed.make_(adm, key, descriptor, source);\n } // lone setter -> action setter\n\n\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.make_\n var set = createAction(key.toString(), descriptor.set); // own\n\n if (source === adm.target_) {\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: set\n }) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // proto\n\n\n defineProperty(source, key, {\n configurable: true,\n set: set\n });\n return 2\n /* Continue */\n ;\n } // function on proto -> autoAction/flow\n\n\n if (source !== adm.target_ && typeof descriptor.value === \"function\") {\n var _this$options_2;\n\n if (isGenerator(descriptor.value)) {\n var _this$options_;\n\n var flowAnnotation = ((_this$options_ = this.options_) == null ? void 0 : _this$options_.autoBind) ? flow.bound : flow;\n return flowAnnotation.make_(adm, key, descriptor, source);\n }\n\n var actionAnnotation = ((_this$options_2 = this.options_) == null ? void 0 : _this$options_2.autoBind) ? autoAction.bound : autoAction;\n return actionAnnotation.make_(adm, key, descriptor, source);\n } // other -> observable\n // Copy props from proto as well, see test:\n // \"decorate should work with Object.create\"\n\n\n var observableAnnotation = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable; // if function respect autoBind option\n\n if (typeof descriptor.value === \"function\" && ((_this$options_4 = this.options_) == null ? void 0 : _this$options_4.autoBind)) {\n var _adm$proxy_;\n\n descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return observableAnnotation.make_(adm, key, descriptor, source);\n}\n\nfunction extend_$5(adm, key, descriptor, proxyTrap) {\n var _this$options_5, _this$options_6;\n\n // getter -> computed\n if (descriptor.get) {\n return computed.extend_(adm, key, descriptor, proxyTrap);\n } // lone setter -> action setter\n\n\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.extend_\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: createAction(key.toString(), descriptor.set)\n }, proxyTrap);\n } // other -> observable\n // if function respect autoBind option\n\n\n if (typeof descriptor.value === \"function\" && ((_this$options_5 = this.options_) == null ? void 0 : _this$options_5.autoBind)) {\n var _adm$proxy_2;\n\n descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);\n }\n\n var observableAnnotation = ((_this$options_6 = this.options_) == null ? void 0 : _this$options_6.deep) === false ? observable.ref : observable;\n return observableAnnotation.extend_(adm, key, descriptor, proxyTrap);\n}\n\nvar OBSERVABLE = \"observable\";\nvar OBSERVABLE_REF = \"observable.ref\";\nvar OBSERVABLE_SHALLOW = \"observable.shallow\";\nvar OBSERVABLE_STRUCT = \"observable.struct\"; // Predefined bags of create observable options, to avoid allocating temporarily option objects\n// in the majority of cases\n\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined,\n proxy: true\n};\nObject.freeze(defaultCreateObservableOptions);\nfunction asCreateObservableOptions(thing) {\n return thing || defaultCreateObservableOptions;\n}\nvar observableAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE);\nvar observableRefAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_REF, {\n enhancer: referenceEnhancer\n});\nvar observableShallowAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_SHALLOW, {\n enhancer: shallowEnhancer\n});\nvar observableStructAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_STRUCT, {\n enhancer: refStructEnhancer\n});\nvar observableDecoratorAnnotation = /*#__PURE__*/createDecoratorAnnotation(observableAnnotation);\nfunction getEnhancerFromOptions(options) {\n return options.deep === true ? deepEnhancer : options.deep === false ? referenceEnhancer : getEnhancerFromAnnotation(options.defaultDecorator);\n}\nfunction getAnnotationFromOptions(options) {\n var _options$defaultDecor;\n\n return options ? (_options$defaultDecor = options.defaultDecorator) != null ? _options$defaultDecor : createAutoAnnotation(options) : undefined;\n}\nfunction getEnhancerFromAnnotation(annotation) {\n var _annotation$options_$, _annotation$options_;\n\n return !annotation ? deepEnhancer : (_annotation$options_$ = (_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.enhancer) != null ? _annotation$options_$ : deepEnhancer;\n}\n/**\r\n * Turns an object, array or function into a reactive structure.\r\n * @param v the value which should become observable.\r\n */\n\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (isStringish(arg2)) {\n storeAnnotation(v, arg2, observableAnnotation);\n return;\n } // already observable - ignore\n\n\n if (isObservable(v)) return v; // plain object\n\n if (isPlainObject(v)) return observable.object(v, arg2, arg3); // Array\n\n if (Array.isArray(v)) return observable.array(v, arg2); // Map\n\n if (isES6Map(v)) return observable.map(v, arg2); // Set\n\n if (isES6Set(v)) return observable.set(v, arg2); // other object - ignore\n\n if (typeof v === \"object\" && v !== null) return v; // anything else\n\n return observable.box(v, arg2);\n}\n\nObject.assign(createObservable, observableDecoratorAnnotation);\nvar observableFactories = {\n box: function box(value, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n array: function array(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return (globalState.useProxies === false || o.proxy === false ? createLegacyArray : createObservableArray)(initialValues, getEnhancerFromOptions(o), o.name);\n },\n map: function map(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n set: function set(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function object(props, decorators, options) {\n return extendObservable(globalState.useProxies === false || (options == null ? void 0 : options.proxy) === false ? asObservableObject({}, options) : asDynamicObservableObject({}, options), props, decorators);\n },\n ref: /*#__PURE__*/createDecoratorAnnotation(observableRefAnnotation),\n shallow: /*#__PURE__*/createDecoratorAnnotation(observableShallowAnnotation),\n deep: observableDecoratorAnnotation,\n struct: /*#__PURE__*/createDecoratorAnnotation(observableStructAnnotation)\n}; // eslint-disable-next-line\n\nvar observable = /*#__PURE__*/assign(createObservable, observableFactories);\n\nvar COMPUTED = \"computed\";\nvar COMPUTED_STRUCT = \"computed.struct\";\nvar computedAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED);\nvar computedStructAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED_STRUCT, {\n equals: comparer.structural\n});\n/**\r\n * Decorator for class properties: @computed get value() { return expr; }.\r\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\r\n */\n\nvar computed = function computed(arg1, arg2) {\n if (isStringish(arg2)) {\n // @computed\n return storeAnnotation(arg1, arg2, computedAnnotation);\n }\n\n if (isPlainObject(arg1)) {\n // @computed({ options })\n return createDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1));\n } // computed(expr, options?)\n\n\n if (true) {\n if (!isFunction(arg1)) die(\"First argument to `computed` should be an expression.\");\n if (isFunction(arg2)) die(\"A setter as second argument is no longer supported, use `{ set: fn }` option instead\");\n }\n\n var opts = isPlainObject(arg2) ? arg2 : {};\n opts.get = arg1;\n opts.name || (opts.name = arg1.name || \"\");\n /* for generated name */\n\n return new ComputedValue(opts);\n};\nObject.assign(computed, computedAnnotation);\ncomputed.struct = /*#__PURE__*/createDecoratorAnnotation(computedStructAnnotation);\n\nvar _getDescriptor$config, _getDescriptor;\n// mobx versions\n\nvar currentActionId = 0;\nvar nextActionId = 1;\nvar isFunctionNameConfigurable = (_getDescriptor$config = (_getDescriptor = /*#__PURE__*/getDescriptor(function () {}, \"name\")) == null ? void 0 : _getDescriptor.configurable) != null ? _getDescriptor$config : false; // we can safely recycle this object\n\nvar tmpNameDescriptor = {\n value: \"action\",\n configurable: true,\n writable: false,\n enumerable: false\n};\nfunction createAction(actionName, fn, autoAction, ref) {\n if (autoAction === void 0) {\n autoAction = false;\n }\n\n if (true) {\n if (!isFunction(fn)) die(\"`action` can only be invoked on functions\");\n if (typeof actionName !== \"string\" || !actionName) die(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n\n function res() {\n return executeAction(actionName, autoAction, fn, ref || this, arguments);\n }\n\n res.isMobxAction = true;\n\n if (isFunctionNameConfigurable) {\n tmpNameDescriptor.value = actionName;\n Object.defineProperty(res, \"name\", tmpNameDescriptor);\n }\n\n return res;\n}\nfunction executeAction(actionName, canRunAsDerivation, fn, scope, args) {\n var runInfo = _startAction(actionName, canRunAsDerivation, scope, args);\n\n try {\n return fn.apply(scope, args);\n } catch (err) {\n runInfo.error_ = err;\n throw err;\n } finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, canRunAsDerivation, // true for autoAction\nscope, args) {\n var notifySpy_ = true && isSpyEnabled() && !!actionName;\n var startTime_ = 0;\n\n if ( true && notifySpy_) {\n startTime_ = Date.now();\n var flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY;\n spyReportStart({\n type: ACTION,\n name: actionName,\n object: scope,\n arguments: flattenedArgs\n });\n }\n\n var prevDerivation_ = globalState.trackingDerivation;\n var runAsAction = !canRunAsDerivation || !prevDerivation_;\n startBatch();\n var prevAllowStateChanges_ = globalState.allowStateChanges; // by default preserve previous allow\n\n if (runAsAction) {\n untrackedStart();\n prevAllowStateChanges_ = allowStateChangesStart(true);\n }\n\n var prevAllowStateReads_ = allowStateReadsStart(true);\n var runInfo = {\n runAsAction_: runAsAction,\n prevDerivation_: prevDerivation_,\n prevAllowStateChanges_: prevAllowStateChanges_,\n prevAllowStateReads_: prevAllowStateReads_,\n notifySpy_: notifySpy_,\n startTime_: startTime_,\n actionId_: nextActionId++,\n parentActionId_: currentActionId\n };\n currentActionId = runInfo.actionId_;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId_) {\n die(30);\n }\n\n currentActionId = runInfo.parentActionId_;\n\n if (runInfo.error_ !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n\n allowStateChangesEnd(runInfo.prevAllowStateChanges_);\n allowStateReadsEnd(runInfo.prevAllowStateReads_);\n endBatch();\n if (runInfo.runAsAction_) untrackedEnd(runInfo.prevDerivation_);\n\n if ( true && runInfo.notifySpy_) {\n spyReportEnd({\n time: Date.now() - runInfo.startTime_\n });\n }\n\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n\n try {\n return func();\n } finally {\n allowStateChangesEnd(prev);\n }\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\n\nvar _Symbol$toPrimitive;\nvar CREATE = \"create\";\n_Symbol$toPrimitive = Symbol.toPrimitive;\nvar ObservableValue = /*#__PURE__*/function (_Atom) {\n _inheritsLoose(ObservableValue, _Atom);\n\n function ObservableValue(value, enhancer, name_, notifySpy, equals) {\n var _this;\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableValue@\" + getNextId() : 0;\n }\n\n if (notifySpy === void 0) {\n notifySpy = true;\n }\n\n if (equals === void 0) {\n equals = comparer[\"default\"];\n }\n\n _this = _Atom.call(this, name_) || this;\n _this.enhancer = void 0;\n _this.name_ = void 0;\n _this.equals = void 0;\n _this.hasUnreportedChange_ = false;\n _this.interceptors_ = void 0;\n _this.changeListeners_ = void 0;\n _this.value_ = void 0;\n _this.dehancer = void 0;\n _this.enhancer = enhancer;\n _this.name_ = name_;\n _this.equals = equals;\n _this.value_ = enhancer(value, undefined, name_);\n\n if ( true && notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({\n type: CREATE,\n object: _assertThisInitialized(_this),\n observableKind: \"value\",\n debugObjectName: _this.name_,\n newValue: \"\" + _this.value_\n });\n }\n\n return _this;\n }\n\n var _proto = ObservableValue.prototype;\n\n _proto.dehanceValue = function dehanceValue(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.set = function set(newValue) {\n var oldValue = this.value_;\n newValue = this.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n\n if ( true && notifySpy) {\n spyReportStart({\n type: UPDATE,\n object: this,\n observableKind: \"value\",\n debugObjectName: this.name_,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n\n this.setNewValue_(newValue);\n if ( true && notifySpy) spyReportEnd();\n }\n };\n\n _proto.prepareNewValue_ = function prepareNewValue_(newValue) {\n checkIfStateModificationsAreAllowed(this);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: UPDATE,\n newValue: newValue\n });\n if (!change) return globalState.UNCHANGED;\n newValue = change.newValue;\n } // apply modifier\n\n\n newValue = this.enhancer(newValue, this.value_, this.name_);\n return this.equals(this.value_, newValue) ? globalState.UNCHANGED : newValue;\n };\n\n _proto.setNewValue_ = function setNewValue_(newValue) {\n var oldValue = this.value_;\n this.value_ = newValue;\n this.reportChanged();\n\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: UPDATE,\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n\n _proto.get = function get() {\n this.reportObserved();\n return this.dehanceValue(this.value_);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately) listener({\n observableKind: \"value\",\n debugObjectName: this.name_,\n object: this,\n type: UPDATE,\n newValue: this.value_,\n oldValue: undefined\n });\n return registerListener(this, listener);\n };\n\n _proto.raw = function raw() {\n // used by MST ot get undehanced value\n return this.value_;\n };\n\n _proto.toJSON = function toJSON() {\n return this.get();\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.value_ + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive] = function () {\n return this.valueOf();\n };\n\n return ObservableValue;\n}(Atom);\nvar isObservableValue = /*#__PURE__*/createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\nvar _Symbol$toPrimitive$1;\n/**\r\n * A node in the state dependency root that observes other nodes, and can be observed itself.\r\n *\r\n * ComputedValue will remember the result of the computation for the duration of the batch, or\r\n * while being observed.\r\n *\r\n * During this time it will recompute only when one of its direct dependencies changed,\r\n * but only when it is being accessed with `ComputedValue.get()`.\r\n *\r\n * Implementation description:\r\n * 1. First time it's being accessed it will compute and remember result\r\n * give back remembered result until 2. happens\r\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\r\n * 3. When it's being accessed, recompute if any shallow dependency changed.\r\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\r\n * go to step 2. either way\r\n *\r\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\r\n */\n\n_Symbol$toPrimitive$1 = Symbol.toPrimitive;\nvar ComputedValue = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n // during tracking it's an array with new observed observers\n // to check for cycles\n // N.B: unminified as it is used by MST\n\n /**\r\n * Create a new computed value based on a function expression.\r\n *\r\n * The `name` property is for debug purposes only.\r\n *\r\n * The `equals` property specifies the comparer function to use to determine if a newly produced\r\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\r\n * compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.\r\n * Structural comparison can be convenient if you always produce a new aggregated object and\r\n * don't want to notify observers if it is structurally the same.\r\n * This is useful for working with vectors, mouse coordinates etc.\r\n */\n function ComputedValue(options) {\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.observing_ = [];\n this.newObserving_ = null;\n this.isBeingObserved_ = false;\n this.isPendingUnobservation_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n this.unboundDepsCount_ = 0;\n this.value_ = new CaughtException(null);\n this.name_ = void 0;\n this.triggeredBy_ = void 0;\n this.isComputing_ = false;\n this.isRunningSetter_ = false;\n this.derivation = void 0;\n this.setter_ = void 0;\n this.isTracing_ = TraceMode.NONE;\n this.scope_ = void 0;\n this.equals_ = void 0;\n this.requiresReaction_ = void 0;\n this.keepAlive_ = void 0;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n if (!options.get) die(31);\n this.derivation = options.get;\n this.name_ = options.name || ( true ? \"ComputedValue@\" + getNextId() : 0);\n\n if (options.set) {\n this.setter_ = createAction( true ? this.name_ + \"-setter\" : 0, options.set);\n }\n\n this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer[\"default\"]);\n this.scope_ = options.context;\n this.requiresReaction_ = !!options.requiresReaction;\n this.keepAlive_ = !!options.keepAlive;\n }\n\n var _proto = ComputedValue.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n propagateMaybeChanged(this);\n };\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Returns the current value of this computed value.\r\n * Will evaluate its computation first if needed.\r\n */\n ;\n\n _proto.get = function get() {\n if (this.isComputing_) die(32, this.name_, this.derivation);\n\n if (globalState.inBatch === 0 && // !globalState.trackingDerivatpion &&\n this.observers_.size === 0 && !this.keepAlive_) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead_();\n startBatch(); // See perf test 'computed memoization'\n\n this.value_ = this.computeValue_(false);\n endBatch();\n }\n } else {\n reportObserved(this);\n\n if (shouldCompute(this)) {\n var prevTrackingContext = globalState.trackingContext;\n if (this.keepAlive_ && !prevTrackingContext) globalState.trackingContext = this;\n if (this.trackAndCompute()) propagateChangeConfirmed(this);\n globalState.trackingContext = prevTrackingContext;\n }\n }\n\n var result = this.value_;\n if (isCaughtException(result)) throw result.cause;\n return result;\n };\n\n _proto.set = function set(value) {\n if (this.setter_) {\n if (this.isRunningSetter_) die(33, this.name_);\n this.isRunningSetter_ = true;\n\n try {\n this.setter_.call(this.scope_, value);\n } finally {\n this.isRunningSetter_ = false;\n }\n } else die(34, this.name_);\n };\n\n _proto.trackAndCompute = function trackAndCompute() {\n // N.B: unminified as it is used by MST\n var oldValue = this.value_;\n var wasSuspended =\n /* see #1208 */\n this.dependenciesState_ === IDerivationState_.NOT_TRACKING_;\n var newValue = this.computeValue_(true);\n var changed = wasSuspended || isCaughtException(oldValue) || isCaughtException(newValue) || !this.equals_(oldValue, newValue);\n\n if (changed) {\n this.value_ = newValue;\n\n if ( true && isSpyEnabled()) {\n spyReport({\n observableKind: \"computed\",\n debugObjectName: this.name_,\n object: this.scope_,\n type: \"update\",\n oldValue: oldValue,\n newValue: newValue\n });\n }\n }\n\n return changed;\n };\n\n _proto.computeValue_ = function computeValue_(track) {\n this.isComputing_ = true; // don't allow state changes during computation\n\n var prev = allowStateChangesStart(false);\n var res;\n\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope_);\n } else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope_);\n } else {\n try {\n res = this.derivation.call(this.scope_);\n } catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n\n allowStateChangesEnd(prev);\n this.isComputing_ = false;\n return res;\n };\n\n _proto.suspend_ = function suspend_() {\n if (!this.keepAlive_) {\n clearObserving(this);\n this.value_ = undefined; // don't hold on to computed value!\n\n if ( true && this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] Computed value '\" + this.name_ + \"' was suspended and it will recompute on the next access.\");\n }\n }\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n var _this = this;\n\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n // TODO: why is this in a different place than the spyReport() function? in all other observables it's called in the same place\n var newValue = _this.get();\n\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n observableKind: \"computed\",\n debugObjectName: _this.name_,\n type: UPDATE,\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n\n firstTime = false;\n prevValue = newValue;\n });\n };\n\n _proto.warnAboutUntrackedRead_ = function warnAboutUntrackedRead_() {\n if (false) {}\n\n if (this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] Computed value '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute.\");\n }\n\n if (globalState.computedRequiresReaction || this.requiresReaction_) {\n console.warn(\"[mobx] Computed value '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute.\");\n }\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.derivation.toString() + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive$1] = function () {\n return this.valueOf();\n };\n\n return ComputedValue;\n}();\nvar isComputedValue = /*#__PURE__*/createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\nvar IDerivationState_;\n\n(function (IDerivationState_) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState_[IDerivationState_[\"NOT_TRACKING_\"] = -1] = \"NOT_TRACKING_\"; // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n\n IDerivationState_[IDerivationState_[\"UP_TO_DATE_\"] = 0] = \"UP_TO_DATE_\"; // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n\n IDerivationState_[IDerivationState_[\"POSSIBLY_STALE_\"] = 1] = \"POSSIBLY_STALE_\"; // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n\n IDerivationState_[IDerivationState_[\"STALE_\"] = 2] = \"STALE_\";\n})(IDerivationState_ || (IDerivationState_ = {}));\n\nvar TraceMode;\n\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\n\nvar CaughtException = function CaughtException(cause) {\n this.cause = void 0;\n this.cause = cause; // Empty\n};\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\r\n * Finds out whether any dependency of the derivation has actually changed.\r\n * If dependenciesState is 1 then it will recalculate dependencies,\r\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\r\n *\r\n * By iterating over the dependencies in the same order that they were reported and\r\n * stopping on the first change, all the recalculations are only called for ComputedValues\r\n * that will be tracked by derivation. That is because we assume that if the first x\r\n * dependencies of the derivation doesn't change then the derivation should run the same way\r\n * up until accessing x-th dependency.\r\n */\n\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState_) {\n case IDerivationState_.UP_TO_DATE_:\n return false;\n\n case IDerivationState_.NOT_TRACKING_:\n case IDerivationState_.STALE_:\n return true;\n\n case IDerivationState_.POSSIBLY_STALE_:\n {\n // state propagation can occur outside of action/reactive context #2195\n var prevAllowStateReads = allowStateReadsStart(true);\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n\n var obs = derivation.observing_,\n l = obs.length;\n\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n } else {\n try {\n obj.get();\n } catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n } // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n\n\n if (derivation.dependenciesState_ === IDerivationState_.STALE_) {\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n }\n\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return false;\n }\n }\n}\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n if (false) {}\n\n var hasObservers = atom.observers_.size > 0; // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"always\")) console.warn(\"[MobX] \" + (globalState.enforceActions ? \"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: \" : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: \") + atom.name_);\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if ( true && !globalState.allowStateReads && globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable '\" + observable.name_ + \"' being read outside a reactive context.\");\n }\n}\n/**\r\n * Executes the provided function `f` and tracks which observables are being accessed.\r\n * The tracking information is stored on the `derivation` object and the derivation is registered\r\n * as observer of any of the accessed observables.\r\n */\n\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true); // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n\n changeDependenciesStateTo0(derivation);\n derivation.newObserving_ = new Array(derivation.observing_.length + 100);\n derivation.unboundDepsCount_ = 0;\n derivation.runId_ = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n globalState.inBatch++;\n var result;\n\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n\n globalState.inBatch--;\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\n\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (false) {}\n if (derivation.observing_.length !== 0) return;\n\n if (globalState.reactionRequiresObservable || derivation.requiresObservable_) {\n console.warn(\"[mobx] Derivation '\" + derivation.name_ + \"' is created/updated without reading any observable value.\");\n }\n}\n/**\r\n * diffs newObserving with observing.\r\n * update observing to be newObserving with unique observables\r\n * notify observers that become observed/unobserved\r\n */\n\n\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing_;\n var observing = derivation.observing_ = derivation.newObserving_;\n var lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_; // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n\n var i0 = 0,\n l = derivation.unboundDepsCount_;\n\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n\n if (dep.diffValue_ === 0) {\n dep.diffValue_ = 1;\n if (i0 !== i) observing[i0] = dep;\n i0++;\n } // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n\n\n if (dep.dependenciesState_ > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState_;\n }\n }\n\n observing.length = i0;\n derivation.newObserving_ = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n\n l = prevObserving.length;\n\n while (l--) {\n var _dep = prevObserving[l];\n\n if (_dep.diffValue_ === 0) {\n removeObserver(_dep, derivation);\n }\n\n _dep.diffValue_ = 0;\n } // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n\n\n while (i0--) {\n var _dep2 = observing[i0];\n\n if (_dep2.diffValue_ === 1) {\n _dep2.diffValue_ = 0;\n addObserver(_dep2, derivation);\n }\n } // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n\n\n if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) {\n derivation.dependenciesState_ = lowestNewObservingDerivationState;\n derivation.onBecomeStale_();\n }\n}\n\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing_;\n derivation.observing_ = [];\n var i = obs.length;\n\n while (i--) {\n removeObserver(obs[i], derivation);\n }\n\n derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n\n try {\n return action();\n } finally {\n untrackedEnd(prev);\n }\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\r\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\r\n *\r\n */\n\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) return;\n derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_;\n var obs = derivation.observing_;\n var i = obs.length;\n\n while (i--) {\n obs[i].lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n}\n\n/**\r\n * These values will persist if global state is reset\r\n */\n\nvar persistentKeys = [\"mobxGuid\", \"spyListeners\", \"enforceActions\", \"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"allowStateReads\", \"disableErrorBoundaries\", \"runId\", \"UNCHANGED\", \"useProxies\"];\nvar MobXGlobals = function MobXGlobals() {\n this.version = 6;\n this.UNCHANGED = {};\n this.trackingDerivation = null;\n this.trackingContext = null;\n this.runId = 0;\n this.mobxGuid = 0;\n this.inBatch = 0;\n this.pendingUnobservations = [];\n this.pendingReactions = [];\n this.isRunningReactions = false;\n this.allowStateChanges = false;\n this.allowStateReads = true;\n this.enforceActions = true;\n this.spyListeners = [];\n this.globalReactionErrorHandlers = [];\n this.computedRequiresReaction = false;\n this.reactionRequiresObservable = false;\n this.observableRequiresReaction = false;\n this.disableErrorBoundaries = false;\n this.suppressReactionErrors = false;\n this.useProxies = true;\n this.verifyProxies = false;\n this.safeDescriptors = true;\n};\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = /*#__PURE__*/function () {\n var global = /*#__PURE__*/getGlobal();\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals) canMergeGlobalState = false;\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version) canMergeGlobalState = false;\n\n if (!canMergeGlobalState) {\n // Because this is a IIFE we need to let isolateCalled a chance to change\n // so we run it after the event loop completed at least 1 iteration\n setTimeout(function () {\n if (!isolateCalled) {\n die(35);\n }\n }, 1);\n return new MobXGlobals();\n } else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n if (!global.__mobxGlobals.UNCHANGED) global.__mobxGlobals.UNCHANGED = {}; // make merge backward compatible\n\n return global.__mobxGlobals;\n } else {\n global.__mobxInstanceCount = 1;\n return global.__mobxGlobals = /*#__PURE__*/new MobXGlobals();\n }\n}();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length || globalState.inBatch || globalState.isRunningReactions) die(36);\n isolateCalled = true;\n\n if (canMergeGlobalState) {\n var global = getGlobal();\n if (--global.__mobxInstanceCount === 0) global.__mobxGlobals = undefined;\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\r\n * For testing purposes only; this will break the internal state of existing observables,\r\n * but can be used to get back at a stable state after throwing errors\r\n */\n\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n\n for (var key in defaultGlobals) {\n if (persistentKeys.indexOf(key) === -1) globalState[key] = defaultGlobals[key];\n }\n\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers_ && observable.observers_.size > 0;\n}\nfunction getObservers(observable) {\n return observable.observers_;\n} // function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\n\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n observable.observers_.add(node);\n if (observable.lowestObserverState_ > node.dependenciesState_) observable.lowestObserverState_ = node.dependenciesState_; // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n observable.observers_[\"delete\"](node);\n\n if (observable.observers_.size === 0) {\n // deleting last observer\n queueForUnobservation(observable);\n } // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n\n}\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation_ === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation_ = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\r\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\r\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\r\n * Avoids unnecessary recalculations.\r\n */\n\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions(); // the batch is actually about to finish, all unobserving should happen here.\n\n var list = globalState.pendingUnobservations;\n\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation_ = false;\n\n if (observable.observers_.size === 0) {\n if (observable.isBeingObserved_) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved_ = false;\n observable.onBUO();\n }\n\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observabe of another, etc..\n observable.suspend_();\n }\n }\n }\n\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n\n if (derivation !== null) {\n /**\r\n * Simple optimization, give each derivation run an unique id (runId)\r\n * Check if last time this observable was accessed the same runId is used\r\n * if this is the case, the relation is already known\r\n */\n if (derivation.runId_ !== observable.lastAccessedBy_) {\n observable.lastAccessedBy_ = derivation.runId_; // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n\n derivation.newObserving_[derivation.unboundDepsCount_++] = observable;\n\n if (!observable.isBeingObserved_ && globalState.trackingContext) {\n observable.isBeingObserved_ = true;\n observable.onBO();\n }\n }\n\n return true;\n } else if (observable.observers_.size === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n\n return false;\n} // function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n\n/**\r\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\r\n * It will propagate changes to observers from previous run\r\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\r\n * Hopefully self reruning autoruns aren't a feature people should depend on\r\n * Also most basic use cases should be ok\r\n */\n// Called by Atom when its value changes\n\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_; // Ideally we use for..of here, but the downcompiled version is really slow...\n\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n if ( true && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n\n d.onBecomeStale_();\n }\n\n d.dependenciesState_ = IDerivationState_.STALE_;\n }); // invariantLOS(observable, \"changed end\");\n} // Called by ComputedValue when it recalculate and its value changed\n\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) {\n d.dependenciesState_ = IDerivationState_.STALE_;\n\n if ( true && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n } else if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.\n ) {\n observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n }); // invariantLOS(observable, \"confirmed end\");\n} // Used by computed when its dependency changed, but we don't wan't to immediately recompute.\n\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) return;\n observable.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n d.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_;\n d.onBecomeStale_();\n }\n }); // invariantLOS(observable, \"maybe end\");\n}\n\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' is invalidated due to a change in: '\" + observable.name_ + \"'\");\n\n if (derivation.isTracing_ === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1); // prettier-ignore\n\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name_ + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name_ + \"' is being traced and '\" + observable.name_ + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\n\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n\n lines.push(\"\" + \"\\t\".repeat(depth - 1) + tree.name);\n if (tree.dependencies) tree.dependencies.forEach(function (child) {\n return printDepTree(child, lines, depth + 1);\n });\n}\n\nvar Reaction = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n function Reaction(name_, onInvalidate_, errorHandler_, requiresObservable_) {\n if (name_ === void 0) {\n name_ = true ? \"Reaction@\" + getNextId() : 0;\n }\n\n if (requiresObservable_ === void 0) {\n requiresObservable_ = false;\n }\n\n this.name_ = void 0;\n this.onInvalidate_ = void 0;\n this.errorHandler_ = void 0;\n this.requiresObservable_ = void 0;\n this.observing_ = [];\n this.newObserving_ = [];\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.unboundDepsCount_ = 0;\n this.isDisposed_ = false;\n this.isScheduled_ = false;\n this.isTrackPending_ = false;\n this.isRunning_ = false;\n this.isTracing_ = TraceMode.NONE;\n this.name_ = name_;\n this.onInvalidate_ = onInvalidate_;\n this.errorHandler_ = errorHandler_;\n this.requiresObservable_ = requiresObservable_;\n }\n\n var _proto = Reaction.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n this.schedule_();\n };\n\n _proto.schedule_ = function schedule_() {\n if (!this.isScheduled_) {\n this.isScheduled_ = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n\n _proto.isScheduled = function isScheduled() {\n return this.isScheduled_;\n }\n /**\r\n * internal, use schedule() if you intend to kick off a reaction\r\n */\n ;\n\n _proto.runReaction_ = function runReaction_() {\n if (!this.isDisposed_) {\n startBatch();\n this.isScheduled_ = false;\n var prev = globalState.trackingContext;\n globalState.trackingContext = this;\n\n if (shouldCompute(this)) {\n this.isTrackPending_ = true;\n\n try {\n this.onInvalidate_();\n\n if ( true && this.isTrackPending_ && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name_,\n type: \"scheduled-reaction\"\n });\n }\n } catch (e) {\n this.reportExceptionInDerivation_(e);\n }\n }\n\n globalState.trackingContext = prev;\n endBatch();\n }\n };\n\n _proto.track = function track(fn) {\n if (this.isDisposed_) {\n return; // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n }\n\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n\n if ( true && notify) {\n startTime = Date.now();\n spyReportStart({\n name: this.name_,\n type: \"reaction\"\n });\n }\n\n this.isRunning_ = true;\n var prevReaction = globalState.trackingContext; // reactions could create reactions...\n\n globalState.trackingContext = this;\n var result = trackDerivedFunction(this, fn, undefined);\n globalState.trackingContext = prevReaction;\n this.isRunning_ = false;\n this.isTrackPending_ = false;\n\n if (this.isDisposed_) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n\n if (isCaughtException(result)) this.reportExceptionInDerivation_(result.cause);\n\n if ( true && notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n\n endBatch();\n };\n\n _proto.reportExceptionInDerivation_ = function reportExceptionInDerivation_(error) {\n var _this = this;\n\n if (this.errorHandler_) {\n this.errorHandler_(error, this);\n return;\n }\n\n if (globalState.disableErrorBoundaries) throw error;\n var message = true ? \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\" : 0;\n\n if (!globalState.suppressReactionErrors) {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n } else if (true) console.warn(\"[mobx] (error in reaction '\" + this.name_ + \"' suppressed, fix error of causing action below)\"); // prettier-ignore\n\n\n if ( true && isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name_,\n message: message,\n error: \"\" + error\n });\n }\n\n globalState.globalReactionErrorHandlers.forEach(function (f) {\n return f(error, _this);\n });\n };\n\n _proto.dispose = function dispose() {\n if (!this.isDisposed_) {\n this.isDisposed_ = true;\n\n if (!this.isRunning_) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n\n _proto.getDisposer_ = function getDisposer_() {\n var r = this.dispose.bind(this);\n r[$mobx] = this;\n return r;\n };\n\n _proto.toString = function toString() {\n return \"Reaction[\" + this.name_ + \"]\";\n };\n\n _proto.trace = function trace$1(enterBreakPoint) {\n if (enterBreakPoint === void 0) {\n enterBreakPoint = false;\n }\n\n trace(this, enterBreakPoint);\n };\n\n return Reaction;\n}();\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0) globalState.globalReactionErrorHandlers.splice(idx, 1);\n };\n}\n/**\r\n * Magic number alert!\r\n * Defines within how many times a reaction is allowed to re-trigger itself\r\n * until it is assumed that this is gonna be a never ending loop...\r\n */\n\nvar MAX_REACTION_ITERATIONS = 100;\n\nvar reactionScheduler = function reactionScheduler(f) {\n return f();\n};\n\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions) return;\n reactionScheduler(runReactionsHelper);\n}\n\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0; // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error( true ? \"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" + (\" Probably there is a cycle in the reactive function: \" + allReactions[0]) : 0);\n allReactions.splice(0); // clear reactions\n }\n\n var remainingReactions = allReactions.splice(0);\n\n for (var i = 0, l = remainingReactions.length; i < l; i++) {\n remainingReactions[i].runReaction_();\n }\n }\n\n globalState.isRunningReactions = false;\n}\n\nvar isReaction = /*#__PURE__*/createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n\n reactionScheduler = function reactionScheduler(f) {\n return fn(function () {\n return baseScheduler(f);\n });\n };\n}\n\nfunction isSpyEnabled() {\n return true && !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (false) {} // dead code elimination can do the rest\n\n if (!globalState.spyListeners.length) return;\n var listeners = globalState.spyListeners;\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](event);\n }\n}\nfunction spyReportStart(event) {\n if (false) {}\n\n var change = _extends({}, event, {\n spyReportStart: true\n });\n\n spyReport(change);\n}\nvar END_EVENT = {\n type: \"report-end\",\n spyReportEnd: true\n};\nfunction spyReportEnd(change) {\n if (false) {}\n if (change) spyReport(_extends({}, change, {\n type: \"report-end\",\n spyReportEnd: true\n }));else spyReport(END_EVENT);\n}\nfunction spy(listener) {\n if (false) {} else {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) {\n return l !== listener;\n });\n });\n }\n}\n\nvar ACTION = \"action\";\nvar ACTION_BOUND = \"action.bound\";\nvar AUTOACTION = \"autoAction\";\nvar AUTOACTION_BOUND = \"autoAction.bound\";\nvar DEFAULT_ACTION_NAME = \"<unnamed action>\";\nvar actionAnnotation = /*#__PURE__*/createActionAnnotation(ACTION);\nvar actionBoundAnnotation = /*#__PURE__*/createActionAnnotation(ACTION_BOUND, {\n bound: true\n});\nvar autoActionAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION, {\n autoAction: true\n});\nvar autoActionBoundAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION_BOUND, {\n autoAction: true,\n bound: true\n});\n\nfunction createActionFactory(autoAction) {\n var res = function action(arg1, arg2) {\n // action(fn() {})\n if (isFunction(arg1)) return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction); // action(\"name\", fn() {})\n\n if (isFunction(arg2)) return createAction(arg1, arg2, autoAction); // @action\n\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, autoAction ? autoActionAnnotation : actionAnnotation);\n } // action(\"name\") & @action(\"name\")\n\n\n if (isStringish(arg1)) {\n return createDecoratorAnnotation(createActionAnnotation(autoAction ? AUTOACTION : ACTION, {\n name: arg1,\n autoAction: autoAction\n }));\n }\n\n if (true) die(\"Invalid arguments for `action`\");\n };\n\n return res;\n}\n\nvar action = /*#__PURE__*/createActionFactory(false);\nObject.assign(action, actionAnnotation);\nvar autoAction = /*#__PURE__*/createActionFactory(true);\nObject.assign(autoAction, autoActionAnnotation);\naction.bound = /*#__PURE__*/createDecoratorAnnotation(actionBoundAnnotation);\nautoAction.bound = /*#__PURE__*/createDecoratorAnnotation(autoActionBoundAnnotation);\nfunction runInAction(fn) {\n return executeAction(fn.name || DEFAULT_ACTION_NAME, false, fn, this, undefined);\n}\nfunction isAction(thing) {\n return isFunction(thing) && thing.isMobxAction === true;\n}\n\n/**\r\n * Creates a named reactive view and keeps it alive, so that the view is always\r\n * updated if one of the dependencies changes, even when the view is not further used by something else.\r\n * @param view The reactive view\r\n * @returns disposer function, which can be used to stop the view from being updated in the future.\r\n */\n\nfunction autorun(view, opts) {\n var _opts$name, _opts;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (true) {\n if (!isFunction(view)) die(\"Autorun expects a function as first argument\");\n if (isAction(view)) die(\"Autorun does not accept actions since actions are untrackable\");\n }\n\n var name = (_opts$name = (_opts = opts) == null ? void 0 : _opts.name) != null ? _opts$name : true ? view.name || \"Autorun@\" + getNextId() : 0;\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n } else {\n var scheduler = createSchedulerFromOptions(opts); // debounced autorun\n\n var isScheduled = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled) {\n isScheduled = true;\n scheduler(function () {\n isScheduled = false;\n if (!reaction.isDisposed_) reaction.track(reactionRunner);\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n\n function reactionRunner() {\n view(reaction);\n }\n\n reaction.schedule_();\n return reaction.getDisposer_();\n}\n\nvar run = function run(f) {\n return f();\n};\n\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler ? opts.scheduler : opts.delay ? function (f) {\n return setTimeout(f, opts.delay);\n } : run;\n}\n\nfunction reaction(expression, effect, opts) {\n var _opts$name2;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (true) {\n if (!isFunction(expression) || !isFunction(effect)) die(\"First and second argument to reaction should be functions\");\n if (!isPlainObject(opts)) die(\"Third argument of reactions should be an object\");\n }\n\n var name = (_opts$name2 = opts.name) != null ? _opts$name2 : true ? \"Reaction@\" + getNextId() : 0;\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var oldValue;\n var equals = opts.compareStructural ? comparer.structural : opts.equals || comparer[\"default\"];\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n } else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n\n function reactionRunner() {\n isScheduled = false;\n if (r.isDisposed_) return;\n var changed = false;\n r.track(function () {\n var nextValue = allowStateChanges(false, function () {\n return expression(r);\n });\n changed = firstTime || !equals(value, nextValue);\n oldValue = value;\n value = nextValue;\n });\n if (firstTime && opts.fireImmediately) effectAction(value, oldValue, r);else if (!firstTime && changed) effectAction(value, oldValue, r);\n firstTime = false;\n }\n\n r.schedule_();\n return r.getDisposer_();\n}\n\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n } catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nvar ON_BECOME_OBSERVED = \"onBO\";\nvar ON_BECOME_UNOBSERVED = \"onBUO\";\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3);\n}\n\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = isFunction(arg3) ? arg3 : arg2;\n var listenersKey = hook + \"L\";\n\n if (atom[listenersKey]) {\n atom[listenersKey].add(cb);\n } else {\n atom[listenersKey] = new Set([cb]);\n }\n\n return function () {\n var hookListeners = atom[listenersKey];\n\n if (hookListeners) {\n hookListeners[\"delete\"](cb);\n\n if (hookListeners.size === 0) {\n delete atom[listenersKey];\n }\n }\n };\n}\n\nvar NEVER = \"never\";\nvar ALWAYS = \"always\";\nvar OBSERVED = \"observed\"; // const IF_AVAILABLE = \"ifavailable\"\n\nfunction configure(options) {\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n\n var useProxies = options.useProxies,\n enforceActions = options.enforceActions;\n\n if (useProxies !== undefined) {\n globalState.useProxies = useProxies === ALWAYS ? true : useProxies === NEVER ? false : typeof Proxy !== \"undefined\";\n }\n\n if (useProxies === \"ifavailable\") globalState.verifyProxies = true;\n\n if (enforceActions !== undefined) {\n var ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED;\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true;\n }\n [\"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"disableErrorBoundaries\", \"safeDescriptors\"].forEach(function (key) {\n if (key in options) globalState[key] = !!options[key];\n });\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n\n if ( true && globalState.disableErrorBoundaries === true) {\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\");\n }\n\n if (options.reactionScheduler) {\n setReactionScheduler(options.reactionScheduler);\n }\n}\n\nfunction extendObservable(target, properties, annotations, options) {\n if (true) {\n if (arguments.length > 4) die(\"'extendObservable' expected 2-4 arguments\");\n if (typeof target !== \"object\") die(\"'extendObservable' expects an object as first argument\");\n if (isObservableMap(target)) die(\"'extendObservable' should not be used on maps, use map.merge instead\");\n if (!isPlainObject(properties)) die(\"'extendObservable' only accepts plain objects as second argument\");\n if (isObservable(properties) || isObservable(annotations)) die(\"Extending an object with another observable (object) is not supported\");\n } // Pull descriptors first, so we don't have to deal with props added by administration ($mobx)\n\n\n var descriptors = getOwnPropertyDescriptors(properties);\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n ownKeys(descriptors).forEach(function (key) {\n adm.extend_(key, descriptors[key], // must pass \"undefined\" for { key: undefined }\n !annotations ? true : key in annotations ? annotations[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\n\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name_\n };\n if (node.observing_ && node.observing_.length > 0) result.dependencies = unique(node.observing_).map(nodeToDependencyTree);\n return result;\n}\n\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\n\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name_\n };\n if (hasObservers(node)) result.observers = Array.from(getObservers(node)).map(nodeToObserverTree);\n return result;\n}\n\nfunction unique(list) {\n return Array.from(new Set(list));\n}\n\nvar generatorId = 0;\nfunction FlowCancellationError() {\n this.message = \"FLOW_CANCELLED\";\n}\nFlowCancellationError.prototype = /*#__PURE__*/Object.create(Error.prototype);\nfunction isFlowCancellationError(error) {\n return error instanceof FlowCancellationError;\n}\nvar flowAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow\");\nvar flowBoundAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow.bound\", {\n bound: true\n});\nvar flow = /*#__PURE__*/Object.assign(function flow(arg1, arg2) {\n // @flow\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, flowAnnotation);\n } // flow(fn)\n\n\n if ( true && arguments.length !== 1) die(\"Flow expects single argument with generator function\");\n var generator = arg1;\n var name = generator.name || \"<unnamed flow>\"; // Implementation based on https://github.com/tj/co/blob/master/index.js\n\n var res = function res() {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var promise = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen[\"throw\"]).call(gen, err);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function next(ret) {\n if (isFunction(ret == null ? void 0 : ret.then)) {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n\n if (ret.done) return resolve(ret.value);\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n\n onFulfilled(undefined); // kick off the process\n });\n promise.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise) cancelPromise(pendingPromise); // Finally block can return (or yield) stuff..\n\n var _res = gen[\"return\"](undefined); // eat anything that promise would do, it's cancelled!\n\n\n var yieldedPromise = Promise.resolve(_res.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n\n rejector(new FlowCancellationError());\n } catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n return promise;\n };\n\n res.isMobXFlow = true;\n return res;\n}, flowAnnotation);\nflow.bound = /*#__PURE__*/createDecoratorAnnotation(flowBoundAnnotation);\n\nfunction cancelPromise(promise) {\n if (isFunction(promise.cancel)) promise.cancel();\n}\n\nfunction flowResult(result) {\n return result; // just tricking TypeScript :)\n}\nfunction isFlow(fn) {\n return (fn == null ? void 0 : fn.isMobXFlow) === true;\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n } else if (isObservableObject(thing)) {\n if ( true && !isStringish(propOrHandler)) return die(\"InterceptReads can only be used with a specific property, not with an object in general\");\n target = getAdministration(thing, propOrHandler);\n } else if (true) {\n return die(\"Expected observable map, object or array as first array\");\n }\n\n if ( true && target.dehancer !== undefined) return die(\"An intercept reader was already established\");\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (isFunction(handler)) return interceptProperty(thing, propOrHandler, handler);else return interceptInterceptable(thing, propOrHandler);\n}\n\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept_(handler);\n}\n\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept_(handler);\n}\n\nfunction _isComputed(value, property) {\n if (property === undefined) {\n return isComputedValue(value);\n }\n\n if (isObservableObject(value) === false) return false;\n if (!value[$mobx].values_.has(property)) return false;\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n}\nfunction isComputed(value) {\n if ( true && arguments.length > 1) return die(\"isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property\");\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if ( true && !isStringish(propName)) return die(\"isComputed expected a property name as second argument\");\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (!value) return false;\n\n if (property !== undefined) {\n if ( true && (isObservableMap(value) || isObservableArray(value))) return die(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n\n if (isObservableObject(value)) {\n return value[$mobx].values_.has(property);\n }\n\n return false;\n } // For first check, see #701\n\n\n return isObservableObject(value) || !!value[$mobx] || isAtom(value) || isReaction(value) || isComputedValue(value);\n}\n\nfunction isObservable(value) {\n if ( true && arguments.length !== 1) die(\"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if ( true && !isStringish(propName)) return die(\"expected a property name as second argument\");\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].keys_();\n }\n\n if (isObservableMap(obj) || isObservableSet(obj)) {\n return Array.from(obj.keys());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) {\n return index;\n });\n }\n\n die(5);\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return obj[key];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return obj.get(key);\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.values());\n }\n\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n\n die(6);\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj.get(key)];\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.entries());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) {\n return [index, key];\n });\n }\n\n die(7);\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var _values = key;\n\n try {\n for (var _key in _values) {\n set(obj, _key, _values[_key]);\n }\n } finally {\n endBatch();\n }\n\n return;\n }\n\n if (isObservableObject(obj)) {\n obj[$mobx].set_(key, value);\n } else if (isObservableMap(obj)) {\n obj.set(key, value);\n } else if (isObservableSet(obj)) {\n obj.add(key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n if (key < 0) die(\"Invalid index: '\" + key + \"'\");\n startBatch();\n if (key >= obj.length) obj.length = key + 1;\n obj[key] = value;\n endBatch();\n } else die(8);\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj[$mobx].delete_(key);\n } else if (isObservableMap(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableSet(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n obj.splice(key, 1);\n } else {\n die(9);\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n return obj[$mobx].has_(key);\n } else if (isObservableMap(obj)) {\n return obj.has(key);\n } else if (isObservableSet(obj)) {\n return obj.has(key);\n } else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n\n die(10);\n}\nfunction get(obj, key) {\n if (!has(obj, key)) return undefined;\n\n if (isObservableObject(obj)) {\n return obj[$mobx].get_(key);\n } else if (isObservableMap(obj)) {\n return obj.get(key);\n } else if (isObservableArray(obj)) {\n return obj[key];\n }\n\n die(11);\n}\nfunction apiDefineProperty(obj, key, descriptor) {\n if (isObservableObject(obj)) {\n return obj[$mobx].defineProperty_(key, descriptor);\n }\n\n die(39);\n}\nfunction apiOwnKeys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].ownKeys_();\n }\n\n die(38);\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (isFunction(cbOrFire)) return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);else return observeObservable(thing, propOrCb, cbOrFire);\n}\n\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe_(listener, fireImmediately);\n}\n\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe_(listener, fireImmediately);\n}\n\nfunction cache(map, key, value) {\n map.set(key, value);\n return value;\n}\n\nfunction toJSHelper(source, __alreadySeen) {\n if (source == null || typeof source !== \"object\" || source instanceof Date || !isObservable(source)) return source;\n if (isObservableValue(source) || isComputedValue(source)) return toJSHelper(source.get(), __alreadySeen);\n\n if (__alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n\n if (isObservableArray(source)) {\n var res = cache(__alreadySeen, source, new Array(source.length));\n source.forEach(function (value, idx) {\n res[idx] = toJSHelper(value, __alreadySeen);\n });\n return res;\n }\n\n if (isObservableSet(source)) {\n var _res = cache(__alreadySeen, source, new Set());\n\n source.forEach(function (value) {\n _res.add(toJSHelper(value, __alreadySeen));\n });\n return _res;\n }\n\n if (isObservableMap(source)) {\n var _res2 = cache(__alreadySeen, source, new Map());\n\n source.forEach(function (value, key) {\n _res2.set(key, toJSHelper(value, __alreadySeen));\n });\n return _res2;\n } else {\n // must be observable object\n var _res3 = cache(__alreadySeen, source, {});\n\n apiOwnKeys(source).forEach(function (key) {\n if (objectPrototype.propertyIsEnumerable.call(source, key)) {\n _res3[key] = toJSHelper(source[key], __alreadySeen);\n }\n });\n return _res3;\n }\n}\n/**\r\n * Basically, a deep clone, so that no reactive property will exist anymore.\r\n */\n\n\nfunction toJS(source, options) {\n if ( true && options) die(\"toJS no longer supports options\");\n return toJSHelper(source, new Map());\n}\n\nfunction trace() {\n if (false) {}\n var enterBreakPoint = false;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (typeof args[args.length - 1] === \"boolean\") enterBreakPoint = args.pop();\n var derivation = getAtomFromArgs(args);\n\n if (!derivation) {\n return die(\"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n\n if (derivation.isTracing_ === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' tracing enabled\");\n }\n\n derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\n\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n\n case 1:\n return getAtom(args[0]);\n\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\r\n * During a transaction no views are updated until the end of the transaction.\r\n * The transaction will be run synchronously nonetheless.\r\n *\r\n * @param action a function that updates some reactive state\r\n * @returns any value that was returned by the 'action' parameter.\r\n */\n\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) {\n thisArg = undefined;\n }\n\n startBatch();\n\n try {\n return action.apply(thisArg);\n } finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || arg1 && typeof arg1 === \"object\") return whenPromise(predicate, arg1);\n return _when(predicate, arg1, arg2 || {});\n}\n\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n\n if (typeof opts.timeout === \"number\") {\n var error = new Error(\"WHEN_TIMEOUT\");\n timeoutHandle = setTimeout(function () {\n if (!disposer[$mobx].isDisposed_) {\n disposer();\n if (opts.onError) opts.onError(error);else throw error;\n }\n }, opts.timeout);\n }\n\n opts.name = true ? opts.name || \"When@\" + getNextId() : 0;\n var effectAction = createAction( true ? opts.name + \"-effect\" : 0, effect); // eslint-disable-next-line\n\n var disposer = autorun(function (r) {\n // predicate should not change state\n var cond = allowStateChanges(false, predicate);\n\n if (cond) {\n r.dispose();\n if (timeoutHandle) clearTimeout(timeoutHandle);\n effectAction();\n }\n }, opts);\n return disposer;\n}\n\nfunction whenPromise(predicate, opts) {\n if ( true && opts && opts.onError) return die(\"the options 'onError' and 'promise' cannot be combined\");\n var cancel;\n var res = new Promise(function (resolve, reject) {\n var disposer = _when(predicate, resolve, _extends({}, opts, {\n onError: reject\n }));\n\n cancel = function cancel() {\n disposer();\n reject(new Error(\"WHEN_CANCELLED\"));\n };\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction getAdm(target) {\n return target[$mobx];\n} // Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\n\n\nvar objectProxyTraps = {\n has: function has(target, name) {\n if ( true && globalState.trackingDerivation) warnAboutProxyRequirement(\"detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.\");\n return getAdm(target).has_(name);\n },\n get: function get(target, name) {\n return getAdm(target).get_(name);\n },\n set: function set(target, name, value) {\n var _getAdm$set_;\n\n if (!isStringish(name)) return false;\n\n if ( true && !getAdm(target).values_.has(name)) {\n warnAboutProxyRequirement(\"add a new observable property through direct assignment. Use 'set' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$set_ = getAdm(target).set_(name, value, true)) != null ? _getAdm$set_ : true;\n },\n deleteProperty: function deleteProperty(target, name) {\n var _getAdm$delete_;\n\n if (true) {\n warnAboutProxyRequirement(\"delete properties from an observable object. Use 'remove' from 'mobx' instead.\");\n }\n\n if (!isStringish(name)) return false; // null (intercepted) -> true (success)\n\n return (_getAdm$delete_ = getAdm(target).delete_(name, true)) != null ? _getAdm$delete_ : true;\n },\n defineProperty: function defineProperty(target, name, descriptor) {\n var _getAdm$definePropert;\n\n if (true) {\n warnAboutProxyRequirement(\"define property on an observable object. Use 'defineProperty' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$definePropert = getAdm(target).defineProperty_(name, descriptor)) != null ? _getAdm$definePropert : true;\n },\n ownKeys: function ownKeys(target) {\n if ( true && globalState.trackingDerivation) warnAboutProxyRequirement(\"iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead.\");\n return getAdm(target).ownKeys_();\n },\n preventExtensions: function preventExtensions(target) {\n die(13);\n }\n};\nfunction asDynamicObservableObject(target, options) {\n var _target$$mobx, _target$$mobx$proxy_;\n\n assertProxies();\n target = asObservableObject(target, options);\n return (_target$$mobx$proxy_ = (_target$$mobx = target[$mobx]).proxy_) != null ? _target$$mobx$proxy_ : _target$$mobx.proxy_ = new Proxy(target, objectProxyTraps);\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors_ !== undefined && interceptable.interceptors_.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1) interceptors.splice(idx, 1);\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n\n try {\n // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n var interceptors = [].concat(interceptable.interceptors_ || []);\n\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n if (change && !change.type) die(14);\n if (!change) break;\n }\n\n return change;\n } finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners_ !== undefined && listenable.changeListeners_.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners_ || (listenable.changeListeners_ = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1) listeners.splice(idx, 1);\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners_;\n if (!listeners) return;\n listeners = listeners.slice();\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n\n untrackedEnd(prevU);\n}\n\nfunction makeObservable(target, annotations, options) {\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n var _annotations;\n\n if ( true && annotations && target[storedAnnotationsSymbol]) {\n die(\"makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported.\");\n } // Default to decorators\n\n\n (_annotations = annotations) != null ? _annotations : annotations = collectStoredAnnotations(target); // Annotate\n\n ownKeys(annotations).forEach(function (key) {\n return adm.make_(key, annotations[key]);\n });\n } finally {\n endBatch();\n }\n\n return target;\n} // proto[keysSymbol] = new Set<PropertyKey>()\n\nvar keysSymbol = /*#__PURE__*/Symbol(\"mobx-keys\");\nfunction makeAutoObservable(target, overrides, options) {\n if (true) {\n if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) die(\"'makeAutoObservable' can only be used for classes that don't have a superclass\");\n if (isObservableObject(target)) die(\"makeAutoObservable can only be used on objects not already made observable\");\n } // Optimization: avoid visiting protos\n // Assumes that annotation.make_/.extend_ works the same for plain objects\n\n\n if (isPlainObject(target)) {\n return extendObservable(target, target, overrides, options);\n }\n\n var adm = asObservableObject(target, options)[$mobx]; // Optimization: cache keys on proto\n // Assumes makeAutoObservable can be called only once per object and can't be used in subclass\n\n if (!target[keysSymbol]) {\n var proto = Object.getPrototypeOf(target);\n var keys = new Set([].concat(ownKeys(target), ownKeys(proto)));\n keys[\"delete\"](\"constructor\");\n keys[\"delete\"]($mobx);\n addHiddenProp(proto, keysSymbol, keys);\n }\n\n startBatch();\n\n try {\n target[keysSymbol].forEach(function (key) {\n return adm.make_(key, // must pass \"undefined\" for { key: undefined }\n !overrides ? true : key in overrides ? overrides[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nvar SPLICE = \"splice\";\nvar UPDATE = \"update\";\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\n\nvar arrayTraps = {\n get: function get(target, name) {\n var adm = target[$mobx];\n if (name === $mobx) return adm;\n if (name === \"length\") return adm.getArrayLength_();\n\n if (typeof name === \"string\" && !isNaN(name)) {\n return adm.get_(parseInt(name));\n }\n\n if (hasProp(arrayExtensions, name)) {\n return arrayExtensions[name];\n }\n\n return target[name];\n },\n set: function set(target, name, value) {\n var adm = target[$mobx];\n\n if (name === \"length\") {\n adm.setArrayLength_(value);\n }\n\n if (typeof name === \"symbol\" || isNaN(name)) {\n target[name] = value;\n } else {\n // numeric string\n adm.set_(parseInt(name), value);\n }\n\n return true;\n },\n preventExtensions: function preventExtensions() {\n die(15);\n }\n};\nvar ObservableArrayAdministration = /*#__PURE__*/function () {\n // this is the prop that gets proxied, so can't replace it!\n function ObservableArrayAdministration(name, enhancer, owned_, legacyMode_) {\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n this.owned_ = void 0;\n this.legacyMode_ = void 0;\n this.atom_ = void 0;\n this.values_ = [];\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.enhancer_ = void 0;\n this.dehancer = void 0;\n this.proxy_ = void 0;\n this.lastKnownLength_ = 0;\n this.owned_ = owned_;\n this.legacyMode_ = legacyMode_;\n this.atom_ = new Atom(name);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, true ? name + \"[..]\" : 0);\n };\n }\n\n var _proto = ObservableArrayAdministration.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.dehanceValues_ = function dehanceValues_(values) {\n if (this.dehancer !== undefined && values.length > 0) return values.map(this.dehancer);\n return values;\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately === void 0) {\n fireImmediately = false;\n }\n\n if (fireImmediately) {\n listener({\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: \"splice\",\n index: 0,\n added: this.values_.slice(),\n addedCount: this.values_.length,\n removed: [],\n removedCount: 0\n });\n }\n\n return registerListener(this, listener);\n };\n\n _proto.getArrayLength_ = function getArrayLength_() {\n this.atom_.reportObserved();\n return this.values_.length;\n };\n\n _proto.setArrayLength_ = function setArrayLength_(newLength) {\n if (typeof newLength !== \"number\" || isNaN(newLength) || newLength < 0) die(\"Out of range: \" + newLength);\n var currentLength = this.values_.length;\n if (newLength === currentLength) return;else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n\n for (var i = 0; i < newLength - currentLength; i++) {\n newItems[i] = undefined;\n } // No Array.fill everywhere...\n\n\n this.spliceWithArray_(currentLength, 0, newItems);\n } else this.spliceWithArray_(newLength, currentLength - newLength);\n };\n\n _proto.updateArrayLength_ = function updateArrayLength_(oldLength, delta) {\n if (oldLength !== this.lastKnownLength_) die(16);\n this.lastKnownLength_ += delta;\n if (this.legacyMode_ && delta > 0) reserveArrayBuffer(oldLength + delta + 1);\n };\n\n _proto.spliceWithArray_ = function spliceWithArray_(index, deleteCount, newItems) {\n var _this = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n var length = this.values_.length;\n if (index === undefined) index = 0;else if (index > length) index = length;else if (index < 0) index = Math.max(0, length + index);\n if (arguments.length === 1) deleteCount = length - index;else if (deleteCount === undefined || deleteCount === null) deleteCount = 0;else deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n if (newItems === undefined) newItems = EMPTY_ARRAY;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_,\n type: SPLICE,\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change) return EMPTY_ARRAY;\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n\n newItems = newItems.length === 0 ? newItems : newItems.map(function (v) {\n return _this.enhancer_(v, undefined);\n });\n\n if (this.legacyMode_ || \"development\" !== \"production\") {\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength_(length, lengthDelta); // checks if internal array wasn't modified\n }\n\n var res = this.spliceItemsIntoValues_(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0) this.notifyArraySplice_(index, newItems, res);\n return this.dehanceValues_(res);\n };\n\n _proto.spliceItemsIntoValues_ = function spliceItemsIntoValues_(index, deleteCount, newItems) {\n if (newItems.length < MAX_SPLICE_SIZE) {\n var _this$values_;\n\n return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));\n } else {\n var res = this.values_.slice(index, index + deleteCount);\n var oldItems = this.values_.slice(index + deleteCount);\n this.values_.length = index + newItems.length - deleteCount;\n\n for (var i = 0; i < newItems.length; i++) {\n this.values_[index + i] = newItems[i];\n }\n\n for (var _i = 0; _i < oldItems.length; _i++) {\n this.values_[index + newItems.length + _i] = oldItems[_i];\n }\n\n return res;\n }\n };\n\n _proto.notifyArrayChildUpdate_ = function notifyArrayChildUpdate_(index, newValue, oldValue) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n type: UPDATE,\n debugObjectName: this.atom_.name_,\n index: index,\n newValue: newValue,\n oldValue: oldValue\n } : null; // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n\n if ( true && notifySpy) spyReportStart(change);\n this.atom_.reportChanged();\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n };\n\n _proto.notifyArraySplice_ = function notifyArraySplice_(index, added, removed) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: SPLICE,\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n this.atom_.reportChanged(); // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n };\n\n _proto.get_ = function get_(index) {\n if (index < this.values_.length) {\n this.atom_.reportObserved();\n return this.dehanceValue_(this.values_[index]);\n }\n\n console.warn( true ? \"[mobx] Out of bounds read: \" + index : 0);\n };\n\n _proto.set_ = function set_(index, newValue) {\n var values = this.values_;\n\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(this.atom_);\n var oldValue = values[index];\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_,\n index: index,\n newValue: newValue\n });\n if (!change) return;\n newValue = change.newValue;\n }\n\n newValue = this.enhancer_(newValue, oldValue);\n var changed = newValue !== oldValue;\n\n if (changed) {\n values[index] = newValue;\n this.notifyArrayChildUpdate_(index, newValue, oldValue);\n }\n } else if (index === values.length) {\n // add a new item\n this.spliceWithArray_(index, 0, [newValue]);\n } else {\n // out of bounds\n die(17, index, values.length);\n }\n };\n\n return ObservableArrayAdministration;\n}();\nfunction createObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n assertProxies();\n var adm = new ObservableArrayAdministration(name, enhancer, owned, false);\n addHiddenFinalProp(adm.values_, $mobx, adm);\n var proxy = new Proxy(adm.values_, arrayTraps);\n adm.proxy_ = proxy;\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true);\n adm.spliceWithArray_(0, 0, initialValues);\n allowStateChangesEnd(prev);\n }\n\n return proxy;\n} // eslint-disable-next-line\n\nvar arrayExtensions = {\n clear: function clear() {\n return this.splice(0);\n },\n replace: function replace(newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray_(0, adm.values_.length, newItems);\n },\n // Used by JSON.stringify\n toJSON: function toJSON() {\n return this.slice();\n },\n\n /*\r\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\r\n * since these functions alter the inner structure of the array, the have side effects.\r\n * Because the have side effects, they should not be used in computed function,\r\n * and for that reason the do not call dependencyState.notifyObserved\r\n */\n splice: function splice(index, deleteCount) {\n for (var _len = arguments.length, newItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n newItems[_key - 2] = arguments[_key];\n }\n\n var adm = this[$mobx];\n\n switch (arguments.length) {\n case 0:\n return [];\n\n case 1:\n return adm.spliceWithArray_(index);\n\n case 2:\n return adm.spliceWithArray_(index, deleteCount);\n }\n\n return adm.spliceWithArray_(index, deleteCount, newItems);\n },\n spliceWithArray: function spliceWithArray(index, deleteCount, newItems) {\n return this[$mobx].spliceWithArray_(index, deleteCount, newItems);\n },\n push: function push() {\n var adm = this[$mobx];\n\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n adm.spliceWithArray_(adm.values_.length, 0, items);\n return adm.values_.length;\n },\n pop: function pop() {\n return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0];\n },\n shift: function shift() {\n return this.splice(0, 1)[0];\n },\n unshift: function unshift() {\n var adm = this[$mobx];\n\n for (var _len3 = arguments.length, items = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n items[_key3] = arguments[_key3];\n }\n\n adm.spliceWithArray_(0, 0, items);\n return adm.values_.length;\n },\n reverse: function reverse() {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n if (globalState.trackingDerivation) {\n die(37, \"reverse\");\n }\n\n this.replace(this.slice().reverse());\n return this;\n },\n sort: function sort() {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n if (globalState.trackingDerivation) {\n die(37, \"sort\");\n }\n\n var copy = this.slice();\n copy.sort.apply(copy, arguments);\n this.replace(copy);\n return this;\n },\n remove: function remove(value) {\n var adm = this[$mobx];\n var idx = adm.dehanceValues_(adm.values_).indexOf(value);\n\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n\n return false;\n }\n};\n/**\r\n * Wrap function from prototype\r\n * Without this, everything works as well, but this works\r\n * faster as everything works on unproxied values\r\n */\n\naddArrayExtension(\"concat\", simpleFunc);\naddArrayExtension(\"flat\", simpleFunc);\naddArrayExtension(\"includes\", simpleFunc);\naddArrayExtension(\"indexOf\", simpleFunc);\naddArrayExtension(\"join\", simpleFunc);\naddArrayExtension(\"lastIndexOf\", simpleFunc);\naddArrayExtension(\"slice\", simpleFunc);\naddArrayExtension(\"toString\", simpleFunc);\naddArrayExtension(\"toLocaleString\", simpleFunc); // map\n\naddArrayExtension(\"every\", mapLikeFunc);\naddArrayExtension(\"filter\", mapLikeFunc);\naddArrayExtension(\"find\", mapLikeFunc);\naddArrayExtension(\"findIndex\", mapLikeFunc);\naddArrayExtension(\"flatMap\", mapLikeFunc);\naddArrayExtension(\"forEach\", mapLikeFunc);\naddArrayExtension(\"map\", mapLikeFunc);\naddArrayExtension(\"some\", mapLikeFunc); // reduce\n\naddArrayExtension(\"reduce\", reduceLikeFunc);\naddArrayExtension(\"reduceRight\", reduceLikeFunc);\n\nfunction addArrayExtension(funcName, funcFactory) {\n if (typeof Array.prototype[funcName] === \"function\") {\n arrayExtensions[funcName] = funcFactory(funcName);\n }\n} // Report and delegate to dehanced array\n\n\nfunction simpleFunc(funcName) {\n return function () {\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction mapLikeFunc(funcName) {\n return function (callback, thisArg) {\n var _this2 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName](function (element, index) {\n return callback.call(thisArg, element, index, _this2);\n });\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction reduceLikeFunc(funcName) {\n return function () {\n var _this3 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_); // #2432 - reduce behavior depends on arguments.length\n\n var callback = arguments[0];\n\n arguments[0] = function (accumulator, currentValue, index) {\n return callback(accumulator, currentValue, index, _this3);\n };\n\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n}\n\nvar isObservableArrayAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing[$mobx]);\n}\n\nvar _Symbol$iterator, _Symbol$toStringTag;\nvar ObservableMapMarker = {};\nvar ADD = \"add\";\nvar DELETE = \"delete\"; // just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\n\n_Symbol$iterator = Symbol.iterator;\n_Symbol$toStringTag = Symbol.toStringTag;\nvar ObservableMap = /*#__PURE__*/function () {\n // hasMap, not hashMap >-).\n function ObservableMap(initialData, enhancer_, name_) {\n if (enhancer_ === void 0) {\n enhancer_ = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableMap@\" + getNextId() : 0;\n }\n\n this.enhancer_ = void 0;\n this.name_ = void 0;\n this[$mobx] = ObservableMapMarker;\n this.data_ = void 0;\n this.hasMap_ = void 0;\n this.keysAtom_ = void 0;\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = enhancer_;\n this.name_ = name_;\n\n if (!isFunction(Map)) {\n die(18);\n }\n\n this.keysAtom_ = createAtom( true ? this.name_ + \".keys()\" : 0);\n this.data_ = new Map();\n this.hasMap_ = new Map();\n this.merge(initialData);\n }\n\n var _proto = ObservableMap.prototype;\n\n _proto.has_ = function has_(key) {\n return this.data_.has(key);\n };\n\n _proto.has = function has(key) {\n var _this = this;\n\n if (!globalState.trackingDerivation) return this.has_(key);\n var entry = this.hasMap_.get(key);\n\n if (!entry) {\n var newEntry = entry = new ObservableValue(this.has_(key), referenceEnhancer, true ? this.name_ + \".\" + stringifyKey(key) + \"?\" : 0, false);\n this.hasMap_.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () {\n return _this.hasMap_[\"delete\"](key);\n });\n }\n\n return entry.get();\n };\n\n _proto.set = function set(key, value) {\n var hasKey = this.has_(key);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? UPDATE : ADD,\n object: this,\n newValue: value,\n name: key\n });\n if (!change) return this;\n value = change.newValue;\n }\n\n if (hasKey) {\n this.updateValue_(key, value);\n } else {\n this.addValue_(key, value);\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(key) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n name: key\n });\n if (!change) return false;\n }\n\n if (this.has_(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: this.data_.get(key).value_,\n name: key\n } : null;\n\n if ( true && notifySpy) spyReportStart(_change);\n transaction(function () {\n var _this2$hasMap_$get;\n\n _this2.keysAtom_.reportChanged();\n\n (_this2$hasMap_$get = _this2.hasMap_.get(key)) == null ? void 0 : _this2$hasMap_$get.setNewValue_(false);\n\n var observable = _this2.data_.get(key);\n\n observable.setNewValue_(undefined);\n\n _this2.data_[\"delete\"](key);\n });\n if (notify) notifyListeners(this, _change);\n if ( true && notifySpy) spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.updateValue_ = function updateValue_(key, newValue) {\n var observable = this.data_.get(key);\n newValue = observable.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: UPDATE,\n object: this,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n }\n };\n\n _proto.addValue_ = function addValue_(key, newValue) {\n var _this3 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n transaction(function () {\n var _this3$hasMap_$get;\n\n var observable = new ObservableValue(newValue, _this3.enhancer_, true ? _this3.name_ + \".\" + stringifyKey(key) : 0, false);\n\n _this3.data_.set(key, observable);\n\n newValue = observable.value_; // value might have been changed\n\n (_this3$hasMap_$get = _this3.hasMap_.get(key)) == null ? void 0 : _this3$hasMap_$get.setNewValue_(true);\n\n _this3.keysAtom_.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n name: key,\n newValue: newValue\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n };\n\n _proto.get = function get(key) {\n if (this.has(key)) return this.dehanceValue_(this.data_.get(key).get());\n return this.dehanceValue_(undefined);\n };\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.keys = function keys() {\n this.keysAtom_.reportObserved();\n return this.data_.keys();\n };\n\n _proto.values = function values() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next = keys.next(),\n done = _keys$next.done,\n value = _keys$next.value;\n\n return {\n done: done,\n value: done ? undefined : self.get(value)\n };\n }\n });\n };\n\n _proto.entries = function entries() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next2 = keys.next(),\n done = _keys$next2.done,\n value = _keys$next2.value;\n\n return {\n done: done,\n value: done ? undefined : [value, self.get(value)]\n };\n }\n });\n };\n\n _proto[_Symbol$iterator] = function () {\n return this.entries();\n };\n\n _proto.forEach = function forEach(callback, thisArg) {\n for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n value = _step$value[1];\n callback.call(thisArg, value, key, this);\n }\n }\n /** Merge another object into this object, returns this. */\n ;\n\n _proto.merge = function merge(other) {\n var _this4 = this;\n\n if (isObservableMap(other)) {\n other = new Map(other);\n }\n\n transaction(function () {\n if (isPlainObject(other)) getPlainObjectKeys(other).forEach(function (key) {\n return _this4.set(key, other[key]);\n });else if (Array.isArray(other)) other.forEach(function (_ref) {\n var key = _ref[0],\n value = _ref[1];\n return _this4.set(key, value);\n });else if (isES6Map(other)) {\n if (other.constructor !== Map) die(19, other);\n other.forEach(function (value, key) {\n return _this4.set(key, value);\n });\n } else if (other !== null && other !== undefined) die(20, other);\n });\n return this;\n };\n\n _proto.clear = function clear() {\n var _this5 = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator2 = _createForOfIteratorHelperLoose(_this5.keys()), _step2; !(_step2 = _iterator2()).done;) {\n var key = _step2.value;\n\n _this5[\"delete\"](key);\n }\n });\n });\n };\n\n _proto.replace = function replace(values) {\n var _this6 = this;\n\n // Implementation requirements:\n // - respect ordering of replacement map\n // - allow interceptors to run and potentially prevent individual operations\n // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n // - note that result map may differ from replacement map due to the interceptors\n transaction(function () {\n // Convert to map so we can do quick key lookups\n var replacementMap = convertToMap(values);\n var orderedData = new Map(); // Used for optimization\n\n var keysReportChangedCalled = false; // Delete keys that don't exist in replacement map\n // if the key deletion is prevented by interceptor\n // add entry at the beginning of the result map\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(_this6.data_.keys()), _step3; !(_step3 = _iterator3()).done;) {\n var key = _step3.value;\n\n // Concurrently iterating/deleting keys\n // iterator should handle this correctly\n if (!replacementMap.has(key)) {\n var deleted = _this6[\"delete\"](key); // Was the key removed?\n\n\n if (deleted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n } else {\n // Delete prevented by interceptor\n var value = _this6.data_.get(key);\n\n orderedData.set(key, value);\n }\n }\n } // Merge entries\n\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(replacementMap.entries()), _step4; !(_step4 = _iterator4()).done;) {\n var _step4$value = _step4.value,\n _key = _step4$value[0],\n _value = _step4$value[1];\n\n // We will want to know whether a new key is added\n var keyExisted = _this6.data_.has(_key); // Add or update value\n\n\n _this6.set(_key, _value); // The addition could have been prevent by interceptor\n\n\n if (_this6.data_.has(_key)) {\n // The update could have been prevented by interceptor\n // and also we want to preserve existing values\n // so use value from _data map (instead of replacement map)\n var _value2 = _this6.data_.get(_key);\n\n orderedData.set(_key, _value2); // Was a new key added?\n\n if (!keyExisted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n }\n } // Check for possible key order change\n\n\n if (!keysReportChangedCalled) {\n if (_this6.data_.size !== orderedData.size) {\n // If size differs, keys are definitely modified\n _this6.keysAtom_.reportChanged();\n } else {\n var iter1 = _this6.data_.keys();\n\n var iter2 = orderedData.keys();\n var next1 = iter1.next();\n var next2 = iter2.next();\n\n while (!next1.done) {\n if (next1.value !== next2.value) {\n _this6.keysAtom_.reportChanged();\n\n break;\n }\n\n next1 = iter1.next();\n next2 = iter2.next();\n }\n }\n } // Use correctly ordered map\n\n\n _this6.data_ = orderedData;\n });\n return this;\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableMap]\";\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if ( true && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with maps.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _createClass(ObservableMap, [{\n key: \"size\",\n get: function get() {\n this.keysAtom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag,\n get: function get() {\n return \"Map\";\n }\n }]);\n\n return ObservableMap;\n}(); // eslint-disable-next-line\n\nvar isObservableMap = /*#__PURE__*/createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n } else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n } else if (isPlainObject(dataStructure)) {\n var map = new Map();\n\n for (var key in dataStructure) {\n map.set(key, dataStructure[key]);\n }\n\n return map;\n } else {\n return die(21, dataStructure);\n }\n}\n\nvar _Symbol$iterator$1, _Symbol$toStringTag$1;\nvar ObservableSetMarker = {};\n_Symbol$iterator$1 = Symbol.iterator;\n_Symbol$toStringTag$1 = Symbol.toStringTag;\nvar ObservableSet = /*#__PURE__*/function () {\n function ObservableSet(initialData, enhancer, name_) {\n if (enhancer === void 0) {\n enhancer = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableSet@\" + getNextId() : 0;\n }\n\n this.name_ = void 0;\n this[$mobx] = ObservableSetMarker;\n this.data_ = new Set();\n this.atom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = void 0;\n this.name_ = name_;\n\n if (!isFunction(Set)) {\n die(22);\n }\n\n this.atom_ = createAtom(this.name_);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, name_);\n };\n\n if (initialData) {\n this.replace(initialData);\n }\n }\n\n var _proto = ObservableSet.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.clear = function clear() {\n var _this = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator = _createForOfIteratorHelperLoose(_this.data_.values()), _step; !(_step = _iterator()).done;) {\n var value = _step.value;\n\n _this[\"delete\"](value);\n }\n });\n });\n };\n\n _proto.forEach = function forEach(callbackFn, thisArg) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this), _step2; !(_step2 = _iterator2()).done;) {\n var value = _step2.value;\n callbackFn.call(thisArg, value, value, this);\n }\n };\n\n _proto.add = function add(value) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: ADD,\n object: this,\n newValue: value\n });\n if (!change) return this; // ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n }\n\n if (!this.has(value)) {\n transaction(function () {\n _this2.data_.add(_this2.enhancer_(value, undefined));\n\n _this2.atom_.reportChanged();\n });\n var notifySpy = true && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n newValue: value\n } : null;\n\n if (notifySpy && \"development\" !== \"production\") spyReportStart(_change);\n if (notify) notifyListeners(this, _change);\n if (notifySpy && \"development\" !== \"production\") spyReportEnd();\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(value) {\n var _this3 = this;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n oldValue: value\n });\n if (!change) return false;\n }\n\n if (this.has(value)) {\n var notifySpy = true && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change2 = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: value\n } : null;\n\n if (notifySpy && \"development\" !== \"production\") spyReportStart(_change2);\n transaction(function () {\n _this3.atom_.reportChanged();\n\n _this3.data_[\"delete\"](value);\n });\n if (notify) notifyListeners(this, _change2);\n if (notifySpy && \"development\" !== \"production\") spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.has = function has(value) {\n this.atom_.reportObserved();\n return this.data_.has(this.dehanceValue_(value));\n };\n\n _proto.entries = function entries() {\n var nextIndex = 0;\n var keys = Array.from(this.keys());\n var values = Array.from(this.values());\n return makeIterable({\n next: function next() {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length ? {\n value: [keys[index], values[index]],\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.keys = function keys() {\n return this.values();\n };\n\n _proto.values = function values() {\n this.atom_.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues = Array.from(this.data_.values());\n return makeIterable({\n next: function next() {\n return nextIndex < observableValues.length ? {\n value: self.dehanceValue_(observableValues[nextIndex++]),\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.replace = function replace(other) {\n var _this4 = this;\n\n if (isObservableSet(other)) {\n other = new Set(other);\n }\n\n transaction(function () {\n if (Array.isArray(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (isES6Set(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (other !== null && other !== undefined) {\n die(\"Cannot initialize set from \" + other);\n }\n });\n return this;\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n // ... 'fireImmediately' could also be true?\n if ( true && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with sets.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableSet]\";\n };\n\n _proto[_Symbol$iterator$1] = function () {\n return this.values();\n };\n\n _createClass(ObservableSet, [{\n key: \"size\",\n get: function get() {\n this.atom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag$1,\n get: function get() {\n return \"Set\";\n }\n }]);\n\n return ObservableSet;\n}(); // eslint-disable-next-line\n\nvar isObservableSet = /*#__PURE__*/createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar descriptorCache = /*#__PURE__*/Object.create(null);\nvar REMOVE = \"remove\";\nvar ObservableObjectAdministration = /*#__PURE__*/function () {\n function ObservableObjectAdministration(target_, values_, name_, // Used anytime annotation is not explicitely provided\n defaultAnnotation_) {\n if (values_ === void 0) {\n values_ = new Map();\n }\n\n if (defaultAnnotation_ === void 0) {\n defaultAnnotation_ = autoAnnotation;\n }\n\n this.target_ = void 0;\n this.values_ = void 0;\n this.name_ = void 0;\n this.defaultAnnotation_ = void 0;\n this.keysAtom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.proxy_ = void 0;\n this.isPlainObject_ = void 0;\n this.appliedAnnotations_ = void 0;\n this.pendingKeys_ = void 0;\n this.target_ = target_;\n this.values_ = values_;\n this.name_ = name_;\n this.defaultAnnotation_ = defaultAnnotation_;\n this.keysAtom_ = new Atom( true ? this.name_ + \".keys\" : 0); // Optimization: we use this frequently\n\n this.isPlainObject_ = isPlainObject(this.target_);\n\n if ( true && !isAnnotation(this.defaultAnnotation_)) {\n die(\"defaultAnnotation must be valid annotation\");\n }\n\n if (true) {\n // Prepare structure for tracking which fields were already annotated\n this.appliedAnnotations_ = {};\n }\n }\n\n var _proto = ObservableObjectAdministration.prototype;\n\n _proto.getObservablePropValue_ = function getObservablePropValue_(key) {\n return this.values_.get(key).get();\n };\n\n _proto.setObservablePropValue_ = function setObservablePropValue_(key, newValue) {\n var observable = this.values_.get(key);\n\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return true;\n } // intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: newValue\n });\n if (!change) return null;\n newValue = change.newValue;\n }\n\n newValue = observable.prepareNewValue_(newValue); // notify spy & observers\n\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n\n var _change = notify || notifySpy ? {\n type: UPDATE,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n\n if ( true && notifySpy) spyReportStart(_change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, _change);\n if ( true && notifySpy) spyReportEnd();\n }\n\n return true;\n };\n\n _proto.get_ = function get_(key) {\n if (globalState.trackingDerivation && !hasProp(this.target_, key)) {\n // Key doesn't exist yet, subscribe for it in case it's added later\n this.has_(key);\n }\n\n return this.target_[key];\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {any} value\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.set_ = function set_(key, value, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // Don't use .has(key) - we care about own\n if (hasProp(this.target_, key)) {\n // Existing prop\n if (this.values_.has(key)) {\n // Observable (can be intercepted)\n return this.setObservablePropValue_(key, value);\n } else if (proxyTrap) {\n // Non-observable - proxy\n return Reflect.set(this.target_, key, value);\n } else {\n // Non-observable\n this.target_[key] = value;\n return true;\n }\n } else {\n // New prop\n return this.extend_(key, {\n value: value,\n enumerable: true,\n writable: true,\n configurable: true\n }, this.defaultAnnotation_, proxyTrap);\n }\n } // Trap for \"in\"\n ;\n\n _proto.has_ = function has_(key) {\n if (!globalState.trackingDerivation) {\n // Skip key subscription outside derivation\n return key in this.target_;\n }\n\n this.pendingKeys_ || (this.pendingKeys_ = new Map());\n var entry = this.pendingKeys_.get(key);\n\n if (!entry) {\n entry = new ObservableValue(key in this.target_, referenceEnhancer, true ? this.name_ + \".\" + stringifyKey(key) + \"?\" : 0, false);\n this.pendingKeys_.set(key, entry);\n }\n\n return entry.get();\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - ignore prop\r\n */\n ;\n\n _proto.make_ = function make_(key, annotation) {\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n\n if (annotation === false) {\n return;\n }\n\n assertAnnotable(this, annotation, key);\n\n if (!(key in this.target_)) {\n var _this$target_$storedA;\n\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n if ((_this$target_$storedA = this.target_[storedAnnotationsSymbol]) == null ? void 0 : _this$target_$storedA[key]) {\n return; // will be annotated by subclass constructor\n } else {\n die(1, annotation.annotationType_, this.name_ + \".\" + key.toString());\n }\n }\n\n var source = this.target_;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n var outcome = annotation.make_(this, key, descriptor, source);\n if (outcome === 0\n /* Cancel */\n ) return;\n if (outcome === 1\n /* Break */\n ) break;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n recordAnnotationApplied(this, annotation, key);\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.extend_ = function extend_(key, descriptor, annotation, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n\n if (annotation === false) {\n return this.defineProperty_(key, descriptor, proxyTrap);\n }\n\n assertAnnotable(this, annotation, key);\n var outcome = annotation.extend_(this, key, descriptor, proxyTrap);\n\n if (outcome) {\n recordAnnotationApplied(this, annotation, key);\n }\n\n return outcome;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.defineProperty_ = function defineProperty_(key, descriptor, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: descriptor.value\n });\n if (!change) return null;\n var newValue = change.newValue;\n\n if (descriptor.value !== newValue) {\n descriptor = _extends({}, descriptor, {\n value: newValue\n });\n }\n } // Define\n\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n } // Notify\n\n\n this.notifyPropertyAddition_(key, descriptor.value);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: value\n });\n if (!change) return null;\n value = change.newValue;\n }\n\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: true,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n var observable = new ObservableValue(value, enhancer, true ? this.name_ + \".\" + key.toString() : 0, false);\n this.values_.set(key, observable); // Notify (value possibly changed by ObservableValue)\n\n this.notifyPropertyAddition_(key, observable.value_);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: undefined\n });\n if (!change) return null;\n }\n\n options.name || (options.name = true ? this.name_ + \".\" + key.toString() : 0);\n options.context = this.proxy_ || this.target_;\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: false,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n this.values_.set(key, new ComputedValue(options)); // Notify\n\n this.notifyPropertyAddition_(key, undefined);\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.delete_ = function delete_(key, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // No such prop\n if (!hasProp(this.target_, key)) {\n return true;\n } // Intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: REMOVE\n }); // Cancelled\n\n if (!change) return null;\n } // Delete\n\n\n try {\n var _this$pendingKeys_, _this$pendingKeys_$ge;\n\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n var observable = this.values_.get(key); // Value needed for spies/listeners\n\n var value = undefined; // Optimization: don't pull the value unless we will need it\n\n if (!observable && (notify || notifySpy)) {\n var _getDescriptor;\n\n value = (_getDescriptor = getDescriptor(this.target_, key)) == null ? void 0 : _getDescriptor.value;\n } // delete prop (do first, may fail)\n\n\n if (proxyTrap) {\n if (!Reflect.deleteProperty(this.target_, key)) {\n return false;\n }\n } else {\n delete this.target_[key];\n } // Allow re-annotating this field\n\n\n if (true) {\n delete this.appliedAnnotations_[key];\n } // Clear observable\n\n\n if (observable) {\n this.values_[\"delete\"](key); // for computed, value is undefined\n\n if (observable instanceof ObservableValue) {\n value = observable.value_;\n } // Notify: autorun(() => obj[key]), see #1796\n\n\n propagateChanged(observable);\n } // Notify \"keys/entries/values\" observers\n\n\n this.keysAtom_.reportChanged(); // Notify \"has\" observers\n // \"in\" as it may still exist in proto\n\n (_this$pendingKeys_ = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_$ge = _this$pendingKeys_.get(key)) == null ? void 0 : _this$pendingKeys_$ge.set(key in this.target_); // Notify spies/listeners\n\n if (notify || notifySpy) {\n var _change2 = {\n type: REMOVE,\n observableKind: \"object\",\n object: this.proxy_ || this.target_,\n debugObjectName: this.name_,\n oldValue: value,\n name: key\n };\n if ( true && notifySpy) spyReportStart(_change2);\n if (notify) notifyListeners(this, _change2);\n if ( true && notifySpy) spyReportEnd();\n }\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n ;\n\n _proto.observe_ = function observe_(callback, fireImmediately) {\n if ( true && fireImmediately === true) die(\"`observe` doesn't support the fire immediately property for observable objects.\");\n return registerListener(this, callback);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.notifyPropertyAddition_ = function notifyPropertyAddition_(key, value) {\n var _this$pendingKeys_2, _this$pendingKeys_2$g;\n\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n\n if (notify || notifySpy) {\n var change = notify || notifySpy ? {\n type: ADD,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: value\n } : null;\n if ( true && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if ( true && notifySpy) spyReportEnd();\n }\n\n (_this$pendingKeys_2 = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_2$g = _this$pendingKeys_2.get(key)) == null ? void 0 : _this$pendingKeys_2$g.set(true); // Notify \"keys/entries/values\" observers\n\n this.keysAtom_.reportChanged();\n };\n\n _proto.ownKeys_ = function ownKeys_() {\n this.keysAtom_.reportObserved();\n return ownKeys(this.target_);\n };\n\n _proto.keys_ = function keys_() {\n // Returns enumerable && own, but unfortunately keysAtom will report on ANY key change.\n // There is no way to distinguish between Object.keys(object) and Reflect.ownKeys(object) - both are handled by ownKeys trap.\n // We can either over-report in Object.keys(object) or under-report in Reflect.ownKeys(object)\n // We choose to over-report in Object.keys(object), because:\n // - typically it's used with simple data objects\n // - when symbolic/non-enumerable keys are relevant Reflect.ownKeys works as expected\n this.keysAtom_.reportObserved();\n return Object.keys(this.target_);\n };\n\n return ObservableObjectAdministration;\n}();\nfunction asObservableObject(target, options) {\n var _options$name;\n\n if ( true && options && isObservableObject(target)) {\n die(\"Options can't be provided for already observable objects.\");\n }\n\n if (hasProp(target, $mobx)) {\n if ( true && !(getAdministration(target) instanceof ObservableObjectAdministration)) {\n die(\"Cannot convert '\" + getDebugName(target) + \"' into observable object:\" + \"\\nThe target is already observable of different type.\" + \"\\nExtending builtins is not supported.\");\n }\n\n return target;\n }\n\n if ( true && !Object.isExtensible(target)) die(\"Cannot make the designated object observable; it is not extensible\");\n var name = (_options$name = options == null ? void 0 : options.name) != null ? _options$name : true ? (isPlainObject(target) ? \"ObservableObject\" : target.constructor.name) + \"@\" + getNextId() : 0;\n var adm = new ObservableObjectAdministration(target, new Map(), String(name), getAnnotationFromOptions(options));\n addHiddenProp(target, $mobx, adm);\n return target;\n}\nvar isObservableObjectAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\n\nfunction getCachedObservablePropDescriptor(key) {\n return descriptorCache[key] || (descriptorCache[key] = {\n get: function get() {\n return this[$mobx].getObservablePropValue_(key);\n },\n set: function set(value) {\n return this[$mobx].setObservablePropValue_(key, value);\n }\n });\n}\n\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n return isObservableObjectAdministration(thing[$mobx]);\n }\n\n return false;\n}\nfunction recordAnnotationApplied(adm, annotation, key) {\n var _adm$target_$storedAn;\n\n if (true) {\n adm.appliedAnnotations_[key] = annotation;\n } // Remove applied decorator annotation so we don't try to apply it again in subclass constructor\n\n\n (_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? true : delete _adm$target_$storedAn[key];\n}\n\nfunction assertAnnotable(adm, annotation, key) {\n // Valid annotation\n if ( true && !isAnnotation(annotation)) {\n die(\"Cannot annotate '\" + adm.name_ + \".\" + key.toString() + \"': Invalid annotation.\");\n }\n /*\r\n // Configurable, not sealed, not frozen\r\n // Possibly not needed, just a little better error then the one thrown by engine.\r\n // Cases where this would be useful the most (subclass field initializer) are not interceptable by this.\r\n if (__DEV__) {\r\n const configurable = getDescriptor(adm.target_, key)?.configurable\r\n const frozen = Object.isFrozen(adm.target_)\r\n const sealed = Object.isSealed(adm.target_)\r\n if (!configurable || frozen || sealed) {\r\n const fieldName = `${adm.name_}.${key.toString()}`\r\n const requestedAnnotationType = annotation.annotationType_\r\n let error = `Cannot apply '${requestedAnnotationType}' to '${fieldName}':`\r\n if (frozen) {\r\n error += `\\nObject is frozen.`\r\n }\r\n if (sealed) {\r\n error += `\\nObject is sealed.`\r\n }\r\n if (!configurable) {\r\n error += `\\nproperty is not configurable.`\r\n // Mention only if caused by us to avoid confusion\r\n if (hasProp(adm.appliedAnnotations!, key)) {\r\n error += `\\nTo prevent accidental re-definition of a field by a subclass, `\r\n error += `all annotated fields of non-plain objects (classes) are not configurable.`\r\n }\r\n }\r\n die(error)\r\n }\r\n }\r\n */\n // Not annotated\n\n\n if ( true && !isOverride(annotation) && hasProp(adm.appliedAnnotations_, key)) {\n var fieldName = adm.name_ + \".\" + key.toString();\n var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already annotated with '\" + currentAnnotationType + \"'.\") + \"\\nRe-annotating fields is not allowed.\" + \"\\nUse 'override' annotation for methods overriden by subclass.\");\n }\n}\n\n/**\r\n * This array buffer contains two lists of properties, so that all arrays\r\n * can recycle their property definitions, which significantly improves performance of creating\r\n * properties on the fly.\r\n */\n\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array\n\nvar StubArray = function StubArray() {};\n\nfunction inherit(ctor, proto) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(ctor.prototype, proto);\n } else if (ctor.prototype.__proto__ !== undefined) {\n ctor.prototype.__proto__ = proto;\n } else {\n ctor.prototype = proto;\n }\n}\n\ninherit(StubArray, Array.prototype); // Weex proto freeze protection was here,\n// but it is unclear why the hack is need as MobX never changed the prototype\n// anyway, so removed it in V6\n\nvar LegacyObservableArray = /*#__PURE__*/function (_StubArray) {\n _inheritsLoose(LegacyObservableArray, _StubArray);\n\n function LegacyObservableArray(initialValues, enhancer, name, owned) {\n var _this;\n\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n _this = _StubArray.call(this) || this;\n var adm = new ObservableArrayAdministration(name, enhancer, owned, true);\n adm.proxy_ = _assertThisInitialized(_this);\n addHiddenFinalProp(_assertThisInitialized(_this), $mobx, adm);\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true); // @ts-ignore\n\n _this.spliceWithArray(0, 0, initialValues);\n\n allowStateChangesEnd(prev);\n }\n\n return _this;\n }\n\n var _proto = LegacyObservableArray.prototype;\n\n _proto.concat = function concat() {\n this[$mobx].atom_.reportObserved();\n\n for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {\n arrays[_key] = arguments[_key];\n }\n\n return Array.prototype.concat.apply(this.slice(), //@ts-ignore\n arrays.map(function (a) {\n return isObservableArray(a) ? a.slice() : a;\n }));\n };\n\n _proto[Symbol.iterator] = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function next() {\n // @ts-ignore\n return nextIndex < self.length ? {\n value: self[nextIndex++],\n done: false\n } : {\n done: true,\n value: undefined\n };\n }\n });\n };\n\n _createClass(LegacyObservableArray, [{\n key: \"length\",\n get: function get() {\n return this[$mobx].getArrayLength_();\n },\n set: function set(newLength) {\n this[$mobx].setArrayLength_(newLength);\n }\n }, {\n key: Symbol.toStringTag,\n get: function get() {\n return \"Array\";\n }\n }]);\n\n return LegacyObservableArray;\n}(StubArray);\n\nObject.entries(arrayExtensions).forEach(function (_ref) {\n var prop = _ref[0],\n fn = _ref[1];\n if (prop !== \"concat\") addHiddenProp(LegacyObservableArray.prototype, prop, fn);\n});\n\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: true,\n get: function get() {\n return this[$mobx].get_(index);\n },\n set: function set(value) {\n this[$mobx].set_(index, value);\n }\n };\n}\n\nfunction createArrayBufferItem(index) {\n defineProperty(LegacyObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\n\nfunction reserveArrayBuffer(max) {\n if (max > OBSERVABLE_ARRAY_BUFFER_SIZE) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max + 100; index++) {\n createArrayBufferItem(index);\n }\n\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n }\n}\nreserveArrayBuffer(1000);\nfunction createLegacyArray(initialValues, enhancer, name) {\n return new LegacyObservableArray(initialValues, enhancer, name);\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined) die(23);\n return thing[$mobx].atom_;\n }\n\n if (isObservableSet(thing)) {\n return thing[$mobx];\n }\n\n if (isObservableMap(thing)) {\n if (property === undefined) return thing.keysAtom_;\n var observable = thing.data_.get(property) || thing.hasMap_.get(property);\n if (!observable) die(25, property, getDebugName(thing));\n return observable;\n }\n\n if (isObservableObject(thing)) {\n if (!property) return die(26);\n\n var _observable = thing[$mobx].values_.get(property);\n\n if (!_observable) die(27, property, getDebugName(thing));\n return _observable;\n }\n\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n } else if (isFunction(thing)) {\n if (isReaction(thing[$mobx])) {\n // disposer function\n return thing[$mobx];\n }\n }\n\n die(28);\n}\nfunction getAdministration(thing, property) {\n if (!thing) die(29);\n if (property !== undefined) return getAdministration(getAtom(thing, property));\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) return thing;\n if (isObservableMap(thing) || isObservableSet(thing)) return thing;\n if (thing[$mobx]) return thing[$mobx];\n die(24, thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n\n if (property !== undefined) {\n named = getAtom(thing, property);\n } else if (isAction(thing)) {\n return thing.name;\n } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) {\n named = getAdministration(thing);\n } else {\n // valid for arrays as well\n named = getAtom(thing);\n }\n\n return named.name_;\n}\n\nvar toString = objectPrototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) {\n depth = -1;\n }\n\n return eq(a, b, depth);\n} // Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\n\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison).\n\n if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive.\n\n if (a !== a) return b !== b; // Exhaust primitive checks\n\n var type = typeof a;\n if (!isFunction(type) && type !== \"object\" && typeof b != \"object\") return false; // Compare `[[Class]]` names.\n\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\": // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values.\n\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n\n case \"[object Symbol]\":\n return typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b);\n\n case \"[object Map]\":\n case \"[object Set]\":\n // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n // Hide this extra level by increasing the depth.\n if (depth >= 0) {\n depth++;\n }\n\n break;\n } // Unwrap any wrapped objects.\n\n\n a = unwrap(a);\n b = unwrap(b);\n var areArrays = className === \"[object Array]\";\n\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\") return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n\n var aCtor = a.constructor,\n bCtor = b.constructor;\n\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && \"constructor\" in a && \"constructor\" in b) {\n return false;\n }\n }\n\n if (depth === 0) {\n return false;\n } else if (depth < 0) {\n depth = -1;\n } // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n\n\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n } // Add the first object to the stack of traversed objects.\n\n\n aStack.push(a);\n bStack.push(b); // Recursively compare objects and arrays.\n\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties.\n\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key;\n length = keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality.\n\n if (Object.keys(b).length !== length) return false;\n\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) return false;\n }\n } // Remove the first object from the stack of traversed objects.\n\n\n aStack.pop();\n bStack.pop();\n return true;\n}\n\nfunction unwrap(a) {\n if (isObservableArray(a)) return a.slice();\n if (isES6Map(a) || isObservableMap(a)) return Array.from(a.entries());\n if (isES6Set(a) || isObservableSet(a)) return Array.from(a.entries());\n return a;\n}\n\nfunction makeIterable(iterator) {\n iterator[Symbol.iterator] = getSelf;\n return iterator;\n}\n\nfunction getSelf() {\n return this;\n}\n\nfunction isAnnotation(thing) {\n return (// Can be function\n thing instanceof Object && typeof thing.annotationType_ === \"string\" && isFunction(thing.make_) && isFunction(thing.extend_)\n );\n}\n\n/**\r\n * (c) Michel Weststrate 2015 - 2020\r\n * MIT Licensed\r\n *\r\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\r\n * this is a good place to start:\r\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\r\n *\r\n * Source folders:\r\n * ===============\r\n *\r\n * - api/ Most of the public static methods exposed by the module can be found here.\r\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\r\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\r\n * - utils/ Utility stuff.\r\n *\r\n */\n[\"Symbol\", \"Map\", \"Set\"].forEach(function (m) {\n var g = getGlobal();\n\n if (typeof g[m] === \"undefined\") {\n die(\"MobX requires global '\" + m + \"' to be available or polyfilled\");\n }\n});\n\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n\n\n//# sourceMappingURL=mobx.esm.js.map\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx/dist/mobx.esm.js?");
18602
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"$mobx\": () => (/* binding */ $mobx),\n/* harmony export */ \"FlowCancellationError\": () => (/* binding */ FlowCancellationError),\n/* harmony export */ \"ObservableMap\": () => (/* binding */ ObservableMap),\n/* harmony export */ \"ObservableSet\": () => (/* binding */ ObservableSet),\n/* harmony export */ \"Reaction\": () => (/* binding */ Reaction),\n/* harmony export */ \"_allowStateChanges\": () => (/* binding */ allowStateChanges),\n/* harmony export */ \"_allowStateChangesInsideComputed\": () => (/* binding */ runInAction),\n/* harmony export */ \"_allowStateReadsEnd\": () => (/* binding */ allowStateReadsEnd),\n/* harmony export */ \"_allowStateReadsStart\": () => (/* binding */ allowStateReadsStart),\n/* harmony export */ \"_autoAction\": () => (/* binding */ autoAction),\n/* harmony export */ \"_endAction\": () => (/* binding */ _endAction),\n/* harmony export */ \"_getAdministration\": () => (/* binding */ getAdministration),\n/* harmony export */ \"_getGlobalState\": () => (/* binding */ getGlobalState),\n/* harmony export */ \"_interceptReads\": () => (/* binding */ interceptReads),\n/* harmony export */ \"_isComputingDerivation\": () => (/* binding */ isComputingDerivation),\n/* harmony export */ \"_resetGlobalState\": () => (/* binding */ resetGlobalState),\n/* harmony export */ \"_startAction\": () => (/* binding */ _startAction),\n/* harmony export */ \"action\": () => (/* binding */ action),\n/* harmony export */ \"autorun\": () => (/* binding */ autorun),\n/* harmony export */ \"comparer\": () => (/* binding */ comparer),\n/* harmony export */ \"computed\": () => (/* binding */ computed),\n/* harmony export */ \"configure\": () => (/* binding */ configure),\n/* harmony export */ \"createAtom\": () => (/* binding */ createAtom),\n/* harmony export */ \"defineProperty\": () => (/* binding */ apiDefineProperty),\n/* harmony export */ \"entries\": () => (/* binding */ entries),\n/* harmony export */ \"extendObservable\": () => (/* binding */ extendObservable),\n/* harmony export */ \"flow\": () => (/* binding */ flow),\n/* harmony export */ \"flowResult\": () => (/* binding */ flowResult),\n/* harmony export */ \"get\": () => (/* binding */ get),\n/* harmony export */ \"getAtom\": () => (/* binding */ getAtom),\n/* harmony export */ \"getDebugName\": () => (/* binding */ getDebugName),\n/* harmony export */ \"getDependencyTree\": () => (/* binding */ getDependencyTree),\n/* harmony export */ \"getObserverTree\": () => (/* binding */ getObserverTree),\n/* harmony export */ \"has\": () => (/* binding */ has),\n/* harmony export */ \"intercept\": () => (/* binding */ intercept),\n/* harmony export */ \"isAction\": () => (/* binding */ isAction),\n/* harmony export */ \"isBoxedObservable\": () => (/* binding */ isObservableValue),\n/* harmony export */ \"isComputed\": () => (/* binding */ isComputed),\n/* harmony export */ \"isComputedProp\": () => (/* binding */ isComputedProp),\n/* harmony export */ \"isFlow\": () => (/* binding */ isFlow),\n/* harmony export */ \"isFlowCancellationError\": () => (/* binding */ isFlowCancellationError),\n/* harmony export */ \"isObservable\": () => (/* binding */ isObservable),\n/* harmony export */ \"isObservableArray\": () => (/* binding */ isObservableArray),\n/* harmony export */ \"isObservableMap\": () => (/* binding */ isObservableMap),\n/* harmony export */ \"isObservableObject\": () => (/* binding */ isObservableObject),\n/* harmony export */ \"isObservableProp\": () => (/* binding */ isObservableProp),\n/* harmony export */ \"isObservableSet\": () => (/* binding */ isObservableSet),\n/* harmony export */ \"keys\": () => (/* binding */ keys),\n/* harmony export */ \"makeAutoObservable\": () => (/* binding */ makeAutoObservable),\n/* harmony export */ \"makeObservable\": () => (/* binding */ makeObservable),\n/* harmony export */ \"observable\": () => (/* binding */ observable),\n/* harmony export */ \"observe\": () => (/* binding */ observe),\n/* harmony export */ \"onBecomeObserved\": () => (/* binding */ onBecomeObserved),\n/* harmony export */ \"onBecomeUnobserved\": () => (/* binding */ onBecomeUnobserved),\n/* harmony export */ \"onReactionError\": () => (/* binding */ onReactionError),\n/* harmony export */ \"override\": () => (/* binding */ override),\n/* harmony export */ \"ownKeys\": () => (/* binding */ apiOwnKeys),\n/* harmony export */ \"reaction\": () => (/* binding */ reaction),\n/* harmony export */ \"remove\": () => (/* binding */ remove),\n/* harmony export */ \"runInAction\": () => (/* binding */ runInAction),\n/* harmony export */ \"set\": () => (/* binding */ set),\n/* harmony export */ \"spy\": () => (/* binding */ spy),\n/* harmony export */ \"toJS\": () => (/* binding */ toJS),\n/* harmony export */ \"trace\": () => (/* binding */ trace),\n/* harmony export */ \"transaction\": () => (/* binding */ transaction),\n/* harmony export */ \"untracked\": () => (/* binding */ untracked),\n/* harmony export */ \"values\": () => (/* binding */ values),\n/* harmony export */ \"when\": () => (/* binding */ when)\n/* harmony export */ });\nvar niceErrors = {\n 0: \"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'\",\n 1: function _(annotationType, key) {\n return \"Cannot apply '\" + annotationType + \"' to '\" + key.toString() + \"': Field not found.\";\n },\n\n /*\r\n 2(prop) {\r\n return `invalid decorator for '${prop.toString()}'`\r\n },\r\n 3(prop) {\r\n return `Cannot decorate '${prop.toString()}': action can only be used on properties with a function value.`\r\n },\r\n 4(prop) {\r\n return `Cannot decorate '${prop.toString()}': computed can only be used on getter properties.`\r\n },\r\n */\n 5: \"'keys()' can only be used on observable objects, arrays, sets and maps\",\n 6: \"'values()' can only be used on observable objects, arrays, sets and maps\",\n 7: \"'entries()' can only be used on observable objects, arrays and maps\",\n 8: \"'set()' can only be used on observable objects, arrays and maps\",\n 9: \"'remove()' can only be used on observable objects, arrays and maps\",\n 10: \"'has()' can only be used on observable objects, arrays and maps\",\n 11: \"'get()' can only be used on observable objects, arrays and maps\",\n 12: \"Invalid annotation\",\n 13: \"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)\",\n 14: \"Intercept handlers should return nothing or a change object\",\n 15: \"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)\",\n 16: \"Modification exception: the internal structure of an observable array was changed.\",\n 17: function _(index, length) {\n return \"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + length;\n },\n 18: \"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\",\n 19: function _(other) {\n return \"Cannot initialize from classes that inherit from Map: \" + other.constructor.name;\n },\n 20: function _(other) {\n return \"Cannot initialize map from \" + other;\n },\n 21: function _(dataStructure) {\n return \"Cannot convert to map from '\" + dataStructure + \"'\";\n },\n 22: \"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\",\n 23: \"It is not possible to get index atoms from arrays\",\n 24: function _(thing) {\n return \"Cannot obtain administration from \" + thing;\n },\n 25: function _(property, name) {\n return \"the entry '\" + property + \"' does not exist in the observable map '\" + name + \"'\";\n },\n 26: \"please specify a property\",\n 27: function _(property, name) {\n return \"no observable property '\" + property.toString() + \"' found on the observable object '\" + name + \"'\";\n },\n 28: function _(thing) {\n return \"Cannot obtain atom from \" + thing;\n },\n 29: \"Expecting some object\",\n 30: \"invalid action stack. did you forget to finish an action?\",\n 31: \"missing option for computed: get\",\n 32: function _(name, derivation) {\n return \"Cycle detected in computation \" + name + \": \" + derivation;\n },\n 33: function _(name) {\n return \"The setter of computed value '\" + name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\";\n },\n 34: function _(name) {\n return \"[ComputedValue '\" + name + \"'] It is not possible to assign a new value to a computed value.\";\n },\n 35: \"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\",\n 36: \"isolateGlobalState should be called before MobX is running any reactions\",\n 37: function _(method) {\n return \"[mobx] `observableArray.\" + method + \"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice().\" + method + \"()` instead\";\n },\n 38: \"'ownKeys()' can only be used on observable objects\",\n 39: \"'defineProperty()' can only be used on observable objects\"\n};\nvar errors = true ? niceErrors : 0;\nfunction die(error) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (true) {\n var e = typeof error === \"string\" ? error : errors[error];\n if (typeof e === \"function\") e = e.apply(null, args);\n throw new Error(\"[MobX] \" + e);\n }\n\n throw new Error(typeof error === \"number\" ? \"[MobX] minified error nr: \" + error + (args.length ? \" \" + args.map(String).join(\",\") : \"\") + \". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts\" : \"[MobX] \" + error);\n}\n\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n\n if (typeof window !== \"undefined\") {\n return window;\n }\n\n if (typeof global !== \"undefined\") {\n return global;\n }\n\n if (typeof self !== \"undefined\") {\n return self;\n }\n\n return mockGlobal;\n}\n\nvar assign = Object.assign;\nvar getDescriptor = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar objectPrototype = Object.prototype;\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nvar hasProxy = typeof Proxy !== \"undefined\";\nvar plainObjectString = /*#__PURE__*/Object.toString();\nfunction assertProxies() {\n if (!hasProxy) {\n die( true ? \"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`\" : 0);\n }\n}\nfunction warnAboutProxyRequirement(msg) {\n if ( true && globalState.verifyProxies) {\n die(\"MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to \" + msg);\n }\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\n/**\r\n * Makes sure that the provided function is invoked at most once.\r\n */\n\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked) {\n return;\n }\n\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function noop() {};\nfunction isFunction(fn) {\n return typeof fn === \"function\";\n}\nfunction isStringish(value) {\n var t = typeof value;\n\n switch (t) {\n case \"string\":\n case \"symbol\":\n case \"number\":\n return true;\n }\n\n return false;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n if (!isObject(value)) {\n return false;\n }\n\n var proto = Object.getPrototypeOf(value);\n\n if (proto == null) {\n return true;\n }\n\n var protoConstructor = Object.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof protoConstructor === \"function\" && protoConstructor.toString() === plainObjectString;\n} // https://stackoverflow.com/a/37865170\n\nfunction isGenerator(obj) {\n var constructor = obj == null ? void 0 : obj.constructor;\n\n if (!constructor) {\n return false;\n }\n\n if (\"GeneratorFunction\" === constructor.name || \"GeneratorFunction\" === constructor.displayName) {\n return true;\n }\n\n return false;\n}\nfunction addHiddenProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction createInstanceofPredicate(name, theClass) {\n var propName = \"isMobX\" + name;\n theClass.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\nfunction isES6Map(thing) {\n return thing instanceof Map;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\nvar hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== \"undefined\";\n/**\r\n * Returns the following: own enumerable keys and symbols.\r\n */\n\nfunction getPlainObjectKeys(object) {\n var keys = Object.keys(object); // Not supported in IE, so there are not going to be symbol props anyway...\n\n if (!hasGetOwnPropertySymbols) {\n return keys;\n }\n\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (!symbols.length) {\n return keys;\n }\n\n return [].concat(keys, symbols.filter(function (s) {\n return objectPrototype.propertyIsEnumerable.call(object, s);\n }));\n} // From Immer utils\n// Returns all own keys, including non-enumerable and symbolic\n\nvar ownKeys = typeof Reflect !== \"undefined\" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {\n return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));\n} :\n/* istanbul ignore next */\nObject.getOwnPropertyNames;\nfunction stringifyKey(key) {\n if (typeof key === \"string\") {\n return key;\n }\n\n if (typeof key === \"symbol\") {\n return key.toString();\n }\n\n return new String(key).toString();\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\nfunction hasProp(target, prop) {\n return objectPrototype.hasOwnProperty.call(target, prop);\n} // From Immer utils\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(target) {\n // Polyfill needed for Hermes and IE, see https://github.com/facebook/hermes/issues/274\n var res = {}; // Note: without polyfill for ownKeys, symbols won't be picked up\n\n ownKeys(target).forEach(function (key) {\n res[key] = getDescriptor(target, key);\n });\n return res;\n};\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (it) return (it = it.call(o)).next.bind(it);\n\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar storedAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-stored-annotations\");\n/**\r\n * Creates a function that acts as\r\n * - decorator\r\n * - annotation object\r\n */\n\nfunction createDecoratorAnnotation(annotation) {\n function decorator(target, property) {\n storeAnnotation(target, property, annotation);\n }\n\n return Object.assign(decorator, annotation);\n}\n/**\r\n * Stores annotation to prototype,\r\n * so it can be inspected later by `makeObservable` called from constructor\r\n */\n\nfunction storeAnnotation(prototype, key, annotation) {\n if (!hasProp(prototype, storedAnnotationsSymbol)) {\n addHiddenProp(prototype, storedAnnotationsSymbol, _extends({}, prototype[storedAnnotationsSymbol]));\n } // @override must override something\n\n\n if ( true && isOverride(annotation) && !hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n die(\"'\" + fieldName + \"' is decorated with 'override', \" + \"but no such decorated member was found on prototype.\");\n } // Cannot re-decorate\n\n\n assertNotDecorated(prototype, annotation, key); // Ignore override\n\n if (!isOverride(annotation)) {\n prototype[storedAnnotationsSymbol][key] = annotation;\n }\n}\n\nfunction assertNotDecorated(prototype, annotation, key) {\n if ( true && !isOverride(annotation) && hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '@\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already decorated with '@\" + currentAnnotationType + \"'.\") + \"\\nRe-decorating fields is not allowed.\" + \"\\nUse '@override' decorator for methods overriden by subclass.\");\n }\n}\n/**\r\n * Collects annotations from prototypes and stores them on target (instance)\r\n */\n\n\nfunction collectStoredAnnotations(target) {\n if (!hasProp(target, storedAnnotationsSymbol)) {\n if ( true && !target[storedAnnotationsSymbol]) {\n die(\"No annotations were passed to makeObservable, but no decorated members have been found either\");\n } // We need a copy as we will remove annotation from the list once it's applied.\n\n\n addHiddenProp(target, storedAnnotationsSymbol, _extends({}, target[storedAnnotationsSymbol]));\n }\n\n return target[storedAnnotationsSymbol];\n}\n\nvar $mobx = /*#__PURE__*/Symbol(\"mobx administration\");\nvar Atom = /*#__PURE__*/function () {\n // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n\n /**\r\n * Create a new atom. For debugging purposes it is recommended to give it a name.\r\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\r\n */\n function Atom(name_) {\n if (name_ === void 0) {\n name_ = true ? \"Atom@\" + getNextId() : 0;\n }\n\n this.name_ = void 0;\n this.isPendingUnobservation_ = false;\n this.isBeingObserved_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.NOT_TRACKING_;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n this.name_ = name_;\n } // onBecomeObservedListeners\n\n\n var _proto = Atom.prototype;\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Invoke this method to notify mobx that your atom has been used somehow.\r\n * Returns true if there is currently a reactive context.\r\n */\n ;\n\n _proto.reportObserved = function reportObserved$1() {\n return reportObserved(this);\n }\n /**\r\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\r\n */\n ;\n\n _proto.reportChanged = function reportChanged() {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n\n _proto.toString = function toString() {\n return this.name_;\n };\n\n return Atom;\n}();\nvar isAtom = /*#__PURE__*/createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) {\n onBecomeObservedHandler = noop;\n }\n\n if (onBecomeUnobservedHandler === void 0) {\n onBecomeUnobservedHandler = noop;\n }\n\n var atom = new Atom(name); // default `noop` listener will not initialize the hook Set\n\n if (onBecomeObservedHandler !== noop) {\n onBecomeObserved(atom, onBecomeObservedHandler);\n }\n\n if (onBecomeUnobservedHandler !== noop) {\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n }\n\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\n\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\n\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\n\nfunction defaultComparer(a, b) {\n if (Object.is) {\n return Object.is(a, b);\n }\n\n return a === b ? a !== 0 || 1 / a === 1 / b : a !== a && b !== b;\n}\n\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n \"default\": defaultComparer,\n shallow: shallowComparer\n};\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v)) {\n return v;\n } // something that can be converted and mutated?\n\n\n if (Array.isArray(v)) {\n return observable.array(v, {\n name: name\n });\n }\n\n if (isPlainObject(v)) {\n return observable.object(v, undefined, {\n name: name\n });\n }\n\n if (isES6Map(v)) {\n return observable.map(v, {\n name: name\n });\n }\n\n if (isES6Set(v)) {\n return observable.set(v, {\n name: name\n });\n }\n\n if (typeof v === \"function\" && !isAction(v) && !isFlow(v)) {\n if (isGenerator(v)) {\n return flow(v);\n } else {\n return autoAction(name, v);\n }\n }\n\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null) {\n return v;\n }\n\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v)) {\n return v;\n }\n\n if (Array.isArray(v)) {\n return observable.array(v, {\n name: name,\n deep: false\n });\n }\n\n if (isPlainObject(v)) {\n return observable.object(v, undefined, {\n name: name,\n deep: false\n });\n }\n\n if (isES6Map(v)) {\n return observable.map(v, {\n name: name,\n deep: false\n });\n }\n\n if (isES6Set(v)) {\n return observable.set(v, {\n name: name,\n deep: false\n });\n }\n\n if (true) {\n die(\"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n }\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue) {\n if ( true && isObservable(v)) {\n die(\"observable.struct should not be used with observable values\");\n }\n\n if (deepEqual(v, oldValue)) {\n return oldValue;\n }\n\n return v;\n}\n\nvar OVERRIDE = \"override\";\nvar override = /*#__PURE__*/createDecoratorAnnotation({\n annotationType_: OVERRIDE,\n make_: make_,\n extend_: extend_\n});\nfunction isOverride(annotation) {\n return annotation.annotationType_ === OVERRIDE;\n}\n\nfunction make_(adm, key) {\n // Must not be plain object\n if ( true && adm.isPlainObject_) {\n die(\"Cannot apply '\" + this.annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + this.annotationType_ + \"' cannot be used on plain objects.\"));\n } // Must override something\n\n\n if ( true && !hasProp(adm.appliedAnnotations_, key)) {\n die(\"'\" + adm.name_ + \".\" + key.toString() + \"' is annotated with '\" + this.annotationType_ + \"', \" + \"but no such annotated member was found on prototype.\");\n }\n\n return 0\n /* Cancel */\n ;\n}\n\nfunction extend_(adm, key, descriptor, proxyTrap) {\n die(\"'\" + this.annotationType_ + \"' can only be used with 'makeObservable'\");\n}\n\nfunction createActionAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$1,\n extend_: extend_$1\n };\n}\n\nfunction make_$1(adm, key, descriptor, source) {\n var _this$options_;\n\n // bound\n if ((_this$options_ = this.options_) != null && _this$options_.bound) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n } // own\n\n\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // prototype\n\n\n if (isAction(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1\n /* Break */\n ;\n }\n\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false);\n defineProperty(source, key, actionDescriptor);\n return 2\n /* Continue */\n ;\n}\n\nfunction extend_$1(adm, key, descriptor, proxyTrap) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, actionDescriptor, proxyTrap);\n}\n\nfunction assertActionDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if ( true && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a function value.\"));\n }\n}\n\nfunction createActionDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n var _annotation$options_, _annotation$options_$, _annotation$options_2, _annotation$options_$2, _annotation$options_3, _annotation$options_4, _adm$proxy_2;\n\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertActionDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n\n if ((_annotation$options_ = annotation.options_) != null && _annotation$options_.bound) {\n var _adm$proxy_;\n\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return {\n value: createAction((_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), value, (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false, // https://github.com/mobxjs/mobx/discussions/3140\n (_annotation$options_4 = annotation.options_) != null && _annotation$options_4.bound ? (_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_ : undefined),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createFlowAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$2,\n extend_: extend_$2\n };\n}\n\nfunction make_$2(adm, key, descriptor, source) {\n var _this$options_;\n\n // own\n if (source === adm.target_) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // prototype\n // bound - must annotate protos to support super.flow()\n\n\n if ((_this$options_ = this.options_) != null && _this$options_.bound && (!hasProp(adm.target_, key) || !isFlow(adm.target_[key]))) {\n if (this.extend_(adm, key, descriptor, false) === null) {\n return 0\n /* Cancel */\n ;\n }\n }\n\n if (isFlow(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n return 1\n /* Break */\n ;\n }\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false, false);\n defineProperty(source, key, flowDescriptor);\n return 2\n /* Continue */\n ;\n}\n\nfunction extend_$2(adm, key, descriptor, proxyTrap) {\n var _this$options_2;\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, (_this$options_2 = this.options_) == null ? void 0 : _this$options_2.bound);\n return adm.defineProperty_(key, flowDescriptor, proxyTrap);\n}\n\nfunction assertFlowDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if ( true && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a generator function value.\"));\n }\n}\n\nfunction createFlowDescriptor(adm, annotation, key, descriptor, bound, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertFlowDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value; // In case of flow.bound, the descriptor can be from already annotated prototype\n\n if (!isFlow(value)) {\n value = flow(value);\n }\n\n if (bound) {\n var _adm$proxy_;\n\n // We do not keep original function around, so we bind the existing flow\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_); // This is normally set by `flow`, but `bind` returns new function...\n\n value.isMobXFlow = true;\n }\n\n return {\n value: value,\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createComputedAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$3,\n extend_: extend_$3\n };\n}\n\nfunction make_$3(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n}\n\nfunction extend_$3(adm, key, descriptor, proxyTrap) {\n assertComputedDescriptor(adm, this, key, descriptor);\n return adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }), proxyTrap);\n}\n\nfunction assertComputedDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var get = _ref2.get;\n\n if ( true && !get) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on getter(+setter) properties.\"));\n }\n}\n\nfunction createObservableAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$4,\n extend_: extend_$4\n };\n}\n\nfunction make_$4(adm, key, descriptor) {\n return this.extend_(adm, key, descriptor, false) === null ? 0\n /* Cancel */\n : 1\n /* Break */\n ;\n}\n\nfunction extend_$4(adm, key, descriptor, proxyTrap) {\n var _this$options_$enhanc, _this$options_;\n\n assertObservableDescriptor(adm, this, key, descriptor);\n return adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc = (_this$options_ = this.options_) == null ? void 0 : _this$options_.enhancer) != null ? _this$options_$enhanc : deepEnhancer, proxyTrap);\n}\n\nfunction assertObservableDescriptor(adm, _ref, key, descriptor) {\n var annotationType_ = _ref.annotationType_;\n\n if ( true && !(\"value\" in descriptor)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' cannot be used on getter/setter properties\"));\n }\n}\n\nvar AUTO = \"true\";\nvar autoAnnotation = /*#__PURE__*/createAutoAnnotation();\nfunction createAutoAnnotation(options) {\n return {\n annotationType_: AUTO,\n options_: options,\n make_: make_$5,\n extend_: extend_$5\n };\n}\n\nfunction make_$5(adm, key, descriptor, source) {\n var _this$options_3, _this$options_4;\n\n // getter -> computed\n if (descriptor.get) {\n return computed.make_(adm, key, descriptor, source);\n } // lone setter -> action setter\n\n\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.make_\n var set = createAction(key.toString(), descriptor.set); // own\n\n if (source === adm.target_) {\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: set\n }) === null ? 0\n /* Cancel */\n : 2\n /* Continue */\n ;\n } // proto\n\n\n defineProperty(source, key, {\n configurable: true,\n set: set\n });\n return 2\n /* Continue */\n ;\n } // function on proto -> autoAction/flow\n\n\n if (source !== adm.target_ && typeof descriptor.value === \"function\") {\n var _this$options_2;\n\n if (isGenerator(descriptor.value)) {\n var _this$options_;\n\n var flowAnnotation = (_this$options_ = this.options_) != null && _this$options_.autoBind ? flow.bound : flow;\n return flowAnnotation.make_(adm, key, descriptor, source);\n }\n\n var actionAnnotation = (_this$options_2 = this.options_) != null && _this$options_2.autoBind ? autoAction.bound : autoAction;\n return actionAnnotation.make_(adm, key, descriptor, source);\n } // other -> observable\n // Copy props from proto as well, see test:\n // \"decorate should work with Object.create\"\n\n\n var observableAnnotation = ((_this$options_3 = this.options_) == null ? void 0 : _this$options_3.deep) === false ? observable.ref : observable; // if function respect autoBind option\n\n if (typeof descriptor.value === \"function\" && (_this$options_4 = this.options_) != null && _this$options_4.autoBind) {\n var _adm$proxy_;\n\n descriptor.value = descriptor.value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return observableAnnotation.make_(adm, key, descriptor, source);\n}\n\nfunction extend_$5(adm, key, descriptor, proxyTrap) {\n var _this$options_5, _this$options_6;\n\n // getter -> computed\n if (descriptor.get) {\n return computed.extend_(adm, key, descriptor, proxyTrap);\n } // lone setter -> action setter\n\n\n if (descriptor.set) {\n // TODO make action applicable to setter and delegate to action.extend_\n return adm.defineProperty_(key, {\n configurable: globalState.safeDescriptors ? adm.isPlainObject_ : true,\n set: createAction(key.toString(), descriptor.set)\n }, proxyTrap);\n } // other -> observable\n // if function respect autoBind option\n\n\n if (typeof descriptor.value === \"function\" && (_this$options_5 = this.options_) != null && _this$options_5.autoBind) {\n var _adm$proxy_2;\n\n descriptor.value = descriptor.value.bind((_adm$proxy_2 = adm.proxy_) != null ? _adm$proxy_2 : adm.target_);\n }\n\n var observableAnnotation = ((_this$options_6 = this.options_) == null ? void 0 : _this$options_6.deep) === false ? observable.ref : observable;\n return observableAnnotation.extend_(adm, key, descriptor, proxyTrap);\n}\n\nvar OBSERVABLE = \"observable\";\nvar OBSERVABLE_REF = \"observable.ref\";\nvar OBSERVABLE_SHALLOW = \"observable.shallow\";\nvar OBSERVABLE_STRUCT = \"observable.struct\"; // Predefined bags of create observable options, to avoid allocating temporarily option objects\n// in the majority of cases\n\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined,\n proxy: true\n};\nObject.freeze(defaultCreateObservableOptions);\nfunction asCreateObservableOptions(thing) {\n return thing || defaultCreateObservableOptions;\n}\nvar observableAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE);\nvar observableRefAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_REF, {\n enhancer: referenceEnhancer\n});\nvar observableShallowAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_SHALLOW, {\n enhancer: shallowEnhancer\n});\nvar observableStructAnnotation = /*#__PURE__*/createObservableAnnotation(OBSERVABLE_STRUCT, {\n enhancer: refStructEnhancer\n});\nvar observableDecoratorAnnotation = /*#__PURE__*/createDecoratorAnnotation(observableAnnotation);\nfunction getEnhancerFromOptions(options) {\n return options.deep === true ? deepEnhancer : options.deep === false ? referenceEnhancer : getEnhancerFromAnnotation(options.defaultDecorator);\n}\nfunction getAnnotationFromOptions(options) {\n var _options$defaultDecor;\n\n return options ? (_options$defaultDecor = options.defaultDecorator) != null ? _options$defaultDecor : createAutoAnnotation(options) : undefined;\n}\nfunction getEnhancerFromAnnotation(annotation) {\n var _annotation$options_$, _annotation$options_;\n\n return !annotation ? deepEnhancer : (_annotation$options_$ = (_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.enhancer) != null ? _annotation$options_$ : deepEnhancer;\n}\n/**\r\n * Turns an object, array or function into a reactive structure.\r\n * @param v the value which should become observable.\r\n */\n\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (isStringish(arg2)) {\n storeAnnotation(v, arg2, observableAnnotation);\n return;\n } // already observable - ignore\n\n\n if (isObservable(v)) {\n return v;\n } // plain object\n\n\n if (isPlainObject(v)) {\n return observable.object(v, arg2, arg3);\n } // Array\n\n\n if (Array.isArray(v)) {\n return observable.array(v, arg2);\n } // Map\n\n\n if (isES6Map(v)) {\n return observable.map(v, arg2);\n } // Set\n\n\n if (isES6Set(v)) {\n return observable.set(v, arg2);\n } // other object - ignore\n\n\n if (typeof v === \"object\" && v !== null) {\n return v;\n } // anything else\n\n\n return observable.box(v, arg2);\n}\n\nObject.assign(createObservable, observableDecoratorAnnotation);\nvar observableFactories = {\n box: function box(value, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n array: function array(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return (globalState.useProxies === false || o.proxy === false ? createLegacyArray : createObservableArray)(initialValues, getEnhancerFromOptions(o), o.name);\n },\n map: function map(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n set: function set(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function object(props, decorators, options) {\n return extendObservable(globalState.useProxies === false || (options == null ? void 0 : options.proxy) === false ? asObservableObject({}, options) : asDynamicObservableObject({}, options), props, decorators);\n },\n ref: /*#__PURE__*/createDecoratorAnnotation(observableRefAnnotation),\n shallow: /*#__PURE__*/createDecoratorAnnotation(observableShallowAnnotation),\n deep: observableDecoratorAnnotation,\n struct: /*#__PURE__*/createDecoratorAnnotation(observableStructAnnotation)\n}; // eslint-disable-next-line\n\nvar observable = /*#__PURE__*/assign(createObservable, observableFactories);\n\nvar COMPUTED = \"computed\";\nvar COMPUTED_STRUCT = \"computed.struct\";\nvar computedAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED);\nvar computedStructAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED_STRUCT, {\n equals: comparer.structural\n});\n/**\r\n * Decorator for class properties: @computed get value() { return expr; }.\r\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\r\n */\n\nvar computed = function computed(arg1, arg2) {\n if (isStringish(arg2)) {\n // @computed\n return storeAnnotation(arg1, arg2, computedAnnotation);\n }\n\n if (isPlainObject(arg1)) {\n // @computed({ options })\n return createDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1));\n } // computed(expr, options?)\n\n\n if (true) {\n if (!isFunction(arg1)) {\n die(\"First argument to `computed` should be an expression.\");\n }\n\n if (isFunction(arg2)) {\n die(\"A setter as second argument is no longer supported, use `{ set: fn }` option instead\");\n }\n }\n\n var opts = isPlainObject(arg2) ? arg2 : {};\n opts.get = arg1;\n opts.name || (opts.name = arg1.name || \"\");\n /* for generated name */\n\n return new ComputedValue(opts);\n};\nObject.assign(computed, computedAnnotation);\ncomputed.struct = /*#__PURE__*/createDecoratorAnnotation(computedStructAnnotation);\n\nvar _getDescriptor$config, _getDescriptor;\n// mobx versions\n\nvar currentActionId = 0;\nvar nextActionId = 1;\nvar isFunctionNameConfigurable = (_getDescriptor$config = (_getDescriptor = /*#__PURE__*/getDescriptor(function () {}, \"name\")) == null ? void 0 : _getDescriptor.configurable) != null ? _getDescriptor$config : false; // we can safely recycle this object\n\nvar tmpNameDescriptor = {\n value: \"action\",\n configurable: true,\n writable: false,\n enumerable: false\n};\nfunction createAction(actionName, fn, autoAction, ref) {\n if (autoAction === void 0) {\n autoAction = false;\n }\n\n if (true) {\n if (!isFunction(fn)) {\n die(\"`action` can only be invoked on functions\");\n }\n\n if (typeof actionName !== \"string\" || !actionName) {\n die(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n }\n\n function res() {\n return executeAction(actionName, autoAction, fn, ref || this, arguments);\n }\n\n res.isMobxAction = true;\n\n if (isFunctionNameConfigurable) {\n tmpNameDescriptor.value = actionName;\n Object.defineProperty(res, \"name\", tmpNameDescriptor);\n }\n\n return res;\n}\nfunction executeAction(actionName, canRunAsDerivation, fn, scope, args) {\n var runInfo = _startAction(actionName, canRunAsDerivation, scope, args);\n\n try {\n return fn.apply(scope, args);\n } catch (err) {\n runInfo.error_ = err;\n throw err;\n } finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, canRunAsDerivation, // true for autoAction\nscope, args) {\n var notifySpy_ = true && isSpyEnabled() && !!actionName;\n var startTime_ = 0;\n\n if ( true && notifySpy_) {\n startTime_ = Date.now();\n var flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY;\n spyReportStart({\n type: ACTION,\n name: actionName,\n object: scope,\n arguments: flattenedArgs\n });\n }\n\n var prevDerivation_ = globalState.trackingDerivation;\n var runAsAction = !canRunAsDerivation || !prevDerivation_;\n startBatch();\n var prevAllowStateChanges_ = globalState.allowStateChanges; // by default preserve previous allow\n\n if (runAsAction) {\n untrackedStart();\n prevAllowStateChanges_ = allowStateChangesStart(true);\n }\n\n var prevAllowStateReads_ = allowStateReadsStart(true);\n var runInfo = {\n runAsAction_: runAsAction,\n prevDerivation_: prevDerivation_,\n prevAllowStateChanges_: prevAllowStateChanges_,\n prevAllowStateReads_: prevAllowStateReads_,\n notifySpy_: notifySpy_,\n startTime_: startTime_,\n actionId_: nextActionId++,\n parentActionId_: currentActionId\n };\n currentActionId = runInfo.actionId_;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId_) {\n die(30);\n }\n\n currentActionId = runInfo.parentActionId_;\n\n if (runInfo.error_ !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n\n allowStateChangesEnd(runInfo.prevAllowStateChanges_);\n allowStateReadsEnd(runInfo.prevAllowStateReads_);\n endBatch();\n\n if (runInfo.runAsAction_) {\n untrackedEnd(runInfo.prevDerivation_);\n }\n\n if ( true && runInfo.notifySpy_) {\n spyReportEnd({\n time: Date.now() - runInfo.startTime_\n });\n }\n\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n\n try {\n return func();\n } finally {\n allowStateChangesEnd(prev);\n }\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\n\nvar _Symbol$toPrimitive;\nvar CREATE = \"create\";\n_Symbol$toPrimitive = Symbol.toPrimitive;\nvar ObservableValue = /*#__PURE__*/function (_Atom, _Symbol$toPrimitive2) {\n _inheritsLoose(ObservableValue, _Atom);\n\n function ObservableValue(value, enhancer, name_, notifySpy, equals) {\n var _this;\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableValue@\" + getNextId() : 0;\n }\n\n if (notifySpy === void 0) {\n notifySpy = true;\n }\n\n if (equals === void 0) {\n equals = comparer[\"default\"];\n }\n\n _this = _Atom.call(this, name_) || this;\n _this.enhancer = void 0;\n _this.name_ = void 0;\n _this.equals = void 0;\n _this.hasUnreportedChange_ = false;\n _this.interceptors_ = void 0;\n _this.changeListeners_ = void 0;\n _this.value_ = void 0;\n _this.dehancer = void 0;\n _this.enhancer = enhancer;\n _this.name_ = name_;\n _this.equals = equals;\n _this.value_ = enhancer(value, undefined, name_);\n\n if ( true && notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({\n type: CREATE,\n object: _assertThisInitialized(_this),\n observableKind: \"value\",\n debugObjectName: _this.name_,\n newValue: \"\" + _this.value_\n });\n }\n\n return _this;\n }\n\n var _proto = ObservableValue.prototype;\n\n _proto.dehanceValue = function dehanceValue(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.set = function set(newValue) {\n var oldValue = this.value_;\n newValue = this.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n\n if ( true && notifySpy) {\n spyReportStart({\n type: UPDATE,\n object: this,\n observableKind: \"value\",\n debugObjectName: this.name_,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n\n this.setNewValue_(newValue);\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n }\n };\n\n _proto.prepareNewValue_ = function prepareNewValue_(newValue) {\n checkIfStateModificationsAreAllowed(this);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: UPDATE,\n newValue: newValue\n });\n\n if (!change) {\n return globalState.UNCHANGED;\n }\n\n newValue = change.newValue;\n } // apply modifier\n\n\n newValue = this.enhancer(newValue, this.value_, this.name_);\n return this.equals(this.value_, newValue) ? globalState.UNCHANGED : newValue;\n };\n\n _proto.setNewValue_ = function setNewValue_(newValue) {\n var oldValue = this.value_;\n this.value_ = newValue;\n this.reportChanged();\n\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: UPDATE,\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n\n _proto.get = function get() {\n this.reportObserved();\n return this.dehanceValue(this.value_);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately) {\n listener({\n observableKind: \"value\",\n debugObjectName: this.name_,\n object: this,\n type: UPDATE,\n newValue: this.value_,\n oldValue: undefined\n });\n }\n\n return registerListener(this, listener);\n };\n\n _proto.raw = function raw() {\n // used by MST ot get undehanced value\n return this.value_;\n };\n\n _proto.toJSON = function toJSON() {\n return this.get();\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.value_ + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive2] = function () {\n return this.valueOf();\n };\n\n return ObservableValue;\n}(Atom, _Symbol$toPrimitive);\nvar isObservableValue = /*#__PURE__*/createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\nvar _Symbol$toPrimitive$1;\n/**\r\n * A node in the state dependency root that observes other nodes, and can be observed itself.\r\n *\r\n * ComputedValue will remember the result of the computation for the duration of the batch, or\r\n * while being observed.\r\n *\r\n * During this time it will recompute only when one of its direct dependencies changed,\r\n * but only when it is being accessed with `ComputedValue.get()`.\r\n *\r\n * Implementation description:\r\n * 1. First time it's being accessed it will compute and remember result\r\n * give back remembered result until 2. happens\r\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\r\n * 3. When it's being accessed, recompute if any shallow dependency changed.\r\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\r\n * go to step 2. either way\r\n *\r\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\r\n */\n\n_Symbol$toPrimitive$1 = Symbol.toPrimitive;\nvar ComputedValue = /*#__PURE__*/function (_Symbol$toPrimitive2) {\n // nodes we are looking at. Our value depends on these nodes\n // during tracking it's an array with new observed observers\n // to check for cycles\n // N.B: unminified as it is used by MST\n\n /**\r\n * Create a new computed value based on a function expression.\r\n *\r\n * The `name` property is for debug purposes only.\r\n *\r\n * The `equals` property specifies the comparer function to use to determine if a newly produced\r\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\r\n * compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.\r\n * Structural comparison can be convenient if you always produce a new aggregated object and\r\n * don't want to notify observers if it is structurally the same.\r\n * This is useful for working with vectors, mouse coordinates etc.\r\n */\n function ComputedValue(options) {\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.observing_ = [];\n this.newObserving_ = null;\n this.isBeingObserved_ = false;\n this.isPendingUnobservation_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n this.unboundDepsCount_ = 0;\n this.value_ = new CaughtException(null);\n this.name_ = void 0;\n this.triggeredBy_ = void 0;\n this.isComputing_ = false;\n this.isRunningSetter_ = false;\n this.derivation = void 0;\n this.setter_ = void 0;\n this.isTracing_ = TraceMode.NONE;\n this.scope_ = void 0;\n this.equals_ = void 0;\n this.requiresReaction_ = void 0;\n this.keepAlive_ = void 0;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n\n if (!options.get) {\n die(31);\n }\n\n this.derivation = options.get;\n this.name_ = options.name || ( true ? \"ComputedValue@\" + getNextId() : 0);\n\n if (options.set) {\n this.setter_ = createAction( true ? this.name_ + \"-setter\" : 0, options.set);\n }\n\n this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer[\"default\"]);\n this.scope_ = options.context;\n this.requiresReaction_ = options.requiresReaction;\n this.keepAlive_ = !!options.keepAlive;\n }\n\n var _proto = ComputedValue.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n propagateMaybeChanged(this);\n };\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Returns the current value of this computed value.\r\n * Will evaluate its computation first if needed.\r\n */\n ;\n\n _proto.get = function get() {\n if (this.isComputing_) {\n die(32, this.name_, this.derivation);\n }\n\n if (globalState.inBatch === 0 && // !globalState.trackingDerivatpion &&\n this.observers_.size === 0 && !this.keepAlive_) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead_();\n startBatch(); // See perf test 'computed memoization'\n\n this.value_ = this.computeValue_(false);\n endBatch();\n }\n } else {\n reportObserved(this);\n\n if (shouldCompute(this)) {\n var prevTrackingContext = globalState.trackingContext;\n\n if (this.keepAlive_ && !prevTrackingContext) {\n globalState.trackingContext = this;\n }\n\n if (this.trackAndCompute()) {\n propagateChangeConfirmed(this);\n }\n\n globalState.trackingContext = prevTrackingContext;\n }\n }\n\n var result = this.value_;\n\n if (isCaughtException(result)) {\n throw result.cause;\n }\n\n return result;\n };\n\n _proto.set = function set(value) {\n if (this.setter_) {\n if (this.isRunningSetter_) {\n die(33, this.name_);\n }\n\n this.isRunningSetter_ = true;\n\n try {\n this.setter_.call(this.scope_, value);\n } finally {\n this.isRunningSetter_ = false;\n }\n } else {\n die(34, this.name_);\n }\n };\n\n _proto.trackAndCompute = function trackAndCompute() {\n // N.B: unminified as it is used by MST\n var oldValue = this.value_;\n var wasSuspended =\n /* see #1208 */\n this.dependenciesState_ === IDerivationState_.NOT_TRACKING_;\n var newValue = this.computeValue_(true);\n var changed = wasSuspended || isCaughtException(oldValue) || isCaughtException(newValue) || !this.equals_(oldValue, newValue);\n\n if (changed) {\n this.value_ = newValue;\n\n if ( true && isSpyEnabled()) {\n spyReport({\n observableKind: \"computed\",\n debugObjectName: this.name_,\n object: this.scope_,\n type: \"update\",\n oldValue: oldValue,\n newValue: newValue\n });\n }\n }\n\n return changed;\n };\n\n _proto.computeValue_ = function computeValue_(track) {\n this.isComputing_ = true; // don't allow state changes during computation\n\n var prev = allowStateChangesStart(false);\n var res;\n\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope_);\n } else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope_);\n } else {\n try {\n res = this.derivation.call(this.scope_);\n } catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n\n allowStateChangesEnd(prev);\n this.isComputing_ = false;\n return res;\n };\n\n _proto.suspend_ = function suspend_() {\n if (!this.keepAlive_) {\n clearObserving(this);\n this.value_ = undefined; // don't hold on to computed value!\n\n if ( true && this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] Computed value '\" + this.name_ + \"' was suspended and it will recompute on the next access.\");\n }\n }\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n var _this = this;\n\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n // TODO: why is this in a different place than the spyReport() function? in all other observables it's called in the same place\n var newValue = _this.get();\n\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n observableKind: \"computed\",\n debugObjectName: _this.name_,\n type: UPDATE,\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n\n firstTime = false;\n prevValue = newValue;\n });\n };\n\n _proto.warnAboutUntrackedRead_ = function warnAboutUntrackedRead_() {\n if (false) {}\n\n if (this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] Computed value '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute.\");\n }\n\n if (typeof this.requiresReaction_ === \"boolean\" ? this.requiresReaction_ : globalState.computedRequiresReaction) {\n console.warn(\"[mobx] Computed value '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute.\");\n }\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.derivation.toString() + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive2] = function () {\n return this.valueOf();\n };\n\n return ComputedValue;\n}(_Symbol$toPrimitive$1);\nvar isComputedValue = /*#__PURE__*/createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\nvar IDerivationState_;\n\n(function (IDerivationState_) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState_[IDerivationState_[\"NOT_TRACKING_\"] = -1] = \"NOT_TRACKING_\"; // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n\n IDerivationState_[IDerivationState_[\"UP_TO_DATE_\"] = 0] = \"UP_TO_DATE_\"; // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n\n IDerivationState_[IDerivationState_[\"POSSIBLY_STALE_\"] = 1] = \"POSSIBLY_STALE_\"; // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n\n IDerivationState_[IDerivationState_[\"STALE_\"] = 2] = \"STALE_\";\n})(IDerivationState_ || (IDerivationState_ = {}));\n\nvar TraceMode;\n\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\n\nvar CaughtException = function CaughtException(cause) {\n this.cause = void 0;\n this.cause = cause; // Empty\n};\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\r\n * Finds out whether any dependency of the derivation has actually changed.\r\n * If dependenciesState is 1 then it will recalculate dependencies,\r\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\r\n *\r\n * By iterating over the dependencies in the same order that they were reported and\r\n * stopping on the first change, all the recalculations are only called for ComputedValues\r\n * that will be tracked by derivation. That is because we assume that if the first x\r\n * dependencies of the derivation doesn't change then the derivation should run the same way\r\n * up until accessing x-th dependency.\r\n */\n\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState_) {\n case IDerivationState_.UP_TO_DATE_:\n return false;\n\n case IDerivationState_.NOT_TRACKING_:\n case IDerivationState_.STALE_:\n return true;\n\n case IDerivationState_.POSSIBLY_STALE_:\n {\n // state propagation can occur outside of action/reactive context #2195\n var prevAllowStateReads = allowStateReadsStart(true);\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n\n var obs = derivation.observing_,\n l = obs.length;\n\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n } else {\n try {\n obj.get();\n } catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n } // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n\n\n if (derivation.dependenciesState_ === IDerivationState_.STALE_) {\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n }\n\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return false;\n }\n }\n}\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n if (false) {}\n\n var hasObservers = atom.observers_.size > 0; // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"always\")) {\n console.warn(\"[MobX] \" + (globalState.enforceActions ? \"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: \" : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: \") + atom.name_);\n }\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if ( true && !globalState.allowStateReads && globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable '\" + observable.name_ + \"' being read outside a reactive context.\");\n }\n}\n/**\r\n * Executes the provided function `f` and tracks which observables are being accessed.\r\n * The tracking information is stored on the `derivation` object and the derivation is registered\r\n * as observer of any of the accessed observables.\r\n */\n\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true); // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n\n changeDependenciesStateTo0(derivation);\n derivation.newObserving_ = new Array(derivation.observing_.length + 100);\n derivation.unboundDepsCount_ = 0;\n derivation.runId_ = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n globalState.inBatch++;\n var result;\n\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n\n globalState.inBatch--;\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\n\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (false) {}\n\n if (derivation.observing_.length !== 0) {\n return;\n }\n\n if (typeof derivation.requiresObservable_ === \"boolean\" ? derivation.requiresObservable_ : globalState.reactionRequiresObservable) {\n console.warn(\"[mobx] Derivation '\" + derivation.name_ + \"' is created/updated without reading any observable value.\");\n }\n}\n/**\r\n * diffs newObserving with observing.\r\n * update observing to be newObserving with unique observables\r\n * notify observers that become observed/unobserved\r\n */\n\n\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing_;\n var observing = derivation.observing_ = derivation.newObserving_;\n var lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_; // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n\n var i0 = 0,\n l = derivation.unboundDepsCount_;\n\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n\n if (dep.diffValue_ === 0) {\n dep.diffValue_ = 1;\n\n if (i0 !== i) {\n observing[i0] = dep;\n }\n\n i0++;\n } // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n\n\n if (dep.dependenciesState_ > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState_;\n }\n }\n\n observing.length = i0;\n derivation.newObserving_ = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n\n l = prevObserving.length;\n\n while (l--) {\n var _dep = prevObserving[l];\n\n if (_dep.diffValue_ === 0) {\n removeObserver(_dep, derivation);\n }\n\n _dep.diffValue_ = 0;\n } // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n\n\n while (i0--) {\n var _dep2 = observing[i0];\n\n if (_dep2.diffValue_ === 1) {\n _dep2.diffValue_ = 0;\n addObserver(_dep2, derivation);\n }\n } // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n\n\n if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) {\n derivation.dependenciesState_ = lowestNewObservingDerivationState;\n derivation.onBecomeStale_();\n }\n}\n\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing_;\n derivation.observing_ = [];\n var i = obs.length;\n\n while (i--) {\n removeObserver(obs[i], derivation);\n }\n\n derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n\n try {\n return action();\n } finally {\n untrackedEnd(prev);\n }\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\r\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\r\n *\r\n */\n\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n return;\n }\n\n derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_;\n var obs = derivation.observing_;\n var i = obs.length;\n\n while (i--) {\n obs[i].lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n}\n\n/**\r\n * These values will persist if global state is reset\r\n */\n\nvar persistentKeys = [\"mobxGuid\", \"spyListeners\", \"enforceActions\", \"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"allowStateReads\", \"disableErrorBoundaries\", \"runId\", \"UNCHANGED\", \"useProxies\"];\nvar MobXGlobals = function MobXGlobals() {\n this.version = 6;\n this.UNCHANGED = {};\n this.trackingDerivation = null;\n this.trackingContext = null;\n this.runId = 0;\n this.mobxGuid = 0;\n this.inBatch = 0;\n this.pendingUnobservations = [];\n this.pendingReactions = [];\n this.isRunningReactions = false;\n this.allowStateChanges = false;\n this.allowStateReads = true;\n this.enforceActions = true;\n this.spyListeners = [];\n this.globalReactionErrorHandlers = [];\n this.computedRequiresReaction = false;\n this.reactionRequiresObservable = false;\n this.observableRequiresReaction = false;\n this.disableErrorBoundaries = false;\n this.suppressReactionErrors = false;\n this.useProxies = true;\n this.verifyProxies = false;\n this.safeDescriptors = true;\n};\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = /*#__PURE__*/function () {\n var global = /*#__PURE__*/getGlobal();\n\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals) {\n canMergeGlobalState = false;\n }\n\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version) {\n canMergeGlobalState = false;\n }\n\n if (!canMergeGlobalState) {\n // Because this is a IIFE we need to let isolateCalled a chance to change\n // so we run it after the event loop completed at least 1 iteration\n setTimeout(function () {\n if (!isolateCalled) {\n die(35);\n }\n }, 1);\n return new MobXGlobals();\n } else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n\n if (!global.__mobxGlobals.UNCHANGED) {\n global.__mobxGlobals.UNCHANGED = {};\n } // make merge backward compatible\n\n\n return global.__mobxGlobals;\n } else {\n global.__mobxInstanceCount = 1;\n return global.__mobxGlobals = /*#__PURE__*/new MobXGlobals();\n }\n}();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length || globalState.inBatch || globalState.isRunningReactions) {\n die(36);\n }\n\n isolateCalled = true;\n\n if (canMergeGlobalState) {\n var global = getGlobal();\n\n if (--global.__mobxInstanceCount === 0) {\n global.__mobxGlobals = undefined;\n }\n\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\r\n * For testing purposes only; this will break the internal state of existing observables,\r\n * but can be used to get back at a stable state after throwing errors\r\n */\n\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n\n for (var key in defaultGlobals) {\n if (persistentKeys.indexOf(key) === -1) {\n globalState[key] = defaultGlobals[key];\n }\n }\n\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers_ && observable.observers_.size > 0;\n}\nfunction getObservers(observable) {\n return observable.observers_;\n} // function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\n\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n observable.observers_.add(node);\n\n if (observable.lowestObserverState_ > node.dependenciesState_) {\n observable.lowestObserverState_ = node.dependenciesState_;\n } // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n observable.observers_[\"delete\"](node);\n\n if (observable.observers_.size === 0) {\n // deleting last observer\n queueForUnobservation(observable);\n } // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n\n}\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation_ === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation_ = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\r\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\r\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\r\n * Avoids unnecessary recalculations.\r\n */\n\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions(); // the batch is actually about to finish, all unobserving should happen here.\n\n var list = globalState.pendingUnobservations;\n\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation_ = false;\n\n if (observable.observers_.size === 0) {\n if (observable.isBeingObserved_) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved_ = false;\n observable.onBUO();\n }\n\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observabe of another, etc..\n observable.suspend_();\n }\n }\n }\n\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n\n if (derivation !== null) {\n /**\r\n * Simple optimization, give each derivation run an unique id (runId)\r\n * Check if last time this observable was accessed the same runId is used\r\n * if this is the case, the relation is already known\r\n */\n if (derivation.runId_ !== observable.lastAccessedBy_) {\n observable.lastAccessedBy_ = derivation.runId_; // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n\n derivation.newObserving_[derivation.unboundDepsCount_++] = observable;\n\n if (!observable.isBeingObserved_ && globalState.trackingContext) {\n observable.isBeingObserved_ = true;\n observable.onBO();\n }\n }\n\n return true;\n } else if (observable.observers_.size === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n\n return false;\n} // function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n\n/**\r\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\r\n * It will propagate changes to observers from previous run\r\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\r\n * Hopefully self reruning autoruns aren't a feature people should depend on\r\n * Also most basic use cases should be ok\r\n */\n// Called by Atom when its value changes\n\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) {\n return;\n }\n\n observable.lowestObserverState_ = IDerivationState_.STALE_; // Ideally we use for..of here, but the downcompiled version is really slow...\n\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n if ( true && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n\n d.onBecomeStale_();\n }\n\n d.dependenciesState_ = IDerivationState_.STALE_;\n }); // invariantLOS(observable, \"changed end\");\n} // Called by ComputedValue when it recalculate and its value changed\n\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) {\n return;\n }\n\n observable.lowestObserverState_ = IDerivationState_.STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) {\n d.dependenciesState_ = IDerivationState_.STALE_;\n\n if ( true && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n } else if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.\n ) {\n observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n }); // invariantLOS(observable, \"confirmed end\");\n} // Used by computed when its dependency changed, but we don't wan't to immediately recompute.\n\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) {\n return;\n }\n\n observable.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n d.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_;\n d.onBecomeStale_();\n }\n }); // invariantLOS(observable, \"maybe end\");\n}\n\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' is invalidated due to a change in: '\" + observable.name_ + \"'\");\n\n if (derivation.isTracing_ === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1); // prettier-ignore\n\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name_ + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name_ + \"' is being traced and '\" + observable.name_ + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\n\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n\n lines.push(\"\" + \"\\t\".repeat(depth - 1) + tree.name);\n\n if (tree.dependencies) {\n tree.dependencies.forEach(function (child) {\n return printDepTree(child, lines, depth + 1);\n });\n }\n}\n\nvar Reaction = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n function Reaction(name_, onInvalidate_, errorHandler_, requiresObservable_) {\n if (name_ === void 0) {\n name_ = true ? \"Reaction@\" + getNextId() : 0;\n }\n\n this.name_ = void 0;\n this.onInvalidate_ = void 0;\n this.errorHandler_ = void 0;\n this.requiresObservable_ = void 0;\n this.observing_ = [];\n this.newObserving_ = [];\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.unboundDepsCount_ = 0;\n this.isDisposed_ = false;\n this.isScheduled_ = false;\n this.isTrackPending_ = false;\n this.isRunning_ = false;\n this.isTracing_ = TraceMode.NONE;\n this.name_ = name_;\n this.onInvalidate_ = onInvalidate_;\n this.errorHandler_ = errorHandler_;\n this.requiresObservable_ = requiresObservable_;\n }\n\n var _proto = Reaction.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n this.schedule_();\n };\n\n _proto.schedule_ = function schedule_() {\n if (!this.isScheduled_) {\n this.isScheduled_ = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n\n _proto.isScheduled = function isScheduled() {\n return this.isScheduled_;\n }\n /**\r\n * internal, use schedule() if you intend to kick off a reaction\r\n */\n ;\n\n _proto.runReaction_ = function runReaction_() {\n if (!this.isDisposed_) {\n startBatch();\n this.isScheduled_ = false;\n var prev = globalState.trackingContext;\n globalState.trackingContext = this;\n\n if (shouldCompute(this)) {\n this.isTrackPending_ = true;\n\n try {\n this.onInvalidate_();\n\n if ( true && this.isTrackPending_ && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name_,\n type: \"scheduled-reaction\"\n });\n }\n } catch (e) {\n this.reportExceptionInDerivation_(e);\n }\n }\n\n globalState.trackingContext = prev;\n endBatch();\n }\n };\n\n _proto.track = function track(fn) {\n if (this.isDisposed_) {\n return; // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n }\n\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n\n if ( true && notify) {\n startTime = Date.now();\n spyReportStart({\n name: this.name_,\n type: \"reaction\"\n });\n }\n\n this.isRunning_ = true;\n var prevReaction = globalState.trackingContext; // reactions could create reactions...\n\n globalState.trackingContext = this;\n var result = trackDerivedFunction(this, fn, undefined);\n globalState.trackingContext = prevReaction;\n this.isRunning_ = false;\n this.isTrackPending_ = false;\n\n if (this.isDisposed_) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n\n if (isCaughtException(result)) {\n this.reportExceptionInDerivation_(result.cause);\n }\n\n if ( true && notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n\n endBatch();\n };\n\n _proto.reportExceptionInDerivation_ = function reportExceptionInDerivation_(error) {\n var _this = this;\n\n if (this.errorHandler_) {\n this.errorHandler_(error, this);\n return;\n }\n\n if (globalState.disableErrorBoundaries) {\n throw error;\n }\n\n var message = true ? \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\" : 0;\n\n if (!globalState.suppressReactionErrors) {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n } else if (true) {\n console.warn(\"[mobx] (error in reaction '\" + this.name_ + \"' suppressed, fix error of causing action below)\");\n } // prettier-ignore\n\n\n if ( true && isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name_,\n message: message,\n error: \"\" + error\n });\n }\n\n globalState.globalReactionErrorHandlers.forEach(function (f) {\n return f(error, _this);\n });\n };\n\n _proto.dispose = function dispose() {\n if (!this.isDisposed_) {\n this.isDisposed_ = true;\n\n if (!this.isRunning_) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n\n _proto.getDisposer_ = function getDisposer_() {\n var r = this.dispose.bind(this);\n r[$mobx] = this;\n return r;\n };\n\n _proto.toString = function toString() {\n return \"Reaction[\" + this.name_ + \"]\";\n };\n\n _proto.trace = function trace$1(enterBreakPoint) {\n if (enterBreakPoint === void 0) {\n enterBreakPoint = false;\n }\n\n trace(this, enterBreakPoint);\n };\n\n return Reaction;\n}();\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n\n if (idx >= 0) {\n globalState.globalReactionErrorHandlers.splice(idx, 1);\n }\n };\n}\n/**\r\n * Magic number alert!\r\n * Defines within how many times a reaction is allowed to re-trigger itself\r\n * until it is assumed that this is gonna be a never ending loop...\r\n */\n\nvar MAX_REACTION_ITERATIONS = 100;\n\nvar reactionScheduler = function reactionScheduler(f) {\n return f();\n};\n\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions) {\n return;\n }\n\n reactionScheduler(runReactionsHelper);\n}\n\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0; // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error( true ? \"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" + (\" Probably there is a cycle in the reactive function: \" + allReactions[0]) : 0);\n allReactions.splice(0); // clear reactions\n }\n\n var remainingReactions = allReactions.splice(0);\n\n for (var i = 0, l = remainingReactions.length; i < l; i++) {\n remainingReactions[i].runReaction_();\n }\n }\n\n globalState.isRunningReactions = false;\n}\n\nvar isReaction = /*#__PURE__*/createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n\n reactionScheduler = function reactionScheduler(f) {\n return fn(function () {\n return baseScheduler(f);\n });\n };\n}\n\nfunction isSpyEnabled() {\n return true && !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (false) {} // dead code elimination can do the rest\n\n\n if (!globalState.spyListeners.length) {\n return;\n }\n\n var listeners = globalState.spyListeners;\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](event);\n }\n}\nfunction spyReportStart(event) {\n if (false) {}\n\n var change = _extends({}, event, {\n spyReportStart: true\n });\n\n spyReport(change);\n}\nvar END_EVENT = {\n type: \"report-end\",\n spyReportEnd: true\n};\nfunction spyReportEnd(change) {\n if (false) {}\n\n if (change) {\n spyReport(_extends({}, change, {\n type: \"report-end\",\n spyReportEnd: true\n }));\n } else {\n spyReport(END_EVENT);\n }\n}\nfunction spy(listener) {\n if (false) {} else {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) {\n return l !== listener;\n });\n });\n }\n}\n\nvar ACTION = \"action\";\nvar ACTION_BOUND = \"action.bound\";\nvar AUTOACTION = \"autoAction\";\nvar AUTOACTION_BOUND = \"autoAction.bound\";\nvar DEFAULT_ACTION_NAME = \"<unnamed action>\";\nvar actionAnnotation = /*#__PURE__*/createActionAnnotation(ACTION);\nvar actionBoundAnnotation = /*#__PURE__*/createActionAnnotation(ACTION_BOUND, {\n bound: true\n});\nvar autoActionAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION, {\n autoAction: true\n});\nvar autoActionBoundAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION_BOUND, {\n autoAction: true,\n bound: true\n});\n\nfunction createActionFactory(autoAction) {\n var res = function action(arg1, arg2) {\n // action(fn() {})\n if (isFunction(arg1)) {\n return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction);\n } // action(\"name\", fn() {})\n\n\n if (isFunction(arg2)) {\n return createAction(arg1, arg2, autoAction);\n } // @action\n\n\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, autoAction ? autoActionAnnotation : actionAnnotation);\n } // action(\"name\") & @action(\"name\")\n\n\n if (isStringish(arg1)) {\n return createDecoratorAnnotation(createActionAnnotation(autoAction ? AUTOACTION : ACTION, {\n name: arg1,\n autoAction: autoAction\n }));\n }\n\n if (true) {\n die(\"Invalid arguments for `action`\");\n }\n };\n\n return res;\n}\n\nvar action = /*#__PURE__*/createActionFactory(false);\nObject.assign(action, actionAnnotation);\nvar autoAction = /*#__PURE__*/createActionFactory(true);\nObject.assign(autoAction, autoActionAnnotation);\naction.bound = /*#__PURE__*/createDecoratorAnnotation(actionBoundAnnotation);\nautoAction.bound = /*#__PURE__*/createDecoratorAnnotation(autoActionBoundAnnotation);\nfunction runInAction(fn) {\n return executeAction(fn.name || DEFAULT_ACTION_NAME, false, fn, this, undefined);\n}\nfunction isAction(thing) {\n return isFunction(thing) && thing.isMobxAction === true;\n}\n\n/**\r\n * Creates a named reactive view and keeps it alive, so that the view is always\r\n * updated if one of the dependencies changes, even when the view is not further used by something else.\r\n * @param view The reactive view\r\n * @returns disposer function, which can be used to stop the view from being updated in the future.\r\n */\n\nfunction autorun(view, opts) {\n var _opts$name, _opts;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (true) {\n if (!isFunction(view)) {\n die(\"Autorun expects a function as first argument\");\n }\n\n if (isAction(view)) {\n die(\"Autorun does not accept actions since actions are untrackable\");\n }\n }\n\n var name = (_opts$name = (_opts = opts) == null ? void 0 : _opts.name) != null ? _opts$name : true ? view.name || \"Autorun@\" + getNextId() : 0;\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n } else {\n var scheduler = createSchedulerFromOptions(opts); // debounced autorun\n\n var isScheduled = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled) {\n isScheduled = true;\n scheduler(function () {\n isScheduled = false;\n\n if (!reaction.isDisposed_) {\n reaction.track(reactionRunner);\n }\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n\n function reactionRunner() {\n view(reaction);\n }\n\n reaction.schedule_();\n return reaction.getDisposer_();\n}\n\nvar run = function run(f) {\n return f();\n};\n\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler ? opts.scheduler : opts.delay ? function (f) {\n return setTimeout(f, opts.delay);\n } : run;\n}\n\nfunction reaction(expression, effect, opts) {\n var _opts$name2;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (true) {\n if (!isFunction(expression) || !isFunction(effect)) {\n die(\"First and second argument to reaction should be functions\");\n }\n\n if (!isPlainObject(opts)) {\n die(\"Third argument of reactions should be an object\");\n }\n }\n\n var name = (_opts$name2 = opts.name) != null ? _opts$name2 : true ? \"Reaction@\" + getNextId() : 0;\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var oldValue;\n var equals = opts.compareStructural ? comparer.structural : opts.equals || comparer[\"default\"];\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n } else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n\n function reactionRunner() {\n isScheduled = false;\n\n if (r.isDisposed_) {\n return;\n }\n\n var changed = false;\n r.track(function () {\n var nextValue = allowStateChanges(false, function () {\n return expression(r);\n });\n changed = firstTime || !equals(value, nextValue);\n oldValue = value;\n value = nextValue;\n });\n\n if (firstTime && opts.fireImmediately) {\n effectAction(value, oldValue, r);\n } else if (!firstTime && changed) {\n effectAction(value, oldValue, r);\n }\n\n firstTime = false;\n }\n\n r.schedule_();\n return r.getDisposer_();\n}\n\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n } catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nvar ON_BECOME_OBSERVED = \"onBO\";\nvar ON_BECOME_UNOBSERVED = \"onBUO\";\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3);\n}\n\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = isFunction(arg3) ? arg3 : arg2;\n var listenersKey = hook + \"L\";\n\n if (atom[listenersKey]) {\n atom[listenersKey].add(cb);\n } else {\n atom[listenersKey] = new Set([cb]);\n }\n\n return function () {\n var hookListeners = atom[listenersKey];\n\n if (hookListeners) {\n hookListeners[\"delete\"](cb);\n\n if (hookListeners.size === 0) {\n delete atom[listenersKey];\n }\n }\n };\n}\n\nvar NEVER = \"never\";\nvar ALWAYS = \"always\";\nvar OBSERVED = \"observed\"; // const IF_AVAILABLE = \"ifavailable\"\n\nfunction configure(options) {\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n\n var useProxies = options.useProxies,\n enforceActions = options.enforceActions;\n\n if (useProxies !== undefined) {\n globalState.useProxies = useProxies === ALWAYS ? true : useProxies === NEVER ? false : typeof Proxy !== \"undefined\";\n }\n\n if (useProxies === \"ifavailable\") {\n globalState.verifyProxies = true;\n }\n\n if (enforceActions !== undefined) {\n var ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED;\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true;\n }\n [\"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"disableErrorBoundaries\", \"safeDescriptors\"].forEach(function (key) {\n if (key in options) {\n globalState[key] = !!options[key];\n }\n });\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n\n if ( true && globalState.disableErrorBoundaries === true) {\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\");\n }\n\n if (options.reactionScheduler) {\n setReactionScheduler(options.reactionScheduler);\n }\n}\n\nfunction extendObservable(target, properties, annotations, options) {\n if (true) {\n if (arguments.length > 4) {\n die(\"'extendObservable' expected 2-4 arguments\");\n }\n\n if (typeof target !== \"object\") {\n die(\"'extendObservable' expects an object as first argument\");\n }\n\n if (isObservableMap(target)) {\n die(\"'extendObservable' should not be used on maps, use map.merge instead\");\n }\n\n if (!isPlainObject(properties)) {\n die(\"'extendObservable' only accepts plain objects as second argument\");\n }\n\n if (isObservable(properties) || isObservable(annotations)) {\n die(\"Extending an object with another observable (object) is not supported\");\n }\n } // Pull descriptors first, so we don't have to deal with props added by administration ($mobx)\n\n\n var descriptors = getOwnPropertyDescriptors(properties);\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n ownKeys(descriptors).forEach(function (key) {\n adm.extend_(key, descriptors[key], // must pass \"undefined\" for { key: undefined }\n !annotations ? true : key in annotations ? annotations[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\n\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name_\n };\n\n if (node.observing_ && node.observing_.length > 0) {\n result.dependencies = unique(node.observing_).map(nodeToDependencyTree);\n }\n\n return result;\n}\n\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\n\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name_\n };\n\n if (hasObservers(node)) {\n result.observers = Array.from(getObservers(node)).map(nodeToObserverTree);\n }\n\n return result;\n}\n\nfunction unique(list) {\n return Array.from(new Set(list));\n}\n\nvar generatorId = 0;\nfunction FlowCancellationError() {\n this.message = \"FLOW_CANCELLED\";\n}\nFlowCancellationError.prototype = /*#__PURE__*/Object.create(Error.prototype);\nfunction isFlowCancellationError(error) {\n return error instanceof FlowCancellationError;\n}\nvar flowAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow\");\nvar flowBoundAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow.bound\", {\n bound: true\n});\nvar flow = /*#__PURE__*/Object.assign(function flow(arg1, arg2) {\n // @flow\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, flowAnnotation);\n } // flow(fn)\n\n\n if ( true && arguments.length !== 1) {\n die(\"Flow expects single argument with generator function\");\n }\n\n var generator = arg1;\n var name = generator.name || \"<unnamed flow>\"; // Implementation based on https://github.com/tj/co/blob/master/index.js\n\n var res = function res() {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var promise = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen[\"throw\"]).call(gen, err);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function next(ret) {\n if (isFunction(ret == null ? void 0 : ret.then)) {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n\n if (ret.done) {\n return resolve(ret.value);\n }\n\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n\n onFulfilled(undefined); // kick off the process\n });\n promise.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise) {\n cancelPromise(pendingPromise);\n } // Finally block can return (or yield) stuff..\n\n\n var _res = gen[\"return\"](undefined); // eat anything that promise would do, it's cancelled!\n\n\n var yieldedPromise = Promise.resolve(_res.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n\n rejector(new FlowCancellationError());\n } catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n return promise;\n };\n\n res.isMobXFlow = true;\n return res;\n}, flowAnnotation);\nflow.bound = /*#__PURE__*/createDecoratorAnnotation(flowBoundAnnotation);\n\nfunction cancelPromise(promise) {\n if (isFunction(promise.cancel)) {\n promise.cancel();\n }\n}\n\nfunction flowResult(result) {\n return result; // just tricking TypeScript :)\n}\nfunction isFlow(fn) {\n return (fn == null ? void 0 : fn.isMobXFlow) === true;\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n } else if (isObservableObject(thing)) {\n if ( true && !isStringish(propOrHandler)) {\n return die(\"InterceptReads can only be used with a specific property, not with an object in general\");\n }\n\n target = getAdministration(thing, propOrHandler);\n } else if (true) {\n return die(\"Expected observable map, object or array as first array\");\n }\n\n if ( true && target.dehancer !== undefined) {\n return die(\"An intercept reader was already established\");\n }\n\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (isFunction(handler)) {\n return interceptProperty(thing, propOrHandler, handler);\n } else {\n return interceptInterceptable(thing, propOrHandler);\n }\n}\n\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept_(handler);\n}\n\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept_(handler);\n}\n\nfunction _isComputed(value, property) {\n if (property === undefined) {\n return isComputedValue(value);\n }\n\n if (isObservableObject(value) === false) {\n return false;\n }\n\n if (!value[$mobx].values_.has(property)) {\n return false;\n }\n\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n}\nfunction isComputed(value) {\n if ( true && arguments.length > 1) {\n return die(\"isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property\");\n }\n\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if ( true && !isStringish(propName)) {\n return die(\"isComputed expected a property name as second argument\");\n }\n\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (!value) {\n return false;\n }\n\n if (property !== undefined) {\n if ( true && (isObservableMap(value) || isObservableArray(value))) {\n return die(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n }\n\n if (isObservableObject(value)) {\n return value[$mobx].values_.has(property);\n }\n\n return false;\n } // For first check, see #701\n\n\n return isObservableObject(value) || !!value[$mobx] || isAtom(value) || isReaction(value) || isComputedValue(value);\n}\n\nfunction isObservable(value) {\n if ( true && arguments.length !== 1) {\n die(\"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n }\n\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if ( true && !isStringish(propName)) {\n return die(\"expected a property name as second argument\");\n }\n\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].keys_();\n }\n\n if (isObservableMap(obj) || isObservableSet(obj)) {\n return Array.from(obj.keys());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) {\n return index;\n });\n }\n\n die(5);\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return obj[key];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return obj.get(key);\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.values());\n }\n\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n\n die(6);\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj.get(key)];\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.entries());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) {\n return [index, key];\n });\n }\n\n die(7);\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var _values = key;\n\n try {\n for (var _key in _values) {\n set(obj, _key, _values[_key]);\n }\n } finally {\n endBatch();\n }\n\n return;\n }\n\n if (isObservableObject(obj)) {\n obj[$mobx].set_(key, value);\n } else if (isObservableMap(obj)) {\n obj.set(key, value);\n } else if (isObservableSet(obj)) {\n obj.add(key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") {\n key = parseInt(key, 10);\n }\n\n if (key < 0) {\n die(\"Invalid index: '\" + key + \"'\");\n }\n\n startBatch();\n\n if (key >= obj.length) {\n obj.length = key + 1;\n }\n\n obj[key] = value;\n endBatch();\n } else {\n die(8);\n }\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj[$mobx].delete_(key);\n } else if (isObservableMap(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableSet(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") {\n key = parseInt(key, 10);\n }\n\n obj.splice(key, 1);\n } else {\n die(9);\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n return obj[$mobx].has_(key);\n } else if (isObservableMap(obj)) {\n return obj.has(key);\n } else if (isObservableSet(obj)) {\n return obj.has(key);\n } else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n\n die(10);\n}\nfunction get(obj, key) {\n if (!has(obj, key)) {\n return undefined;\n }\n\n if (isObservableObject(obj)) {\n return obj[$mobx].get_(key);\n } else if (isObservableMap(obj)) {\n return obj.get(key);\n } else if (isObservableArray(obj)) {\n return obj[key];\n }\n\n die(11);\n}\nfunction apiDefineProperty(obj, key, descriptor) {\n if (isObservableObject(obj)) {\n return obj[$mobx].defineProperty_(key, descriptor);\n }\n\n die(39);\n}\nfunction apiOwnKeys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].ownKeys_();\n }\n\n die(38);\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (isFunction(cbOrFire)) {\n return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);\n } else {\n return observeObservable(thing, propOrCb, cbOrFire);\n }\n}\n\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe_(listener, fireImmediately);\n}\n\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe_(listener, fireImmediately);\n}\n\nfunction cache(map, key, value) {\n map.set(key, value);\n return value;\n}\n\nfunction toJSHelper(source, __alreadySeen) {\n if (source == null || typeof source !== \"object\" || source instanceof Date || !isObservable(source)) {\n return source;\n }\n\n if (isObservableValue(source) || isComputedValue(source)) {\n return toJSHelper(source.get(), __alreadySeen);\n }\n\n if (__alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n\n if (isObservableArray(source)) {\n var res = cache(__alreadySeen, source, new Array(source.length));\n source.forEach(function (value, idx) {\n res[idx] = toJSHelper(value, __alreadySeen);\n });\n return res;\n }\n\n if (isObservableSet(source)) {\n var _res = cache(__alreadySeen, source, new Set());\n\n source.forEach(function (value) {\n _res.add(toJSHelper(value, __alreadySeen));\n });\n return _res;\n }\n\n if (isObservableMap(source)) {\n var _res2 = cache(__alreadySeen, source, new Map());\n\n source.forEach(function (value, key) {\n _res2.set(key, toJSHelper(value, __alreadySeen));\n });\n return _res2;\n } else {\n // must be observable object\n var _res3 = cache(__alreadySeen, source, {});\n\n apiOwnKeys(source).forEach(function (key) {\n if (objectPrototype.propertyIsEnumerable.call(source, key)) {\n _res3[key] = toJSHelper(source[key], __alreadySeen);\n }\n });\n return _res3;\n }\n}\n/**\r\n * Recursively converts an observable to it's non-observable native counterpart.\r\n * It does NOT recurse into non-observables, these are left as they are, even if they contain observables.\r\n * Computed and other non-enumerable properties are completely ignored.\r\n * Complex scenarios require custom solution, eg implementing `toJSON` or using `serializr` lib.\r\n */\n\n\nfunction toJS(source, options) {\n if ( true && options) {\n die(\"toJS no longer supports options\");\n }\n\n return toJSHelper(source, new Map());\n}\n\nfunction trace() {\n if (false) {}\n\n var enterBreakPoint = false;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (typeof args[args.length - 1] === \"boolean\") {\n enterBreakPoint = args.pop();\n }\n\n var derivation = getAtomFromArgs(args);\n\n if (!derivation) {\n return die(\"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n\n if (derivation.isTracing_ === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' tracing enabled\");\n }\n\n derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\n\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n\n case 1:\n return getAtom(args[0]);\n\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\r\n * During a transaction no views are updated until the end of the transaction.\r\n * The transaction will be run synchronously nonetheless.\r\n *\r\n * @param action a function that updates some reactive state\r\n * @returns any value that was returned by the 'action' parameter.\r\n */\n\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) {\n thisArg = undefined;\n }\n\n startBatch();\n\n try {\n return action.apply(thisArg);\n } finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || arg1 && typeof arg1 === \"object\") {\n return whenPromise(predicate, arg1);\n }\n\n return _when(predicate, arg1, arg2 || {});\n}\n\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n\n if (typeof opts.timeout === \"number\") {\n var error = new Error(\"WHEN_TIMEOUT\");\n timeoutHandle = setTimeout(function () {\n if (!disposer[$mobx].isDisposed_) {\n disposer();\n\n if (opts.onError) {\n opts.onError(error);\n } else {\n throw error;\n }\n }\n }, opts.timeout);\n }\n\n opts.name = true ? opts.name || \"When@\" + getNextId() : 0;\n var effectAction = createAction( true ? opts.name + \"-effect\" : 0, effect); // eslint-disable-next-line\n\n var disposer = autorun(function (r) {\n // predicate should not change state\n var cond = allowStateChanges(false, predicate);\n\n if (cond) {\n r.dispose();\n\n if (timeoutHandle) {\n clearTimeout(timeoutHandle);\n }\n\n effectAction();\n }\n }, opts);\n return disposer;\n}\n\nfunction whenPromise(predicate, opts) {\n if ( true && opts && opts.onError) {\n return die(\"the options 'onError' and 'promise' cannot be combined\");\n }\n\n var cancel;\n var res = new Promise(function (resolve, reject) {\n var disposer = _when(predicate, resolve, _extends({}, opts, {\n onError: reject\n }));\n\n cancel = function cancel() {\n disposer();\n reject(new Error(\"WHEN_CANCELLED\"));\n };\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction getAdm(target) {\n return target[$mobx];\n} // Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\n\n\nvar objectProxyTraps = {\n has: function has(target, name) {\n if ( true && globalState.trackingDerivation) {\n warnAboutProxyRequirement(\"detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.\");\n }\n\n return getAdm(target).has_(name);\n },\n get: function get(target, name) {\n return getAdm(target).get_(name);\n },\n set: function set(target, name, value) {\n var _getAdm$set_;\n\n if (!isStringish(name)) {\n return false;\n }\n\n if ( true && !getAdm(target).values_.has(name)) {\n warnAboutProxyRequirement(\"add a new observable property through direct assignment. Use 'set' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$set_ = getAdm(target).set_(name, value, true)) != null ? _getAdm$set_ : true;\n },\n deleteProperty: function deleteProperty(target, name) {\n var _getAdm$delete_;\n\n if (true) {\n warnAboutProxyRequirement(\"delete properties from an observable object. Use 'remove' from 'mobx' instead.\");\n }\n\n if (!isStringish(name)) {\n return false;\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$delete_ = getAdm(target).delete_(name, true)) != null ? _getAdm$delete_ : true;\n },\n defineProperty: function defineProperty(target, name, descriptor) {\n var _getAdm$definePropert;\n\n if (true) {\n warnAboutProxyRequirement(\"define property on an observable object. Use 'defineProperty' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$definePropert = getAdm(target).defineProperty_(name, descriptor)) != null ? _getAdm$definePropert : true;\n },\n ownKeys: function ownKeys(target) {\n if ( true && globalState.trackingDerivation) {\n warnAboutProxyRequirement(\"iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead.\");\n }\n\n return getAdm(target).ownKeys_();\n },\n preventExtensions: function preventExtensions(target) {\n die(13);\n }\n};\nfunction asDynamicObservableObject(target, options) {\n var _target$$mobx, _target$$mobx$proxy_;\n\n assertProxies();\n target = asObservableObject(target, options);\n return (_target$$mobx$proxy_ = (_target$$mobx = target[$mobx]).proxy_) != null ? _target$$mobx$proxy_ : _target$$mobx.proxy_ = new Proxy(target, objectProxyTraps);\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors_ !== undefined && interceptable.interceptors_.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n\n if (idx !== -1) {\n interceptors.splice(idx, 1);\n }\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n\n try {\n // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n var interceptors = [].concat(interceptable.interceptors_ || []);\n\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n\n if (change && !change.type) {\n die(14);\n }\n\n if (!change) {\n break;\n }\n }\n\n return change;\n } finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners_ !== undefined && listenable.changeListeners_.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners_ || (listenable.changeListeners_ = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n\n if (idx !== -1) {\n listeners.splice(idx, 1);\n }\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners_;\n\n if (!listeners) {\n return;\n }\n\n listeners = listeners.slice();\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n\n untrackedEnd(prevU);\n}\n\nfunction makeObservable(target, annotations, options) {\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n var _annotations;\n\n if ( true && annotations && target[storedAnnotationsSymbol]) {\n die(\"makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported.\");\n } // Default to decorators\n\n\n (_annotations = annotations) != null ? _annotations : annotations = collectStoredAnnotations(target); // Annotate\n\n ownKeys(annotations).forEach(function (key) {\n return adm.make_(key, annotations[key]);\n });\n } finally {\n endBatch();\n }\n\n return target;\n} // proto[keysSymbol] = new Set<PropertyKey>()\n\nvar keysSymbol = /*#__PURE__*/Symbol(\"mobx-keys\");\nfunction makeAutoObservable(target, overrides, options) {\n if (true) {\n if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) {\n die(\"'makeAutoObservable' can only be used for classes that don't have a superclass\");\n }\n\n if (isObservableObject(target)) {\n die(\"makeAutoObservable can only be used on objects not already made observable\");\n }\n } // Optimization: avoid visiting protos\n // Assumes that annotation.make_/.extend_ works the same for plain objects\n\n\n if (isPlainObject(target)) {\n return extendObservable(target, target, overrides, options);\n }\n\n var adm = asObservableObject(target, options)[$mobx]; // Optimization: cache keys on proto\n // Assumes makeAutoObservable can be called only once per object and can't be used in subclass\n\n if (!target[keysSymbol]) {\n var proto = Object.getPrototypeOf(target);\n var keys = new Set([].concat(ownKeys(target), ownKeys(proto)));\n keys[\"delete\"](\"constructor\");\n keys[\"delete\"]($mobx);\n addHiddenProp(proto, keysSymbol, keys);\n }\n\n startBatch();\n\n try {\n target[keysSymbol].forEach(function (key) {\n return adm.make_(key, // must pass \"undefined\" for { key: undefined }\n !overrides ? true : key in overrides ? overrides[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nvar SPLICE = \"splice\";\nvar UPDATE = \"update\";\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\n\nvar arrayTraps = {\n get: function get(target, name) {\n var adm = target[$mobx];\n\n if (name === $mobx) {\n return adm;\n }\n\n if (name === \"length\") {\n return adm.getArrayLength_();\n }\n\n if (typeof name === \"string\" && !isNaN(name)) {\n return adm.get_(parseInt(name));\n }\n\n if (hasProp(arrayExtensions, name)) {\n return arrayExtensions[name];\n }\n\n return target[name];\n },\n set: function set(target, name, value) {\n var adm = target[$mobx];\n\n if (name === \"length\") {\n adm.setArrayLength_(value);\n }\n\n if (typeof name === \"symbol\" || isNaN(name)) {\n target[name] = value;\n } else {\n // numeric string\n adm.set_(parseInt(name), value);\n }\n\n return true;\n },\n preventExtensions: function preventExtensions() {\n die(15);\n }\n};\nvar ObservableArrayAdministration = /*#__PURE__*/function () {\n // this is the prop that gets proxied, so can't replace it!\n function ObservableArrayAdministration(name, enhancer, owned_, legacyMode_) {\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n this.owned_ = void 0;\n this.legacyMode_ = void 0;\n this.atom_ = void 0;\n this.values_ = [];\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.enhancer_ = void 0;\n this.dehancer = void 0;\n this.proxy_ = void 0;\n this.lastKnownLength_ = 0;\n this.owned_ = owned_;\n this.legacyMode_ = legacyMode_;\n this.atom_ = new Atom(name);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, true ? name + \"[..]\" : 0);\n };\n }\n\n var _proto = ObservableArrayAdministration.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.dehanceValues_ = function dehanceValues_(values) {\n if (this.dehancer !== undefined && values.length > 0) {\n return values.map(this.dehancer);\n }\n\n return values;\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately === void 0) {\n fireImmediately = false;\n }\n\n if (fireImmediately) {\n listener({\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: \"splice\",\n index: 0,\n added: this.values_.slice(),\n addedCount: this.values_.length,\n removed: [],\n removedCount: 0\n });\n }\n\n return registerListener(this, listener);\n };\n\n _proto.getArrayLength_ = function getArrayLength_() {\n this.atom_.reportObserved();\n return this.values_.length;\n };\n\n _proto.setArrayLength_ = function setArrayLength_(newLength) {\n if (typeof newLength !== \"number\" || isNaN(newLength) || newLength < 0) {\n die(\"Out of range: \" + newLength);\n }\n\n var currentLength = this.values_.length;\n\n if (newLength === currentLength) {\n return;\n } else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n\n for (var i = 0; i < newLength - currentLength; i++) {\n newItems[i] = undefined;\n } // No Array.fill everywhere...\n\n\n this.spliceWithArray_(currentLength, 0, newItems);\n } else {\n this.spliceWithArray_(newLength, currentLength - newLength);\n }\n };\n\n _proto.updateArrayLength_ = function updateArrayLength_(oldLength, delta) {\n if (oldLength !== this.lastKnownLength_) {\n die(16);\n }\n\n this.lastKnownLength_ += delta;\n\n if (this.legacyMode_ && delta > 0) {\n reserveArrayBuffer(oldLength + delta + 1);\n }\n };\n\n _proto.spliceWithArray_ = function spliceWithArray_(index, deleteCount, newItems) {\n var _this = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n var length = this.values_.length;\n\n if (index === undefined) {\n index = 0;\n } else if (index > length) {\n index = length;\n } else if (index < 0) {\n index = Math.max(0, length + index);\n }\n\n if (arguments.length === 1) {\n deleteCount = length - index;\n } else if (deleteCount === undefined || deleteCount === null) {\n deleteCount = 0;\n } else {\n deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n }\n\n if (newItems === undefined) {\n newItems = EMPTY_ARRAY;\n }\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_,\n type: SPLICE,\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n\n if (!change) {\n return EMPTY_ARRAY;\n }\n\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n\n newItems = newItems.length === 0 ? newItems : newItems.map(function (v) {\n return _this.enhancer_(v, undefined);\n });\n\n if (this.legacyMode_ || \"development\" !== \"production\") {\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength_(length, lengthDelta); // checks if internal array wasn't modified\n }\n\n var res = this.spliceItemsIntoValues_(index, deleteCount, newItems);\n\n if (deleteCount !== 0 || newItems.length !== 0) {\n this.notifyArraySplice_(index, newItems, res);\n }\n\n return this.dehanceValues_(res);\n };\n\n _proto.spliceItemsIntoValues_ = function spliceItemsIntoValues_(index, deleteCount, newItems) {\n if (newItems.length < MAX_SPLICE_SIZE) {\n var _this$values_;\n\n return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));\n } else {\n // The items removed by the splice\n var res = this.values_.slice(index, index + deleteCount); // The items that that should remain at the end of the array\n\n var oldItems = this.values_.slice(index + deleteCount); // New length is the previous length + addition count - deletion count\n\n this.values_.length += newItems.length - deleteCount;\n\n for (var i = 0; i < newItems.length; i++) {\n this.values_[index + i] = newItems[i];\n }\n\n for (var _i = 0; _i < oldItems.length; _i++) {\n this.values_[index + newItems.length + _i] = oldItems[_i];\n }\n\n return res;\n }\n };\n\n _proto.notifyArrayChildUpdate_ = function notifyArrayChildUpdate_(index, newValue, oldValue) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n type: UPDATE,\n debugObjectName: this.atom_.name_,\n index: index,\n newValue: newValue,\n oldValue: oldValue\n } : null; // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n\n if ( true && notifySpy) {\n spyReportStart(change);\n }\n\n this.atom_.reportChanged();\n\n if (notify) {\n notifyListeners(this, change);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n };\n\n _proto.notifyArraySplice_ = function notifyArraySplice_(index, added, removed) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: SPLICE,\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n } : null;\n\n if ( true && notifySpy) {\n spyReportStart(change);\n }\n\n this.atom_.reportChanged(); // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n\n if (notify) {\n notifyListeners(this, change);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n };\n\n _proto.get_ = function get_(index) {\n if (index < this.values_.length) {\n this.atom_.reportObserved();\n return this.dehanceValue_(this.values_[index]);\n }\n\n console.warn( true ? \"[mobx] Out of bounds read: \" + index : 0);\n };\n\n _proto.set_ = function set_(index, newValue) {\n var values = this.values_;\n\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(this.atom_);\n var oldValue = values[index];\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_,\n index: index,\n newValue: newValue\n });\n\n if (!change) {\n return;\n }\n\n newValue = change.newValue;\n }\n\n newValue = this.enhancer_(newValue, oldValue);\n var changed = newValue !== oldValue;\n\n if (changed) {\n values[index] = newValue;\n this.notifyArrayChildUpdate_(index, newValue, oldValue);\n }\n } else if (index === values.length) {\n // add a new item\n this.spliceWithArray_(index, 0, [newValue]);\n } else {\n // out of bounds\n die(17, index, values.length);\n }\n };\n\n return ObservableArrayAdministration;\n}();\nfunction createObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n assertProxies();\n var adm = new ObservableArrayAdministration(name, enhancer, owned, false);\n addHiddenFinalProp(adm.values_, $mobx, adm);\n var proxy = new Proxy(adm.values_, arrayTraps);\n adm.proxy_ = proxy;\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true);\n adm.spliceWithArray_(0, 0, initialValues);\n allowStateChangesEnd(prev);\n }\n\n return proxy;\n} // eslint-disable-next-line\n\nvar arrayExtensions = {\n clear: function clear() {\n return this.splice(0);\n },\n replace: function replace(newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray_(0, adm.values_.length, newItems);\n },\n // Used by JSON.stringify\n toJSON: function toJSON() {\n return this.slice();\n },\n\n /*\r\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\r\n * since these functions alter the inner structure of the array, the have side effects.\r\n * Because the have side effects, they should not be used in computed function,\r\n * and for that reason the do not call dependencyState.notifyObserved\r\n */\n splice: function splice(index, deleteCount) {\n for (var _len = arguments.length, newItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n newItems[_key - 2] = arguments[_key];\n }\n\n var adm = this[$mobx];\n\n switch (arguments.length) {\n case 0:\n return [];\n\n case 1:\n return adm.spliceWithArray_(index);\n\n case 2:\n return adm.spliceWithArray_(index, deleteCount);\n }\n\n return adm.spliceWithArray_(index, deleteCount, newItems);\n },\n spliceWithArray: function spliceWithArray(index, deleteCount, newItems) {\n return this[$mobx].spliceWithArray_(index, deleteCount, newItems);\n },\n push: function push() {\n var adm = this[$mobx];\n\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n adm.spliceWithArray_(adm.values_.length, 0, items);\n return adm.values_.length;\n },\n pop: function pop() {\n return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0];\n },\n shift: function shift() {\n return this.splice(0, 1)[0];\n },\n unshift: function unshift() {\n var adm = this[$mobx];\n\n for (var _len3 = arguments.length, items = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n items[_key3] = arguments[_key3];\n }\n\n adm.spliceWithArray_(0, 0, items);\n return adm.values_.length;\n },\n reverse: function reverse() {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n if (globalState.trackingDerivation) {\n die(37, \"reverse\");\n }\n\n this.replace(this.slice().reverse());\n return this;\n },\n sort: function sort() {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n if (globalState.trackingDerivation) {\n die(37, \"sort\");\n }\n\n var copy = this.slice();\n copy.sort.apply(copy, arguments);\n this.replace(copy);\n return this;\n },\n remove: function remove(value) {\n var adm = this[$mobx];\n var idx = adm.dehanceValues_(adm.values_).indexOf(value);\n\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n\n return false;\n }\n};\n/**\r\n * Wrap function from prototype\r\n * Without this, everything works as well, but this works\r\n * faster as everything works on unproxied values\r\n */\n\naddArrayExtension(\"concat\", simpleFunc);\naddArrayExtension(\"flat\", simpleFunc);\naddArrayExtension(\"includes\", simpleFunc);\naddArrayExtension(\"indexOf\", simpleFunc);\naddArrayExtension(\"join\", simpleFunc);\naddArrayExtension(\"lastIndexOf\", simpleFunc);\naddArrayExtension(\"slice\", simpleFunc);\naddArrayExtension(\"toString\", simpleFunc);\naddArrayExtension(\"toLocaleString\", simpleFunc); // map\n\naddArrayExtension(\"every\", mapLikeFunc);\naddArrayExtension(\"filter\", mapLikeFunc);\naddArrayExtension(\"find\", mapLikeFunc);\naddArrayExtension(\"findIndex\", mapLikeFunc);\naddArrayExtension(\"flatMap\", mapLikeFunc);\naddArrayExtension(\"forEach\", mapLikeFunc);\naddArrayExtension(\"map\", mapLikeFunc);\naddArrayExtension(\"some\", mapLikeFunc); // reduce\n\naddArrayExtension(\"reduce\", reduceLikeFunc);\naddArrayExtension(\"reduceRight\", reduceLikeFunc);\n\nfunction addArrayExtension(funcName, funcFactory) {\n if (typeof Array.prototype[funcName] === \"function\") {\n arrayExtensions[funcName] = funcFactory(funcName);\n }\n} // Report and delegate to dehanced array\n\n\nfunction simpleFunc(funcName) {\n return function () {\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction mapLikeFunc(funcName) {\n return function (callback, thisArg) {\n var _this2 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName](function (element, index) {\n return callback.call(thisArg, element, index, _this2);\n });\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction reduceLikeFunc(funcName) {\n return function () {\n var _this3 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_); // #2432 - reduce behavior depends on arguments.length\n\n var callback = arguments[0];\n\n arguments[0] = function (accumulator, currentValue, index) {\n return callback(accumulator, currentValue, index, _this3);\n };\n\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n}\n\nvar isObservableArrayAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing[$mobx]);\n}\n\nvar _Symbol$iterator, _Symbol$toStringTag;\nvar ObservableMapMarker = {};\nvar ADD = \"add\";\nvar DELETE = \"delete\"; // just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\n\n_Symbol$iterator = Symbol.iterator;\n_Symbol$toStringTag = Symbol.toStringTag;\nvar ObservableMap = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {\n // hasMap, not hashMap >-).\n function ObservableMap(initialData, enhancer_, name_) {\n var _this = this;\n\n if (enhancer_ === void 0) {\n enhancer_ = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableMap@\" + getNextId() : 0;\n }\n\n this.enhancer_ = void 0;\n this.name_ = void 0;\n this[$mobx] = ObservableMapMarker;\n this.data_ = void 0;\n this.hasMap_ = void 0;\n this.keysAtom_ = void 0;\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = enhancer_;\n this.name_ = name_;\n\n if (!isFunction(Map)) {\n die(18);\n }\n\n this.keysAtom_ = createAtom( true ? this.name_ + \".keys()\" : 0);\n this.data_ = new Map();\n this.hasMap_ = new Map();\n allowStateChanges(true, function () {\n _this.merge(initialData);\n });\n }\n\n var _proto = ObservableMap.prototype;\n\n _proto.has_ = function has_(key) {\n return this.data_.has(key);\n };\n\n _proto.has = function has(key) {\n var _this2 = this;\n\n if (!globalState.trackingDerivation) {\n return this.has_(key);\n }\n\n var entry = this.hasMap_.get(key);\n\n if (!entry) {\n var newEntry = entry = new ObservableValue(this.has_(key), referenceEnhancer, true ? this.name_ + \".\" + stringifyKey(key) + \"?\" : 0, false);\n this.hasMap_.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () {\n return _this2.hasMap_[\"delete\"](key);\n });\n }\n\n return entry.get();\n };\n\n _proto.set = function set(key, value) {\n var hasKey = this.has_(key);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? UPDATE : ADD,\n object: this,\n newValue: value,\n name: key\n });\n\n if (!change) {\n return this;\n }\n\n value = change.newValue;\n }\n\n if (hasKey) {\n this.updateValue_(key, value);\n } else {\n this.addValue_(key, value);\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(key) {\n var _this3 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n name: key\n });\n\n if (!change) {\n return false;\n }\n }\n\n if (this.has_(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: this.data_.get(key).value_,\n name: key\n } : null;\n\n if ( true && notifySpy) {\n spyReportStart(_change);\n } // TODO fix type\n\n\n transaction(function () {\n var _this3$hasMap_$get;\n\n _this3.keysAtom_.reportChanged();\n\n (_this3$hasMap_$get = _this3.hasMap_.get(key)) == null ? void 0 : _this3$hasMap_$get.setNewValue_(false);\n\n var observable = _this3.data_.get(key);\n\n observable.setNewValue_(undefined);\n\n _this3.data_[\"delete\"](key);\n });\n\n if (notify) {\n notifyListeners(this, _change);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n\n return true;\n }\n\n return false;\n };\n\n _proto.updateValue_ = function updateValue_(key, newValue) {\n var observable = this.data_.get(key);\n newValue = observable.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: UPDATE,\n object: this,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n\n if ( true && notifySpy) {\n spyReportStart(change);\n } // TODO fix type\n\n\n observable.setNewValue_(newValue);\n\n if (notify) {\n notifyListeners(this, change);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n }\n };\n\n _proto.addValue_ = function addValue_(key, newValue) {\n var _this4 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n transaction(function () {\n var _this4$hasMap_$get;\n\n var observable = new ObservableValue(newValue, _this4.enhancer_, true ? _this4.name_ + \".\" + stringifyKey(key) : 0, false);\n\n _this4.data_.set(key, observable);\n\n newValue = observable.value_; // value might have been changed\n\n (_this4$hasMap_$get = _this4.hasMap_.get(key)) == null ? void 0 : _this4$hasMap_$get.setNewValue_(true);\n\n _this4.keysAtom_.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n name: key,\n newValue: newValue\n } : null;\n\n if ( true && notifySpy) {\n spyReportStart(change);\n } // TODO fix type\n\n\n if (notify) {\n notifyListeners(this, change);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n };\n\n _proto.get = function get(key) {\n if (this.has(key)) {\n return this.dehanceValue_(this.data_.get(key).get());\n }\n\n return this.dehanceValue_(undefined);\n };\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.keys = function keys() {\n this.keysAtom_.reportObserved();\n return this.data_.keys();\n };\n\n _proto.values = function values() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next = keys.next(),\n done = _keys$next.done,\n value = _keys$next.value;\n\n return {\n done: done,\n value: done ? undefined : self.get(value)\n };\n }\n });\n };\n\n _proto.entries = function entries() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next2 = keys.next(),\n done = _keys$next2.done,\n value = _keys$next2.value;\n\n return {\n done: done,\n value: done ? undefined : [value, self.get(value)]\n };\n }\n });\n };\n\n _proto[_Symbol$iterator2] = function () {\n return this.entries();\n };\n\n _proto.forEach = function forEach(callback, thisArg) {\n for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n value = _step$value[1];\n callback.call(thisArg, value, key, this);\n }\n }\n /** Merge another object into this object, returns this. */\n ;\n\n _proto.merge = function merge(other) {\n var _this5 = this;\n\n if (isObservableMap(other)) {\n other = new Map(other);\n }\n\n transaction(function () {\n if (isPlainObject(other)) {\n getPlainObjectKeys(other).forEach(function (key) {\n return _this5.set(key, other[key]);\n });\n } else if (Array.isArray(other)) {\n other.forEach(function (_ref) {\n var key = _ref[0],\n value = _ref[1];\n return _this5.set(key, value);\n });\n } else if (isES6Map(other)) {\n if (other.constructor !== Map) {\n die(19, other);\n }\n\n other.forEach(function (value, key) {\n return _this5.set(key, value);\n });\n } else if (other !== null && other !== undefined) {\n die(20, other);\n }\n });\n return this;\n };\n\n _proto.clear = function clear() {\n var _this6 = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator2 = _createForOfIteratorHelperLoose(_this6.keys()), _step2; !(_step2 = _iterator2()).done;) {\n var key = _step2.value;\n\n _this6[\"delete\"](key);\n }\n });\n });\n };\n\n _proto.replace = function replace(values) {\n var _this7 = this;\n\n // Implementation requirements:\n // - respect ordering of replacement map\n // - allow interceptors to run and potentially prevent individual operations\n // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n // - note that result map may differ from replacement map due to the interceptors\n transaction(function () {\n // Convert to map so we can do quick key lookups\n var replacementMap = convertToMap(values);\n var orderedData = new Map(); // Used for optimization\n\n var keysReportChangedCalled = false; // Delete keys that don't exist in replacement map\n // if the key deletion is prevented by interceptor\n // add entry at the beginning of the result map\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(_this7.data_.keys()), _step3; !(_step3 = _iterator3()).done;) {\n var key = _step3.value;\n\n // Concurrently iterating/deleting keys\n // iterator should handle this correctly\n if (!replacementMap.has(key)) {\n var deleted = _this7[\"delete\"](key); // Was the key removed?\n\n\n if (deleted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n } else {\n // Delete prevented by interceptor\n var value = _this7.data_.get(key);\n\n orderedData.set(key, value);\n }\n }\n } // Merge entries\n\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(replacementMap.entries()), _step4; !(_step4 = _iterator4()).done;) {\n var _step4$value = _step4.value,\n _key = _step4$value[0],\n _value = _step4$value[1];\n\n // We will want to know whether a new key is added\n var keyExisted = _this7.data_.has(_key); // Add or update value\n\n\n _this7.set(_key, _value); // The addition could have been prevent by interceptor\n\n\n if (_this7.data_.has(_key)) {\n // The update could have been prevented by interceptor\n // and also we want to preserve existing values\n // so use value from _data map (instead of replacement map)\n var _value2 = _this7.data_.get(_key);\n\n orderedData.set(_key, _value2); // Was a new key added?\n\n if (!keyExisted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n }\n } // Check for possible key order change\n\n\n if (!keysReportChangedCalled) {\n if (_this7.data_.size !== orderedData.size) {\n // If size differs, keys are definitely modified\n _this7.keysAtom_.reportChanged();\n } else {\n var iter1 = _this7.data_.keys();\n\n var iter2 = orderedData.keys();\n var next1 = iter1.next();\n var next2 = iter2.next();\n\n while (!next1.done) {\n if (next1.value !== next2.value) {\n _this7.keysAtom_.reportChanged();\n\n break;\n }\n\n next1 = iter1.next();\n next2 = iter2.next();\n }\n }\n } // Use correctly ordered map\n\n\n _this7.data_ = orderedData;\n });\n return this;\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableMap]\";\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if ( true && fireImmediately === true) {\n die(\"`observe` doesn't support fireImmediately=true in combination with maps.\");\n }\n\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _createClass(ObservableMap, [{\n key: \"size\",\n get: function get() {\n this.keysAtom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag2,\n get: function get() {\n return \"Map\";\n }\n }]);\n\n return ObservableMap;\n}(_Symbol$iterator, _Symbol$toStringTag); // eslint-disable-next-line\n\nvar isObservableMap = /*#__PURE__*/createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n } else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n } else if (isPlainObject(dataStructure)) {\n var map = new Map();\n\n for (var key in dataStructure) {\n map.set(key, dataStructure[key]);\n }\n\n return map;\n } else {\n return die(21, dataStructure);\n }\n}\n\nvar _Symbol$iterator$1, _Symbol$toStringTag$1;\nvar ObservableSetMarker = {};\n_Symbol$iterator$1 = Symbol.iterator;\n_Symbol$toStringTag$1 = Symbol.toStringTag;\nvar ObservableSet = /*#__PURE__*/function (_Symbol$iterator2, _Symbol$toStringTag2) {\n function ObservableSet(initialData, enhancer, name_) {\n if (enhancer === void 0) {\n enhancer = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = true ? \"ObservableSet@\" + getNextId() : 0;\n }\n\n this.name_ = void 0;\n this[$mobx] = ObservableSetMarker;\n this.data_ = new Set();\n this.atom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = void 0;\n this.name_ = name_;\n\n if (!isFunction(Set)) {\n die(22);\n }\n\n this.atom_ = createAtom(this.name_);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, name_);\n };\n\n if (initialData) {\n this.replace(initialData);\n }\n }\n\n var _proto = ObservableSet.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.clear = function clear() {\n var _this = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator = _createForOfIteratorHelperLoose(_this.data_.values()), _step; !(_step = _iterator()).done;) {\n var value = _step.value;\n\n _this[\"delete\"](value);\n }\n });\n });\n };\n\n _proto.forEach = function forEach(callbackFn, thisArg) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this), _step2; !(_step2 = _iterator2()).done;) {\n var value = _step2.value;\n callbackFn.call(thisArg, value, value, this);\n }\n };\n\n _proto.add = function add(value) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: ADD,\n object: this,\n newValue: value\n });\n\n if (!change) {\n return this;\n } // ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n\n }\n\n if (!this.has(value)) {\n transaction(function () {\n _this2.data_.add(_this2.enhancer_(value, undefined));\n\n _this2.atom_.reportChanged();\n });\n var notifySpy = true && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n newValue: value\n } : null;\n\n if (notifySpy && \"development\" !== \"production\") {\n spyReportStart(_change);\n }\n\n if (notify) {\n notifyListeners(this, _change);\n }\n\n if (notifySpy && \"development\" !== \"production\") {\n spyReportEnd();\n }\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(value) {\n var _this3 = this;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n oldValue: value\n });\n\n if (!change) {\n return false;\n }\n }\n\n if (this.has(value)) {\n var notifySpy = true && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change2 = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: value\n } : null;\n\n if (notifySpy && \"development\" !== \"production\") {\n spyReportStart(_change2);\n }\n\n transaction(function () {\n _this3.atom_.reportChanged();\n\n _this3.data_[\"delete\"](value);\n });\n\n if (notify) {\n notifyListeners(this, _change2);\n }\n\n if (notifySpy && \"development\" !== \"production\") {\n spyReportEnd();\n }\n\n return true;\n }\n\n return false;\n };\n\n _proto.has = function has(value) {\n this.atom_.reportObserved();\n return this.data_.has(this.dehanceValue_(value));\n };\n\n _proto.entries = function entries() {\n var nextIndex = 0;\n var keys = Array.from(this.keys());\n var values = Array.from(this.values());\n return makeIterable({\n next: function next() {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length ? {\n value: [keys[index], values[index]],\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.keys = function keys() {\n return this.values();\n };\n\n _proto.values = function values() {\n this.atom_.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues = Array.from(this.data_.values());\n return makeIterable({\n next: function next() {\n return nextIndex < observableValues.length ? {\n value: self.dehanceValue_(observableValues[nextIndex++]),\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.replace = function replace(other) {\n var _this4 = this;\n\n if (isObservableSet(other)) {\n other = new Set(other);\n }\n\n transaction(function () {\n if (Array.isArray(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (isES6Set(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (other !== null && other !== undefined) {\n die(\"Cannot initialize set from \" + other);\n }\n });\n return this;\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n // ... 'fireImmediately' could also be true?\n if ( true && fireImmediately === true) {\n die(\"`observe` doesn't support fireImmediately=true in combination with sets.\");\n }\n\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableSet]\";\n };\n\n _proto[_Symbol$iterator2] = function () {\n return this.values();\n };\n\n _createClass(ObservableSet, [{\n key: \"size\",\n get: function get() {\n this.atom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag2,\n get: function get() {\n return \"Set\";\n }\n }]);\n\n return ObservableSet;\n}(_Symbol$iterator$1, _Symbol$toStringTag$1); // eslint-disable-next-line\n\nvar isObservableSet = /*#__PURE__*/createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar descriptorCache = /*#__PURE__*/Object.create(null);\nvar REMOVE = \"remove\";\nvar ObservableObjectAdministration = /*#__PURE__*/function () {\n function ObservableObjectAdministration(target_, values_, name_, // Used anytime annotation is not explicitely provided\n defaultAnnotation_) {\n if (values_ === void 0) {\n values_ = new Map();\n }\n\n if (defaultAnnotation_ === void 0) {\n defaultAnnotation_ = autoAnnotation;\n }\n\n this.target_ = void 0;\n this.values_ = void 0;\n this.name_ = void 0;\n this.defaultAnnotation_ = void 0;\n this.keysAtom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.proxy_ = void 0;\n this.isPlainObject_ = void 0;\n this.appliedAnnotations_ = void 0;\n this.pendingKeys_ = void 0;\n this.target_ = target_;\n this.values_ = values_;\n this.name_ = name_;\n this.defaultAnnotation_ = defaultAnnotation_;\n this.keysAtom_ = new Atom( true ? this.name_ + \".keys\" : 0); // Optimization: we use this frequently\n\n this.isPlainObject_ = isPlainObject(this.target_);\n\n if ( true && !isAnnotation(this.defaultAnnotation_)) {\n die(\"defaultAnnotation must be valid annotation\");\n }\n\n if (true) {\n // Prepare structure for tracking which fields were already annotated\n this.appliedAnnotations_ = {};\n }\n }\n\n var _proto = ObservableObjectAdministration.prototype;\n\n _proto.getObservablePropValue_ = function getObservablePropValue_(key) {\n return this.values_.get(key).get();\n };\n\n _proto.setObservablePropValue_ = function setObservablePropValue_(key, newValue) {\n var observable = this.values_.get(key);\n\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return true;\n } // intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: newValue\n });\n\n if (!change) {\n return null;\n }\n\n newValue = change.newValue;\n }\n\n newValue = observable.prepareNewValue_(newValue); // notify spy & observers\n\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n\n var _change = notify || notifySpy ? {\n type: UPDATE,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n\n if ( true && notifySpy) {\n spyReportStart(_change);\n }\n observable.setNewValue_(newValue);\n\n if (notify) {\n notifyListeners(this, _change);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n }\n\n return true;\n };\n\n _proto.get_ = function get_(key) {\n if (globalState.trackingDerivation && !hasProp(this.target_, key)) {\n // Key doesn't exist yet, subscribe for it in case it's added later\n this.has_(key);\n }\n\n return this.target_[key];\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {any} value\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.set_ = function set_(key, value, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // Don't use .has(key) - we care about own\n if (hasProp(this.target_, key)) {\n // Existing prop\n if (this.values_.has(key)) {\n // Observable (can be intercepted)\n return this.setObservablePropValue_(key, value);\n } else if (proxyTrap) {\n // Non-observable - proxy\n return Reflect.set(this.target_, key, value);\n } else {\n // Non-observable\n this.target_[key] = value;\n return true;\n }\n } else {\n // New prop\n return this.extend_(key, {\n value: value,\n enumerable: true,\n writable: true,\n configurable: true\n }, this.defaultAnnotation_, proxyTrap);\n }\n } // Trap for \"in\"\n ;\n\n _proto.has_ = function has_(key) {\n if (!globalState.trackingDerivation) {\n // Skip key subscription outside derivation\n return key in this.target_;\n }\n\n this.pendingKeys_ || (this.pendingKeys_ = new Map());\n var entry = this.pendingKeys_.get(key);\n\n if (!entry) {\n entry = new ObservableValue(key in this.target_, referenceEnhancer, true ? this.name_ + \".\" + stringifyKey(key) + \"?\" : 0, false);\n this.pendingKeys_.set(key, entry);\n }\n\n return entry.get();\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - ignore prop\r\n */\n ;\n\n _proto.make_ = function make_(key, annotation) {\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n\n if (annotation === false) {\n return;\n }\n\n assertAnnotable(this, annotation, key);\n\n if (!(key in this.target_)) {\n var _this$target_$storedA;\n\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n if ((_this$target_$storedA = this.target_[storedAnnotationsSymbol]) != null && _this$target_$storedA[key]) {\n return; // will be annotated by subclass constructor\n } else {\n die(1, annotation.annotationType_, this.name_ + \".\" + key.toString());\n }\n }\n\n var source = this.target_;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n var outcome = annotation.make_(this, key, descriptor, source);\n\n if (outcome === 0\n /* Cancel */\n ) {\n return;\n }\n\n if (outcome === 1\n /* Break */\n ) {\n break;\n }\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n recordAnnotationApplied(this, annotation, key);\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {Annotation|boolean} annotation true - use default annotation, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.extend_ = function extend_(key, descriptor, annotation, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n if (annotation === true) {\n annotation = this.defaultAnnotation_;\n }\n\n if (annotation === false) {\n return this.defineProperty_(key, descriptor, proxyTrap);\n }\n\n assertAnnotable(this, annotation, key);\n var outcome = annotation.extend_(this, key, descriptor, proxyTrap);\n\n if (outcome) {\n recordAnnotationApplied(this, annotation, key);\n }\n\n return outcome;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.defineProperty_ = function defineProperty_(key, descriptor, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: descriptor.value\n });\n\n if (!change) {\n return null;\n }\n\n var newValue = change.newValue;\n\n if (descriptor.value !== newValue) {\n descriptor = _extends({}, descriptor, {\n value: newValue\n });\n }\n } // Define\n\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n } // Notify\n\n\n this.notifyPropertyAddition_(key, descriptor.value);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: value\n });\n\n if (!change) {\n return null;\n }\n\n value = change.newValue;\n }\n\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: true,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n var observable = new ObservableValue(value, enhancer, true ? this.name_ + \".\" + key.toString() : 0, false);\n this.values_.set(key, observable); // Notify (value possibly changed by ObservableValue)\n\n this.notifyPropertyAddition_(key, observable.value_);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: undefined\n });\n\n if (!change) {\n return null;\n }\n }\n\n options.name || (options.name = true ? this.name_ + \".\" + key.toString() : 0);\n options.context = this.proxy_ || this.target_;\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: false,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n this.values_.set(key, new ComputedValue(options)); // Notify\n\n this.notifyPropertyAddition_(key, undefined);\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.delete_ = function delete_(key, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // No such prop\n if (!hasProp(this.target_, key)) {\n return true;\n } // Intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: REMOVE\n }); // Cancelled\n\n if (!change) {\n return null;\n }\n } // Delete\n\n\n try {\n var _this$pendingKeys_, _this$pendingKeys_$ge;\n\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n var observable = this.values_.get(key); // Value needed for spies/listeners\n\n var value = undefined; // Optimization: don't pull the value unless we will need it\n\n if (!observable && (notify || notifySpy)) {\n var _getDescriptor;\n\n value = (_getDescriptor = getDescriptor(this.target_, key)) == null ? void 0 : _getDescriptor.value;\n } // delete prop (do first, may fail)\n\n\n if (proxyTrap) {\n if (!Reflect.deleteProperty(this.target_, key)) {\n return false;\n }\n } else {\n delete this.target_[key];\n } // Allow re-annotating this field\n\n\n if (true) {\n delete this.appliedAnnotations_[key];\n } // Clear observable\n\n\n if (observable) {\n this.values_[\"delete\"](key); // for computed, value is undefined\n\n if (observable instanceof ObservableValue) {\n value = observable.value_;\n } // Notify: autorun(() => obj[key]), see #1796\n\n\n propagateChanged(observable);\n } // Notify \"keys/entries/values\" observers\n\n\n this.keysAtom_.reportChanged(); // Notify \"has\" observers\n // \"in\" as it may still exist in proto\n\n (_this$pendingKeys_ = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_$ge = _this$pendingKeys_.get(key)) == null ? void 0 : _this$pendingKeys_$ge.set(key in this.target_); // Notify spies/listeners\n\n if (notify || notifySpy) {\n var _change2 = {\n type: REMOVE,\n observableKind: \"object\",\n object: this.proxy_ || this.target_,\n debugObjectName: this.name_,\n oldValue: value,\n name: key\n };\n\n if ( true && notifySpy) {\n spyReportStart(_change2);\n }\n\n if (notify) {\n notifyListeners(this, _change2);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n }\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n ;\n\n _proto.observe_ = function observe_(callback, fireImmediately) {\n if ( true && fireImmediately === true) {\n die(\"`observe` doesn't support the fire immediately property for observable objects.\");\n }\n\n return registerListener(this, callback);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.notifyPropertyAddition_ = function notifyPropertyAddition_(key, value) {\n var _this$pendingKeys_2, _this$pendingKeys_2$g;\n\n var notify = hasListeners(this);\n var notifySpy = true && isSpyEnabled();\n\n if (notify || notifySpy) {\n var change = notify || notifySpy ? {\n type: ADD,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: value\n } : null;\n\n if ( true && notifySpy) {\n spyReportStart(change);\n }\n\n if (notify) {\n notifyListeners(this, change);\n }\n\n if ( true && notifySpy) {\n spyReportEnd();\n }\n }\n\n (_this$pendingKeys_2 = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_2$g = _this$pendingKeys_2.get(key)) == null ? void 0 : _this$pendingKeys_2$g.set(true); // Notify \"keys/entries/values\" observers\n\n this.keysAtom_.reportChanged();\n };\n\n _proto.ownKeys_ = function ownKeys_() {\n this.keysAtom_.reportObserved();\n return ownKeys(this.target_);\n };\n\n _proto.keys_ = function keys_() {\n // Returns enumerable && own, but unfortunately keysAtom will report on ANY key change.\n // There is no way to distinguish between Object.keys(object) and Reflect.ownKeys(object) - both are handled by ownKeys trap.\n // We can either over-report in Object.keys(object) or under-report in Reflect.ownKeys(object)\n // We choose to over-report in Object.keys(object), because:\n // - typically it's used with simple data objects\n // - when symbolic/non-enumerable keys are relevant Reflect.ownKeys works as expected\n this.keysAtom_.reportObserved();\n return Object.keys(this.target_);\n };\n\n return ObservableObjectAdministration;\n}();\nfunction asObservableObject(target, options) {\n var _options$name;\n\n if ( true && options && isObservableObject(target)) {\n die(\"Options can't be provided for already observable objects.\");\n }\n\n if (hasProp(target, $mobx)) {\n if ( true && !(getAdministration(target) instanceof ObservableObjectAdministration)) {\n die(\"Cannot convert '\" + getDebugName(target) + \"' into observable object:\" + \"\\nThe target is already observable of different type.\" + \"\\nExtending builtins is not supported.\");\n }\n\n return target;\n }\n\n if ( true && !Object.isExtensible(target)) {\n die(\"Cannot make the designated object observable; it is not extensible\");\n }\n\n var name = (_options$name = options == null ? void 0 : options.name) != null ? _options$name : true ? (isPlainObject(target) ? \"ObservableObject\" : target.constructor.name) + \"@\" + getNextId() : 0;\n var adm = new ObservableObjectAdministration(target, new Map(), String(name), getAnnotationFromOptions(options));\n addHiddenProp(target, $mobx, adm);\n return target;\n}\nvar isObservableObjectAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\n\nfunction getCachedObservablePropDescriptor(key) {\n return descriptorCache[key] || (descriptorCache[key] = {\n get: function get() {\n return this[$mobx].getObservablePropValue_(key);\n },\n set: function set(value) {\n return this[$mobx].setObservablePropValue_(key, value);\n }\n });\n}\n\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n return isObservableObjectAdministration(thing[$mobx]);\n }\n\n return false;\n}\nfunction recordAnnotationApplied(adm, annotation, key) {\n var _adm$target_$storedAn;\n\n if (true) {\n adm.appliedAnnotations_[key] = annotation;\n } // Remove applied decorator annotation so we don't try to apply it again in subclass constructor\n\n\n (_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? true : delete _adm$target_$storedAn[key];\n}\n\nfunction assertAnnotable(adm, annotation, key) {\n // Valid annotation\n if ( true && !isAnnotation(annotation)) {\n die(\"Cannot annotate '\" + adm.name_ + \".\" + key.toString() + \"': Invalid annotation.\");\n }\n /*\r\n // Configurable, not sealed, not frozen\r\n // Possibly not needed, just a little better error then the one thrown by engine.\r\n // Cases where this would be useful the most (subclass field initializer) are not interceptable by this.\r\n if (__DEV__) {\r\n const configurable = getDescriptor(adm.target_, key)?.configurable\r\n const frozen = Object.isFrozen(adm.target_)\r\n const sealed = Object.isSealed(adm.target_)\r\n if (!configurable || frozen || sealed) {\r\n const fieldName = `${adm.name_}.${key.toString()}`\r\n const requestedAnnotationType = annotation.annotationType_\r\n let error = `Cannot apply '${requestedAnnotationType}' to '${fieldName}':`\r\n if (frozen) {\r\n error += `\\nObject is frozen.`\r\n }\r\n if (sealed) {\r\n error += `\\nObject is sealed.`\r\n }\r\n if (!configurable) {\r\n error += `\\nproperty is not configurable.`\r\n // Mention only if caused by us to avoid confusion\r\n if (hasProp(adm.appliedAnnotations!, key)) {\r\n error += `\\nTo prevent accidental re-definition of a field by a subclass, `\r\n error += `all annotated fields of non-plain objects (classes) are not configurable.`\r\n }\r\n }\r\n die(error)\r\n }\r\n }\r\n */\n // Not annotated\n\n\n if ( true && !isOverride(annotation) && hasProp(adm.appliedAnnotations_, key)) {\n var fieldName = adm.name_ + \".\" + key.toString();\n var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already annotated with '\" + currentAnnotationType + \"'.\") + \"\\nRe-annotating fields is not allowed.\" + \"\\nUse 'override' annotation for methods overriden by subclass.\");\n }\n}\n\n/**\r\n * This array buffer contains two lists of properties, so that all arrays\r\n * can recycle their property definitions, which significantly improves performance of creating\r\n * properties on the fly.\r\n */\n\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array\n\nvar StubArray = function StubArray() {};\n\nfunction inherit(ctor, proto) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(ctor.prototype, proto);\n } else if (ctor.prototype.__proto__ !== undefined) {\n ctor.prototype.__proto__ = proto;\n } else {\n ctor.prototype = proto;\n }\n}\n\ninherit(StubArray, Array.prototype); // Weex proto freeze protection was here,\n// but it is unclear why the hack is need as MobX never changed the prototype\n// anyway, so removed it in V6\n\nvar LegacyObservableArray = /*#__PURE__*/function (_StubArray, _Symbol$toStringTag, _Symbol$iterator) {\n _inheritsLoose(LegacyObservableArray, _StubArray);\n\n function LegacyObservableArray(initialValues, enhancer, name, owned) {\n var _this;\n\n if (name === void 0) {\n name = true ? \"ObservableArray@\" + getNextId() : 0;\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n _this = _StubArray.call(this) || this;\n var adm = new ObservableArrayAdministration(name, enhancer, owned, true);\n adm.proxy_ = _assertThisInitialized(_this);\n addHiddenFinalProp(_assertThisInitialized(_this), $mobx, adm);\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true); // @ts-ignore\n\n _this.spliceWithArray(0, 0, initialValues);\n\n allowStateChangesEnd(prev);\n }\n\n return _this;\n }\n\n var _proto = LegacyObservableArray.prototype;\n\n _proto.concat = function concat() {\n this[$mobx].atom_.reportObserved();\n\n for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {\n arrays[_key] = arguments[_key];\n }\n\n return Array.prototype.concat.apply(this.slice(), //@ts-ignore\n arrays.map(function (a) {\n return isObservableArray(a) ? a.slice() : a;\n }));\n };\n\n _proto[_Symbol$iterator] = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function next() {\n return nextIndex < self.length ? {\n value: self[nextIndex++],\n done: false\n } : {\n done: true,\n value: undefined\n };\n }\n });\n };\n\n _createClass(LegacyObservableArray, [{\n key: \"length\",\n get: function get() {\n return this[$mobx].getArrayLength_();\n },\n set: function set(newLength) {\n this[$mobx].setArrayLength_(newLength);\n }\n }, {\n key: _Symbol$toStringTag,\n get: function get() {\n return \"Array\";\n }\n }]);\n\n return LegacyObservableArray;\n}(StubArray, Symbol.toStringTag, Symbol.iterator);\n\nObject.entries(arrayExtensions).forEach(function (_ref) {\n var prop = _ref[0],\n fn = _ref[1];\n\n if (prop !== \"concat\") {\n addHiddenProp(LegacyObservableArray.prototype, prop, fn);\n }\n});\n\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: true,\n get: function get() {\n return this[$mobx].get_(index);\n },\n set: function set(value) {\n this[$mobx].set_(index, value);\n }\n };\n}\n\nfunction createArrayBufferItem(index) {\n defineProperty(LegacyObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\n\nfunction reserveArrayBuffer(max) {\n if (max > OBSERVABLE_ARRAY_BUFFER_SIZE) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max + 100; index++) {\n createArrayBufferItem(index);\n }\n\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n }\n}\nreserveArrayBuffer(1000);\nfunction createLegacyArray(initialValues, enhancer, name) {\n return new LegacyObservableArray(initialValues, enhancer, name);\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined) {\n die(23);\n }\n\n return thing[$mobx].atom_;\n }\n\n if (isObservableSet(thing)) {\n return thing[$mobx];\n }\n\n if (isObservableMap(thing)) {\n if (property === undefined) {\n return thing.keysAtom_;\n }\n\n var observable = thing.data_.get(property) || thing.hasMap_.get(property);\n\n if (!observable) {\n die(25, property, getDebugName(thing));\n }\n\n return observable;\n }\n\n\n if (isObservableObject(thing)) {\n if (!property) {\n return die(26);\n }\n\n var _observable = thing[$mobx].values_.get(property);\n\n if (!_observable) {\n die(27, property, getDebugName(thing));\n }\n\n return _observable;\n }\n\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n } else if (isFunction(thing)) {\n if (isReaction(thing[$mobx])) {\n // disposer function\n return thing[$mobx];\n }\n }\n\n die(28);\n}\nfunction getAdministration(thing, property) {\n if (!thing) {\n die(29);\n }\n\n if (property !== undefined) {\n return getAdministration(getAtom(thing, property));\n }\n\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n\n if (isObservableMap(thing) || isObservableSet(thing)) {\n return thing;\n }\n\n if (thing[$mobx]) {\n return thing[$mobx];\n }\n\n die(24, thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n\n if (property !== undefined) {\n named = getAtom(thing, property);\n } else if (isAction(thing)) {\n return thing.name;\n } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) {\n named = getAdministration(thing);\n } else {\n // valid for arrays as well\n named = getAtom(thing);\n }\n\n return named.name_;\n}\n\nvar toString = objectPrototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) {\n depth = -1;\n }\n\n return eq(a, b, depth);\n} // Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\n\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) {\n return a !== 0 || 1 / a === 1 / b;\n } // `null` or `undefined` only equal to itself (strict comparison).\n\n\n if (a == null || b == null) {\n return false;\n } // `NaN`s are equivalent, but non-reflexive.\n\n\n if (a !== a) {\n return b !== b;\n } // Exhaust primitive checks\n\n\n var type = typeof a;\n\n if (type !== \"function\" && type !== \"object\" && typeof b != \"object\") {\n return false;\n } // Compare `[[Class]]` names.\n\n\n var className = toString.call(a);\n\n if (className !== toString.call(b)) {\n return false;\n }\n\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\": // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) {\n return +b !== +b;\n } // An `egal` comparison is performed for other numeric values.\n\n\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n\n case \"[object Symbol]\":\n return typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b);\n\n case \"[object Map]\":\n case \"[object Set]\":\n // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n // Hide this extra level by increasing the depth.\n if (depth >= 0) {\n depth++;\n }\n\n break;\n } // Unwrap any wrapped objects.\n\n\n a = unwrap(a);\n b = unwrap(b);\n var areArrays = className === \"[object Array]\";\n\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\") {\n return false;\n } // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n\n\n var aCtor = a.constructor,\n bCtor = b.constructor;\n\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && \"constructor\" in a && \"constructor\" in b) {\n return false;\n }\n }\n\n if (depth === 0) {\n return false;\n } else if (depth < 0) {\n depth = -1;\n } // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n\n\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) {\n return bStack[length] === b;\n }\n } // Add the first object to the stack of traversed objects.\n\n\n aStack.push(a);\n bStack.push(b); // Recursively compare objects and arrays.\n\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n\n if (length !== b.length) {\n return false;\n } // Deep compare the contents, ignoring non-numeric properties.\n\n\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack)) {\n return false;\n }\n }\n } else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key;\n length = keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality.\n\n if (Object.keys(b).length !== length) {\n return false;\n }\n\n while (length--) {\n // Deep compare each member\n key = keys[length];\n\n if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) {\n return false;\n }\n }\n } // Remove the first object from the stack of traversed objects.\n\n\n aStack.pop();\n bStack.pop();\n return true;\n}\n\nfunction unwrap(a) {\n if (isObservableArray(a)) {\n return a.slice();\n }\n\n if (isES6Map(a) || isObservableMap(a)) {\n return Array.from(a.entries());\n }\n\n if (isES6Set(a) || isObservableSet(a)) {\n return Array.from(a.entries());\n }\n\n return a;\n}\n\nfunction makeIterable(iterator) {\n iterator[Symbol.iterator] = getSelf;\n return iterator;\n}\n\nfunction getSelf() {\n return this;\n}\n\nfunction isAnnotation(thing) {\n return (// Can be function\n thing instanceof Object && typeof thing.annotationType_ === \"string\" && isFunction(thing.make_) && isFunction(thing.extend_)\n );\n}\n\n/**\r\n * (c) Michel Weststrate 2015 - 2020\r\n * MIT Licensed\r\n *\r\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\r\n * this is a good place to start:\r\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\r\n *\r\n * Source folders:\r\n * ===============\r\n *\r\n * - api/ Most of the public static methods exposed by the module can be found here.\r\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\r\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\r\n * - utils/ Utility stuff.\r\n *\r\n */\n[\"Symbol\", \"Map\", \"Set\"].forEach(function (m) {\n var g = getGlobal();\n\n if (typeof g[m] === \"undefined\") {\n die(\"MobX requires global '\" + m + \"' to be available or polyfilled\");\n }\n});\n\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n\n\n//# sourceMappingURL=mobx.esm.js.map\n\n\n//# sourceURL=webpack://open-lens/./node_modules/mobx/dist/mobx.esm.js?");
18603
18603
 
18604
18604
  /***/ }),
18605
18605
 
@@ -32723,7 +32723,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
32723
32723
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32724
32724
 
32725
32725
  "use strict";
32726
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeEvent\": () => (/* binding */ KubeEvent),\n/* harmony export */ \"eventApi\": () => (/* binding */ eventApi)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _utils_formatDuration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/formatDuration */ \"./src/common/utils/formatDuration.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _utils_cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/cluster-id-url-parsing */ \"./src/common/utils/cluster-id-url-parsing.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\nclass KubeEvent extends _kube_object__WEBPACK_IMPORTED_MODULE_1__.KubeObject {\n isWarning() {\n return this.type === \"Warning\";\n }\n getSource() {\n const { component, host } = this.source;\n return `${component} ${host || \"\"}`;\n }\n getFirstSeenTime() {\n const diff = moment__WEBPACK_IMPORTED_MODULE_0___default()().diff(this.firstTimestamp);\n return (0,_utils_formatDuration__WEBPACK_IMPORTED_MODULE_2__.formatDuration)(diff, true);\n }\n getLastSeenTime() {\n const diff = moment__WEBPACK_IMPORTED_MODULE_0___default()().diff(this.lastTimestamp);\n return (0,_utils_formatDuration__WEBPACK_IMPORTED_MODULE_2__.formatDuration)(diff, true);\n }\n}\nObject.defineProperty(KubeEvent, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Event\"\n});\nObject.defineProperty(KubeEvent, \"namespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n});\nObject.defineProperty(KubeEvent, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"/api/v1/events\"\n});\nlet eventApi;\nif ((0,_utils_cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_4__.isClusterPageContext)()) {\n eventApi = new _kube_api__WEBPACK_IMPORTED_MODULE_3__.KubeApi({\n objectConstructor: KubeEvent,\n });\n}\n\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/endpoints/events.api.ts?");
32726
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeEvent\": () => (/* binding */ KubeEvent),\n/* harmony export */ \"eventApi\": () => (/* binding */ eventApi)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _kube_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _utils_formatDuration__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/formatDuration */ \"./src/common/utils/formatDuration.ts\");\n/* harmony import */ var _kube_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-api */ \"./src/common/k8s-api/kube-api.ts\");\n/* harmony import */ var _utils_cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/cluster-id-url-parsing */ \"./src/common/utils/cluster-id-url-parsing.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\nclass KubeEvent extends _kube_object__WEBPACK_IMPORTED_MODULE_1__.KubeObject {\n isWarning() {\n return this.type === \"Warning\";\n }\n getSource() {\n const { component, host } = this.source;\n return `${component} ${host || \"\"}`;\n }\n /**\n * @deprecated This function is not reactive to changing of time. If rendering use `<ReactiveDuration />` instead\n */\n getFirstSeenTime() {\n const diff = moment__WEBPACK_IMPORTED_MODULE_0___default()().diff(this.firstTimestamp);\n return (0,_utils_formatDuration__WEBPACK_IMPORTED_MODULE_2__.formatDuration)(diff, true);\n }\n /**\n * @deprecated This function is not reactive to changing of time. If rendering use `<ReactiveDuration />` instead\n */\n getLastSeenTime() {\n const diff = moment__WEBPACK_IMPORTED_MODULE_0___default()().diff(this.lastTimestamp);\n return (0,_utils_formatDuration__WEBPACK_IMPORTED_MODULE_2__.formatDuration)(diff, true);\n }\n}\nObject.defineProperty(KubeEvent, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Event\"\n});\nObject.defineProperty(KubeEvent, \"namespaced\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n});\nObject.defineProperty(KubeEvent, \"apiBase\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"/api/v1/events\"\n});\nlet eventApi;\nif ((0,_utils_cluster_id_url_parsing__WEBPACK_IMPORTED_MODULE_4__.isClusterPageContext)()) {\n eventApi = new _kube_api__WEBPACK_IMPORTED_MODULE_3__.KubeApi({\n objectConstructor: KubeEvent,\n });\n}\n\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/endpoints/events.api.ts?");
32727
32727
 
32728
32728
  /***/ }),
32729
32729
 
@@ -33108,7 +33108,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
33108
33108
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33109
33109
 
33110
33110
  "use strict";
33111
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeCreationError\": () => (/* binding */ KubeCreationError),\n/* harmony export */ \"KubeObject\": () => (/* binding */ KubeObject),\n/* harmony export */ \"KubeStatus\": () => (/* binding */ KubeStatus)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./endpoints/resource-applier.api */ \"./src/common/k8s-api/endpoints/resource-applier.api.ts\");\n/* harmony import */ var _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils/type-narrowing */ \"./src/common/utils/type-narrowing.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n// Base class for all kubernetes objects\n\n\n\n\n\nclass KubeStatus {\n constructor(data) {\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Status\"\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"message\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.apiVersion = data.apiVersion;\n this.code = data.code;\n this.message = data.message || \"\";\n this.reason = data.reason || \"\";\n }\n}\nclass KubeCreationError extends Error {\n constructor(message, data) {\n super(message);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: data\n });\n }\n}\nclass KubeObject {\n constructor(data) {\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"spec\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"managedFields\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n if (typeof data !== \"object\") {\n throw new TypeError(`Cannot create a KubeObject from ${typeof data}`);\n }\n if (!data.metadata || typeof data.metadata !== \"object\") {\n throw new KubeCreationError(`Cannot create a KubeObject from an object without metadata`, data);\n }\n Object.assign(this, data);\n (0,_utils__WEBPACK_IMPORTED_MODULE_1__.autoBind)(this);\n }\n static create(data) {\n return new KubeObject(data);\n }\n static isNonSystem(item) {\n return !item.metadata.name.startsWith(\"system:\");\n }\n static isJsonApiData(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"kind\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"apiVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"metadata\", KubeObject.isKubeJsonApiMetadata));\n }\n static isKubeJsonApiListMetadata(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"resourceVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"selfLink\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString));\n }\n static isKubeJsonApiMetadata(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"uid\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"name\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"resourceVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"selfLink\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"namespace\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"creationTimestamp\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"continue\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"finalizers\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isTypedArray, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"labels\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"annotations\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)));\n }\n static isPartialJsonApiMetadata(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"uid\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"name\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"resourceVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"selfLink\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"namespace\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"creationTimestamp\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"continue\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"finalizers\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isTypedArray, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"labels\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"annotations\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)));\n }\n static isPartialJsonApiData(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"kind\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"apiVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"metadata\", KubeObject.isPartialJsonApiMetadata));\n }\n static isJsonApiDataList(object, verifyItem) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"kind\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"apiVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"metadata\", KubeObject.isKubeJsonApiListMetadata)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"items\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isTypedArray, verifyItem)));\n }\n static stringifyLabels(labels) {\n if (!labels)\n return [];\n return Object.entries(labels).map(([name, value]) => `${name}=${value}`);\n }\n get selfLink() {\n return this.metadata.selfLink;\n }\n getId() {\n return this.metadata.uid;\n }\n getResourceVersion() {\n return this.metadata.resourceVersion;\n }\n getName() {\n return this.metadata.name;\n }\n getNs() {\n // avoid \"null\" serialization via JSON.stringify when post data\n return this.metadata.namespace || undefined;\n }\n getTimeDiffFromNow() {\n return Date.now() - new Date(this.metadata.creationTimestamp).getTime();\n }\n getAge(humanize = true, compact = true, fromNow = false) {\n if (fromNow) {\n return moment__WEBPACK_IMPORTED_MODULE_0___default()(this.metadata.creationTimestamp).fromNow(); // \"string\", getTimeDiffFromNow() cannot be used\n }\n const diff = this.getTimeDiffFromNow();\n if (humanize) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.formatDuration)(diff, compact);\n }\n return diff;\n }\n getFinalizers() {\n return this.metadata.finalizers || [];\n }\n getLabels() {\n return KubeObject.stringifyLabels(this.metadata.labels);\n }\n getAnnotations(filter = false) {\n const labels = KubeObject.stringifyLabels(this.metadata.annotations);\n return filter ? labels.filter(label => {\n const skip = _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__.annotations.some(key => label.startsWith(key));\n return !skip;\n }) : labels;\n }\n getOwnerRefs() {\n const refs = this.metadata.ownerReferences || [];\n const namespace = this.getNs();\n return refs.map(ownerRef => ({ ...ownerRef, namespace }));\n }\n getSearchFields() {\n const { getName, getId, getNs, getAnnotations, getLabels } = this;\n return [\n getName(),\n getNs(),\n getId(),\n ...getLabels(),\n ...getAnnotations(true),\n ];\n }\n toPlainObject() {\n return JSON.parse(JSON.stringify(this));\n }\n /**\n * @deprecated use KubeApi.patch instead\n */\n async patch(patch) {\n for (const op of patch) {\n if (KubeObject.nonEditablePaths.has(op.path)) {\n throw new Error(`Failed to update ${this.kind}: JSON pointer ${op.path} has been modified`);\n }\n for (const pathPrefix of KubeObject.nonEditablePathPrefixes) {\n if (op.path.startsWith(`${pathPrefix}/`)) {\n throw new Error(`Failed to update ${this.kind}: Child JSON pointer of ${op.path} has been modified`);\n }\n }\n }\n return _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__.patch(this.getName(), this.kind, this.getNs(), patch);\n }\n /**\n * Perform a full update (or more specifically a replace)\n *\n * Note: this is brittle if `data` is not actually partial (but instead whole).\n * As fields such as `resourceVersion` will probably out of date. This is a\n * common race condition.\n *\n * @deprecated use KubeApi.update instead\n */\n async update(data) {\n // use unified resource-applier api for updating all k8s objects\n return _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__.update({\n ...this.toPlainObject(),\n ...data,\n });\n }\n /**\n * @deprecated use KubeApi.delete instead\n */\n delete(params) {\n return _index__WEBPACK_IMPORTED_MODULE_2__.apiKube.del(this.selfLink, params);\n }\n}\n/**\n * These must be RFC6902 compliant paths\n */\nObject.defineProperty(KubeObject, \"nonEditablePathPrefixes\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: [\n \"/metadata/managedFields\",\n \"/status\",\n ]\n});\nObject.defineProperty(KubeObject, \"nonEditablePaths\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Set([\n \"/apiVersion\",\n \"/kind\",\n \"/metadata/name\",\n \"/metadata/selfLink\",\n \"/metadata/resourceVersion\",\n \"/metadata/uid\",\n ...KubeObject.nonEditablePathPrefixes,\n ])\n});\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/kube-object.ts?");
33111
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeCreationError\": () => (/* binding */ KubeCreationError),\n/* harmony export */ \"KubeObject\": () => (/* binding */ KubeObject),\n/* harmony export */ \"KubeStatus\": () => (/* binding */ KubeStatus)\n/* harmony export */ });\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\");\n/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./src/common/k8s-api/index.ts\");\n/* harmony import */ var _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./endpoints/resource-applier.api */ \"./src/common/k8s-api/endpoints/resource-applier.api.ts\");\n/* harmony import */ var _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/utils/type-narrowing */ \"./src/common/utils/type-narrowing.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n// Base class for all kubernetes objects\n\n\n\n\n\nclass KubeStatus {\n constructor(data) {\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"Status\"\n });\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"message\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"reason\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.apiVersion = data.apiVersion;\n this.code = data.code;\n this.message = data.message || \"\";\n this.reason = data.reason || \"\";\n }\n}\nclass KubeCreationError extends Error {\n constructor(message, data) {\n super(message);\n Object.defineProperty(this, \"data\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: data\n });\n }\n}\nclass KubeObject {\n constructor(data) {\n Object.defineProperty(this, \"apiVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kind\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"metadata\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"spec\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"managedFields\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n if (typeof data !== \"object\") {\n throw new TypeError(`Cannot create a KubeObject from ${typeof data}`);\n }\n if (!data.metadata || typeof data.metadata !== \"object\") {\n throw new KubeCreationError(`Cannot create a KubeObject from an object without metadata`, data);\n }\n Object.assign(this, data);\n (0,_utils__WEBPACK_IMPORTED_MODULE_1__.autoBind)(this);\n }\n static create(data) {\n return new KubeObject(data);\n }\n static isNonSystem(item) {\n return !item.metadata.name.startsWith(\"system:\");\n }\n static isJsonApiData(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"kind\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"apiVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"metadata\", KubeObject.isKubeJsonApiMetadata));\n }\n static isKubeJsonApiListMetadata(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"resourceVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"selfLink\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString));\n }\n static isKubeJsonApiMetadata(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"uid\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"name\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"resourceVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"selfLink\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"namespace\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"creationTimestamp\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"continue\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"finalizers\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isTypedArray, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"labels\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"annotations\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)));\n }\n static isPartialJsonApiMetadata(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"uid\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"name\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"resourceVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"selfLink\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"namespace\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"creationTimestamp\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"continue\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"finalizers\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isTypedArray, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"labels\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString))\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"annotations\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isRecord, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString, _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)));\n }\n static isPartialJsonApiData(object) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"kind\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"apiVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasOptionalProperty)(object, \"metadata\", KubeObject.isPartialJsonApiMetadata));\n }\n static isJsonApiDataList(object, verifyItem) {\n return ((0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isObject)(object)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"kind\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"apiVersion\", _common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isString)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"metadata\", KubeObject.isKubeJsonApiListMetadata)\n && (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.hasTypedProperty)(object, \"items\", (0,_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.bindPredicate)(_common_utils_type_narrowing__WEBPACK_IMPORTED_MODULE_4__.isTypedArray, verifyItem)));\n }\n static stringifyLabels(labels) {\n if (!labels)\n return [];\n return Object.entries(labels).map(([name, value]) => `${name}=${value}`);\n }\n get selfLink() {\n return this.metadata.selfLink;\n }\n getId() {\n return this.metadata.uid;\n }\n getResourceVersion() {\n return this.metadata.resourceVersion;\n }\n getName() {\n return this.metadata.name;\n }\n getNs() {\n // avoid \"null\" serialization via JSON.stringify when post data\n return this.metadata.namespace || undefined;\n }\n /**\n * This function computes the number of milliseconds from the UNIX EPOCH to the\n * creation timestamp of this object.\n */\n getCreationTimestamp() {\n return new Date(this.metadata.creationTimestamp).getTime();\n }\n /**\n * @deprecated This function computes a new \"now\" on every call which might cause subtle issues if called multiple times\n *\n * NOTE: Generally you can use `getCreationTimestamp` instead.\n */\n getTimeDiffFromNow() {\n return Date.now() - new Date(this.metadata.creationTimestamp).getTime();\n }\n /**\n * @deprecated This function computes a new \"now\" on every call might cause subtle issues if called multiple times\n *\n * NOTE: this function also is not reactive to updates in the current time so it should not be used for renderering\n */\n getAge(humanize = true, compact = true, fromNow = false) {\n if (fromNow) {\n return moment__WEBPACK_IMPORTED_MODULE_0___default()(this.metadata.creationTimestamp).fromNow(); // \"string\", getTimeDiffFromNow() cannot be used\n }\n const diff = this.getTimeDiffFromNow();\n if (humanize) {\n return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.formatDuration)(diff, compact);\n }\n return diff;\n }\n getFinalizers() {\n return this.metadata.finalizers || [];\n }\n getLabels() {\n return KubeObject.stringifyLabels(this.metadata.labels);\n }\n getAnnotations(filter = false) {\n const labels = KubeObject.stringifyLabels(this.metadata.annotations);\n return filter ? labels.filter(label => {\n const skip = _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__.annotations.some(key => label.startsWith(key));\n return !skip;\n }) : labels;\n }\n getOwnerRefs() {\n const refs = this.metadata.ownerReferences || [];\n const namespace = this.getNs();\n return refs.map(ownerRef => ({ ...ownerRef, namespace }));\n }\n getSearchFields() {\n const { getName, getId, getNs, getAnnotations, getLabels } = this;\n return [\n getName(),\n getNs(),\n getId(),\n ...getLabels(),\n ...getAnnotations(true),\n ];\n }\n toPlainObject() {\n return JSON.parse(JSON.stringify(this));\n }\n /**\n * @deprecated use KubeApi.patch instead\n */\n async patch(patch) {\n for (const op of patch) {\n if (KubeObject.nonEditablePaths.has(op.path)) {\n throw new Error(`Failed to update ${this.kind}: JSON pointer ${op.path} has been modified`);\n }\n for (const pathPrefix of KubeObject.nonEditablePathPrefixes) {\n if (op.path.startsWith(`${pathPrefix}/`)) {\n throw new Error(`Failed to update ${this.kind}: Child JSON pointer of ${op.path} has been modified`);\n }\n }\n }\n return _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__.patch(this.getName(), this.kind, this.getNs(), patch);\n }\n /**\n * Perform a full update (or more specifically a replace)\n *\n * Note: this is brittle if `data` is not actually partial (but instead whole).\n * As fields such as `resourceVersion` will probably out of date. This is a\n * common race condition.\n *\n * @deprecated use KubeApi.update instead\n */\n async update(data) {\n // use unified resource-applier api for updating all k8s objects\n return _endpoints_resource_applier_api__WEBPACK_IMPORTED_MODULE_3__.update({\n ...this.toPlainObject(),\n ...data,\n });\n }\n /**\n * @deprecated use KubeApi.delete instead\n */\n delete(params) {\n return _index__WEBPACK_IMPORTED_MODULE_2__.apiKube.del(this.selfLink, params);\n }\n}\n/**\n * These must be RFC6902 compliant paths\n */\nObject.defineProperty(KubeObject, \"nonEditablePathPrefixes\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: [\n \"/metadata/managedFields\",\n \"/status\",\n ]\n});\nObject.defineProperty(KubeObject, \"nonEditablePaths\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Set([\n \"/apiVersion\",\n \"/kind\",\n \"/metadata/name\",\n \"/metadata/selfLink\",\n \"/metadata/resourceVersion\",\n \"/metadata/uid\",\n ...KubeObject.nonEditablePathPrefixes,\n ])\n});\n\n\n//# sourceURL=webpack://open-lens/./src/common/k8s-api/kube-object.ts?");
33112
33112
 
33113
33113
  /***/ }),
33114
33114
 
@@ -33581,7 +33581,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
33581
33581
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33582
33582
 
33583
33583
  "use strict";
33584
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UserStore\": () => (/* binding */ UserStore)\n/* harmony export */ });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _base_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base-store */ \"./src/common/base-store.ts\");\n/* harmony import */ var _migrations_user_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../migrations/user-store */ \"./src/migrations/user-store/index.ts\");\n/* harmony import */ var _utils_app_version__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/app-version */ \"./src/common/utils/app-version.ts\");\n/* harmony import */ var _kube_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _renderer_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../renderer/utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _preferences_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./preferences-helpers */ \"./src/common/user-store/preferences-helpers.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nclass UserStore extends _base_store__WEBPACK_IMPORTED_MODULE_2__.BaseStore /* implements UserStoreFlatModel (when strict null is enabled) */ {\n constructor() {\n super({\n configName: \"lens-user-store\",\n migrations: _migrations_user_store__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n });\n Object.defineProperty(this, \"displayName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UserStore\"\n });\n Object.defineProperty(this, \"lastSeenAppVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"0.0.0\"\n });\n /**\n * used in add-cluster page for providing context\n */\n Object.defineProperty(this, \"kubeConfigPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _kube_helpers__WEBPACK_IMPORTED_MODULE_5__.kubeConfigDefaultPath\n });\n Object.defineProperty(this, \"seenContexts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.set()\n });\n Object.defineProperty(this, \"newContexts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.set()\n });\n Object.defineProperty(this, \"allowTelemetry\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"allowErrorReporting\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"allowUntrustedCAs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"colorTheme\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"terminalTheme\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"localeTimezone\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"downloadMirror\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"httpsProxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shell\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"downloadBinariesPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubectlBinariesPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"terminalCopyOnSelect\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"terminalConfig\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"updateChannel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"extensionRegistryUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Download kubectl binaries matching cluster version\n */\n Object.defineProperty(this, \"downloadKubectlBinaries\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"openAtLogin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * The column IDs under each configurable table ID that have been configured\n * to not be shown\n */\n Object.defineProperty(this, \"hiddenTableColumns\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n /**\n * Monaco editor configs\n */\n Object.defineProperty(this, \"editorConfiguration\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * The set of file/folder paths to be synced\n */\n Object.defineProperty(this, \"syncKubeconfigEntries\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.makeObservable)(this);\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain) {\n (0,_migrations_user_store__WEBPACK_IMPORTED_MODULE_3__.fileNameMigration)();\n }\n this.load();\n }\n get isNewVersion() {\n return semver__WEBPACK_IMPORTED_MODULE_1___default().gt((0,_utils_app_version__WEBPACK_IMPORTED_MODULE_4__.getAppVersion)(), this.lastSeenAppVersion);\n }\n get resolvedShell() {\n return this.shell || process.env.SHELL || process.env.PTYSHELL;\n }\n get isAllowedToDowngrade() {\n return new semver__WEBPACK_IMPORTED_MODULE_1__.SemVer((0,_utils_app_version__WEBPACK_IMPORTED_MODULE_4__.getAppVersion)()).prerelease[0] !== this.updateChannel;\n }\n startMainReactions() {\n // track telemetry availability\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.allowTelemetry, allowed => {\n _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__.appEventBus.emit({ name: \"telemetry\", action: allowed ? \"enabled\" : \"disabled\" });\n });\n // open at system start-up\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.openAtLogin, openAtLogin => {\n electron__WEBPACK_IMPORTED_MODULE_0__.app.setLoginItemSettings({\n openAtLogin,\n openAsHidden: true,\n args: [\"--hidden\"],\n });\n }, {\n fireImmediately: true,\n });\n }\n /**\n * Checks if a column (by ID) for a table (by ID) is configured to be hidden\n * @param tableId The ID of the table to be checked against\n * @param columnIds The list of IDs the check if one is hidden\n * @returns true if at least one column under the table is set to hidden\n */\n isTableColumnHidden(tableId, ...columnIds) {\n if (columnIds.length === 0) {\n return false;\n }\n const config = this.hiddenTableColumns.get(tableId);\n if (!config) {\n return false;\n }\n return columnIds.some(columnId => config.has(columnId));\n }\n /**\n * Toggles the hidden configuration of a table's column\n */\n toggleTableColumnVisibility(tableId, columnId) {\n (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.toggle)((0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.getOrInsertSet)(this.hiddenTableColumns, tableId), columnId);\n }\n resetTheme() {\n this.colorTheme = _preferences_helpers__WEBPACK_IMPORTED_MODULE_8__.DESCRIPTORS.colorTheme.fromStore(undefined);\n }\n saveLastSeenAppVersion() {\n _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__.appEventBus.emit({ name: \"app\", action: \"whats-new-seen\" });\n this.lastSeenAppVersion = (0,_utils_app_version__WEBPACK_IMPORTED_MODULE_4__.getAppVersion)();\n }\n setLocaleTimezone(tz) {\n this.localeTimezone = tz;\n }\n fromStore({ lastSeenAppVersion, preferences } = {}) {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(\"UserStore.fromStore()\", { lastSeenAppVersion, preferences });\n if (lastSeenAppVersion) {\n this.lastSeenAppVersion = lastSeenAppVersion;\n }\n for (const [key, { fromStore }] of (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.entries)(_preferences_helpers__WEBPACK_IMPORTED_MODULE_8__.DESCRIPTORS)) {\n const curVal = this[key];\n const newVal = fromStore((_a = (preferences)) === null || _a === void 0 ? void 0 : _a[key]);\n if ((0,mobx__WEBPACK_IMPORTED_MODULE_10__.isObservableArray)(curVal)\n || (0,mobx__WEBPACK_IMPORTED_MODULE_10__.isObservableSet)(curVal)\n || (0,mobx__WEBPACK_IMPORTED_MODULE_10__.isObservableMap)(curVal)) {\n curVal.replace(newVal);\n }\n else {\n this[key] = newVal;\n }\n }\n }\n toJSON() {\n const preferences = (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.fromEntries)((0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.entries)(_preferences_helpers__WEBPACK_IMPORTED_MODULE_8__.DESCRIPTORS)\n .map(([key, { toStore }]) => [key, toStore(this[key])]));\n return (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.toJS)({\n lastSeenAppVersion: this.lastSeenAppVersion,\n preferences,\n });\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"lastSeenAppVersion\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"kubeConfigPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"seenContexts\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"newContexts\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"allowTelemetry\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"allowErrorReporting\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"allowUntrustedCAs\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"colorTheme\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"terminalTheme\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"localeTimezone\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"downloadMirror\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"httpsProxy\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"shell\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"downloadBinariesPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"kubectlBinariesPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"terminalCopyOnSelect\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"terminalConfig\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"updateChannel\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"extensionRegistryUrl\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"downloadKubectlBinaries\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"openAtLogin\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"editorConfiguration\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], UserStore.prototype, \"isNewVersion\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], UserStore.prototype, \"resolvedShell\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], UserStore.prototype, \"isAllowedToDowngrade\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"resetTheme\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"saveLastSeenAppVersion\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"setLocaleTimezone\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"fromStore\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/common/user-store/user-store.ts?");
33584
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UserStore\": () => (/* binding */ UserStore)\n/* harmony export */ });\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ \"electron\");\n/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! semver */ \"./node_modules/semver/index.js\");\n/* harmony import */ var semver__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(semver__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _base_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base-store */ \"./src/common/base-store.ts\");\n/* harmony import */ var _migrations_user_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../migrations/user-store */ \"./src/migrations/user-store/index.ts\");\n/* harmony import */ var _utils_app_version__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/app-version */ \"./src/common/utils/app-version.ts\");\n/* harmony import */ var _kube_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../kube-helpers */ \"./src/common/kube-helpers.ts\");\n/* harmony import */ var _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _renderer_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../renderer/utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _preferences_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./preferences-helpers */ \"./src/common/user-store/preferences-helpers.ts\");\n/* harmony import */ var _main_logger__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../main/logger */ \"./src/main/logger.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nclass UserStore extends _base_store__WEBPACK_IMPORTED_MODULE_2__.BaseStore /* implements UserStoreFlatModel (when strict null is enabled) */ {\n constructor() {\n super({\n configName: \"lens-user-store\",\n migrations: _migrations_user_store__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n });\n Object.defineProperty(this, \"displayName\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"UserStore\"\n });\n Object.defineProperty(this, \"lastSeenAppVersion\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: \"0.0.0\"\n });\n /**\n * used in add-cluster page for providing context\n */\n Object.defineProperty(this, \"kubeConfigPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _kube_helpers__WEBPACK_IMPORTED_MODULE_5__.kubeConfigDefaultPath\n });\n Object.defineProperty(this, \"seenContexts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.set()\n });\n Object.defineProperty(this, \"newContexts\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.set()\n });\n Object.defineProperty(this, \"allowTelemetry\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"allowErrorReporting\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"allowUntrustedCAs\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"colorTheme\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"terminalTheme\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"localeTimezone\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"downloadMirror\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"httpsProxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"shell\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"downloadBinariesPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"kubectlBinariesPath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"terminalCopyOnSelect\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"terminalConfig\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"updateChannel\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"extensionRegistryUrl\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Download kubectl binaries matching cluster version\n */\n Object.defineProperty(this, \"downloadKubectlBinaries\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"openAtLogin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * The column IDs under each configurable table ID that have been configured\n * to not be shown\n */\n Object.defineProperty(this, \"hiddenTableColumns\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n /**\n * Monaco editor configs\n */\n Object.defineProperty(this, \"editorConfiguration\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * The set of file/folder paths to be synced\n */\n Object.defineProperty(this, \"syncKubeconfigEntries\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: mobx__WEBPACK_IMPORTED_MODULE_10__.observable.map()\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.makeObservable)(this);\n if (electron__WEBPACK_IMPORTED_MODULE_0__.ipcMain) {\n (0,_migrations_user_store__WEBPACK_IMPORTED_MODULE_3__.fileNameMigration)();\n }\n this.load();\n }\n get isNewVersion() {\n return semver__WEBPACK_IMPORTED_MODULE_1___default().gt((0,_utils_app_version__WEBPACK_IMPORTED_MODULE_4__.getAppVersion)(), this.lastSeenAppVersion);\n }\n get resolvedShell() {\n return this.shell || process.env.SHELL || process.env.PTYSHELL;\n }\n get isAllowedToDowngrade() {\n return new semver__WEBPACK_IMPORTED_MODULE_1__.SemVer((0,_utils_app_version__WEBPACK_IMPORTED_MODULE_4__.getAppVersion)()).prerelease[0] !== this.updateChannel;\n }\n startMainReactions() {\n // track telemetry availability\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.allowTelemetry, allowed => {\n _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__.appEventBus.emit({ name: \"telemetry\", action: allowed ? \"enabled\" : \"disabled\" });\n });\n // open at system start-up\n (0,mobx__WEBPACK_IMPORTED_MODULE_10__.reaction)(() => this.openAtLogin, openAtLogin => {\n electron__WEBPACK_IMPORTED_MODULE_0__.app.setLoginItemSettings({\n openAtLogin,\n openAsHidden: true,\n args: [\"--hidden\"],\n });\n }, {\n fireImmediately: true,\n });\n }\n /**\n * Checks if a column (by ID) for a table (by ID) is configured to be hidden\n * @param tableId The ID of the table to be checked against\n * @param columnIds The list of IDs the check if one is hidden\n * @returns true if at least one column under the table is set to hidden\n */\n isTableColumnHidden(tableId, ...columnIds) {\n if (columnIds.length === 0) {\n return false;\n }\n const config = this.hiddenTableColumns.get(tableId);\n if (!config) {\n return false;\n }\n return columnIds.some(columnId => config.has(columnId));\n }\n /**\n * Toggles the hidden configuration of a table's column\n */\n toggleTableColumnVisibility(tableId, columnId) {\n (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.toggle)((0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.getOrInsertSet)(this.hiddenTableColumns, tableId), columnId);\n }\n resetTheme() {\n this.colorTheme = _preferences_helpers__WEBPACK_IMPORTED_MODULE_8__.DESCRIPTORS.colorTheme.fromStore(undefined);\n }\n saveLastSeenAppVersion() {\n _app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_6__.appEventBus.emit({ name: \"app\", action: \"whats-new-seen\" });\n this.lastSeenAppVersion = (0,_utils_app_version__WEBPACK_IMPORTED_MODULE_4__.getAppVersion)();\n }\n setLocaleTimezone(tz) {\n this.localeTimezone = tz;\n }\n fromStore({ lastSeenAppVersion, preferences } = {}) {\n var _a;\n _main_logger__WEBPACK_IMPORTED_MODULE_9__[\"default\"].debug(\"UserStore.fromStore()\", { lastSeenAppVersion, preferences });\n if (lastSeenAppVersion) {\n this.lastSeenAppVersion = lastSeenAppVersion;\n }\n for (const [key, { fromStore }] of (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.entries)(_preferences_helpers__WEBPACK_IMPORTED_MODULE_8__.DESCRIPTORS)) {\n const curVal = this[key];\n const newVal = fromStore((_a = (preferences)) === null || _a === void 0 ? void 0 : _a[key]);\n if ((0,mobx__WEBPACK_IMPORTED_MODULE_10__.isObservableArray)(curVal)) {\n curVal.replace(newVal);\n }\n else if ((0,mobx__WEBPACK_IMPORTED_MODULE_10__.isObservableSet)(curVal) || (0,mobx__WEBPACK_IMPORTED_MODULE_10__.isObservableMap)(curVal)) {\n curVal.replace(newVal);\n }\n else {\n this[key] = newVal;\n }\n }\n }\n toJSON() {\n const preferences = (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.fromEntries)((0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.entries)(_preferences_helpers__WEBPACK_IMPORTED_MODULE_8__.DESCRIPTORS)\n .map(([key, { toStore }]) => [key, toStore(this[key])]));\n return (0,_renderer_utils__WEBPACK_IMPORTED_MODULE_7__.toJS)({\n lastSeenAppVersion: this.lastSeenAppVersion,\n preferences,\n });\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"lastSeenAppVersion\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"kubeConfigPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"seenContexts\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"newContexts\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"allowTelemetry\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"allowErrorReporting\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"allowUntrustedCAs\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"colorTheme\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"terminalTheme\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"localeTimezone\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"downloadMirror\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"httpsProxy\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"shell\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"downloadBinariesPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"kubectlBinariesPath\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"terminalCopyOnSelect\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"terminalConfig\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", String)\n], UserStore.prototype, \"updateChannel\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"extensionRegistryUrl\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"downloadKubectlBinaries\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Boolean)\n], UserStore.prototype, \"openAtLogin\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.observable,\n __metadata(\"design:type\", Object)\n], UserStore.prototype, \"editorConfiguration\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], UserStore.prototype, \"isNewVersion\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [])\n], UserStore.prototype, \"resolvedShell\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], UserStore.prototype, \"isAllowedToDowngrade\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"resetTheme\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"saveLastSeenAppVersion\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"setLocaleTimezone\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_10__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], UserStore.prototype, \"fromStore\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/common/user-store/user-store.ts?");
33585
33585
 
33586
33586
  /***/ }),
33587
33587
 
@@ -33988,7 +33988,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
33988
33988
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
33989
33989
 
33990
33990
  "use strict";
33991
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"filled\": () => (/* binding */ filled),\n/* harmony export */ \"zip\": () => (/* binding */ zip)\n/* harmony export */ });\n/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/array */ \"./src/common/utils/array.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n/**\n * Iterates over `sources` yielding full tuples until one of the tuple arrays\n * is empty. Then it returns a tuple with the rest of each of tuples\n * @param sources The source arrays\n * @yields A tuple of the next element from each of the sources\n * @returns The tuple of all the sources as soon as at least one of the sources is exausted\n */\nfunction* zip(...sources) {\n const maxSafeLength = Math.min(...sources.map(source => source.length));\n for (let i = 0; i < maxSafeLength; i += 1) {\n yield sources.map(source => source[i]);\n }\n return sources.map(source => source.slice(maxSafeLength));\n}\n/**\n * Returns a `length` tuple filled with copies of `value`\n * @param length The size of the tuple\n * @param value The value for each of the tuple entries\n */\nfunction filled(length, value) {\n return _utils_array__WEBPACK_IMPORTED_MODULE_0__.filled(length, value);\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/utils/tuple.ts?");
33991
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"filled\": () => (/* binding */ filled),\n/* harmony export */ \"from\": () => (/* binding */ from),\n/* harmony export */ \"zip\": () => (/* binding */ zip)\n/* harmony export */ });\n/* harmony import */ var _utils_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/array */ \"./src/common/utils/array.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n/**\n * Iterates over `sources` yielding full tuples until one of the tuple arrays\n * is empty. Then it returns a tuple with the rest of each of tuples\n * @param sources The source arrays\n * @yields A tuple of the next element from each of the sources\n * @returns The tuple of all the sources as soon as at least one of the sources is exausted\n */\nfunction* zip(...sources) {\n const maxSafeLength = Math.min(...sources.map(source => source.length));\n for (let i = 0; i < maxSafeLength; i += 1) {\n yield sources.map(source => source[i]);\n }\n return sources.map(source => source.slice(maxSafeLength));\n}\n/**\n * Returns a `length` tuple filled with copies of `value`\n * @param length The size of the tuple\n * @param value The value for each of the tuple entries\n */\nfunction filled(length, value) {\n return _utils_array__WEBPACK_IMPORTED_MODULE_0__.filled(length, value);\n}\n/**\n * A function for converting an explicit array to a tuple but without the `readonly` typing\n */\nfunction from(...args) {\n return args;\n}\n\n\n//# sourceURL=webpack://open-lens/./src/common/utils/tuple.ts?");
33992
33992
 
33993
33993
  /***/ }),
33994
33994
 
@@ -34714,7 +34714,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
34714
34714
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34715
34715
 
34716
34716
  "use strict";
34717
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LensProxy\": () => (/* binding */ LensProxy),\n/* harmony export */ \"isLongRunningRequest\": () => (/* binding */ isLongRunningRequest)\n/* harmony export */ });\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! spdy */ \"./node_modules/spdy/lib/spdy.js\");\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(spdy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _utils_parse_query__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/parse-query */ \"./src/main/utils/parse-query.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\nconst watchParam = \"watch\";\nconst followParam = \"follow\";\nfunction isLongRunningRequest(reqUrl) {\n const url = new URL(reqUrl, \"http://localhost\");\n return (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_5__.getBoolean)(url.searchParams, watchParam) || (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_5__.getBoolean)(url.searchParams, followParam);\n}\n/**\n * This is the list of ports that chrome considers unsafe to allow HTTP\n * conntections to. Because they are the standard ports for processes that are\n * too forgiving in the connection types they accept.\n *\n * If we get one of these ports, the easiest thing to do is to just try again.\n *\n * Source: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc\n */\nconst disallowedPorts = new Set([\n 1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 69, 77, 79,\n 87, 95, 101, 102, 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 137,\n 139, 143, 161, 179, 389, 427, 465, 512, 513, 514, 515, 526, 530, 531, 532,\n 540, 548, 554, 556, 563, 587, 601, 636, 989, 990, 993, 995, 1719, 1720, 1723,\n 2049, 3659, 4045, 5060, 5061, 6000, 6566, 6665, 6666, 6667, 6668, 6669, 6697,\n 10080,\n]);\nclass LensProxy extends _common_utils__WEBPACK_IMPORTED_MODULE_3__.Singleton {\n constructor(router, proxy, { shellApiRequest, kubeApiRequest, getClusterForRequest }) {\n super();\n Object.defineProperty(this, \"router\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: router\n });\n Object.defineProperty(this, \"proxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: proxy\n });\n Object.defineProperty(this, \"origin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyServer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"closed\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"retryCounters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"getClusterForRequest\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"port\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.configureProxy(proxy);\n this.getClusterForRequest = getClusterForRequest;\n this.proxyServer = spdy__WEBPACK_IMPORTED_MODULE_0___default().createServer({\n spdy: {\n plain: true,\n protocols: [\"http/1.1\", \"spdy/3.1\"],\n },\n }, (req, res) => {\n this.handleRequest(req, res);\n });\n this.proxyServer\n .on(\"upgrade\", (req, socket, head) => {\n const isInternal = req.url.startsWith(`${_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiPrefix}?`);\n const cluster = getClusterForRequest(req);\n if (!cluster) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: Could not find cluster for upgrade request from url=${req.url}`);\n return socket.destroy();\n }\n const reqHandler = isInternal ? shellApiRequest : kubeApiRequest;\n (async () => reqHandler({ req, socket, head, cluster }))()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(\"[LENS-PROXY]: failed to handle proxy upgrade\", error));\n });\n }\n /**\n * Starts to listen on an OS provided port. Will reject if the server throws\n * an error.\n *\n * Resolves with the port number that was picked\n */\n attemptToListen() {\n return new Promise((resolve, reject) => {\n this.proxyServer.listen(0, \"127.0.0.1\");\n this.proxyServer\n .once(\"listening\", () => {\n this.proxyServer.removeAllListeners(\"error\"); // don't reject the promise\n const { address, port } = this.proxyServer.address();\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Proxy server has started at ${address}:${port}`);\n this.proxyServer.on(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Subsequent error: ${error}`);\n });\n this.port = port;\n _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_4__.appEventBus.emit({ name: \"lens-proxy\", action: \"listen\", params: { port } });\n resolve(port);\n })\n .once(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Proxy server failed to start: ${error}`);\n reject(error);\n });\n });\n }\n /**\n * Starts the lens proxy.\n * @resolves After the server is listening on a good port\n * @rejects if there is an error before that happens\n */\n async listen() {\n var _a;\n const seenPorts = new Set();\n while (true) {\n (_a = this.proxyServer) === null || _a === void 0 ? void 0 : _a.close();\n const port = await this.attemptToListen();\n if (!disallowedPorts.has(port)) {\n // We didn't get a port that would result in an ERR_UNSAFE_PORT error, use it\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].warn(`[LENS-PROXY]: Proxy server has with port known to be considered unsafe to connect to by chrome, restarting...`);\n if (seenPorts.has(port)) {\n /**\n * Assume that if we have seen the port before, then the OS has looped\n * through all the ports possible and we will not be able to get a safe\n * port.\n */\n throw new Error(\"Failed to start LensProxy due to seeing too many unsafe ports. Please restart Lens.\");\n }\n else {\n seenPorts.add(port);\n }\n }\n }\n close() {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(\"[LENS-PROXY]: Closing server\");\n this.proxyServer.close();\n this.closed = true;\n }\n configureProxy(proxy) {\n proxy.on(\"proxyRes\", (proxyRes, req, res) => {\n const retryCounterId = this.getRequestId(req);\n if (this.retryCounters.has(retryCounterId)) {\n this.retryCounters.delete(retryCounterId);\n }\n if (!res.headersSent && req.url) {\n const url = new URL(req.url, \"http://localhost\");\n if (url.searchParams.has(\"watch\")) {\n res.statusCode = proxyRes.statusCode;\n res.flushHeaders();\n }\n }\n proxyRes.on(\"aborted\", () => {\n res.end();\n });\n });\n proxy.on(\"error\", (error, req, res, target) => {\n if (this.closed) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: http proxy errored for cluster: ${error}`, { url: req.url });\n if (target) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`Failed proxy to target: ${JSON.stringify(target, null, 2)}`);\n if (req.method === \"GET\" && (!res.statusCode || res.statusCode >= 500)) {\n const reqId = this.getRequestId(req);\n const retryCount = this.retryCounters.get(reqId) || 0;\n const timeoutMs = retryCount * 250;\n if (retryCount < 20) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`Retrying proxy request to url: ${reqId}`);\n setTimeout(() => {\n this.retryCounters.set(reqId, retryCount + 1);\n this.handleRequest(req, res)\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: failed to handle request on proxy error: ${error}`));\n }, timeoutMs);\n }\n }\n }\n try {\n res.writeHead(500).end(`Oops, something went wrong.\\n${error}`);\n }\n catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: Failed to write headers: `, e);\n }\n });\n return proxy;\n }\n async getProxyTarget(req, contextHandler) {\n if (req.url.startsWith(_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiKubePrefix)) {\n delete req.headers.authorization;\n req.url = req.url.replace(_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiKubePrefix, \"\");\n return contextHandler.getApiTarget(isLongRunningRequest(req.url));\n }\n }\n getRequestId(req) {\n return req.headers.host + req.url;\n }\n async handleRequest(req, res) {\n const cluster = this.getClusterForRequest(req);\n if (cluster) {\n const proxyTarget = await this.getProxyTarget(req, cluster.contextHandler);\n if (proxyTarget) {\n return this.proxy.web(req, res, proxyTarget);\n }\n }\n this.router.route(cluster, req, res);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/main/lens-proxy.ts?");
34717
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LensProxy\": () => (/* binding */ LensProxy),\n/* harmony export */ \"isLongRunningRequest\": () => (/* binding */ isLongRunningRequest)\n/* harmony export */ });\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! spdy */ \"./node_modules/spdy/lib/spdy.js\");\n/* harmony import */ var spdy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(spdy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _common_vars__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/vars */ \"./src/common/vars.ts\");\n/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logger */ \"./src/main/logger.ts\");\n/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/utils */ \"./src/common/utils/index.ts\");\n/* harmony import */ var _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/app-event-bus/event-bus */ \"./src/common/app-event-bus/event-bus.ts\");\n/* harmony import */ var _utils_parse_query__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/parse-query */ \"./src/main/utils/parse-query.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\nconst watchParam = \"watch\";\nconst followParam = \"follow\";\nfunction isLongRunningRequest(reqUrl) {\n const url = new URL(reqUrl, \"http://localhost\");\n return (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_5__.getBoolean)(url.searchParams, watchParam) || (0,_utils_parse_query__WEBPACK_IMPORTED_MODULE_5__.getBoolean)(url.searchParams, followParam);\n}\n/**\n * This is the list of ports that chrome considers unsafe to allow HTTP\n * conntections to. Because they are the standard ports for processes that are\n * too forgiving in the connection types they accept.\n *\n * If we get one of these ports, the easiest thing to do is to just try again.\n *\n * Source: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc\n */\nconst disallowedPorts = new Set([\n 1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 69, 77, 79,\n 87, 95, 101, 102, 103, 104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 137,\n 139, 143, 161, 179, 389, 427, 465, 512, 513, 514, 515, 526, 530, 531, 532,\n 540, 548, 554, 556, 563, 587, 601, 636, 989, 990, 993, 995, 1719, 1720, 1723,\n 2049, 3659, 4045, 5060, 5061, 6000, 6566, 6665, 6666, 6667, 6668, 6669, 6697,\n 10080,\n]);\nclass LensProxy extends _common_utils__WEBPACK_IMPORTED_MODULE_3__.Singleton {\n constructor(router, proxy, { shellApiRequest, kubeApiUpgradeRequest, getClusterForRequest }) {\n super();\n Object.defineProperty(this, \"router\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: router\n });\n Object.defineProperty(this, \"proxy\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: proxy\n });\n Object.defineProperty(this, \"origin\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"proxyServer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"closed\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"retryCounters\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new Map()\n });\n Object.defineProperty(this, \"getClusterForRequest\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"port\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.configureProxy(proxy);\n this.getClusterForRequest = getClusterForRequest;\n this.proxyServer = spdy__WEBPACK_IMPORTED_MODULE_0___default().createServer({\n spdy: {\n plain: true,\n protocols: [\"http/1.1\", \"spdy/3.1\"],\n },\n }, (req, res) => {\n this.handleRequest(req, res);\n });\n this.proxyServer\n .on(\"upgrade\", (req, socket, head) => {\n const isInternal = req.url.startsWith(`${_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiPrefix}?`);\n const cluster = getClusterForRequest(req);\n if (!cluster) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: Could not find cluster for upgrade request from url=${req.url}`);\n return socket.destroy();\n }\n const reqHandler = isInternal ? shellApiRequest : kubeApiUpgradeRequest;\n (async () => reqHandler({ req, socket, head, cluster }))()\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(\"[LENS-PROXY]: failed to handle proxy upgrade\", error));\n });\n }\n /**\n * Starts to listen on an OS provided port. Will reject if the server throws\n * an error.\n *\n * Resolves with the port number that was picked\n */\n attemptToListen() {\n return new Promise((resolve, reject) => {\n this.proxyServer.listen(0, \"127.0.0.1\");\n this.proxyServer\n .once(\"listening\", () => {\n this.proxyServer.removeAllListeners(\"error\"); // don't reject the promise\n const { address, port } = this.proxyServer.address();\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Proxy server has started at ${address}:${port}`);\n this.proxyServer.on(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Subsequent error: ${error}`);\n });\n this.port = port;\n _common_app_event_bus_event_bus__WEBPACK_IMPORTED_MODULE_4__.appEventBus.emit({ name: \"lens-proxy\", action: \"listen\", params: { port } });\n resolve(port);\n })\n .once(\"error\", (error) => {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(`[LENS-PROXY]: Proxy server failed to start: ${error}`);\n reject(error);\n });\n });\n }\n /**\n * Starts the lens proxy.\n * @resolves After the server is listening on a good port\n * @rejects if there is an error before that happens\n */\n async listen() {\n var _a;\n const seenPorts = new Set();\n while (true) {\n (_a = this.proxyServer) === null || _a === void 0 ? void 0 : _a.close();\n const port = await this.attemptToListen();\n if (!disallowedPorts.has(port)) {\n // We didn't get a port that would result in an ERR_UNSAFE_PORT error, use it\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].warn(`[LENS-PROXY]: Proxy server has with port known to be considered unsafe to connect to by chrome, restarting...`);\n if (seenPorts.has(port)) {\n /**\n * Assume that if we have seen the port before, then the OS has looped\n * through all the ports possible and we will not be able to get a safe\n * port.\n */\n throw new Error(\"Failed to start LensProxy due to seeing too many unsafe ports. Please restart Lens.\");\n }\n else {\n seenPorts.add(port);\n }\n }\n }\n close() {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].info(\"[LENS-PROXY]: Closing server\");\n this.proxyServer.close();\n this.closed = true;\n }\n configureProxy(proxy) {\n proxy.on(\"proxyRes\", (proxyRes, req, res) => {\n const retryCounterId = this.getRequestId(req);\n if (this.retryCounters.has(retryCounterId)) {\n this.retryCounters.delete(retryCounterId);\n }\n if (!res.headersSent && req.url) {\n const url = new URL(req.url, \"http://localhost\");\n if (url.searchParams.has(\"watch\")) {\n res.statusCode = proxyRes.statusCode;\n res.flushHeaders();\n }\n }\n proxyRes.on(\"aborted\", () => {\n res.end();\n });\n });\n proxy.on(\"error\", (error, req, res, target) => {\n if (this.closed) {\n return;\n }\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: http proxy errored for cluster: ${error}`, { url: req.url });\n if (target) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`Failed proxy to target: ${JSON.stringify(target, null, 2)}`);\n if (req.method === \"GET\" && (!res.statusCode || res.statusCode >= 500)) {\n const reqId = this.getRequestId(req);\n const retryCount = this.retryCounters.get(reqId) || 0;\n const timeoutMs = retryCount * 250;\n if (retryCount < 20) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].debug(`Retrying proxy request to url: ${reqId}`);\n setTimeout(() => {\n this.retryCounters.set(reqId, retryCount + 1);\n this.handleRequest(req, res)\n .catch(error => _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: failed to handle request on proxy error: ${error}`));\n }, timeoutMs);\n }\n }\n }\n try {\n res.writeHead(500).end(`Oops, something went wrong.\\n${error}`);\n }\n catch (e) {\n _logger__WEBPACK_IMPORTED_MODULE_2__[\"default\"].error(`[LENS-PROXY]: Failed to write headers: `, e);\n }\n });\n return proxy;\n }\n async getProxyTarget(req, contextHandler) {\n if (req.url.startsWith(_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiKubePrefix)) {\n delete req.headers.authorization;\n req.url = req.url.replace(_common_vars__WEBPACK_IMPORTED_MODULE_1__.apiKubePrefix, \"\");\n return contextHandler.getApiTarget(isLongRunningRequest(req.url));\n }\n }\n getRequestId(req) {\n return req.headers.host + req.url;\n }\n async handleRequest(req, res) {\n const cluster = this.getClusterForRequest(req);\n if (cluster) {\n const proxyTarget = await this.getProxyTarget(req, cluster.contextHandler);\n if (proxyTarget) {\n return this.proxy.web(req, res, proxyTarget);\n }\n }\n this.router.route(cluster, req, res);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./src/main/lens-proxy.ts?");
34718
34718
 
34719
34719
  /***/ }),
34720
34720
 
@@ -35022,7 +35022,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
35022
35022
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35023
35023
 
35024
35024
  "use strict";
35025
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CustomResourceDefinitions\": () => (/* binding */ CustomResourceDefinitions),\n/* harmony export */ \"crdGroupsUrlParam\": () => (/* binding */ crdGroupsUrlParam)\n/* harmony export */ });\n/* harmony import */ var _crd_list_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-list.scss */ \"./src/renderer/components/+custom-resources/crd-list.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../select */ \"./src/renderer/components/select/index.ts\");\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../navigation */ \"./src/renderer/navigation/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\nconst crdGroupsUrlParam = (0,_navigation__WEBPACK_IMPORTED_MODULE_6__.createPageParam)({\n name: \"groups\",\n defaultValue: [],\n});\nvar columnId;\n(function (columnId) {\n columnId[\"kind\"] = \"kind\";\n columnId[\"group\"] = \"group\";\n columnId[\"version\"] = \"version\";\n columnId[\"scope\"] = \"scope\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CustomResourceDefinitions = class CustomResourceDefinitions extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.makeObservable)(this);\n }\n get selectedGroups() {\n return crdGroupsUrlParam.get();\n }\n get items() {\n if (this.selectedGroups.length) {\n return _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.items.filter(item => this.selectedGroups.includes(item.getGroup()));\n }\n return _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.items; // show all by default\n }\n toggleSelection(group) {\n const groups = new Set(crdGroupsUrlParam.get());\n if (groups.has(group)) {\n groups.delete(group);\n }\n else {\n groups.add(group);\n }\n crdGroupsUrlParam.set([...groups]);\n }\n render() {\n const { items, selectedGroups } = this;\n const sortingCallbacks = {\n [columnId.kind]: crd => crd.getResourceKind(),\n [columnId.group]: crd => crd.getGroup(),\n [columnId.version]: crd => crd.getVersion(),\n [columnId.scope]: crd => crd.getScope(),\n };\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__.KubeObjectListLayout, { isConfigurable: true, tableId: \"crd\", className: \"CrdList\", store: _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore, \n // Don't subscribe the `crdStore` because <Sidebar> already has and is always mounted\n subscribeStores: false, items: items, sortingCallbacks: sortingCallbacks, searchFilters: Object.values(sortingCallbacks), renderHeaderTitle: \"Custom Resources\", customizeHeader: ({ filters, ...headerPlaceholders }) => {\n let placeholder = react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, \"All groups\");\n if (selectedGroups.length == 1)\n placeholder = react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n \"Group: \",\n selectedGroups[0]);\n if (selectedGroups.length >= 2)\n placeholder = react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n \"Groups: \",\n selectedGroups.join(\", \"));\n return {\n // todo: move to global filters\n filters: (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n filters,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_select__WEBPACK_IMPORTED_MODULE_5__.Select, { className: \"group-select\", placeholder: placeholder, options: Object.keys(_crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.groups), onChange: ({ value: group }) => this.toggleSelection(group), closeMenuOnSelect: false, controlShouldRenderValue: false, formatOptionLabel: ({ value: group }) => {\n const isSelected = selectedGroups.includes(group);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_icon__WEBPACK_IMPORTED_MODULE_7__.Icon, { small: true, material: \"folder\" }),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, group),\n isSelected && react__WEBPACK_IMPORTED_MODULE_1__.createElement(_icon__WEBPACK_IMPORTED_MODULE_7__.Icon, { small: true, material: \"check\", className: \"box right\" })));\n } }))),\n ...headerPlaceholders,\n };\n }, renderTableHeader: [\n { title: \"Resource\", className: \"kind\", sortBy: columnId.kind, id: columnId.kind },\n { title: \"Group\", className: \"group\", sortBy: columnId.group, id: columnId.group },\n { title: \"Version\", className: \"version\", sortBy: columnId.version, id: columnId.version },\n { title: \"Scope\", className: \"scope\", sortBy: columnId.scope, id: columnId.scope },\n { title: \"Age\", className: \"age\", sortBy: columnId.age, id: columnId.age },\n ], renderTableContents: crd => [\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_9__.Link, { key: \"link\", to: crd.getResourceUrl(), onClick: _utils__WEBPACK_IMPORTED_MODULE_2__.stopPropagation }, crd.getResourceKind()),\n crd.getGroup(),\n crd.getVersion(),\n crd.getScope(),\n crd.getAge(),\n ] }));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CustomResourceDefinitions.prototype, \"items\", null);\nCustomResourceDefinitions = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], CustomResourceDefinitions);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+custom-resources/crd-list.tsx?");
35025
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CustomResourceDefinitions\": () => (/* binding */ CustomResourceDefinitions),\n/* harmony export */ \"crdGroupsUrlParam\": () => (/* binding */ crdGroupsUrlParam)\n/* harmony export */ });\n/* harmony import */ var _crd_list_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-list.scss */ \"./src/renderer/components/+custom-resources/crd-list.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../select */ \"./src/renderer/components/select/index.ts\");\n/* harmony import */ var _navigation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../navigation */ \"./src/renderer/navigation/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/* harmony import */ var _kube_object_age__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../kube-object/age */ \"./src/renderer/components/kube-object/age.tsx\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\n\n\nconst crdGroupsUrlParam = (0,_navigation__WEBPACK_IMPORTED_MODULE_6__.createPageParam)({\n name: \"groups\",\n defaultValue: [],\n});\nvar columnId;\n(function (columnId) {\n columnId[\"kind\"] = \"kind\";\n columnId[\"group\"] = \"group\";\n columnId[\"version\"] = \"version\";\n columnId[\"scope\"] = \"scope\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CustomResourceDefinitions = class CustomResourceDefinitions extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n (0,mobx__WEBPACK_IMPORTED_MODULE_9__.makeObservable)(this);\n }\n get selectedGroups() {\n return crdGroupsUrlParam.get();\n }\n get items() {\n if (this.selectedGroups.length) {\n return _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.items.filter(item => this.selectedGroups.includes(item.getGroup()));\n }\n return _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.items; // show all by default\n }\n toggleSelection(group) {\n const groups = new Set(crdGroupsUrlParam.get());\n if (groups.has(group)) {\n groups.delete(group);\n }\n else {\n groups.add(group);\n }\n crdGroupsUrlParam.set([...groups]);\n }\n render() {\n const { items, selectedGroups } = this;\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__.KubeObjectListLayout, { isConfigurable: true, tableId: \"crd\", className: \"CrdList\", store: _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore, \n // Don't subscribe the `crdStore` because <Sidebar> already has and is always mounted\n subscribeStores: false, items: items, sortingCallbacks: {\n [columnId.kind]: crd => crd.getResourceKind(),\n [columnId.group]: crd => crd.getGroup(),\n [columnId.version]: crd => crd.getVersion(),\n [columnId.scope]: crd => crd.getScope(),\n [columnId.age]: crd => -crd.getCreationTimestamp(),\n }, searchFilters: [\n crd => crd.getResourceKind(),\n crd => crd.getGroup(),\n crd => crd.getVersion(),\n crd => crd.getScope(),\n crd => -crd.getCreationTimestamp(),\n ], renderHeaderTitle: \"Custom Resources\", customizeHeader: ({ filters, ...headerPlaceholders }) => {\n let placeholder = react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, \"All groups\");\n if (selectedGroups.length == 1)\n placeholder = react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n \"Group: \",\n selectedGroups[0]);\n if (selectedGroups.length >= 2)\n placeholder = react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n \"Groups: \",\n selectedGroups.join(\", \"));\n return {\n // todo: move to global filters\n filters: (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n filters,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_select__WEBPACK_IMPORTED_MODULE_5__.Select, { className: \"group-select\", placeholder: placeholder, options: Object.keys(_crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.groups), onChange: ({ value: group }) => this.toggleSelection(group), closeMenuOnSelect: false, controlShouldRenderValue: false, formatOptionLabel: ({ value: group }) => {\n const isSelected = selectedGroups.includes(group);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_icon__WEBPACK_IMPORTED_MODULE_7__.Icon, { small: true, material: \"folder\" }),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, group),\n isSelected && react__WEBPACK_IMPORTED_MODULE_1__.createElement(_icon__WEBPACK_IMPORTED_MODULE_7__.Icon, { small: true, material: \"check\", className: \"box right\" })));\n } }))),\n ...headerPlaceholders,\n };\n }, renderTableHeader: [\n { title: \"Resource\", className: \"kind\", sortBy: columnId.kind, id: columnId.kind },\n { title: \"Group\", className: \"group\", sortBy: columnId.group, id: columnId.group },\n { title: \"Version\", className: \"version\", sortBy: columnId.version, id: columnId.version },\n { title: \"Scope\", className: \"scope\", sortBy: columnId.scope, id: columnId.scope },\n { title: \"Age\", className: \"age\", sortBy: columnId.age, id: columnId.age },\n ], renderTableContents: crd => [\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_10__.Link, { key: \"link\", to: crd.getResourceUrl(), onClick: _utils__WEBPACK_IMPORTED_MODULE_2__.stopPropagation }, crd.getResourceKind()),\n crd.getGroup(),\n crd.getVersion(),\n crd.getScope(),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_kube_object_age__WEBPACK_IMPORTED_MODULE_8__.KubeObjectAge, { key: \"age\", object: crd }),\n ] }));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_9__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CustomResourceDefinitions.prototype, \"items\", null);\nCustomResourceDefinitions = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_11__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], CustomResourceDefinitions);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+custom-resources/crd-list.tsx?");
35026
35026
 
35027
35027
  /***/ }),
35028
35028
 
@@ -35055,7 +35055,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
35055
35055
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35056
35056
 
35057
35057
  "use strict";
35058
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CustomResourceDefinitionResources\": () => (/* binding */ CustomResourceDefinitionResources)\n/* harmony export */ });\n/* harmony import */ var _crd_resources_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-resources.scss */ \"./src/renderer/components/+custom-resources/crd-resources.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jsonpath */ \"./node_modules/jsonpath/jsonpath.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jsonpath__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _utils_jsonPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/jsonPath */ \"./src/renderer/utils/jsonPath.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\nvar columnId;\n(function (columnId) {\n columnId[\"name\"] = \"name\";\n columnId[\"namespace\"] = \"namespace\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CustomResourceDefinitionResources = class CustomResourceDefinitionResources extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n (0,mobx__WEBPACK_IMPORTED_MODULE_7__.makeObservable)(this);\n }\n get crd() {\n const { group, name } = this.props.match.params;\n return _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.getByGroup(group, name);\n }\n get store() {\n var _a;\n return _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_5__.apiManager.getStore((_a = this.crd) === null || _a === void 0 ? void 0 : _a.getResourceApiBase());\n }\n render() {\n const { crd, store } = this;\n if (!crd)\n return null;\n const isNamespaced = crd.isNamespaced();\n const extraColumns = crd.getPrinterColumns(false); // Cols with priority bigger than 0 are shown in details\n const sortingCallbacks = {\n [columnId.name]: item => item.getName(),\n [columnId.namespace]: item => item.getNs(),\n [columnId.age]: item => item.getTimeDiffFromNow(),\n };\n extraColumns.forEach(column => {\n sortingCallbacks[column.name] = item => jsonpath__WEBPACK_IMPORTED_MODULE_2___default().value(item, (0,_utils_jsonPath__WEBPACK_IMPORTED_MODULE_6__.parseJsonPath)(column.jsonPath.slice(1)));\n });\n const version = crd.getPreferedVersion();\n const loadFailedPrefix = react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Failed to load \",\n crd.getPluralName());\n const failedToLoadMessage = version.served\n ? loadFailedPrefix\n : (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n loadFailedPrefix,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Prefered version (\",\n crd.getGroup(),\n \"/\",\n version.name,\n \") is not served\")));\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__.KubeObjectListLayout, { isConfigurable: true, key: `crd_resources_${crd.getResourceApiBase()}`, tableId: \"crd_resources\", className: \"CrdResources\", store: store, sortingCallbacks: sortingCallbacks, searchFilters: [\n item => item.getSearchFields(),\n ], renderHeaderTitle: crd.getResourceKind(), customizeHeader: ({ searchProps, ...headerPlaceholders }) => ({\n searchProps: {\n ...searchProps,\n placeholder: `${crd.getResourceKind()} search ...`,\n },\n ...headerPlaceholders,\n }), renderTableHeader: [\n { title: \"Name\", className: \"name\", sortBy: columnId.name, id: columnId.name },\n isNamespaced && { title: \"Namespace\", className: \"namespace\", sortBy: columnId.namespace, id: columnId.namespace },\n ...extraColumns.map(column => {\n const { name } = column;\n return {\n title: name,\n className: name.toLowerCase(),\n sortBy: name,\n id: name,\n };\n }),\n { title: \"Age\", className: \"age\", sortBy: columnId.age, id: columnId.age },\n ], renderTableContents: crdInstance => [\n crdInstance.getName(),\n isNamespaced && crdInstance.getNs(),\n ...extraColumns.map((column) => {\n let value = jsonpath__WEBPACK_IMPORTED_MODULE_2___default().value(crdInstance, (0,_utils_jsonPath__WEBPACK_IMPORTED_MODULE_6__.parseJsonPath)(column.jsonPath.slice(1)));\n if (Array.isArray(value) || typeof value === \"object\") {\n value = JSON.stringify(value);\n }\n return {\n renderBoolean: true,\n children: value,\n };\n }),\n crdInstance.getAge(),\n ], failedToLoadMessage: failedToLoadMessage }));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_7__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CustomResourceDefinitionResources.prototype, \"crd\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_7__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CustomResourceDefinitionResources.prototype, \"store\", null);\nCustomResourceDefinitionResources = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_8__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], CustomResourceDefinitionResources);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+custom-resources/crd-resources.tsx?");
35058
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CustomResourceDefinitionResources\": () => (/* binding */ CustomResourceDefinitionResources)\n/* harmony export */ });\n/* harmony import */ var _crd_resources_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crd-resources.scss */ \"./src/renderer/components/+custom-resources/crd-resources.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jsonpath */ \"./node_modules/jsonpath/jsonpath.js\");\n/* harmony import */ var jsonpath__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jsonpath__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../kube-object-list-layout */ \"./src/renderer/components/kube-object-list-layout/index.ts\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _crd_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./crd.store */ \"./src/renderer/components/+custom-resources/crd.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var _utils_jsonPath__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/jsonPath */ \"./src/renderer/utils/jsonPath.ts\");\n/* harmony import */ var _kube_object_age__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../kube-object/age */ \"./src/renderer/components/kube-object/age.tsx\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\n\n\n\n\n\n\nvar columnId;\n(function (columnId) {\n columnId[\"name\"] = \"name\";\n columnId[\"namespace\"] = \"namespace\";\n columnId[\"age\"] = \"age\";\n})(columnId || (columnId = {}));\nlet CustomResourceDefinitionResources = class CustomResourceDefinitionResources extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n constructor(props) {\n super(props);\n (0,mobx__WEBPACK_IMPORTED_MODULE_8__.makeObservable)(this);\n }\n get crd() {\n const { group, name } = this.props.match.params;\n return _crd_store__WEBPACK_IMPORTED_MODULE_4__.crdStore.getByGroup(group, name);\n }\n get store() {\n var _a;\n return _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_5__.apiManager.getStore((_a = this.crd) === null || _a === void 0 ? void 0 : _a.getResourceApiBase());\n }\n render() {\n const { crd, store } = this;\n if (!crd) {\n return null;\n }\n const isNamespaced = crd.isNamespaced();\n const extraColumns = crd.getPrinterColumns(false); // Cols with priority bigger than 0 are shown in details\n const version = crd.getPreferedVersion();\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_kube_object_list_layout__WEBPACK_IMPORTED_MODULE_3__.KubeObjectListLayout, { isConfigurable: true, key: `crd_resources_${crd.getResourceApiBase()}`, tableId: \"crd_resources\", className: \"CrdResources\", store: store, sortingCallbacks: {\n [columnId.name]: customResource => customResource.getName(),\n [columnId.namespace]: customResource => customResource.getNs(),\n [columnId.age]: customResource => -customResource.getCreationTimestamp(),\n ...Object.fromEntries(extraColumns.map(({ name, jsonPath }) => [\n name,\n customResource => (0,jsonpath__WEBPACK_IMPORTED_MODULE_2__.value)(customResource, (0,_utils_jsonPath__WEBPACK_IMPORTED_MODULE_6__.parseJsonPath)(jsonPath.slice(1))),\n ])),\n }, searchFilters: [\n customResource => customResource.getSearchFields(),\n ], renderHeaderTitle: crd.getResourceKind(), customizeHeader: ({ searchProps, ...headerPlaceholders }) => ({\n searchProps: {\n ...searchProps,\n placeholder: `${crd.getResourceKind()} search ...`,\n },\n ...headerPlaceholders,\n }), renderTableHeader: [\n { title: \"Name\", className: \"name\", sortBy: columnId.name, id: columnId.name },\n isNamespaced && { title: \"Namespace\", className: \"namespace\", sortBy: columnId.namespace, id: columnId.namespace },\n ...extraColumns.map(({ name }) => ({\n title: name,\n className: name.toLowerCase(),\n sortBy: name,\n id: name,\n })),\n { title: \"Age\", className: \"age\", sortBy: columnId.age, id: columnId.age },\n ], renderTableContents: crdInstance => [\n crdInstance.getName(),\n isNamespaced && crdInstance.getNs(),\n ...extraColumns.map((column) => {\n let rawValue = (0,jsonpath__WEBPACK_IMPORTED_MODULE_2__.value)(crdInstance, (0,_utils_jsonPath__WEBPACK_IMPORTED_MODULE_6__.parseJsonPath)(column.jsonPath.slice(1)));\n if (Array.isArray(rawValue) || typeof rawValue === \"object\") {\n rawValue = JSON.stringify(rawValue);\n }\n return {\n renderBoolean: true,\n children: rawValue,\n };\n }),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_kube_object_age__WEBPACK_IMPORTED_MODULE_7__.KubeObjectAge, { key: \"age\", object: crdInstance }),\n ], failedToLoadMessage: (react__WEBPACK_IMPORTED_MODULE_1__.createElement(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Failed to load \",\n crd.getPluralName()),\n !version.served && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"p\", null,\n \"Prefered version (\",\n crd.getGroup(),\n \"/\",\n version.name,\n \") is not served\")))) }));\n }\n};\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CustomResourceDefinitionResources.prototype, \"crd\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_8__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], CustomResourceDefinitionResources.prototype, \"store\", null);\nCustomResourceDefinitionResources = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_9__.observer,\n __metadata(\"design:paramtypes\", [Object])\n], CustomResourceDefinitionResources);\n\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+custom-resources/crd-resources.tsx?");
35059
35059
 
35060
35060
  /***/ }),
35061
35061
 
@@ -35088,7 +35088,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
35088
35088
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35089
35089
 
35090
35090
  "use strict";
35091
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EventStore\": () => (/* binding */ EventStore),\n/* harmony export */ \"eventStore\": () => (/* binding */ eventStore)\n/* harmony export */ });\n/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/groupBy */ \"./node_modules/lodash/groupBy.js\");\n/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_compact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/compact */ \"./node_modules/lodash/compact.js\");\n/* harmony import */ var lodash_compact__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_compact__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object.store */ \"./src/common/k8s-api/kube-object.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _common_k8s_api_endpoints_events_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints/events.api */ \"./src/common/k8s-api/endpoints/events.api.ts\");\n/* harmony import */ var _common_k8s_api_endpoints_pods_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints/pods.api */ \"./src/common/k8s-api/endpoints/pods.api.ts\");\n/* harmony import */ var _workloads_pods_pods_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../+workloads-pods/pods.store */ \"./src/renderer/components/+workloads-pods/pods.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\nclass EventStore extends _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_2__.KubeObjectStore {\n constructor() {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _common_k8s_api_endpoints_events_api__WEBPACK_IMPORTED_MODULE_4__.eventApi\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1000\n });\n Object.defineProperty(this, \"saveLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_3__.autoBind)(this);\n }\n bindWatchEventsUpdater() {\n return super.bindWatchEventsUpdater(5000);\n }\n sortItems(items) {\n return super.sortItems(items, [\n event => event.getTimeDiffFromNow(), // keep events order as timeline (\"fresh\" on top)\n ], \"asc\");\n }\n getEventsByObject(obj) {\n return this.items.filter(evt => {\n if (obj.kind == \"Node\") {\n return obj.getName() == evt.involvedObject.uid && evt.involvedObject.kind == \"Node\";\n }\n return obj.getId() == evt.involvedObject.uid;\n });\n }\n getWarnings() {\n const warnings = this.items.filter(event => event.type == \"Warning\");\n const groupsByInvolvedObject = lodash_groupBy__WEBPACK_IMPORTED_MODULE_0___default()(warnings, warning => warning.involvedObject.uid);\n const eventsWithError = Object.values(groupsByInvolvedObject).map(events => {\n const recent = events[0];\n const { kind, uid } = recent.involvedObject;\n if (kind == _common_k8s_api_endpoints_pods_api__WEBPACK_IMPORTED_MODULE_5__.Pod.kind) { // Wipe out running pods\n const pod = _workloads_pods_pods_store__WEBPACK_IMPORTED_MODULE_6__.podsStore.items.find(pod => pod.getId() == uid);\n if (!pod || (!pod.hasIssues() && pod.spec.priority < 500000))\n return undefined;\n }\n return recent;\n });\n return lodash_compact__WEBPACK_IMPORTED_MODULE_1___default()(eventsWithError);\n }\n getWarningsCount() {\n return this.getWarnings().length;\n }\n}\nconst eventStore = new EventStore();\n_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__.apiManager.registerStore(eventStore);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+events/event.store.ts?");
35091
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EventStore\": () => (/* binding */ EventStore),\n/* harmony export */ \"eventStore\": () => (/* binding */ eventStore)\n/* harmony export */ });\n/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/groupBy */ \"./node_modules/lodash/groupBy.js\");\n/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var lodash_compact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/compact */ \"./node_modules/lodash/compact.js\");\n/* harmony import */ var lodash_compact__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_compact__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object.store */ \"./src/common/k8s-api/kube-object.store.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _common_k8s_api_endpoints_events_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints/events.api */ \"./src/common/k8s-api/endpoints/events.api.ts\");\n/* harmony import */ var _common_k8s_api_endpoints_pods_api__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../common/k8s-api/endpoints/pods.api */ \"./src/common/k8s-api/endpoints/pods.api.ts\");\n/* harmony import */ var _workloads_pods_pods_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../+workloads-pods/pods.store */ \"./src/renderer/components/+workloads-pods/pods.store.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\nclass EventStore extends _common_k8s_api_kube_object_store__WEBPACK_IMPORTED_MODULE_2__.KubeObjectStore {\n constructor() {\n super();\n Object.defineProperty(this, \"api\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _common_k8s_api_endpoints_events_api__WEBPACK_IMPORTED_MODULE_4__.eventApi\n });\n Object.defineProperty(this, \"limit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 1000\n });\n Object.defineProperty(this, \"saveLimit\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 50000\n });\n (0,_utils__WEBPACK_IMPORTED_MODULE_3__.autoBind)(this);\n }\n bindWatchEventsUpdater() {\n return super.bindWatchEventsUpdater(5000);\n }\n sortItems(items) {\n return super.sortItems(items, [\n event => -event.getCreationTimestamp(), // keep events order as timeline (\"fresh\" on top)\n ], \"asc\");\n }\n getEventsByObject(obj) {\n return this.items.filter(evt => {\n if (obj.kind == \"Node\") {\n return obj.getName() == evt.involvedObject.uid && evt.involvedObject.kind == \"Node\";\n }\n return obj.getId() == evt.involvedObject.uid;\n });\n }\n getWarnings() {\n const warnings = this.items.filter(event => event.type == \"Warning\");\n const groupsByInvolvedObject = lodash_groupBy__WEBPACK_IMPORTED_MODULE_0___default()(warnings, warning => warning.involvedObject.uid);\n const eventsWithError = Object.values(groupsByInvolvedObject).map(events => {\n const recent = events[0];\n const { kind, uid } = recent.involvedObject;\n if (kind == _common_k8s_api_endpoints_pods_api__WEBPACK_IMPORTED_MODULE_5__.Pod.kind) { // Wipe out running pods\n const pod = _workloads_pods_pods_store__WEBPACK_IMPORTED_MODULE_6__.podsStore.items.find(pod => pod.getId() == uid);\n if (!pod || (!pod.hasIssues() && pod.spec.priority < 500000))\n return undefined;\n }\n return recent;\n });\n return lodash_compact__WEBPACK_IMPORTED_MODULE_1___default()(eventsWithError);\n }\n getWarningsCount() {\n return this.getWarnings().length;\n }\n}\nconst eventStore = new EventStore();\n_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_7__.apiManager.registerStore(eventStore);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+events/event.store.ts?");
35092
35092
 
35093
35093
  /***/ }),
35094
35094
 
@@ -35099,7 +35099,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
35099
35099
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35100
35100
 
35101
35101
  "use strict";
35102
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeEventDetails\": () => (/* binding */ KubeEventDetails)\n/* harmony export */ });\n/* harmony import */ var _kube_event_details_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-event-details.scss */ \"./src/renderer/components/+events/kube-event-details.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _locale_date__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../locale-date */ \"./src/renderer/components/locale-date/index.ts\");\n/* harmony import */ var _event_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.store */ \"./src/renderer/components/+events/event.store.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ogre-tools/injectable-react */ \"./node_modules/@ogre-tools/injectable-react/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _kube_watch_api_kube_watch_api_injectable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../kube-watch-api/kube-watch-api.injectable */ \"./src/renderer/kube-watch-api/kube-watch-api.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n\n\n\n\n\n\n\n\n\n\n\nlet NonInjectedKubeEventDetails = class NonInjectedKubeEventDetails extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n componentDidMount() {\n (0,mobx_react__WEBPACK_IMPORTED_MODULE_10__.disposeOnUnmount)(this, [\n this.props.subscribeStores([\n _event_store__WEBPACK_IMPORTED_MODULE_6__.eventStore,\n ]),\n ]);\n }\n render() {\n const { object } = this.props;\n if (!object) {\n return null;\n }\n if (!(object instanceof _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_2__.KubeObject)) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(\"[KubeEventDetails]: passed object that is not an instanceof KubeObject\", object);\n return null;\n }\n const events = _event_store__WEBPACK_IMPORTED_MODULE_6__.eventStore.getEventsByObject(object);\n if (!events.length) {\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerTitle, { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, \"Events\")));\n }\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerTitle, { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, \"Events\")),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"KubeEventDetails\" }, events.map(evt => {\n const { message, count, lastTimestamp, involvedObject } = evt;\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"event\", key: evt.getId() },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(\"title\", { warning: evt.isWarning() }) }, message),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Source\" }, evt.getSource()),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Count\" }, count),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Sub-object\" }, involvedObject.fieldPath),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Last seen\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_locale_date__WEBPACK_IMPORTED_MODULE_5__.LocaleDate, { date: lastTimestamp }))));\n }))));\n }\n};\nNonInjectedKubeEventDetails = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer\n], NonInjectedKubeEventDetails);\nconst KubeEventDetails = (0,_ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8__.withInjectables)(NonInjectedKubeEventDetails, {\n getProps: (di, props) => ({\n subscribeStores: di.inject(_kube_watch_api_kube_watch_api_injectable__WEBPACK_IMPORTED_MODULE_9__[\"default\"]).subscribeStores,\n ...props,\n }),\n});\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+events/kube-event-details.tsx?");
35102
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeEventDetails\": () => (/* binding */ KubeEventDetails)\n/* harmony export */ });\n/* harmony import */ var _kube_event_details_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./kube-event-details.scss */ \"./src/renderer/components/+events/kube-event-details.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _locale_date__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../locale-date */ \"./src/renderer/components/locale-date/index.ts\");\n/* harmony import */ var _event_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.store */ \"./src/renderer/components/+events/event.store.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ogre-tools/injectable-react */ \"./node_modules/@ogre-tools/injectable-react/build/index.js\");\n/* harmony import */ var _ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _kube_watch_api_kube_watch_api_injectable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../kube-watch-api/kube-watch-api.injectable */ \"./src/renderer/kube-watch-api/kube-watch-api.injectable.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n\n\n\n\n\n\n\n\n\n\n\nlet NonInjectedKubeEventDetails = class NonInjectedKubeEventDetails extends react__WEBPACK_IMPORTED_MODULE_1__.Component {\n componentDidMount() {\n (0,mobx_react__WEBPACK_IMPORTED_MODULE_10__.disposeOnUnmount)(this, [\n this.props.subscribeStores([\n _event_store__WEBPACK_IMPORTED_MODULE_6__.eventStore,\n ]),\n ]);\n }\n render() {\n const { object } = this.props;\n if (!object) {\n return null;\n }\n if (!(object instanceof _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_2__.KubeObject)) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(\"[KubeEventDetails]: passed object that is not an instanceof KubeObject\", object);\n return null;\n }\n const events = _event_store__WEBPACK_IMPORTED_MODULE_6__.eventStore.getEventsByObject(object);\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerTitle, { className: \"flex gaps align-center\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"span\", null, \"Events\")),\n events.length > 0 && (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"KubeEventDetails\" }, events.map(event => (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"event\", key: event.getId() },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.cssNames)(\"title\", { warning: event.isWarning() }) }, event.message),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Source\" }, event.getSource()),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Count\" }, event.count),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Sub-object\" }, event.involvedObject.fieldPath),\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_3__.DrawerItem, { name: \"Last seen\" },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(_locale_date__WEBPACK_IMPORTED_MODULE_5__.LocaleDate, { date: event.lastTimestamp })))))))));\n }\n};\nNonInjectedKubeEventDetails = __decorate([\n mobx_react__WEBPACK_IMPORTED_MODULE_10__.observer\n], NonInjectedKubeEventDetails);\nconst KubeEventDetails = (0,_ogre_tools_injectable_react__WEBPACK_IMPORTED_MODULE_8__.withInjectables)(NonInjectedKubeEventDetails, {\n getProps: (di, props) => ({\n subscribeStores: di.inject(_kube_watch_api_kube_watch_api_injectable__WEBPACK_IMPORTED_MODULE_9__[\"default\"]).subscribeStores,\n ...props,\n }),\n});\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/+events/kube-event-details.tsx?");
35103
35103
 
35104
35104
  /***/ }),
35105
35105
 
@@ -35627,7 +35627,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
35627
35627
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
35628
35628
 
35629
35629
  "use strict";
35630
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DockStore\": () => (/* binding */ DockStore),\n/* harmony export */ \"TabKind\": () => (/* binding */ TabKind)\n/* harmony export */ });\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/throttle */ \"./node_modules/lodash/throttle.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nvar TabKind;\n(function (TabKind) {\n TabKind[\"TERMINAL\"] = \"terminal\";\n TabKind[\"CREATE_RESOURCE\"] = \"create-resource\";\n TabKind[\"EDIT_RESOURCE\"] = \"edit-resource\";\n TabKind[\"INSTALL_CHART\"] = \"install-chart\";\n TabKind[\"UPGRADE_CHART\"] = \"upgrade-chart\";\n TabKind[\"POD_LOGS\"] = \"pod-logs\";\n})(TabKind || (TabKind = {}));\nclass DockStore {\n constructor(dependencies) {\n Object.defineProperty(this, \"dependencies\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: dependencies\n });\n Object.defineProperty(this, \"minHeight\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 100\n });\n Object.defineProperty(this, \"fullSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"createTab\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (0,mobx__WEBPACK_IMPORTED_MODULE_2__.action)((rawTabDesc, addNumber = true) => {\n const { id = uuid__WEBPACK_IMPORTED_MODULE_3__[\"default\"](), kind, pinned = false, ...restOfTabFields } = rawTabDesc;\n let { title = kind } = rawTabDesc;\n if (addNumber) {\n const tabNumber = this.getNewTabNumber(kind);\n if (tabNumber > 1) {\n title += ` (${tabNumber})`;\n }\n }\n const tab = {\n ...restOfTabFields,\n id,\n kind,\n pinned,\n title,\n };\n this.tabs.push(tab);\n this.selectTab(tab.id);\n this.open();\n return tab;\n })\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_2__.makeObservable)(this);\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.autoBind)(this);\n this.init();\n }\n get whenReady() {\n return this.dependencies.storage.whenReady;\n }\n get isOpen() {\n return this.dependencies.storage.value.isOpen;\n }\n set isOpen(isOpen) {\n this.dependencies.storage.merge({ isOpen });\n }\n get height() {\n return this.dependencies.storage.value.height;\n }\n set height(height) {\n this.dependencies.storage.merge({\n height: Math.max(this.minHeight, Math.min(height || this.minHeight, this.maxHeight)),\n });\n }\n get tabs() {\n return this.dependencies.storage.value.tabs;\n }\n set tabs(tabs) {\n this.dependencies.storage.merge({ tabs });\n }\n get selectedTabId() {\n var _a;\n const storageData = this.dependencies.storage.value;\n return (storageData.selectedTabId ||\n (this.tabs.length > 0 ? (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.id : undefined));\n }\n set selectedTabId(tabId) {\n if (tabId && !this.getTabById(tabId))\n return; // skip invalid ids\n this.dependencies.storage.merge({ selectedTabId: tabId });\n }\n get selectedTab() {\n return this.tabs.find(tab => tab.id === this.selectedTabId);\n }\n init() {\n // adjust terminal height if window size changes\n window.addEventListener(\"resize\", lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(this.adjustHeight, 250));\n this.whenReady.then((0,mobx__WEBPACK_IMPORTED_MODULE_2__.action)(() => {\n for (const tab of this.tabs) {\n const validator = this.dependencies.tabDataValidator[tab.kind];\n if (validator && !validator(tab.id)) {\n this.closeTab(tab.id);\n }\n }\n }));\n }\n get maxHeight() {\n const mainLayoutHeader = 40;\n const mainLayoutTabs = 33;\n const mainLayoutMargin = 16;\n const dockTabs = 33;\n const preferredMax = window.innerHeight - mainLayoutHeader - mainLayoutTabs - mainLayoutMargin - dockTabs;\n return Math.max(preferredMax, this.minHeight); // don't let max < min\n }\n adjustHeight() {\n if (this.height < this.minHeight)\n this.height = this.minHeight;\n if (this.height > this.maxHeight)\n this.height = this.maxHeight;\n }\n onResize(callback, opts = {}) {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.reaction)(() => [this.height, this.fullSize], callback, {\n fireImmediately: opts.fireImmediately,\n });\n }\n onTabClose(callback, opts = {}) {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.reaction)(() => this.tabs.map(tab => tab.id), (tabs, prevTabs) => {\n if (!Array.isArray(prevTabs)) {\n return; // tabs not yet modified\n }\n const closedTabs = prevTabs.filter(id => !tabs.includes(id));\n if (closedTabs.length > 0) {\n (0,mobx__WEBPACK_IMPORTED_MODULE_2__.runInAction)(() => {\n closedTabs.forEach(tabId => callback({ tabId }));\n });\n }\n }, {\n equals: mobx__WEBPACK_IMPORTED_MODULE_2__.comparer.structural,\n fireImmediately: opts.fireImmediately,\n });\n }\n onTabChange(callback, options = {}) {\n const { tabKind, dockIsVisible = true, ...reactionOpts } = options;\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.reaction)(() => this.selectedTab, ((tab, prevTab) => {\n if (!tab)\n return; // skip when dock is empty\n if (tabKind && tabKind !== tab.kind)\n return; // handle specific tab.kind only\n if (dockIsVisible && !this.isOpen)\n return;\n callback({\n tab, prevTab,\n tabId: tab.id,\n });\n }), reactionOpts);\n }\n hasTabs() {\n return this.tabs.length > 0;\n }\n open(fullSize) {\n this.isOpen = true;\n if (typeof fullSize === \"boolean\") {\n this.fullSize = fullSize;\n }\n }\n close() {\n this.isOpen = false;\n }\n toggle() {\n if (this.isOpen)\n this.close();\n else\n this.open();\n }\n toggleFillSize() {\n if (!this.isOpen)\n this.open();\n this.fullSize = !this.fullSize;\n }\n getTabById(tabId) {\n return this.tabs.find(tab => tab.id === tabId);\n }\n getTabIndex(tabId) {\n return this.tabs.findIndex(tab => tab.id === tabId);\n }\n getNewTabNumber(kind) {\n const tabNumbers = this.tabs\n .filter(tab => tab.kind === kind)\n .map(tab => {\n const tabNumber = +tab.title.match(/\\d+/);\n return tabNumber === 0 ? 1 : tabNumber; // tab without a number is first\n });\n for (let i = 1;; i++) {\n if (!tabNumbers.includes(i))\n return i;\n }\n }\n closeTab(tabId) {\n const tab = this.getTabById(tabId);\n if (!tab || tab.pinned) {\n return;\n }\n this.tabs = this.tabs.filter(tab => tab.id !== tabId);\n this.dependencies.tabDataClearers[tab.kind](tab.id);\n if (this.selectedTabId === tab.id) {\n if (this.tabs.length) {\n const newTab = this.tabs.slice(-1)[0]; // last\n this.selectTab(newTab.id);\n }\n else {\n this.selectedTabId = null;\n this.close();\n }\n }\n }\n closeTabs(tabs) {\n tabs.forEach(tab => this.closeTab(tab.id));\n }\n closeAllTabs() {\n this.closeTabs([...this.tabs]);\n }\n closeOtherTabs(tabId) {\n const index = this.getTabIndex(tabId);\n const tabs = [...this.tabs.slice(0, index), ...this.tabs.slice(index + 1)];\n this.closeTabs(tabs);\n }\n closeTabsToTheRight(tabId) {\n const index = this.getTabIndex(tabId);\n const tabs = this.tabs.slice(index + 1);\n this.closeTabs(tabs);\n }\n renameTab(tabId, title) {\n const tab = this.getTabById(tabId);\n tab.title = title;\n }\n selectTab(tabId) {\n var _a, _b;\n this.selectedTabId = (_b = (_a = this.getTabById(tabId)) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;\n }\n reset() {\n var _a;\n (_a = this.dependencies.storage) === null || _a === void 0 ? void 0 : _a.reset();\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.observable,\n __metadata(\"design:type\", Object)\n], DockStore.prototype, \"fullSize\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n], DockStore.prototype, \"isOpen\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Number),\n __metadata(\"design:paramtypes\", [Number])\n], DockStore.prototype, \"height\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [Array])\n], DockStore.prototype, \"tabs\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [String])\n], DockStore.prototype, \"selectedTabId\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], DockStore.prototype, \"selectedTab\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Boolean]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"open\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"close\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"toggle\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"toggleFillSize\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"closeTab\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"closeTabs\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"selectTab\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"reset\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/dock/dock/store.ts?");
35630
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DockStore\": () => (/* binding */ DockStore),\n/* harmony export */ \"TabKind\": () => (/* binding */ TabKind)\n/* harmony export */ });\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/v4.js\");\n/* harmony import */ var mobx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx */ \"./node_modules/mobx/dist/mobx.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/throttle */ \"./node_modules/lodash/throttle.js\");\n/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_1__);\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nvar TabKind;\n(function (TabKind) {\n TabKind[\"TERMINAL\"] = \"terminal\";\n TabKind[\"CREATE_RESOURCE\"] = \"create-resource\";\n TabKind[\"EDIT_RESOURCE\"] = \"edit-resource\";\n TabKind[\"INSTALL_CHART\"] = \"install-chart\";\n TabKind[\"UPGRADE_CHART\"] = \"upgrade-chart\";\n TabKind[\"POD_LOGS\"] = \"pod-logs\";\n})(TabKind || (TabKind = {}));\nclass DockStore {\n constructor(dependencies) {\n Object.defineProperty(this, \"dependencies\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: dependencies\n });\n Object.defineProperty(this, \"minHeight\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 100\n });\n Object.defineProperty(this, \"fullSize\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(this, \"createTab\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: (0,mobx__WEBPACK_IMPORTED_MODULE_2__.action)((rawTabDesc, addNumber = true) => {\n const { id = uuid__WEBPACK_IMPORTED_MODULE_3__[\"default\"](), kind, pinned = false, ...restOfTabFields } = rawTabDesc;\n let { title = kind } = rawTabDesc;\n if (addNumber) {\n const tabNumber = this.getNewTabNumber(kind);\n if (tabNumber > 1) {\n title += ` (${tabNumber})`;\n }\n }\n const tab = {\n ...restOfTabFields,\n id,\n kind,\n pinned,\n title,\n };\n this.tabs.push(tab);\n this.selectTab(tab.id);\n this.open();\n return tab;\n })\n });\n (0,mobx__WEBPACK_IMPORTED_MODULE_2__.makeObservable)(this);\n (0,_utils__WEBPACK_IMPORTED_MODULE_0__.autoBind)(this);\n this.init();\n }\n get whenReady() {\n return this.dependencies.storage.whenReady;\n }\n get isOpen() {\n return this.dependencies.storage.value.isOpen;\n }\n set isOpen(isOpen) {\n this.dependencies.storage.merge({ isOpen });\n }\n get height() {\n return this.dependencies.storage.value.height;\n }\n set height(height) {\n this.dependencies.storage.merge({\n height: Math.max(this.minHeight, Math.min(height || this.minHeight, this.maxHeight)),\n });\n }\n get tabs() {\n return this.dependencies.storage.value.tabs;\n }\n set tabs(tabs) {\n this.dependencies.storage.merge({ tabs });\n }\n get selectedTabId() {\n var _a;\n const storageData = this.dependencies.storage.value;\n return (storageData.selectedTabId ||\n (this.tabs.length > 0 ? (_a = this.tabs[0]) === null || _a === void 0 ? void 0 : _a.id : undefined));\n }\n set selectedTabId(tabId) {\n if (tabId && !this.getTabById(tabId))\n return; // skip invalid ids\n this.dependencies.storage.merge({ selectedTabId: tabId });\n }\n get tabsNumber() {\n return this.tabs.length;\n }\n get selectedTab() {\n return this.tabs.find(tab => tab.id === this.selectedTabId);\n }\n init() {\n // adjust terminal height if window size changes\n window.addEventListener(\"resize\", lodash_throttle__WEBPACK_IMPORTED_MODULE_1___default()(this.adjustHeight, 250));\n this.whenReady.then((0,mobx__WEBPACK_IMPORTED_MODULE_2__.action)(() => {\n for (const tab of this.tabs) {\n const validator = this.dependencies.tabDataValidator[tab.kind];\n if (validator && !validator(tab.id)) {\n this.closeTab(tab.id);\n }\n }\n }));\n }\n get maxHeight() {\n const mainLayoutHeader = 40;\n const mainLayoutTabs = 33;\n const mainLayoutMargin = 16;\n const dockTabs = 33;\n const preferredMax = window.innerHeight - mainLayoutHeader - mainLayoutTabs - mainLayoutMargin - dockTabs;\n return Math.max(preferredMax, this.minHeight); // don't let max < min\n }\n adjustHeight() {\n if (this.height < this.minHeight)\n this.height = this.minHeight;\n if (this.height > this.maxHeight)\n this.height = this.maxHeight;\n }\n onResize(callback, opts = {}) {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.reaction)(() => [this.height, this.fullSize], callback, {\n fireImmediately: opts.fireImmediately,\n });\n }\n onTabClose(callback, opts = {}) {\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.reaction)(() => this.tabs.map(tab => tab.id), (tabs, prevTabs) => {\n if (!Array.isArray(prevTabs)) {\n return; // tabs not yet modified\n }\n const closedTabs = prevTabs.filter(id => !tabs.includes(id));\n if (closedTabs.length > 0) {\n (0,mobx__WEBPACK_IMPORTED_MODULE_2__.runInAction)(() => {\n closedTabs.forEach(tabId => callback({ tabId }));\n });\n }\n }, {\n equals: mobx__WEBPACK_IMPORTED_MODULE_2__.comparer.structural,\n fireImmediately: opts.fireImmediately,\n });\n }\n onTabChange(callback, options = {}) {\n const { tabKind, dockIsVisible = true, ...reactionOpts } = options;\n return (0,mobx__WEBPACK_IMPORTED_MODULE_2__.reaction)(() => this.selectedTab, ((tab, prevTab) => {\n if (!tab)\n return; // skip when dock is empty\n if (tabKind && tabKind !== tab.kind)\n return; // handle specific tab.kind only\n if (dockIsVisible && !this.isOpen)\n return;\n callback({\n tab, prevTab,\n tabId: tab.id,\n });\n }), reactionOpts);\n }\n hasTabs() {\n return this.tabs.length > 0;\n }\n open(fullSize) {\n this.isOpen = true;\n if (typeof fullSize === \"boolean\") {\n this.fullSize = fullSize;\n }\n }\n close() {\n this.isOpen = false;\n }\n toggle() {\n if (this.isOpen)\n this.close();\n else\n this.open();\n }\n toggleFillSize() {\n if (!this.isOpen)\n this.open();\n this.fullSize = !this.fullSize;\n }\n getTabById(tabId) {\n return this.tabs.find(tab => tab.id === tabId);\n }\n getTabIndex(tabId) {\n return this.tabs.findIndex(tab => tab.id === tabId);\n }\n getNewTabNumber(kind) {\n const tabNumbers = this.tabs\n .filter(tab => tab.kind === kind)\n .map(tab => {\n const tabNumber = +tab.title.match(/\\d+/);\n return tabNumber === 0 ? 1 : tabNumber; // tab without a number is first\n });\n for (let i = 1;; i++) {\n if (!tabNumbers.includes(i))\n return i;\n }\n }\n closeTab(tabId) {\n const tab = this.getTabById(tabId);\n const tabIndex = this.getTabIndex(tabId);\n if (!tab || tab.pinned) {\n return;\n }\n this.tabs = this.tabs.filter(tab => tab.id !== tabId);\n this.dependencies.tabDataClearers[tab.kind](tab.id);\n if (this.selectedTabId === tab.id) {\n if (this.tabs.length) {\n const newTab = tabIndex < this.tabsNumber ? this.tabs[tabIndex] : this.tabs[tabIndex - 1];\n this.selectTab(newTab.id);\n }\n else {\n this.selectedTabId = null;\n this.close();\n }\n }\n }\n closeTabs(tabs) {\n tabs.forEach(tab => this.closeTab(tab.id));\n }\n closeAllTabs() {\n this.closeTabs([...this.tabs]);\n }\n closeOtherTabs(tabId) {\n const index = this.getTabIndex(tabId);\n const tabs = [...this.tabs.slice(0, index), ...this.tabs.slice(index + 1)];\n this.closeTabs(tabs);\n }\n closeTabsToTheRight(tabId) {\n const index = this.getTabIndex(tabId);\n const tabs = this.tabs.slice(index + 1);\n this.closeTabs(tabs);\n }\n renameTab(tabId, title) {\n const tab = this.getTabById(tabId);\n tab.title = title;\n }\n selectTab(tabId) {\n var _a, _b;\n this.selectedTabId = (_b = (_a = this.getTabById(tabId)) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;\n }\n reset() {\n var _a;\n (_a = this.dependencies.storage) === null || _a === void 0 ? void 0 : _a.reset();\n }\n}\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.observable,\n __metadata(\"design:type\", Object)\n], DockStore.prototype, \"fullSize\", void 0);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Boolean),\n __metadata(\"design:paramtypes\", [Boolean])\n], DockStore.prototype, \"isOpen\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Number),\n __metadata(\"design:paramtypes\", [Number])\n], DockStore.prototype, \"height\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Array),\n __metadata(\"design:paramtypes\", [Array])\n], DockStore.prototype, \"tabs\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", String),\n __metadata(\"design:paramtypes\", [String])\n], DockStore.prototype, \"selectedTabId\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Number),\n __metadata(\"design:paramtypes\", [])\n], DockStore.prototype, \"tabsNumber\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.computed,\n __metadata(\"design:type\", Object),\n __metadata(\"design:paramtypes\", [])\n], DockStore.prototype, \"selectedTab\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Boolean]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"open\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"close\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"toggle\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"toggleFillSize\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"closeTab\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Array]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"closeTabs\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [String]),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"selectTab\", null);\n__decorate([\n mobx__WEBPACK_IMPORTED_MODULE_2__.action,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", []),\n __metadata(\"design:returntype\", void 0)\n], DockStore.prototype, \"reset\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/dock/dock/store.ts?");
35631
35631
 
35632
35632
  /***/ }),
35633
35633
 
@@ -36005,6 +36005,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
36005
36005
 
36006
36006
  /***/ }),
36007
36007
 
36008
+ /***/ "./src/renderer/components/duration/reactive-duration.tsx":
36009
+ /*!****************************************************************!*\
36010
+ !*** ./src/renderer/components/duration/reactive-duration.tsx ***!
36011
+ \****************************************************************/
36012
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36013
+
36014
+ "use strict";
36015
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ReactiveDuration\": () => (/* binding */ ReactiveDuration)\n/* harmony export */ });\n/* harmony import */ var mobx_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mobx-react */ \"./node_modules/mobx-react/dist/mobxreact.esm.js\");\n/* harmony import */ var mobx_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mobx-utils */ \"./node_modules/mobx-utils/mobx-utils.module.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n/**\n * This function computes a resonable update\n */\nfunction computeUpdateInterval(creationTimestampEpoch) {\n const seconds = Math.floor((Date.now() - creationTimestampEpoch) / 1000);\n const minutes = Math.floor(seconds / 60);\n if (minutes < 10) {\n // Update every second\n return 1000;\n }\n return 60 * 1000;\n}\nconst ReactiveDuration = (0,mobx_react__WEBPACK_IMPORTED_MODULE_2__.observer)(({ timestamp, compact = true }) => {\n const creationTimestamp = new Date(timestamp).getTime();\n return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_utils__WEBPACK_IMPORTED_MODULE_1__.formatDuration)((0,mobx_utils__WEBPACK_IMPORTED_MODULE_3__.now)(computeUpdateInterval(creationTimestamp)) - creationTimestamp, compact)));\n});\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/duration/reactive-duration.tsx?");
36016
+
36017
+ /***/ }),
36018
+
36008
36019
  /***/ "./src/renderer/components/error-boundary/error-boundary.tsx":
36009
36020
  /*!*******************************************************************!*\
36010
36021
  !*** ./src/renderer/components/error-boundary/error-boundary.tsx ***!
@@ -36397,7 +36408,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
36397
36408
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36398
36409
 
36399
36410
  "use strict";
36400
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectMeta\": () => (/* binding */ KubeObjectMeta)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _kube_object_status_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../kube-object-status-icon */ \"./src/renderer/components/kube-object-status-icon/index.ts\");\n/* harmony import */ var _locale_date__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../locale-date */ \"./src/renderer/components/locale-date/index.ts\");\n/* harmony import */ var _kube_detail_params__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../kube-detail-params */ \"./src/renderer/components/kube-detail-params/index.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/logger */ \"./src/common/logger.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\n\nclass KubeObjectMeta extends react__WEBPACK_IMPORTED_MODULE_0__.Component {\n isHidden(field) {\n const { hideFields = KubeObjectMeta.defaultHiddenFields } = this.props;\n return hideFields.includes(field);\n }\n render() {\n const { object } = this.props;\n if (!object) {\n return null;\n }\n if (!(object instanceof _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_1__.KubeObject)) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(\"[KubeObjectMeta]: passed object that is not an instanceof KubeObject\", object);\n return null;\n }\n const { getNs, getLabels, getResourceVersion, selfLink, getAnnotations, getFinalizers, getId, getAge, getName, metadata: { creationTimestamp }, } = object;\n const ownerRefs = object.getOwnerRefs();\n return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Created\", hidden: this.isHidden(\"creationTimestamp\") },\n getAge(true, false),\n \" ago (\",\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_locale_date__WEBPACK_IMPORTED_MODULE_5__.LocaleDate, { date: creationTimestamp }),\n \")\"),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Name\", hidden: this.isHidden(\"name\") },\n getName(),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_kube_object_status_icon__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusIcon, { key: \"icon\", object: object })),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Namespace\", hidden: this.isHidden(\"namespace\") || !getNs() }, getNs()),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"UID\", hidden: this.isHidden(\"uid\") }, getId()),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Link\", hidden: this.isHidden(\"selfLink\") }, selfLink),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Resource Version\", hidden: this.isHidden(\"resourceVersion\") }, getResourceVersion()),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItemLabels, { name: \"Labels\", labels: getLabels(), hidden: this.isHidden(\"labels\") }),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItemLabels, { name: \"Annotations\", labels: getAnnotations(), hidden: this.isHidden(\"annotations\") }),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItemLabels, { name: \"Finalizers\", labels: getFinalizers(), hidden: this.isHidden(\"finalizers\") }),\n (ownerRefs === null || ownerRefs === void 0 ? void 0 : ownerRefs.length) > 0 &&\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Controlled By\", hidden: this.isHidden(\"ownerReferences\") }, ownerRefs.map(ref => {\n const { name, kind } = ref;\n const ownerDetailsUrl = (0,_kube_detail_params__WEBPACK_IMPORTED_MODULE_6__.getDetailsUrl)(_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_3__.apiManager.lookupApiLink(ref, object));\n return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", { key: name },\n kind,\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_8__.Link, { to: ownerDetailsUrl }, name)));\n }))));\n }\n}\nObject.defineProperty(KubeObjectMeta, \"defaultHiddenFields\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: [\n \"uid\", \"resourceVersion\", \"selfLink\",\n ]\n});\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/kube-object-meta/kube-object-meta.tsx?");
36411
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectMeta\": () => (/* binding */ KubeObjectMeta)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../common/k8s-api/kube-object */ \"./src/common/k8s-api/kube-object.ts\");\n/* harmony import */ var _drawer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../drawer */ \"./src/renderer/components/drawer/index.ts\");\n/* harmony import */ var _common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../common/k8s-api/api-manager */ \"./src/common/k8s-api/api-manager.ts\");\n/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react-router-dom */ \"./node_modules/react-router-dom/esm/react-router-dom.js\");\n/* harmony import */ var _kube_object_status_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../kube-object-status-icon */ \"./src/renderer/components/kube-object-status-icon/index.ts\");\n/* harmony import */ var _locale_date__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../locale-date */ \"./src/renderer/components/locale-date/index.ts\");\n/* harmony import */ var _kube_detail_params__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../kube-detail-params */ \"./src/renderer/components/kube-detail-params/index.ts\");\n/* harmony import */ var _common_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../common/logger */ \"./src/common/logger.ts\");\n/* harmony import */ var _kube_object_age__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../kube-object/age */ \"./src/renderer/components/kube-object/age.tsx\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\n\n\n\n\n\n\n\n\nclass KubeObjectMeta extends react__WEBPACK_IMPORTED_MODULE_0__.Component {\n isHidden(field) {\n const { hideFields = KubeObjectMeta.defaultHiddenFields } = this.props;\n return hideFields.includes(field);\n }\n render() {\n const { object } = this.props;\n if (!object) {\n return null;\n }\n if (!(object instanceof _common_k8s_api_kube_object__WEBPACK_IMPORTED_MODULE_1__.KubeObject)) {\n _common_logger__WEBPACK_IMPORTED_MODULE_7__[\"default\"].error(\"[KubeObjectMeta]: passed object that is not an instanceof KubeObject\", object);\n return null;\n }\n const { getNs, getLabels, getResourceVersion, selfLink, getAnnotations, getFinalizers, getId, getName, metadata: { creationTimestamp }, } = object;\n const ownerRefs = object.getOwnerRefs();\n return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Created\", hidden: this.isHidden(\"creationTimestamp\") },\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_kube_object_age__WEBPACK_IMPORTED_MODULE_8__.KubeObjectAge, { object: object, compact: false }),\n \" ago \",\n \"(\",\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_locale_date__WEBPACK_IMPORTED_MODULE_5__.LocaleDate, { date: creationTimestamp }),\n \")\"),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Name\", hidden: this.isHidden(\"name\") },\n getName(),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_kube_object_status_icon__WEBPACK_IMPORTED_MODULE_4__.KubeObjectStatusIcon, { key: \"icon\", object: object })),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Namespace\", hidden: this.isHidden(\"namespace\") || !getNs() }, getNs()),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"UID\", hidden: this.isHidden(\"uid\") }, getId()),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Link\", hidden: this.isHidden(\"selfLink\") }, selfLink),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Resource Version\", hidden: this.isHidden(\"resourceVersion\") }, getResourceVersion()),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItemLabels, { name: \"Labels\", labels: getLabels(), hidden: this.isHidden(\"labels\") }),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItemLabels, { name: \"Annotations\", labels: getAnnotations(), hidden: this.isHidden(\"annotations\") }),\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItemLabels, { name: \"Finalizers\", labels: getFinalizers(), hidden: this.isHidden(\"finalizers\") }),\n (ownerRefs === null || ownerRefs === void 0 ? void 0 : ownerRefs.length) > 0 &&\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(_drawer__WEBPACK_IMPORTED_MODULE_2__.DrawerItem, { name: \"Controlled By\", hidden: this.isHidden(\"ownerReferences\") }, ownerRefs.map(ref => {\n const { name, kind } = ref;\n const ownerDetailsUrl = (0,_kube_detail_params__WEBPACK_IMPORTED_MODULE_6__.getDetailsUrl)(_common_k8s_api_api_manager__WEBPACK_IMPORTED_MODULE_3__.apiManager.lookupApiLink(ref, object));\n return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(\"p\", { key: name },\n kind,\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_router_dom__WEBPACK_IMPORTED_MODULE_9__.Link, { to: ownerDetailsUrl }, name)));\n }))));\n }\n}\nObject.defineProperty(KubeObjectMeta, \"defaultHiddenFields\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: [\n \"uid\", \"resourceVersion\", \"selfLink\",\n ]\n});\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/kube-object-meta/kube-object-meta.tsx?");
36401
36412
 
36402
36413
  /***/ }),
36403
36414
 
@@ -36445,6 +36456,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
36445
36456
 
36446
36457
  /***/ }),
36447
36458
 
36459
+ /***/ "./src/renderer/components/kube-object/age.tsx":
36460
+ /*!*****************************************************!*\
36461
+ !*** ./src/renderer/components/kube-object/age.tsx ***!
36462
+ \*****************************************************/
36463
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36464
+
36465
+ "use strict";
36466
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KubeObjectAge\": () => (/* binding */ KubeObjectAge)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _duration_reactive_duration__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../duration/reactive-duration */ \"./src/renderer/components/duration/reactive-duration.tsx\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\n\n\nconst KubeObjectAge = ({ object, compact = true }) => (react__WEBPACK_IMPORTED_MODULE_0__.createElement(_duration_reactive_duration__WEBPACK_IMPORTED_MODULE_1__.ReactiveDuration, { timestamp: object.metadata.creationTimestamp, compact: compact }));\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/kube-object/age.tsx?");
36467
+
36468
+ /***/ }),
36469
+
36448
36470
  /***/ "./src/renderer/components/kubeconfig-dialog/index.ts":
36449
36471
  /*!************************************************************!*\
36450
36472
  !*** ./src/renderer/components/kubeconfig-dialog/index.ts ***!
@@ -37046,7 +37068,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
37046
37068
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
37047
37069
 
37048
37070
  "use strict";
37049
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Tab\": () => (/* binding */ Tab),\n/* harmony export */ \"Tabs\": () => (/* binding */ Tabs)\n/* harmony export */ });\n/* harmony import */ var _tabs_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tabs.scss */ \"./src/renderer/components/tabs/tabs.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nconst TabsContext = react__WEBPACK_IMPORTED_MODULE_1__.createContext({});\nclass Tabs extends react__WEBPACK_IMPORTED_MODULE_1__.PureComponent {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"elem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n bindRef(elem) {\n this.elem = elem;\n }\n render() {\n const { center, wrap, onChange, value, autoFocus, scrollable = true, withBorder, ...elemProps } = this.props;\n const className = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.cssNames)(\"Tabs\", this.props.className, {\n center,\n wrap,\n scrollable,\n withBorder,\n });\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabsContext.Provider, { value: { autoFocus, value, onChange } },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { ...elemProps, className: className, ref: this.bindRef })));\n }\n}\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [HTMLElement]),\n __metadata(\"design:returntype\", void 0)\n], Tabs.prototype, \"bindRef\", null);\nclass Tab extends react__WEBPACK_IMPORTED_MODULE_1__.PureComponent {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"ref\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: react__WEBPACK_IMPORTED_MODULE_1__.createRef()\n });\n }\n get isActive() {\n const { active, value } = this.props;\n return typeof active === \"boolean\" ? active : this.context.value === value;\n }\n focus() {\n var _a;\n (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n scrollIntoView() {\n var _a, _b;\n (_b = (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView) === null || _b === void 0 ? void 0 : _b.call(_a, {\n behavior: \"smooth\",\n inline: \"center\",\n });\n }\n onClick(evt) {\n var _a, _b;\n const { value, active, disabled, onClick } = this.props;\n if (disabled || active) {\n return;\n }\n onClick === null || onClick === void 0 ? void 0 : onClick(evt);\n (_b = (_a = this.context).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n onFocus(evt) {\n var _a, _b;\n (_b = (_a = this.props).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n this.scrollIntoView();\n }\n onKeyDown(evt) {\n var _a, _b, _c;\n if (evt.key === \" \" || evt.key === \"Enter\") {\n (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.click();\n }\n (_c = (_b = this.props).onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, evt);\n }\n componentDidMount() {\n if (this.isActive && this.context.autoFocus) {\n this.focus();\n }\n }\n render() {\n const { active, disabled, icon, label, value, ...elemProps } = this.props;\n let { className } = this.props;\n className = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.cssNames)(\"Tab flex gaps align-center\", className, {\n \"active\": this.isActive,\n disabled,\n });\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { ...elemProps, className: className, tabIndex: 0, onClick: this.onClick, onFocus: this.onFocus, onKeyDown: this.onKeyDown, ref: this.ref },\n typeof icon === \"string\" ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, { small: true, material: icon }) : icon,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"label\" }, label)));\n }\n}\nObject.defineProperty(Tab, \"contextType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TabsContext\n});\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Tab.prototype, \"onClick\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Tab.prototype, \"onFocus\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Tab.prototype, \"onKeyDown\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/tabs/tabs.tsx?");
37071
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Tab\": () => (/* binding */ Tab),\n/* harmony export */ \"Tabs\": () => (/* binding */ Tabs)\n/* harmony export */ });\n/* harmony import */ var _tabs_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tabs.scss */ \"./src/renderer/components/tabs/tabs.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ \"./src/renderer/utils/index.ts\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon */ \"./src/renderer/components/icon/index.ts\");\n/**\n * Copyright (c) OpenLens Authors. All rights reserved.\n * Licensed under MIT License. See LICENSE in root directory for more information.\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __metadata = (undefined && undefined.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};\n\n\n\n\nconst TabsContext = react__WEBPACK_IMPORTED_MODULE_1__.createContext({});\nclass Tabs extends react__WEBPACK_IMPORTED_MODULE_1__.PureComponent {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"elem\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n bindRef(elem) {\n this.elem = elem;\n }\n render() {\n const { center, wrap, onChange, value, autoFocus, scrollable = true, withBorder, ...elemProps } = this.props;\n const className = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.cssNames)(\"Tabs\", this.props.className, {\n center,\n wrap,\n scrollable,\n withBorder,\n });\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(TabsContext.Provider, { value: { autoFocus, value, onChange } },\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { ...elemProps, className: className, ref: this.bindRef })));\n }\n}\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [HTMLElement]),\n __metadata(\"design:returntype\", void 0)\n], Tabs.prototype, \"bindRef\", null);\nclass Tab extends react__WEBPACK_IMPORTED_MODULE_1__.PureComponent {\n constructor() {\n super(...arguments);\n Object.defineProperty(this, \"ref\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: react__WEBPACK_IMPORTED_MODULE_1__.createRef()\n });\n }\n get isActive() {\n const { active, value } = this.props;\n return typeof active === \"boolean\" ? active : this.context.value === value;\n }\n focus() {\n var _a;\n (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.focus();\n }\n scrollIntoView() {\n var _a;\n (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.scrollIntoViewIfNeeded();\n }\n onClick(evt) {\n var _a, _b;\n const { value, active, disabled, onClick } = this.props;\n if (disabled || active) {\n return;\n }\n onClick === null || onClick === void 0 ? void 0 : onClick(evt);\n (_b = (_a = this.context).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n onFocus(evt) {\n var _a, _b;\n (_b = (_a = this.props).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a, evt);\n this.scrollIntoView();\n }\n onKeyDown(evt) {\n var _a, _b, _c;\n if (evt.key === \" \" || evt.key === \"Enter\") {\n (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.click();\n }\n (_c = (_b = this.props).onKeyDown) === null || _c === void 0 ? void 0 : _c.call(_b, evt);\n }\n componentDidMount() {\n if (this.isActive && this.context.autoFocus) {\n this.focus();\n }\n }\n render() {\n const { active, disabled, icon, label, value, ...elemProps } = this.props;\n let { className } = this.props;\n className = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.cssNames)(\"Tab flex gaps align-center\", className, {\n \"active\": this.isActive,\n disabled,\n });\n return (react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { ...elemProps, className: className, tabIndex: 0, onClick: this.onClick, onFocus: this.onFocus, onKeyDown: this.onKeyDown, role: \"tab\", ref: this.ref },\n typeof icon === \"string\" ? react__WEBPACK_IMPORTED_MODULE_1__.createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, { small: true, material: icon }) : icon,\n react__WEBPACK_IMPORTED_MODULE_1__.createElement(\"div\", { className: \"label\" }, label)));\n }\n}\nObject.defineProperty(Tab, \"contextType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TabsContext\n});\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Tab.prototype, \"onClick\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Tab.prototype, \"onFocus\", null);\n__decorate([\n _utils__WEBPACK_IMPORTED_MODULE_2__.boundMethod,\n __metadata(\"design:type\", Function),\n __metadata(\"design:paramtypes\", [Object]),\n __metadata(\"design:returntype\", void 0)\n], Tab.prototype, \"onKeyDown\", null);\n\n\n//# sourceURL=webpack://open-lens/./src/renderer/components/tabs/tabs.tsx?");
37050
37072
 
37051
37073
  /***/ }),
37052
37074
 
@@ -40861,7 +40883,7 @@ eval("module.exports = JSON.parse('{\"name\":\"winston\",\"description\":\"A log
40861
40883
  /***/ ((module) => {
40862
40884
 
40863
40885
  "use strict";
40864
- eval("module.exports = JSON.parse('{\"name\":\"open-lens\",\"productName\":\"OpenLens\",\"description\":\"OpenLens - Open Source IDE for Kubernetes\",\"homepage\":\"https://github.com/lensapp/lens\",\"version\":\"5.4.0\",\"main\":\"static/build/main.js\",\"copyright\":\"© 2021 OpenLens Authors\",\"license\":\"MIT\",\"author\":{\"name\":\"OpenLens Authors\",\"email\":\"info@k8slens.dev\"},\"scripts\":{\"dev\":\"concurrently -i -k \\\\\"yarn run dev-run -C\\\\\" yarn:dev:*\",\"dev-build\":\"concurrently yarn:compile:*\",\"debug-build\":\"concurrently yarn:compile:main yarn:compile:extension-types\",\"dev-run\":\"nodemon --watch ./static/build/main.js --exec \\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\"\",\"dev:main\":\"yarn run compile:main --watch --progress\",\"dev:renderer\":\"yarn run ts-node webpack.dev-server.ts\",\"compile\":\"env NODE_ENV=production concurrently yarn:compile:*\",\"compile:main\":\"yarn run webpack --config webpack.main.ts\",\"compile:renderer\":\"yarn run webpack --config webpack.renderer.ts\",\"compile:extension-types\":\"yarn run webpack --config webpack.extensions.ts\",\"npm:fix-build-version\":\"yarn run ts-node build/set_build_version.ts\",\"npm:fix-package-version\":\"yarn run ts-node build/set_npm_version.ts\",\"build:linux\":\"yarn run compile && electron-builder --linux --dir\",\"build:mac\":\"yarn run compile && electron-builder --mac --dir\",\"build:win\":\"yarn run compile && electron-builder --win --dir\",\"integration\":\"jest --runInBand --detectOpenHandles --forceExit integration\",\"dist\":\"yarn run compile && electron-builder --publish onTag\",\"dist:dir\":\"yarn run dist --dir -c.compression=store -c.mac.identity=null\",\"download:binaries\":\"yarn run ts-node build/download_binaries.ts\",\"build:tray-icons\":\"yarn run ts-node build/build_tray_icon.ts\",\"build:theme-vars\":\"yarn run ts-node build/build_theme_vars.ts\",\"lint\":\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\",\"lint:fix\":\"yarn run lint --fix\",\"mkdocs-serve-local\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\",\"verify-docs\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\",\"typedocs-extensions-api\":\"yarn run typedoc src/extensions/extension-api.ts\",\"version-checkout\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release/v%s\\\\\" | xargs git checkout -b\",\"version-commit\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release v%s\\\\\" | git commit --no-edit -s -F -\",\"version\":\"yarn run version-checkout && git add package.json && yarn run version-commit\",\"postversion\":\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\"},\"config\":{\"k8sProxyVersion\":\"0.1.5\",\"bundledKubectlVersion\":\"1.23.3\",\"bundledHelmVersion\":\"3.7.2\",\"sentryDsn\":\"\"},\"engines\":{\"node\":\">=14 <15\"},\"jest\":{\"collectCoverage\":false,\"verbose\":true,\"transform\":{\"^.+\\\\\\\\.tsx?$\":\"ts-jest\"},\"moduleNameMapper\":{\"\\\\\\\\.(css|scss)$\":\"<rootDir>/__mocks__/styleMock.ts\",\"\\\\\\\\.(svg|png|jpg|eot|woff2?|ttf)$\":\"<rootDir>/__mocks__/assetMock.ts\"},\"modulePathIgnorePatterns\":[\"<rootDir>/dist\",\"<rootDir>/src/extensions/npm\"],\"setupFiles\":[\"<rootDir>/src/jest.setup.ts\",\"jest-canvas-mock\"],\"globals\":{\"ts-jest\":{\"isolatedModules\":true}}},\"build\":{\"generateUpdatesFilesForAllChannels\":true,\"files\":[\"static/build/main.js\"],\"afterSign\":\"build/notarize.js\",\"extraResources\":[{\"from\":\"locales/\",\"to\":\"locales/\",\"filter\":\"**/*.js\"},{\"from\":\"static/\",\"to\":\"static/\",\"filter\":\"!**/main.js\"},{\"from\":\"build/tray\",\"to\":\"static/icons\",\"filter\":\"*.png\"},{\"from\":\"extensions/\",\"to\":\"./extensions/\",\"filter\":[\"**/*.tgz\",\"**/package.json\",\"!**/node_modules\"]},{\"from\":\"templates/\",\"to\":\"./templates/\",\"filter\":\"**/*.yaml\"},\"LICENSE\"],\"linux\":{\"category\":\"Network\",\"artifactName\":\"${productName}-${version}.${arch}.${ext}\",\"target\":[\"deb\",\"rpm\",\"AppImage\"],\"extraResources\":[{\"from\":\"binaries/client/linux/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/linux/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/linux/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"rpm\":{\"fpm\":[\"--rpm-rpmbuild-define=%define _build_id_links none\"]},\"mac\":{\"hardenedRuntime\":true,\"gatekeeperAssess\":false,\"entitlements\":\"build/entitlements.mac.plist\",\"entitlementsInherit\":\"build/entitlements.mac.plist\",\"extraResources\":[{\"from\":\"binaries/client/darwin/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/darwin/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/darwin/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"win\":{\"target\":[\"nsis\"],\"extraResources\":[{\"from\":\"binaries/client/windows/${arch}/kubectl.exe\",\"to\":\"./${arch}/kubectl.exe\"},{\"from\":\"binaries/client/windows/${arch}/lens-k8s-proxy.exe\",\"to\":\"./${arch}/lens-k8s-proxy.exe\"},{\"from\":\"binaries/client/windows/${arch}/helm.exe\",\"to\":\"./${arch}/helm.exe\"}]},\"nsis\":{\"include\":\"build/installer.nsh\",\"oneClick\":false,\"allowElevation\":true,\"createStartMenuShortcut\":true,\"allowToChangeInstallationDirectory\":true},\"protocols\":{\"name\":\"Lens Protocol Handler\",\"schemes\":[\"lens\"],\"role\":\"Viewer\"}},\"dependencies\":{\"@hapi/call\":\"^8.0.1\",\"@hapi/subtext\":\"^7.0.3\",\"@kubernetes/client-node\":\"^0.16.1\",\"@ogre-tools/injectable\":\"5.1.2\",\"@ogre-tools/injectable-react\":\"5.1.2\",\"@sentry/electron\":\"^2.5.4\",\"@sentry/integrations\":\"^6.15.0\",\"@types/circular-dependency-plugin\":\"5.0.5\",\"abort-controller\":\"^3.0.0\",\"auto-bind\":\"^4.0.0\",\"autobind-decorator\":\"^2.4.0\",\"await-lock\":\"^2.1.0\",\"byline\":\"^5.0.0\",\"chokidar\":\"^3.5.3\",\"conf\":\"^7.1.2\",\"crypto-js\":\"^4.1.1\",\"electron-devtools-installer\":\"^3.2.0\",\"electron-updater\":\"^4.6.1\",\"electron-window-state\":\"^5.0.3\",\"filehound\":\"^1.17.5\",\"fs-extra\":\"^9.0.1\",\"glob-to-regexp\":\"^0.4.1\",\"got\":\"^11.8.3\",\"grapheme-splitter\":\"^1.0.4\",\"handlebars\":\"^4.7.7\",\"http-proxy\":\"^1.18.1\",\"immer\":\"^9.0.6\",\"joi\":\"^17.5.0\",\"js-yaml\":\"^4.1.0\",\"jsdom\":\"^16.7.0\",\"jsonpath\":\"^1.1.1\",\"lodash\":\"^4.17.15\",\"mac-ca\":\"^1.0.6\",\"marked\":\"^4.0.12\",\"md5-file\":\"^5.0.0\",\"mobx\":\"^6.3.7\",\"mobx-observable-history\":\"^2.0.3\",\"mobx-react\":\"^7.2.1\",\"mock-fs\":\"^5.1.2\",\"moment\":\"^2.29.1\",\"moment-timezone\":\"^0.5.34\",\"monaco-editor\":\"^0.29.1\",\"monaco-editor-webpack-plugin\":\"^5.0.0\",\"node-fetch\":\"lensapp/node-fetch#2.x\",\"node-pty\":\"^0.10.1\",\"npm\":\"^6.14.15\",\"p-limit\":\"^3.1.0\",\"path-to-regexp\":\"^6.2.0\",\"proper-lockfile\":\"^4.1.2\",\"react\":\"^17.0.2\",\"react-dom\":\"^17.0.2\",\"react-material-ui-carousel\":\"^2.3.8\",\"react-router\":\"^5.2.0\",\"react-virtualized-auto-sizer\":\"^1.0.6\",\"readable-stream\":\"^3.6.0\",\"request\":\"^2.88.2\",\"request-promise-native\":\"^1.0.9\",\"rfc6902\":\"^4.0.2\",\"semver\":\"^7.3.2\",\"shell-env\":\"^3.0.1\",\"spdy\":\"^4.0.2\",\"tar\":\"^6.1.11\",\"tcp-port-used\":\"^1.0.2\",\"tempy\":\"1.0.1\",\"url-parse\":\"^1.5.10\",\"uuid\":\"^8.3.2\",\"win-ca\":\"^3.4.5\",\"winston\":\"^3.6.0\",\"winston-console-format\":\"^1.0.8\",\"winston-transport-browserconsole\":\"^1.0.5\",\"ws\":\"^7.5.5\"},\"devDependencies\":{\"@async-fn/jest\":\"1.5.3\",\"@material-ui/core\":\"^4.12.3\",\"@material-ui/icons\":\"^4.11.2\",\"@material-ui/lab\":\"^4.0.0-alpha.60\",\"@pmmmwh/react-refresh-webpack-plugin\":\"^0.5.4\",\"@sentry/types\":\"^6.18.2\",\"@testing-library/jest-dom\":\"^5.16.2\",\"@testing-library/react\":\"^11.2.7\",\"@testing-library/user-event\":\"^13.5.0\",\"@types/byline\":\"^4.2.33\",\"@types/chart.js\":\"^2.9.34\",\"@types/cli-progress\":\"^3.9.2\",\"@types/color\":\"^3.0.3\",\"@types/crypto-js\":\"^3.1.47\",\"@types/dompurify\":\"^2.3.1\",\"@types/electron-devtools-installer\":\"^2.2.0\",\"@types/fs-extra\":\"^9.0.13\",\"@types/glob-to-regexp\":\"^0.4.1\",\"@types/gunzip-maybe\":\"^1.4.0\",\"@types/hoist-non-react-statics\":\"^3.3.1\",\"@types/html-webpack-plugin\":\"^3.2.6\",\"@types/http-proxy\":\"^1.17.7\",\"@types/jest\":\"^26.0.24\",\"@types/js-yaml\":\"^4.0.5\",\"@types/jsdom\":\"^16.2.13\",\"@types/jsonpath\":\"^0.2.0\",\"@types/lodash\":\"^4.14.177\",\"@types/marked\":\"^4.0.1\",\"@types/md5-file\":\"^4.0.2\",\"@types/mini-css-extract-plugin\":\"^2.4.0\",\"@types/mock-fs\":\"^4.13.1\",\"@types/node\":\"14.17.33\",\"@types/node-fetch\":\"^2.5.12\",\"@types/npm\":\"^2.0.32\",\"@types/proper-lockfile\":\"^4.1.2\",\"@types/randomcolor\":\"^0.5.6\",\"@types/react\":\"^17.0.40\",\"@types/react-beautiful-dnd\":\"^13.1.2\",\"@types/react-dom\":\"^17.0.11\",\"@types/react-router-dom\":\"^5.3.2\",\"@types/react-select\":\"3.1.2\",\"@types/react-table\":\"^7.7.9\",\"@types/react-virtualized-auto-sizer\":\"^1.0.1\",\"@types/react-window\":\"^1.8.5\",\"@types/readable-stream\":\"^2.3.12\",\"@types/request\":\"^2.48.7\",\"@types/request-promise-native\":\"^1.0.18\",\"@types/semver\":\"^7.3.9\",\"@types/sharp\":\"^0.29.4\",\"@types/spdy\":\"^3.4.5\",\"@types/tar\":\"^4.0.5\",\"@types/tar-stream\":\"^2.2.2\",\"@types/tcp-port-used\":\"^1.0.0\",\"@types/tempy\":\"^0.3.0\",\"@types/triple-beam\":\"^1.3.2\",\"@types/url-parse\":\"^1.4.8\",\"@types/uuid\":\"^8.3.4\",\"@types/webpack\":\"^5.28.0\",\"@types/webpack-dev-server\":\"^4.7.2\",\"@types/webpack-env\":\"^1.16.3\",\"@types/webpack-node-externals\":\"^2.5.3\",\"@typescript-eslint/eslint-plugin\":\"^5.15.0\",\"@typescript-eslint/parser\":\"^5.10.1\",\"ansi_up\":\"^5.1.0\",\"mock-http\":\"^1.1.0\",\"chart.js\":\"^2.9.4\",\"circular-dependency-plugin\":\"^5.2.2\",\"cli-progress\":\"^3.10.0\",\"color\":\"^3.2.1\",\"concurrently\":\"^7.0.0\",\"css-loader\":\"^6.7.1\",\"deepdash\":\"^5.3.9\",\"dompurify\":\"^2.3.6\",\"electron\":\"^14.2.4\",\"electron-builder\":\"^22.14.13\",\"electron-notarize\":\"^0.3.0\",\"esbuild\":\"^0.13.15\",\"esbuild-loader\":\"^2.18.0\",\"eslint\":\"^8.7.0\",\"eslint-plugin-header\":\"^3.1.1\",\"eslint-plugin-import\":\"^2.25.4\",\"eslint-plugin-react\":\"^7.28.0\",\"eslint-plugin-react-hooks\":\"^4.3.0\",\"eslint-plugin-unused-imports\":\"^2.0.0\",\"flex.box\":\"^3.4.4\",\"fork-ts-checker-webpack-plugin\":\"^6.5.0\",\"gunzip-maybe\":\"^1.4.2\",\"hoist-non-react-statics\":\"^3.3.2\",\"html-webpack-plugin\":\"^5.5.0\",\"ignore-loader\":\"^0.1.2\",\"include-media\":\"^1.4.9\",\"jest\":\"26.6.3\",\"jest-canvas-mock\":\"^2.3.1\",\"jest-fetch-mock\":\"^3.0.3\",\"jest-mock-extended\":\"^1.0.18\",\"make-plural\":\"^6.2.2\",\"mini-css-extract-plugin\":\"^2.5.2\",\"node-gyp\":\"7.1.2\",\"node-loader\":\"^2.0.0\",\"nodemon\":\"^2.0.15\",\"playwright\":\"^1.17.1\",\"postcss\":\"^8.4.5\",\"postcss-loader\":\"^6.2.1\",\"randomcolor\":\"^0.6.2\",\"react-beautiful-dnd\":\"^13.1.0\",\"react-refresh\":\"^0.11.0\",\"react-refresh-typescript\":\"^2.0.3\",\"react-router-dom\":\"^5.3.0\",\"react-select\":\"3.2.0\",\"react-select-event\":\"^5.3.0\",\"react-table\":\"^7.7.0\",\"react-window\":\"^1.8.6\",\"sass\":\"^1.45.1\",\"sass-loader\":\"^12.6.0\",\"sharp\":\"^0.29.3\",\"style-loader\":\"^3.3.1\",\"tailwindcss\":\"^3.0.7\",\"tar-stream\":\"^2.2.0\",\"ts-jest\":\"26.5.6\",\"ts-loader\":\"^9.2.6\",\"ts-node\":\"^10.4.0\",\"type-fest\":\"^1.4.0\",\"typed-emitter\":\"^1.4.0\",\"typedoc\":\"0.22.10\",\"typedoc-plugin-markdown\":\"^3.11.12\",\"typeface-roboto\":\"^1.1.13\",\"typescript\":\"^4.5.2\",\"typescript-plugin-css-modules\":\"^3.4.0\",\"webpack\":\"^5.69.0\",\"webpack-cli\":\"^4.9.2\",\"webpack-dev-server\":\"^4.7.4\",\"webpack-node-externals\":\"^3.0.0\",\"xterm\":\"^4.15.0\",\"xterm-addon-fit\":\"^0.5.0\"}}');\n\n//# sourceURL=webpack://open-lens/./package.json?");
40886
+ eval("module.exports = JSON.parse('{\"name\":\"open-lens\",\"productName\":\"OpenLens\",\"description\":\"OpenLens - Open Source IDE for Kubernetes\",\"homepage\":\"https://github.com/lensapp/lens\",\"version\":\"5.4.0\",\"main\":\"static/build/main.js\",\"copyright\":\"© 2021 OpenLens Authors\",\"license\":\"MIT\",\"author\":{\"name\":\"OpenLens Authors\",\"email\":\"info@k8slens.dev\"},\"scripts\":{\"dev\":\"concurrently -i -k \\\\\"yarn run dev-run -C\\\\\" yarn:dev:*\",\"dev-build\":\"concurrently yarn:compile:*\",\"debug-build\":\"concurrently yarn:compile:main yarn:compile:extension-types\",\"dev-run\":\"nodemon --watch ./static/build/main.js --exec \\\\\"electron --remote-debugging-port=9223 --inspect .\\\\\"\",\"dev:main\":\"yarn run compile:main --watch --progress\",\"dev:renderer\":\"yarn run ts-node webpack.dev-server.ts\",\"compile\":\"env NODE_ENV=production concurrently yarn:compile:*\",\"compile:main\":\"yarn run webpack --config webpack.main.ts\",\"compile:renderer\":\"yarn run webpack --config webpack.renderer.ts\",\"compile:extension-types\":\"yarn run webpack --config webpack.extensions.ts\",\"npm:fix-build-version\":\"yarn run ts-node build/set_build_version.ts\",\"npm:fix-package-version\":\"yarn run ts-node build/set_npm_version.ts\",\"build:linux\":\"yarn run compile && electron-builder --linux --dir\",\"build:mac\":\"yarn run compile && electron-builder --mac --dir\",\"build:win\":\"yarn run compile && electron-builder --win --dir\",\"integration\":\"jest --runInBand --detectOpenHandles --forceExit integration\",\"dist\":\"yarn run compile && electron-builder --publish onTag\",\"dist:dir\":\"yarn run dist --dir -c.compression=store -c.mac.identity=null\",\"download:binaries\":\"yarn run ts-node build/download_binaries.ts\",\"build:tray-icons\":\"yarn run ts-node build/build_tray_icon.ts\",\"build:theme-vars\":\"yarn run ts-node build/build_theme_vars.ts\",\"lint\":\"PROD=true yarn run eslint --ext js,ts,tsx --max-warnings=0 .\",\"lint:fix\":\"yarn run lint --fix\",\"mkdocs-serve-local\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest\",\"verify-docs\":\"docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict\",\"typedocs-extensions-api\":\"yarn run typedoc src/extensions/extension-api.ts\",\"version-checkout\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release/v%s\\\\\" | xargs git checkout -b\",\"version-commit\":\"cat package.json | jq \\'.version\\' -r | xargs printf \\\\\"release v%s\\\\\" | git commit --no-edit -s -F -\",\"version\":\"yarn run version-checkout && git add package.json && yarn run version-commit\",\"postversion\":\"git push --set-upstream ${GIT_REMOTE:-origin} release/v$npm_package_version\"},\"config\":{\"k8sProxyVersion\":\"0.1.5\",\"bundledKubectlVersion\":\"1.23.3\",\"bundledHelmVersion\":\"3.7.2\",\"sentryDsn\":\"\"},\"engines\":{\"node\":\">=14 <15\"},\"jest\":{\"collectCoverage\":false,\"verbose\":true,\"transform\":{\"^.+\\\\\\\\.tsx?$\":\"ts-jest\"},\"moduleNameMapper\":{\"\\\\\\\\.(css|scss)$\":\"<rootDir>/__mocks__/styleMock.ts\",\"\\\\\\\\.(svg|png|jpg|eot|woff2?|ttf)$\":\"<rootDir>/__mocks__/assetMock.ts\"},\"modulePathIgnorePatterns\":[\"<rootDir>/dist\",\"<rootDir>/src/extensions/npm\"],\"setupFiles\":[\"<rootDir>/src/jest.setup.ts\",\"jest-canvas-mock\"],\"globals\":{\"ts-jest\":{\"isolatedModules\":true}}},\"build\":{\"generateUpdatesFilesForAllChannels\":true,\"files\":[\"static/build/main.js\"],\"afterSign\":\"build/notarize.js\",\"extraResources\":[{\"from\":\"locales/\",\"to\":\"locales/\",\"filter\":\"**/*.js\"},{\"from\":\"static/\",\"to\":\"static/\",\"filter\":\"!**/main.js\"},{\"from\":\"build/tray\",\"to\":\"static/icons\",\"filter\":\"*.png\"},{\"from\":\"extensions/\",\"to\":\"./extensions/\",\"filter\":[\"**/*.tgz\",\"**/package.json\",\"!**/node_modules\"]},{\"from\":\"templates/\",\"to\":\"./templates/\",\"filter\":\"**/*.yaml\"},\"LICENSE\"],\"linux\":{\"category\":\"Network\",\"artifactName\":\"${productName}-${version}.${arch}.${ext}\",\"target\":[\"deb\",\"rpm\",\"AppImage\"],\"extraResources\":[{\"from\":\"binaries/client/linux/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/linux/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/linux/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"rpm\":{\"fpm\":[\"--rpm-rpmbuild-define=%define _build_id_links none\"]},\"mac\":{\"hardenedRuntime\":true,\"gatekeeperAssess\":false,\"entitlements\":\"build/entitlements.mac.plist\",\"entitlementsInherit\":\"build/entitlements.mac.plist\",\"extraResources\":[{\"from\":\"binaries/client/darwin/${arch}/kubectl\",\"to\":\"./${arch}/kubectl\"},{\"from\":\"binaries/client/darwin/${arch}/lens-k8s-proxy\",\"to\":\"./${arch}/lens-k8s-proxy\"},{\"from\":\"binaries/client/darwin/${arch}/helm\",\"to\":\"./${arch}/helm\"}]},\"win\":{\"target\":[\"nsis\"],\"extraResources\":[{\"from\":\"binaries/client/windows/${arch}/kubectl.exe\",\"to\":\"./${arch}/kubectl.exe\"},{\"from\":\"binaries/client/windows/${arch}/lens-k8s-proxy.exe\",\"to\":\"./${arch}/lens-k8s-proxy.exe\"},{\"from\":\"binaries/client/windows/${arch}/helm.exe\",\"to\":\"./${arch}/helm.exe\"}]},\"nsis\":{\"include\":\"build/installer.nsh\",\"oneClick\":false,\"allowElevation\":true,\"createStartMenuShortcut\":true,\"allowToChangeInstallationDirectory\":true},\"protocols\":{\"name\":\"Lens Protocol Handler\",\"schemes\":[\"lens\"],\"role\":\"Viewer\"}},\"dependencies\":{\"@hapi/call\":\"^8.0.1\",\"@hapi/subtext\":\"^7.0.3\",\"@kubernetes/client-node\":\"^0.16.1\",\"@ogre-tools/injectable\":\"5.1.2\",\"@ogre-tools/injectable-react\":\"5.1.2\",\"@sentry/electron\":\"^2.5.4\",\"@sentry/integrations\":\"^6.15.0\",\"@types/circular-dependency-plugin\":\"5.0.5\",\"abort-controller\":\"^3.0.0\",\"auto-bind\":\"^4.0.0\",\"autobind-decorator\":\"^2.4.0\",\"await-lock\":\"^2.1.0\",\"byline\":\"^5.0.0\",\"chokidar\":\"^3.5.3\",\"conf\":\"^7.1.2\",\"crypto-js\":\"^4.1.1\",\"electron-devtools-installer\":\"^3.2.0\",\"electron-updater\":\"^4.6.1\",\"electron-window-state\":\"^5.0.3\",\"filehound\":\"^1.17.5\",\"fs-extra\":\"^9.0.1\",\"glob-to-regexp\":\"^0.4.1\",\"got\":\"^11.8.3\",\"grapheme-splitter\":\"^1.0.4\",\"handlebars\":\"^4.7.7\",\"http-proxy\":\"^1.18.1\",\"immer\":\"^9.0.6\",\"joi\":\"^17.6.0\",\"js-yaml\":\"^4.1.0\",\"jsdom\":\"^16.7.0\",\"jsonpath\":\"^1.1.1\",\"lodash\":\"^4.17.15\",\"mac-ca\":\"^1.0.6\",\"marked\":\"^4.0.12\",\"md5-file\":\"^5.0.0\",\"mobx\":\"^6.5.0\",\"mobx-observable-history\":\"^2.0.3\",\"mobx-react\":\"^7.3.0\",\"mobx-utils\":\"^6.0.4\",\"mock-fs\":\"^5.1.2\",\"moment\":\"^2.29.1\",\"moment-timezone\":\"^0.5.34\",\"monaco-editor\":\"^0.29.1\",\"monaco-editor-webpack-plugin\":\"^5.0.0\",\"node-fetch\":\"lensapp/node-fetch#2.x\",\"node-pty\":\"^0.10.1\",\"npm\":\"^6.14.15\",\"p-limit\":\"^3.1.0\",\"path-to-regexp\":\"^6.2.0\",\"proper-lockfile\":\"^4.1.2\",\"react\":\"^17.0.2\",\"react-dom\":\"^17.0.2\",\"react-material-ui-carousel\":\"^2.3.11\",\"react-router\":\"^5.2.0\",\"react-virtualized-auto-sizer\":\"^1.0.6\",\"readable-stream\":\"^3.6.0\",\"request\":\"^2.88.2\",\"request-promise-native\":\"^1.0.9\",\"rfc6902\":\"^4.0.2\",\"selfsigned\":\"^2.0.0\",\"semver\":\"^7.3.2\",\"shell-env\":\"^3.0.1\",\"spdy\":\"^4.0.2\",\"tar\":\"^6.1.11\",\"tcp-port-used\":\"^1.0.2\",\"tempy\":\"1.0.1\",\"url-parse\":\"^1.5.10\",\"uuid\":\"^8.3.2\",\"win-ca\":\"^3.4.5\",\"winston\":\"^3.6.0\",\"winston-console-format\":\"^1.0.8\",\"winston-transport-browserconsole\":\"^1.0.5\",\"ws\":\"^7.5.5\"},\"devDependencies\":{\"@async-fn/jest\":\"1.5.3\",\"@material-ui/core\":\"^4.12.3\",\"@material-ui/icons\":\"^4.11.2\",\"@material-ui/lab\":\"^4.0.0-alpha.60\",\"@pmmmwh/react-refresh-webpack-plugin\":\"^0.5.4\",\"@sentry/types\":\"^6.18.2\",\"@testing-library/jest-dom\":\"^5.16.2\",\"@testing-library/react\":\"^11.2.7\",\"@testing-library/user-event\":\"^13.5.0\",\"@types/byline\":\"^4.2.33\",\"@types/chart.js\":\"^2.9.35\",\"@types/cli-progress\":\"^3.9.2\",\"@types/color\":\"^3.0.3\",\"@types/crypto-js\":\"^3.1.47\",\"@types/dompurify\":\"^2.3.1\",\"@types/electron-devtools-installer\":\"^2.2.0\",\"@types/fs-extra\":\"^9.0.13\",\"@types/glob-to-regexp\":\"^0.4.1\",\"@types/gunzip-maybe\":\"^1.4.0\",\"@types/hoist-non-react-statics\":\"^3.3.1\",\"@types/html-webpack-plugin\":\"^3.2.6\",\"@types/http-proxy\":\"^1.17.7\",\"@types/jest\":\"^26.0.24\",\"@types/js-yaml\":\"^4.0.5\",\"@types/jsdom\":\"^16.2.13\",\"@types/jsonpath\":\"^0.2.0\",\"@types/lodash\":\"^4.14.180\",\"@types/marked\":\"^4.0.1\",\"@types/md5-file\":\"^4.0.2\",\"@types/mini-css-extract-plugin\":\"^2.4.0\",\"@types/mock-fs\":\"^4.13.1\",\"@types/node\":\"14.17.33\",\"@types/node-fetch\":\"^2.5.12\",\"@types/npm\":\"^2.0.32\",\"@types/proper-lockfile\":\"^4.1.2\",\"@types/randomcolor\":\"^0.5.6\",\"@types/react\":\"^17.0.40\",\"@types/react-beautiful-dnd\":\"^13.1.2\",\"@types/react-dom\":\"^17.0.11\",\"@types/react-router-dom\":\"^5.3.2\",\"@types/react-select\":\"3.1.2\",\"@types/react-table\":\"^7.7.9\",\"@types/react-virtualized-auto-sizer\":\"^1.0.1\",\"@types/react-window\":\"^1.8.5\",\"@types/readable-stream\":\"^2.3.12\",\"@types/request\":\"^2.48.7\",\"@types/request-promise-native\":\"^1.0.18\",\"@types/semver\":\"^7.3.9\",\"@types/sharp\":\"^0.29.4\",\"@types/spdy\":\"^3.4.5\",\"@types/tar\":\"^4.0.5\",\"@types/tar-stream\":\"^2.2.2\",\"@types/tcp-port-used\":\"^1.0.1\",\"@types/tempy\":\"^0.3.0\",\"@types/triple-beam\":\"^1.3.2\",\"@types/url-parse\":\"^1.4.8\",\"@types/uuid\":\"^8.3.4\",\"@types/webpack\":\"^5.28.0\",\"@types/webpack-dev-server\":\"^4.7.2\",\"@types/webpack-env\":\"^1.16.3\",\"@types/webpack-node-externals\":\"^2.5.3\",\"@typescript-eslint/eslint-plugin\":\"^5.15.0\",\"@typescript-eslint/parser\":\"^5.16.0\",\"ansi_up\":\"^5.1.0\",\"mock-http\":\"^1.1.0\",\"chart.js\":\"^2.9.4\",\"circular-dependency-plugin\":\"^5.2.2\",\"cli-progress\":\"^3.10.0\",\"color\":\"^3.2.1\",\"concurrently\":\"^7.0.0\",\"css-loader\":\"^6.7.1\",\"deepdash\":\"^5.3.9\",\"dompurify\":\"^2.3.6\",\"electron\":\"^14.2.4\",\"electron-builder\":\"^22.14.13\",\"electron-notarize\":\"^0.3.0\",\"esbuild\":\"^0.13.15\",\"esbuild-loader\":\"^2.18.0\",\"eslint\":\"^8.7.0\",\"eslint-plugin-header\":\"^3.1.1\",\"eslint-plugin-import\":\"^2.25.4\",\"eslint-plugin-react\":\"^7.28.0\",\"eslint-plugin-react-hooks\":\"^4.3.0\",\"eslint-plugin-unused-imports\":\"^2.0.0\",\"flex.box\":\"^3.4.4\",\"fork-ts-checker-webpack-plugin\":\"^6.5.0\",\"gunzip-maybe\":\"^1.4.2\",\"hoist-non-react-statics\":\"^3.3.2\",\"html-webpack-plugin\":\"^5.5.0\",\"ignore-loader\":\"^0.1.2\",\"include-media\":\"^1.4.9\",\"jest\":\"26.6.3\",\"jest-canvas-mock\":\"^2.3.1\",\"jest-fetch-mock\":\"^3.0.3\",\"jest-mock-extended\":\"^1.0.18\",\"make-plural\":\"^6.2.2\",\"mini-css-extract-plugin\":\"^2.5.2\",\"node-gyp\":\"7.1.2\",\"node-loader\":\"^2.0.0\",\"nodemon\":\"^2.0.15\",\"playwright\":\"^1.17.1\",\"postcss\":\"^8.4.12\",\"postcss-loader\":\"^6.2.1\",\"randomcolor\":\"^0.6.2\",\"react-beautiful-dnd\":\"^13.1.0\",\"react-refresh\":\"^0.11.0\",\"react-refresh-typescript\":\"^2.0.3\",\"react-router-dom\":\"^5.3.0\",\"react-select\":\"3.2.0\",\"react-select-event\":\"^5.3.0\",\"react-table\":\"^7.7.0\",\"react-window\":\"^1.8.6\",\"sass\":\"^1.45.1\",\"sass-loader\":\"^12.6.0\",\"sharp\":\"^0.29.3\",\"style-loader\":\"^3.3.1\",\"tailwindcss\":\"^3.0.7\",\"tar-stream\":\"^2.2.0\",\"ts-jest\":\"26.5.6\",\"ts-loader\":\"^9.2.6\",\"ts-node\":\"^10.7.0\",\"type-fest\":\"^1.4.0\",\"typed-emitter\":\"^1.4.0\",\"typedoc\":\"0.22.10\",\"typedoc-plugin-markdown\":\"^3.11.12\",\"typeface-roboto\":\"^1.1.13\",\"typescript\":\"^4.5.2\",\"typescript-plugin-css-modules\":\"^3.4.0\",\"webpack\":\"^5.69.0\",\"webpack-cli\":\"^4.9.2\",\"webpack-dev-server\":\"^4.7.4\",\"webpack-node-externals\":\"^3.0.0\",\"xterm\":\"^4.15.0\",\"xterm-addon-fit\":\"^0.5.0\"}}');\n\n//# sourceURL=webpack://open-lens/./package.json?");
40865
40887
 
40866
40888
  /***/ }),
40867
40889
 
@@ -40883,7 +40905,7 @@ eval("module.exports = JSON.parse('{\"name\":\"clouds-midnight\",\"base\":\"vs-d
40883
40905
  /***/ ((module) => {
40884
40906
 
40885
40907
  "use strict";
40886
- eval("module.exports = JSON.parse('{\"name\":\"Dark\",\"type\":\"dark\",\"description\":\"Original Lens dark theme\",\"author\":\"Mirantis\",\"monacoTheme\":\"clouds-midnight\",\"colors\":{\"blue\":\"#3d90ce\",\"magenta\":\"#c93dce\",\"golden\":\"#ffc63d\",\"halfGray\":\"#87909c80\",\"primary\":\"#3d90ce\",\"textColorPrimary\":\"#8e9297\",\"textColorSecondary\":\"#a0a0a0\",\"textColorTertiary\":\"#909ba6\",\"textColorAccent\":\"#ffffff\",\"textColorDimmed\":\"#8e92978c\",\"borderColor\":\"#4c5053\",\"borderFaintColor\":\"#373a3e\",\"mainBackground\":\"#1e2124\",\"secondaryBackground\":\"#1e2125\",\"contentColor\":\"#262b2f\",\"layoutBackground\":\"#2e3136\",\"layoutTabsBackground\":\"#252729\",\"layoutTabsActiveColor\":\"#ffffff\",\"layoutTabsLineColor\":\"#87909c80\",\"sidebarBackground\":\"#36393e\",\"sidebarLogoBackground\":\"#414448\",\"sidebarActiveColor\":\"#ffffff\",\"sidebarSubmenuActiveColor\":\"#ffffff\",\"sidebarItemHoverBackground\":\"#3a3e44\",\"buttonPrimaryBackground\":\"#3d90ce\",\"buttonDefaultBackground\":\"#414448\",\"buttonLightBackground\":\"#f1f1f1\",\"buttonAccentBackground\":\"#e85555\",\"buttonDisabledBackground\":\"#808080\",\"tableBgcStripe\":\"#2a2d33\",\"tableBgcSelected\":\"#383c42\",\"tableHeaderBackground\":\"#262b2f\",\"tableHeaderBorderWidth\":\"1px\",\"tableHeaderBorderColor\":\"#36393e\",\"tableHeaderColor\":\"#ffffff\",\"tableSelectedRowColor\":\"#ffffff\",\"helmLogoBackground\":\"#ffffff\",\"helmImgBackground\":\"#414448\",\"helmStableRepo\":\"#3d90ce\",\"helmIncubatorRepo\":\"#ff7043\",\"helmDescriptionHr\":\"#41474a\",\"helmDescriptionBlockquoteColor\":\"#bbb\",\"helmDescriptionBlockquoteBorder\":\"#8a8f93\",\"helmDescriptionBlockquoteBackground\":\"#3b4348\",\"helmDescriptionHeaders\":\"#3e4147\",\"helmDescriptionH6\":\"#6a737d\",\"helmDescriptionTdBorder\":\"#47494a\",\"helmDescriptionTrBackground\":\"#1c2125\",\"helmDescriptionCodeBackground\":\"#ffffff1a\",\"helmDescriptionPreBackground\":\"#1b1f21\",\"helmDescriptionPreColor\":\"#b4b5b4\",\"colorSuccess\":\"#43a047\",\"colorOk\":\"#4caf50\",\"colorInfo\":\"#3d90ce\",\"colorError\":\"#ce3933\",\"colorSoftError\":\"#e85555\",\"colorWarning\":\"#ff9800\",\"colorVague\":\"#36393e\",\"colorTerminated\":\"#4c5053\",\"dockHeadBackground\":\"#2e3136\",\"dockInfoBackground\":\"#1e2125\",\"dockInfoBorderColor\":\"#303136\",\"dockEditorBackground\":\"#000000\",\"dockEditorTag\":\"#8e97a3\",\"dockEditorKeyword\":\"#ffffff\",\"dockEditorComment\":\"#808080\",\"dockEditorActiveLineBackground\":\"#3a3d41\",\"dockBadgeBackground\":\"#36393e\",\"logsBackground\":\"#000000\",\"logsForeground\":\"#ffffff\",\"logRowHoverBackground\":\"#35373a\",\"terminalBackground\":\"#000000\",\"terminalForeground\":\"#ffffff\",\"terminalCursor\":\"#ffffff\",\"terminalCursorAccent\":\"#000000\",\"terminalSelection\":\"#ffffff77\",\"terminalBlack\":\"#2e3436\",\"terminalRed\":\"#cc0000\",\"terminalGreen\":\"#4e9a06\",\"terminalYellow\":\"#c4a000\",\"terminalBlue\":\"#3465a4\",\"terminalMagenta\":\"#75507b\",\"terminalCyan\":\"#06989a\",\"terminalWhite\":\"#d3d7cf\",\"terminalBrightBlack\":\"#555753\",\"terminalBrightRed\":\"#ef2929\",\"terminalBrightGreen\":\"#8ae234\",\"terminalBrightYellow\":\"#fce94f\",\"terminalBrightBlue\":\"#729fcf\",\"terminalBrightMagenta\":\"#ad7fa8\",\"terminalBrightCyan\":\"#34e2e2\",\"terminalBrightWhite\":\"#eeeeec\",\"dialogTextColor\":\"#87909c\",\"dialogBackground\":\"#ffffff\",\"dialogHeaderBackground\":\"#36393e\",\"dialogFooterBackground\":\"#f4f4f4\",\"drawerTogglerBackground\":\"#2f343a\",\"drawerTitleText\":\"#ffffff\",\"drawerSubtitleBackground\":\"#373a3e\",\"drawerItemNameColor\":\"#87909c\",\"drawerItemValueColor\":\"#a0a0a0\",\"clusterMenuBackground\":\"#252729\",\"clusterMenuBorderColor\":\"#252729\",\"clusterMenuCellBackground\":\"#2e3136\",\"clusterSettingsBackground\":\"#1e2124\",\"addClusterIconColor\":\"#252729\",\"boxShadow\":\"#0000003a\",\"iconActiveColor\":\"#ffffff\",\"iconActiveBackground\":\"#ffffff18\",\"filterAreaBackground\":\"#23272b\",\"chartLiveBarBackground\":\"#00000033\",\"chartStripesColor\":\"#ffffff08\",\"chartCapacityColor\":\"#4c545f\",\"pieChartDefaultColor\":\"#30353a\",\"inputOptionHoverColor\":\"#87909c\",\"inputControlBackground\":\"#1e2125\",\"inputControlBorder\":\"#414448\",\"inputControlHoverBorder\":\"#474a4f\",\"lineProgressBackground\":\"#414448\",\"radioActiveBackground\":\"#36393e\",\"menuActiveBackground\":\"#3d90ce\",\"menuSelectedOptionBgc\":\"#36393e\",\"canvasBackground\":\"#24292e\",\"scrollBarColor\":\"#5f6064\",\"settingsBackground\":\"#262b2e\",\"settingsColor\":\"#909ba6\",\"navSelectedBackground\":\"#262b2e\",\"navHoverColor\":\"#dcddde\",\"hrColor\":\"#ffffff0f\",\"tooltipBackground\":\"#18191c\"}}');\n\n//# sourceURL=webpack://open-lens/./src/renderer/themes/lens-dark.json?");
40908
+ eval("module.exports = JSON.parse('{\"name\":\"Dark\",\"type\":\"dark\",\"description\":\"Original Lens dark theme\",\"author\":\"Mirantis\",\"monacoTheme\":\"clouds-midnight\",\"colors\":{\"blue\":\"#3d90ce\",\"magenta\":\"#c93dce\",\"golden\":\"#ffc63d\",\"halfGray\":\"#87909c80\",\"primary\":\"#3d90ce\",\"textColorPrimary\":\"#8e9297\",\"textColorSecondary\":\"#a0a0a0\",\"textColorTertiary\":\"#909ba6\",\"textColorAccent\":\"#ffffff\",\"textColorDimmed\":\"#8e92978c\",\"borderColor\":\"#4c5053\",\"borderFaintColor\":\"#373a3e\",\"mainBackground\":\"#1e2124\",\"secondaryBackground\":\"#1e2125\",\"contentColor\":\"#262b2f\",\"layoutBackground\":\"#2e3136\",\"layoutTabsBackground\":\"#252729\",\"layoutTabsActiveColor\":\"#ffffff\",\"layoutTabsLineColor\":\"#87909c80\",\"sidebarBackground\":\"#36393e\",\"sidebarLogoBackground\":\"#414448\",\"sidebarActiveColor\":\"#ffffff\",\"sidebarSubmenuActiveColor\":\"#ffffff\",\"sidebarItemHoverBackground\":\"#3a3e44\",\"buttonPrimaryBackground\":\"#3d90ce\",\"buttonDefaultBackground\":\"#414448\",\"buttonLightBackground\":\"#f1f1f1\",\"buttonAccentBackground\":\"#e85555\",\"buttonDisabledBackground\":\"#808080\",\"tableBgcStripe\":\"#2a2d33\",\"tableBgcSelected\":\"#383c42\",\"tableHeaderBackground\":\"#262b2f\",\"tableHeaderBorderWidth\":\"1px\",\"tableHeaderBorderColor\":\"#36393e\",\"tableHeaderColor\":\"#ffffff\",\"tableSelectedRowColor\":\"#ffffff\",\"helmLogoBackground\":\"#ffffff\",\"helmImgBackground\":\"#414448\",\"helmStableRepo\":\"#3d90ce\",\"helmIncubatorRepo\":\"#ff7043\",\"helmDescriptionHr\":\"#41474a\",\"helmDescriptionBlockquoteColor\":\"#bbb\",\"helmDescriptionBlockquoteBorder\":\"#8a8f93\",\"helmDescriptionBlockquoteBackground\":\"#3b4348\",\"helmDescriptionHeaders\":\"#3e4147\",\"helmDescriptionH6\":\"#6a737d\",\"helmDescriptionTdBorder\":\"#47494a\",\"helmDescriptionTrBackground\":\"#1c2125\",\"helmDescriptionCodeBackground\":\"#ffffff1a\",\"helmDescriptionPreBackground\":\"#1b1f21\",\"helmDescriptionPreColor\":\"#b4b5b4\",\"colorSuccess\":\"#43a047\",\"colorOk\":\"#4caf50\",\"colorInfo\":\"#3d90ce\",\"colorError\":\"#ce3933\",\"colorSoftError\":\"#e85555\",\"colorWarning\":\"#ff9800\",\"colorVague\":\"#36393e\",\"colorTerminated\":\"#4c5053\",\"dockHeadBackground\":\"#2e3136\",\"dockInfoBackground\":\"#1e2125\",\"dockInfoBorderColor\":\"#303136\",\"dockEditorBackground\":\"#000000\",\"dockEditorTag\":\"#8e97a3\",\"dockEditorKeyword\":\"#ffffff\",\"dockEditorComment\":\"#808080\",\"dockEditorActiveLineBackground\":\"#3a3d41\",\"dockBadgeBackground\":\"#36393e\",\"dockTabBorderColor\":\"#43424d\",\"dockTabActiveBackground\":\"#3a3e45\",\"logsBackground\":\"#000000\",\"logsForeground\":\"#ffffff\",\"logRowHoverBackground\":\"#35373a\",\"terminalBackground\":\"#000000\",\"terminalForeground\":\"#ffffff\",\"terminalCursor\":\"#ffffff\",\"terminalCursorAccent\":\"#000000\",\"terminalSelection\":\"#ffffff77\",\"terminalBlack\":\"#2e3436\",\"terminalRed\":\"#cc0000\",\"terminalGreen\":\"#4e9a06\",\"terminalYellow\":\"#c4a000\",\"terminalBlue\":\"#3465a4\",\"terminalMagenta\":\"#75507b\",\"terminalCyan\":\"#06989a\",\"terminalWhite\":\"#d3d7cf\",\"terminalBrightBlack\":\"#555753\",\"terminalBrightRed\":\"#ef2929\",\"terminalBrightGreen\":\"#8ae234\",\"terminalBrightYellow\":\"#fce94f\",\"terminalBrightBlue\":\"#729fcf\",\"terminalBrightMagenta\":\"#ad7fa8\",\"terminalBrightCyan\":\"#34e2e2\",\"terminalBrightWhite\":\"#eeeeec\",\"dialogTextColor\":\"#87909c\",\"dialogBackground\":\"#ffffff\",\"dialogHeaderBackground\":\"#36393e\",\"dialogFooterBackground\":\"#f4f4f4\",\"drawerTogglerBackground\":\"#2f343a\",\"drawerTitleText\":\"#ffffff\",\"drawerSubtitleBackground\":\"#373a3e\",\"drawerItemNameColor\":\"#87909c\",\"drawerItemValueColor\":\"#a0a0a0\",\"clusterMenuBackground\":\"#252729\",\"clusterMenuBorderColor\":\"#252729\",\"clusterMenuCellBackground\":\"#2e3136\",\"clusterSettingsBackground\":\"#1e2124\",\"addClusterIconColor\":\"#252729\",\"boxShadow\":\"#0000003a\",\"iconActiveColor\":\"#ffffff\",\"iconActiveBackground\":\"#ffffff18\",\"filterAreaBackground\":\"#23272b\",\"chartLiveBarBackground\":\"#00000033\",\"chartStripesColor\":\"#ffffff08\",\"chartCapacityColor\":\"#4c545f\",\"pieChartDefaultColor\":\"#30353a\",\"inputOptionHoverColor\":\"#87909c\",\"inputControlBackground\":\"#1e2125\",\"inputControlBorder\":\"#414448\",\"inputControlHoverBorder\":\"#474a4f\",\"lineProgressBackground\":\"#414448\",\"radioActiveBackground\":\"#36393e\",\"menuActiveBackground\":\"#3d90ce\",\"menuSelectedOptionBgc\":\"#36393e\",\"canvasBackground\":\"#24292e\",\"scrollBarColor\":\"#5f6064\",\"settingsBackground\":\"#262b2e\",\"settingsColor\":\"#909ba6\",\"navSelectedBackground\":\"#262b2e\",\"navHoverColor\":\"#dcddde\",\"hrColor\":\"#ffffff0f\",\"tooltipBackground\":\"#18191c\"}}');\n\n//# sourceURL=webpack://open-lens/./src/renderer/themes/lens-dark.json?");
40887
40909
 
40888
40910
  /***/ }),
40889
40911
 
@@ -40894,7 +40916,7 @@ eval("module.exports = JSON.parse('{\"name\":\"Dark\",\"type\":\"dark\",\"descri
40894
40916
  /***/ ((module) => {
40895
40917
 
40896
40918
  "use strict";
40897
- eval("module.exports = JSON.parse('{\"name\":\"Light\",\"type\":\"light\",\"description\":\"Original Lens light theme\",\"author\":\"Mirantis\",\"monacoTheme\":\"vs\",\"colors\":{\"blue\":\"#3d90ce\",\"magenta\":\"#c93dce\",\"golden\":\"#ffc63d\",\"halfGray\":\"#87909c80\",\"primary\":\"#3d90ce\",\"textColorPrimary\":\"#555555\",\"textColorSecondary\":\"#51575d\",\"textColorTertiary\":\"#555555\",\"textColorAccent\":\"#222222\",\"textColorDimmed\":\"#5557598c\",\"borderColor\":\"#c9cfd3\",\"borderFaintColor\":\"#dfdfdf\",\"mainBackground\":\"#f1f1f1\",\"secondaryBackground\":\"#f2f3f5\",\"contentColor\":\"#ffffff\",\"layoutBackground\":\"#e8e8e8\",\"layoutTabsBackground\":\"#f8f8f8\",\"layoutTabsActiveColor\":\"#333333\",\"layoutTabsLineColor\":\"#87909c80\",\"sidebarLogoBackground\":\"#f1f1f1\",\"sidebarActiveColor\":\"#ffffff\",\"sidebarSubmenuActiveColor\":\"#3d90ce\",\"sidebarBackground\":\"#e8e8e8\",\"sidebarItemHoverBackground\":\"#f0f2f5\",\"buttonPrimaryBackground\":\"#3d90ce\",\"buttonDefaultBackground\":\"#414448\",\"buttonLightBackground\":\"#f1f1f1\",\"buttonAccentBackground\":\"#e85555\",\"buttonDisabledBackground\":\"#808080\",\"tableBgcStripe\":\"#f8f8f8\",\"tableBgcSelected\":\"#f4f5f5\",\"tableHeaderBackground\":\"#f1f1f1\",\"tableHeaderBorderWidth\":\"2px\",\"tableHeaderBorderColor\":\"#3d90ce\",\"tableHeaderColor\":\"#555555\",\"tableSelectedRowColor\":\"#222222\",\"helmLogoBackground\":\"#ffffff\",\"helmImgBackground\":\"#e8e8e8\",\"helmStableRepo\":\"#3d90ce\",\"helmIncubatorRepo\":\"#ff7043\",\"helmDescriptionHr\":\"#dddddd\",\"helmDescriptionBlockquoteColor\":\"#555555\",\"helmDescriptionBlockquoteBorder\":\"#8a8f93\",\"helmDescriptionBlockquoteBackground\":\"#eeeeee\",\"helmDescriptionHeaders\":\"#3e4147\",\"helmDescriptionH6\":\"#6a737d\",\"helmDescriptionTdBorder\":\"#c6c6c6\",\"helmDescriptionTrBackground\":\"#1c2125\",\"helmDescriptionCodeBackground\":\"#ffffff1a\",\"helmDescriptionPreBackground\":\"#eeeeee\",\"helmDescriptionPreColor\":\"#555555\",\"colorSuccess\":\"#206923\",\"colorOk\":\"#399c3d\",\"colorInfo\":\"#2d71a4\",\"colorError\":\"#ce3933\",\"colorSoftError\":\"#e85555\",\"colorWarning\":\"#ff9800\",\"colorVague\":\"#ededed\",\"colorTerminated\":\"#9dabb5\",\"dockHeadBackground\":\"#e8e8e8\",\"dockInfoBackground\":\"#f3f3f3\",\"dockInfoBorderColor\":\"#c9cfd3\",\"dockEditorBackground\":\"#24292e\",\"dockEditorTag\":\"#8e97a3\",\"dockEditorKeyword\":\"#ffffff\",\"dockEditorComment\":\"#808080\",\"dockEditorActiveLineBackground\":\"#3a3d41\",\"dockBadgeBackground\":\"#dedede\",\"logsBackground\":\"#24292e\",\"logsForeground\":\"#ffffff\",\"logRowHoverBackground\":\"#35373a\",\"terminalBackground\":\"#ffffff\",\"terminalForeground\":\"#2d2d2d\",\"terminalCursor\":\"#2d2d2d\",\"terminalCursorAccent\":\"#ffffff\",\"terminalSelection\":\"#bfbfbf\",\"terminalBlack\":\"#2d2d2d\",\"terminalRed\":\"#cd3734 \",\"terminalGreen\":\"#18cf12\",\"terminalYellow\":\"#acb300\",\"terminalBlue\":\"#3d90ce\",\"terminalMagenta\":\"#c100cd\",\"terminalCyan\":\"#07c4b9\",\"terminalWhite\":\"#d3d7cf\",\"terminalBrightBlack\":\"#a8a8a8\",\"terminalBrightRed\":\"#ff6259\",\"terminalBrightGreen\":\"#5cdb59\",\"terminalBrightYellow\":\"#f8c000\",\"terminalBrightBlue\":\"#008db6\",\"terminalBrightMagenta\":\"#ee55f8\",\"terminalBrightCyan\":\"#50e8df\",\"terminalBrightWhite\":\"#eeeeec\",\"dialogTextColor\":\"#87909c\",\"dialogBackground\":\"#ffffff\",\"dialogHeaderBackground\":\"#36393e\",\"dialogFooterBackground\":\"#f4f4f4\",\"drawerTogglerBackground\":\"#eaeced\",\"drawerTitleText\":\"#ffffff\",\"drawerSubtitleBackground\":\"#f1f1f1\",\"drawerItemNameColor\":\"#727272\",\"drawerItemValueColor\":\"#555555\",\"clusterMenuBackground\":\"#d7d8da\",\"clusterMenuBorderColor\":\"#c9cfd3\",\"clusterMenuCellBackground\":\"#bbbbbb\",\"clusterSettingsBackground\":\"#ffffff\",\"addClusterIconColor\":\"#8d8d8d\",\"boxShadow\":\"#0000003a\",\"iconActiveColor\":\"#ffffff\",\"iconActiveBackground\":\"#a6a6a694\",\"filterAreaBackground\":\"#f7f7f7\",\"chartLiveBarBackground\":\"#00000033\",\"chartStripesColor\":\"#00000009\",\"chartCapacityColor\":\"#cccccc\",\"pieChartDefaultColor\":\"#efefef\",\"inputOptionHoverColor\":\"#ffffff\",\"inputControlBackground\":\"#f6f6f7\",\"inputControlBorder\":\"#cccdcf\",\"inputControlHoverBorder\":\"#b9bbbe\",\"lineProgressBackground\":\"#e8e8e8\",\"radioActiveBackground\":\"#f1f1f1\",\"menuActiveBackground\":\"#3d90ce\",\"menuSelectedOptionBgc\":\"#e8e8e8\",\"canvasBackground\":\"#24292e\",\"scrollBarColor\":\"#bbbbbb\",\"settingsBackground\":\"#ffffff\",\"settingsColor\":\"#555555\",\"navSelectedBackground\":\"#ffffff\",\"navHoverColor\":\"#2e3135\",\"hrColor\":\"#06060714\",\"tooltipBackground\":\"#ffffff\"}}');\n\n//# sourceURL=webpack://open-lens/./src/renderer/themes/lens-light.json?");
40919
+ eval("module.exports = JSON.parse('{\"name\":\"Light\",\"type\":\"light\",\"description\":\"Original Lens light theme\",\"author\":\"Mirantis\",\"monacoTheme\":\"vs\",\"colors\":{\"blue\":\"#3d90ce\",\"magenta\":\"#c93dce\",\"golden\":\"#ffc63d\",\"halfGray\":\"#87909c80\",\"primary\":\"#3d90ce\",\"textColorPrimary\":\"#555555\",\"textColorSecondary\":\"#51575d\",\"textColorTertiary\":\"#555555\",\"textColorAccent\":\"#222222\",\"textColorDimmed\":\"#5557598c\",\"borderColor\":\"#c9cfd3\",\"borderFaintColor\":\"#dfdfdf\",\"mainBackground\":\"#f1f1f1\",\"secondaryBackground\":\"#f2f3f5\",\"contentColor\":\"#ffffff\",\"layoutBackground\":\"#e8e8e8\",\"layoutTabsBackground\":\"#f8f8f8\",\"layoutTabsActiveColor\":\"#333333\",\"layoutTabsLineColor\":\"#87909c80\",\"sidebarLogoBackground\":\"#f1f1f1\",\"sidebarActiveColor\":\"#ffffff\",\"sidebarSubmenuActiveColor\":\"#3d90ce\",\"sidebarBackground\":\"#e8e8e8\",\"sidebarItemHoverBackground\":\"#f0f2f5\",\"buttonPrimaryBackground\":\"#3d90ce\",\"buttonDefaultBackground\":\"#414448\",\"buttonLightBackground\":\"#f1f1f1\",\"buttonAccentBackground\":\"#e85555\",\"buttonDisabledBackground\":\"#808080\",\"tableBgcStripe\":\"#f8f8f8\",\"tableBgcSelected\":\"#f4f5f5\",\"tableHeaderBackground\":\"#f1f1f1\",\"tableHeaderBorderWidth\":\"2px\",\"tableHeaderBorderColor\":\"#3d90ce\",\"tableHeaderColor\":\"#555555\",\"tableSelectedRowColor\":\"#222222\",\"helmLogoBackground\":\"#ffffff\",\"helmImgBackground\":\"#e8e8e8\",\"helmStableRepo\":\"#3d90ce\",\"helmIncubatorRepo\":\"#ff7043\",\"helmDescriptionHr\":\"#dddddd\",\"helmDescriptionBlockquoteColor\":\"#555555\",\"helmDescriptionBlockquoteBorder\":\"#8a8f93\",\"helmDescriptionBlockquoteBackground\":\"#eeeeee\",\"helmDescriptionHeaders\":\"#3e4147\",\"helmDescriptionH6\":\"#6a737d\",\"helmDescriptionTdBorder\":\"#c6c6c6\",\"helmDescriptionTrBackground\":\"#1c2125\",\"helmDescriptionCodeBackground\":\"#ffffff1a\",\"helmDescriptionPreBackground\":\"#eeeeee\",\"helmDescriptionPreColor\":\"#555555\",\"colorSuccess\":\"#206923\",\"colorOk\":\"#399c3d\",\"colorInfo\":\"#2d71a4\",\"colorError\":\"#ce3933\",\"colorSoftError\":\"#e85555\",\"colorWarning\":\"#ff9800\",\"colorVague\":\"#ededed\",\"colorTerminated\":\"#9dabb5\",\"dockHeadBackground\":\"#e8e8e8\",\"dockInfoBackground\":\"#f3f3f3\",\"dockInfoBorderColor\":\"#c9cfd3\",\"dockEditorBackground\":\"#24292e\",\"dockEditorTag\":\"#8e97a3\",\"dockEditorKeyword\":\"#ffffff\",\"dockEditorComment\":\"#808080\",\"dockEditorActiveLineBackground\":\"#3a3d41\",\"dockBadgeBackground\":\"#dedede\",\"dockTabBorderColor\":\"#d5d4de\",\"dockTabActiveBackground\":\"#ffffff\",\"logsBackground\":\"#24292e\",\"logsForeground\":\"#ffffff\",\"logRowHoverBackground\":\"#35373a\",\"terminalBackground\":\"#ffffff\",\"terminalForeground\":\"#2d2d2d\",\"terminalCursor\":\"#2d2d2d\",\"terminalCursorAccent\":\"#ffffff\",\"terminalSelection\":\"#bfbfbf\",\"terminalBlack\":\"#2d2d2d\",\"terminalRed\":\"#cd3734 \",\"terminalGreen\":\"#18cf12\",\"terminalYellow\":\"#acb300\",\"terminalBlue\":\"#3d90ce\",\"terminalMagenta\":\"#c100cd\",\"terminalCyan\":\"#07c4b9\",\"terminalWhite\":\"#d3d7cf\",\"terminalBrightBlack\":\"#a8a8a8\",\"terminalBrightRed\":\"#ff6259\",\"terminalBrightGreen\":\"#5cdb59\",\"terminalBrightYellow\":\"#f8c000\",\"terminalBrightBlue\":\"#008db6\",\"terminalBrightMagenta\":\"#ee55f8\",\"terminalBrightCyan\":\"#50e8df\",\"terminalBrightWhite\":\"#eeeeec\",\"dialogTextColor\":\"#87909c\",\"dialogBackground\":\"#ffffff\",\"dialogHeaderBackground\":\"#36393e\",\"dialogFooterBackground\":\"#f4f4f4\",\"drawerTogglerBackground\":\"#eaeced\",\"drawerTitleText\":\"#ffffff\",\"drawerSubtitleBackground\":\"#f1f1f1\",\"drawerItemNameColor\":\"#727272\",\"drawerItemValueColor\":\"#555555\",\"clusterMenuBackground\":\"#d7d8da\",\"clusterMenuBorderColor\":\"#c9cfd3\",\"clusterMenuCellBackground\":\"#bbbbbb\",\"clusterSettingsBackground\":\"#ffffff\",\"addClusterIconColor\":\"#8d8d8d\",\"boxShadow\":\"#0000003a\",\"iconActiveColor\":\"#ffffff\",\"iconActiveBackground\":\"#a6a6a694\",\"filterAreaBackground\":\"#f7f7f7\",\"chartLiveBarBackground\":\"#00000033\",\"chartStripesColor\":\"#00000009\",\"chartCapacityColor\":\"#cccccc\",\"pieChartDefaultColor\":\"#efefef\",\"inputOptionHoverColor\":\"#ffffff\",\"inputControlBackground\":\"#f6f6f7\",\"inputControlBorder\":\"#cccdcf\",\"inputControlHoverBorder\":\"#b9bbbe\",\"lineProgressBackground\":\"#e8e8e8\",\"radioActiveBackground\":\"#f1f1f1\",\"menuActiveBackground\":\"#3d90ce\",\"menuSelectedOptionBgc\":\"#e8e8e8\",\"canvasBackground\":\"#24292e\",\"scrollBarColor\":\"#bbbbbb\",\"settingsBackground\":\"#ffffff\",\"settingsColor\":\"#555555\",\"navSelectedBackground\":\"#ffffff\",\"navHoverColor\":\"#2e3135\",\"hrColor\":\"#06060714\",\"tooltipBackground\":\"#ffffff\"}}');\n\n//# sourceURL=webpack://open-lens/./src/renderer/themes/lens-light.json?");
40898
40920
 
40899
40921
  /***/ })
40900
40922