From c4810d5b1baa297d7fbe215d9e49488da67fbcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Teixeira?= Date: Fri, 13 Sep 2024 22:20:27 +0100 Subject: [PATCH] Add icons for subscriptions and transactions --- console/ui/dist/prod-nt/index.html | 2 +- .../dist/prod-nt/static/3rdpartylicenses.txt | 90 ------------------- .../prod-nt/static/main.3c079786c5186699.js | 1 - .../prod-nt/static/main.c4960f6b7eee23f1.js | 1 + console/ui/dist/prod-nt/static/svg/chat.svg | 11 +-- .../ui/dist/prod-nt/static/svg/purchases.svg | 1 + .../dist/prod-nt/static/svg/subscriptions.svg | 1 + console/ui/dist/prod/index.html | 2 +- .../ui/dist/prod/static/3rdpartylicenses.txt | 90 ------------------- .../dist/prod/static/main.175bb59cdaac7d41.js | 1 + .../dist/prod/static/main.9c45889c179d242f.js | 1 - console/ui/dist/prod/static/svg/chat.svg | 11 +-- console/ui/dist/prod/static/svg/purchases.svg | 1 + .../ui/dist/prod/static/svg/subscriptions.svg | 1 + console/ui/src/app/base/base.component.ts | 4 +- console/ui/src/static/svg/chat.svg | 11 +-- console/ui/src/static/svg/purchases.svg | 1 + console/ui/src/static/svg/subscriptions.svg | 1 + server/console.go | 3 + 19 files changed, 18 insertions(+), 216 deletions(-) delete mode 100644 console/ui/dist/prod-nt/static/main.3c079786c5186699.js create mode 100644 console/ui/dist/prod-nt/static/main.c4960f6b7eee23f1.js create mode 100644 console/ui/dist/prod-nt/static/svg/purchases.svg create mode 100644 console/ui/dist/prod-nt/static/svg/subscriptions.svg create mode 100644 console/ui/dist/prod/static/main.175bb59cdaac7d41.js delete mode 100644 console/ui/dist/prod/static/main.9c45889c179d242f.js create mode 100644 console/ui/dist/prod/static/svg/purchases.svg create mode 100644 console/ui/dist/prod/static/svg/subscriptions.svg create mode 100644 console/ui/src/static/svg/purchases.svg create mode 100644 console/ui/src/static/svg/subscriptions.svg diff --git a/console/ui/dist/prod-nt/index.html b/console/ui/dist/prod-nt/index.html index dc57cdccdf..ef20b7f3b4 100644 --- a/console/ui/dist/prod-nt/index.html +++ b/console/ui/dist/prod-nt/index.html @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/console/ui/dist/prod-nt/static/3rdpartylicenses.txt b/console/ui/dist/prod-nt/static/3rdpartylicenses.txt index fd1b141e5f..4cd6ed1ec2 100644 --- a/console/ui/dist/prod-nt/static/3rdpartylicenses.txt +++ b/console/ui/dist/prod-nt/static/3rdpartylicenses.txt @@ -121,56 +121,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -base64-js -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jameson Little - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -buffer -MIT -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - d3-array BSD-3-Clause Copyright 2010-2020 Mike Bostock @@ -729,31 +679,6 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -esprima -BSD-2-Clause -Copyright JS Foundation and other contributors, https://js.foundation/ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - file-saver MIT The MIT License @@ -769,21 +694,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI [1]: http://eligrey.com -ieee754 -BSD-3-Clause -Copyright 2008 Fair Oaks Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - js-yaml MIT (The MIT License) diff --git a/console/ui/dist/prod-nt/static/main.3c079786c5186699.js b/console/ui/dist/prod-nt/static/main.3c079786c5186699.js deleted file mode 100644 index ed06495d16..0000000000 --- a/console/ui/dist/prod-nt/static/main.3c079786c5186699.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{378:(Yt,Dn,ke)=>{"use strict";function nt(t){return"function"==typeof t}let Ie=!1;const ct={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Ie&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Ie=t},get useDeprecatedSynchronousErrorHandling(){return Ie}};function ze(t){setTimeout(()=>{throw t},0)}const be={closed:!0,next(t){},error(t){if(ct.useDeprecatedSynchronousErrorHandling)throw t;ze(t)},complete(){}},Ze=Array.isArray||(t=>t&&"number"==typeof t.length);function $e(t){return null!==t&&"object"==typeof t}const oe=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class ce{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ce)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof oe?e.errors:e),[])}ce.EMPTY=((t=new ce).closed=!0,t);const T="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class F extends ce{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=be;break;case 1:if(!n){this.destination=be;break}if("object"==typeof n){n instanceof F?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new ee(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new ee(this,n,e,i)}}[T](){return this}static create(n,e,i){const r=new F(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class ee extends F{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;nt(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==be&&(s=Object.create(e),nt(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;ct.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=ct;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):ze(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;ze(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);ct.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),ct.useDeprecatedSynchronousErrorHandling)throw i;ze(i)}}__tryOrSetError(n,e,i){if(!ct.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return ct.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(ze(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const St="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ft(t){return t}function yn(t){return 0===t.length?Ft:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let en=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function Je(t,n,e){if(t){if(t instanceof F)return t;if(t[T])return t[T]()}return t||n||e?new F(t,n,e):new F(be)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||ct.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),ct.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){ct.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Ae(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof F?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Ai(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[St](){return this}pipe(...e){return 0===e.length?this:yn(e)(this)}toPromise(e){return new(e=Ai(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function Ai(t){if(t||(t=ct.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Ur=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class ss extends ce{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class Ya extends F{constructor(n){super(n),this.destination=n}}let dr=(()=>{class t extends en{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[T](){return new Ya(this)}lift(e){const i=new vu(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Ur;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew vu(n,e),t})();class vu extends dr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):ce.EMPTY}}function Ca(t){return t&&"function"==typeof t.schedule}function _n(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Cd(t,n))}}class Cd{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new Sd(n,this.project,this.thisArg))}}class Sd extends F{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Kn=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function cl(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const Ql=t=>{if(t&&"function"==typeof t[St])return(t=>n=>{const e=t[St]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(Yr(t))return Kn(t);if(cl(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,ze),n))(t);if(t&&"function"==typeof t[Fo])return(t=>n=>{const e=t[Fo]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${$e(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Fc(t,n){return new en(e=>{const i=new ce;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function ro(t,n){return n?function la(t,n){if(null!=t){if(function _u(t){return t&&"function"==typeof t[St]}(t))return function kd(t,n){return new en(e=>{const i=new ce;return i.add(n.schedule(()=>{const r=t[St]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(cl(t))return function Nc(t,n){return new en(e=>{const i=new ce;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(Yr(t))return Fc(t,n);if(function Xa(t){return t&&"function"==typeof t[Fo]}(t)||"string"==typeof t)return function Dd(t,n){if(!t)throw new Error("Iterable cannot be null");return new en(e=>{const i=new ce;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[Fo](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof en?t:new en(Ql(t))}class Ml extends F{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Y extends F{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function Ne(t,n){if(n.closed)return;if(t instanceof en)return t.subscribe(n);let e;try{e=Ql(t)(n)}catch(i){n.error(i)}return e}function et(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(et((r,o)=>ro(t(r,o)).pipe(_n((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new Ht(t,e)))}class Ht{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new Kt(n,this.project,this.concurrent))}}class Kt extends Y{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function M(t=Number.POSITIVE_INFINITY){return et(Ft,t)}function ot(t,n){return n?Fc(t,n):new en(Kn(t))}function Dt(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Ca(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof en?t[0]:M(n)(ot(t,e))}function Ut(){return function(n){return n.lift(new Bt(n))}}class Bt{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new hn(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class hn extends F{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class fe extends en{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new ce,n.add(this.source.subscribe(new Ot(this.getSubject(),this))),n.closed&&(this._connection=null,n=ce.EMPTY)),n}refCount(){return Ut()(this)}}const mt=(()=>{const t=fe.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Ot extends Ya{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class cn{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function Wt(){return new dr}function Ge(){return t=>Ut()(function Pt(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new cn(r,n));const o=Object.create(i,mt);return o.source=i,o.subjectFactory=r,o}}(Wt)(t))}function qe(t){for(let n in t)if(t[n]===qe)return n;throw Error("Could not find renamed property on target object.")}function _t(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function bn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(bn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function Nr(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const g1=qe({__forward_ref__:qe});function Mi(t){return t.__forward_ref__=Mi,t.toString=function(){return bn(this())},t}function xi(t){return DT(t)?t():t}function DT(t){return"function"==typeof t&&t.hasOwnProperty(g1)&&t.__forward_ref__===Mi}function TT(t){return t&&!!t.\u0275providers}const fx="https://g.co/ng/security#xss";class Nt extends Error{constructor(n,e){super(px(n,e)),this.code=n}}function px(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Li(t){return"string"==typeof t?t:null==t?"":String(t)}function mx(t,n){throw new Nt(-201,!1)}function Jr(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}function Et(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function wi(t){return{providers:t.providers||[],imports:t.imports||[]}}function gx(t){return cL(t,vx)||cL(t,dL)}function cL(t,n){return t.hasOwnProperty(n)?t[n]:null}function uL(t){return t&&(t.hasOwnProperty(ET)||t.hasOwnProperty(Sve))?t[ET]:null}const vx=qe({\u0275prov:qe}),ET=qe({\u0275inj:qe}),dL=qe({ngInjectableDef:qe}),Sve=qe({ngInjectorDef:qe});var Ci=(()=>((Ci=Ci||{})[Ci.Default=0]="Default",Ci[Ci.Host=1]="Host",Ci[Ci.Self=2]="Self",Ci[Ci.SkipSelf=4]="SkipSelf",Ci[Ci.Optional=8]="Optional",Ci))();let AT;function jc(t){const n=AT;return AT=t,n}function hL(t,n,e){const i=gx(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&Ci.Optional?null:void 0!==n?n:void mx(bn(t))}const Po=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),v1={},MT="__NG_DI_FLAG__",yx="ngTempTokenPath",Dve="ngTokenPath",Tve=/\n/gm,Eve="\u0275",fL="__source";let y1;function kg(t){const n=y1;return y1=t,n}function Ave(t,n=Ci.Default){if(void 0===y1)throw new Nt(-203,!1);return null===y1?hL(t,void 0,n):y1.get(t,n&Ci.Optional?null:void 0,n)}function gt(t,n=Ci.Default){return(function kve(){return AT}()||Ave)(xi(t),n)}function Fi(t,n=Ci.Default){return gt(t,_x(n))}function _x(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function OT(t){const n=[];for(let e=0;e((Td=Td||{})[Td.OnPush=0]="OnPush",Td[Td.Default=1]="Default",Td))(),bu=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(bu||(bu={})),bu))();const Th={},zr=[],bx=qe({\u0275cmp:qe}),IT=qe({\u0275dir:qe}),NT=qe({\u0275pipe:qe}),mL=qe({\u0275mod:qe}),Eh=qe({\u0275fac:qe}),b1=qe({__NG_ELEMENT_ID__:qe});let Nve=0;function Rt(t){return Dh(()=>{const n=vL(t),e={...n,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Td.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||bu.Emulated,id:"c"+Nve++,styles:t.styles||zr,_:null,schemas:t.schemas||null,tView:null};yL(e);const i=t.dependencies;return e.directiveDefs=xx(i,!1),e.pipeDefs=xx(i,!0),e})}function Pve(t){return Kr(t)||Ja(t)}function jve(t){return null!==t}function ki(t){return Dh(()=>({type:t.type,bootstrap:t.bootstrap||zr,declarations:t.declarations||zr,imports:t.imports||zr,exports:t.exports||zr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function gL(t,n){if(null==t)return Th;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}function sn(t){return Dh(()=>{const n=vL(t);return yL(n),n})}function ul(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Kr(t){return t[bx]||null}function Ja(t){return t[IT]||null}function Ol(t){return t[NT]||null}function ec(t,n){const e=t[mL]||null;if(!e&&!0===n)throw new Error(`Type ${bn(t)} does not have '\u0275mod' property.`);return e}function vL(t){const n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||zr,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:gL(t.inputs,n),outputs:gL(t.outputs)}}function yL(t){t.features?.forEach(n=>n(t))}function xx(t,n){if(!t)return null;const e=n?Ol:Pve;return()=>("function"==typeof t?t():t).map(i=>e(i)).filter(jve)}const Ah=0,Pn=1,Xi=2,as=3,xu=4,Vp=5,Ka=6,Tg=7,_s=8,wx=9,Cx=10,er=11,FT=12,x1=13,_L=14,Eg=15,Qa=16,w1=17,Ag=18,Ed=19,C1=20,bL=21,jo=22,PT=1,xL=2,Sx=7,kx=8,Mg=9,dl=10;function tc(t){return Array.isArray(t)&&"object"==typeof t[PT]}function wu(t){return Array.isArray(t)&&!0===t[PT]}function jT(t){return 0!=(4&t.flags)}function S1(t){return t.componentOffset>-1}function Dx(t){return 1==(1&t.flags)}function Cu(t){return!!t.template}function Lve(t){return 0!=(256&t[Xi])}function Hp(t,n){return t.hasOwnProperty(Eh)?t[Eh]:null}class Vve{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Yn(){return SL}function SL(t){return t.type.prototype.ngOnChanges&&(t.setInput=Uve),Hve}function Hve(){const t=DL(this),n=t?.current;if(n){const e=t.previous;if(e===Th)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function Uve(t,n,e,i){const r=this.declaredInputs[e],o=DL(t)||function zve(t,n){return t[kL]=n}(t,{previous:Th,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new Vve(l&&l.currentValue,n,a===Th),t[i]=n}Yn.ngInherit=!0;const kL="__ngSimpleChanges__";function DL(t){return t[kL]||null}const Rc=function(t,n,e){},TL="svg";function ka(t){for(;Array.isArray(t);)t=t[Ah];return t}function Tx(t,n){return ka(n[t])}function nc(t,n){return ka(n[t.index])}function AL(t,n){return t.data[n]}function Og(t,n){return t[n]}function Il(t,n){const e=n[t];return tc(e)?e:e[Ah]}function Ex(t){return 64==(64&t[Xi])}function Cf(t,n){return null==n?null:t[n]}function ML(t){t[Ag]=0}function LT(t,n){t[Vp]+=n;let e=t,i=t[as];for(;null!==i&&(1===n&&1===e[Vp]||-1===n&&0===e[Vp]);)i[Vp]+=n,e=i,i=i[as]}const $i={lFrame:BL(null),bindingsEnabled:!0};function IL(){return $i.bindingsEnabled}function zt(){return $i.lFrame.lView}function Fr(){return $i.lFrame.tView}function Be(t){return $i.lFrame.contextLView=t,t[_s]}function Ve(t){return $i.lFrame.contextLView=null,t}function Da(){let t=NL();for(;null!==t&&64===t.type;)t=t.parent;return t}function NL(){return $i.lFrame.currentTNode}function k1(){const t=$i.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function Ad(t,n){const e=$i.lFrame;e.currentTNode=t,e.isParent=n}function $T(){return $i.lFrame.isParent}function BT(){$i.lFrame.isParent=!1}function hl(){const t=$i.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Mh(){return $i.lFrame.bindingIndex}function Ig(){return $i.lFrame.bindingIndex++}function Oh(t){const n=$i.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function jL(t){$i.lFrame.inI18n=t}function i0e(t,n){const e=$i.lFrame;e.bindingIndex=e.bindingRootIndex=t,VT(n)}function VT(t){$i.lFrame.currentDirectiveIndex=t}function RL(){return $i.lFrame.currentQueryIndex}function UT(t){$i.lFrame.currentQueryIndex=t}function o0e(t){const n=t[Pn];return 2===n.type?n.declTNode:1===n.type?t[Ka]:null}function LL(t,n,e){if(e&Ci.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&Ci.Host||(r=o0e(o),null===r||(o=o[Eg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=$i.lFrame=$L();return i.currentTNode=n,i.lView=t,!0}function zT(t){const n=$L(),e=t[Pn];$i.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function $L(){const t=$i.lFrame,n=null===t?null:t.child;return null===n?BL(t):n}function BL(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function VL(){const t=$i.lFrame;return $i.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const HL=VL;function GT(){const t=VL();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function fl(){return $i.lFrame.selectedIndex}function Up(t){$i.lFrame.selectedIndex=t}function Xo(){const t=$i.lFrame;return AL(t.tView,t.selectedIndex)}function st(){$i.lFrame.currentNamespace=TL}function zp(){!function c0e(){$i.lFrame.currentNamespace=null}()}function Ax(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[Ag]+=65536),(a>11>16&&(3&t[Xi])===n){t[Xi]+=2048,Rc(4,a,o);try{o.call(a)}finally{Rc(5,a,o)}}}else{Rc(4,a,o);try{o.call(a)}finally{Rc(5,a,o)}}}const Ng=-1;class D1{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function YT(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[Eg],e--;return i}let XT=!0;function Fx(t){const n=XT;return XT=t,n}const YL=255,XL=5;let v0e=0;const Md={};function Px(t,n){const e=JL(t,n);if(-1!==e)return e;const i=n[Pn];i.firstCreatePass&&(t.injectorIndex=n.length,JT(i.data,t),JT(n,null),JT(i.blueprint,null));const r=KT(t,n),o=t.injectorIndex;if(qL(r)){const s=Ix(r),a=Nx(r,n),l=a[Pn].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function JT(t,n){t.push(0,0,0,0,0,0,0,0,n)}function JL(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function KT(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=i5(r),null===i)return Ng;if(e++,r=r[Eg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return Ng}function QT(t,n,e){!function y0e(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(b1)&&(i=e[b1]),null==i&&(i=e[b1]=v0e++);const r=i&YL;n.data[t+(r>>XL)]|=1<=0?n&YL:w0e:n}(e);if("function"==typeof o){if(!LL(n,t,i))return i&Ci.Host?KL(r,0,i):QL(n,e,i,r);try{const s=o(i);if(null!=s||i&Ci.Optional)return s;mx()}finally{HL()}}else if("number"==typeof o){let s=null,a=JL(t,n),l=Ng,c=i&Ci.Host?n[Qa][Ka]:null;for((-1===a||i&Ci.SkipSelf)&&(l=-1===a?KT(t,n):n[a+8],l!==Ng&&n5(i,!1)?(s=n[Pn],a=Ix(l),n=Nx(l,n)):a=-1);-1!==a;){const u=n[Pn];if(t5(o,a,u.data)){const d=b0e(a,n,e,s,i,c);if(d!==Md)return d}l=n[a+8],l!==Ng&&n5(i,n[Pn].data[a+8]===c)&&t5(o,a,n)?(s=u,a=Ix(l),n=Nx(l,n)):a=-1}}return r}function b0e(t,n,e,i,r,o){const s=n[Pn],a=s.data[t+8],u=jx(a,s,e,null==i?S1(a)&&XT:i!=s&&0!=(3&a.type),r&Ci.Host&&o===a);return null!==u?Gp(n,s,u,a):Md}function jx(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&Cu(f)&&f.type===e)return l}return null}function Gp(t,n,e,i){let r=t[e];const o=n.data;if(function f0e(t){return t instanceof D1}(r)){const s=r;s.resolving&&function vve(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new Nt(-200,`Circular dependency in DI detected for ${t}${e}`)}(function Xr(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Li(t)}(o[e]));const a=Fx(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?jc(s.injectImpl):null;LL(t,i,Ci.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function d0e(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=SL(n);(e.preOrderHooks??(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&jc(l),Fx(a),s.resolving=!1,HL()}}return r}function t5(t,n,e){return!!(e[n+(t>>XL)]&1<{const n=t.prototype.constructor,e=n[Eh]||ZT(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Eh]||ZT(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function ZT(t){return DT(t)?()=>{const n=ZT(xi(t));return n&&n()}:Hp(t)}function i5(t){const n=t[Pn],e=n.type;return 2===e?n.declTNode:1===e?t[Ka]:null}function Sf(t){return function _0e(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function eE(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(jg)?l[jg]:Object.defineProperty(l,jg,{value:[]})[jg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class Vn{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Et({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Wp(t,n){t.forEach(e=>Array.isArray(e)?Wp(e,n):n(e))}function o5(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function Rx(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function M1(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function T0e(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function nE(t,n){const e=$g(t,n);if(e>=0)return t[1|e]}function $g(t,n){return function s5(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Nl=Nl||{})[Nl.Important=1]="Important",Nl[Nl.DashCase=2]="DashCase",Nl))();const W0e=/^>|^->||--!>|)/,Y0e="\u200b$1\u200b";const lE=new Map;let X0e=0;const uE="__ngContext__";function Za(t,n){tc(n)?(t[uE]=n[C1],function K0e(t){lE.set(t[C1],t)}(n)):t[uE]=n}let dE;function hE(t,n){return dE(t,n)}function j1(t){const n=t[as];return wu(n)?n[as]:n}function fE(t){return D5(t[x1])}function pE(t){return D5(t[xu])}function D5(t){for(;null!==t&&!wu(t);)t=t[xu];return t}function Vg(t,n,e,i,r){if(null!=i){let o,s=!1;wu(i)?o=i:tc(i)&&(s=!0,i=i[Ah]);const a=ka(i);0===t&&null!==e?null==r?I5(n,e,a):qp(n,e,a,r||null,!0):1===t&&null!==e?qp(n,e,a,r||null,!0):2===t?xE(n,a,s):3===t&&n.destroyNode(a),null!=o&&function b1e(t,n,e,i,r){const o=e[Sx];o!==ka(e)&&Vg(n,t,i,o,r);for(let a=dl;an.replace(q0e,Y0e))}(n))}function gE(t,n,e){return t.createElement(n,e)}function E5(t,n){const e=t[Mg],i=e.indexOf(n),r=n[as];512&n[Xi]&&(n[Xi]&=-513,LT(r,-1)),e.splice(i,1)}function vE(t,n){if(t.length<=dl)return;const e=dl+n,i=t[e];if(i){const r=i[w1];null!==r&&r!==t&&E5(r,i),n>0&&(t[e-1][xu]=i[xu]);const o=Rx(t,dl+n);!function c1e(t,n){R1(t,n,n[er],2,null,null),n[Ah]=null,n[Ka]=null}(i[Pn],i);const s=o[Ed];null!==s&&s.detachView(o[Pn]),i[as]=null,i[xu]=null,i[Xi]&=-65}return i}function A5(t,n){if(!(128&n[Xi])){const e=n[er];e.destroyNode&&R1(t,n,e,3,null,null),function h1e(t){let n=t[x1];if(!n)return yE(t[Pn],t);for(;n;){let e=null;if(tc(n))e=n[x1];else{const i=n[dl];i&&(e=i)}if(!e){for(;n&&!n[xu]&&n!==t;)tc(n)&&yE(n[Pn],n),n=n[as];null===n&&(n=t),tc(n)&&yE(n[Pn],n),e=n&&n[xu]}n=e}}(n)}}function yE(t,n){if(!(128&n[Xi])){n[Xi]&=-65,n[Xi]|=128,function g1e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===bu.None||o===bu.Emulated)return null}return nc(i,e)}}function qp(t,n,e,i,r){t.insertBefore(n,e,i,r)}function I5(t,n,e){t.appendChild(n,e)}function N5(t,n,e,i,r){null!==i?qp(t,n,e,i,r):I5(t,n,e)}function Vx(t,n){return t.parentNode(n)}function F5(t,n,e){return j5(t,n,e)}function P5(t,n,e){return 40&t.type?nc(t,e):null}let _E,zx,SE,Gx,j5=P5;function R5(t,n){j5=t,_E=n}function Hx(t,n,e,i){const r=M5(t,i,n),o=n[er],a=F5(i.parent||n[Ka],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return zx}()?.createHTML(t)||t}function H5(){return void 0!==SE?SE:typeof document<"u"?document:void 0}function kE(){if(void 0===Gx&&(Gx=null,Po.trustedTypes))try{Gx=Po.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Gx}function U5(t){return kE()?.createHTML(t)||t}function G5(t){return kE()?.createScriptURL(t)||t}class Yp{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${fx})`}}class T1e extends Yp{getTypeName(){return"HTML"}}class E1e extends Yp{getTypeName(){return"Style"}}class A1e extends Yp{getTypeName(){return"Script"}}class M1e extends Yp{getTypeName(){return"URL"}}class O1e extends Yp{getTypeName(){return"ResourceURL"}}function rc(t){return t instanceof Yp?t.changingThisBreaksApplicationSecurity:t}function Od(t,n){const e=function I1e(t){return t instanceof Yp&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${fx})`)}return e===n}function W5(t){const n=new $1e(t);return function B1e(){try{return!!(new window.DOMParser).parseFromString(Hg(""),"text/html")}catch{return!1}}()?new L1e(n):n}class L1e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(Hg(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class $1e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=Hg(n),e}}const V1e=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Wx(t){return(t=String(t)).match(V1e)?t:"unsafe:"+t}function Ih(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function L1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const q5=Ih("area,br,col,hr,img,wbr"),Y5=Ih("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),X5=Ih("rp,rt"),DE=L1(q5,L1(Y5,Ih("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),L1(X5,Ih("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),L1(X5,Y5)),TE=Ih("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),J5=L1(TE,Ih("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ih("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),H1e=Ih("script,style,template");class U1e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!DE.hasOwnProperty(e))return this.sanitizedSomething=!0,!H1e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();DE.hasOwnProperty(e)&&!q5.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(K5(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const z1e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,G1e=/([^\#-~ |!])/g;function K5(t){return t.replace(/&/g,"&").replace(z1e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(G1e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let qx;function Q5(t,n){let e=null;try{qx=qx||W5(t);let i=n?String(n):"";e=qx.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=qx.getInertBodyElement(i)}while(i!==o);return Hg((new U1e).sanitizeChildren(EE(e)||e))}finally{if(e){const i=EE(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function EE(t){return"content"in t&&function W1e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var bo=(()=>((bo=bo||{})[bo.NONE=0]="NONE",bo[bo.HTML=1]="HTML",bo[bo.STYLE=2]="STYLE",bo[bo.SCRIPT=3]="SCRIPT",bo[bo.URL=4]="URL",bo[bo.RESOURCE_URL=5]="RESOURCE_URL",bo))();function Yx(t){const n=B1();return n?U5(n.sanitize(bo.HTML,t)||""):Od(t,"HTML")?U5(rc(t)):Q5(H5(),Li(t))}function $1(t){const n=B1();return n?n.sanitize(bo.URL,t)||"":Od(t,"URL")?rc(t):Wx(Li(t))}function Z5(t){const n=B1();if(n)return G5(n.sanitize(bo.RESOURCE_URL,t)||"");if(Od(t,"ResourceURL"))return G5(rc(t));throw new Nt(904,!1)}function B1(){const t=zt();return t&&t[FT]}const Xx=new Vn("ENVIRONMENT_INITIALIZER"),t8=new Vn("INJECTOR",-1),n8=new Vn("INJECTOR_DEF_TYPES");class i8{get(n,e=v1){if(e===v1){const i=new Error(`NullInjectorError: No provider for ${bn(n)}!`);throw i.name="NullInjectorError",i}return e}}function Z1e(...t){return{\u0275providers:r8(0,t),\u0275fromNgModule:!0}}function r8(t,...n){const e=[],i=new Set;let r;return Wp(n,o=>{const s=o;AE(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&o8(r,e),e}function o8(t,n){for(let e=0;e{n.push(o)})}}function AE(t,n,e,i){if(!(t=xi(t)))return!1;let r=null,o=uL(t);const s=!o&&Kr(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=uL(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)AE(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Wp(o.imports,u=>{AE(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&o8(c,n)}if(!a){const c=Hp(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:zr},{provide:n8,useValue:r,multi:!0},{provide:Xx,useValue:()=>gt(r),multi:!0})}const l=o.providers;null==l||a||ME(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function ME(t,n){for(let e of t)TT(e)&&(e=e.\u0275providers),Array.isArray(e)?ME(e,n):n(e)}const eye=qe({provide:String,useValue:qe});function OE(t){return null!==t&&"object"==typeof t&&eye in t}function Xp(t){return"function"==typeof t}const IE=new Vn("Set Injector scope."),Jx={},nye={};let NE;function Kx(){return void 0===NE&&(NE=new i8),NE}class $c{}class l8 extends $c{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,PE(n,s=>this.processProvider(s)),this.records.set(t8,Ug(void 0,this)),r.has("environment")&&this.records.set($c,Ug(void 0,this));const o=this.records.get(IE);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(n8.multi,zr,Ci.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=kg(this),i=jc(void 0);try{return n()}finally{kg(e),jc(i)}}get(n,e=v1,i=Ci.Default){this.assertNotDestroyed(),i=_x(i);const r=kg(this),o=jc(void 0);try{if(!(i&Ci.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function aye(t){return"function"==typeof t||"object"==typeof t&&t instanceof Vn}(n)&&gx(n);a=l&&this.injectableDefInScope(l)?Ug(FE(n),Jx):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&Ci.Self?Kx():this.parent).get(n,e=i&Ci.Optional&&e===v1?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[yx]=s[yx]||[]).unshift(bn(n)),r)throw s;return function Ove(t,n,e,i){const r=t[yx];throw n[fL]&&r.unshift(n[fL]),t.message=function Ive(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==Eve?t.slice(2):t;let r=bn(n);if(Array.isArray(n))r=n.map(bn).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):bn(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(Tve,"\n ")}`}("\n"+t.message,r,e,i),t[Dve]=r,t[yx]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{jc(o),kg(r)}}resolveInjectorInitializers(){const n=kg(this),e=jc(void 0);try{const i=this.get(Xx.multi,zr,Ci.Self);for(const r of i)r()}finally{kg(n),jc(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(bn(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Nt(205,!1)}processProvider(n){let e=Xp(n=xi(n))?n:xi(n&&n.provide);const i=function rye(t){return OE(t)?Ug(void 0,t.useValue):Ug(c8(t),Jx)}(n);if(Xp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ug(void 0,Jx,!0),r.factory=()=>OT(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Jx&&(e.value=nye,e.value=e.factory()),"object"==typeof e.value&&e.value&&function sye(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=xi(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function FE(t){const n=gx(t),e=null!==n?n.factory:Hp(t);if(null!==e)return e;if(t instanceof Vn)throw new Nt(204,!1);if(t instanceof Function)return function iye(t){const n=t.length;if(n>0)throw M1(n,"?"),new Nt(204,!1);const e=function Cve(t){return t&&(t[vx]||t[dL])||null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Nt(204,!1)}function c8(t,n,e){let i;if(Xp(t)){const r=xi(t);return Hp(r)||FE(r)}if(OE(t))i=()=>xi(t.useValue);else if(function a8(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...OT(t.deps||[]));else if(function s8(t){return!(!t||!t.useExisting)}(t))i=()=>gt(xi(t.useExisting));else{const r=xi(t&&(t.useClass||t.provide));if(!function oye(t){return!!t.deps}(t))return Hp(r)||FE(r);i=()=>new r(...OT(t.deps))}return i}function Ug(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function PE(t,n){for(const e of t)Array.isArray(e)?PE(e,n):e&&TT(e)?PE(e.\u0275providers,n):n(e)}class lye{}class u8{}class uye{resolveComponentFactory(n){throw function cye(t){const n=Error(`No component factory found for ${bn(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let zg=(()=>{class t{}return t.NULL=new uye,t})();function dye(){return Gg(Da(),zt())}function Gg(t,n){return new Si(nc(t,n))}let Si=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=dye,t})();function hye(t){return t instanceof Si?t.nativeElement:t}class Wg{}let ca=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function fye(){const t=zt(),e=Il(Da().index,t);return(tc(e)?e:t)[er]}(),t})(),pye=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>null}),t})();class V1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const mye=new V1("15.2.9"),jE={},RE="ngOriginalError";function LE(t){return t[RE]}class qg{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&LE(n);for(;e&&LE(e);)e=LE(e);return e||null}}function h8(t){return t.ownerDocument.defaultView}function Nh(t){return t instanceof Function?t():t}function p8(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const m8="ng-template";function kye(t,n,e){let i=0,r=!0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==p8(f,c,0)||2&i&&c!==h){if(Su(i))return!1;s=!0}}}}else{if(!s&&!Su(i)&&!Su(l))return!1;if(s&&Su(l))continue;s=!1,i=l|1&i}}return Su(i)||s}function Su(t){return 0==(1&t)}function Eye(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Su(s)&&(n+=y8(o,r),r=""),i=s,o=o||!Su(i);e++}return""!==r&&(n+=y8(o,r)),n}const Bi={};function w(t){_8(Fr(),zt(),fl()+t,!1)}function _8(t,n,e,i){if(!i)if(3==(3&n[Xi])){const o=t.preOrderCheckHooks;null!==o&&Mx(n,o,e)}else{const o=t.preOrderHooks;null!==o&&Ox(n,o,0,e)}Up(e)}function C8(t,n=null,e=null,i){const r=S8(t,n,e,i);return r.resolveInjectorInitializers(),r}function S8(t,n=null,e=null,i,r=new Set){const o=[e||zr,Z1e(t)];return i=i||("object"==typeof t?void 0:bn(t)),new l8(o,n||Kx(),i||null,r)}let ua=(()=>{class t{static create(e,i){if(Array.isArray(e))return C8({name:""},i,e,"");{const r=e.name??"";return C8({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=v1,t.NULL=new i8,t.\u0275prov=Et({token:t,providedIn:"any",factory:()=>gt(t8)}),t.__NG_ELEMENT_ID__=-1,t})();function de(t,n=Ci.Default){const e=zt();return null===e?gt(t,n):ZL(Da(),e,xi(t),n)}function I8(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;ijo&&_8(t,n,jo,!1),Rc(s?2:0,r),e(i,r)}finally{Up(o),Rc(s?3:1,r)}}function GE(t,n,e){if(jT(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,H1(t,e,r.hostVars,Bi),r)}function KE(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Li(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}function b_e(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&QE(e)}}function QE(t){for(let i=fE(t);null!==i;i=pE(i))for(let r=dl;r0&&QE(o)}const e=t[Pn].components;if(null!==e)for(let i=0;i0&&QE(r)}}function k_e(t,n){const e=Il(n,t),i=e[Pn];(function D_e(t,n){for(let e=n.length;e-1&&(vE(n,i),Rx(e,i))}this._attachedToViewContainer=!1}A5(this._lView[Pn],this._lView)}onDestroy(n){P8(this._lView[Pn],this._lView,null,n)}markForCheck(){nw(this._cdRefInjectingView||this._lView)}detach(){this._lView[Xi]&=-65}reattach(){this._lView[Xi]|=64}detectChanges(){iw(this._lView[Pn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Nt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function d1e(t,n){R1(t,n,n[er],2,null,null)}(this._lView[Pn],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Nt(902,!1);this._appRef=n}}class T_e extends U1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;iw(n[Pn],n,n[_s],!1)}checkNoChanges(){}get context(){return null}}class G8 extends zg{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=Kr(n);return new z1(e,this.ngModule)}}function W8(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class A_e{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=_x(i);const r=this.injector.get(n,jE,i);return r!==jE||e===jE?r:this.parentInjector.get(n,e,i)}}class z1 extends u8{get inputs(){return W8(this.componentDef.inputs)}get outputs(){return W8(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function Fye(t){return t.map(Nye).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof $c?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new A_e(n,o):n,a=s.get(Wg,null);if(null===a)throw new Nt(407,!1);const l=s.get(pye,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function r_e(t,n,e){return t.selectRootElement(n,e===bu.ShadowDom)}(c,i,this.componentDef.encapsulation):gE(c,u,function E_e(t){const n=t.toLowerCase();return"svg"===n?TL:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=YE(0,null,null,1,0,null,null,null,null,null),p=Zx(null,f,null,h,null,null,a,c,l,s,null);let m,g;zT(p);try{const v=this.componentDef;let y,b=null;v.findHostDirectiveDefs?(y=[],b=new Map,v.findHostDirectiveDefs(v,y,b),y.push(v)):y=[v];const C=function O_e(t,n){const e=t[Pn],i=jo;return t[i]=n,Jg(e,i,2,"#host",null)}(p,d),k=function I_e(t,n,e,i,r,o,s,a){const l=r[Pn];!function N_e(t,n,e,i){for(const r of t)n.mergedAttrs=T1(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(rw(n,n.mergedAttrs,!0),null!==e&&V5(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Zx(r,F8(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&JE(l,t,i.length-1),tw(r,u),r[t.index]=u}(C,d,v,y,p,a,c);g=AL(f,jo),d&&function P_e(t,n,e,i){if(i)YT(t,e,["ng-version",mye.full]);else{const{attrs:r,classes:o}=function Pye(t){const n=[],e=[];let i=1,r=2;for(;i0&&B5(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function j_e(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=T1(r.hostAttrs,e=T1(e,r.hostAttrs))}}(i)}function tA(t){return t===Th?{}:t===zr?[]:t}function $_e(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function B_e(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function V_e(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function G1(t){return n=>{n.findHostDirectiveDefs=Y8,n.hostDirectives=(Array.isArray(t)?t:t()).map(e=>"function"==typeof e?{directive:xi(e),inputs:Th,outputs:Th}:{directive:xi(e.directive),inputs:X8(e.inputs),outputs:X8(e.outputs)})}}function Y8(t,n,e){if(null!==t.hostDirectives)for(const i of t.hostDirectives){const r=Ja(i.directive);G_e(r.declaredInputs,i.inputs),Y8(r,n,e),e.set(r,i),n.push(r)}}function X8(t){if(void 0===t||0===t.length)return Th;const n={};for(let e=0;es(ka(C[i.index])):i.index;let b=null;if(!s&&a&&(b=function ebe(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==b)(b.__ngLastListenerFn__||b).__ngNextListenerFn__=o,b.__ngLastListenerFn__=o,h=!1;else{o=d6(i,n,u,o,!1);const C=e.listen(g,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=d6(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?Il(t.index,n):n);let l=u6(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=u6(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function $(t=1){return function s0e(t){return($i.lFrame.contextLView=function a0e(t,n){for(;t>0;)n=n[Eg],t--;return n}(t,$i.lFrame.contextLView))[_s]}(t)}function tbe(t,n){let e=null;const i=function Aye(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function oA(t){return 2|t}function Qp(t){return(131068&t)>>2}function sA(t,n){return-131069&t|n<<2}function aA(t){return 1|t}function b6(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?Tf(o):Qp(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];abe(t[a],n)&&(l=!0,t[a+1]=i?aA(u):oA(u)),a=i?Tf(u):Qp(u)}l&&(t[e+1]=i?oA(o):aA(o))}function abe(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&$g(t,n)>=0}const Ys={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function x6(t){return t.substring(Ys.key,Ys.keyEnd)}function w6(t,n){const e=Ys.textEnd;return e===n?-1:(n=Ys.keyEnd=function dbe(t,n,e){for(;n32;)n++;return n}(t,Ys.key=n,e),sv(t,n,e))}function sv(t,n,e){for(;n=0;e=w6(n,e))ic(t,x6(n),!0)}function ku(t,n,e,i){const r=zt(),o=Fr(),s=Oh(2);o.firstUpdatePass&&E6(o,t,s,i),n!==Bi&&el(r,s,n)&&M6(o,o.data[fl()],r,r[er],t,r[s+1]=function wbe(t,n){return null==t||""===t||("string"==typeof n?t+=n:"object"==typeof t&&(t=bn(rc(t)))),t}(n,e),i,s)}function Du(t,n,e,i){const r=Fr(),o=Oh(2);r.firstUpdatePass&&E6(r,null,o,i);const s=zt();if(e!==Bi&&el(s,o,e)){const a=r.data[fl()];if(I6(a,i)&&!T6(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Nr(l,e||"")),iA(r,a,s,e,i)}else!function xbe(t,n,e,i,r,o,s,a){r===Bi&&(r=zr);let l=0,c=0,u=0=t.expandoStartIndex}function E6(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[fl()],s=T6(t,e);I6(o,i)&&null===n&&!s&&(n=!1),n=function mbe(t,n,e,i){const r=function HT(t){const n=$i.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=Y1(e=lA(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=lA(r,t,n,e,i),null===o){let l=function gbe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==Qp(i))return t[Tf(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=lA(null,t,n,l[1],i),l=Y1(l,n.attrs,i),function vbe(t,n,e,i){t[Tf(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function ybe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=Tf(t[a+1]);t[i+1]=lw(h,a),0!==h&&(t[h+1]=sA(t[h+1],i)),t[a+1]=function ibe(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=lw(a,0),0!==a&&(t[a+1]=sA(t[a+1],i)),a=i;else t[i+1]=lw(l,0),0===a?a=i:t[l+1]=sA(t[l+1],i),l=i;c&&(t[i+1]=oA(t[i+1])),b6(t,u,i,!0),b6(t,u,i,!1),function sbe(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&$g(o,n)>=0&&(e[i+1]=aA(e[i+1]))}(n,u,t,i,o),s=lw(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function lA(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Bi&&(h=d?zr:void 0);let f=d?nE(h,i):u===i?h:void 0;if(c&&!cw(f)&&(f=nE(l,i)),cw(f)&&(a=f,s))return a;const p=t[r+1];r=s?Tf(p):Qp(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=nE(l,i))}return a}function cw(t){return void 0!==t}function I6(t,n){return 0!=(t.flags&(n?8:16))}function O(t,n=""){const e=zt(),i=Fr(),r=t+jo,o=i.firstCreatePass?Jg(i,r,1,n,null):i.data[r],s=e[r]=mE(e[er],n);Hx(i,e,s,o),Ad(o,!1)}function bt(t){return mn("",t,""),bt}function mn(t,n,e){const i=zt(),r=Qg(i,t,n,e);return r!==Bi&&Fh(i,fl(),r),mn}function Ef(t,n,e,i,r){const o=zt(),s=Zg(o,t,n,e,i,r);return s!==Bi&&Fh(o,fl(),s),Ef}function Pl(t,n,e){const i=zt();return el(i,Ig(),n)&&oc(Fr(),Xo(),i,t,n,i[er],e,!0),Pl}const Zp=void 0;var Bbe=["en",[["a","p"],["AM","PM"],Zp],[["AM","PM"],Zp,Zp],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Zp,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Zp,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Zp,"{1} 'at' {0}",Zp],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function $be(t){const e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let av={};function pl(t){const n=function Vbe(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=Z6(n);if(e)return e;const i=n.split("-")[0];if(e=Z6(i),e)return e;if("en"===i)return Bbe;throw new Nt(701,!1)}function Z6(t){return t in av||(av[t]=Po.ng&&Po.ng.common&&Po.ng.common.locales&&Po.ng.common.locales[t]),av[t]}var Tn=(()=>((Tn=Tn||{})[Tn.LocaleId=0]="LocaleId",Tn[Tn.DayPeriodsFormat=1]="DayPeriodsFormat",Tn[Tn.DayPeriodsStandalone=2]="DayPeriodsStandalone",Tn[Tn.DaysFormat=3]="DaysFormat",Tn[Tn.DaysStandalone=4]="DaysStandalone",Tn[Tn.MonthsFormat=5]="MonthsFormat",Tn[Tn.MonthsStandalone=6]="MonthsStandalone",Tn[Tn.Eras=7]="Eras",Tn[Tn.FirstDayOfWeek=8]="FirstDayOfWeek",Tn[Tn.WeekendRange=9]="WeekendRange",Tn[Tn.DateFormat=10]="DateFormat",Tn[Tn.TimeFormat=11]="TimeFormat",Tn[Tn.DateTimeFormat=12]="DateTimeFormat",Tn[Tn.NumberSymbols=13]="NumberSymbols",Tn[Tn.NumberFormats=14]="NumberFormats",Tn[Tn.CurrencyCode=15]="CurrencyCode",Tn[Tn.CurrencySymbol=16]="CurrencySymbol",Tn[Tn.CurrencyName=17]="CurrencyName",Tn[Tn.Currencies=18]="Currencies",Tn[Tn.Directionality=19]="Directionality",Tn[Tn.PluralCase=20]="PluralCase",Tn[Tn.ExtraData=21]="ExtraData",Tn))();const Hbe=["zero","one","two","few","many"],lv="en-US",uw={marker:"element"},dw={marker:"ICU"};var ls=(()=>((ls=ls||{})[ls.SHIFT=2]="SHIFT",ls[ls.APPEND_EAGERLY=1]="APPEND_EAGERLY",ls[ls.COMMENT=2]="COMMENT",ls))();let e$=lv;function t$(t){(function Pc(t,n){null==t&&Jr(n,t,null,"!=")})(t,"Expected localeId to be defined"),"string"==typeof t&&(e$=t.toLowerCase().replace(/_/g,"-"))}function n$(t,n,e){const i=n.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?P5(t,0,e):ka(e[r])}function i$(t,n,e,i,r){const o=n.insertBeforeIndex;if(Array.isArray(o)){let s=i,a=null;if(3&n.type||(a=s,s=r),null!==s&&-1===n.componentOffset)for(let l=1;l1)for(let e=t.length-2;e>=0;e--){const i=t[e];o$(i)||Wbe(i,n)&&null===qbe(i)&&Ybe(i,n.index)}}function o$(t){return!(64&t.type)}function Wbe(t,n){return o$(n)||t.index>n.index}function qbe(t){const n=t.insertBeforeIndex;return Array.isArray(n)?n[0]:n}function Ybe(t,n){const e=t.insertBeforeIndex;Array.isArray(e)?e[0]=n:(R5(n$,i$),t.insertBeforeIndex=n)}function X1(t,n){const e=t.data[n];return null===e||"string"==typeof e?null:e.hasOwnProperty("currentCaseLViewIndex")?e:e.value}function Kbe(t,n,e){const i=UE(t,e,64,null,null);return r$(n,i),i}function hw(t,n){const e=n[t.currentCaseLViewIndex];return null===e?e:e<0?~e:e}function s$(t){return t>>>17}function a$(t){return(131070&t)>>>1}let J1=0,K1=0;function c$(t,n,e,i){const r=e[er];let s,o=null;for(let a=0;a>>1,e),null,null,f,p,null)}else switch(l){case dw:const c=n[++a],u=n[++a];null===e[u]&&Za(e[u]=l1e(r,c),e);break;case uw:const d=n[++a],h=n[++a];null===e[h]&&Za(e[h]=gE(r,d,null),e)}}}function u$(t,n,e,i,r){for(let o=0;o>>2;switch(3&u){case 1:const h=e[++c],f=e[++c],p=t.data[d];"string"==typeof p?KE(n[er],n[d],null,p,h,l,f):oc(t,p,n,h,l,n[er],f,!1);break;case 0:const m=n[d];null!==m&&T5(n[er],m,l);break;case 2:nxe(t,X1(t,d),n,l);break;case 3:d$(t,X1(t,d),i,n)}}}}else{const l=e[o+1];if(l>0&&3==(3&l)){const u=X1(t,l>>>2);n[u.currentCaseLViewIndex]<0&&d$(t,u,i,n)}}o+=a}}function d$(t,n,e,i){let r=i[n.currentCaseLViewIndex];if(null!==r){let o=J1;r<0&&(r=i[n.currentCaseLViewIndex]=~r,o=-1),u$(t,i,n.update[r],e,o)}}function nxe(t,n,e,i){const r=function ixe(t,n){let e=t.cases.indexOf(n);if(-1===e)switch(t.type){case 1:{const i=function Ube(t,n){const e=function Q6(t){return pl(t)[Tn.PluralCase]}(n)(parseInt(t,10)),i=Hbe[e];return void 0!==i?i:"other"}(n,function Gbe(){return e$}());e=t.cases.indexOf(i),-1===e&&"other"!==i&&(e=t.cases.indexOf("other"));break}case 0:e=t.cases.indexOf("other")}return-1===e?null:e}(n,i);if(hw(n,e)!==r&&(h$(t,n,e),e[n.currentCaseLViewIndex]=null===r?null:~r,null!==r)){const s=e[n.anchorIdx];s&&c$(t,n.create[r],e,s)}}function h$(t,n,e){let i=hw(n,e);if(null!==i){const r=n.remove[i];for(let o=0;o0){const a=Tx(s,e);null!==a&&xE(e[er],a)}else h$(t,X1(t,~s),e)}}}function rxe(){const t=[];let e,i,n=-1;function o(a,l){n=0;const c=hw(a,l);i=null!==c?a.remove[c]:zr}function s(){if(n0?e[a]:(t.push(n,i),o(e[Pn].data[~a],e),s())}return 0===t.length?null:(i=t.pop(),n=t.pop(),s())}return function r(a,l){for(e=l;t.length;)t.pop();return o(a.value,l),s}}const fw=/\ufffd(\d+):?\d*\ufffd/gi,sxe=/\ufffd(\d+)\ufffd/,p$=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,Q1="\ufffd",axe=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,lxe=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,cxe=/\uE500/g;function m$(t,n,e,i,r,o,s){const a=H1(t,i,1,null);let l=a<e.length&&e.push(l)}return{type:i,mainBinding:r,cases:n,values:e}}function cA(t){if(!t)return[];let n=0;const e=[],i=[],r=/[{}]/g;let o;for(r.lastIndex=0;o=r.exec(t);){const a=o.index;if("}"==o[0]){if(e.pop(),0==e.length){const l=t.substring(n,a);p$.test(l)?i.push(vxe(l)):i.push(l),n=a+1}}else{if(0==e.length){const l=t.substring(n,a);i.push(l),n=a+1}e.push("{")}}const s=t.substring(n);return i.push(s),i}function yxe(t,n,e,i,r,o,s,a){const l=[],c=[],u=[];n.cases.push(o),n.create.push(l),n.remove.push(c),n.update.push(u);const h=W5(H5()).getInertBodyElement(s),f=EE(h)||h;return f?_$(t,n,e,i,l,c,u,f,r,a,0):0}function _$(t,n,e,i,r,o,s,a,l,c,u){let d=0,h=a.firstChild;for(;h;){const f=H1(t,e,1,null);switch(h.nodeType){case Node.ELEMENT_NODE:const p=h,m=p.tagName.toLowerCase();if(DE.hasOwnProperty(m)){uA(r,uw,m,l,f),t.data[f]=m;const b=p.attributes;for(let C=0;C>>ls.SHIFT;let d=t[u];null===d&&(d=t[u]=(s&ls.COMMENT)===ls.COMMENT?r.createComment(a):mE(r,a)),c&&null!==e&&qp(r,e,d,i,!1)}})(r,l.create,u,a&&8&a.type?r[a.index]:null),jL(!0)}function Ea(t,n,e){w$(t,n,e),function C$(){jL(!1)}()}function cv(t){return function Zbe(t){t&&(J1|=1<0){const i=t.data[e];u$(t,n,Array.isArray(i)?i:i.update,Mh()-K1-1,J1)}J1=0,K1=0}(Fr(),zt(),t+jo)}function dA(t,n,e,i,r){if(t=xi(t),Array.isArray(t))for(let o=0;o>20;if(Xp(t)||!t.multi){const f=new D1(l,r,de),p=fA(a,n,r?u:u+h,d);-1===p?(QT(Px(c,s),o,a),hA(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=fA(a,n,u+h,d),p=fA(a,n,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){QT(Px(c,s),o,a);const v=function jxe(t,n,e,i,r){const o=new D1(t,e,de);return o.multi=[],o.index=n,o.componentProviders=0,S$(o,r,i&&!e),o}(r?Pxe:Fxe,e.length,r,i,l);!r&&g&&(e[p].providerFactory=v),hA(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else hA(o,t,f>-1?f:p,S$(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function hA(t,n,e,i){const r=Xp(n),o=function tye(t){return!!t.useClass}(n);if(r||o){const l=(o?xi(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function S$(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function fA(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function Nxe(t,n,e){const i=Fr();if(i.firstCreatePass){const r=Cu(t);dA(e,i.data,i.blueprint,r,!0),dA(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class uv{}class k${}class D$ extends uv{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new G8(this);const i=ec(n);this._bootstrapComponents=Nh(i.bootstrap),this._r3Injector=S8(n,e,[{provide:uv,useValue:this},{provide:zg,useValue:this.componentFactoryResolver}],bn(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class mA extends k${constructor(n){super(),this.moduleType=n}create(n){return new D$(this.moduleType,n)}}class Lxe extends uv{constructor(n,e,i){super(),this.componentFactoryResolver=new G8(this),this.instance=null;const r=new l8([...n,{provide:uv,useValue:this},{provide:zg,useValue:this.componentFactoryResolver}],e||Kx(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function pw(t,n,e=null){return new Lxe(t,n,e).injector}let $xe=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=r8(0,e.type),r=i.length>0?pw([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Et({token:t,providedIn:"environment",factory:()=>new t(gt($c))}),t})();function Is(t){t.getStandaloneInjector=n=>n.get($xe).getOrCreateStandaloneInjector(t)}function ml(t,n,e){const i=hl()+t,r=zt();return r[i]===Bi?Nd(r,i,e?n.call(e):n()):function W1(t,n){return t[n]}(r,i)}function sr(t,n,e,i){return N$(zt(),hl(),t,n,e,i)}function Mr(t,n,e,i,r){return function F$(t,n,e,i,r,o,s){const a=n+e;return Jp(t,a,r,o)?Nd(t,a+2,s?i.call(s,r,o):i(r,o)):ny(t,a+2)}(zt(),hl(),t,n,e,i,r)}function ty(t,n,e,i,r,o){return function P$(t,n,e,i,r,o,s,a){const l=n+e;return function aw(t,n,e,i,r){const o=Jp(t,n,e,i);return el(t,n+2,r)||o}(t,l,r,o,s)?Nd(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):ny(t,l+3)}(zt(),hl(),t,n,e,i,r,o)}function ny(t,n){const e=t[n];return e===Bi?void 0:e}function N$(t,n,e,i,r,o){const s=n+e;return el(t,s,r)?Nd(t,s+1,o?i.call(o,r):i(r)):ny(t,s+1)}function vA(t,n){const e=Fr();let i;const r=t+jo;e.firstCreatePass?(i=function ewe(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Hp(i.type)),s=jc(de);try{const a=Fx(!1),l=o();return Fx(a),function K_e(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,zt(),r,l),l}finally{jc(s)}}function yA(t,n,e){const i=t+jo,r=zt(),o=Og(r,i);return function iy(t,n){return t[Pn].data[n].pure}(r,i)?N$(r,hl(),n,o.transform,e,o):o.transform(e)}function _A(t){return n=>{setTimeout(t,void 0,n)}}const it=class owe extends dr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=_A(o),r&&(r=_A(r)),s&&(s=_A(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof ce&&n.add(a),a}};function swe(){return this._results[Symbol.iterator]()}class bA{get changes(){return this._changes||(this._changes=new it)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=bA.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=swe)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Lc(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function k0e(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=cwe,t})();const awe=oo,lwe=class extends awe{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Zx(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[w1]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Ed];return null!==s&&(r[Ed]=s.createEmbeddedView(i)),zE(i,r,n),new U1(r)}};function cwe(){return mw(Da(),zt())}function mw(t,n){return 4&t.type?new lwe(n,t,Gg(t,n)):null}let jl=(()=>{class t{}return t.__NG_ELEMENT_ID__=uwe,t})();function uwe(){return B$(Da(),zt())}const dwe=jl,L$=class extends dwe{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return Gg(this._hostTNode,this._hostLView)}get injector(){return new Fg(this._hostTNode,this._hostLView)}get parentInjector(){const n=KT(this._hostTNode,this._hostLView);if(qL(n)){const e=Nx(n,this._hostLView),i=Ix(n);return new Fg(e[Pn].data[i+8],e)}return new Fg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=$$(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-dl}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function A1(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new z1(Kr(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get($c,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Pn];if(function Xve(t){return wu(t[as])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[as],h=new L$(d,d[Ka],d[as]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function f1e(t,n,e,i){const r=dl+i,o=e.length;i>0&&(e[r-1][xu]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=dl;d{class t{constructor(e){this.appInits=e,this.resolve=vw,this.reject=vw,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(gt(yw,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oy=new Vn("AppId",{providedIn:"root",factory:function cB(){return`${IA()}${IA()}${IA()}`}});function IA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const uB=new Vn("Platform Initializer"),sy=new Vn("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),dB=new Vn("AnimationModuleType");let Rwe=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const lc=new Vn("LocaleId",{providedIn:"root",factory:()=>Fi(lc,Ci.Optional|Ci.SkipSelf)||function Lwe(){return typeof $localize<"u"&&$localize.locale||lv}()});class Bwe{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let hB=(()=>{class t{compileModuleSync(e){return new mA(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Nh(ec(e).declarations).reduce((s,a)=>{const l=Kr(a);return l&&s.push(new z1(l)),s},[]);return new Bwe(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Uwe=(()=>Promise.resolve(0))();function NA(t){typeof Zone>"u"?Uwe.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class nr{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new it(!1),this.onMicrotaskEmpty=new it(!1),this.onStable=new it(!1),this.onError=new it(!1),typeof Zone>"u")throw new Nt(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function zwe(){let t=Po.requestAnimationFrame,n=Po.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function qwe(t){const n=()=>{!function Wwe(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Po,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,PA(t),t.isCheckStableRunning=!0,FA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),PA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return mB(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),gB(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return mB(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),gB(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,PA(t),FA(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!nr.isInAngularZone())throw new Nt(909,!1)}static assertNotInAngularZone(){if(nr.isInAngularZone())throw new Nt(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,Gwe,vw,vw);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Gwe={};function FA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function PA(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function mB(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function gB(t){t._nesting--,FA(t)}class Ywe{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new it,this.onMicrotaskEmpty=new it,this.onStable=new it,this.onError=new it}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const vB=new Vn(""),bw=new Vn("");let LA,jA=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,LA||(function Xwe(t){LA=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{nr.assertNotInAngularZone(),NA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())NA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(gt(nr),gt(RA),gt(bw))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),RA=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return LA?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const jh=!1;let Af=null;const yB=new Vn("AllowMultipleToken"),$A=new Vn("PlatformDestroyListeners"),_B=new Vn("appBootstrapListener");class bB{constructor(n,e){this.name=n,this.token=e}}function wB(t,n,e=[]){const i=`Platform: ${n}`,r=new Vn(i);return(o=[])=>{let s=BA();if(!s||s.injector.get(yB,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function Qwe(t){if(Af&&!Af.get(yB,!1))throw new Nt(400,!1);Af=t;const n=t.get(SB);(function xB(t){const n=t.get(uB,null);n&&n.forEach(e=>e())})(t)}(function CB(t=[],n){return ua.create({name:n,providers:[{provide:IE,useValue:"platform"},{provide:$A,useValue:new Set([()=>Af=null])},...t]})}(a,i))}return function eCe(t){const n=BA();if(!n)throw new Nt(401,!1);return n}()}}function BA(){return Af?.get(SB)??null}let SB=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function DB(t,n){let e;return e="noop"===t?new Ywe:("zone.js"===t?void 0:t)||new nr(n),e}(i?.ngZone,function kB(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:nr,useValue:r}];return r.run(()=>{const s=ua.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(qg,null);if(!l)throw new Nt(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{xw(this._modules,a),c.unsubscribe()})}),function TB(t,n,e){try{const i=e();return q1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(_w);return c.runInitializers(),c.donePromise.then(()=>(t$(a.injector.get(lc,lv)||lv),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=EB({},i);return function Jwe(t,n,e){const i=new mA(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Rh);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Nt(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Nt(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get($A,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(gt(ua))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function EB(t,n){return Array.isArray(n)?n.reduce(EB,t):{...t,...n}}let Rh=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new en(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new en(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{nr.assertNotInAngularZone(),NA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{nr.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Dt(o,s.pipe(Ge()))}bootstrap(e,i){const r=e instanceof u8;if(!this._injector.get(_w).done){!r&&function Dg(t){const n=Kr(t)||Ja(t)||Ol(t);return null!==n&&n.standalone}(e);throw new Nt(405,jh)}let s;s=r?e:this._injector.get(zg).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function Kwe(t){return t.isBoundToModule}(s)?void 0:this._injector.get(uv),c=s.create(ua.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(vB,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),xw(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Nt(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;xw(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(_B,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>xw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Nt(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(gt(nr),gt($c),gt(qg))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function xw(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let Ns=(()=>{class t{}return t.__NG_ELEMENT_ID__=nCe,t})();function nCe(t){return function iCe(t,n,e){if(S1(t)&&!e){const i=Il(t.index,n);return new U1(i,i)}return 47&t.type?new U1(n[Qa],n):null}(Da(),zt(),16==(16&t))}class NB{constructor(){}supports(n){return sw(n)}create(n){return new cCe(n)}}const lCe=(t,n)=>n;class cCe{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||lCe}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new uCe(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new FB),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new FB),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class uCe{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class dCe{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class FB{constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new dCe,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function PB(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new fCe(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class fCe{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function RB(){return new Sw([new NB])}let Sw=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||RB()),deps:[[t,new I1,new O1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Nt(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:RB}),t})();function LB(){return new ay([new jB])}let ay=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||LB()),deps:[[t,new I1,new O1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Nt(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:LB}),t})();const gCe=wB(null,"core",[]);let vCe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(gt(Rh))},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();function fv(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}function GA(t,n){const e=Kr(t),i=n.elementInjector||Kx();return new z1(e).create(i,n.projectableNodes,n.hostElement,n.environmentInjector)}let WA=null;function Lh(){return WA}class bCe{}const co=new Vn("DocumentToken");let qA=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function xCe(){return gt($B)}()},providedIn:"platform"}),t})();const wCe=new Vn("Location Initialized");let $B=(()=>{class t extends qA{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Lh().getBaseHref(this._doc)}onPopState(e){const i=Lh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Lh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){BB()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){BB()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:function(){return function CCe(){return new $B(gt(co))}()},providedIn:"platform"}),t})();function BB(){return!!window.history.pushState}function YA(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function VB(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function $h(t){return t&&"?"!==t[0]?"?"+t:t}let tm=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(UB)},providedIn:"root"}),t})();const HB=new Vn("appBaseHref");let UB=(()=>{class t extends tm{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Fi(co).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return YA(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+$h(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+$h(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+$h(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(gt(qA),gt(HB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),SCe=(()=>{class t extends tm{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=YA(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+$h(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+$h(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(gt(qA),gt(HB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),XA=(()=>{class t{constructor(e){this._subject=new it,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function TCe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(VB(zB(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+$h(i))}normalize(e){return t.stripTrailingSlash(function DCe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,zB(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+$h(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+$h(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=$h,t.joinWithSlash=YA,t.stripTrailingSlash=VB,t.\u0275fac=function(e){return new(e||t)(gt(tm))},t.\u0275prov=Et({token:t,factory:function(){return function kCe(){return new XA(gt(tm))}()},providedIn:"root"}),t})();function zB(t){return t.replace(/\/index.html$/,"")}var Rl=(()=>((Rl=Rl||{})[Rl.Decimal=0]="Decimal",Rl[Rl.Percent=1]="Percent",Rl[Rl.Currency=2]="Currency",Rl[Rl.Scientific=3]="Scientific",Rl))(),Ro=(()=>((Ro=Ro||{})[Ro.Format=0]="Format",Ro[Ro.Standalone=1]="Standalone",Ro))(),Vi=(()=>((Vi=Vi||{})[Vi.Narrow=0]="Narrow",Vi[Vi.Abbreviated=1]="Abbreviated",Vi[Vi.Wide=2]="Wide",Vi[Vi.Short=3]="Short",Vi))(),Jo=(()=>((Jo=Jo||{})[Jo.Short=0]="Short",Jo[Jo.Medium=1]="Medium",Jo[Jo.Long=2]="Long",Jo[Jo.Full=3]="Full",Jo))(),_i=(()=>((_i=_i||{})[_i.Decimal=0]="Decimal",_i[_i.Group=1]="Group",_i[_i.List=2]="List",_i[_i.PercentSign=3]="PercentSign",_i[_i.PlusSign=4]="PlusSign",_i[_i.MinusSign=5]="MinusSign",_i[_i.Exponential=6]="Exponential",_i[_i.SuperscriptingExponent=7]="SuperscriptingExponent",_i[_i.PerMille=8]="PerMille",_i[_i.Infinity=9]="Infinity",_i[_i.NaN=10]="NaN",_i[_i.TimeSeparator=11]="TimeSeparator",_i[_i.CurrencyDecimal=12]="CurrencyDecimal",_i[_i.CurrencyGroup=13]="CurrencyGroup",_i))();function WB(t,n,e){const i=pl(t),o=Hc([i[Tn.DayPeriodsFormat],i[Tn.DayPeriodsStandalone]],n);return Hc(o,e)}function qB(t,n,e){const i=pl(t),o=Hc([i[Tn.DaysFormat],i[Tn.DaysStandalone]],n);return Hc(o,e)}function JA(t,n,e){const i=pl(t),o=Hc([i[Tn.MonthsFormat],i[Tn.MonthsStandalone]],n);return Hc(o,e)}function kw(t,n){return Hc(pl(t)[Tn.DateFormat],n)}function Dw(t,n){return Hc(pl(t)[Tn.TimeFormat],n)}function Tw(t,n){return Hc(pl(t)[Tn.DateTimeFormat],n)}function Vc(t,n){const e=pl(t),i=e[Tn.NumberSymbols][n];if(typeof i>"u"){if(n===_i.CurrencyDecimal)return e[Tn.NumberSymbols][_i.Decimal];if(n===_i.CurrencyGroup)return e[Tn.NumberSymbols][_i.Group]}return i}function YB(t){if(!t[Tn.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Tn.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Hc(t,n){for(let e=n;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new Error("Locale data API: locale data undefined")}function QA(t){const[n,e]=t.split(":");return{hours:+n,minutes:+e}}const RCe=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ly={},LCe=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Xs=(()=>((Xs=Xs||{})[Xs.Short=0]="Short",Xs[Xs.ShortGMT=1]="ShortGMT",Xs[Xs.Long=2]="Long",Xs[Xs.Extended=3]="Extended",Xs))(),Di=(()=>((Di=Di||{})[Di.FullYear=0]="FullYear",Di[Di.Month=1]="Month",Di[Di.Date=2]="Date",Di[Di.Hours=3]="Hours",Di[Di.Minutes=4]="Minutes",Di[Di.Seconds=5]="Seconds",Di[Di.FractionalSeconds=6]="FractionalSeconds",Di[Di.Day=7]="Day",Di))(),Ji=(()=>((Ji=Ji||{})[Ji.DayPeriods=0]="DayPeriods",Ji[Ji.Days=1]="Days",Ji[Ji.Months=2]="Months",Ji[Ji.Eras=3]="Eras",Ji))();function XB(t,n,e,i){let r=function qCe(t){if(QB(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[r,o=1,s=1]=t.split("-").map(a=>+a);return Ew(r,o-1,s)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(RCe))return function YCe(t){const n=new Date(0);let e=0,i=0;const r=t[8]?n.setUTCFullYear:n.setFullYear,o=t[8]?n.setUTCHours:n.setHours;t[9]&&(e=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));const s=Number(t[4]||0)-e,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return o.call(n,s,a,l,c),n}(i)}const n=new Date(t);if(!QB(n))throw new Error(`Unable to convert "${t}" into a date`);return n}(t);n=Bh(e,n)||n;let a,s=[];for(;n;){if(a=LCe.exec(n),!a){s.push(n);break}{s=s.concat(a.slice(1));const u=s.pop();if(!u)break;n=u}}let l=r.getTimezoneOffset();i&&(l=KB(i,l),r=function WCe(t,n,e){const i=e?-1:1,r=t.getTimezoneOffset();return function GCe(t,n){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+n),t}(t,i*(KB(n,r)-r))}(r,i,!0));let c="";return s.forEach(u=>{const d=function zCe(t){if(eM[t])return eM[t];let n;switch(t){case"G":case"GG":case"GGG":n=wo(Ji.Eras,Vi.Abbreviated);break;case"GGGG":n=wo(Ji.Eras,Vi.Wide);break;case"GGGGG":n=wo(Ji.Eras,Vi.Narrow);break;case"y":n=Ps(Di.FullYear,1,0,!1,!0);break;case"yy":n=Ps(Di.FullYear,2,0,!0,!0);break;case"yyy":n=Ps(Di.FullYear,3,0,!1,!0);break;case"yyyy":n=Ps(Di.FullYear,4,0,!1,!0);break;case"Y":n=Iw(1);break;case"YY":n=Iw(2,!0);break;case"YYY":n=Iw(3);break;case"YYYY":n=Iw(4);break;case"M":case"L":n=Ps(Di.Month,1,1);break;case"MM":case"LL":n=Ps(Di.Month,2,1);break;case"MMM":n=wo(Ji.Months,Vi.Abbreviated);break;case"MMMM":n=wo(Ji.Months,Vi.Wide);break;case"MMMMM":n=wo(Ji.Months,Vi.Narrow);break;case"LLL":n=wo(Ji.Months,Vi.Abbreviated,Ro.Standalone);break;case"LLLL":n=wo(Ji.Months,Vi.Wide,Ro.Standalone);break;case"LLLLL":n=wo(Ji.Months,Vi.Narrow,Ro.Standalone);break;case"w":n=ZA(1);break;case"ww":n=ZA(2);break;case"W":n=ZA(1,!0);break;case"d":n=Ps(Di.Date,1);break;case"dd":n=Ps(Di.Date,2);break;case"c":case"cc":n=Ps(Di.Day,1);break;case"ccc":n=wo(Ji.Days,Vi.Abbreviated,Ro.Standalone);break;case"cccc":n=wo(Ji.Days,Vi.Wide,Ro.Standalone);break;case"ccccc":n=wo(Ji.Days,Vi.Narrow,Ro.Standalone);break;case"cccccc":n=wo(Ji.Days,Vi.Short,Ro.Standalone);break;case"E":case"EE":case"EEE":n=wo(Ji.Days,Vi.Abbreviated);break;case"EEEE":n=wo(Ji.Days,Vi.Wide);break;case"EEEEE":n=wo(Ji.Days,Vi.Narrow);break;case"EEEEEE":n=wo(Ji.Days,Vi.Short);break;case"a":case"aa":case"aaa":n=wo(Ji.DayPeriods,Vi.Abbreviated);break;case"aaaa":n=wo(Ji.DayPeriods,Vi.Wide);break;case"aaaaa":n=wo(Ji.DayPeriods,Vi.Narrow);break;case"b":case"bb":case"bbb":n=wo(Ji.DayPeriods,Vi.Abbreviated,Ro.Standalone,!0);break;case"bbbb":n=wo(Ji.DayPeriods,Vi.Wide,Ro.Standalone,!0);break;case"bbbbb":n=wo(Ji.DayPeriods,Vi.Narrow,Ro.Standalone,!0);break;case"B":case"BB":case"BBB":n=wo(Ji.DayPeriods,Vi.Abbreviated,Ro.Format,!0);break;case"BBBB":n=wo(Ji.DayPeriods,Vi.Wide,Ro.Format,!0);break;case"BBBBB":n=wo(Ji.DayPeriods,Vi.Narrow,Ro.Format,!0);break;case"h":n=Ps(Di.Hours,1,-12);break;case"hh":n=Ps(Di.Hours,2,-12);break;case"H":n=Ps(Di.Hours,1);break;case"HH":n=Ps(Di.Hours,2);break;case"m":n=Ps(Di.Minutes,1);break;case"mm":n=Ps(Di.Minutes,2);break;case"s":n=Ps(Di.Seconds,1);break;case"ss":n=Ps(Di.Seconds,2);break;case"S":n=Ps(Di.FractionalSeconds,1);break;case"SS":n=Ps(Di.FractionalSeconds,2);break;case"SSS":n=Ps(Di.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=Mw(Xs.Short);break;case"ZZZZZ":n=Mw(Xs.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=Mw(Xs.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=Mw(Xs.Long);break;default:return null}return eM[t]=n,n}(u);c+=d?d(r,e,l):"''"===u?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function Ew(t,n,e){const i=new Date(0);return i.setFullYear(t,n,e),i.setHours(0,0,0),i}function Bh(t,n){const e=function ECe(t){return pl(t)[Tn.LocaleId]}(t);if(ly[e]=ly[e]||{},ly[e][n])return ly[e][n];let i="";switch(n){case"shortDate":i=kw(t,Jo.Short);break;case"mediumDate":i=kw(t,Jo.Medium);break;case"longDate":i=kw(t,Jo.Long);break;case"fullDate":i=kw(t,Jo.Full);break;case"shortTime":i=Dw(t,Jo.Short);break;case"mediumTime":i=Dw(t,Jo.Medium);break;case"longTime":i=Dw(t,Jo.Long);break;case"fullTime":i=Dw(t,Jo.Full);break;case"short":const r=Bh(t,"shortTime"),o=Bh(t,"shortDate");i=Aw(Tw(t,Jo.Short),[r,o]);break;case"medium":const s=Bh(t,"mediumTime"),a=Bh(t,"mediumDate");i=Aw(Tw(t,Jo.Medium),[s,a]);break;case"long":const l=Bh(t,"longTime"),c=Bh(t,"longDate");i=Aw(Tw(t,Jo.Long),[l,c]);break;case"full":const u=Bh(t,"fullTime"),d=Bh(t,"fullDate");i=Aw(Tw(t,Jo.Full),[u,d])}return i&&(ly[e][n]=i),i}function Aw(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(e,i){return null!=n&&i in n?n[i]:e})),t}function Eu(t,n,e="-",i,r){let o="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,o=e));let s=String(t);for(;s.length0||a>-e)&&(a+=e),t===Di.Hours)0===a&&-12===e&&(a=12);else if(t===Di.FractionalSeconds)return function $Ce(t,n){return Eu(t,3).substring(0,n)}(a,n);const l=Vc(s,_i.MinusSign);return Eu(a,n,l,i,r)}}function wo(t,n,e=Ro.Format,i=!1){return function(r,o){return function VCe(t,n,e,i,r,o){switch(e){case Ji.Months:return JA(n,r,i)[t.getMonth()];case Ji.Days:return qB(n,r,i)[t.getDay()];case Ji.DayPeriods:const s=t.getHours(),a=t.getMinutes();if(o){const c=function ICe(t){const n=pl(t);return YB(n),(n[Tn.ExtraData][2]||[]).map(i=>"string"==typeof i?QA(i):[QA(i[0]),QA(i[1])])}(n),u=function NCe(t,n,e){const i=pl(t);YB(i);const o=Hc([i[Tn.ExtraData][0],i[Tn.ExtraData][1]],n)||[];return Hc(o,e)||[]}(n,r,i),d=c.findIndex(h=>{if(Array.isArray(h)){const[f,p]=h,m=s>=f.hours&&a>=f.minutes,g=s0?Math.floor(r/60):Math.ceil(r/60);switch(t){case Xs.Short:return(r>=0?"+":"")+Eu(s,2,o)+Eu(Math.abs(r%60),2,o);case Xs.ShortGMT:return"GMT"+(r>=0?"+":"")+Eu(s,1,o);case Xs.Long:return"GMT"+(r>=0?"+":"")+Eu(s,2,o)+":"+Eu(Math.abs(r%60),2,o);case Xs.Extended:return 0===i?"Z":(r>=0?"+":"")+Eu(s,2,o)+":"+Eu(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${t}"`)}}}const HCe=0,Ow=4;function JB(t){return Ew(t.getFullYear(),t.getMonth(),t.getDate()+(Ow-t.getDay()))}function ZA(t,n=!1){return function(e,i){let r;if(n){const o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{const o=JB(e),s=function UCe(t){const n=Ew(t,HCe,1).getDay();return Ew(t,0,1+(n<=Ow?Ow:Ow+7)-n)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return Eu(r,t,Vc(i,_i.MinusSign))}}function Iw(t,n=!1){return function(e,i){return Eu(JB(e).getFullYear(),t,Vc(i,_i.MinusSign),n)}}const eM={};function KB(t,n){t=t.replace(/:/g,"");const e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function QB(t){return t instanceof Date&&!isNaN(t.valueOf())}const XCe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ZB=22,Nw=".",cy="0",JCe=";",KCe=",",tM="#";function rM(t){const n=parseInt(t);if(isNaN(n))throw new Error("Invalid integer literal when parsing "+t);return n}function n7(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const sM=/\s+/,i7=[];let nm=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=i7,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(sM):i7}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(sM):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(sM).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(de(Sw),de(ay),de(Si),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class a2e{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Ln=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new a2e(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),s7(a,r)}});for(let r=0,o=i.length;r{s7(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(de(jl),de(oo),de(Sw))},t.\u0275dir=sn({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function s7(t,n){t.context.$implicit=n.item}let vn=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new c2e,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){a7("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){a7("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(de(jl),de(oo))},t.\u0275dir=sn({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class c2e{constructor(){this.$implicit=null,this.ngIf=null}}function a7(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bn(n)}'.`)}class aM{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let Fw=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),l7=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new aM(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(de(jl),de(oo),de(Fw,9))},t.\u0275dir=sn({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),u7=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Nl.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ay),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),Au=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(de(jl))},t.\u0275dir=sn({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Yn]}),t})();let h7=(()=>{class t{constructor(e){this._locale=e}transform(e,i,r){if(!function lM(t){return!(null==t||""===t||t!=t)}(e))return null;r=r||this._locale;try{return function e2e(t,n,e){return function nM(t,n,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(t)){let c=function i2e(t){let i,r,o,s,a,n=Math.abs(t)+"",e=0;for((r=n.indexOf(Nw))>-1&&(n=n.replace(Nw,"")),(o=n.search(/e/i))>0?(r<0&&(r=o),r+=+n.slice(o+1),n=n.substring(0,o)):r<0&&(r=n.length),o=0;n.charAt(o)===cy;o++);if(o===(a=n.length))i=[0],r=1;else{for(a--;n.charAt(a)===cy;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(n.charAt(o))}return r>ZB&&(i=i.splice(0,ZB-1),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(t);s&&(c=function n2e(t){if(0===t.digits[0])return t;const n=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===n?t.digits.push(0,0):1===n&&t.digits.push(0),t.integerLen+=2),t}(c));let u=n.minInt,d=n.minFrac,h=n.maxFrac;if(o){const y=o.match(XCe);if(null===y)throw new Error(`${o} is not a valid digit info`);const b=y[1],C=y[3],k=y[5];null!=b&&(u=rM(b)),null!=C&&(d=rM(C)),null!=k?h=rM(k):null!=C&&d>h&&(h=d)}!function r2e(t,n,e){if(n>e)throw new Error(`The minimum number of digits after fraction (${n}) is higher than the maximum (${e}).`);let i=t.digits,r=i.length-t.integerLen;const o=Math.min(Math.max(n,r),e);let s=o+t.integerLen,a=i[s];if(s>0){i.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[s-1]++;for(;r=c?p.pop():l=!1),h>=10?1:0},0);u&&(i.unshift(u),t.integerLen++)}(c,d,h);let f=c.digits,p=c.integerLen;const m=c.exponent;let g=[];for(l=f.every(y=>!y);p0?g=f.splice(p,f.length):(g=f,f=[0]);const v=[];for(f.length>=n.lgSize&&v.unshift(f.splice(-n.lgSize,f.length).join(""));f.length>n.gSize;)v.unshift(f.splice(-n.gSize,f.length).join(""));f.length&&v.unshift(f.join("")),a=v.join(Vc(e,i)),g.length&&(a+=Vc(e,r)+g.join("")),m&&(a+=Vc(e,_i.Exponential)+"+"+m)}else a=Vc(e,_i.Infinity);return a=t<0&&!l?n.negPre+a+n.negSuf:n.posPre+a+n.posSuf,a}(t,function iM(t,n="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(JCe),r=i[0],o=i[1],s=-1!==r.indexOf(Nw)?r.split(Nw):[r.substring(0,r.lastIndexOf(cy)+1),r.substring(r.lastIndexOf(cy)+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf(tM));for(let u=0;u{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();const f7="browser";function p7(t){return t===f7}let j2e=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>new R2e(gt(co),window)}),t})();class R2e{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function L2e(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=m7(this.window.history)||m7(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function m7(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class g7{}class dSe extends bCe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class hM extends dSe{static makeCurrent(){!function _Ce(t){WA||(WA=t)}(new hM)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function hSe(){return dy=dy||document.querySelector("base"),dy?dy.getAttribute("href"):null}();return null==e?null:function fSe(t){Rw=Rw||document.createElement("a"),Rw.setAttribute("href",t);const n=Rw.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){dy=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return n7(document.cookie,n)}}let Rw,dy=null;const x7=new Vn("TRANSITION_ID"),mSe=[{provide:yw,useFactory:function pSe(t,n,e){return()=>{e.get(_w).donePromise.then(()=>{const i=Lh(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const Lw=new Vn("EventManagerPlugins");let $w=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),hy=(()=>{class t extends C7{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const fM={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},pM=/%COMP%/g,D7=new Vn("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function T7(t,n){return n.flat(100).map(e=>e.replace(pM,t))}function E7(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let Bw=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new mM(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof O7?r.applyToHost(e):r instanceof gM&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case bu.Emulated:o=new O7(s,a,i,this.appId,l);break;case bu.ShadowDom:return new SSe(s,a,e,i);default:o=new gM(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(gt($w),gt(hy),gt(oy),gt(D7))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class mM{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(fM[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(M7(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(M7(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=fM[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=fM[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Nl.DashCase|Nl.Important)?n.style.setProperty(e,i,r&Nl.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Nl.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,E7(i)):this.eventManager.addEventListener(n,e,E7(i))}}function M7(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class SSe extends mM{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=T7(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class gM extends mM{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=T7(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class O7 extends gM{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function xSe(t){return"_ngcontent-%COMP%".replace(pM,t)}(s),this.hostAttr=function wSe(t){return"_nghost-%COMP%".replace(pM,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let kSe=(()=>{class t extends w7{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const I7=["alt","control","meta","shift"],DSe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},TSe={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let ESe=(()=>{class t extends w7{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Lh().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),I7.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=DSe[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),I7.forEach(s=>{s!==r&&(0,TSe[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const F7=[{provide:sy,useValue:f7},{provide:uB,useValue:function ASe(){hM.makeCurrent()},multi:!0},{provide:co,useFactory:function OSe(){return function D1e(t){SE=t}(document),document},deps:[]}],ISe=wB(gCe,"browser",F7),P7=new Vn(""),j7=[{provide:bw,useClass:class gSe{addToWindow(n){Po.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},Po.getAllAngularTestabilities=()=>n.getAllTestabilities(),Po.getAllAngularRootElements=()=>n.getAllRootElements(),Po.frameworkStabilizers||(Po.frameworkStabilizers=[]),Po.frameworkStabilizers.push(i=>{const r=Po.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?Lh().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:vB,useClass:jA,deps:[nr,RA,bw]},{provide:jA,useClass:jA,deps:[nr,RA,bw]}],R7=[{provide:IE,useValue:"root"},{provide:qg,useFactory:function MSe(){return new qg},deps:[]},{provide:Lw,useClass:kSe,multi:!0,deps:[co,nr,sy]},{provide:Lw,useClass:ESe,multi:!0,deps:[co]},{provide:Bw,useClass:Bw,deps:[$w,hy,oy,D7]},{provide:Wg,useExisting:Bw},{provide:C7,useExisting:hy},{provide:hy,useClass:hy,deps:[co]},{provide:$w,useClass:$w,deps:[Lw,nr]},{provide:g7,useClass:vSe,deps:[]},[]];let yM=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:oy,useValue:e.appId},{provide:x7,useExisting:oy},mSe]}}}return t.\u0275fac=function(e){return new(e||t)(gt(P7,12))},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[...R7,...j7],imports:[Mf,vCe]}),t})(),L7=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function FSe(){return new L7(gt(co))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let V7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new(e||t):gt(H7),i},providedIn:"root"}),t})(),H7=(()=>{class t extends V7{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case bo.NONE:return i;case bo.HTML:return Od(i,"HTML")?rc(i):Q5(this._doc,String(i)).toString();case bo.STYLE:return Od(i,"Style")?rc(i):i;case bo.SCRIPT:if(Od(i,"Script"))return rc(i);throw new Error("unsafe value used in a script context");case bo.URL:return Od(i,"URL")?rc(i):Wx(String(i));case bo.RESOURCE_URL:if(Od(i,"ResourceURL"))return rc(i);throw new Error(`unsafe value used in a resource URL context (see ${fx})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${fx})`)}}bypassSecurityTrustHtml(e){return function N1e(t){return new T1e(t)}(e)}bypassSecurityTrustStyle(e){return function F1e(t){return new E1e(t)}(e)}bypassSecurityTrustScript(e){return function P1e(t){return new A1e(t)}(e)}bypassSecurityTrustUrl(e){return function j1e(t){return new M1e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function R1e(t){return new O1e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function $Se(t){return new H7(t.get(co))}(gt(ua)),i},providedIn:"root"}),t})();class U7{}class BSe{}const Vh="*";function tl(t,n){return{type:7,name:t,definitions:n,options:{}}}function Aa(t,n=null){return{type:4,styles:n,timings:t}}function z7(t,n=null){return{type:2,steps:t,options:n}}function kr(t){return{type:6,styles:t,offset:null}}function Ma(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function G7(t){Promise.resolve().then(t)}class fy{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){G7(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class W7{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?G7(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const bM="!";function q7(t){return new Nt(3e3,!1)}function xke(){return typeof window<"u"&&typeof window.document<"u"}function xM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function If(t){switch(t.length){case 0:return new fy;case 1:return t[0];default:return new W7(t)}}function Y7(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,v=p;if("offset"!==m)switch(g=n.normalizePropertyName(g,s),v){case bM:v=r.get(m);break;case Vh:v=o.get(m);break;default:v=n.normalizeStyleValue(m,g,v,s)}f.set(g,v)}),h||a.push(f),c=f,l=d}),s.length)throw function cke(t){return new Nt(3502,!1)}();return a}function wM(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&CM(e,"start",t)));break;case"done":t.onDone(()=>i(e&&CM(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&CM(e,"destroy",t)))}}function CM(t,n,e){const o=SM(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function SM(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function cc(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function X7(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let kM=(t,n)=>!1,J7=(t,n,e)=>[],K7=null;function DM(t){const n=t.parentNode||t.host;return n===K7?null:n}(xM()||typeof Element<"u")&&(xke()?(K7=(()=>document.documentElement)(),kM=(t,n)=>{for(;n;){if(n===t)return!0;n=DM(n)}return!1}):kM=(t,n)=>t.contains(n),J7=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let im=null,Q7=!1;const Z7=kM,e9=J7;let t9=(()=>{class t{validateStyleProperty(e){return function Cke(t){im||(im=function Ske(){return typeof document<"u"?document.body:null}()||{},Q7=!!im.style&&"WebkitAppearance"in im.style);let n=!0;return im.style&&!function wke(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in im.style,!n&&Q7&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in im.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return Z7(e,i)}getParentElement(e){return DM(e)}query(e,i,r){return e9(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new fy(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),TM=(()=>{class t{}return t.NOOP=new t9,t})();const kke=1e3,EM="ng-enter",Vw="ng-leave",Hw="ng-trigger",Uw=".ng-trigger",i9="ng-animating",AM=".ng-animating";function Hh(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:MM(parseFloat(n[1]),n[2])}function MM(t,n){return"s"===n?t*kke:t}function zw(t,n,e){return t.hasOwnProperty("duration")?t:function Tke(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(q7()),{duration:0,delay:0,easing:""};r=MM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=MM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function VSe(){return new Nt(3100,!1)}()),a=!0),o<0&&(n.push(function HSe(){return new Nt(3101,!1)}()),a=!0),a&&n.splice(l,0,q7())}return{duration:r,delay:o,easing:s}}(t,n,e)}function py(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function r9(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Nf(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function s9(t,n,e){return e?n+":"+e+";":""}function a9(t){let n="";for(let e=0;e{const o=IM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),xM()&&a9(t))}function rm(t,n){t.style&&(n.forEach((e,i)=>{const r=IM(i);t.style[r]=""}),xM()&&a9(t))}function my(t){return Array.isArray(t)?1==t.length?t[0]:z7(t):t}const OM=new RegExp("{{\\s*(.+?)\\s*}}","g");function l9(t){let n=[];if("string"==typeof t){let e;for(;e=OM.exec(t);)n.push(e[1]);OM.lastIndex=0}return n}function gy(t,n,e){const i=t.toString(),r=i.replace(OM,(o,s)=>{let a=n[s];return null==a&&(e.push(function zSe(t){return new Nt(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function Gw(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const Mke=/-+([a-z0-9])/g;function IM(t){return t.replace(Mke,(...n)=>n[1].toUpperCase())}function Oke(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function uc(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function GSe(t){return new Nt(3004,!1)}()}}function c9(t,n){return window.getComputedStyle(t)[n]}const Yw="*";function Rke(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function Lke(t,n,e){if(":"==t[0]){const l=function $ke(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function rke(t){return new Nt(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(u9(r,s));"<"==o[0]&&!(r==Yw&&s==Yw)&&n.push(u9(s,r))}(i,e,n)):e.push(t),e}const Xw=new Set(["true","1"]),Jw=new Set(["false","0"]);function u9(t,n){const e=Xw.has(t)||Jw.has(t),i=Xw.has(n)||Jw.has(n);return(r,o)=>{let s=t==Yw||t==r,a=n==Yw||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Xw.has(t):Jw.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Xw.has(n):Jw.has(n)),s&&a}}const Bke=new RegExp("s*:selfs*,?","g");function NM(t,n,e,i){return new Vke(t).build(n,e,i)}class Vke{constructor(n){this._driver=n}build(n,e,i){const r=new zke(e);return this._resetContextStyleTimingState(r),uc(this,my(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function qSe(){return new Nt(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function YSe(){return new Nt(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{l9(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(Gw(o.values()),e.errors.push(function XSe(t,n){return new Nt(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=uc(this,my(n.animation),e);return{type:1,matchers:Rke(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:om(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>uc(this,i,e)),options:om(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=uc(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:om(n.options)}}visitAnimate(n,e){const i=function Wke(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return FM(zw(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=FM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=zw(e,n);return FM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:kr({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=kr(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===Vh?i.push(a):e.errors.push(new Nt(3002,!1)):i.push(r9(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function KSe(t,n,e,i,r){return new Nt(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function Ake(t,n,e){const i=n.params||{},r=l9(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function USe(t){return new Nt(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function QSe(){return new Nt(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let b=null!=y.offset?y.offset:function Gke(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=b&&(o++,C=y.offset=b),l=l||C<0||C>1,a=a||C0&&o{const b=h>0?y==f?1:h*y:s[y],C=b*g;e.currentTime=p+m.delay+C,m.duration=C,this._validateStyleAst(v,e),v.offset=b,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:uc(this,my(n.animation),e),options:om(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:om(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:om(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function Hke(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(Bke,"")),t=t.replace(/@\*/g,Uw).replace(/@\w+/g,e=>Uw+"-"+e.slice(1)).replace(/:animating/g,AM),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,cc(e.collectedStyles,e.currentQuerySelector,new Map);const a=uc(this,my(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:om(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function nke(){return new Nt(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:zw(n.timings,e.errors,!0);return{type:12,animation:uc(this,my(n.animation),e),timings:i,options:null}}}class zke{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function om(t){return t?(t=py(t)).params&&(t.params=function Uke(t){return t?py(t):null}(t.params)):t={},t}function FM(t,n,e){return{duration:t,delay:n,easing:e}}function PM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Kw{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const Xke=new RegExp(":enter","g"),Kke=new RegExp(":leave","g");function jM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new Qke).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class Qke{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Kw;const d=new RM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Hh(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),uc(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[PM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Hh(gy(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Hh(i.duration):null,a=null!=i.delay?Hh(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),uc(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Qw);const s=Hh(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>uc(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Hh(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),uc(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return zw(e.params?gy(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Hh(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Qw);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),uc(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;uc(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Qw={};class RM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Qw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Zw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Hh(i.duration)),null!=i.delay&&(r.delay=Hh(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=gy(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new RM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Qw,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new Zke(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(Xke,"."+this._enterClassName)).replace(Kke,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function ike(t){return new Nt(3014,!1)}()),a}}class Zw{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Zw(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Vh),this._currentKeyframe.set(e,Vh);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function eDe(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,Vh)}else Nf(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=gy(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Vh),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Nf(a,new Map,this._backFill);c.forEach((u,d)=>{u===bM?n.add(d):u===Vh&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?Gw(n.values()):[],s=e.size?Gw(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return PM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class Zke extends Zw{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Nf(n[0]);l.set("offset",0),o.push(l);const c=Nf(n[0]);c.set("offset",f9(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Nf(n[d]);const f=h.get("offset");h.set("offset",f9((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return PM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function f9(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class LM{}const tDe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class nDe extends LM{normalizePropertyName(n,e){return IM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(tDe.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function WSe(t,n){return new Nt(3005,!1)}())}return s+o}}function p9(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const $M={};class m9{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function iDe(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||$M,p=this.buildStyles(i,a&&a.params||$M,d),m=l&&l.params||$M,g=this.buildStyles(r,m,d),v=new Set,y=new Map,b=new Map,C="void"===r,k={params:rDe(m,h),delay:this.ast.options?.delay},D=u?[]:jM(n,e,this.ast.animation,o,s,p,g,k,c,d);let L=0;if(D.forEach(R=>{L=Math.max(R.duration+R.delay,L)}),d.length)return p9(e,this._triggerName,i,r,C,p,g,[],[],y,b,L,d);D.forEach(R=>{const U=R.element,G=cc(y,U,new Set);R.preStyleProps.forEach(te=>G.add(te));const X=cc(b,U,new Set);R.postStyleProps.forEach(te=>X.add(te)),U!==e&&v.add(U)});const z=Gw(v.values());return p9(e,this._triggerName,i,r,C,p,g,D,z,y,b,L)}}function rDe(t,n){const e=py(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class oDe{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=py(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=gy(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class aDe{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new oDe(r.style,r.options&&r.options.params||{},i))}),g9(this.states,"true","1"),g9(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new m9(n,r,this.states))}),this.fallbackTransition=function lDe(t,n,e){return new m9(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function g9(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const cDe=new Kw;class uDe{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=NM(this._driver,e,i,r);if(i.length)throw function uke(t){return new Nt(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=Y7(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=jM(this._driver,e,o,EM,Vw,new Map,new Map,i,cDe,r),s.forEach(u=>{const d=cc(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function dke(){return new Nt(3300,!1)}()),s=[]),r.length)throw function hke(t){return new Nt(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,Vh))})});const c=If(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function fke(t){return new Nt(3301,!1)}();return e}listen(n,e,i,r){const o=SM(e,"","","");return wM(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const v9="ng-animate-queued",BM="ng-animate-disabled",mDe=[],y9={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},gDe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Uc="__ng_removed";class VM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function bDe(t){return t??null}(i?n.value:n),i){const o=py(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const vy="void",HM=new VM(vy);class vDe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,zc(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function pke(t,n){return new Nt(3302,!1)}();if(null==i||0==i.length)throw function mke(t){return new Nt(3303,!1)}();if(!function xDe(t){return"start"==t||"done"==t}(i))throw function gke(t,n){return new Nt(3400,!1)}();const o=cc(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=cc(this._engine.statesByElement,n,new Map);return a.has(e)||(zc(n,Hw),zc(n,Hw+"-"+e),a.set(e,HM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function vke(t){return new Nt(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new UM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(zc(n,Hw),zc(n,Hw+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new VM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=HM),c.value!==vy&&l.value===c.value){if(!function SDe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{rm(n,g),Rd(n,v)})}return}const h=cc(this._engine.playersByElement,n,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(zc(n,v9),s.onStart(()=>{pv(n,v9)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(n);if(g){let v=g.indexOf(s);v>=0&&g.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,Uw,!0);i.forEach(r=>{if(r[Uc])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,vy,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&If(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||HM,u=new VM(vy),d=new UM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[Uc];(!o||o===y9)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){zc(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=SM(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,wM(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class yDe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new vDe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(eC(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!eC(e))return;const o=e[Uc];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),zc(n,BM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),pv(n,BM))}removeNode(n,e,i,r){if(eC(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[Uc]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return eC(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,Uw,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,AM,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return If(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[Uc];if(e&&e.setForRemoval){if(n[Uc]=y9,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(BM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?If(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function yke(t){return new Nt(3402,!1)}()}_flushAnimations(n,e){const i=new Kw,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(J=>{u.add(J);const H=this.driver.query(J,".ng-animate-queued",!0);for(let le=0;le{const le=EM+m++;p.set(H,le),J.forEach(E=>zc(E,le))});const g=[],v=new Set,y=new Set;for(let J=0;Jv.add(E)):y.add(H))}const b=new Map,C=x9(h,Array.from(v));C.forEach((J,H)=>{const le=Vw+m++;b.set(H,le),J.forEach(E=>zc(E,le))}),n.push(()=>{f.forEach((J,H)=>{const le=p.get(H);J.forEach(E=>pv(E,le))}),C.forEach((J,H)=>{const le=b.get(H);J.forEach(E=>pv(E,le))}),g.forEach(J=>{this.processLeaveNode(J)})});const k=[],D=[];for(let J=this._namespaceList.length-1;J>=0;J--)this._namespaceList[J].drainQueuedTransitions(e).forEach(le=>{const E=le.player,I=le.element;if(k.push(E),this.collectedEnterElements.length){const _e=I[Uc];if(_e&&_e.setForMove){if(_e.previousTriggersValues&&_e.previousTriggersValues.has(le.triggerName)){const Xe=_e.previousTriggersValues.get(le.triggerName),Le=this.statesByElement.get(le.element);if(Le&&Le.has(le.triggerName)){const rt=Le.get(le.triggerName);rt.value=Xe,Le.set(le.triggerName,rt)}}return void E.destroy()}}const N=!d||!this.driver.containsElement(d,I),q=b.get(I),V=p.get(I),re=this._buildInstruction(le,i,V,q,N);if(re.errors&&re.errors.length)return void D.push(re);if(N)return E.onStart(()=>rm(I,re.fromStyles)),E.onDestroy(()=>Rd(I,re.toStyles)),void r.push(E);if(le.isFallbackTransition)return E.onStart(()=>rm(I,re.fromStyles)),E.onDestroy(()=>Rd(I,re.toStyles)),void r.push(E);const he=[];re.timelines.forEach(_e=>{_e.stretchStartingKeyframe=!0,this.disabledNodes.has(_e.element)||he.push(_e)}),re.timelines=he,i.append(I,re.timelines),s.push({instruction:re,player:E,element:I}),re.queriedElements.forEach(_e=>cc(a,_e,[]).push(E)),re.preStyleProps.forEach((_e,Xe)=>{if(_e.size){let Le=l.get(Xe);Le||l.set(Xe,Le=new Set),_e.forEach((rt,B)=>Le.add(B))}}),re.postStyleProps.forEach((_e,Xe)=>{let Le=c.get(Xe);Le||c.set(Xe,Le=new Set),_e.forEach((rt,B)=>Le.add(B))})});if(D.length){const J=[];D.forEach(H=>{J.push(function _ke(t,n){return new Nt(3505,!1)}())}),k.forEach(H=>H.destroy()),this.reportError(J)}const L=new Map,z=new Map;s.forEach(J=>{const H=J.element;i.has(H)&&(z.set(H,H),this._beforeAnimationBuild(J.player.namespaceId,J.instruction,L))}),r.forEach(J=>{const H=J.element;this._getPreviousPlayers(H,!1,J.namespaceId,J.triggerName,null).forEach(E=>{cc(L,H,[]).push(E),E.destroy()})});const R=g.filter(J=>C9(J,l,c)),U=new Map;b9(U,this.driver,y,c,Vh).forEach(J=>{C9(J,l,c)&&R.push(J)});const X=new Map;f.forEach((J,H)=>{b9(X,this.driver,new Set(J),l,bM)}),R.forEach(J=>{const H=U.get(J),le=X.get(J);U.set(J,new Map([...Array.from(H?.entries()??[]),...Array.from(le?.entries()??[])]))});const te=[],P=[],W={};s.forEach(J=>{const{element:H,player:le,instruction:E}=J;if(i.has(H)){if(u.has(H))return le.onDestroy(()=>Rd(H,E.toStyles)),le.disabled=!0,le.overrideTotalTime(E.totalTime),void r.push(le);let I=W;if(z.size>1){let q=H;const V=[];for(;q=q.parentNode;){const re=z.get(q);if(re){I=re;break}V.push(q)}V.forEach(re=>z.set(re,I))}const N=this._buildAnimation(le.namespaceId,E,L,o,X,U);if(le.setRealPlayer(N),I===W)te.push(le);else{const q=this.playersByElement.get(I);q&&q.length&&(le.parentPlayer=If(q)),r.push(le)}}else rm(H,E.fromStyles),le.onDestroy(()=>Rd(H,E.toStyles)),P.push(le),u.has(H)&&r.push(le)}),P.forEach(J=>{const H=o.get(J.element);if(H&&H.length){const le=If(H);J.setRealPlayer(le)}}),r.forEach(J=>{J.parentPlayer?J.syncPlayerEvents(J.parentPlayer):J.destroy()});for(let J=0;J!N.destroyed);I.length?wDe(this,H,I):this.processLeaveNode(H)}return g.length=0,te.forEach(J=>{this.players.push(J),J.onDone(()=>{J.destroy();const H=this.players.indexOf(J);this.players.splice(H,1)}),J.play()}),te}elementContainsData(n,e){let i=!1;const r=e[Uc];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==vy;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=cc(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}rm(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[Uc];if(g&&g.removedBeforeQueried)return new fy(p.duration,p.delay);const v=m!==l,y=function CDe(t){const n=[];return w9(t,n),n}((i.get(m)||mDe).map(L=>L.getRealPlayer())).filter(L=>!!L.element&&L.element===m),b=o.get(m),C=s.get(m),k=Y7(0,this._normalizer,0,p.keyframes,b,C),D=this._buildPlayer(p,k,y);if(p.subTimeline&&r&&d.add(m),v){const L=new UM(n,a,m);L.setRealPlayer(D),c.push(L)}return D});c.forEach(p=>{cc(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function _De(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>zc(p,i9));const f=If(h);return f.onDestroy(()=>{u.forEach(p=>pv(p,i9)),Rd(l,e.toStyles)}),d.forEach(p=>{cc(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new fy(n.duration,n.delay)}}class UM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new fy,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>wM(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){cc(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function eC(t){return t&&1===t.nodeType}function _9(t,n){const e=t.style.display;return t.style.display=n??"none",e}function b9(t,n,e,i,r){const o=[];e.forEach(l=>o.push(_9(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Uc]=gDe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>_9(l,o[a++])),s}function x9(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function zc(t,n){t.classList?.add(n)}function pv(t,n){t.classList?.remove(n)}function wDe(t,n,e){If(e).onDone(()=>t.processLeaveNode(n))}function w9(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class tC{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new yDe(n,e,i),this._timelineEngine=new uDe(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=NM(this._driver,o,l,c);if(l.length)throw function lke(t,n){return new Nt(3404,!1)}();a=function sDe(t,n,e){return new aDe(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=X7(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=X7(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let DDe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Rd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rd(this._element,this._initialStyles),this._endStyles&&(Rd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(rm(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(rm(this._element,this._endStyles),this._endStyles=null),Rd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function zM(t){let n=null;return t.forEach((e,i)=>{(function TDe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class S9{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:c9(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class EDe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return Z7(n,e)}getParentElement(n){return DM(n)}query(n,e,i){return e9(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof S9);(function Ike(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function Eke(t){return t.length?t[0]instanceof Map?t:t.map(n=>r9(n)):[]}(e).map(f=>Nf(f));d=function Nke(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,c9(t,a)))}}return n}(n,d,c);const h=function kDe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=zM(n[0]),n.length>1&&(i=zM(n[n.length-1]))):n instanceof Map&&(e=zM(n)),e||i?new DDe(t,e,i):null}(n,d);return new S9(n,d,l,h)}}let ADe=(()=>{class t extends U7{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:bu.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?z7(e):e;return k9(this._renderer,null,i,"register",[r]),new MDe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(gt(Wg),gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class MDe extends BSe{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new ODe(this._id,n,e||{},this._renderer)}}class ODe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return k9(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function k9(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const D9="@.disabled";let IDe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new T9("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new NDe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(gt(Wg),gt(tC),gt(nr))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class T9{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==D9?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class NDe extends T9{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==D9?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function FDe(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function PDe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let jDe=(()=>{class t extends tC{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(gt(co),gt(TM),gt(LM),gt(Rh))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const E9=[{provide:U7,useClass:ADe},{provide:LM,useFactory:function RDe(){return new nDe}},{provide:tC,useClass:jDe},{provide:Wg,useFactory:function LDe(t,n,e){return new IDe(t,n,e)},deps:[Bw,tC,nr]}],GM=[{provide:TM,useFactory:()=>new EDe},{provide:dB,useValue:"BrowserAnimations"},...E9],WM=[{provide:TM,useClass:t9},{provide:dB,useValue:"NoopAnimations"},...E9];let $De=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?WM:GM}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:GM,imports:[yM]}),t})(),BDe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:WM,imports:[yM]}),t})();function Rn(...t){let n=t[t.length-1];return Ca(n)?(t.pop(),Fc(t,n)):ot(t)}class Js extends dr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ur;return this._value}next(n){super.next(this._value=n)}}const iC=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class qM extends F{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class VDe extends F{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function YM(t,n,e,i,r=new VDe(t,e,i)){if(!r.closed)return n instanceof en?n.subscribe(r):Ql(n)(r)}const A9={};function rC(...t){let n,e;return Ca(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Ze(t[0])&&(t=t[0]),ot(t,e).lift(new HDe(n))}class HDe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new UDe(n,this.resultSelector))}}class UDe extends qM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(A9),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function sC(t){return t?function GDe(t){return new en(n=>t.schedule(()=>n.complete()))}(t):Uh}function M9(t){return new en(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?ro(e):sC()).subscribe(n)})}function sm(t,n){return new en(n?e=>n.schedule(WDe,0,{error:t,subscriber:e}):e=>e.error(t))}function WDe({error:t,subscriber:n}){n.error(t)}function dc(t,n){return"function"==typeof n?e=>e.pipe(dc((i,r)=>ro(t(i,r)).pipe(_n((o,s)=>n(i,o,r,s))))):e=>e.lift(new qDe(t))}class qDe{constructor(n){this.project=n}call(n,e){return e.subscribe(new YDe(n,this.project))}}class YDe extends Y{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new Ml(this),r=this.destination;r.add(i),this.innerSubscription=Ne(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const O9=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function Ks(t){return n=>0===t?sC():n.lift(new XDe(t))}class XDe{constructor(n){if(this.total=n,this.total<0)throw new O9}call(n,e){return e.subscribe(new JDe(n,this.total))}}class JDe extends F{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function aC(...t){const n=t[t.length-1];return Ca(n)?(t.pop(),e=>oC(t,e,n)):e=>oC(t,e)}function us(t,n){return function(i){return i.lift(new KDe(t,n))}}class KDe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new QDe(n,this.predicate,this.thisArg))}}class QDe extends F{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function lC(t=null){return n=>n.lift(new ZDe(t))}class ZDe{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new eTe(n,this.defaultValue))}}class eTe extends F{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function I9(t=iTe){return n=>n.lift(new tTe(t))}class tTe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new nTe(n,this.errorFactory))}}class nTe extends F{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function iTe(){return new iC}function Ff(t,n){const e=arguments.length>=2;return i=>i.pipe(t?us((r,o)=>t(r,o,i)):Ft,Ks(1),e?lC(n):I9(()=>new iC))}function Pf(t,n){return et(t,n,1)}function zh(){}function xs(t,n,e){return function(r){return r.lift(new rTe(t,n,e))}}class rTe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new oTe(n,this.nextOrObserver,this.error,this.complete))}}class oTe extends F{constructor(n,e,i,r){super(n),this._tapNext=zh,this._tapError=zh,this._tapComplete=zh,this._tapError=i||zh,this._tapComplete=r||zh,nt(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||zh,this._tapError=e.error||zh,this._tapComplete=e.complete||zh)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Ll(t){return function(e){const i=new sTe(t),r=e.lift(i);return i.caught=r}}class sTe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new aTe(n,this.selector,this.caught))}}class aTe extends Y{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new Ml(this);this.add(i);const r=Ne(e,i);r!==i&&this.add(r)}}}function N9(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new lTe(t,n,e))}}class lTe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new cTe(n,this.accumulator,this.seed,this.hasSeed))}}class cTe extends F{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function XM(t){return function(e){return 0===t?sC():e.lift(new uTe(t))}}class uTe{constructor(n){if(this.total=n,this.total<0)throw new O9}call(n,e){return e.subscribe(new dTe(n,this.total))}}class dTe extends F{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?us((r,o)=>t(r,o,i)):Ft,XM(1),e?lC(n):I9(()=>new iC))}class fTe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new pTe(n,this.predicate,this.inclusive))}}class pTe extends F{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class gTe{constructor(n){this.value=n}call(n,e){return e.subscribe(new vTe(n,this.value))}}class vTe extends F{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function JM(t){return n=>n.lift(new yTe(t))}class yTe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new _Te(n,this.callback))}}class _Te extends F{constructor(n,e){super(n),this.add(new ce(e))}}const zi="primary",yy=Symbol("RouteTitle");class bTe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function mv(t){return new bTe(t)}function xTe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function j9(t){return Array.prototype.concat.apply([],t)}function R9(t){return t.length>0?t[t.length-1]:null}function Oa(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function jf(t){return rA(t)?t:q1(t)?ro(Promise.resolve(t)):Rn(t)}const cC=!1,CTe={exact:function B9(t,n,e){if(!am(t.segments,n.segments)||!uC(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!B9(t.children[i],n.children[i],e))return!1;return!0},subset:V9},L9={exact:function STe(t,n){return Ld(t,n)},subset:function kTe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>P9(t[e],n[e]))},ignored:()=>!0};function $9(t,n,e){return CTe[e.paths](t.root,n.root,e.matrixParams)&&L9[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function V9(t,n,e){return H9(t,n,n.segments,e)}function H9(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!am(r,e)||n.hasChildren()||!uC(r,e,i))}if(t.segments.length===e.length){if(!am(t.segments,e)||!uC(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!V9(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(am(t.segments,r)&&uC(t.segments,r,i)&&t.children[zi])&&H9(t.children[zi],n,o,i)}}function uC(t,n,e){return n.every((i,r)=>L9[e](t[r].parameters,i.parameters))}class Rf{constructor(n=new ar([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=mv(this.queryParams)),this._queryParamMap}toString(){return ETe.serialize(this)}}class ar{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Oa(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return dC(this)}}class _y{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mv(this.parameters)),this._parameterMap}toString(){return G9(this)}}function am(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let by=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return new KM},providedIn:"root"}),t})();class KM{parse(n){const e=new RTe(n);return new Rf(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${xy(n.root,!0)}`,i=function OTe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${hC(e)}=${hC(r)}`).join("&"):`${hC(e)}=${hC(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function ATe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const ETe=new KM;function dC(t){return t.segments.map(n=>G9(n)).join("/")}function xy(t,n){if(!t.hasChildren())return dC(t);if(n){const e=t.children[zi]?xy(t.children[zi],!1):"",i=[];return Oa(t.children,(r,o)=>{o!==zi&&i.push(`${o}:${xy(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function TTe(t,n){let e=[];return Oa(t.children,(i,r)=>{r===zi&&(e=e.concat(n(i,r)))}),Oa(t.children,(i,r)=>{r!==zi&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===zi?[xy(t.children[zi],!1)]:[`${r}:${xy(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[zi]?`${dC(t)}/${e[0]}`:`${dC(t)}/(${e.join("//")})`}}function U9(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hC(t){return U9(t).replace(/%3B/gi,";")}function QM(t){return U9(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fC(t){return decodeURIComponent(t)}function z9(t){return fC(t.replace(/\+/g,"%20"))}function G9(t){return`${QM(t.path)}${function MTe(t){return Object.keys(t).map(n=>`;${QM(n)}=${QM(t[n])}`).join("")}(t.parameters)}`}const ITe=/^[^\/()?;=#]+/;function pC(t){const n=t.match(ITe);return n?n[0]:""}const NTe=/^[^=?&#]+/,PTe=/^[^&#]+/;class RTe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new ar([],{}):new ar([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[zi]=new ar(n,e)),i}parseSegment(){const n=pC(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Nt(4009,cC);return this.capture(n),new _y(fC(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=pC(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=pC(this.remaining);r&&(i=r,this.capture(i))}n[fC(e)]=fC(i)}parseQueryParam(n){const e=function FTe(t){const n=t.match(NTe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function jTe(t){const n=t.match(PTe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=z9(e),o=z9(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=pC(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Nt(4010,cC);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=zi);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[zi]:new ar([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Nt(4011,cC)}}function ZM(t){return t.segments.length>0?new ar([],{[zi]:t}):t}function mC(t){const n={};for(const i of Object.keys(t.children)){const o=mC(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function LTe(t){if(1===t.numberOfChildren&&t.children[zi]){const n=t.children[zi];return new ar(t.segments.concat(n.segments),n.children)}return t}(new ar(t.segments,n))}function lm(t){return t instanceof Rf}const e3=!1;function $Te(t,n,e,i,r){if(0===e.length)return gv(n.root,n.root,n.root,i,r);const o=function J9(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new X9(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Oa(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new X9(e,n,i)}(e);return o.toRoot()?gv(n.root,n.root,new ar([],{}),i,r):function s(l){const c=function VTe(t,n,e,i){if(t.isAbsolute)return new vv(n.root,!0,0);if(-1===i)return new vv(e,e===n.root,0);return function K9(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Nt(4005,e3&&"Invalid number of '../'");r=i.segments.length}return new vv(i,!1,r-o)}(e,i+(wy(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?yv(c.segmentGroup,c.index,o.commands):t3(c.segmentGroup,c.index,o.commands);return gv(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function wy(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Cy(t){return"object"==typeof t&&null!=t&&t.outlets}function gv(t,n,e,i,r){let s,o={};i&&Oa(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:Y9(t,n,e);const a=ZM(mC(s));return new Rf(a,o,r)}function Y9(t,n,e){const i={};return Oa(t.children,(r,o)=>{i[o]=r===n?e:Y9(r,n,e)}),new ar(t.segments,i)}class X9{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&wy(i[0]))throw new Nt(4003,e3&&"Root segment cannot have matrix parameters");const r=i.find(Cy);if(r&&r!==R9(i))throw new Nt(4004,e3&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class vv{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function t3(t,n,e){if(t||(t=new ar([],{})),0===t.segments.length&&t.hasChildren())return yv(t,n,e);const i=function UTe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(Cy(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!Z9(l,c,s))return o;i+=2}else{if(!Z9(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=t3(t.children[s],n,o))}),Oa(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new ar(t.segments,r)}}function n3(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=n3(new ar([],{}),0,e))}),n}function Q9(t){const n={};return Oa(t,(e,i)=>n[i]=`${e}`),n}function Z9(t,n,e){return t==e.path&&Ld(n,e.parameters)}const Sy="imperative";class $d{constructor(n,e){this.id=n,this.url=e}}class gC extends $d{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Gh extends $d{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class ky extends $d{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class vC extends $d{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class yC extends $d{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class GTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class WTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class qTe extends $d{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class YTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class XTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class JTe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class KTe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class QTe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ZTe{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class eEe{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class tEe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class eV{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let rEe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return $Te(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),sEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(n){return rEe.\u0275fac(n)},providedIn:"root"}),t})();class tV{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=r3(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=r3(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=o3(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return o3(n,this._root).map(e=>e.value)}}function r3(t,n){if(t===n.value)return n;for(const e of n.children){const i=r3(t,e);if(i)return i}return null}function o3(t,n){if(t===n.value)return[n];for(const e of n.children){const i=o3(t,e);if(i.length)return i.unshift(n),i}return[]}class Wh{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function _v(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class nV extends tV{constructor(n,e){super(n),this.snapshot=e,s3(this,n)}toString(){return this.snapshot.toString()}}function iV(t,n){const e=function aEe(t,n){const s=new _C([],{},{},"",{},zi,n,null,t.root,-1,{});return new oV("",new Wh(s,[]))}(t,n),i=new Js([new _y("",{})]),r=new Js({}),o=new Js({}),s=new Js({}),a=new Js(""),l=new Pr(i,r,s,a,o,zi,n,e.root);return l.snapshot=e.root,new nV(new Wh(l,[]),e)}class Pr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(_n(c=>c[yy]))??Rn(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(_n(n=>mv(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(_n(n=>mv(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function rV(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function lEe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class _C{get title(){return this.data?.[yy]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=mv(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=mv(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class oV extends tV{constructor(n,e){super(e),this.url=n,s3(this,e)}toString(){return sV(this._root)}}function s3(t,n){n.value._routerState=t,n.children.forEach(e=>s3(t,e))}function sV(t){const n=t.children.length>0?` { ${t.children.map(sV).join(", ")} } `:"";return`${t.value}${n}`}function a3(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,Ld(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),Ld(n.params,e.params)||t.params.next(e.params),function wTe(t,n){if(t.length!==n.length)return!1;for(let e=0;eLd(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||l3(t.parent,n.parent))}function Dy(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function uEe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return Dy(t,i,r);return Dy(t,i)})}(t,n,e);return new Wh(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Dy(t,a)),s}}const i=function dEe(t){return new Pr(new Js(t.url),new Js(t.params),new Js(t.queryParams),new Js(t.fragment),new Js(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>Dy(t,o));return new Wh(i,r)}}const c3="ngNavigationCancelingError";function aV(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=lm(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=lV(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function lV(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[c3]=!0,i.cancellationCode=n,e&&(i.url=e),i}function cV(t){return uV(t)&&lm(t.url)}function uV(t){return t&&t[c3]}class hEe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Ty,this.attachRef=null}}let Ty=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new hEe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const bC=!1;let cm=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=zi,this.activateEvents=new it,this.deactivateEvents=new it,this.attachEvents=new it,this.detachEvents=new it,this.parentContexts=Fi(Ty),this.location=Fi(jl),this.changeDetector=Fi(Ns),this.environmentInjector=Fi($c)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Nt(4012,bC);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Nt(4012,bC);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Nt(4012,bC);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Nt(4013,bC);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new fEe(e,a,r.injector);if(i&&function pEe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Yn]}),t})();class fEe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Pr?this.route:n===Ty?this.childContexts:this.parent.get(n,e)}}let u3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ng-component"]],standalone:!0,features:[Is],decls:1,vars:0,template:function(e,i){1&e&&pe(0,"router-outlet")},dependencies:[cm],encapsulation:2}),t})();function dV(t,n){return t.providers&&!t._injector&&(t._injector=pw(t.providers,n,`Route: ${t.path}`)),t._injector??n}function h3(t){const n=t.children&&t.children.map(h3),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==zi&&(e.component=u3),e}function Gc(t){return t.outlet||zi}function hV(t,n){const e=t.filter(i=>Gc(i)===n);return e.push(...t.filter(i=>Gc(i)!==n)),e}function Ey(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class _Ee{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),a3(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=_v(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Oa(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=_v(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=_v(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=_v(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new tEe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new ZTe(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(a3(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),a3(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=Ey(r.snapshot),l=a?.get(zg)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class fV{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class xC{constructor(n,e){this.component=n,this.route=e}}function bEe(t,n,e){const i=t._root;return Ay(i,n?n._root:null,e,[i.value])}function bv(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function wve(t){return null!==gx(t)}(t)?n.get(t):t:i}function Ay(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=_v(n);return t.children.forEach(s=>{(function wEe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function CEe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!am(t.url,n.url);case"pathParamsOrQueryParamsChange":return!am(t.url,n.url)||!Ld(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!l3(t,n)||!Ld(t.queryParams,n.queryParams);default:return!l3(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new fV(i)):(o.data=s.data,o._resolvedData=s._resolvedData),Ay(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new xC(a.outlet.component,s))}else s&&My(n,a,r),r.canActivateChecks.push(new fV(i)),Ay(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Oa(o,(s,a)=>My(s,e.getContext(a),r)),r}function My(t,n,e){const i=_v(t),r=t.value;Oa(i,(o,s)=>{My(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new xC(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function Oy(t){return"function"==typeof t}function f3(t){return t instanceof iC||"EmptyError"===t?.name}const wC=Symbol("INITIAL_VALUE");function xv(){return dc(t=>rC(t.map(n=>n.pipe(Ks(1),aC(wC)))).pipe(_n(n=>{for(const e of n)if(!0!==e){if(e===wC)return wC;if(!1===e||e instanceof Rf)return e}return!0}),us(n=>n!==wC),Ks(1)))}function pV(t){return function Gt(...t){return yn(t)}(xs(n=>{if(lm(n))throw aV(0,n)}),_n(n=>!0===n))}const p3={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function mV(t,n,e,i,r){const o=m3(t,n,e);return o.matched?function BEe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?Rn(r.map(s=>{const a=bv(s,t);return jf(function AEe(t){return t&&Oy(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(xv(),pV()):Rn(!0)}(i=dV(n,i),n,e).pipe(_n(s=>!0===s?o:{...p3})):Rn(o)}function m3(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...p3}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||xTe)(e,t,n);if(!r)return{...p3};const o={};Oa(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function CC(t,n,e,i){if(e.length>0&&function UEe(t,n,e){return e.some(i=>SC(t,n,i)&&Gc(i)!==zi)}(t,e,i)){const o=new ar(n,function HEe(t,n,e,i){const r={};r[zi]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Gc(o)!==zi){const s=new ar([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Gc(o)]=s}return r}(t,n,i,new ar(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function zEe(t,n,e){return e.some(i=>SC(t,n,i))}(t,e,i)){const o=new ar(t.segments,function VEe(t,n,e,i,r){const o={};for(const s of i)if(SC(t,e,s)&&!r[Gc(s)]){const a=new ar([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[Gc(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new ar(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function SC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function gV(t,n,e,i){return!!(Gc(t)===i||i!==zi&&SC(n,e,t))&&("**"===t.path||m3(n,t,e).matched)}function vV(t,n,e){return 0===n.length&&!t.children[e]}const kC=!1;class DC{constructor(n){this.segmentGroup=n||null}}class yV{constructor(n){this.urlTree=n}}function Iy(t){return sm(new DC(t))}function _V(t){return sm(new yV(t))}function GEe(t){return sm(new Nt(4e3,kC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class YEe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=CC(this.urlTree.root,[],[],this.config).segmentGroup,e=new ar(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,zi).pipe(_n(o=>this.createUrlTree(mC(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ll(o=>{if(o instanceof yV)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof DC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,zi).pipe(_n(r=>this.createUrlTree(mC(r),n.queryParams,n.fragment))).pipe(Ll(r=>{throw r instanceof DC?this.noMatchError(r):r}))}noMatchError(n){return new Nt(4002,kC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=ZM(n);return new Rf(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(_n(o=>new ar([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return ro(r).pipe(Pf(o=>{const s=i.children[o],a=hV(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(_n(l=>({segment:l,outlet:o})))}),N9((o,s)=>(o[s.outlet]=s.segment,o),{}),F9())}expandSegment(n,e,i,r,o,s){return ro(i).pipe(Pf(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Ll(c=>{if(c instanceof DC)return Rn(null);throw c}))),Ff(a=>!!a),Ll((a,l)=>{if(f3(a))return vV(e,r,o)?Rn(new ar([],{})):Iy(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return gV(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):Iy(e):Iy(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?_V(o):this.lineralizeSegments(i,o).pipe(et(s=>{const a=new ar(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=m3(e,r,o);if(!a)return Iy(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?_V(d):this.lineralizeSegments(r,d).pipe(et(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=dV(i,n),i.loadChildren?(i._loadedRoutes?Rn({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(_n(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new ar(r,{})))):Rn(new ar(r,{}))):mV(e,i,r,n).pipe(dc(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(et(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=CC(e,a,l,h),m=new ar(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(_n(b=>new ar(a,b)));if(0===h.length&&0===p.length)return Rn(new ar(a,{}));const g=Gc(i)===o;return this.expandSegment(d,m,h,p,g?zi:o,!0).pipe(_n(y=>new ar(a.concat(y.segments),y.children)))})):Iy(e)))}getChildConfig(n,e,i){return e.children?Rn({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?Rn({routes:e._loadedRoutes,injector:e._loadedInjector}):function $Ee(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?Rn(!0):Rn(r.map(s=>{const a=bv(s,t);return jf(function kEe(t){return t&&Oy(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(xv(),pV())}(n,e,i).pipe(et(r=>r?this.configLoader.loadChildren(n,e).pipe(xs(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function WEe(t){return sm(lV(kC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):Rn({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Rn(i);if(r.numberOfChildren>1||!r.children[zi])return GEe(n.redirectTo);r=r.children[zi]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Rf(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Oa(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Oa(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new ar(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Nt(4001,kC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class JEe{}class ZEe{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=CC(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,zi).pipe(_n(e=>{if(null===e)return null;const i=new _C([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},zi,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Wh(i,e),o=new oV(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=rV(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return ro(Object.keys(i.children)).pipe(Pf(r=>{const o=i.children[r],s=hV(e,r);return this.processSegmentGroup(n,s,o,r)}),N9((r,o)=>r&&o?(r.push(...o),r):null),function hTe(t,n=!1){return e=>e.lift(new fTe(t,n))}(r=>null!==r),lC(null),F9(),_n(r=>{if(null===r)return null;const o=xV(r);return function eAe(t){t.sort((n,e)=>n.value.outlet===zi?-1:e.value.outlet===zi?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return ro(e).pipe(Pf(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),Ff(s=>!!s),Ll(s=>{if(f3(s))return vV(i,r,o)?Rn([]):Rn(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!gV(e,i,r,o))return Rn(null);let s;if("**"===e.path){const a=r.length>0?R9(r).parameters:{},l=CV(i)+r.length;s=Rn({snapshot:new _C(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,SV(e),Gc(e),e.component??e._loadedComponent??null,e,wV(i),l,kV(e)),consumedSegments:[],remainingSegments:[]})}else s=mV(i,e,r,n).pipe(_n(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=CV(i)+l.length;return{snapshot:new _C(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,SV(e),Gc(e),e.component??e._loadedComponent??null,e,wV(i),d,kV(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(dc(a=>{if(null===a)return Rn(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function tAe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=CC(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(_n(g=>null===g?null:[new Wh(l,g)]));if(0===h.length&&0===p.length)return Rn([new Wh(l,[])]);const m=Gc(e)===o;return this.processSegment(d,h,f,p,m?zi:o).pipe(_n(g=>null===g?null:[new Wh(l,g)]))}))}}function nAe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function xV(t){const n=[],e=new Set;for(const i of t){if(!nAe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=xV(i.children);n.push(new Wh(i.value,r))}return n.filter(i=>!e.has(i))}function wV(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function CV(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function SV(t){return t.data||{}}function kV(t){return t.resolve||{}}function DV(t){return"string"==typeof t.title||null===t.title}function g3(t){return dc(n=>{const e=t(n);return e?ro(e).pipe(_n(()=>n)):Rn(n)})}const wv=new Vn("ROUTES");let v3=(()=>{class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Fi(hB)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return Rn(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=jf(e.loadComponent()).pipe(_n(EV),xs(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),JM(()=>{this.componentLoaders.delete(e)})),r=new fe(i,()=>new dr).pipe(Ut());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Rn({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(_n(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=j9(l.get(wv,[],Ci.Self|Ci.Optional)));return{routes:c.map(h3),injector:l}}),JM(()=>{this.childrenLoaders.delete(i)})),s=new fe(o,()=>new dr).pipe(Ut());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return jf(e()).pipe(_n(EV),et(i=>i instanceof k$||Array.isArray(i)?Rn(i):ro(this.compiler.compileModuleAsync(i))))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function EV(t){return function uAe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let EC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new dr,this.configLoader=Fi(v3),this.environmentInjector=Fi($c),this.urlSerializer=Fi(by),this.rootContexts=Fi(Ty),this.navigationId=0,this.afterPreactivation=()=>Rn(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new KTe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new JTe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Js({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Sy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(us(i=>0!==i.id),_n(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),dc(i=>{let r=!1,o=!1;return Rn(i).pipe(xs(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),dc(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new vC(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Uh}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return AV(s.source)&&(e.browserUrlTree=s.extractedUrl),Rn(s).pipe(dc(u=>{const d=this.transitions?.getValue();return this.events.next(new gC(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Uh:Promise.resolve(u)}),function XEe(t,n,e,i){return dc(r=>function qEe(t,n,e,i,r){return new YEe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(_n(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),xs(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function rAe(t,n,e,i,r){return et(o=>function QEe(t,n,e,i,r,o,s="emptyOnly"){return new ZEe(t,n,e,i,r,s,o).recognize().pipe(dc(a=>null===a?function KEe(t){return new en(n=>n.error(t))}(new JEe):Rn(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(_n(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),xs(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new GTe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new gC(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=iV(d,this.rootComponentType).snapshot;return Rn(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new vC(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Uh}}),xs(s=>{const a=new WTe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),_n(s=>i={...s,guards:bEe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function OEe(t,n){return et(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?Rn({...e,guardsResult:!0}):function IEe(t,n,e,i){return ro(t).pipe(et(r=>function LEe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?Rn(o.map(a=>{const l=Ey(n)??r,c=bv(a,l);return jf(function EEe(t){return t&&Oy(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(Ff())})).pipe(xv()):Rn(!0)}(r.component,r.route,e,n,i)),Ff(r=>!0!==r,!0))}(s,i,r,t).pipe(et(a=>a&&function SEe(t){return"boolean"==typeof t}(a)?function NEe(t,n,e,i){return ro(n).pipe(Pf(r=>oC(function PEe(t,n){return null!==t&&n&&n(new QTe(t)),Rn(!0)}(r.route.parent,i),function FEe(t,n){return null!==t&&n&&n(new eEe(t)),Rn(!0)}(r.route,i),function REe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function xEe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>M9(()=>Rn(s.guards.map(l=>{const c=Ey(s.node)??e,u=bv(l,c);return jf(function TEe(t){return t&&Oy(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(Ff())})).pipe(xv())));return Rn(o).pipe(xv())}(t,r.path,e),function jEe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return Rn(!0);const r=i.map(o=>M9(()=>{const s=Ey(n)??e,a=bv(o,s);return jf(function DEe(t){return t&&Oy(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(Ff())}));return Rn(r).pipe(xv())}(t,r.route,e))),Ff(r=>!0!==r,!0))}(i,o,t,n):Rn(a)),_n(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),xs(s=>{if(i.guardsResult=s.guardsResult,lm(s.guardsResult))throw aV(0,s.guardsResult);const a=new qTe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),us(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),g3(s=>{if(s.guards.canActivateChecks.length)return Rn(s).pipe(xs(a=>{const l=new YTe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),dc(a=>{let l=!1;return Rn(a).pipe(function oAe(t,n){return et(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return Rn(e);let o=0;return ro(r).pipe(Pf(s=>function sAe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!DV(r)&&(o[yy]=r.title),function aAe(t,n,e,i){const r=function lAe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return Rn({});const o={};return ro(r).pipe(et(s=>function cAe(t,n,e,i){const r=Ey(n)??i,o=bv(t,r);return jf(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(Ff(),xs(a=>{o[s]=a}))),XM(1),function mTe(t){return n=>n.lift(new gTe(t))}(o),Ll(s=>f3(s)?Uh:sm(s)))}(o,t,n,i).pipe(_n(s=>(t._resolvedData=s,t.data=rV(t,e).resolve,r&&DV(r)&&(t.data[yy]=r.title),null)))}(s.route,i,t,n)),xs(()=>o++),XM(1),et(s=>o===r.length?Rn(e):Uh))})}(e.paramsInheritanceStrategy,this.environmentInjector),xs({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),xs(a=>{const l=new XTe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),g3(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(xs(u=>{l.component=u}),_n(()=>{})));for(const u of l.children)c.push(...a(u));return c};return rC(a(s.targetSnapshot.root)).pipe(lC(),Ks(1))}),g3(()=>this.afterPreactivation()),_n(s=>{const a=function cEe(t,n,e){const i=Dy(t,n._root,e?e._root:void 0);return new nV(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),xs(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>_n(i=>(new _Ee(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),Ks(1),xs({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Gh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),JM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ll(s=>{if(o=!0,uV(s)){cV(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new ky(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),cV(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||AV(i.source)};e.scheduleNavigation(l,Sy,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new yC(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Uh}))}))}cancelNavigationTransition(e,i,r){const o=new ky(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function AV(t){return t!==Sy}let MV=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===zi);return i}getResolvedTitleForRoute(e){return e.data[yy]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(dAe)},providedIn:"root"}),t})(),dAe=(()=>{class t extends MV{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(gt(L7))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),hAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(pAe)},providedIn:"root"}),t})();class fAe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let pAe=(()=>{class t extends fAe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const AC=new Vn("",{providedIn:"root",factory:()=>({})});let gAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(vAe)},providedIn:"root"}),t})(),vAe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function yAe(t){throw t}function _Ae(t,n,e){return n.parse("/")}const bAe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},xAe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let _r=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=Fi(Rwe),this.isNgZoneEnabled=!1,this.options=Fi(AC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||yAe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||_Ae,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Fi(gAe),this.routeReuseStrategy=Fi(hAe),this.urlCreationStrategy=Fi(sEe),this.titleStrategy=Fi(MV),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=j9(Fi(wv,{optional:!0})??[]),this.navigationTransitions=Fi(EC),this.urlSerializer=Fi(by),this.location=Fi(XA),this.isNgZoneEnabled=Fi(nr)instanceof nr&&nr.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Rf,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=iV(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId??0},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Sy,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(h3),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=lm(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Sy,null,i)}navigate(e,i={skipLocationChange:!1}){return function wAe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",o)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-(this.browserPageId??this.currentPageId);0!==o?this.location.historyGo(o):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ou=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new dr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof Gh&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=fv(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=fv(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=fv(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function e8(t,n,e){return function K1e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?Z5:$1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(de(_r),de(Pr),Sf("tabindex"),de(ca),de(Si),de(tm))},t.\u0275dir=sn({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&ut("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Yn]}),t})(),Ny=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new it,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof Gh&&this.update()})}ngAfterContentInit(){Rn(this.links.changes,Rn(null)).pipe(M()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=ro(e).pipe(M()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function CAe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(de(_r),de(Si),de(ca),de(Ns),de(Ou,8))},t.\u0275dir=sn({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&yi(r,Ou,5),2&e){let o;wn(o=Cn())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Yn]}),t})();class OV{}let SAe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(us(e=>e instanceof Gh),Pf(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=pw(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return ro(r).pipe(M())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):Rn(null);const o=r.pipe(et(s=>null===s?Rn(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?ro([o,this.loader.loadComponent(i)]).pipe(M()):o})}}return t.\u0275fac=function(e){return new(e||t)(gt(_r),gt(hB),gt($c),gt(OV),gt(v3))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const _3=new Vn("");let IV=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof gC?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Gh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof eV&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new eV(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function O8(){throw new Error("invalid")}()},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();var hc=(()=>((hc=hc||{})[hc.COMPLETE=0]="COMPLETE",hc[hc.FAILED=1]="FAILED",hc[hc.REDIRECTING=2]="REDIRECTING",hc))();const Cv=!1;function Lf(t,n){return{\u0275kind:t,\u0275providers:n}}const b3=new Vn("",{providedIn:"root",factory:()=>!1});function FV(){const t=Fi(ua);return n=>{const e=t.get(Rh);if(n!==e.components[0])return;const i=t.get(_r),r=t.get(PV);1===t.get(x3)&&i.initialNavigation(),t.get(jV,null,Ci.Optional)?.setUpPreloading(),t.get(_3,null,Ci.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const PV=new Vn(Cv?"bootstrap done indicator":"",{factory:()=>new dr}),x3=new Vn(Cv?"initial navigation":"",{providedIn:"root",factory:()=>1});function AAe(){let t=[];return t=Cv?[{provide:Xx,multi:!0,useFactory:()=>{const n=Fi(_r);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function nEe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Lf(1,t)}const jV=new Vn(Cv?"router preloader":"");function MAe(t){return Lf(0,[{provide:jV,useExisting:SAe},{provide:OV,useExisting:t}])}const Fy=!1,RV=new Vn(Fy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),OAe=[XA,{provide:by,useClass:KM},_r,Ty,{provide:Pr,useFactory:function NV(t){return t.routerState.root},deps:[_r]},v3,Fy?{provide:b3,useValue:!0}:[]];function IAe(){return new bB("Router",_r)}let LV=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[OAe,Fy&&i?.enableTracing?AAe().\u0275providers:[],{provide:wv,multi:!0,useValue:e},{provide:RV,useFactory:jAe,deps:[[_r,new O1,new I1]]},{provide:AC,useValue:i||{}},i?.useHash?{provide:tm,useClass:SCe}:{provide:tm,useClass:UB},{provide:_3,useFactory:()=>{const t=Fi(j2e),n=Fi(nr),e=Fi(AC),i=Fi(EC),r=Fi(by);return e.scrollOffset&&t.setOffset(e.scrollOffset),new IV(r,i,t,n,e)}},i?.preloadingStrategy?MAe(i.preloadingStrategy).\u0275providers:[],{provide:bB,multi:!0,useFactory:IAe},i?.initialNavigation?RAe(i):[],[{provide:$V,useFactory:FV},{provide:_B,multi:!0,useExisting:$V}]]}}static forChild(e){return{ngModule:t,providers:[{provide:wv,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(gt(RV,8))},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[u3]}),t})();function jAe(t){if(Fy&&t)throw new Nt(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function RAe(t){return["disabled"===t.initialNavigation?Lf(3,[{provide:yw,multi:!0,useFactory:()=>{const n=Fi(_r);return()=>{n.setUpLocationChangeListener()}}},{provide:x3,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Lf(2,[{provide:x3,useValue:0},{provide:yw,multi:!0,deps:[ua],useFactory:n=>{const e=n.get(wCe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(_r),o=n.get(PV);(function kAe(t,n){t.events.pipe(us(e=>e instanceof Gh||e instanceof ky||e instanceof yC||e instanceof vC),_n(e=>e instanceof Gh||e instanceof vC?hc.COMPLETE:e instanceof ky&&(0===e.code||1===e.code)?hc.REDIRECTING:hc.FAILED),us(e=>e!==hc.REDIRECTING),Ks(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(EC).afterPreactivation=()=>(i(!0),o.closed?Rn(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const $V=new Vn(Fy?"Router Initializer":"");function MC(t,n){return new en(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let BV=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(de(ca),de(Si))},t.\u0275dir=sn({type:t}),t})(),um=(()=>{class t extends BV{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,features:[pi]}),t})();const $l=new Vn("NgValueAccessor"),BAe={provide:$l,useExisting:Mi(()=>OC),multi:!0};let OC=(()=>{class t extends um{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Qr([BAe]),pi]}),t})();const VAe={provide:$l,useExisting:Mi(()=>Qs),multi:!0},UAe=new Vn("CompositionEventMode");let Qs=(()=>{class t extends BV{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function HAe(){const t=Lh()?Lh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(de(ca),de(Si),de(UAe,8))},t.\u0275dir=sn({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Qr([VAe]),pi]}),t})();const zAe=!1;function $f(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function VV(t){return null!=t&&"number"==typeof t.length}const Ia=new Vn("NgValidators"),Bf=new Vn("NgAsyncValidators"),GAe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Co{static min(n){return HV(n)}static max(n){return function UV(t){return n=>{if($f(n.value)||$f(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return zV(n)}static requiredTrue(n){return function GV(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function WV(t){return $f(t.value)||GAe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function qV(t){return n=>$f(n.value)||!VV(n.value)?null:n.value.lengthVV(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function XV(t){if(!t)return IC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if($f(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return tH(n)}static composeAsync(n){return nH(n)}}function HV(t){return n=>{if($f(n.value)||$f(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function ZV(t,n){return n.map(e=>e(t))}function eH(t){return t.map(n=>function WAe(t){return!t.validate}(n)?n:e=>n.validate(e))}function tH(t){if(!t)return null;const n=t.filter(JV);return 0==n.length?null:function(e){return QV(ZV(e,n))}}function w3(t){return null!=t?tH(eH(t)):null}function nH(t){if(!t)return null;const n=t.filter(JV);return 0==n.length?null:function(e){return function $Ae(...t){if(1===t.length){const n=t[0];if(Ze(n))return MC(n,null);if($e(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return MC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return MC(t=1===t.length&&Ze(t[0])?t[0]:t,null).pipe(_n(e=>n(...e)))}return MC(t,null)}(ZV(e,n).map(KV)).pipe(_n(QV))}}function C3(t){return null!=t?nH(eH(t)):null}function iH(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function rH(t){return t._rawValidators}function oH(t){return t._rawAsyncValidators}function S3(t){return t?Array.isArray(t)?t:[t]:[]}function NC(t,n){return Array.isArray(t)?t.includes(n):t===n}function sH(t,n){const e=S3(n);return S3(t).forEach(r=>{NC(e,r)||e.push(r)}),e}function aH(t,n){return S3(n).filter(e=>!NC(t,e))}class lH{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=w3(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=C3(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class vl extends lH{get formDirective(){return null}get path(){return null}}class Vf extends lH{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class cH{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let da=(()=>{class t extends cH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(de(Vf,2))},t.\u0275dir=sn({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&jn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[pi]}),t})(),ha=(()=>{class t extends cH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(de(vl,10))},t.\u0275dir=sn({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&jn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[pi]}),t})();function uH(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const T3=!1,Py="VALID",PC="INVALID",Sv="PENDING",jy="DISABLED";function E3(t){return(jC(t)?t.validators:t)||null}function A3(t,n){return(jC(n)?n.asyncValidators:t)||null}function jC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function dH(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new Nt(1e3,T3?function JAe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new Nt(1001,T3?function KAe(t,n){return`Cannot find form control ${uH(t,n)}`}(n,e):"")}function hH(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new Nt(1002,T3?function QAe(t,n){return`Must supply a value for form control ${uH(t,n)}`}(n,r):"")})}class RC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===Py}get invalid(){return this.status===PC}get pending(){return this.status==Sv}get disabled(){return this.status===jy}get enabled(){return this.status!==jy}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(sH(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(sH(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(aH(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(aH(n,this._rawAsyncValidators))}hasValidator(n){return NC(this._rawValidators,n)}hasAsyncValidator(n){return NC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Sv,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=jy,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=Py,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Py||this.status===Sv)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?jy:Py}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Sv,this._hasOwnPendingAsyncValidator=!0;const e=KV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new it,this.statusChanges=new it}_calculateStatus(){return this._allControlsDisabled()?jy:this.errors?PC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Sv)?Sv:this._anyControlsHaveStatus(PC)?PC:Py}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){jC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function ZAe(t){return Array.isArray(t)?w3(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function eMe(t){return Array.isArray(t)?C3(t):t||null}(this._rawAsyncValidators)}}class Ry extends RC{constructor(n,e,i){super(E3(e),A3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){hH(this,!0,n),Object.keys(n).forEach(i=>{dH(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class fH extends Ry{}const dm=new Vn("CallSetDisabledState",{providedIn:"root",factory:()=>Ly}),Ly="always";function $y(t,n,e=Ly){M3(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function nMe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&pH(t,n)})}(t,n),function rMe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function iMe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&pH(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function tMe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function $C(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),VC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function BC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function M3(t,n){const e=rH(t);null!==n.validator?t.setValidators(iH(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=oH(t);null!==n.asyncValidator?t.setAsyncValidators(iH(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();BC(n._rawValidators,r),BC(n._rawAsyncValidators,r)}function VC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=rH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=oH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return BC(n._rawValidators,i),BC(n._rawAsyncValidators,i),e}function pH(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function vH(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function yH(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const Vy=class extends RC{constructor(n=null,e,i){super(E3(e),A3(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),jC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=yH(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){vH(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){vH(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){yH(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let fa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const fMe={provide:$l,useExisting:Mi(()=>P3),multi:!0};let P3=(()=>{class t extends um{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Qr([fMe]),pi]}),t})();const pMe={provide:$l,useExisting:Mi(()=>j3),multi:!0};let CH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})(),mMe=(()=>{class t{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e)return void this._accessors.splice(i,1)}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return!!e[0].control&&e[0]._parent===i._control._parent&&e[1].name===i.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:CH}),t})(),j3=(()=>{class t extends um{constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=Fi(dm,{optional:!0})??Ly}ngOnInit(){this._control=this._injector.get(Vf),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(de(ca),de(Si),de(mMe),de(ua))},t.\u0275dir=sn({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Qr([pMe]),pi]}),t})();const R3=new Vn("NgModelWithFormControlWarning"),yMe={provide:vl,useExisting:Mi(()=>js)};let js=(()=>{class t extends vl{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new it,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(VC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return $y(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){$C(e.control||null,e,!1),function lMe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function gH(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&($C(i||null,e),(t=>t instanceof Vy)(r)&&($y(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function mH(t,n){M3(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function oMe(t,n){return VC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){M3(this.form,this),this._oldForm&&VC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(de(Ia,10),de(Bf,10),de(dm,8))},t.\u0275dir=sn({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ye("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Qr([yMe]),pi,Yn]}),t})();const xMe={provide:Vf,useExisting:Mi(()=>Zs)};let Zs=(()=>{class t extends Vf{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new it,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function N3(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Qs?e=o:function aMe(t){return Object.getPrototypeOf(t.constructor)===um}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function I3(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function LC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(de(vl,13),de(Ia,10),de(Bf,10),de($l,10),de(R3,8))},t.\u0275dir=sn({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Qr([xMe]),pi,Yn]}),t})();const wMe={provide:$l,useExisting:Mi(()=>kv),multi:!0};function TH(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let kv=(()=>{class t extends um{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=TH(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function CMe(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Qr([wMe]),pi]}),t})(),HC=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(TH(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca),de(kv,9))},t.\u0275dir=sn({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const SMe={provide:$l,useExisting:Mi(()=>B3),multi:!0};function EH(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let B3=(()=>{class t extends um{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(EH(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(EH(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca),de(B3,9))},t.\u0275dir=sn({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let hm=(()=>{class t{constructor(){this._validator=IC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):IC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,features:[Yn]}),t})();const TMe={provide:Ia,useExisting:Mi(()=>V3),multi:!0};let V3=(()=>{class t extends hm{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function MH(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>HV(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ut("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Qr([TMe]),pi]}),t})();const EMe={provide:Ia,useExisting:Mi(()=>Hf),multi:!0};let Hf=(()=>{class t extends hm{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=fv,this.createValidator=e=>zV}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&ut("required",i._enabled?"":null)},inputs:{required:"required"},features:[Qr([EMe]),pi]}),t})(),RH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[CH]}),t})();class LH extends RC{constructor(n,e,i){super(E3(e),A3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){hH(this,!1,n),n.forEach((i,r)=>{dH(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function $H(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let FMe=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return $H(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Ry(r,o)}record(e,i=null){const r=this._reduceControls(e);return new fH(r,i)}control(e,i,r){let o={};return this.useNonNullable?($H(i)?o=i:(o.validators=i,o.asyncValidators=r),new Vy(e,{...o,nonNullable:!0})):new Vy(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new LH(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Vy||e instanceof RC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Na=(()=>{class t extends FMe{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),PMe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:dm,useValue:e.callSetDisabledState??Ly}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[RH]}),t})(),jMe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:R3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:dm,useValue:e.callSetDisabledState??Ly}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[RH]}),t})();const BH=new Vn("ngx-segment-analytics.config"),RMe={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js",plugins:[]};let VH=(()=>{class t{analytics;static \u0275fac=function(i){return new(i||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac})}return t})(),zC=(()=>{class t{_w;_doc;_config;constructor(e,i,r){if(this._w=e,this._doc=i,this._config={...RMe,...r},this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");!0===this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics._writeKey=this._config.apiKey,this._w.analytics.SNIPPET_VERSION="4.15.3",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),!0===this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}setAnonymousId(e){this._w.analytics.setAnonymousId(e)}traits(){return this._w.analytics.user().traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}addDestinationMiddleware(e,...i){this._w.analytics.addDestinationMiddleware(e,...i)}register(...e){return this._w.analytics.register(...e)}get plugins(){return this._w.analytics.plugins}static \u0275fac=function(i){return new(i||t)(gt(VH),gt(co),gt(BH))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function LMe(t){return p7(t)?window:{}}let $Me=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:BH,useValue:e},zC]}}constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static \u0275fac=function(i){return new(i||t)(gt(t,12))};static \u0275mod=ki({type:t});static \u0275inj=wi({providers:[{provide:VH,useFactory:LMe,deps:[sy]}],imports:[Mf]})}return t})();class GC{}class H3{}class Iu{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.entries(n).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){const o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Iu?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Iu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Iu?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class BMe{encodeKey(n){return HH(n)}encodeValue(n){return HH(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const HMe=/%(\d[a-f0-9])/gi,UMe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function HH(t){return encodeURIComponent(t).replace(HMe,(n,e)=>UMe[e]??n)}function WC(t){return`${t}`}class En{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new BMe,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function VMe(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(WC):[WC(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new En({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(WC(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(WC(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class zMe{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function UH(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function zH(t){return typeof Blob<"u"&&t instanceof Blob}function GH(t){return typeof FormData<"u"&&t instanceof FormData}class Hy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function GMe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Iu),this.context||(this.context=new zMe),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new Hy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var Rs=(()=>((Rs=Rs||{})[Rs.Sent=0]="Sent",Rs[Rs.UploadProgress=1]="UploadProgress",Rs[Rs.ResponseHeader=2]="ResponseHeader",Rs[Rs.DownloadProgress=3]="DownloadProgress",Rs[Rs.Response=4]="Response",Rs[Rs.User=5]="User",Rs))();class U3{constructor(n,e=200,i="OK"){this.headers=n.headers||new Iu,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class z3 extends U3{constructor(n={}){super(n),this.type=Rs.ResponseHeader}clone(n={}){return new z3({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class qC extends U3{constructor(n={}){super(n),this.type=Rs.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new qC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class WH extends U3{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function G3(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let YC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Hy)o=e;else{let l,c;l=r.headers instanceof Iu?r.headers:new Iu(r.headers),r.params&&(c=r.params instanceof En?r.params:new En({fromObject:r.params})),o=new Hy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=Rn(o).pipe(Pf(l=>this.handler.handle(l)));if(e instanceof Hy||"events"===r.observe)return s;const a=s.pipe(us(l=>l instanceof qC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(_n(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(_n(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(_n(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(_n(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new En).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,G3(r,i))}post(e,i,r={}){return this.request("POST",e,G3(r,i))}put(e,i,r={}){return this.request("PUT",e,G3(r,i))}}return t.\u0275fac=function(e){return new(e||t)(gt(GC))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function qH(t,n){return n(t)}function qMe(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const W3=new Vn("HTTP_INTERCEPTORS"),Uy=new Vn("HTTP_INTERCEPTOR_FNS");function XMe(){let t=null;return(n,e)=>(null===t&&(t=(Fi(W3,{optional:!0})??[]).reduceRight(qMe,qH)),t(n,e))}let YH=(()=>{class t extends GC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(Uy)));this.chain=i.reduceRight((r,o)=>function YMe(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),qH)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(gt(H3),gt($c))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const ZMe=/^\)\]\}',?\n/;let JH=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new en(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Iu(r.getAllResponseHeaders()),m=function e3e(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new z3({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const b=v;v=v.replace(ZMe,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=b,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new qC({body:v,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new WH({error:v,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new WH({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:Rs.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:Rs.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:Rs.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(gt(g7))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const q3=new Vn("XSRF_ENABLED"),KH=new Vn("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),QH=new Vn("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class ZH{}let i3e=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=n7(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(gt(co),gt(sy),gt(KH))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function r3e(t,n){const e=t.url.toLowerCase();if(!Fi(q3)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=Fi(ZH).getToken(),r=Fi(QH);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var ws=(()=>((ws=ws||{})[ws.Interceptors=0]="Interceptors",ws[ws.LegacyInterceptors=1]="LegacyInterceptors",ws[ws.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",ws[ws.NoXsrfProtection=3]="NoXsrfProtection",ws[ws.JsonpSupport=4]="JsonpSupport",ws[ws.RequestsMadeViaParent=5]="RequestsMadeViaParent",ws))();function Dv(t,n){return{\u0275kind:t,\u0275providers:n}}function o3e(...t){const n=[YC,JH,YH,{provide:GC,useExisting:YH},{provide:H3,useExisting:JH},{provide:Uy,useValue:r3e,multi:!0},{provide:q3,useValue:!0},{provide:ZH,useClass:i3e}];for(const e of t)n.push(...e.\u0275providers);return function Q1e(t){return{\u0275providers:t}}(n)}const eU=new Vn("LEGACY_INTERCEPTOR_FN");let a3e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[o3e(Dv(ws.LegacyInterceptors,[{provide:eU,useFactory:XMe},{provide:Uy,useExisting:eU,multi:!0}]))]}),t})();var ti=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(ti||(ti={})),ti))(),zy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY",t[t.FACEBOOK_INSTANT_STORE=3]="FACEBOOK_INSTANT_STORE"}(zy||(zy={})),zy))();class Y3{host;timeoutMs}let bi=(()=>{class t{httpClient;config;constructor(e,i){this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new En({encoder:new Un});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new En({encoder:new Un});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new En({encoder:new Un});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new En({encoder:new Un});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new En({encoder:new Un});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new En({encoder:new Un});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new En({encoder:new Un});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getPurchase(e,i){const r=`/v2/console/iap/purchase/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getSubscription(e,i){const r=`/v2/console/iap/subscription/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new En({encoder:new Un});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new En({encoder:new Un});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new En({encoder:new Un});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new En({encoder:new Un});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new En({encoder:new Un});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new En({encoder:new Un});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new En({encoder:new Un});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new En({encoder:new Un});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new En({encoder:new Un});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new En({encoder:new Un});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new En({encoder:new Un});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new En({encoder:new Un});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new En({encoder:new Un});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Iu).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Iu).set("Authorization","Basic "+btoa(e+":"+i))}static \u0275fac=function(i){return new(i||t)(gt(YC),gt(Y3,8))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class Un{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const tU=new Vn("window"),u3e=[{provide:tU,useFactory:()=>window}],X3="currentSession";let zo=(()=>{class t{window;segment;http;consoleService;currentSessionSubject;currentSession;constructor(e,i,r,o){this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(X3));this.currentSessionSubject=new Js(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return ti.USER_ROLE_ADMIN;case 2:return ti.USER_ROLE_DEVELOPER;case 3:return ti.USER_ROLE_MAINTAINER;case 4:return ti.USER_ROLE_READONLY;default:return ti.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(xs(r=>{localStorage.setItem(X3,JSON.stringify(r)),this.currentSessionSubject.next(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(xs(()=>{localStorage.removeItem(X3),this.currentSessionSubject.next(null)})):Uh}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}static \u0275fac=function(i){return new(i||t)(gt(tU),gt(zC),gt(YC),gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d3e(t,n){if(1&t&&(_(0,"div",27),O(1),x()),2&t){const e=$();w(1),mn(" ",e.error," ")}}const h3e=function(t){return{"was-validated":t}},nU=function(t){return{"is-invalid":t}};let f3e=(()=>{class t{segment;formBuilder;route;router;authenticationService;error="";loginForm;submitted;returnUrl;constructor(e,i,r,o,s){this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.loginForm=this.formBuilder.group({username:["",Co.compose([Co.required])],password:["",Co.compose([Co.required,Co.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}static \u0275fac=function(i){return new(i||t)(de(zC),de(Na),de(Pr),de(_r),de(zo))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:53,vars:14,consts:[[1,"d-flex","flex-column","flex-lg-row","h-100","relative"],["src","/static/svg/logo-white.svg","alt","Nakama Logo","width","175","height","43",1,"logo"],[1,"login-panel"],[1,"align-self-center","login-form"],[1,"px-4"],[1,"login-title","mb-4"],["class","alert alert-warning","role","alert",4,"ngIf"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],[1,"heroic-stack"],[1,""],["src","/static/svg/hiro-logo.svg","alt","Hiro Logo","width","110","height","50",1,"mb-3"],["href","https://www.youtube.com/playlist?list=PLOAExZcDNj9sWny_J8J5ARkxDTwAV0i6f&utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Reconstructing%20Fun%20Sign-In","target","_blank"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Sign-In","target","_blank",1,"login-link"],["src","/static/svg/satori-logo.svg","alt","Satori Logo","width","134","height","50",1,"mb-3"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Sign-In","target","_blank",1,"login-link"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/calendar.svg","alt","Calendar"],[1,"font-weight-bold","ml-2",2,"font-size","20px"],["href","https://heroiclabs.com/bookademo?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Book%20a%20Demo%20Sign-In","target","_blank",1,"login-link-pink"],["src","/static/svg/phone.svg","alt","Phone"],["role","alert",1,"alert","alert-warning"]],template:function(i,r){1&i&&(_(0,"div",0),pe(1,"img",1),_(2,"div",2)(3,"div",3)(4,"div",4)(5,"h3",5),O(6,"Sign in to continue to the Nakama Dashboard"),x(),Z(7,d3e,2,1,"div",6),_(8,"form",7),ye("ngSubmit",function(){return r.onSubmit()}),_(9,"div",8)(10,"label",9),O(11,"Username"),x(),pe(12,"input",10),_(13,"div",11),O(14,"Please enter a username."),x()(),_(15,"div",8)(16,"label",12),O(17,"Password"),x(),pe(18,"input",13),_(19,"div",11),O(20,"Password must be at least 8 characters."),x()(),_(21,"button",14),O(22,"Login"),x()()()()(),_(23,"div",2)(24,"div",15)(25,"div",16),pe(26,"img",17),_(27,"p"),O(28,"A metagame framework built on Nakama to add virtual store, rewards, event leaderboards and much more rapidly and flexibly to your game. "),_(29,"a",18),O(30,"RECONSTRUCTING FUN"),x(),O(31," on YouTube shows you how."),x(),_(32,"a",19),O(33,"Explore Hiro"),x()(),pe(34,"hr"),_(35,"div",16),pe(36,"img",20),_(37,"p"),O(38,"LiveOps for your live services game. Live events, Experiments, Feature Flags, Audience Segmentation and Analytics built to work independently but beautifully with Nakama."),x(),_(39,"a",21),O(40,"Explore Satori"),x()(),pe(41,"hr"),_(42,"div")(43,"div",22),pe(44,"img",23),_(45,"span",24),O(46,"Working at a Game Studio?"),x()(),_(47,"p"),O(48,"Ready to take your game development to the next level? Contact us for a free 45 minute demo call."),x(),_(49,"a",25),pe(50,"img",26),_(51,"span"),O(52,"Schedule a call with us"),x()()()()()()),2&i&&(w(7),S("ngIf",r.error),w(1),S("formGroup",r.loginForm)("ngClass",sr(8,h3e,r.submitted)),w(4),S("ngClass",sr(10,nU,r.f.username.dirty&&r.f.username.errors)),w(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),w(5),S("ngClass",sr(12,nU,r.f.password.dirty&&r.f.password.errors)),w(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),w(2),S("disabled",!r.loginForm.valid||r.submitted))},dependencies:[nm,vn,fa,Qs,da,ha,Hf,js,Zs],styles:[".logo[_ngcontent-%COMP%]{position:absolute;top:10px;left:15px}@media (min-width: 992px){.logo[_ngcontent-%COMP%]{top:40px;left:30px}}.login-form[_ngcontent-%COMP%]{margin:100px auto auto;max-width:600px}@media (min-width: 992px){.login-form[_ngcontent-%COMP%]{width:485px;margin:auto}}.login-title[_ngcontent-%COMP%]{font-size:28px;font-weight:300}.login-panel[_ngcontent-%COMP%]{flex:1 1 0;display:flex}.login-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:300;font-size:20px}.heroic-stack[_ngcontent-%COMP%]{padding:0 1.5rem;max-width:600px;margin:70px auto 40px}@media (min-width: 992px){.heroic-stack[_ngcontent-%COMP%]{max-width:660px;padding:0 15px;margin:auto}}.login-link[_ngcontent-%COMP%], .login-link-pink[_ngcontent-%COMP%]{display:inline-flex;padding:15px;font-size:15px;border:1px;border-radius:5px;border:1px solid}.login-link[_ngcontent-%COMP%]{color:#4739c5;border-color:#4739c51a}hr[_ngcontent-%COMP%]{border:2px solid rgba(217,217,217,.2);margin-top:20px;margin-bottom:40px}.login-link-pink[_ngcontent-%COMP%]{border-color:#b421b41a;background:#FFF6FF;color:#b421b4}.login-link-pink[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:15px}"]})}return t})(),p3e=(()=>{class t{authService;router;constructor(e,i){this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}static \u0275fac=function(i){return new(i||t)(gt(zo),gt(_r))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),m3e=(()=>{class t{router;authenticationService;constructor(e,i){this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}static \u0275fac=function(i){return new(i||t)(gt(_r),gt(zo))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class g3e extends ce{constructor(n,e){super()}schedule(n,e=0){return this}}class J3 extends g3e{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let iU=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Vd extends iU{constructor(n,e=iU.now){super(n,()=>Vd.delegate&&Vd.delegate!==this?Vd.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Vd.delegate&&Vd.delegate!==this?Vd.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const XC=new Vd(J3);class y3e{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new b3e(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class _3e{constructor(){this.buffer=[]}}class b3e extends F{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(rU,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(oU,e,{subscriber:this,context:s})),this.add(o.schedule(x3e,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(rU,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new _3e;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function rU(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function x3e(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(oU,e,{subscriber:i,context:o})),this.schedule(t,n))}function oU(t){const{subscriber:n,context:e}=t;n.closeContext(e)}function JC(t,n){return e=>e.lift(new w3e(t,n))}class w3e{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new C3e(n,this.compare,this.keySelector))}}class C3e extends F{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Fa(t,n,e,i){return nt(e)&&(i=e,e=void 0),i?Fa(t,n,e).pipe(_n(r=>Ze(r)?i(...r):i(r))):new en(r=>{sU(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function sU(t,n,e,i,r){let o;if(function D3e(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function k3e(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function S3e(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function Gy(t=0,n,e){let i=-1;return aU(n)?i=Number(n)<1?1:Number(n):Ca(n)&&(e=n),Ca(e)||(e=XC),new en(r=>{const o=aU(t)?t:+t-e.now();return e.schedule(T3e,o,{index:0,period:i,subscriber:r})})}function T3e(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function lU(...t){if(1===t.length){if(!Ze(t[0]))return t[0];t=t[0]}return ot(t,void 0).lift(new E3e)}class E3e{call(n,e){return e.subscribe(new A3e(n))}}class A3e extends qM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class F3e extends Y{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[Fo](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return Ne(this.observable,new Ml(this))}}function Ko(t){return n=>n.lift(new j3e(t))}class j3e{constructor(n){this.notifier=n}call(n,e){const i=new R3e(n),r=Ne(this.notifier,new Ml(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class R3e extends Y{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function K3(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new L3e(t,e))}}class L3e{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new $3e(n,this.observables,this.project))}}class $3e extends qM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Nu{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return Rn(this.value);case"E":return sm(this.error);case"C":return sC()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Nu("N",n):Nu.undefinedValueNotification}static createError(n){return new Nu("E",void 0,n)}static createComplete(){return Nu.completeNotification}}function Q3(t,n=XC){const i=function B3e(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new V3e(i,n))}Nu.completeNotification=new Nu("C"),Nu.undefinedValueNotification=new Nu("N",void 0);class V3e{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new Z3(n,this.delay,this.scheduler))}}class Z3 extends F{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(Z3.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new H3e(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Nu.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Nu.createComplete()),this.unsubscribe()}}class H3e{constructor(n,e){this.time=n,this.notification=e}}class z3e{constructor(n){this.total=n}call(n,e){return e.subscribe(new G3e(n,this.total))}}class G3e extends F{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){++this.count>this.total&&this.destination.next(n)}}var W3e={left:"right",right:"left",bottom:"top",top:"bottom"};function QC(t){return t.replace(/left|right|bottom|top/g,function(n){return W3e[n]})}function Hd(t){return t.split("-")[0]}var q3e={start:"end",end:"start"};function uU(t){return t.replace(/start|end/g,function(n){return q3e[n]})}var fc="top",Fu="bottom",Pu="right",pc="left",eO="auto",Wy=[fc,Fu,Pu,pc],Tv="start",qy="end",Y3e="clippingParents",dU="viewport",Yy="popper",X3e="reference",hU=Wy.reduce(function(t,n){return t.concat([n+"-"+Tv,n+"-"+qy])},[]),fU=[].concat(Wy,[eO]).reduce(function(t,n){return t.concat([n,n+"-"+Tv,n+"-"+qy])},[]),oOe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function mc(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function fm(t){return t instanceof mc(t).Element||t instanceof Element}function Wc(t){return t instanceof mc(t).HTMLElement||t instanceof HTMLElement}function tO(t){return!(typeof ShadowRoot>"u")&&(t instanceof mc(t).ShadowRoot||t instanceof ShadowRoot)}function Uf(t){return((fm(t)?t.ownerDocument:t.document)||window.document).documentElement}var pm=Math.max,ZC=Math.min,Ev=Math.round;function nO(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function pU(){return!/^((?!chrome|android).)*safari/i.test(nO())}function Av(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,o=1;n&&Wc(t)&&(r=t.offsetWidth>0&&Ev(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ev(i.height)/t.offsetHeight||1);var a=(fm(t)?mc(t):window).visualViewport,l=!pU()&&e,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function iO(t){var n=mc(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function rO(t){return Av(Uf(t)).left+iO(t).scrollLeft}function qh(t){return mc(t).getComputedStyle(t)}function Ud(t){return t?(t.nodeName||"").toLowerCase():null}function e2(t){return"html"===Ud(t)?t:t.assignedSlot||t.parentNode||(tO(t)?t.host:null)||Uf(t)}function oO(t){var n=qh(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function mU(t){return["html","body","#document"].indexOf(Ud(t))>=0?t.ownerDocument.body:Wc(t)&&oO(t)?t:mU(e2(t))}function Xy(t,n){var e;void 0===n&&(n=[]);var i=mU(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=mc(i),s=r?[o].concat(o.visualViewport||[],oO(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(Xy(e2(s)))}function lOe(t){return["table","td","th"].indexOf(Ud(t))>=0}function gU(t){return Wc(t)&&"fixed"!==qh(t).position?t.offsetParent:null}function Jy(t){for(var n=mc(t),e=gU(t);e&&lOe(e)&&"static"===qh(e).position;)e=gU(e);return e&&("html"===Ud(e)||"body"===Ud(e)&&"static"===qh(e).position)?n:e||function cOe(t){var n=/firefox/i.test(nO());if(/Trident/i.test(nO())&&Wc(t)&&"fixed"===qh(t).position)return null;var r=e2(t);for(tO(r)&&(r=r.host);Wc(r)&&["html","body"].indexOf(Ud(r))<0;){var o=qh(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||n&&"filter"===o.willChange||n&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(t)||n}function vU(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&tO(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function sO(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function yU(t,n,e){return n===dU?sO(function sOe(t,n){var e=mc(t),i=Uf(t),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=pU();(c||!c&&"fixed"===n)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+rO(t),y:l}}(t,e)):fm(n)?function uOe(t,n){var e=Av(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):sO(function aOe(t){var n,e=Uf(t),i=iO(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=pm(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=pm(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+rO(t),l=-i.scrollTop;return"rtl"===qh(r||e).direction&&(a+=pm(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Uf(t)))}function Mv(t){return t.split("-")[1]}function aO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function _U(t){var l,n=t.reference,e=t.element,i=t.placement,r=i?Hd(i):null,o=i?Mv(i):null,s=n.x+n.width/2-e.width/2,a=n.y+n.height/2-e.height/2;switch(r){case fc:l={x:s,y:n.y-e.height};break;case Fu:l={x:s,y:n.y+n.height};break;case Pu:l={x:n.x+n.width,y:a};break;case pc:l={x:n.x-e.width,y:a};break;default:l={x:n.x,y:n.y}}var c=r?aO(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Tv:l[c]=l[c]-(n[u]/2-e[u]/2);break;case qy:l[c]=l[c]+(n[u]/2-e[u]/2)}}return l}function xU(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function wU(t,n){return n.reduce(function(e,i){return e[i]=t,e},{})}function lO(t,n){void 0===n&&(n={});var i=n.placement,r=void 0===i?t.placement:i,o=n.strategy,s=void 0===o?t.strategy:o,a=n.boundary,l=void 0===a?Y3e:a,c=n.rootBoundary,u=void 0===c?dU:c,d=n.elementContext,h=void 0===d?Yy:d,f=n.altBoundary,p=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=xU("number"!=typeof g?g:wU(g,Wy)),b=t.rects.popper,C=t.elements[p?h===Yy?X3e:Yy:h],k=function hOe(t,n,e,i){var r="clippingParents"===n?function dOe(t){var n=Xy(e2(t)),i=["absolute","fixed"].indexOf(qh(t).position)>=0&&Wc(t)?Jy(t):t;return fm(i)?n.filter(function(r){return fm(r)&&vU(r,i)&&"body"!==Ud(r)}):[]}(t):[].concat(n),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=yU(t,c,i);return l.top=pm(u.top,l.top),l.right=ZC(u.right,l.right),l.bottom=ZC(u.bottom,l.bottom),l.left=pm(u.left,l.left),l},yU(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(fm(C)?C:C.contextElement||Uf(t.elements.popper),l,u,s),D=Av(t.elements.reference),L=_U({reference:D,element:b,strategy:"absolute",placement:r}),z=sO(Object.assign({},b,L)),R=h===Yy?z:D,U={top:k.top-R.top+v.top,bottom:R.bottom-k.bottom+v.bottom,left:k.left-R.left+v.left,right:R.right-k.right+v.right},G=t.modifiersData.offset;if(h===Yy&&G){var X=G[r];Object.keys(U).forEach(function(te){var P=[Pu,Fu].indexOf(te)>=0?1:-1,W=[fc,Fu].indexOf(te)>=0?"y":"x";U[te]+=X[W]*P})}return U}const gOe={name:"flip",enabled:!0,phase:"main",fn:function mOe(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,f=e.flipVariations,p=void 0===f||f,m=e.allowedAutoPlacements,g=n.options.placement,v=Hd(g),b=l||(v!==g&&p?function pOe(t){if(Hd(t)===eO)return[];var n=QC(t);return[uU(t),n,uU(n)]}(g):[QC(g)]),C=[g].concat(b).reduce(function(re,he){return re.concat(Hd(he)===eO?function fOe(t,n){void 0===n&&(n={});var r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?fU:l,u=Mv(n.placement),d=u?a?hU:hU.filter(function(p){return Mv(p)===u}):Wy,h=d.filter(function(p){return c.indexOf(p)>=0});0===h.length&&(h=d);var f=h.reduce(function(p,m){return p[m]=lO(t,{placement:m,boundary:r,rootBoundary:o,padding:s})[Hd(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}(n,{placement:he,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):he)},[]),k=n.rects.reference,D=n.rects.popper,L=new Map,z=!0,R=C[0],U=0;U=0,W=P?"width":"height",J=lO(n,{placement:G,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),H=P?te?Pu:pc:te?Fu:fc;k[W]>D[W]&&(H=QC(H));var le=QC(H),E=[];if(o&&E.push(J[X]<=0),a&&E.push(J[H]<=0,J[le]<=0),E.every(function(re){return re})){R=G,z=!1;break}L.set(G,E)}if(z)for(var N=function(he){var Oe=C.find(function(_e){var Xe=L.get(_e);if(Xe)return Xe.slice(0,he).every(function(Le){return Le})});if(Oe)return R=Oe,"break"},q=p?3:1;q>0&&"break"!==N(q);q--);n.placement!==R&&(n.modifiersData[i]._skip=!0,n.placement=R,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ky(t,n,e){return pm(t,ZC(n,e))}function cO(t){var n=Av(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}const bOe={name:"preventOverflow",enabled:!0,phase:"main",fn:function _Oe(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,f=void 0===h||h,p=e.tetherOffset,m=void 0===p?0:p,g=lO(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),v=Hd(n.placement),y=Mv(n.placement),b=!y,C=aO(v),k=function vOe(t){return"x"===t?"y":"x"}(C),D=n.modifiersData.popperOffsets,L=n.rects.reference,z=n.rects.popper,R="function"==typeof m?m(Object.assign({},n.rects,{placement:n.placement})):m,U="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),G=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,X={x:0,y:0};if(D){if(o){var te,P="y"===C?fc:pc,W="y"===C?Fu:Pu,J="y"===C?"height":"width",H=D[C],le=H+g[P],E=H-g[W],I=f?-z[J]/2:0,N=y===Tv?L[J]:z[J],q=y===Tv?-z[J]:-L[J],V=n.elements.arrow,re=f&&V?cO(V):{width:0,height:0},he=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Oe=he[P],_e=he[W],Xe=Ky(0,L[J],re[J]),Le=b?L[J]/2-I-Xe-Oe-U.mainAxis:N-Xe-Oe-U.mainAxis,rt=b?-L[J]/2+I+Xe+_e+U.mainAxis:q+Xe+_e+U.mainAxis,B=n.elements.arrow&&Jy(n.elements.arrow),ie=null!=(te=G?.[C])?te:0,Ye=H+rt-ie,je=Ky(f?ZC(le,H+Le-ie-(B?"y"===C?B.clientTop||0:B.clientLeft||0:0)):le,H,f?pm(E,Ye):E);D[C]=je,X[C]=je-H}if(a){var yt,Hn=D[k],Zt="y"===k?"height":"width",Ei=Hn+g["x"===C?fc:pc],ln=Hn-g["x"===C?Fu:Pu],ur=-1!==[fc,pc].indexOf(v),wr=null!=(yt=G?.[k])?yt:0,or=ur?Ei:Hn-L[Zt]-z[Zt]-wr+U.altAxis,mr=ur?Hn+L[Zt]+z[Zt]-wr-U.altAxis:ln,gi=f&&ur?function yOe(t,n,e){var i=Ky(t,n,e);return i>e?e:i}(or,Hn,mr):Ky(f?or:Ei,Hn,f?mr:ln);D[k]=gi,X[k]=gi-Hn}n.modifiersData[i]=X}},requiresIfExists:["offset"]};const SOe={name:"arrow",enabled:!0,phase:"main",fn:function wOe(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Hd(e.placement),l=aO(a),u=[pc,Pu].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(n,e){return xU("number"!=typeof(n="function"==typeof n?n(Object.assign({},e.rects,{placement:e.placement})):n)?n:wU(n,Wy))}(r.padding,e),h=cO(o),f="y"===l?fc:pc,p="y"===l?Fu:Pu,m=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],g=s[l]-e.rects.reference[l],v=Jy(o),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,D=y/2-h[u]/2+(m/2-g/2),L=Ky(d[f],D,y-h[u]-d[p]);e.modifiersData[i]=((n={})[l]=L,n.centerOffset=L-D,n)}},effect:function COe(t){var n=t.state,i=t.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=n.elements.popper.querySelector(r))||vU(n.elements.popper,r)&&(n.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function EOe(t,n,e){void 0===e&&(e=!1);var i=Wc(n),r=Wc(n)&&function TOe(t){var n=t.getBoundingClientRect(),e=Ev(n.width)/t.offsetWidth||1,i=Ev(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),o=Uf(n),s=Av(t,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==Ud(n)||oO(o))&&(a=function DOe(t){return t!==mc(t)&&Wc(t)?function kOe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}(t):iO(t)}(n)),Wc(n)?((l=Av(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):o&&(l.x=rO(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function AOe(t){var n=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=n.get(a);l&&r(l)}}),i.push(o)}return t.forEach(function(o){n.set(o.name,o)}),t.forEach(function(o){e.has(o.name)||r(o)}),i}function OOe(t){var n;return function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(t())})})),n}}var CU={placement:"bottom",modifiers:[],strategy:"absolute"};function SU(){for(var t=arguments.length,n=new Array(t),e=0;e=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[pc,Pu].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,n.rects,o),u},{}),a=s[n.placement],c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=a.x,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}};function XOe(t,n){}function JOe(t,n){if(1&t&&(_(0,"button",3),O(1),Z(2,XOe,0,0,"ng-template",4),x()),2&t){const e=n.$implicit;S("ngbPanelToggle",e),w(1),mn(" ",e.title," "),w(1),S("ngTemplateOutlet",null==e.titleTpl?null:e.titleTpl.templateRef)}}function KOe(t,n){}function QOe(t,n){}function ZOe(t,n){if(1&t){const e=vt();_(0,"div",8),ye("ngbRef",function(r){return Be(e),Ve($().$implicit.panelDiv=r)}),_(1,"div",9),Z(2,QOe,0,0,"ng-template",4),x()()}if(2&t){const e=$().$implicit;Ph("id",e.id),ut("aria-labelledby",e.id+"-header"),w(2),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)}}const eIe=function(t,n){return{$implicit:t,opened:n}};function tIe(t,n){if(1&t&&(_(0,"div")(1,"div",5),Z(2,KOe,0,0,"ng-template",6),x(),Z(3,ZOe,3,3,"div",7),x()),2&t){const e=n.$implicit,i=$(),r=Ta(1);Pd("accordion-item "+(e.cardClass||"")),w(1),Pd("accordion-header "+(e.type?"bg-"+e.type:i.type?"bg-"+i.type:"")),Kp("id","",e.id,"-header"),w(1),S("ngTemplateOutlet",(null==e.headerTpl?null:e.headerTpl.templateRef)||r)("ngTemplateOutletContext",Mr(8,eIe,e,e.isOpen)),w(1),S("ngIf",!i.destroyOnHide||e.isOpen||e.transitionRunning)}}function nIe(t,n){if(1&t){const e=vt();_(0,"button",1),ye("click",function(){return Be(e),Ve($().close())}),x()}}const Qy=["*"];function iIe(t,n){if(1&t){const e=vt();_(0,"button",6),ye("click",function(){const o=Be(e).$implicit,s=$();return s.focus(),Ve(s.select(o.id,s.NgbSlideEventSource.INDICATOR))}),x()}if(2&t){const e=n.$implicit,i=$();jn("active",e.id===i.activeId),ut("aria-labelledby","slide-"+e.id)("aria-controls","slide-"+e.id)("aria-selected",e.id===i.activeId)}}function rIe(t,n){}function oIe(t,n){if(1&t&&(_(0,"div",7)(1,"span",8),Ea(2,9),x(),Z(3,rIe,0,0,"ng-template",10),x()),2&t){const e=n.$implicit,i=n.index,r=n.count;S("id","slide-"+e.id),w(2),cv(i+1)(r),ey(2),w(1),S("ngTemplateOutlet",e.tplRef)}}function sIe(t,n){if(1&t){const e=vt();_(0,"button",11),ye("click",function(){return Be(e),Ve($().arrowLeft())}),pe(1,"span",12),_(2,"span",8),Ea(3,13),x()()}}function aIe(t,n){if(1&t){const e=vt();_(0,"button",14),ye("click",function(){return Be(e),Ve($().arrowRight())}),pe(1,"span",15),_(2,"span",8),Ea(3,16),x()()}}const lIe=["ngbDatepickerDayView",""],cIe=["month"],uIe=["year"];function dIe(t,n){if(1&t&&(_(0,"option",5),O(1),x()),2&t){const e=n.$implicit,i=$();S("value",e),ut("aria-label",i.i18n.getMonthFullName(e,i.date.year)),w(1),bt(i.i18n.getMonthShortName(e,i.date.year))}}function hIe(t,n){if(1&t&&(_(0,"option",5),O(1),x()),2&t){const e=n.$implicit,i=$();S("value",e),w(1),bt(i.i18n.getYearNumerals(e))}}function fIe(t,n){if(1&t){const e=vt();_(0,"ngb-datepicker-navigation-select",7),ye("select",function(r){return Be(e),Ve($().select.emit(r))}),x()}if(2&t){const e=$();S("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function pIe(t,n){1&t&&pe(0,"div",0)}function mIe(t,n){1&t&&pe(0,"div",0)}function gIe(t,n){if(1&t&&(Z(0,pIe,1,0,"div",9),_(1,"div",10),O(2),x(),Z(3,mIe,1,0,"div",9)),2&t){const e=n.$implicit,i=n.index,r=$(2);S("ngIf",i>0),w(2),mn(" ",r.i18n.getMonthLabel(e.firstDate)," "),w(1),S("ngIf",i!==r.months.length-1)}}function vIe(t,n){1&t&&Z(0,gIe,4,3,"ng-template",8),2&t&&S("ngForOf",$().months)}function yIe(t,n){if(1&t&&(_(0,"div",5),O(1),x()),2&t){const e=$(2);w(1),bt(e.i18n.getWeekLabel())}}function _Ie(t,n){if(1&t&&(_(0,"div",6),O(1),x()),2&t){const e=n.$implicit;w(1),bt(e)}}function bIe(t,n){if(1&t&&(_(0,"div",2),Z(1,yIe,2,1,"div",3),Z(2,_Ie,2,1,"div",4),x()),2&t){const e=$();w(1),S("ngIf",e.datepicker.showWeekNumbers),w(1),S("ngForOf",e.viewModel.weekdays)}}function xIe(t,n){if(1&t&&(_(0,"div",11),O(1),x()),2&t){const e=$(2).$implicit,i=$();w(1),bt(i.i18n.getWeekNumerals(e.number))}}function wIe(t,n){}function CIe(t,n){if(1&t&&Z(0,wIe,0,0,"ng-template",14),2&t){const e=$().$implicit;S("ngTemplateOutlet",$(3).datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function SIe(t,n){if(1&t){const e=vt();_(0,"div",12),ye("click",function(r){const s=Be(e).$implicit;return $(3).doSelect(s),Ve(r.preventDefault())}),Z(1,CIe,1,2,"ng-template",13),x()}if(2&t){const e=n.$implicit;jn("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),S("tabindex",e.tabindex),ut("aria-label",e.ariaLabel),w(1),S("ngIf",!e.hidden)}}function kIe(t,n){if(1&t&&(_(0,"div",8),Z(1,xIe,2,1,"div",9),Z(2,SIe,2,9,"div",10),x()),2&t){const e=$().$implicit,i=$();w(1),S("ngIf",i.datepicker.showWeekNumbers),w(1),S("ngForOf",e.days)}}function DIe(t,n){1&t&&Z(0,kIe,3,2,"div",7),2&t&&S("ngIf",!n.$implicit.collapsed)}const TIe=["defaultDayTemplate"],EIe=["content"];function AIe(t,n){if(1&t&&pe(0,"div",8),2&t){const i=n.currentMonth,r=n.selected,o=n.disabled,s=n.focused;S("date",n.date)("currentMonth",i)("selected",r)("disabled",o)("focused",s)}}function MIe(t,n){if(1&t&&(_(0,"div",13),O(1),x()),2&t){const e=$().$implicit,i=$(2);w(1),mn(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function OIe(t,n){if(1&t&&(_(0,"div",10),Z(1,MIe,2,1,"div",11),pe(2,"ngb-datepicker-month",12),x()),2&t){const e=n.$implicit,i=$(2);w(1),S("ngIf","none"===i.navigation||i.displayMonths>1&&"select"===i.navigation),w(1),S("month",e.firstDate)}}function IIe(t,n){1&t&&Z(0,OIe,3,2,"div",9),2&t&&S("ngForOf",$().model.months)}function NIe(t,n){if(1&t){const e=vt();_(0,"ngb-datepicker-navigation",14),ye("navigate",function(r){return Be(e),Ve($().onNavigateEvent(r))})("select",function(r){return Be(e),Ve($().onNavigateDateSelect(r))}),x()}if(2&t){const e=$();S("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect","select"===e.model.navigation)("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function FIe(t,n){}function PIe(t,n){}const DU=function(t){return{$implicit:t}},jIe=["dialog"],RIe=["ngbNavOutlet",""];function LIe(t,n){}function $Ie(t,n){if(1&t&&(_(0,"div",2),Z(1,LIe,0,0,"ng-template",3),x()),2&t){const e=$().$implicit,i=$();S("item",e)("nav",i.nav)("role",i.paneRole),w(1),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",sr(5,DU,e.active||i.isPanelTransitioning(e)))}}function BIe(t,n){if(1&t&&Z(0,$Ie,2,7,"div",1),2&t){const e=n.$implicit,i=$();S("ngIf",e.isPanelInDom()||i.isPanelTransitioning(e))}}function VIe(t,n){1&t&&(_(0,"span",9),Ea(1,10),x())}function HIe(t,n){1&t&&(_(0,"span",9),Ea(1,11),x())}function UIe(t,n){1&t&&(_(0,"span",9),Ea(1,12),x())}function zIe(t,n){1&t&&(_(0,"span",9),Ea(1,13),x())}function GIe(t,n){1&t&&O(0,"...")}function WIe(t,n){1&t&&O(0),2&t&&bt(n.$implicit)}function qIe(t,n){}const YIe=function(t){return{disabled:!0,currentPage:t}};function XIe(t,n){if(1&t&&(_(0,"a",18),Z(1,qIe,0,0,"ng-template",8),x()),2&t){const e=$(2).$implicit,i=$(),r=Ta(9);w(1),S("ngTemplateOutlet",(null==i.tplEllipsis?null:i.tplEllipsis.templateRef)||r)("ngTemplateOutletContext",sr(2,YIe,e))}}function JIe(t,n){}const KIe=function(t,n,e){return{disabled:t,$implicit:n,currentPage:e}};function QIe(t,n){if(1&t){const e=vt();_(0,"a",19),ye("click",function(r){Be(e);const o=$().$implicit;return $(2).selectPage(o),Ve(r.preventDefault())}),Z(1,JIe,0,0,"ng-template",8),x()}if(2&t){const e=$().$implicit,i=$(),r=i.disabled,o=i.$implicit,s=$(),a=Ta(11);ut("tabindex",r?"-1":null)("aria-disabled",r?"true":null),w(1),S("ngTemplateOutlet",(null==s.tplNumber?null:s.tplNumber.templateRef)||a)("ngTemplateOutletContext",ty(4,KIe,r,e,o))}}function ZIe(t,n){if(1&t&&(_(0,"li",15),Z(1,XIe,2,4,"a",16),Z(2,QIe,2,8,"a",17),x()),2&t){const e=n.$implicit,i=$(),r=i.$implicit,o=i.disabled,s=$();jn("active",e===r)("disabled",s.isEllipsis(e)||o),ut("aria-current",e===r?"page":null),w(1),S("ngIf",s.isEllipsis(e)),w(1),S("ngIf",!s.isEllipsis(e))}}function eNe(t,n){1&t&&Z(0,ZIe,3,7,"li",14),2&t&&S("ngForOf",n.pages)}function tNe(t,n){}const uO=function(t,n){return{disabled:t,currentPage:n}};function nNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",20),ye("click",function(r){return Be(e),$().selectPage(1),Ve(r.preventDefault())}),Z(2,tNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(1);jn("disabled",e.previousDisabled()),w(1),ut("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplFirst?null:e.tplFirst.templateRef)||i)("ngTemplateOutletContext",Mr(6,uO,e.previousDisabled(),e.page))}}function iNe(t,n){}const rNe=function(t){return{disabled:t}};function oNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",21),ye("click",function(r){Be(e);const o=$();return o.selectPage(o.page-1),Ve(r.preventDefault())}),Z(2,iNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(3);jn("disabled",e.previousDisabled()),w(1),ut("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplPrevious?null:e.tplPrevious.templateRef)||i)("ngTemplateOutletContext",sr(6,rNe,e.previousDisabled()))}}function sNe(t,n){}function aNe(t,n){}function lNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",22),ye("click",function(r){Be(e);const o=$();return o.selectPage(o.page+1),Ve(r.preventDefault())}),Z(2,aNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(5);jn("disabled",e.nextDisabled()),w(1),ut("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplNext?null:e.tplNext.templateRef)||i)("ngTemplateOutletContext",Mr(6,uO,e.nextDisabled(),e.page))}}function cNe(t,n){}function uNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",23),ye("click",function(r){Be(e);const o=$();return o.selectPage(o.pageCount),Ve(r.preventDefault())}),Z(2,cNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(7);jn("disabled",e.nextDisabled()),w(1),ut("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplLast?null:e.tplLast.templateRef)||i)("ngTemplateOutletContext",Mr(6,uO,e.nextDisabled(),e.page))}}const dNe=function(t,n,e){return{$implicit:t,pages:n,disabled:e}};function pNe(t,n){if(1&t&&(_(0,"span"),Ea(1,1),vA(2,"percent"),x()),2&t){const e=$();w(2),cv(yA(2,1,e.getValue()/e.max)),ey(1)}}function mNe(t,n){1&t&&O(0),2&t&&bt(100===n.fill?"\u2605":"\u2606")}function gNe(t,n){}function vNe(t,n){if(1&t){const e=vt();_(0,"span",2),O(1),x(),_(2,"span",3),ye("mouseenter",function(){const o=Be(e).index;return Ve($().enter(o+1))})("click",function(){const o=Be(e).index;return Ve($().handleClick(o+1))}),Z(3,gNe,0,0,"ng-template",4),x()}if(2&t){const e=n.index,i=$(),r=Ta(1);w(1),mn("(",e=12)("ngIfElse",e)}}function MNe(t,n){if(1&t&&(_(0,"strong",3),O(1),x()),2&t){const e=$();w(1),bt(e.header)}}function ONe(t,n){}function INe(t,n){if(1&t){const e=vt();_(0,"div",4),Z(1,ONe,0,0,"ng-template",5),_(2,"button",6),ye("click",function(){return Be(e),Ve($().hide())}),x()()}if(2&t){const e=$(),i=Ta(1);w(1),S("ngTemplateOutlet",e.contentHeaderTpl||i)}}function NNe(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$().$implicit;Pd($().highlightClass),w(1),bt(e)}}function FNe(t,n){1&t&&O(0),2&t&&bt($().$implicit)}function PNe(t,n){if(1&t&&(Z(0,NNe,2,3,"span",1),Z(1,FNe,1,1,"ng-template",null,2,cs)),2&t){const e=n.odd,i=Ta(2);S("ngIf",e)("ngIfElse",i)}}function Pa(t){return parseInt(`${t}`,10)}function TU(t){return null!=t?`${t}`:""}function n2(t,n,e=0){return Math.max(Math.min(t,n),e)}function mm(t){return"string"==typeof t}function ds(t){return!isNaN(Pa(t))}function Qo(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function gm(t){return null!=t}function Ov(t){return ds(t)?`0${t}`.slice(-2):""}function AU(t,n){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(n)>=0}function Iv(t){return(t||document.body).getBoundingClientRect()}function MU(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const OU={animation:!0,transitionTimerDelayMs:5},HNe=()=>{},{transitionTimerDelayMs:UNe}=OU,Zy=new Map,ea=(t,n,e,i)=>{let r=i.context||{};const o=Zy.get(n);if(o)switch(i.runningTransition){case"continue":return Uh;case"stop":t.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),Zy.delete(n)}const s=e(n,i.animation,r)||HNe;if(!i.animation||"none"===window.getComputedStyle(n).transitionProperty)return t.run(()=>s()),Rn(void 0).pipe(function BNe(t){return n=>new en(e=>n.subscribe({next:s=>t.run(()=>e.next(s)),error:s=>t.run(()=>e.error(s)),complete:()=>t.run(()=>e.complete())}))}(t));const a=new dr,l=new dr,c=a.pipe(function P3e(...t){return n=>oC(n,Rn(...t))}(!0));Zy.set(n,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function VNe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(n);return t.runOutsideAngular(()=>{const d=Fa(n,"transitionend").pipe(Ko(c),us(({target:f})=>f===n));lU(Gy(u+UNe).pipe(Ko(c)),d,l).pipe(Ko(c)).subscribe(()=>{Zy.delete(n),t.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()},dO=(t,n,e)=>{let{direction:i,maxSize:r,dimension:o}=e;const{classList:s}=t;function a(){s.add("collapse"),"show"===i?s.add("show"):s.remove("show")}if(n)return r||(r=function GNe(t,n){if(typeof navigator>"u")return"0px";const{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[n]="";const r=t.getBoundingClientRect()[n]+"px";return i||e.remove("show"),r}(t,o),e.maxSize=r,t.style[o]="show"!==i?r:"0px",s.remove("collapse"),s.remove("collapsing"),s.remove("show"),Iv(t),s.add("collapsing")),t.style[o]="show"===i?r:"0px",()=>{a(),s.remove("collapsing"),t.style[o]=""};a()};let zf=(()=>{class t{constructor(){this.animation=OU.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IU=(()=>{class t{constructor(e){this._ngbConfig=e,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),WNe=0,hO=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPanelHeader",""]],standalone:!0}),t})(),NU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPanelTitle",""]],standalone:!0}),t})(),FU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPanelContent",""]],standalone:!0}),t})(),fO=(()=>{class t{constructor(){this.disabled=!1,this.id="ngb-panel-"+WNe++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new it,this.hidden=new it}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["ngb-panel"]],contentQueries:function(e,i,r){if(1&e&&(yi(r,NU,4),yi(r,hO,4),yi(r,FU,4)),2&e){let o;wn(o=Cn())&&(i.titleTpls=o),wn(o=Cn())&&(i.headerTpls=o),wn(o=Cn())&&(i.contentTpls=o)}},inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},standalone:!0}),t})(),qNe=(()=>{class t{constructor(e){this._El=e,this.ngbRef=new it}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbRef",""]],outputs:{ngbRef:"ngbRef"},standalone:!0}),t})(),PU=(()=>{class t{constructor(e,i){this.accordion=e,this.panel=i}set ngbPanelToggle(e){e&&(this.panel=e)}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>pO)),de(fO,9))},t.\u0275dir=sn({type:t,selectors:[["button","ngbPanelToggle",""]],hostAttrs:["type","button"],hostVars:5,hostBindings:function(e,i){1&e&&ye("click",function(){return i.accordion.toggle(i.panel.id)}),2&e&&(Pl("disabled",i.panel.disabled),ut("aria-expanded",i.panel.isOpen)("aria-controls",i.panel.id),jn("collapsed",!i.panel.isOpen))},inputs:{ngbPanelToggle:"ngbPanelToggle"},standalone:!0}),t})(),pO=(()=>{class t{constructor(e,i,r){this._ngZone=i,this._changeDetector=r,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new it,this.shown=new it,this.hidden=new it,this.animation=e.animation,this.type=e.type,this.closeOtherPanels=e.closeOthers}isExpanded(e){return this.activeIds.indexOf(e)>-1}expand(e){this._changeOpenState(this._findPanelById(e),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(e=>this._changeOpenState(e,!0))}collapse(e){this._changeOpenState(this._findPanelById(e),!1)}collapseAll(){this.panels.forEach(e=>{this._changeOpenState(e,!1)})}toggle(e){const i=this._findPanelById(e);i&&this._changeOpenState(i,!i.isOpen)}ngAfterContentChecked(){mm(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(e=>{e.isOpen=!e.disabled&&this.activeIds.indexOf(e.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe(Ks(1)).subscribe(()=>{this.panels.forEach(e=>{const i=e.panelDiv;i?e.initClassDone||(e.initClassDone=!0,ea(this._ngZone,i,dO,{animation:!1,runningTransition:"continue",context:{direction:e.isOpen?"show":"hide",dimension:"height"}})):e.initClassDone=!1})})}_changeOpenState(e,i){if(null!=e&&!e.disabled&&e.isOpen!==i){let r=!1;this.panelChange.emit({panelId:e.id,nextState:i,preventDefault:()=>{r=!0}}),r||(e.isOpen=i,e.transitionRunning=!0,i&&this.closeOtherPanels&&this._closeOthers(e.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(e,i=!0){this.panels.forEach(r=>{r.id!==e&&r.isOpen&&(r.isOpen=!1,r.transitionRunning=i)})}_findPanelById(e){return this.panels.find(i=>i.id===e)||null}_updateActiveIds(){this.activeIds=this.panels.filter(e=>e.isOpen&&!e.disabled).map(e=>e.id)}_runTransitions(e){this._changeDetector.detectChanges(),this.panels.forEach(i=>{i.transitionRunning&&ea(this._ngZone,i.panelDiv,dO,{animation:e,runningTransition:"stop",context:{direction:i.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{i.transitionRunning=!1;const{id:o}=i;i.isOpen?(i.shown.emit(),this.shown.emit(o)):(i.hidden.emit(),this.hidden.emit(o))})})}}return t.\u0275fac=function(e){return new(e||t)(de(IU),de(nr),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-accordion"]],contentQueries:function(e,i,r){if(1&e&&yi(r,fO,4),2&e){let o;wn(o=Cn())&&(i.panels=o)}},hostAttrs:["role","tablist",1,"accordion"],hostVars:1,hostBindings:function(e,i){2&e&&ut("aria-multiselectable",!i.closeOtherPanels)},inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0,features:[Is],decls:3,vars:1,consts:[["ngbPanelHeader",""],["t",""],["ngFor","",3,"ngForOf"],[1,"accordion-button",3,"ngbPanelToggle"],[3,"ngTemplateOutlet"],["role","tab",3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","tabpanel",3,"id","ngbRef",4,"ngIf"],["role","tabpanel",3,"id","ngbRef"],[1,"accordion-body"]],template:function(e,i){1&e&&(Z(0,JOe,3,3,"ng-template",0,1,cs),Z(2,tIe,4,11,"ng-template",2)),2&e&&(w(2),S("ngForOf",i.panels))},dependencies:[Ln,Au,PU,qNe,hO,vn],encapsulation:2}),t})(),$U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[pO]}),t})();const ZNe=({classList:t})=>{t.remove("show")};let eFe=(()=>{class t{constructor(e){this._ngbConfig=e,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),po=(()=>{class t{constructor(e,i,r,o){this._renderer=i,this._element=r,this._zone=o,this.closed=new it,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=ea(this._zone,this._element.nativeElement,ZNe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(de(eFe),de(ca),de(Si),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&jn("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],standalone:!0,features:[Yn,Is],ngContentSelectors:Qy,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close:Close`,[["type","button","class","btn-close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kf(),Df(0),Z(1,nIe,1,0,"button",0)),2&e&&(w(1),S("ngIf",i.dismissible))},dependencies:[vn],styles:["ngb-alert{display:block}\n"],encapsulation:2,changeDetection:0}),t})(),BU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[po]}),t})();var Gf=(()=>(function(t){t.START="start",t.END="end"}(Gf||(Gf={})),Gf))();const VU=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),e_=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},i2=t=>{e_(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},tFe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(VU(t)?e_(i):(i.add("carousel-item-"+(e===Gf.START?"next":"prev")),Iv(t),i.add("carousel-item-"+e)),()=>{i2(i),i.add("active")}):(e_(i),i2(i),void i.add("active"))},nFe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(VU(t)?e_(i):i.add("carousel-item-"+e),()=>{i2(i),i.remove("active")}):(e_(i),i2(i),void i.remove("active"))};let iFe=(()=>{class t{constructor(e){this._ngbConfig=e,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),rFe=0,oFe=(()=>{class t{constructor(e){this.tplRef=e,this.id="ngb-slide-"+rFe++,this.slid=new it}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbSlide",""]],inputs:{id:"id"},outputs:{slid:"slid"},standalone:!0}),t})(),sFe=(()=>{class t{constructor(e,i,r,o,s){this._platformId=i,this._ngZone=r,this._cd=o,this._container=s,this.NgbSlideEventSource=ym,this._destroy$=new dr,this._interval$=new Js(0),this._mouseHover$=new Js(!1),this._focused$=new Js(!1),this._pauseOnHover$=new Js(!1),this._pauseOnFocus$=new Js(!1),this._pause$=new Js(!1),this._wrap$=new Js(!1),this.slide=new it,this.slid=new it,this._transitionIds=null,this.animation=e.animation,this.interval=e.interval,this.wrap=e.wrap,this.keyboard=e.keyboard,this.pauseOnHover=e.pauseOnHover,this.pauseOnFocus=e.pauseOnFocus,this.showNavigationArrows=e.showNavigationArrows,this.showNavigationIndicators=e.showNavigationIndicators}set interval(e){this._interval$.next(e)}get interval(){return this._interval$.value}set wrap(e){this._wrap$.next(e)}get wrap(){return this._wrap$.value}set pauseOnHover(e){this._pauseOnHover$.next(e)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(e){this._pauseOnFocus$.next(e)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(e){this._mouseHover$.next(e)}get mouseHover(){return this._mouseHover$.value}set focused(e){this._focused$.next(e)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(ym.ARROW_LEFT)}arrowRight(){this.focus(),this.next(ym.ARROW_RIGHT)}ngAfterContentInit(){p7(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const e=rC([this.slide.pipe(_n(i=>i.current),aC(this.activeId)),this._wrap$,this.slides.changes.pipe(aC(null))]).pipe(_n(([i,r])=>{const o=this.slides.toArray(),s=this._getSlideIdxById(i);return r?o.length>1:si||r&&o||s&&a||!c?0:l),JC(),dc(i=>i>0?Gy(i,i):cU),Ko(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(ym.TIMER)))}),this.slides.changes.pipe(Ko(this._destroy$)).subscribe(()=>{this._transitionIds?.forEach(e=>(t=>{Zy.get(t)?.complete()})(this._getSlideElement(e))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe(Ks(1)).subscribe(()=>{for(const{id:e}of this.slides){const i=this._getSlideElement(e);e===this.activeId?i.classList.add("active"):i.classList.remove("active")}})})}ngAfterContentChecked(){let e=this._getSlideById(this.activeId);this.activeId=e?e.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const e=this._getSlideElement(this.activeId);e&&e.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(e,i){this._cycleToSelected(e,this._getSlideEventDirection(this.activeId,e),i)}prev(e){this._cycleToSelected(this._getPrevSlide(this.activeId),Gf.END,e)}next(e){this._cycleToSelected(this._getNextSlide(this.activeId),Gf.START,e)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(e,i,r){const o=this._transitionIds;if(o&&(o[0]!==e||o[1]!==this.activeId))return;let s=this._getSlideById(e);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,e],this.slide.emit({prev:this.activeId,current:s.id,direction:i,paused:this._pause$.value,source:r});const a={animation:this.animation,runningTransition:"stop",context:{direction:i}},l=[],c=this._getSlideById(this.activeId);if(c){const f=ea(this._ngZone,this._getSlideElement(c.id),nFe,a);f.subscribe(()=>{c.slid.emit({isShown:!1,direction:i,source:r})}),l.push(f)}const u=this.activeId;this.activeId=s.id;const d=this._getSlideById(this.activeId),h=ea(this._ngZone,this._getSlideElement(s.id),tFe,a);h.subscribe(()=>{d?.slid.emit({isShown:!0,direction:i,source:r})}),l.push(h),KC(...l).pipe(Ks(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:u,current:s.id,direction:i,paused:this._pause$.value,source:r})})}this._cd.markForCheck()}_getSlideEventDirection(e,i){return this._getSlideIdxById(e)>this._getSlideIdxById(i)?Gf.END:Gf.START}_getSlideById(e){return this.slides.find(i=>i.id===e)||null}_getSlideIdxById(e){const i=this._getSlideById(e);return null!=i?this.slides.toArray().indexOf(i):-1}_getNextSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return r===i.length-1?this.wrap?i[0].id:i[i.length-1].id:i[r+1].id}_getPrevSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return 0===r?this.wrap?i[i.length-1].id:i[0].id:i[r-1].id}_getSlideElement(e){return this._container.nativeElement.querySelector(`#slide-${e}`)}}return t.\u0275fac=function(e){return new(e||t)(de(iFe),de(sy),de(nr),de(Ns),de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-carousel"]],contentQueries:function(e,i,r){if(1&e&&yi(r,oFe,4),2&e){let o;wn(o=Cn())&&(i.slides=o)}},hostAttrs:["tabIndex","0",1,"carousel","slide"],hostVars:3,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(){return i.keyboard&&i.arrowLeft()})("keydown.arrowRight",function(){return i.keyboard&&i.arrowRight()})("mouseenter",function(){return i.mouseHover=!0})("mouseleave",function(){return i.mouseHover=!1})("focusin",function(){return i.focused=!0})("focusout",function(){return i.focused=!1}),2&e&&(ut("aria-activedescendant","slide-"+i.activeId),tr("display","block"))},inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},exportAs:["ngbCarousel"],standalone:!0,features:[Is],decls:6,vars:6,consts:function(){let n,e,i;return n=$localize`:Currently selected slide number read by screen reader@@ngb.carousel.slide-number: Slide ${"\ufffd0\ufffd"}:INTERPOLATION: of ${"\ufffd1\ufffd"}:INTERPOLATION_1: `,e=$localize`:@@ngb.carousel.previous:Previous`,i=$localize`:@@ngb.carousel.next:Next`,[["role","tablist",1,"carousel-indicators"],["type","button","data-bs-target","","role","tab",3,"active","click",4,"ngFor","ngForOf"],[1,"carousel-inner"],["class","carousel-item","role","tabpanel",3,"id",4,"ngFor","ngForOf"],["class","carousel-control-prev","type","button",3,"click",4,"ngIf"],["class","carousel-control-next","type","button",3,"click",4,"ngIf"],["type","button","data-bs-target","","role","tab",3,"click"],["role","tabpanel",1,"carousel-item",3,"id"],[1,"visually-hidden"],n,[3,"ngTemplateOutlet"],["type","button",1,"carousel-control-prev",3,"click"],["aria-hidden","true",1,"carousel-control-prev-icon"],e,["type","button",1,"carousel-control-next",3,"click"],["aria-hidden","true",1,"carousel-control-next-icon"],i]},template:function(e,i){1&e&&(_(0,"div",0),Z(1,iIe,1,5,"button",1),x(),_(2,"div",2),Z(3,oIe,4,4,"div",3),x(),Z(4,sIe,4,0,"button",4),Z(5,aIe,4,0,"button",5)),2&e&&(jn("visually-hidden",!i.showNavigationIndicators),w(1),S("ngForOf",i.slides),w(2),S("ngForOf",i.slides),w(1),S("ngIf",i.showNavigationArrows),w(1),S("ngIf",i.showNavigationArrows))},dependencies:[Ln,Au,vn],encapsulation:2,changeDetection:0}),t})();var ym=(()=>(function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(ym||(ym={})),ym))();let HU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[sFe]}),t})(),UU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();class ta{constructor(n,e,i){this.year=Qo(n)?n:null,this.month=Qo(e)?e:null,this.day=Qo(i)?i:null}static from(n){return n instanceof ta?n:n?new ta(n.year,n.month,n.day):null}equals(n){return null!=n&&this.year===n.year&&this.month===n.month&&this.day===n.day}before(n){return!!n&&(this.year===n.year?this.month===n.month?this.day!==n.day&&this.dayn.day:this.month>n.month:this.year>n.year)}}function Nv(t,n){return!function aFe(t,n){return!t&&!n||!!t&&!!n&&t.equals(n)}(t,n)}function zU(t,n){return!(!t&&!n||t&&n&&t.year===n.year&&t.month===n.month)}function r2(t,n,e){return t&&n&&t.before(n)?n:t&&e&&t.after(e)?e:t||null}function gO(t,n){const{minDate:e,maxDate:i,disabled:r,markDisabled:o}=n;return!(null==t||r||o&&o(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function GU(t){return new ta(t.getFullYear(),t.getMonth()+1,t.getDate())}function o2(t){const n=new Date(t.year,t.month-1,t.day,12);return isNaN(n.getTime())||n.setFullYear(t.year),n}let s2=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function gFe(){return new vFe}()},providedIn:"root"}),t})(),vFe=(()=>{class t extends s2{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",r=1){let o=o2(e),s=!0,a=o.getMonth();switch(i){case"y":o.setFullYear(o.getFullYear()+r);break;case"m":a+=r,o.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":o.setDate(o.getDate()+r),s=!1;break;default:return e}return s&&o.getMonth()!==a&&o.setDate(0),GU(o)}getPrev(e,i="d",r=1){return this.getNext(e,i,-r)}getWeekday(e){let r=o2(e).getDay();return 0===r?7:r}getWeekNumber(e,i){7===i&&(i=0);const s=o2(e[(11-i)%7]);s.setDate(s.getDate()+4-(s.getDay()||7));const a=s.getTime();return s.setMonth(0),s.setDate(1),Math.floor(Math.round((a-s.getTime())/864e5)/7)+1}getToday(){return GU(new Date)}isValid(e){if(!(e&&Qo(e.year)&&Qo(e.month)&&Qo(e.day)&&0!==e.year))return!1;const i=o2(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),_m=(()=>{class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function yFe(t){return new _Fe(t)}(gt(lc)),i},providedIn:"root"}),t})(),_Fe=(()=>{class t extends _m{constructor(e){super(),this._locale=e,this._monthsShort=JA(e,Ro.Standalone,Vi.Abbreviated),this._monthsFull=JA(e,Ro.Standalone,Vi.Wide)}getWeekdayLabel(e,i){const r=qB(this._locale,Ro.Standalone,void 0===i?Vi.Short:i);return r.map((s,a)=>r[(a+1)%7])[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){return XB(new Date(e.year,e.month-1,e.day),"fullDate",this._locale)}}return t.\u0275fac=function(e){return new(e||t)(gt(lc))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),vO=(()=>{class t{constructor(e,i){this._calendar=e,this._i18n=i,this._VALIDATORS={dayTemplateData:r=>{if(this._state.dayTemplateData!==r)return{dayTemplateData:r}},displayMonths:r=>{if(Qo(r=Pa(r))&&r>0&&this._state.displayMonths!==r)return{displayMonths:r}},disabled:r=>{if(this._state.disabled!==r)return{disabled:r}},firstDayOfWeek:r=>{if(Qo(r=Pa(r))&&r>=0&&this._state.firstDayOfWeek!==r)return{firstDayOfWeek:r}},focusVisible:r=>{if(this._state.focusVisible!==r&&!this._state.disabled)return{focusVisible:r}},markDisabled:r=>{if(this._state.markDisabled!==r)return{markDisabled:r}},maxDate:r=>{const o=this.toValidDate(r,null);if(Nv(this._state.maxDate,o))return{maxDate:o}},minDate:r=>{const o=this.toValidDate(r,null);if(Nv(this._state.minDate,o))return{minDate:o}},navigation:r=>{if(this._state.navigation!==r)return{navigation:r}},outsideDays:r=>{if(this._state.outsideDays!==r)return{outsideDays:r}},weekdays:r=>{const o=!0===r||!1===r?Vi.Short:r,s=!0!==r&&!1!==r||r;if(this._state.weekdayWidth!==o||this._state.weekdaysVisible!==s)return{weekdayWidth:o,weekdaysVisible:s}}},this._model$=new dr,this._dateSelect$=new dr,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:Vi.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe(us(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(us(e=>null!==e))}set(e){let i=Object.keys(e).map(r=>this._VALIDATORS[r](e[r])).reduce((r,o)=>({...r,...o}),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){const i=this.toValidDate(e,null);null!=i&&!this._state.disabled&&Nv(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){gO(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){const i=this.toValidDate(e,this._calendar.getToday());null!=i&&!this._state.disabled&&(!this._state.firstDate||zU(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){const r=this.toValidDate(e,null);null!=r&&!this._state.disabled&&(Nv(this._state.selectedDate,r)&&this._nextState({selectedDate:r}),i.emitEvent&&gO(r,this._state)&&this._dateSelect$.next(r))}toValidDate(e,i){const r=ta.from(e);return void 0===i&&(i=this._calendar.getToday()),this._calendar.isValid(r)?r:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){const i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){const{months:i,displayMonths:r,selectedDate:o,focusDate:s,focusVisible:a,disabled:l,outsideDays:c}=e;e.months.forEach(u=>{u.weeks.forEach(d=>{d.days.forEach(h=>{s&&(h.context.focused=s.equals(h.date)&&a),h.tabindex=!l&&s&&h.date.equals(s)&&s.month===u.number?0:-1,!0===l&&(h.context.disabled=!0),void 0!==o&&(h.context.selected=null!==o&&o.equals(h.date)),u.number!==h.date.month&&(h.hidden="hidden"===c||"collapsed"===c||r>1&&h.date.after(i[0].firstDate)&&h.date.before(i[r-1].lastDate))})})})}_updateState(e){const i=Object.assign({},this._state,e);let r=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(function lFe(t,n){if(n&&t&&n.before(t))throw new Error(`'maxDate' ${n} should be greater than 'minDate' ${t}`)}(i.minDate,i.maxDate),i.focusDate=r2(i.focusDate,i.minDate,i.maxDate),i.firstDate=r2(i.firstDate,i.minDate,i.maxDate),r=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(r=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=r2(i.focusDate,i.minDate,i.maxDate),r=i.focusDate,0!==i.months.length&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=r2(i.firstDate,i.minDate,i.maxDate),r=i.firstDate),r){const s=function fFe(t,n,e,i,r){const{displayMonths:o,months:s}=e,a=s.splice(0,s.length);return Array.from({length:o},(c,u)=>{const d=Object.assign(t.getNext(n,"m",u),{day:1});if(s[u]=null,!r){const h=a.findIndex(f=>f.firstDate.equals(d));-1!==h&&(s[u]=a.splice(h,1)[0])}return d}).forEach((c,u)=>{null===s[u]&&(s[u]=function pFe(t,n,e,i,r={}){const{dayTemplateData:o,minDate:s,maxDate:a,firstDayOfWeek:l,markDisabled:c,outsideDays:u,weekdayWidth:d,weekdaysVisible:h}=e,f=t.getToday();r.firstDate=null,r.lastDate=null,r.number=n.month,r.year=n.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],n=function mFe(t,n,e){const i=t.getDaysPerWeek(),r=new ta(n.year,n.month,1),o=t.getWeekday(r)%i;return t.getPrev(r,"d",(i+o-e)%i)}(t,n,l),h||(r.weekdays.length=0);for(let p=0;pv.date),l),m.collapsed="collapsed"===u&&g[0].date.month!==r.number&&g[g.length-1].date.month!==r.number}return r}(t,c,e,i,a.shift()||{}))}),s}(this._calendar,r,i,this._i18n,"dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e);i.months=s,i.firstDate=s[0].firstDate,i.lastDate=s[s.length-1].lastDate,"selectedDate"in e&&!gO(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=r);const a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;"select"===i.navigation?(("minDate"in e||"maxDate"in e||0===i.selectBoxes.years.length||a)&&(i.selectBoxes.years=function uFe(t,n,e){if(!t)return[];const i=n?Math.max(n.year,t.year-500):t.year-10,o=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,s=Array(o);for(let a=0;as===e.month);r=r.slice(o)}if(i&&n.year===i.year){const o=r.findIndex(s=>s===i.month);r=r.slice(0,o+1)}return r}(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},("arrows"===i.navigation||"select"===i.navigation)&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||function hFe(t,n,e){const i=Object.assign(t.getPrev(n,"m"),{day:1});return null!=e&&(i.year===e.year&&i.month(function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Fv||(Fv={})),Fv))();let bFe=(()=>{class t{constructor(e){this.i18n=e}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}return t.\u0275fac=function(e){return new(e||t)(de(_m))},t.\u0275cmp=Rt({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(e,i){2&e&&jn("bg-primary",i.selected)("text-white",i.selected)("text-muted",i.isMuted())("outside",i.isMuted())("active",i.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},standalone:!0,features:[Is],attrs:lIe,decls:1,vars:1,template:function(e,i){1&e&&O(0),2&e&&bt(i.i18n.getDayNumerals(i.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),xFe=(()=>{class t{constructor(e,i){this.i18n=e,this._renderer=i,this.select=new it,this._month=-1,this._year=-1}changeMonth(e){this.select.emit(new ta(this.date.year,Pa(e),1))}changeYear(e){this.select.emit(new ta(Pa(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}return t.\u0275fac=function(e){return new(e||t)(de(_m),de(ca))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(e,i){if(1&e&&(xo(cIe,7,Si),xo(uIe,7,Si)),2&e){let r;wn(r=Cn())&&(i.monthSelect=r.first),wn(r=Cn())&&(i.yearSelect=r.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},standalone:!0,features:[Is],decls:6,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.select-month:Select month`,e=$localize`:@@ngb.datepicker.select-month:Select month`,i=$localize`:@@ngb.datepicker.select-year:Select year`,r=$localize`:@@ngb.datepicker.select-year:Select year`,[["aria-label",n,"title",e,1,"form-select",3,"disabled","change"],["month",""],[3,"value",4,"ngFor","ngForOf"],["aria-label",i,"title",r,1,"form-select",3,"disabled","change"],["year",""],[3,"value"]]},template:function(e,i){1&e&&(_(0,"select",0,1),ye("change",function(o){return i.changeMonth(o.target.value)}),Z(2,dIe,2,3,"option",2),x(),_(3,"select",3,4),ye("change",function(o){return i.changeYear(o.target.value)}),Z(5,hIe,2,2,"option",2),x()),2&e&&(S("disabled",i.disabled),w(2),S("ngForOf",i.months),w(1),S("disabled",i.disabled),w(2),S("ngForOf",i.years))},dependencies:[Ln],styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],encapsulation:2,changeDetection:0}),t})(),wFe=(()=>{class t{constructor(e){this.i18n=e,this.navigation=Fv,this.months=[],this.navigate=new it,this.select=new it}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}return t.\u0275fac=function(e){return new(e||t)(de(_m))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},standalone:!0,features:[Is],decls:8,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.previous-month:Previous month`,e=$localize`:@@ngb.datepicker.previous-month:Previous month`,i=$localize`:@@ngb.datepicker.next-month:Next month`,r=$localize`:@@ngb.datepicker.next-month:Next month`,[[1,"ngb-dp-arrow"],["type","button","aria-label",n,"title",e,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["type","button","aria-label",i,"title",r,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"button",1),ye("click",function(o){return i.onClickPrev(o)}),pe(2,"span",2),x()(),Z(3,fIe,1,4,"ngb-datepicker-navigation-select",3),Z(4,vIe,1,1,null,4),_(5,"div",5)(6,"button",6),ye("click",function(o){return i.onClickNext(o)}),pe(7,"span",2),x()()),2&e&&(w(1),S("disabled",i.prevDisabled),w(2),S("ngIf",i.showSelect),w(1),S("ngIf",!i.showSelect),w(2),S("disabled",i.nextDisabled))},dependencies:[vn,Ln,xFe],styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],encapsulation:2,changeDetection:0}),t})();var Or=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(Or||(Or={})),Or))();let CFe=(()=>{class t{processKey(e,i){const{state:r,calendar:o}=i;switch(e.which){case Or.PageUp:i.focusDate(o.getPrev(r.focusedDate,e.shiftKey?"y":"m",1));break;case Or.PageDown:i.focusDate(o.getNext(r.focusedDate,e.shiftKey?"y":"m",1));break;case Or.End:i.focusDate(e.shiftKey?r.maxDate:r.lastDate);break;case Or.Home:i.focusDate(e.shiftKey?r.minDate:r.firstDate);break;case Or.ArrowLeft:i.focusDate(o.getPrev(r.focusedDate,"d",1));break;case Or.ArrowUp:i.focusDate(o.getPrev(r.focusedDate,"d",o.getDaysPerWeek()));break;case Or.ArrowRight:i.focusDate(o.getNext(r.focusedDate,"d",1));break;case Or.ArrowDown:i.focusDate(o.getNext(r.focusedDate,"d",o.getDaysPerWeek()));break;case Or.Enter:case Or.Space:i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yO=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=Vi.Short}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_O=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function SFe(){return new kFe}()},providedIn:"root"}),t})(),kFe=(()=>{class t extends _O{fromModel(e){return e&&Qo(e.year)&&Qo(e.month)&&Qo(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&Qo(e.year)&&Qo(e.month)&&Qo(e.day)?{year:e.year,month:e.month,day:e.day}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),WU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbDatepickerContent",""]],standalone:!0}),t})(),bO=(()=>{class t{constructor(e,i,r,o){this.i18n=e,this.datepicker=i,this._keyboardService=r,this._service=o}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){!e.context.disabled&&!e.hidden&&this.datepicker.onDateSelect(e.date)}}return t.\u0275fac=function(e){return new(e||t)(de(_m),de(Mi(()=>a2)),de(CFe),de(vO))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(e,i){1&e&&ye("keydown",function(o){return i.onKeyDown(o)})},inputs:{month:"month"},standalone:!0,features:[Is],decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek small",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(Z(0,bIe,3,2,"div",0),Z(1,DIe,1,1,"ng-template",1)),2&e&&(S("ngIf",i.viewModel.weekdays.length>0),w(1),S("ngForOf",i.viewModel.weeks))},dependencies:[vn,Ln,Au],styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],encapsulation:2}),t})(),a2=(()=>{class t{constructor(e,i,r,o,s,a,l,c){this._service=e,this._calendar=i,this._i18n=r,this._elementRef=a,this._ngbDateAdapter=l,this._ngZone=c,this.injector=Fi(ua),this._controlValue=null,this._destroyed$=new dr,this._publicState={},this.navigate=new it,this.dateSelect=new it,this.onChange=u=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(u=>this[u]=o[u]),e.dateSelect$.pipe(Ko(this._destroyed$)).subscribe(u=>{this.dateSelect.emit(u)}),e.model$.pipe(Ko(this._destroyed$)).subscribe(u=>{const d=u.firstDate,h=this.model?this.model.firstDate:null;this._publicState={maxDate:u.maxDate,minDate:u.minDate,firstDate:u.firstDate,lastDate:u.lastDate,focusedDate:u.focusDate,months:u.months.map(v=>v.firstDate)};let f=!1;if(!d.equals(h)&&(this.navigate.emit({current:h?{year:h.year,month:h.month}:null,next:{year:d.year,month:d.month},preventDefault:()=>f=!0}),f&&null!==h))return void this._service.open(h);const p=u.selectedDate,m=u.focusDate,g=this.model?this.model.focusDate:null;this.model=u,Nv(p,this._controlValue)&&(this._controlValue=p,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(p))),Nv(m,g)&&g&&u.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(e){this._service.focus(ta.from(e))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()})}navigateTo(e){this._service.open(ta.from(e?e.day?e:{...e,day:1}:null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const e=Fa(this._contentEl.nativeElement,"focusin"),i=Fa(this._contentEl.nativeElement,"focusout"),{nativeElement:r}=this._elementRef;Dt(e,i).pipe(us(({target:o,relatedTarget:s})=>!(AU(o,"ngb-dp-day")&&AU(s,"ngb-dp-day")&&r.contains(o)&&r.contains(s))),Ko(this._destroyed$)).subscribe(({type:o})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===o})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(i=>e[i]=this[i]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(e){const i={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(r=>r in e).forEach(r=>i[r]=this[r]),this._service.set(i),"startDate"in e){const{currentValue:r,previousValue:o}=e.startDate;zU(o,r)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case Fv.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Fv.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=ta.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}}return t.\u0275fac=function(e){return new(e||t)(de(vO),de(s2),de(_m),de(yO),de(Ns),de(Si),de(_O),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker"]],contentQueries:function(e,i,r){if(1&e&&yi(r,WU,7),2&e){let o;wn(o=Cn())&&(i.contentTemplateFromContent=o.first)}},viewQuery:function(e,i){if(1&e&&(xo(TIe,7),xo(EIe,7)),2&e){let r;wn(r=Cn())&&(i._defaultDayTemplate=r.first),wn(r=Cn())&&(i._contentEl=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("disabled",i.model.disabled)},inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},exportAs:["ngbDatepicker"],standalone:!0,features:[Qr([{provide:$l,useExisting:Mi(()=>t),multi:!0},vO]),Yn,Is],decls:10,vars:9,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(e,i){if(1&e&&(Z(0,AIe,1,5,"ng-template",null,0,cs),Z(2,IIe,1,1,"ng-template",null,1,cs),_(4,"div",2),Z(5,NIe,1,7,"ngb-datepicker-navigation",3),x(),_(6,"div",4,5),Z(8,FIe,0,0,"ng-template",6),x(),Z(9,PIe,0,0,"ng-template",7)),2&e){const r=Ta(3);w(5),S("ngIf","none"!==i.navigation),w(1),jn("ngb-dp-months",!i.contentTemplate),w(2),S("ngTemplateOutlet",i.contentTemplate||(null==i.contentTemplateFromContent?null:i.contentTemplateFromContent.templateRef)||r)("ngTemplateOutletContext",sr(7,DU,i))("ngTemplateOutletInjector",i.injector),w(1),S("ngTemplateOutlet",i.footerTemplate)}},dependencies:[vn,Ln,Au,bFe,bO,wFe],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],encapsulation:2,changeDetection:0}),t})();const l2=(t,n)=>!!n&&n.some(e=>e.contains(t)),qU=(t,n)=>!n||null!=function $Ne(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),DFe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),TFe=t=>DFe?()=>setTimeout(()=>t(),100):t;function xO(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(TFe(()=>{const c=Fa(n,"keydown").pipe(Ko(r),us(h=>h.which===Or.Escape),xs(h=>h.preventDefault())),u=Fa(n,"mousedown").pipe(_n(h=>{const f=h.target;return 2!==h.button&&!l2(f,s)&&("inside"===e?l2(f,o)&&qU(f,a):"outside"===e?!l2(f,o):qU(f,a)||!l2(f,o))}),Ko(r)),d=Fa(n,"mouseup").pipe(K3(u),us(([h,f])=>f),Q3(0),Ko(r));lU([c.pipe(_n(h=>0)),d.pipe(_n(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const YU=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function XU(t){const n=Array.from(t.querySelectorAll(YU)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}let EFe=(()=>{class t{constructor(e){this._element=e.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const AFe=/\s+/,MFe=/ +/gi,OFe={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},NFe=/^left/,FFe=/^right/,PFe=/^start/,jFe=/^end/;function KU({placement:t,baseClass:n},e){let i=Array.isArray(t)?t:t.split(AFe),o=i.findIndex(c=>"auto"===c);o>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(c){null==i.find(u=>-1!==u.search("^"+c))&&i.splice(o++,1,c)});const s=i.map(c=>function IFe(t,n){const[e,i]=OFe[t];return n&&i||e}(c,e.isRTL()));return{placement:s.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!n,phase:"write",fn({state:c}){const u=new RegExp(n+"(-[a-z]+)*","gi"),d=c.elements.popper,h=c.placement;let f=d.className;f=f.replace(u,""),f+=` ${function RFe(t,n){let[e,i]=n.split("-");const r=e.replace(NFe,"start").replace(FFe,"end");let o=[r];if(i){let s=i;("left"===e||"right"===e)&&(s=s.replace(PFe,"top").replace(jFe,"bottom")),o.push(`${r}-${s}`)}return t&&(o=o.map(s=>`${t}-${s}`)),o.join(" ")}(n,h)}`,f=f.trim().replace(MFe," "),d.className=f}},gOe,bOe,SOe,{enabled:!0,name:"flip",options:{fallbackPlacements:s}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function QU(t){return t}function wO(){const t=Fi(EFe);let n=null;return{createPopper(e){if(!n){let r=(e.updatePopperOptions||QU)(KU(e,t));n=GOe(e.hostElement,e.targetElement,r)}},update(){n&&n.update()},setOptions(e){if(n){let r=(e.updatePopperOptions||QU)(KU(e,t));n.setOptions(r)}},destroy(){n&&(n.destroy(),n=null)}}}new Date(1882,10,12),new Date(2174,10,25);let az=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[a2,bO]}),t})(),YFe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Wf=(()=>{class t{constructor(e,i){this.elementRef=e,this._renderer=i,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(e,i){2&e&&(Pl("tabIndex",i.disabled?-1:0),jn("disabled",i.disabled))},inputs:{disabled:"disabled"},standalone:!0}),t})(),qf=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>Ru)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&yi(r,Wf,4),2&e){let o;wn(o=Cn())&&(i.menuItems=o)}},hostVars:4,hostBindings:function(e,i){1&e&&ye("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&jn("dropdown-menu",!0)("show",i.dropdown.isOpen())},standalone:!0}),t})(),h2=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>Ru)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&ut("aria-expanded",i.dropdown.isOpen())},standalone:!0}),t})(),wm=(()=>{class t extends h2{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>Ru)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&ut("aria-expanded",i.dropdown.isOpen())},standalone:!0,features:[Qr([{provide:h2,useExisting:Mi(()=>t)}]),pi]}),t})(),Ru=(()=>{class t{constructor(e,i,r,o,s,a){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._destroyCloseHandlers$=new dr,this._bodyContainer=null,this._open=!1,this.openChange=new it,this.placement=i.placement,this.popperOptions=i.popperOptions,this.container=i.container,this.autoClose=i.autoClose,this._positioning=wO(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe(Ks(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),e.dropdownClass){const{currentValue:i,previousValue:r}=e.dropdownClass;this._applyCustomDropdownClass(i,r)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:e=>this.popperOptions(function ez(t){return n=>(n.modifiers.push(YOe,{name:"offset",options:{offset:()=>t}}),n)}([0,2])(e))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),xO(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==Or.Space&&i!==Or.Enter){if(i!==Or.Tab){if(a||s){if(this.open(),r.length){switch(i){case Or.ArrowDown:o=Math.min(o+1,r.length-1);break;case Or.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case Or.Home:o=0;break;case Or.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(YU);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Fa(e.target,"focusout").pipe(Ks(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Fa(s,"click").pipe(Ks(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;this._menu&&e.appendChild(this._elementRef.nativeElement,this._menu.nativeElement),this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1055"),i.appendChild(o,r),i.appendChild(this._document.body,o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,i){const r="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;r&&(i&&this._renderer.removeClass(r,i),e&&this._renderer.addClass(r,e))}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown");const{nativeElement:s}=i;"static"===this.display?(i.placement=null,r.setAttribute(s,"data-bs-popper","static")):(i.placement=e,r.removeAttribute(s,"data-bs-popper"));const a=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,a);const l=this._bodyContainer;l&&(r.removeClass(l,"dropup"),r.removeClass(l,"dropdown"),r.addClass(l,a))}}}return t.\u0275fac=function(e){return new(e||t)(de(Ns),de(YFe),de(co),de(nr),de(Si),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(yi(r,qf,5),yi(r,h2,5)),2&e){let o;wn(o=Cn())&&(i._menu=o.first),wn(o=Cn())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("show",i.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],standalone:!0,features:[Yn]}),t})(),lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();class Cm{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class XFe{constructor(n,e,i,r,o,s){this._componentType=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:r}=this._windowRef.location,o=this._ngZone.onStable.pipe(Ks(1),et(()=>ea(this._ngZone,r,({classList:s})=>s.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:o}}close(n=!1){return this._windowRef?ea(this._ngZone,this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(xs(()=>{this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),this._contentRef?.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):Rn(void 0)}_getContentRef(n,e){if(n){if(n instanceof oo){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new Cm([i.rootNodes],i)}return new Cm([[this._renderer.createText(`${n}`)]])}return new Cm([])}}let JFe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{ea(this._zone,this._el.nativeElement,(e,i)=>{i&&Iv(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return ea(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(e,i){2&e&&(Pd("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),jn("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[Is],decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class cz{update(n){}close(n){}dismiss(n){}}const KFe=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],QFe=["animation","backdropClass"];class ZFe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new dr,this._dismissed=new dr,this._hidden=new dr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}_applyWindowOptions(n,e){KFe.forEach(i=>{gm(e[i])&&(n[i]=e[i])})}_applyBackdropOptions(n,e){QFe.forEach(i=>{gm(e[i])&&(n[i]=e[i])})}update(n){this._applyWindowOptions(this._windowCmptRef.instance,n),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,n)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Ko(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Ko(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();!function EU(t){return t&&t.then}(e)?!1!==e&&this._dismiss(n):e.then(i=>{!1!==i&&this._dismiss(n)},()=>{})}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Rn(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),KC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var i_=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(i_||(i_={})),i_))();let ePe=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new dr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new it,this.shown=new dr,this.hidden=new dr}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":mm(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=KC(ea(this._zone,e,()=>e.classList.remove("show"),i),ea(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const e={animation:this.animation,runningTransition:"continue"};KC(ea(this._zone,this._elRef.nativeElement,(o,s)=>{s&&Iv(o),o.classList.add("show")},e),ea(this._zone,this._dialogEl.nativeElement,()=>{},e)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Fa(e,"keydown").pipe(Ko(this._closed$),us(r=>r.which===Or.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(i_.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Fa(this._dialogEl.nativeElement,"mousedown").pipe(Ko(this._closed$),xs(()=>i=!1),dc(()=>Fa(e,"mouseup").pipe(Ko(this._closed$),Ks(1))),us(({target:r})=>e===r)).subscribe(()=>{i=!0}),Fa(e,"click").pipe(Ko(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(i_.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=XU(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&ea(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(de(co),de(Si),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&xo(jIe,7),2&e){let r;wn(r=Cn())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(ut("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Pd("modal d-block"+(i.windowClass?" "+i.windowClass:"")),jn("fade",i.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[Is],ngContentSelectors:Qy,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(kf(),_(0,"div",0,1)(2,"div",2),Df(3),x()()),2&e&&Pd("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+i.fullscreenClass+(i.scrollable?" modal-dialog-scrollable":"")+(i.modalDialogClass?" "+i.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:2}),t})(),tPe=(()=>{class t{constructor(e){this._document=e}hide(){const e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:o,paddingRight:s}=r;if(e>0){const a=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${a+e}px`}return r.overflow="hidden",()=>{e>0&&(r.paddingRight=s),r.overflow=o}}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),nPe=(()=>{class t{constructor(e,i,r,o,s,a,l){this._applicationRef=e,this._injector=i,this._environmentInjector=r,this._document=o,this._scrollBar=s,this._rendererFactory=a,this._ngZone=l,this._activeWindowCmptHasChanged=new dr,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new it,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const c=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Fa(n,"focusin").pipe(Ko(e),_n(o=>o.target));Fa(n,"keydown").pipe(Ko(e),us(o=>o.which===Or.Tab),K3(r)).subscribe(([o,s])=>{const[a,l]=XU(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Fa(n,"click").pipe(Ko(e),K3(r),_n(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,c.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(c.location.nativeElement)}})}_restoreScrollBar(){const e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,r){const o=r.container instanceof HTMLElement?r.container:gm(r.container)?this._document.querySelector(r.container):this._document.body,s=this._rendererFactory.createRenderer(null,null);if(!o)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const a=new cz,l=(e=r.injector||e).get($c,null)||this._environmentInjector,c=this._getContentRef(e,l,i,a,r);let u=!1!==r.backdrop?this._attachBackdrop(o):void 0,d=this._attachWindowComponent(o,c.nodes),h=new ZFe(d,c,u,r.beforeDismiss);return this._registerModalRef(h),this._registerWindowCmpt(d),h.hidden.pipe(Ks(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=f=>{h.close(f)},a.dismiss=f=>{h.dismiss(f)},a.update=f=>{h.update(f)},h.update(r),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&u.changeDetectorRef.detectChanges(),d.changeDetectorRef.detectChanges(),h}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let i=GA(JFe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let r=GA(ePe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_getContentRef(e,i,r,o,s){return r?r instanceof oo?this._createFromTemplateRef(r,o):mm(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new Cm([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new Cm([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new Cm([[i]])}_createFromComponent(e,i,r,o,s){const l=GA(r,{environmentInjector:i,elementInjector:ua.create({providers:[{provide:cz,useValue:o}],parent:e})}),c=l.location.nativeElement;return s.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new Cm([[c]],l.hostView,l)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(gt(Rh),gt(ua),gt($c),gt(co),gt(tPe),gt(Wg),gt(nr))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),iPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),f2=(()=>{class t{constructor(e,i,r){this._injector=e,this._modalStack=i,this._config=r}open(e,i={}){const r={...this._config,animation:this._config.animation,...i};return this._modalStack.open(this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(gt(ua),gt(nPe),gt(iPe))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),uz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[f2]}),t})(),rPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const dz=t=>gm(t)&&""!==t;let oPe=0,hz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbNavContent",""]],standalone:!0}),t})(),Yh=(()=>{class t{constructor(e,i){this._nav=e,this.elementRef=i,this.disabled=!1,this.shown=new it,this.hidden=new it}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){gm(this.domId)||(this.domId="ngb-nav-"+oPe++)}get active(){return this._nav.activeId===this.id}get id(){return dz(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(gm(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>zd)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&yi(r,hz,4),2&e){let o;wn(o=Cn())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("nav-item",!0)},inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"],standalone:!0}),t})(),zd=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new it,this.shown=new it,this.hidden=new it,this.destroy$=new dr,this.navItemChange$=new dr,this.navChange=new it,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case Or.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case Or.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case Or.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case Or.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case Or.Home:s=0;break;case Or.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!gm(this.activeId)){const e=this.items.first?this.items.first.id:null;dz(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(Ko(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Sf("role"),de(rPe),de(Ns),de(co))},t.\u0275dir=sn({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(yi(r,Yh,4),yi(r,Yf,5)),2&e){let o;wn(o=Cn())&&(i.items=o),wn(o=Cn())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(ut("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),jn("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],standalone:!0,features:[Yn]}),t})(),Yf=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Sf("role"),de(Yh),de(zd),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbNavLink",""]],hostVars:14,hostBindings:function(e,i){2&e&&(Pl("id",i.navItem.domId),ut("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),jn("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))},standalone:!0}),t})(),r_=(()=>{class t{constructor(e,i){this.navItem=e,this.nav=i}}return t.\u0275fac=function(e){return new(e||t)(de(Yh),de(zd))},t.\u0275dir=sn({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostBindings:function(e,i){1&e&&ye("click",function(o){return i.nav.click(i.navItem),o.preventDefault()})},standalone:!0,features:[G1([Yf])]}),t})();const lPe=({classList:t})=>(t.remove("show"),()=>t.remove("active")),cPe=(t,n)=>{n&&Iv(t),t.classList.add("show")};let DO=(()=>{class t{constructor(e){this.elRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(e,i){2&e&&(Pl("id",i.item.panelDomId),ut("role",i.role?i.role:i.nav.roles?"tabpanel":void 0)("aria-labelledby",i.item.domId),jn("fade",i.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"},standalone:!0}),t})(),fz=(()=>{class t{constructor(e,i){this._cd=e,this._ngZone=i,this._activePane=null}isPanelTransitioning(e){return this._activePane?.item===e}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(Ko(this.nav.destroy$),aC(this._activePane?.item||null),JC(),function U3e(t){return n=>n.lift(new z3e(t))}(1)).subscribe(e=>{const i={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?ea(this._ngZone,this._activePane.elRef.nativeElement,lPe,i).subscribe(()=>{const r=this._activePane?.item;this._activePane=this._getPaneForItem(e),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),ea(this._ngZone,this._activePane.elRef.nativeElement,cPe,i).subscribe(()=>{e&&(e.shown.emit(),this.nav.shown.emit(e.id))})),r&&(r.hidden.emit(),this.nav.hidden.emit(r.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.elRef.nativeElement.classList.add("show"),this._activePane?.elRef.nativeElement.classList.add("active")}_getPaneForItem(e){return this._panes&&this._panes.find(i=>i.item===e)||null}_getActivePane(){return this._panes&&this._panes.find(e=>e.item.active)||null}}return t.\u0275fac=function(e){return new(e||t)(de(Ns),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["","ngbNavOutlet",""]],viewQuery:function(e,i){if(1&e&&xo(DO,5),2&e){let r;wn(r=Cn())&&(i._panes=r)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},standalone:!0,features:[Is],attrs:RIe,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["ngbNavPane","",3,"item","nav","role",4,"ngIf"],["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&Z(0,BIe,1,1,"ng-template",0),2&e&&S("ngForOf",i.nav.items)},dependencies:[DO,Ln,vn,Au],encapsulation:2,changeDetection:0}),t})(),pz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[fz]}),t})(),uPe=(()=>{class t{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),mz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationEllipsis",""]],standalone:!0}),t})(),gz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationFirst",""]],standalone:!0}),t})(),vz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationLast",""]],standalone:!0}),t})(),yz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationNext",""]],standalone:!0}),t})(),_z=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationNumber",""]],standalone:!0}),t})(),bz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationPrevious",""]],standalone:!0}),t})(),xz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationPages",""]],standalone:!0}),t})(),wz=(()=>{class t{constructor(e){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new it(!0),this.disabled=e.disabled,this.boundaryLinks=e.boundaryLinks,this.directionLinks=e.directionLinks,this.ellipses=e.ellipses,this.maxSize=e.maxSize,this.pageSize=e.pageSize,this.rotate=e.rotate,this.size=e.size}hasPrevious(){return this.page>1}hasNext(){return this.page0&&(e>2?this.pages.unshift(-1):2===e&&this.pages.unshift(2),this.pages.unshift(1)),i0&&this.pageCount>this.maxSize){let i=0,r=this.pageCount;[i,r]=this.rotate?this._applyRotation():this._applyPagination(),this.pages=this.pages.slice(i,r),this._applyEllipses(i,r)}}}return t.\u0275fac=function(e){return new(e||t)(de(uPe))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-pagination"]],contentQueries:function(e,i,r){if(1&e&&(yi(r,mz,5),yi(r,gz,5),yi(r,vz,5),yi(r,yz,5),yi(r,_z,5),yi(r,bz,5),yi(r,xz,5)),2&e){let o;wn(o=Cn())&&(i.tplEllipsis=o.first),wn(o=Cn())&&(i.tplFirst=o.first),wn(o=Cn())&&(i.tplLast=o.first),wn(o=Cn())&&(i.tplNext=o.first),wn(o=Cn())&&(i.tplNumber=o.first),wn(o=Cn())&&(i.tplPrevious=o.first),wn(o=Cn())&&(i.tplPages=o.first)}},hostAttrs:["role","navigation"],inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},standalone:!0,features:[Yn,Is],decls:20,vars:12,consts:function(){let n,e,i,r,o,s,a,l;return n=$localize`:@@ngb.pagination.first:««`,e=$localize`:@@ngb.pagination.previous:«`,i=$localize`:@@ngb.pagination.next:»`,r=$localize`:@@ngb.pagination.last:»»`,o=$localize`:@@ngb.pagination.first-aria:First`,s=$localize`:@@ngb.pagination.previous-aria:Previous`,a=$localize`:@@ngb.pagination.next-aria:Next`,l=$localize`:@@ngb.pagination.last-aria:Last`,[["first",""],["previous",""],["next",""],["last",""],["ellipsis",""],["defaultNumber",""],["defaultPages",""],["class","page-item",3,"disabled",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true"],n,e,i,r,["class","page-item",3,"active","disabled",4,"ngFor","ngForOf"],[1,"page-item"],["class","page-link","tabindex","-1","aria-disabled","true",4,"ngIf"],["class","page-link","href","",3,"click",4,"ngIf"],["tabindex","-1","aria-disabled","true",1,"page-link"],["href","",1,"page-link",3,"click"],["aria-label",o,"href","",1,"page-link",3,"click"],["aria-label",s,"href","",1,"page-link",3,"click"],["aria-label",a,"href","",1,"page-link",3,"click"],["aria-label",l,"href","",1,"page-link",3,"click"]]},template:function(e,i){if(1&e&&(Z(0,VIe,2,0,"ng-template",null,0,cs),Z(2,HIe,2,0,"ng-template",null,1,cs),Z(4,UIe,2,0,"ng-template",null,2,cs),Z(6,zIe,2,0,"ng-template",null,3,cs),Z(8,GIe,1,0,"ng-template",null,4,cs),Z(10,WIe,1,1,"ng-template",null,5,cs),Z(12,eNe,1,1,"ng-template",null,6,cs),_(14,"ul"),Z(15,nNe,3,9,"li",7),Z(16,oNe,3,8,"li",7),Z(17,sNe,0,0,"ng-template",8),Z(18,lNe,3,9,"li",7),Z(19,uNe,3,9,"li",7),x()),2&e){const r=Ta(13);w(14),Pd("pagination"+(i.size?" pagination-"+i.size:"")),w(1),S("ngIf",i.boundaryLinks),w(1),S("ngIf",i.directionLinks),w(1),S("ngTemplateOutlet",(null==i.tplPages?null:i.tplPages.templateRef)||r)("ngTemplateOutletContext",ty(8,dNe,i.page,i.pages,i.disabled)),w(1),S("ngIf",i.directionLinks),w(1),S("ngIf",i.boundaryLinks)}},dependencies:[vn,Ln,Au],encapsulation:2,changeDetection:0}),t})(),Cz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[wz]}),t})();class dPe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const hPe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},Sz=t=>t>0?Q3(t):n=>n;let kz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})(),vPe=(()=>{class t{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yPe=(()=>{class t{constructor(e){this.value=0,this.max=e.max,this.animated=e.animated,this.ariaLabel=e.ariaLabel,this.striped=e.striped,this.textType=e.textType,this.type=e.type,this.showValue=e.showValue,this.height=e.height}set max(e){this._max=!ds(e)||e<=0?100:e}get max(){return this._max}getValue(){return n2(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}return t.\u0275fac=function(e){return new(e||t)(de(vPe))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-progressbar"]],hostAttrs:["role","progressbar","aria-valuemin","0",1,"progress"],hostVars:5,hostBindings:function(e,i){2&e&&(ut("aria-valuenow",i.getValue())("aria-valuemax",i.max)("aria-label",i.ariaLabel),tr("height",i.height))},inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},standalone:!0,features:[Is],ngContentSelectors:Qy,decls:3,vars:11,consts:function(){let n;return n=$localize`:@@ngb.progressbar.value:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[4,"ngIf"],n]},template:function(e,i){1&e&&(kf(),_(0,"div"),Z(1,pNe,3,3,"span",0),Df(2),x()),2&e&&(function V6(t,n,e,i,r){Du(ic,jd,Zg(zt(),t,n,e,i,r),!0)}("progress-bar",i.type?i.textType?" bg-"+i.type:" text-bg-"+i.type:"","",i.textType?" text-"+i.textType:"",""),tr("width",i.getPercentValue(),"%"),jn("progress-bar-animated",i.animated)("progress-bar-striped",i.striped),w(1),S("ngIf",i.showValue))},dependencies:[vn,h7],encapsulation:2,changeDetection:0}),t})(),Dz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[yPe]}),t})(),_Pe=(()=>{class t{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),bPe=(()=>{class t{constructor(e,i){this._changeDetectorRef=i,this.contexts=[],this.disabled=!1,this.hover=new it,this.leave=new it,this.rateChange=new it(!0),this.onChange=r=>{},this.onTouched=()=>{},this.max=e.max,this.readonly=e.readonly,this.tabindex=e.tabindex}ariaValueText(e,i){return`${e} out of ${i}`}isInteractive(){return!this.readonly&&!this.disabled}enter(e){this.isInteractive()&&this._updateState(e),this.hover.emit(e)}handleBlur(){this.onTouched()}handleClick(e){this.isInteractive()&&this.update(this.resettable&&this.rate===e?0:e)}handleKeyDown(e){switch(e.which){case Or.ArrowDown:case Or.ArrowLeft:this.update(this.rate-1);break;case Or.ArrowUp:case Or.ArrowRight:this.update(this.rate+1);break;case Or.Home:this.update(0);break;case Or.End:this.update(this.max);break;default:return}e.preventDefault()}ngOnChanges(e){e.rate&&this.update(this.rate),e.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(e){this.disabled=e}update(e,i=!0){const r=n2(e,this.max,0);this.isInteractive()&&this.rate!==r&&(this.rate=r,this.rateChange.emit(this.rate)),i&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(e){this.update(e,!1),this._changeDetectorRef.markForCheck()}_updateState(e){this.nextRate=e,this.contexts.forEach((i,r)=>i.fill=Math.round(100*n2(e-r,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(e,i)=>({fill:0,index:i}))}}return t.\u0275fac=function(e){return new(e||t)(de(_Pe),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-rating"]],contentQueries:function(e,i,r){if(1&e&&yi(r,oo,5),2&e){let o;wn(o=Cn())&&(i.starTemplateFromContent=o.first)}},hostAttrs:["role","slider","aria-valuemin","0",1,"d-inline-flex"],hostVars:5,hostBindings:function(e,i){1&e&&ye("blur",function(){return i.handleBlur()})("keydown",function(o){return i.handleKeyDown(o)})("mouseleave",function(){return i.reset()}),2&e&&(Pl("tabindex",i.disabled?-1:i.tabindex),ut("aria-valuemax",i.max)("aria-valuenow",i.nextRate)("aria-valuetext",i.ariaValueText(i.nextRate,i.max))("aria-disabled",!!i.readonly||null))},inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},standalone:!0,features:[Qr([{provide:$l,useExisting:Mi(()=>t),multi:!0}]),Yn,Is],decls:3,vars:1,consts:[["t",""],["ngFor","",3,"ngForOf"],[1,"visually-hidden"],[3,"mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(Z(0,mNe,1,1,"ng-template",null,0,cs),Z(2,vNe,4,5,"ng-template",1)),2&e&&(w(2),S("ngForOf",i.contexts))},dependencies:[Ln,Au],encapsulation:2,changeDetection:0}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[bPe]}),t})();class Ez{constructor(n,e,i){this.hour=Pa(n),this.minute=Pa(e),this.second=Pa(i)}changeHour(n=1){this.updateHour((isNaN(this.hour)?0:this.hour)+n)}updateHour(n){this.hour=ds(n)?(n<0?24+n:n)%24:NaN}changeMinute(n=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+n)}updateMinute(n){ds(n)?(this.minute=n%60<0?60+n%60:n%60,this.changeHour(Math.floor(n/60))):this.minute=NaN}changeSecond(n=1){this.updateSecond((isNaN(this.second)?0:this.second)+n)}updateSecond(n){ds(n)?(this.second=n<0?60+n%60:n%60,this.changeMinute(Math.floor(n/60))):this.second=NaN}isValid(n=!0){return ds(this.hour)&&ds(this.minute)&&(!n||ds(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let xPe=(()=>{class t{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Az=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function wPe(){return new CPe}()},providedIn:"root"}),t})(),CPe=(()=>{class t extends Az{fromModel(e){return e&&Qo(e.hour)&&Qo(e.minute)?{hour:e.hour,minute:e.minute,second:Qo(e.second)?e.second:null}:null}toModel(e){return e&&Qo(e.hour)&&Qo(e.minute)?{hour:e.hour,minute:e.minute,second:Qo(e.second)?e.second:null}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),Mz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function SPe(t){return new kPe(t)}(gt(lc)),i},providedIn:"root"}),t})(),kPe=(()=>{class t extends Mz{constructor(e){super(),this._periods=WB(e,Ro.Standalone,Vi.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}return t.\u0275fac=function(e){return new(e||t)(gt(lc))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const DPe=/[^0-9]/g;let TPe=(()=>{class t{constructor(e,i,r,o){this._config=e,this._ngbTimeAdapter=i,this._cd=r,this.i18n=o,this.onChange=s=>{},this.onTouched=()=>{},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}set hourStep(e){this._hourStep=Qo(e)?e:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(e){this._minuteStep=Qo(e)?e:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(e){this._secondStep=Qo(e)?e:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(e){const i=this._ngbTimeAdapter.fromModel(e);this.model=i?new Ez(i.hour,i.minute,i.second):new Ez,!this.seconds&&(!i||!ds(i.second))&&(this.model.second=0),this._cd.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}changeHour(e){this.model?.changeHour(e),this.propagateModelChange()}changeMinute(e){this.model?.changeMinute(e),this.propagateModelChange()}changeSecond(e){this.model?.changeSecond(e),this.propagateModelChange()}updateHour(e){const i=!!this.model&&this.model.hour>=12,r=Pa(e);this.model?.updateHour(this.meridian&&(i&&r<12||!i&&12===r)?r+12:r),this.propagateModelChange()}updateMinute(e){this.model?.updateMinute(Pa(e)),this.propagateModelChange()}updateSecond(e){this.model?.updateSecond(Pa(e)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(e){e.value=e.value.replace(DPe,"")}formatHour(e){return ds(e)?Ov(this.meridian?e%12==0?12:e%12:e%24):Ov(NaN)}formatMinSec(e){return Ov(ds(e)?e:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(e){e.seconds&&!this.seconds&&this.model&&!ds(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(e=!0){e&&this.onTouched(),this.model?.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}return t.\u0275fac=function(e){return new(e||t)(de(xPe),de(Az),de(Ns),de(Mz))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},exportAs:["ngbTimepicker"],standalone:!0,features:[Qr([{provide:$l,useExisting:Mi(()=>t),multi:!0}]),Yn,Is],decls:16,vars:25,consts:function(){let n,e,i,r,o,s,a,l,c,u,d,h,f,p;return n=$localize`:@@ngb.timepicker.HH:HH`,e=$localize`:@@ngb.timepicker.hours:Hours`,i=$localize`:@@ngb.timepicker.MM:MM`,r=$localize`:@@ngb.timepicker.minutes:Minutes`,o=$localize`:@@ngb.timepicker.increment-hours:Increment hours`,s=$localize`:@@ngb.timepicker.decrement-hours:Decrement hours`,a=$localize`:@@ngb.timepicker.increment-minutes:Increment minutes`,l=$localize`:@@ngb.timepicker.decrement-minutes:Decrement minutes`,c=$localize`:@@ngb.timepicker.SS:SS`,u=$localize`:@@ngb.timepicker.seconds:Seconds`,d=$localize`:@@ngb.timepicker.increment-seconds:Increment seconds`,h=$localize`:@@ngb.timepicker.decrement-seconds:Decrement seconds`,f=$localize`:@@ngb.timepicker.PM:${"\ufffd0\ufffd"}:INTERPOLATION:`,p=$localize`:@@ngb.timepicker.AM:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric","placeholder",n,"aria-label",e,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["type","text","maxlength","2","inputmode","numeric","placeholder",i,"aria-label",r,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"visually-hidden"],o,[1,"chevron","ngb-tp-chevron","bottom"],s,a,l,[1,"ngb-tp-input-container","ngb-tp-second"],["type","text","maxlength","2","inputmode","numeric","placeholder",c,"aria-label",u,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],d,h,[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],f,p]},template:function(e,i){1&e&&(_(0,"fieldset",0)(1,"div",1)(2,"div",2),Z(3,yNe,4,7,"button",3),_(4,"input",4),ye("change",function(o){return i.updateHour(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeHour(i.hourStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeHour(-i.hourStep),o.preventDefault()}),x(),Z(5,_Ne,4,7,"button",3),x(),_(6,"div",5),O(7,":"),x(),_(8,"div",6),Z(9,bNe,4,7,"button",3),_(10,"input",7),ye("change",function(o){return i.updateMinute(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeMinute(i.minuteStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeMinute(-i.minuteStep),o.preventDefault()}),x(),Z(11,xNe,4,7,"button",3),x(),Z(12,wNe,2,0,"div",8),Z(13,kNe,4,9,"div",9),Z(14,DNe,1,0,"div",8),Z(15,ANe,5,9,"div",10),x()()),2&e&&(jn("disabled",i.disabled),S("disabled",i.disabled),w(3),S("ngIf",i.spinners),w(1),jn("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatHour(null==i.model?null:i.model.hour))("readOnly",i.readonlyInputs)("disabled",i.disabled),w(1),S("ngIf",i.spinners),w(4),S("ngIf",i.spinners),w(1),jn("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatMinSec(null==i.model?null:i.model.minute))("readOnly",i.readonlyInputs)("disabled",i.disabled),w(1),S("ngIf",i.spinners),w(1),S("ngIf",i.seconds),w(1),S("ngIf",i.seconds),w(1),S("ngIf",i.meridian),w(1),S("ngIf",i.meridian))},dependencies:[vn],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],encapsulation:2}),t})(),Oz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[TPe]}),t})();const EPe=(t,n)=>{const{classList:e}=t;if(n)return e.add("fade"),Iv(t),e.add("show","showing"),()=>{e.remove("showing")};e.add("show")},APe=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});let MPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),OPe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["","ngbToastHeader",""]],standalone:!0}),t})(),IPe=(()=>{class t{constructor(e,i,r,o){this.ariaLive=e,this._zone=r,this._element=o,this.contentHeaderTpl=null,this.shown=new it,this.hidden=new it,null==this.ariaLive&&(this.ariaLive=i.ariaLive),this.delay=i.delay,this.autohide=i.autohide,this.animation=i.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(e){"autohide"in e&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const e=ea(this._zone,this._element.nativeElement,APe,{animation:this.animation,runningTransition:"stop"});return e.subscribe(()=>{this.hidden.emit()}),e}show(){const e=ea(this._zone,this._element.nativeElement,EPe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>{this.shown.emit()}),e}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}return t.\u0275fac=function(e){return new(e||t)(Sf("aria-live"),de(MPe),de(nr),de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-toast"]],contentQueries:function(e,i,r){if(1&e&&yi(r,OPe,7,oo),2&e){let o;wn(o=Cn())&&(i.contentHeaderTpl=o.first)}},hostAttrs:["role","alert","aria-atomic","true",1,"toast"],hostVars:3,hostBindings:function(e,i){2&e&&(ut("aria-live",i.ariaLive),jn("fade",i.animation))},inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbToast"],standalone:!0,features:[Yn,Is],ngContentSelectors:Qy,decls:5,vars:1,consts:function(){let n;return n=$localize`:@@ngb.toast.close-aria:Close`,[["headerTpl",""],[3,"ngIf"],[1,"toast-body"],[1,"me-auto"],[1,"toast-header"],[3,"ngTemplateOutlet"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kf(),Z(0,MNe,2,1,"ng-template",null,0,cs),Z(2,INe,3,1,"ng-template",1),_(3,"div",2),Df(4),x()),2&e&&(w(2),S("ngIf",i.contentHeaderTpl||i.header))},dependencies:[vn,Au],styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],encapsulation:2}),t})(),Iz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[IPe]}),t})(),NPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FPe=0,PPe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip",2,"position","absolute"],hostVars:5,hostBindings:function(e,i){2&e&&(Pl("id",i.id),Pd("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),jn("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},standalone:!0,features:[Is],ngContentSelectors:Qy,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(kf(),pe(0,"div",0),_(1,"div",1),Df(2),x())},encapsulation:2,changeDetection:0}),t})(),jPe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u){this._elementRef=e,this._renderer=i,this._ngZone=a,this._document=l,this._changeDetector=c,this.shown=new it,this.hidden=new it,this._ngbTooltipWindowId="ngb-tooltip-"+FPe++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disableTooltip=s.disableTooltip,this.tooltipClass=s.tooltipClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._popupService=new XFe(PPe,r,o,i,this._ngZone,u),this._positioning=wO()}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:o=>this.popperOptions(o)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),xO(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(e=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(e).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function gPe(t,n,e,i,r,o,s=0,a=0){const l=function fPe(t,n=hPe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new dPe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function pPe(t,n,e,i){return new en(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function mPe(t,n,e){return i=>{let r=null;const o=i.pipe(_n(l=>({open:l})),us(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),Ge());return Dt(o.pipe(us(l=>l.open),Sz(t)),o.pipe(us(l=>!l.open),Sz(n))).pipe(us(l=>l===r&&(r=null,l.open!==e())),_n(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(mm(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca),de(ua),de(jl),de(NPe),de(nr),de(co),de(Ns),de(Rh))},t.\u0275dir=sn({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],standalone:!0,features:[Yn]}),t})(),Nz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})(),RPe=(()=>{class t{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const i=TU(this.result),r=Array.isArray(this.term)?this.term:[this.term],o=c=>this.accentSensitive?c:MU(c),s=r.map(c=>function LNe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(o(TU(c)))).filter(c=>c),a=this.accentSensitive?i:MU(i),l=s.length?a.split(new RegExp(`(${s.join("|")})`,"gmi")):[i];if(this.accentSensitive)this.parts=l;else{let c=0;this.parts=l.map(u=>i.substring(c,c+=u.length))}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[Yn,Is],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(e,i){1&e&&Z(0,PNe,3,2,"ng-template",0),2&e&&S("ngForOf",i.parts)},dependencies:[vn,Ln],styles:[".ngb-highlight{font-weight:700}\n"],encapsulation:2,changeDetection:0}),t})();new Vn("live announcer delay",{providedIn:"root",factory:function LPe(){return 100}});let Fz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[RPe]}),t})(),Pz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();const $Pe=[$U,BU,HU,UU,az,lz,uz,pz,Pz,Cz,kz,Dz,Tz,Oz,Iz,Nz,Fz];let BPe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[$Pe,$U,BU,HU,UU,az,lz,uz,pz,Pz,Cz,kz,Dz,Tz,Oz,Iz,Nz,Fz]}),t})(),jz=(()=>{class t{restrictedPages=new Map([["users",ti.USER_ROLE_ADMIN],["config",ti.USER_ROLE_DEVELOPER],["modules",ti.USER_ROLE_DEVELOPER],["apiexplorer",ti.USER_ROLE_DEVELOPER]]);static \u0275fac=function(i){return new(i||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function VPe(t,n){if(1&t&&(sc(0,5),_(1,"a",31),pe(2,"img",32),_(3,"span",12),O(4),x()(),ac()),2&t){const e=$().$implicit;S("ngbNavItem",e.navItem),w(1),S("routerLink",e.routerLink),w(1),Kp("src","/static/svg/",e.icon,".svg",$1),w(2),bt(e.label)}}function HPe(t,n){1&t&&pe(0,"hr")}function UPe(t,n){if(1&t&&(Z(0,VPe,5,4,"ng-container",30),Z(1,HPe,1,0,"hr",29)),2&t){const e=n.$implicit;S("ngIf",$().getSessionRole()<=e.minRole),w(1),S("ngIf",e.separator)}}function zPe(t,n){if(1&t&&(_(0,"div",33)(1,"h2",34),pe(2,"img",35),O(3,"An error has occurred!"),x(),_(4,"h6",36),O(5),x(),_(6,"p"),O(7,"Please refresh the page to try again."),x()()),2&t){const e=$();w(5),bt(e.error)}}function GPe(t,n){1&t&&(_(0,"div",37),pe(1,"img",38),x())}function WPe(t,n){1&t&&pe(0,"router-outlet")}const qPe=function(){return["/"]},YPe=function(){return["/login"]};let XPe=(()=>{class t{route;router;segment;consoleService;authService;routerSub;segmentRouterSub;loading=!0;error="";routes=[{navItem:"status",routerLink:["/status"],label:"Status",minRole:ti.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:ti.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:ti.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:ti.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:ti.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:ti.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:ti.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:ti.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:ti.USER_ROLE_READONLY,icon:"chat"},{navItem:"purchases",routerLink:["/purchases"],label:"Purchases",minRole:ti.USER_ROLE_READONLY,icon:""},{navItem:"subscriptions",routerLink:["/subscriptions"],label:"Subscriptions",minRole:ti.USER_ROLE_READONLY,icon:""},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:ti.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:ti.USER_ROLE_DEVELOPER,icon:"api-explorer"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function v3e(t){let n=arguments.length,e=XC;Ca(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new y3e(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof gC&&(this.loading=!0),l instanceof Gh&&(this.loading=!1),l instanceof ky&&(this.loading=!1),l instanceof yC&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(JC((a,l)=>!(l instanceof Gh)||a.url===l.url)).subscribe(a=>{})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(zC),de(bi),de(zo))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:49,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","http://heroiclabs.com/cloud?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Heroic%20Cloud%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/hiro.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/satori.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/docs/nakama/getting-started/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Documentation%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Blog%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"nav",2,3),ye("navChange",function(s){return r.onSidebarNavChange(s)}),_(4,"div",4),sc(5,5),_(6,"a",6),pe(7,"img",7)(8,"img",8),x(),ac(),pe(9,"hr"),Z(10,UPe,2,2,"ng-template",9),pe(11,"hr"),_(12,"a",10),pe(13,"img",11),_(14,"span",12),O(15,"Heroic Cloud"),x()(),_(16,"a",13),pe(17,"img",14),_(18,"span",12),O(19,"Hiro"),x()(),_(20,"a",15),pe(21,"img",16),_(22,"span",12),O(23,"Satori"),x()(),pe(24,"hr"),_(25,"a",17),pe(26,"img",18),_(27,"span",12),O(28,"Documentation"),x()(),_(29,"a",19),pe(30,"img",20),_(31,"span",12),O(32,"Forum"),x()(),_(33,"a",21),pe(34,"img",22),_(35,"span",12),O(36,"Heroic Labs Blog"),x()(),pe(37,"hr"),_(38,"div",23),O(39),x(),sc(40,5),_(41,"a",24),ye("click",function(){return r.logout()}),pe(42,"img",25),_(43,"span",12),O(44,"Logout"),x()(),ac(),x()(),_(45,"main",26),Z(46,zPe,8,1,"div",27),Z(47,GPe,2,0,"div",28),Z(48,WPe,1,0,"router-outlet",29),x()()()),2&i&&(w(5),S("ngbNavItem","logo"),w(1),S("routerLink",ml(9,qPe)),w(4),S("ngForOf",r.routes),w(29),mn("Logged in as: ",r.getUsername(),""),w(1),S("ngbNavItem","logout"),w(1),S("routerLink",ml(10,YPe)),w(5),S("ngIf",r.error),w(1),S("ngIf",!r.error&&r.loading),w(1),S("ngIf",!r.error&&!r.loading))},dependencies:[cm,Ou,Ny,Ln,vn,zd,Yh,r_,Yf],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px;color:#fff}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})}return t})(),JPe=(()=>{class t{authService;router;globals;constructor(e,i,r){this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||ua.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class tje extends eje{}"function"==typeof SuppressedError&&SuppressedError;class Dje{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new Tje(n,this.dueTime,this.scheduler))}}class Tje extends F{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Eje,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function Eje(t){t.debouncedNext()}function Aje(){}function IO(t){return null==t?Aje:function(){return this.querySelector(t)}}function Oje(){return[]}function Bz(t){return null==t?Oje:function(){return this.querySelectorAll(t)}}function Vz(t){return function(){return this.matches(t)}}function Hz(t){return new Array(t.length)}function p2(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}p2.prototype={constructor:p2,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Uz="$";function jje(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var NO="http://www.w3.org/1999/xhtml";const zz={svg:"http://www.w3.org/2000/svg",xhtml:NO,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function m2(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),zz.hasOwnProperty(n)?{space:zz[n],local:t}:t}function Kje(t){return function(){this.removeAttribute(t)}}function Qje(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Zje(t,n){return function(){this.setAttribute(t,n)}}function e4e(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function t4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function n4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Gz(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function r4e(t){return function(){this.style.removeProperty(t)}}function o4e(t,n,e){return function(){this.style.setProperty(t,n,e)}}function s4e(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function jv(t,n){return t.style.getPropertyValue(n)||Gz(t).getComputedStyle(t,null).getPropertyValue(n)}function l4e(t){return function(){delete this[t]}}function c4e(t,n){return function(){this[t]=n}}function u4e(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Wz(t){return t.trim().split(/^|\s+/)}function FO(t){return t.classList||new qz(t)}function qz(t){this._node=t,this._names=Wz(t.getAttribute("class")||"")}function Yz(t,n){for(var e=FO(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Kz={},Rr=null;function B4e(t,n,e){return t=Qz(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function Qz(t,n,e){return function(i){var r=Rr;Rr=i;try{t.call(this,this.__data__,n,e)}finally{Rr=r}}}function H4e(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=b&&(b=y+1);!(k=g[b])&&++b=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function Uje(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=zje);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?r4e:"function"==typeof n?s4e:o4e)(t,n,e??"")):jv(this.node(),t)},property:function d4e(t,n){return arguments.length>1?this.each((null==n?l4e:"function"==typeof n?u4e:c4e)(t,n)):this.node()[t]},classed:function m4e(t,n){var e=Wz(t+"");if(arguments.length<2){for(var i=FO(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?U4e:H4e,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?y2(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?y2(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=tRe.exec(t))?new vc(n[1],n[2],n[3],1):(n=nRe.exec(t))?new vc(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=iRe.exec(t))?y2(n[1],n[2],n[3],n[4]):(n=rRe.exec(t))?y2(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=oRe.exec(t))?hG(n[1],n[2]/100,n[3]/100,1):(n=sRe.exec(t))?hG(n[1],n[2]/100,n[3]/100,n[4]):sG.hasOwnProperty(t)?cG(sG[t]):"transparent"===t?new vc(NaN,NaN,NaN,0):null}function cG(t){return new vc(t>>16&255,t>>8&255,255&t,1)}function y2(t,n,e,i){return i<=0&&(t=n=e=NaN),new vc(t,n,e,i)}function u_(t,n,e,i){return 1===arguments.length?function lRe(t){return t instanceof a_||(t=Sm(t)),t?new vc((t=t.rgb()).r,t.g,t.b,t.opacity):new vc}(t):new vc(t,n,e,i??1)}function vc(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function uG(){return"#"+RO(this.r)+RO(this.g)+RO(this.b)}function dG(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function RO(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hG(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Wd(t,n,e,i)}function fG(t){if(t instanceof Wd)return new Wd(t.h,t.s,t.l,t.opacity);if(t instanceof a_||(t=Sm(t)),!t)return new Wd;if(t instanceof Wd)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Wd(s,a,l,t.opacity)}function Wd(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function LO(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function pG(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function $O(t){return function(){return t}}function gG(t,n){var e=n-t;return e?function mG(t,n){return function(e){return t+e*n}}(t,e):$O(isNaN(t)?n:t)}jO(a_,Sm,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:aG,formatHex:aG,formatHsl:function aRe(){return fG(this).formatHsl()},formatRgb:lG,toString:lG}),jO(vc,u_,oG(a_,{brighter:function(t){return t=null==t?v2:Math.pow(v2,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uG,formatHex:uG,formatRgb:dG,toString:dG})),jO(Wd,function cRe(t,n,e,i){return 1===arguments.length?fG(t):new Wd(t,n,e,i??1)},oG(a_,{brighter:function(t){return t=null==t?v2:Math.pow(v2,t),new Wd(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Wd(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new vc(LO(t>=240?t-240:t+120,r,i),LO(t,r,i),LO(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const _2=function t(n){var e=function fRe(t){return 1==(t=+t)?gG:function(n,e){return e-n?function hRe(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):$O(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=u_(r)).r,(o=u_(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=gG(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function vG(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return pG((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lu(i,r)})),e=VO.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--Lv}()}finally{Lv=0,function kRe(){for(var t,e,n=b2,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:b2=e);f_=t,HO(i)}(),Dm=0}}function SRe(){var t=p_.now(),n=t-x2;n>wG&&(w2-=n,x2=t)}function HO(t){Lv||(d_&&(d_=clearTimeout(d_)),t-Dm>24?(t<1/0&&(d_=setTimeout(kG,t-p_.now()-w2)),h_&&(h_=clearInterval(h_))):(h_||(x2=p_.now(),h_=setInterval(SRe,wG)),Lv=1,CG(kG)))}function DG(t,n,e){var i=new S2;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}S2.prototype=SG.prototype={constructor:S2,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?C2():+e)+(null==n?0:+n),!this._next&&f_!==this&&(f_?f_._next=this:b2=this,f_=this),this._call=t,this._time=e,HO()},stop:function(){this._call&&(this._call=null,this._time=1/0,HO())}};var DRe=rG("start","end","cancel","interrupt"),TRe=[],TG=0,EG=1,UO=2,k2=3,AG=4,zO=5,D2=6;function T2(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function ERe(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==EG)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===k2)return DG(s);f.state===AG?(f.state=D2,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+uTG)throw new Error("too late; already scheduled");return e}function Xh(t,n){var e=$u(t,n);if(e.state>k2)throw new Error("too late; already running");return e}function $u(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function WO(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>UO&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lu(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lu(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var m=f.push(r(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Lu(c,d)},{i:m-2,x:Lu(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var g,p=-1,m=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?GO:Xh;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function URe(t,n){var e=m2(t),i="transform"===e?NRe:FG;return this.attrTween(t,"function"==typeof n?(e.local?HRe:VRe)(e,i,XO(this,"attr."+t,n)):null==n?(e.local?LRe:RRe)(e):(e.local?BRe:$Re)(e,i,n))},attrTween:function YRe(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=m2(t);return this.tween(e,(i.local?WRe:qRe)(i,n))},style:function yLe(t,n,e){var i="transform"==(t+="")?IRe:FG;return null==n?this.styleTween(t,function pLe(t,n){var e,i,r;return function(){var o=jv(this,t),s=(this.style.removeProperty(t),jv(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,PG(t)):"function"==typeof n?this.styleTween(t,function gLe(t,n,e){var i,r,o;return function(){var s=jv(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=jv(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,XO(this,"style."+t,n))).each(function vLe(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=Xh(this,t),c=l.on,u=null==l.value[o]?a||(a=PG(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function mLe(t,n,e){var i,o,r=e+"";return function(){var s=jv(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function xLe(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function bLe(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function _Le(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function SLe(t){return this.tween("text","function"==typeof t?function CLe(t){return function(){var n=t(this);this.textContent=n??""}}(XO(this,"text",t)):function wLe(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function TLe(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function DLe(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function kLe(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function cLe(){return this.on("end.remove",function lLe(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function jRe(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=$u(this.node(),e).tween,r=0,o=i.length;r0&&(R=U-I),C<0?le=E-N:C>0&&(X=te-N),y=ZO,B.attr("cursor",Kh.selection),Me());break;default:return}QO()},!0).on("keyup.brush",function yt(){switch(Rr.keyCode){case 16:V&&(re=he=V=!1,Me());break;case 18:y===Vv&&(b<0?W=J:b>0&&(R=U),C<0?le=E:C>0&&(X=te),y=Bv,Me());break;case 32:y===ZO&&(Rr.altKey?(b&&(W=J-I*b,R=U+I*b),C&&(le=E-N*C,X=te+N*C),y=Vv):(b<0?W=J:b>0&&(R=U),C<0?le=E:C>0&&(X=te),y=Bv),B.attr("cursor",Kh[v]),Me());break;default:return}QO()},!0),function Q4e(t){var n=t.document.documentElement,e=pa(t).on("dragstart.drag",PO,!0);"onselectstart"in n?e.on("selectstart.drag",PO,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}(Rr.view)}RG(),WO(g),c.call(g),Le.start()}function ie(){var Tt=Oe(g);V&&!re&&!he&&(Math.abs(Tt[0]-Xe[0])>Math.abs(Tt[1]-Xe[1])?he=!0:re=!0),Xe=Tt,q=!0,QO(),Me()}function Me(){var Tt;switch(I=Xe[0]-_e[0],N=Xe[1]-_e[1],y){case ZO:case LG:b&&(I=Math.max(z-R,Math.min(P-W,I)),U=R+I,J=W+I),C&&(N=Math.max(G-X,Math.min(H-le,N)),te=X+N,E=le+N);break;case Bv:b<0?(I=Math.max(z-R,Math.min(P-R,I)),U=R+I,J=W):b>0&&(I=Math.max(z-W,Math.min(P-W,I)),U=R,J=W+I),C<0?(N=Math.max(G-X,Math.min(H-X,N)),te=X+N,E=le):C>0&&(N=Math.max(G-le,Math.min(H-le,N)),te=X,E=le+N);break;case Vv:b&&(U=Math.max(z,Math.min(P,R-I*b)),J=Math.max(z,Math.min(P,W+I*b))),C&&(te=Math.max(G,Math.min(H,X-N*C)),E=Math.max(G,Math.min(H,le+N*C)))}Jn?1:t>=n?0:NaN}function rI(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function WLe(t){return(n,e)=>iI(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var oI=Math.sqrt(50),sI=Math.sqrt(10),aI=Math.sqrt(2);function HG(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=oI?10:o>=sI?5:o>=aI?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=oI?10:o>=sI?5:o>=aI?2:1)}function lI(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=oI?r*=10:o>=sI?r*=5:o>=aI&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return dI.setTime(+o),hI.setTime(+s),t(dI),t(hI),Math.floor(e(dI,hI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var O2=ma(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});O2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ma(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):O2:null};const YLe=O2;var zG=ma(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+n*Qh)},function(t,n){return(n-t)/Qh},function(t){return t.getUTCSeconds()});const v_=zG;var GG=ma(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qh)},function(t,n){t.setTime(+t+n*qc)},function(t,n){return(n-t)/qc},function(t){return t.getMinutes()});const WG=GG;var qG=ma(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qh-t.getMinutes()*qc)},function(t,n){t.setTime(+t+n*Zh)},function(t,n){return(n-t)/Zh},function(t){return t.getHours()});const YG=qG;var XG=ma(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qc)/Tm,t=>t.getDate()-1);const JG=XG;function Em(t){return ma(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*qc)/cI})}var fI=Em(0),KG=(Em(1),Em(2),Em(3),Em(4),Em(5),Em(6),ma(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}));const QG=KG;var pI=ma(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});pI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ma(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const ZG=pI;var eW=ma(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*qc)},function(t,n){return(n-t)/qc},function(t){return t.getUTCMinutes()});const t5e=eW;var tW=ma(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Zh)},function(t,n){return(n-t)/Zh},function(t){return t.getUTCHours()});const n5e=tW;var nW=ma(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Tm},function(t){return t.getUTCDate()-1});const i5e=nW;function Am(t){return ma(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/cI})}var iW=Am(0),rW=(Am(1),Am(2),Am(3),Am(4),Am(5),Am(6),ma(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}));const u5e=rW;var mI=ma(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});mI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ma(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const d5e=mI;function oW(t,n,e,i,r,o){const s=[[v_,1,Qh],[v_,5,5*Qh],[v_,15,15*Qh],[v_,30,30*Qh],[o,1,qc],[o,5,5*qc],[o,15,15*qc],[o,30,30*qc],[r,1,Zh],[r,3,3*Zh],[r,6,6*Zh],[r,12,12*Zh],[i,1,Tm],[i,2,2*Tm],[e,1,cI],[n,1,UG],[n,3,3*UG],[t,1,uI]];function l(c,u,d){const h=Math.abs(u-c)/d,f=rI(([,,g])=>g).right(s,h);if(f===s.length)return t.every(lI(c/uI,u/uI,d));if(0===f)return YLe.every(Math.max(lI(c,u,d),1));const[p,m]=s[h/s[f-1][2]0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return gI.setTime(+o),vI.setTime(+s),t(gI),t(vI),Math.floor(e(gI,vI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var sW=6e4,lW=6048e5;function Mm(t){return ef(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/lW})}var cW=Mm(0),I2=Mm(1),Hv=(Mm(2),Mm(3),Mm(4)),uW=(Mm(5),Mm(6),ef(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const dW=uW;function Om(t){return ef(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*sW)/lW})}var hW=Om(0),N2=Om(1),Uv=(Om(2),Om(3),Om(4)),fW=(Om(5),Om(6),ef(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*sW)/864e5},function(t){return t.getDate()-1}));const pW=fW;var yI=ef(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});yI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ef(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const y_=yI;var _I=ef(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});_I.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ef(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const __=_I;function bI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function xI(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function b_(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var zv,AW,mW={"-":"",_:" ",0:"0"},ga=/^\s*\d+/,C5e=/^%/,S5e=/[\\^$*+?|[\]().{}]/g;function Br(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function O5e(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function I5e(t,n,e){var i=ga.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function N5e(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function yW(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function F5e(t,n,e){var i=ga.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function _W(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function P5e(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function j5e(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function R5e(t,n,e){var i=ga.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function L5e(t,n,e){var i=ga.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function $5e(t,n,e){var i=C5e.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function B5e(t,n,e){var i=ga.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function V5e(t,n,e){var i=ga.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function bW(t,n){return Br(t.getDate(),n,2)}function H5e(t,n){return Br(t.getHours(),n,2)}function U5e(t,n){return Br(t.getHours()%12||12,n,2)}function z5e(t,n){return Br(1+pW.count(y_(t),t),n,3)}function xW(t,n){return Br(t.getMilliseconds(),n,3)}function G5e(t,n){return xW(t,n)+"000"}function W5e(t,n){return Br(t.getMonth()+1,n,2)}function q5e(t,n){return Br(t.getMinutes(),n,2)}function Y5e(t,n){return Br(t.getSeconds(),n,2)}function X5e(t){var n=t.getDay();return 0===n?7:n}function J5e(t,n){return Br(hW.count(y_(t)-1,t),n,2)}function wW(t){var n=t.getDay();return n>=4||0===n?Uv(t):Uv.ceil(t)}function K5e(t,n){return t=wW(t),Br(Uv.count(y_(t),t)+(4===y_(t).getDay()),n,2)}function Q5e(t){return t.getDay()}function Z5e(t,n){return Br(N2.count(y_(t)-1,t),n,2)}function e8e(t,n){return Br(t.getFullYear()%100,n,2)}function t8e(t,n){return Br((t=wW(t)).getFullYear()%100,n,2)}function n8e(t,n){return Br(t.getFullYear()%1e4,n,4)}function i8e(t,n){var e=t.getDay();return Br((t=e>=4||0===e?Uv(t):Uv.ceil(t)).getFullYear()%1e4,n,4)}function r8e(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Br(n/60|0,"0",2)+Br(n%60,"0",2)}function CW(t,n){return Br(t.getUTCDate(),n,2)}function o8e(t,n){return Br(t.getUTCHours(),n,2)}function s8e(t,n){return Br(t.getUTCHours()%12||12,n,2)}function a8e(t,n){return Br(1+dW.count(__(t),t),n,3)}function SW(t,n){return Br(t.getUTCMilliseconds(),n,3)}function l8e(t,n){return SW(t,n)+"000"}function c8e(t,n){return Br(t.getUTCMonth()+1,n,2)}function u8e(t,n){return Br(t.getUTCMinutes(),n,2)}function d8e(t,n){return Br(t.getUTCSeconds(),n,2)}function h8e(t){var n=t.getUTCDay();return 0===n?7:n}function f8e(t,n){return Br(cW.count(__(t)-1,t),n,2)}function kW(t){var n=t.getUTCDay();return n>=4||0===n?Hv(t):Hv.ceil(t)}function p8e(t,n){return t=kW(t),Br(Hv.count(__(t),t)+(4===__(t).getUTCDay()),n,2)}function m8e(t){return t.getUTCDay()}function g8e(t,n){return Br(I2.count(__(t)-1,t),n,2)}function v8e(t,n){return Br(t.getUTCFullYear()%100,n,2)}function y8e(t,n){return Br((t=kW(t)).getUTCFullYear()%100,n,2)}function _8e(t,n){return Br(t.getUTCFullYear()%1e4,n,4)}function b8e(t,n){var e=t.getUTCDay();return Br((t=e>=4||0===e?Hv(t):Hv.ceil(t)).getUTCFullYear()%1e4,n,4)}function x8e(){return"+0000"}function DW(){return"%"}function TW(t){return+t}function EW(t){return Math.floor(+t/1e3)}function MW(t){return null===t?NaN:+t}!function k8e(t){zv=function w5e(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=x_(r),u=w_(r),d=x_(o),h=w_(o),f=x_(s),p=w_(s),m=x_(a),g=w_(a),v=x_(l),y=w_(l),b={a:function H(Le){return s[Le.getDay()]},A:function le(Le){return o[Le.getDay()]},b:function E(Le){return l[Le.getMonth()]},B:function I(Le){return a[Le.getMonth()]},c:null,d:bW,e:bW,f:G5e,g:t8e,G:i8e,H:H5e,I:U5e,j:z5e,L:xW,m:W5e,M:q5e,p:function N(Le){return r[+(Le.getHours()>=12)]},q:function q(Le){return 1+~~(Le.getMonth()/3)},Q:TW,s:EW,S:Y5e,u:X5e,U:J5e,V:K5e,w:Q5e,W:Z5e,x:null,X:null,y:e8e,Y:n8e,Z:r8e,"%":DW},C={a:function V(Le){return s[Le.getUTCDay()]},A:function re(Le){return o[Le.getUTCDay()]},b:function he(Le){return l[Le.getUTCMonth()]},B:function Oe(Le){return a[Le.getUTCMonth()]},c:null,d:CW,e:CW,f:l8e,g:y8e,G:b8e,H:o8e,I:s8e,j:a8e,L:SW,m:c8e,M:u8e,p:function _e(Le){return r[+(Le.getUTCHours()>=12)]},q:function Xe(Le){return 1+~~(Le.getUTCMonth()/3)},Q:TW,s:EW,S:d8e,u:h8e,U:f8e,V:p8e,w:m8e,W:g8e,x:null,X:null,y:v8e,Y:_8e,Z:x8e,"%":DW},k={a:function U(Le,rt,B){var ne=f.exec(rt.slice(B));return ne?(Le.w=p[ne[0].toLowerCase()],B+ne[0].length):-1},A:function G(Le,rt,B){var ne=d.exec(rt.slice(B));return ne?(Le.w=h[ne[0].toLowerCase()],B+ne[0].length):-1},b:function X(Le,rt,B){var ne=v.exec(rt.slice(B));return ne?(Le.m=y[ne[0].toLowerCase()],B+ne[0].length):-1},B:function te(Le,rt,B){var ne=m.exec(rt.slice(B));return ne?(Le.m=g[ne[0].toLowerCase()],B+ne[0].length):-1},c:function P(Le,rt,B){return z(Le,n,rt,B)},d:yW,e:yW,f:L5e,g:vW,G:gW,H:_W,I:_W,j:F5e,L:R5e,m:N5e,M:P5e,p:function R(Le,rt,B){var ne=c.exec(rt.slice(B));return ne?(Le.p=u[ne[0].toLowerCase()],B+ne[0].length):-1},q:I5e,Q:B5e,s:V5e,S:j5e,u:T5e,U:E5e,V:A5e,w:D5e,W:M5e,x:function W(Le,rt,B){return z(Le,e,rt,B)},X:function J(Le,rt,B){return z(Le,i,rt,B)},y:vW,Y:gW,Z:O5e,"%":$5e};function D(Le,rt){return function(B){var je,yt,Tt,ne=[],ie=-1,Me=0,Ye=Le.length;for(B instanceof Date||(B=new Date(+B));++ie53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Ye=(Me=xI(b_(ne.y,0,1))).getUTCDay(),Me=Ye>4||0===Ye?I2.ceil(Me):I2(Me),Me=dW.offset(Me,7*(ne.V-1)),ne.y=Me.getUTCFullYear(),ne.m=Me.getUTCMonth(),ne.d=Me.getUTCDate()+(ne.w+6)%7):(Ye=(Me=bI(b_(ne.y,0,1))).getDay(),Me=Ye>4||0===Ye?N2.ceil(Me):N2(Me),Me=pW.offset(Me,7*(ne.V-1)),ne.y=Me.getFullYear(),ne.m=Me.getMonth(),ne.d=Me.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ye="Z"in ne?xI(b_(ne.y,0,1)).getUTCDay():bI(b_(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+7*ne.W-(Ye+5)%7:ne.w+7*ne.U-(Ye+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,xI(ne)):bI(ne)}}function z(Le,rt,B,ne){for(var je,yt,ie=0,Me=rt.length,Ye=B.length;ie=Ye)return-1;if(37===(je=rt.charCodeAt(ie++))){if(je=rt.charAt(ie++),!(yt=k[je in mW?rt.charAt(ie++):je])||(ne=yt(Le,B,ne))<0)return-1}else if(je!=B.charCodeAt(ne++))return-1}return ne}return b.x=D(e,b),b.X=D(i,b),b.c=D(n,b),C.x=D(e,C),C.X=D(i,C),C.c=D(n,C),{format:function(Le){var rt=D(Le+="",b);return rt.toString=function(){return Le},rt},parse:function(Le){var rt=L(Le+="",!1);return rt.toString=function(){return Le},rt},utcFormat:function(Le){var rt=D(Le+="",C);return rt.toString=function(){return Le},rt},utcParse:function(Le){var rt=L(Le+="",!0);return rt.toString=function(){return Le},rt}}}(t),AW=zv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const D8e=rI(iI).right,IW=(rI(MW),D8e);function T8e(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function A8e(t){return+t}var NW=[0,1];function Gv(t){return t}function wI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function E8e(t){return function(){return t}}(isNaN(n)?NaN:.5)}function O8e(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?I8e:O8e,l=c=null,d}function d(h){return null==h||isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lu)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,A8e),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=T8e,u()},d.clamp=function(h){return arguments.length?(s=!!h||Gv,u()):s!==Gv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(Gv,Gv)}function C_(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function P8e(t){return new Date(t)}function j8e(t){return t instanceof Date?+t:+new Date(+t)}function jW(t,n,e,i,r,o,s,a,l,c){var u=PW(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),C=c("%Y");function k(D){return(l(D)=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function F2(t){if(!(n=R8e.exec(t)))throw new Error("invalid format: "+t);var n;return new CI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function CI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function P2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function Wv(t){return(t=P2(Math.abs(t)))?t[1]:NaN}function LW(t,n){var e=P2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}F2.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const $W={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function L8e(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return LW(100*t,n)},r:LW,s:function U8e(t,n){var e=P2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(RW=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+P2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function BW(t){return t}var j2,SI,UW,VW=Array.prototype.map,HW=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function X8e(t){var n=t.domain;return t.ticks=function(e){var i=n();return function qLe(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0){let l=Math.round(t/a),c=Math.round(n/a);for(l*an&&--c,s=new Array(o=c-l+1);++rn&&--c,s=new Array(o=c-l+1);++r0;){if((c=HG(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function mo(){var t=PW();return t.copy=function(){return FW(t,mo())},C_.apply(t,arguments),X8e(t)}function zW(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(VW.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?BW:function V8e(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(VW.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=F2(d)).fill,f=d.align,p=d.sign,m=d.symbol,g=d.zero,v=d.width,y=d.comma,b=d.precision,C=d.trim,k=d.type;"n"===k?(y=!0,k="g"):$W[k]||(void 0===b&&(b=12),C=!0,k="g"),(g||"0"===h&&"="===f)&&(g=!0,h="0",f="=");var D="$"===m?e:"#"===m&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",L="$"===m?i:/[%p]/.test(k)?s:"",z=$W[k],R=/[defgprs%]/.test(k);function U(G){var P,W,J,X=D,te=L;if("c"===k)te=z(G)+te,G="";else{var H=(G=+G)<0||1/G<0;if(G=isNaN(G)?l:z(Math.abs(G),b),C&&(G=function H8e(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(G)),H&&0==+G&&"+"!==p&&(H=!1),X=(H?"("===p?p:a:"-"===p||"("===p?"":p)+X,te=("s"===k?HW[8+RW/3]:"")+te+(H&&"("===p?")":""),R)for(P=-1,W=G.length;++P(J=G.charCodeAt(P))||J>57){te=(46===J?r+G.slice(P+1):G.slice(P))+te,G=G.slice(0,P);break}}y&&!g&&(G=n(G,1/0));var le=X.length+G.length+te.length,E=le>1)+X+G+te+E.slice(le);break;default:G=E+X+G+te}return o(G)}return b=void 0===b?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),U.toString=function(){return d+""},U}return{format:c,formatPrefix:function u(d,h){var f=c(((d=F2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(Wv(h)/3))),m=Math.pow(10,-p),g=HW[8+p/3];return function(v){return f(m*v)+g}}}}(t),SI=j2.format,UW=j2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const GW=Symbol("implicit");function kI(){var t=new Map,n=[],e=[],i=GW;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==GW)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return kI(n,e).unknown(i)},C_.apply(r,arguments),r}function ja(){var o,s,t=kI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function qW(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],aPm)if(Math.abs(u*a-l*c)>Pm&&r){var h=e-o,f=i-s,p=a*a+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((DI-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,C=y/g;Math.abs(b-1)>Pm&&(this._+="L"+(t+b*c)+","+(n+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Pm||Math.abs(this._y1-c)>Pm)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%TI+TI),d>K8e?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Pm&&(this._+="A"+e+","+e+",0,"+ +(d>=DI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const AI=XW;function uo(t){return function(){return t}}function JW(t){return t[0]}function KW(t){return t[1]}function R2(){var t=JW,n=KW,e=uo(!0),i=null,r=Fm,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=AI())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],b[f]);a.lineEnd(),a.areaEnd()}g&&(y[d]=+t(m,d,u),b[d]=+e(m,d,u),a.point(n?+n(m,d,u):y[d],i?+i(m,d,u):b[d]))}if(v)return a=null,v+""||null}function c(){return R2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:uo(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:uo(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:uo(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:uo(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:uo(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:uo(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:uo(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function QW(){}function MI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ZW(t,n){this._context=t,this._k=(1-n)/6}function eq(t,n){this._context=t,this._k=(1-n)/6}function tq(t){this._curve=t}function m6e(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function sq(t,n){var r,s,a,l,c,e=new T_(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=P6e);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new T_(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(aq)}function P6e(t){return t.children}function j6e(t){t.data=t.data.data}function aq(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function T_(t){this.data=t,this.depth=this.height=0,this.parent=null}ZW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:MI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:MI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new ZW(i,n)}return e.tension=function(i){return t(+i)},e}(0),eq.prototype={areaStart:QW,areaEnd:QW,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:MI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new eq(i,n)}return e.tension=function(i){return t(+i)},e}(0),function nq(t){function n(e){return new tq(t(e))}return n._curve=t,n}(Fm),tq.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function y6e(t,n,e,i,r,o){for(var l,c,f,p,g,v,y,b,C,k,D,s=[],a=n.children,u=0,d=0,h=a.length,m=n.value;uy&&(y=c),D=g*g*k,(b=Math.max(y/D,D/v))>C){g-=c;break}C=b}s.push(l={value:g,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),T_.prototype=sq.prototype={constructor:T_,count:function w6e(){return this.eachAfter(x6e)},each:function C6e(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function D6e(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function T6e(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function E6e(t){for(var n=this,e=function A6e(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function M6e(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function O6e(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function I6e(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function N6e(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function F6e(){return sq(this).eachBefore(j6e)}};const V6e=["caretElm"];function H6e(t,n){}const U6e=function(t){return{model:t}};function z6e(t,n){if(1&t&&(_(0,"span"),Z(1,H6e,0,0,"ng-template",5),x()),2&t){const e=$();w(1),S("ngTemplateOutlet",e.template)("ngTemplateOutletContext",sr(2,U6e,e.context))}}function G6e(t,n){1&t&&pe(0,"span",6),2&t&&S("innerHTML",$().title,Yx)}function W6e(t,n){if(1&t&&(st(),zp(),pe(0,"ngx-charts-scale-legend",4)),2&t){const e=$();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function q6e(t,n){if(1&t){const e=vt();st(),zp(),_(0,"ngx-charts-legend",5),ye("labelClick",function(r){return Be(e),Ve($().legendLabelClick.emit(r))})("labelActivate",function(r){return Be(e),Ve($().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return Be(e),Ve($().legendLabelDeactivate.emit(r))}),x()}if(2&t){const e=$();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const uq=["*"],Y6e=["ngx-charts-axis-label",""],dq=["ticksel"],X6e=["ngx-charts-x-axis-ticks",""];function J6e(t,n){if(1&t&&(st(),_(0,"g",3)(1,"title"),O(2),x(),_(3,"text",4),O(4),x()()),2&t){const e=n.$implicit,i=$();ut("transform",i.tickTransform(e)),w(2),bt(i.tickFormat(e)),w(1),tr("font-size","12px"),ut("text-anchor",i.textAnchor)("transform",i.textTransform),w(1),mn(" ",i.tickTrim(i.tickFormat(e))," ")}}function K6e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"line",6),x()),2&t){const e=$(2);ut("transform",e.gridLineTransform()),w(1),ut("y1",-e.gridLineHeight)}}function Q6e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,K6e,2,2,"g",5),x()),2&t){const e=n.$implicit,i=$();ut("transform",i.tickTransform(e)),w(1),S("ngIf",i.showGridLines)}}const Z6e=["ngx-charts-x-axis",""];function e$e(t,n){if(1&t){const e=vt();st(),_(0,"g",2),ye("dimensionsChanged",function(r){return Be(e),Ve($().emitTicksHeight(r))}),x()}if(2&t){const e=$();S("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function t$e(t,n){if(1&t&&(st(),pe(0,"g",3)),2&t){const e=$();S("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const n$e=["ngx-charts-y-axis-ticks",""];function i$e(t,n){if(1&t&&(st(),_(0,"g",4)(1,"title"),O(2),x(),_(3,"text",5),O(4),x()()),2&t){const e=n.$implicit,i=$();ut("transform",i.transform(e)),w(2),bt(i.tickFormat(e)),w(1),tr("font-size","12px"),ut("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),w(1),mn(" ",i.tickTrim(i.tickFormat(e))," ")}}function r$e(t,n){if(1&t&&(st(),pe(0,"path",6)),2&t){const e=$();ut("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function o$e(t,n){1&t&&(st(),pe(0,"line",9)),2&t&&ut("x2",$(3).gridLineWidth)}function s$e(t,n){1&t&&(st(),pe(0,"line",9)),2&t&&ut("x2",-$(3).gridLineWidth)}function a$e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,o$e,1,1,"line",8),Z(2,s$e,1,1,"line",8),x()),2&t){const e=$(2);ut("transform",e.gridLineTransform()),w(1),S("ngIf","left"===e.orient),w(1),S("ngIf","right"===e.orient)}}function l$e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,a$e,3,3,"g",7),x()),2&t){const e=n.$implicit,i=$();ut("transform",i.transform(e)),w(1),S("ngIf",i.showGridLines)}}function c$e(t,n){if(1&t&&(st(),_(0,"g")(1,"title"),O(2),x(),_(3,"text",11),O(4),x()()),2&t){const e=$(2).$implicit,i=$();w(2),bt(i.tickTrim(i.tickFormat(e.value))),w(1),ut("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),w(1),mn(" ",e.name," ")}}function u$e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"line",10),Z(2,c$e,5,6,"g",7),x()),2&t){const e=$().$implicit,i=$();ut("transform",i.transform(e.value)),w(1),ut("x2",i.gridLineWidth)("transform",i.gridLineTransform()),w(1),S("ngIf",i.showRefLabels)}}function d$e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,u$e,3,4,"g",7),x()),2&t){const e=$();w(1),S("ngIf",e.showRefLines)}}const h$e=["ngx-charts-y-axis",""];function f$e(t,n){if(1&t){const e=vt();st(),_(0,"g",2),ye("dimensionsChanged",function(r){return Be(e),Ve($().emitTicksWidth(r))}),x()}if(2&t){const e=$();S("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function p$e(t,n){if(1&t&&(st(),pe(0,"g",3)),2&t){const e=$();S("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const m$e=["ngx-charts-circle-series",""];function g$e(t,n){if(1&t&&(st(),pe(0,"rect",4)),2&t){const e=$(2);S("@animationState","active"),ut("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const v$e=function(t){return{name:t}};function y$e(t,n){if(1&t){const e=vt();st(),_(0,"g")(1,"defs"),pe(2,"g",1),x(),Z(3,g$e,1,6,"rect",2),_(4,"g",3),ye("select",function(){Be(e);const r=$();return Ve(r.onClick(r.circle.data))})("activate",function(){return Be(e),Ve($().activateCircle())})("deactivate",function(){return Be(e),Ve($().deactivateCircle())}),x()()}if(2&t){const e=$();w(2),S("name",e.gradientId)("stops",e.circle.gradientStops),w(1),S("ngIf",e.barVisible&&"standard"===e.type),w(1),jn("active",e.isActive(sr(18,v$e,e.circle.seriesName))),S("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const _$e=["ngx-charts-circle",""],C$e=["ngx-charts-svg-linear-gradient",""];function S$e(t,n){if(1&t&&(st(),pe(0,"stop")),2&t){const e=n.$implicit;tr("stop-color",e.color)("stop-opacity",e.opacity),ut("offset",e.offset+"%")}}const T$e=["ngx-charts-area",""];function E$e(t,n){if(1&t&&(st(),_(0,"defs"),pe(1,"g",2),x()),2&t){const e=$();w(1),S("name",e.gradientId)("stops",e.gradientStops)}}const M$e=["tooltipAnchor"],O$e=["ngx-charts-tooltip-area",""];function I$e(t,n){if(1&t&&(_(0,"div",6),pe(1,"span",7),O(2),x()),2&t){const e=n.$implicit,i=$(2);w(1),tr("background-color",e.color),w(1),mn(" ",i.getToolTipText(e)," ")}}function N$e(t,n){if(1&t&&(st(),zp(),_(0,"div",4),Z(1,I$e,3,3,"div",5),x()),2&t){const e=n.model;w(1),S("ngForOf",e)}}const F$e=["ngx-charts-timeline",""];function P$e(t,n){if(1&t&&(_(0,"header",4)(1,"span",5),O(2),x()()),2&t){const e=$();w(2),bt(e.title)}}function j$e(t,n){if(1&t){const e=vt();_(0,"li",6)(1,"ngx-charts-legend-entry",7),ye("select",function(r){return Be(e),Ve($().labelClick.emit(r))})("activate",function(r){return Be(e),Ve($().activate(r))})("deactivate",function(r){return Be(e),Ve($().deactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=$();w(1),S("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const Ls=["tooltipTemplate"],H2=["seriesTooltipTemplate"],So=function(t,n){return[t,n]},r7e=["ngx-charts-line",""];function o7e(t,n){if(1&t){const e=vt();st(),_(0,"g",7),ye("dimensionsChanged",function(r){return Be(e),Ve($().updateXAxisHeight(r))}),x()}if(2&t){const e=$();S("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function s7e(t,n){if(1&t){const e=vt();st(),_(0,"g",8),ye("dimensionsChanged",function(r){return Be(e),Ve($().updateYAxisWidth(r))}),x()}if(2&t){const e=$();S("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function a7e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"g",9),x()),2&t){const e=n.$implicit,i=$();S("@animationState","active"),w(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function l7e(t,n){if(1&t){const e=vt();st(),_(0,"g")(1,"g",13),ye("select",function(r){return Be(e),Ve($(2).onClick(r))})("activate",function(r){return Be(e),Ve($(2).onActivate(r))})("deactivate",function(r){return Be(e),Ve($(2).onDeactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=$(2);w(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function c7e(t,n){if(1&t){const e=vt();st(),_(0,"g",10),ye("mouseleave",function(){return Be(e),Ve($().hideCircles())}),_(1,"g",11),ye("hover",function(r){return Be(e),Ve($().updateHoveredVertical(r))}),x(),Z(2,l7e,2,9,"g",12),x()}if(2&t){const e=$();w(1),S("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),w(1),S("ngForOf",e.results)}}function u7e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"g",15),x()),2&t){const e=n.$implicit,i=$(2);w(1),S("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function d7e(t,n){if(1&t){const e=vt();st(),_(0,"g",14),ye("onDomainChange",function(r){return Be(e),Ve($().updateDomain(r))}),Z(1,u7e,2,8,"g",4),x()}if(2&t){const e=$();S("results",e.results)("view",Mr(10,So,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),ut("transform",e.timelineTransform),w(1),S("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const h7e=["ngx-charts-line-series",""];function f7e(t,n){if(1&t&&(st(),pe(0,"g",4)),2&t){const e=$();S("name",e.gradientId)("stops",e.gradientStops)}}function p7e(t,n){if(1&t&&(st(),pe(0,"g",5)),2&t){const e=$();jn("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),S("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let mq=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function c9e(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new tje(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Rz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(gt(Rh),gt(zg),gt(ua))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function u9e(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function d9e(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:u9e(o.value,t,n)}),this[r]}}}}var $s=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}($s||($s={})),$s))();const Xf=7;function gq(t,n,e){return"top"===e?t.top-Xf:"bottom"===e?t.top+t.height-n.height+Xf:"center"===e?t.top+t.height/2-n.height/2:void 0}function vq(t,n,e){return"left"===e?t.left-Xf:"right"===e?t.left+t.width-n.width+Xf:"center"===e?t.left+t.width/2-n.width/2:void 0}class yc{static calculateVerticalAlignment(n,e,i){let r=gq(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Xf),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Xf),"center"===r&&(o=e.height/2-i.height/2);const s=gq(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=vq(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Xf),"right"===r&&(o=e.width-n.width/2-i.width/2-Xf),"center"===r&&(o=e.width/2-i.width/2);const s=vq(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===$s.right?(a=-7,s=yc.calculateVerticalCaret(i,e,r,o)):n===$s.left?(a=e.width,s=yc.calculateVerticalCaret(i,e,r,o)):n===$s.top?(s=e.height,a=yc.calculateHorizontalCaret(i,e,r,o)):n===$s.bottom&&(s=-7,a=yc.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===$s.right?(a=i.left+i.width+r,s=yc.calculateVerticalAlignment(i,e,o)):n===$s.left?(a=i.left-e.width-r,s=yc.calculateVerticalAlignment(i,e,o)):n===$s.top?(s=i.top-e.height-r,a=yc.calculateHorizontalAlignment(i,e,o)):n===$s.bottom&&(s=i.top+i.height+r,a=yc.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(yc.shouldFlip(i,e,n,r)){if(n===$s.right)return $s.left;if(n===$s.left)return $s.right;if(n===$s.top)return $s.bottom;if(n===$s.bottom)return $s.top}return n}}let h9e=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=yc.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=yc.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=yc.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&xo(V6e,5),2&e){let r;wn(r=Cn())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&ye("resize",function(){return i.onWindowResize()},0,h8),2&e&&Pd(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(_(0,"div"),pe(1,"span",0,1),_(3,"div",2),Z(4,z6e,2,4,"span",3),Z(5,G6e,1,1,"span",4),x()()),2&e&&(w(1),function B6(t,n,e){Du(ic,jd,Qg(zt(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),S("hidden",!i.showCaret),w(3),S("ngIf",!i.title),w(1),S("ngIf",i.title))},dependencies:[vn,Au],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function Lz(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o}([d9e(100)],t.prototype,"onWindowResize",null),t})();class f9e{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let NI=(()=>{class t extends f9e{constructor(e){super(e),this.type=h9e}}return t.\u0275fac=function(e){return new(e||t)(gt(mq))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),Zo=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new it,this.legendLabelActivate=new it,this.legendLabelDeactivate=new it}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Qr([NI]),Yn],ngContentSelectors:uq,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(kf(),_(0,"div",0),st(),_(1,"svg",1),Df(2),x(),Z(3,W6e,1,5,"ngx-charts-scale-legend",2),Z(4,q6e,1,7,"ngx-charts-legend",3),x()),2&e&&(tr("width",i.view[0],"px"),S("@animationState","active")("@.disabled",!i.animations),w(1),ut("width",i.chartWidth)("height",i.view[1]),w(2),S("ngIf",i.showLegend&&"scaleLegend"===i.legendType),w(1),S("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[vn,Aq,Oq]},encapsulation:2,data:{animation:[tl("animationState",[Ma(":enter",[kr({opacity:0}),Aa("500ms 100ms",kr({opacity:1}))])])]},changeDetection:0}),t})(),p9e=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new it,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(nr))},t.\u0275dir=sn({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),es=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new it}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new p9e(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new Dje(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(nr),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Yn],decls:1,vars:0,template:function(e,i){1&e&&pe(0,"div")},encapsulation:2}),t})(),FI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Yn],attrs:Y6e,decls:2,vars:6,template:function(e,i){1&e&&(st(),_(0,"text"),O(1),x()),2&e&&(ut("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),w(1),mn(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Jf(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function yq(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new it,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=yq(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Jf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xo(dq,5),2&e){let r;wn(r=Cn())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:X6e,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(st(),_(0,"g",null,0),Z(2,J6e,5,7,"g",1),x(),Z(3,Q6e,2,2,"g",2)),2&e&&(w(2),S("ngForOf",i.ticks),w(1),S("ngForOf",i.ticks))},dependencies:[Ln,vn],encapsulation:2,changeDetection:0}),t})(),Vl=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new it,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&xo(_q,5),2&e){let r;wn(r=Cn())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:Z6e,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(st(),_(0,"g"),Z(1,e$e,1,12,"g",0),Z(2,t$e,1,5,"g",1),x()),2&e&&(ut("class",i.xAxisClassName)("transform",i.transform),w(1),S("ngIf",i.xScale),w(1),S("ngIf",i.showLabel))},dependencies:[vn,FI,_q],encapsulation:2,changeDetection:0}),t})();let bq=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new it,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function tf(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=yq(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Jf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xo(dq,5),2&e){let r;wn(r=Cn())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:n$e,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(st(),_(0,"g",null,0),Z(2,i$e,5,9,"g",1),x(),Z(3,r$e,1,2,"path",2),Z(4,l$e,2,2,"g",3),Z(5,d$e,2,1,"g",3)),2&e&&(w(2),S("ngForOf",i.ticks),w(1),S("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),w(1),S("ngForOf",i.ticks),w(1),S("ngForOf",i.referenceLines))},dependencies:[Ln,vn],encapsulation:2,changeDetection:0}),t})(),yl=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new it,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&xo(bq,5),2&e){let r;wn(r=Cn())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:h$e,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(st(),_(0,"g"),Z(1,f$e,1,14,"g",0),Z(2,p$e,1,5,"g",1),x()),2&e&&(ut("class",i.yAxisClassName)("transform",i.transform),w(1),S("ngIf",i.yScale),w(1),S("ngIf",i.showLabel))},dependencies:[vn,FI,bq],encapsulation:2,changeDetection:0}),t})(),xq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Mf]}),t})();var U2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(U2||(U2={})),U2))(),z2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(z2||(z2={})),z2))(),Kf=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}(Kf||(Kf={})),Kf))();let Bu=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=$s.top,this.tooltipAlignment=z2.center,this.tooltipType=U2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=Kf.all,this.tooltipImmediateExit=!1,this.show=new it,this.hide=new it}get listensForFocus(){return this.tooltipShowEvent===Kf.all||this.tooltipShowEvent===Kf.focus}get listensForHover(){return this.tooltipShowEvent===Kf.all||this.tooltipShowEvent===Kf.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(de(NI),de(jl),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&ye("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),wq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[mq,NI],imports:[Mf]}),t})();function Ra(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function na(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const Cq={};function _l(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,Cq[t]?_l():(Cq[t]=!0,t)}let LI,E_=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new it,this.activate=new it,this.deactivate=new it,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+_l().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Ra(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${na(r)} \u2022 ${na(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Yn],attrs:m$e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&Z(0,y$e,5,20,"g",0),2&e&&S("ngIf",i.circle)},dependencies:function(){return[vn,Bu,G2,Rm]},encapsulation:2,data:{animation:[tl("animationState",[Ma(":enter",[kr({opacity:0}),Aa(250,kr({opacity:1}))])])]},changeDetection:0}),t})(),G2=(()=>{class t{constructor(){this.select=new it,this.activate=new it,this.deactivate=new it}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&ye("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Yn],attrs:_$e,decls:1,vars:8,template:function(e,i){1&e&&(st(),pe(0,"circle")),2&e&&ut("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),Rm=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Yn],attrs:C$e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(st(),_(0,"linearGradient",0),Z(1,S$e,1,5,"stop",1),x()),2&e&&(S("id",i.name),ut("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),w(1),S("ngForOf",i.stops))},dependencies:[Ln],encapsulation:2,changeDetection:0}),t})(),RI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new it,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+_l().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=pa(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Yn],attrs:T$e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(Z(0,E$e,2,2,"defs",0),st(),pe(1,"path",1)),2&e&&(S("ngIf",i.gradient),w(1),tr("opacity",i.opacity),ut("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[vn,Rm],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?LI=window:typeof global<"u"&&(LI=global);const Eq=LI.MouseEvent;function $I(t,n=!1,e=!0){if("function"==typeof Eq)return new Eq(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let A_=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new it}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=$I("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=$I("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=$I("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&xo(M$e,5),2&e){let r;wn(r=Cn())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:O$e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","'auto'",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(st(),_(0,"g")(1,"rect",0),ye("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),x(),Z(2,N$e,2,1,"ng-template",null,1,cs),pe(4,"rect",2,3),x()),2&e){const r=Ta(3);w(1),ut("x",0)("width",i.dims.width)("height",i.dims.height),w(3),tr("opacity",i.anchorOpacity)("pointer-events","none"),S("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),ut("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[Ln,Bu],encapsulation:2,data:{animation:[tl("animationState",[Ma("inactive => active",[kr({opacity:0}),Aa(250,kr({opacity:.7}))]),Ma("active => inactive",[kr({opacity:.7}),Aa(250,kr({opacity:0}))])])]},changeDetection:0}),t})(),M_=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new it,this.onDomainChange=new it,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+_l().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=Im().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=mo().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=Nm().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function GLe(){return nI(A2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=(Rr.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),pa(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),pa(this.element).select(".brush").call(this.brush),pa(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Yn],attrs:F$e,ngContentSelectors:uq,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(kf(),st(),_(0,"g",0)(1,"filter"),pe(2,"feColorMatrix",1),x(),_(3,"g",2),Df(4),x(),pe(5,"rect",3)(6,"g",4),x()),2&e&&(ut("transform",i.transform),w(1),ut("id",i.filterId),w(4),ut("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),Aq=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new it,this.labelActivate=new it,this.labelDeactivate=new it,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Ra(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Yn],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(_(0,"div"),Z(1,P$e,3,1,"header",0),_(2,"div",1)(3,"ul",2),Z(4,j$e,2,4,"li",3),x()()()),2&e&&(tr("width",i.width,"px"),w(1),S("ngIf",(null==i.title?null:i.title.length)>0),w(2),tr("max-height",i.height-45,"px"),jn("horizontal-legend",i.horizontal),w(1),S("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[Ln,vn,Mq]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),Mq=(()=>{class t{constructor(){this.isActive=!1,this.select=new it,this.activate=new it,this.deactivate=new it,this.toggle=new it}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&ye("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(_(0,"span",0),ye("click",function(){return i.select.emit(i.formattedLabel)}),_(1,"span",1),ye("click",function(){return i.toggle.emit(i.formattedLabel)}),x(),_(2,"span",2),O(3),x()()),2&e&&(jn("active",i.isActive),S("title",i.formattedLabel),w(1),tr("background-color",i.color),w(2),mn(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),Oq=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(de(V7))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Yn],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1)(2,"span"),O(3),x()(),pe(4,"div",2),_(5,"div",1)(6,"span"),O(7),x()()()),2&e&&(tr("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),jn("horizontal-legend",i.horizontal),w(3),bt(i.valueRange[1].toLocaleString()),w(1),tr("background",i.gradient),w(3),bt(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Vu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Mf,xq,wq,Mf,xq,wq]}),t})();let Nq=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class fs{constructor(n,e,i,r){"string"==typeof n&&(n=Nq.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=Nq.find(o=>o.name===n)),"quantile"===e)r=qW().range(n.domain).domain(i);else if("ordinal"===e)r=kI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=zW(0,1,1/o.length);r=mo().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=mo().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=mo().domain(this.domain).range([0,1]),r=ja().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let m9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),Pq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),v9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),b9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),Lq=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new it,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=pa(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Yn],attrs:r7e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(st(),pe(0,"path",0)),2&e&&(S("@animationState","active"),ut("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[tl("animationState",[Ma(":enter",[kr({strokeDasharray:2e3,strokeDashoffset:2e3}),Aa(1e3,kr({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),x9e=(()=>{class t extends es{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=Fm,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new it,this.deactivate=new it,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function hs({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,m=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(m-=5,m-=o,a&&(m-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),m=Math.max(0,m),{width:Math.floor(p),height:Math.floor(m),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+_l().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function q2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Qf(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=Im().range([0,i]).domain(e):"linear"===this.scaleType?(r=mo().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=Nm().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=mo().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new fs(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(yi(r,Ls,5),yi(r,H2,5)),2&e){let o;wn(o=Cn())&&(i.tooltipTemplate=o.first),wn(o=Cn())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&ye("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[pi],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(_(0,"ngx-charts-chart",0),ye("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),st(),_(1,"defs")(2,"clipPath"),pe(3,"rect"),x()(),_(4,"g",1),Z(5,o7e,1,10,"g",2),Z(6,s7e,1,12,"g",3),_(7,"g"),Z(8,a7e,2,11,"g",4),Z(9,c7e,3,9,"g",5),x()(),Z(10,d7e,2,13,"g",6),x()),2&e&&(S("view",Mr(17,So,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),w(2),ut("id",i.clipPathId),w(1),ut("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),w(1),ut("transform",i.transform),w(1),S("ngIf",i.xAxis),w(1),S("ngIf",i.yAxis),w(1),ut("clip-path",i.clipPath),w(1),S("ngForOf",i.results)("ngForTrackBy",i.trackBy),w(1),S("ngIf",!i.tooltipDisabled),w(1),S("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[Ln,vn,Vl,yl,A_,Zo,E_,M_,w9e]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[tl("animationState",[Ma(":leave",[kr({opacity:1}),Aa(500,kr({opacity:0}))])])]},changeDetection:0}),t})(),w9e=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return R2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return qv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return qv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function BI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function HI(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function VI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+_l().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Yn],attrs:h7e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(st(),_(0,"g")(1,"defs"),Z(2,f7e,1,2,"g",0),x(),pe(3,"g",1)(4,"g",2),Z(5,p7e,1,9,"g",3),x()),2&e&&(w(2),S("ngIf",i.hasGradient),w(1),jn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),w(1),jn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),w(1),S("ngIf",i.hasRange))},dependencies:[vn,RI,Rm,Lq],encapsulation:2,changeDetection:0}),t})(),$q=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})();Math;let WI=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),T9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu,WI,$q]}),t})(),O9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),F9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),R9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu,WI,Pq]}),t})(),$9e=(()=>{class t{constructor(){!function L9e(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu,m9e,Pq,v9e,b9e,$q,T9e,O9e,WI,F9e,R9e]}),t})();function B9e(t,n){if(1&t&&(_(0,"ngb-alert",19),pe(1,"img",20),_(2,"h6",21),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function V9e(t,n){1&t&&pe(0,"img",31)}function H9e(t,n){1&t&&pe(0,"img",32)}function U9e(t,n){1&t&&pe(0,"img",33)}function z9e(t,n){1&t&&pe(0,"img",34)}function G9e(t,n){if(1&t&&(_(0,"tr",24)(1,"td"),sc(2,25),Z(3,V9e,1,0,"img",26),Z(4,H9e,1,0,"img",27),Z(5,U9e,1,0,"img",28),Z(6,z9e,1,0,"img",29),ac(),_(7,"span"),O(8),x()(),_(9,"td"),O(10),_(11,"span",30),O(12),x()(),_(13,"td"),O(14),_(15,"span",30),O(16),x()(),_(17,"td"),O(18),_(19,"span",30),O(20),x()(),_(21,"td"),O(22),_(23,"span",30),O(24),x()()()),2&t){const e=n.$implicit,i=$(2);w(2),S("ngSwitch",e.health),w(1),S("ngSwitchCase",0),w(1),S("ngSwitchCase",1),w(1),S("ngSwitchCase",2),w(1),S("ngSwitchCase",3),w(2),bt(e.name),w(2),mn("",e.session_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxSessionCount()-e.session_count," delta)"),w(2),mn("",e.presence_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxPresenceCount()-e.presence_count," delta)"),w(2),mn("",e.match_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxMatchCount()-e.match_count," delta)"),w(2),mn("",e.goroutine_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function W9e(t,n){if(1&t&&(_(0,"tbody"),Z(1,G9e,25,18,"tr",22),_(2,"tr",3),pe(3,"td",23),_(4,"th",3),O(5),x(),_(6,"th",3),O(7),x(),_(8,"th",3),O(9),x(),_(10,"th",3),O(11),x()()()),2&t){const e=$();w(1),S("ngForOf",e.statusData.nodes),w(4),bt(e.getTotalSessionCount()),w(2),bt(e.getMaxPresenceCount()),w(2),bt(e.getTotalMatchCount()),w(2),bt(e.getTotalGorountineCount())}}function q9e(t,n){if(1&t&&(_(0,"option",35),O(1),x()),2&t){const e=n.$implicit,i=$();Ph("value",e),w(1),bt(i.ranges[e])}}const J2=function(t){return{"background-color":t}};function Y9e(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function X9e(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,Y9e,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function J9e(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",37),Z(2,X9e,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function K9e(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function Q9e(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,K9e,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function Z9e(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",43),Z(2,Q9e,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function eVe(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function tVe(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,eVe,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function nVe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",44),Z(2,tVe,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function iVe(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function rVe(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,iVe,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function oVe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",45),Z(2,rVe,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let sVe=(()=>{class t{route;consoleService;formBuilder;error="";showDelta=!1;statusData;rateGraphData=[];latencyGraphData=[];inputGraphData=[];outputGraphData=[];rangeForm;ranges={1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"};rangesKeys=Object.keys(this.ranges).map(e=>+e);colorScheme={domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]};samples=60;refreshTimer;$refreshTimer;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=Gy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(m=>m.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=Gy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Status"),x(),Z(2,B9e,4,2,"ngb-alert",1),_(3,"table",2),ye("mouseover",function(){return r.showDelta=!0})("mouseout",function(){return r.showDelta=!1}),_(4,"thead",3)(5,"tr")(6,"th",4),O(7,"Node name"),x(),_(8,"th",4),O(9,"Sessions"),x(),_(10,"th",4),O(11,"Presences"),x(),_(12,"th",4),O(13,"Authoritative Matches"),x(),_(14,"th",4),O(15,"Goroutines"),x()()(),Z(16,W9e,12,5,"tbody",5),x(),_(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),O(21,"View:"),x(),_(22,"div",9)(23,"select",10),ye("change",function(s){return r.setRange(s)}),Z(24,q9e,2,2,"option",11),vA(25,"sortNumbers"),x()()()()(),_(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),O(30,"Processing Latency"),x(),_(31,"small"),O(32," (ms)"),x()()(),_(33,"div",13)(34,"div",14)(35,"h5",15),O(36,"Rate"),x(),_(37,"small"),O(38," (rpc/s)"),x()()()(),_(39,"div",12)(40,"div",16),Z(41,J9e,4,12,"div",17),x(),_(42,"div",16),Z(43,Z9e,4,12,"div",17),x()(),_(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),O(48,"Input"),x(),_(49,"small"),O(50," (kb/s)"),x()()(),_(51,"div",13)(52,"div",14)(53,"h5",15),O(54,"Output"),x(),_(55,"small"),O(56," (kb/s)"),x()()()(),_(57,"div",12)(58,"div",16),Z(59,nVe,4,12,"div",17),x(),_(60,"div",16),Z(61,oVe,4,12,"div",17),x()()),2&i&&(w(2),S("ngIf",r.error),w(14),S("ngIf",r.statusData),w(1),S("formGroup",r.rangeForm),w(7),S("ngForOf",yA(25,8,r.rangesKeys)),w(17),S("ngIf",r.latencyGraphData.length>0),w(2),S("ngIf",r.rateGraphData.length>0),w(16),S("ngIf",r.inputGraphData.length>0),w(2),S("ngIf",r.outputGraphData.length>0))},dependencies:function(){return[Ln,vn,u7,Fw,l7,po,Ru,jPe,x9e,fa,HC,UC,kv,da,ha,js,Zs,lVe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})}return t})(),aVe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(et(r=>Rn(r.nodes.map(o=>o.name)))).pipe(Ll(r=>(e.data={...e.data,error:r},Rn([]))))}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),lVe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}static \u0275fac=function(i){return new(i||t)};static \u0275pipe=ul({name:"sortNumbers",type:t,pure:!1})}return t})();var cVe=ke(870),qI=ke(327);function uVe(t,n){if(1&t&&(_(0,"div",13)(1,"p")(2,"b"),O(3),x(),pe(4,"input",14),x()()),2&t){const e=$(2);w(3),bt(e.confirmDeleteForm.controls.numberValueControl.value.title),w(1),Ph("formControlName",e.confirmDeleteForm.controls.numberValueControl.value.id)}}const dVe=function(t){return{"is-invalid":t}};function hVe(t,n){if(1&t&&pe(0,"input",15),2&t){const e=$(2);S("ngClass",sr(1,dVe,e.f.delete.touched&&e.f.delete.invalid))}}function fVe(t,n){if(1&t&&(_(0,"div",9)(1,"form",10),Z(2,uVe,5,2,"div",11),Z(3,hVe,1,3,"input",12),x()()),2&t){const e=$();w(1),S("formGroup",e.confirmDeleteForm),w(1),S("ngIf",e.confirmDeleteForm.controls.numberValueControl),w(1),S("ngIf",e.confirmDeleteForm.controls.delete)}}let pVe=(()=>{class t{confirmed=new it;canceled=new it;title="Delete Confirmation";message="Are you sure you want to delete this item?";confirmDeleteForm;closeModal(){this.canceled.emit()}cancel(){this.canceled.emit()}confirm(){(!this.confirmDeleteForm||this.confirmDeleteForm.valid)&&this.confirmed.emit()}get f(){return this.confirmDeleteForm.controls}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Rt({type:t,selectors:[["app-delete-confirm-dialog"]],inputs:{confirmDeleteForm:"confirmDeleteForm"},outputs:{confirmed:"confirmed",canceled:"canceled"},decls:14,vars:3,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","Close","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["class","d-flex flex-column justify-content-center",4,"ngIf"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"click"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],["class","mt-2",4,"ngIf"],["type","text","class","form-control","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",3,"ngClass",4,"ngIf"],[1,"mt-2"],["type","number","value","30","min","0",2,"width","80px",3,"formControlName"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h4",1),O(2),x(),_(3,"button",2),ye("click",function(){return r.closeModal()}),_(4,"span",3),O(5,"\xd7"),x()()(),_(6,"div",4),O(7),Z(8,fVe,4,3,"div",5),x(),_(9,"div",6)(10,"button",7),ye("click",function(){return r.cancel()}),O(11,"Cancel"),x(),_(12,"button",8),ye("click",function(){return r.confirm()}),O(13,"Delete"),x()()),2&i&&(w(2),bt(r.title),w(5),mn(" ",r.message," "),w(1),S("ngIf",r.confirmDeleteForm))},dependencies:[nm,vn,fa,Qs,P3,da,ha,V3,js,Zs]})}return t})(),Hl=(()=>{class t{modalService;constructor(e){this.modalService=e}openDeleteConfirmModal(e,i=null,r="",o=""){const a=this.modalService.open(pVe,{backdrop:!1,centered:!0});i&&(a.componentInstance.confirmDeleteForm=i),r&&(a.componentInstance.title=r),o&&(a.componentInstance.message=o),a.componentInstance.confirmed.subscribe(()=>{e(i?.value),a.close()}),a.componentInstance.canceled.subscribe(()=>{a.close()})}static \u0275fac=function(i){return new(i||t)(gt(f2))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const mVe=["fileSelector"];function gVe(t,n){if(1&t&&(_(0,"div",8),O(1),x()),2&t){const e=$(2);w(1),bt(e.dropZoneLabel)}}function vVe(t,n){if(1&t){const e=vt();_(0,"div")(1,"input",9),ye("click",function(r){return Be(e),Ve($(2).openFileSelector(r))}),x()()}if(2&t){const e=$(2);w(1),Ph("value",e.browseBtnLabel),S("className",e.browseBtnClassName)}}function yVe(t,n){if(1&t&&(Z(0,gVe,2,1,"div",6),Z(1,vVe,2,2,"div",7)),2&t){const e=$();S("ngIf",e.dropZoneLabel),w(1),S("ngIf",e.showBrowseBtn)}}function _Ve(t,n){}const bVe=function(t){return{openFileSelector:t}};class K2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let Wq=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),qq=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new it,this.onFileOver=new it,this.onFileLeave=new it,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new K2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=Gy(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new K2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new K2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(de(nr),de(ca))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&yi(r,Wq,5,oo),2&e){let o;wn(o=Cn())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&xo(mVe,7),2&e){let r;wn(r=Cn())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(_(0,"div",0),ye("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),_(1,"div",1)(2,"input",2,3),ye("change",function(o){return i.uploadFiles(o)}),x(),Z(4,yVe,2,2,"ng-template",null,4,cs),Z(6,_Ve,0,0,"ng-template",5),x()()),2&e){const r=Ta(5);jn("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),S("className",i.dropZoneClassName),w(1),S("className",i.contentClassName),w(1),S("accept",i.accept)("multiple",i.multiple),ut("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),w(4),S("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",sr(13,bVe,i.openFileSelector))}},dependencies:[vn,Au],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),xVe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t,bootstrap:function(){return[qq]}}),t.\u0275inj=wi({imports:[Mf]}),t})();function wVe(t,n){1&t&&(_(0,"ngb-alert",21),pe(1,"img",22),_(2,"h6",23),O(3,"Failed to retrieve configuration."),x()()),2&t&&S("dismissible",!1)}function CVe(t,n){if(1&t&&(_(0,"span",32),O(1),x()),2&t){const e=$(2).$implicit;S("id",e.name),w(1),bt(e.value)}}function SVe(t,n){1&t&&(_(0,"span",33),O(1,"(empty)"),x()),2&t&&S("id",$(2).$implicit.name)}function kVe(t,n){if(1&t&&(_(0,"div",34)(1,"b"),O(2),x(),_(3,"label",26)(4,"a",27),pe(5,"img",10),x()()()),2&t){const e=$(2).index,i=$();w(2),bt(i.flatConfig[e+1].name),w(1),S("for",i.flatConfig[e+1].name),w(1),Kp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",i.flatConfig[e+1].name,"",$1)}}function DVe(t,n){if(1&t&&(_(0,"span",32),O(1),x()),2&t){const e=$(3).index,i=$();S("id",i.flatConfig[e+1].name),w(1),bt(i.flatConfig[e+1].value)}}function TVe(t,n){if(1&t&&(_(0,"span",33),O(1,"(empty)"),x()),2&t){const e=$(3).index;S("id",$().flatConfig[e+1].name)}}function EVe(t,n){if(1&t&&(_(0,"div",35),Z(1,DVe,2,2,"span",28),Z(2,TVe,2,1,"span",29),x()),2&t){const e=$(2).index,i=$();w(1),S("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),w(1),S("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function AVe(t,n){if(1&t&&(_(0,"div",25)(1,"div",7)(2,"b"),O(3),x(),_(4,"label",26)(5,"a",27),pe(6,"img",10),x()()(),_(7,"div",7),Z(8,CVe,2,2,"span",28),Z(9,SVe,2,1,"span",29),x(),Z(10,kVe,6,3,"div",30),Z(11,EVe,3,2,"div",31),x()),2&t){const e=$(),i=e.index,r=e.$implicit,o=$();jn("border-top-0",i>0),w(3),bt(r.name),w(1),S("for",r.name),w(1),Kp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",r.value.name,"",$1),w(3),S("ngIf",!o.isEmpty(r.value)),w(1),S("ngIf",o.isEmpty(r.value)),w(1),S("ngIf",i{class t{config;route;httpClient;modalService;consoleService;formBuilder;deleteConfirmService;configError="";uploadError="";deleteError="";jsonConfig;flatConfig;nakamaVersion;file;uploading=!1;uploadSuccess=!1;deleteSuccess=!1;deleting=!1;confirmDeleteForm;apiConfig;constructor(e,i,r,o,s,a,l){this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.deleteConfirmService=l,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Co.compose([Co.required,Co.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([(0,cVe.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});qI.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(()=>{this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(Q3(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})},this.confirmDeleteForm,"Delete All Data","Are you sure you want to delete all the database data?")}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(de(Y3),de(Pr),de(YC),de(f2),de(bi),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:41,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height","16"],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(Z(0,wVe,4,1,"ngb-alert",0),_(1,"h2",1),O(2,"Server Configuration"),x(),_(3,"div",2)(4,"h5")(5,"b"),O(6,"Server version:"),x(),O(7),x(),_(8,"button",3),ye("click",function(){return r.exportYaml()}),O(9,"Export Configuration"),x()(),_(10,"div",4),Z(11,MVe,2,1,"ng-container",5),_(12,"div",6)(13,"div",7)(14,"b"),O(15,"runtime.env"),x(),_(16,"label",8)(17,"a",9),pe(18,"img",10),x()()(),_(19,"div",11),Z(20,IVe,2,1,"div",12),Z(21,NVe,3,0,"div",12),x()()(),_(22,"h5",13),O(23,"Import storage data"),x(),_(24,"p"),O(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),x(),Z(26,FVe,6,2,"ngb-alert",0),Z(27,PVe,4,1,"ngb-alert",14),_(28,"ngx-file-drop",15),ye("onFileDrop",function(s){return r.dropped(s)}),Z(29,jVe,2,0,"ng-template",16),x(),_(30,"h5",13),O(31,"Delete all data"),x(),Z(32,RVe,6,2,"ngb-alert",0),Z(33,LVe,4,1,"ngb-alert",14),_(34,"div",17)(35,"div"),pe(36,"img",18),_(37,"small",19),O(38,"Warning - this operation is not reversible!"),x()(),_(39,"button",20),ye("click",function(){return r.deleteData()}),O(40,"Delete all"),x()()),2&i&&(S("ngIf",r.configError),w(7),mn(" ",r.nakamaVersion,""),w(4),S("ngForOf",r.flatConfig),w(9),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&r.jsonConfig.runtime.env.length>0),w(1),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&0===r.jsonConfig.runtime.env.length),w(5),S("ngIf",r.uploadError),w(1),S("ngIf",r.uploadSuccess),w(1),S("disabled",r.uploading),w(4),S("ngIf",r.deleteError),w(1),S("ngIf",r.deleteSuccess),w(6),S("disabled",r.deleting))},dependencies:[qq,Wq,Ln,vn,po],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})}return t})(),BVe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function VVe(t,n){if(1&t&&(_(0,"ngb-alert",48),pe(1,"img",49),_(2,"h6",50),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function HVe(t,n){1&t&&(_(0,"tr")(1,"td",51),O(2,"No additional users are setup. Create a new user below."),x()()),2&t&&(w(1),S("colSpan",4))}function UVe(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td"),O(2),x(),_(3,"td"),O(4),x(),_(5,"td")(6,"span",36),O(7,"Administrator"),x(),_(8,"span",36),O(9,"Developer"),x(),_(10,"span",36),O(11,"Maintainer"),x(),_(12,"span",36),O(13,"View Only"),x()(),_(14,"td")(15,"button",52),ye("click",function(){const o=Be(e).$implicit;return Ve($().deleteUser(o.username))}),O(16,"Delete"),x()()()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.username),w(2),bt(e.email),w(2),S("hidden",e.role!==i.adminRole),w(2),S("hidden",e.role!==i.developerRole),w(2),S("hidden",e.role!==i.maintainerRole),w(2),S("hidden",e.role!==i.readonlyRole)}}function zVe(t,n){if(1&t&&(_(0,"ngb-alert",48),pe(1,"img",49),_(2,"h6",50),O(3,"An error occurred:"),x(),_(4,"p",53),O(5),x()()),2&t){const e=$();S("dismissible",!1),w(5),bt(e.userCreateError)}}const YI=function(t){return{"is-invalid":t}};let GVe=(()=>{class t{route;consoleService;formBuilder;error="";userCreateError="";users=[];createUserForm;adminRole=ti.USER_ROLE_ADMIN;developerRole=ti.USER_ROLE_DEVELOPER;maintainerRole=ti.USER_ROLE_MAINTAINER;readonlyRole=ti.USER_ROLE_READONLY;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Co.required],email:["",[Co.required,Co.email]],password:["",Co.compose([Co.required,Co.minLength(8)])],role:[+this.readonlyRole,Co.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(et(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=ti.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=ti.USER_ROLE_ADMIN;break;case 2:e=ti.USER_ROLE_DEVELOPER;break;case 3:e=ti.USER_ROLE_MAINTAINER;break;case 4:e=ti.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(et(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["app-users"]],decls:121,vars:25,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type","dismissible"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Management"),x(),Z(2,VVe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),O(7,"Username"),x(),_(8,"th"),O(9,"Email"),x(),_(10,"th",5),O(11,"Role"),x(),_(12,"th",6),O(13,"Action"),x()()(),_(14,"tbody"),Z(15,HVe,3,1,"tr",7),Z(16,UVe,17,6,"tr",8),x()(),_(17,"h5",9),O(18,"Add new user"),x(),_(19,"ngb-alert",10)(20,"h6",11),O(21,"User roles"),x(),_(22,"div",12)(23,"div",13)(24,"div",14),pe(25,"img",15),_(26,"h6",16),O(27,"Administrator"),x()(),_(28,"small"),O(29," Owners have complete control over the server, its users and resources. "),x()(),_(30,"div",13)(31,"div",14),pe(32,"img",17),_(33,"h6",16),O(34,"Developer"),x()(),_(35,"small"),O(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),x()(),_(37,"div",13)(38,"div",14),pe(39,"img",18),_(40,"h6",16),O(41,"Maintainer"),x()(),_(42,"small"),O(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),x()(),_(44,"div",13)(45,"div",14),pe(46,"img",19),_(47,"h6",16),O(48,"View Only"),x()(),_(49,"small"),O(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),x()()()(),Z(51,zVe,6,2,"ngb-alert",1),_(52,"div",20)(53,"form",21),ye("ngSubmit",function(){return r.addUser()}),_(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),O(58,"Email"),x()(),_(59,"div",26),pe(60,"input",27),_(61,"div",28),O(62,"Email is required"),x()()()(),_(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),O(67,"Username"),x()(),_(68,"div",26),pe(69,"input",30),_(70,"div",28),O(71,"Username is required"),x()()()(),_(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),O(76,"Password"),x()(),_(77,"div",26),pe(78,"input",32),_(79,"div",28),O(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),x()()()(),_(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),O(85,"Role"),x()(),_(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),O(90,"Administrator"),x(),_(91,"span",36),O(92,"Developer"),x(),_(93,"span",36),O(94,"Maintainer"),x(),_(95,"span",36),O(96,"View Only"),x()(),_(97,"div",37),pe(98,"button",38),_(99,"div",39)(100,"button",40),ye("click",function(){return r.f.role.setValue(+r.adminRole)}),O(101,"Administrator"),x(),_(102,"button",40),ye("click",function(){return r.f.role.setValue(+r.developerRole)}),O(103,"Developer"),x(),_(104,"button",40),ye("click",function(){return r.f.role.setValue(+r.maintainerRole)}),O(105,"Maintainer"),x(),_(106,"button",40),ye("click",function(){return r.f.role.setValue(+r.readonlyRole)}),O(107,"View Only"),x()()()(),_(108,"div",28),O(109,"Role is required"),x()()()(),_(110,"div",41)(111,"div",42),pe(112,"div",24),_(113,"div",26)(114,"div",43),pe(115,"input",44),_(116,"label",45),O(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),x()()()()(),_(118,"div",46)(119,"button",47),O(120,"Save"),x()()()()),2&i&&(w(2),S("ngIf",r.error),w(13),S("ngIf",0===r.users.length),w(1),S("ngForOf",r.users),w(3),S("type","secondary")("dismissible",!1),w(32),S("ngIf",r.userCreateError),w(2),S("formGroup",r.createUserForm),w(7),S("ngClass",sr(19,YI,r.f.email.dirty&&r.f.email.errors)),w(1),S("hidden",r.f.email.disabled||r.f.email.valid||r.f.email.pristine),w(8),S("ngClass",sr(21,YI,r.f.username.dirty&&r.f.username.errors)),w(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),w(8),S("ngClass",sr(23,YI,r.f.password.dirty&&r.f.password.errors)),w(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),w(10),S("hidden",r.f.role.value!==+r.adminRole),w(2),S("hidden",r.f.role.value!==+r.developerRole),w(2),S("hidden",r.f.role.value!==+r.maintainerRole),w(2),S("hidden",r.f.role.value!==+r.readonlyRole),w(13),S("hidden",r.f.role.disabled||r.f.role.valid||r.f.role.pristine),w(11),S("disabled",r.createUserForm.invalid))},dependencies:[nm,Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,OC,da,ha,Hf,js,Zs],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})}return t})(),WVe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function qVe(t,n){if(1&t&&(_(0,"ngb-alert",10),pe(1,"img",11),_(2,"h6",12),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Failed to retrieve runtime information: ",e.error,"")}}function YVe(t,n){if(1&t&&(_(0,"tr")(1,"td"),O(2),x(),_(3,"td",13),O(4),x()()),2&t){const e=n.$implicit;w(2),bt(e.path),w(2),bt(e.mod_time)}}function XVe(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No Go modules were found."),x(),pe(3,"td"),x())}function JVe(t,n){if(1&t&&(_(0,"tr")(1,"td"),O(2),x(),_(3,"td",13),O(4),x()()),2&t){const e=n.$implicit;w(2),bt(e.path),w(2),bt(e.mod_time)}}function KVe(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No Lua modules were found."),x(),pe(3,"td"),x())}function QVe(t,n){if(1&t&&(_(0,"tr")(1,"td"),O(2),x(),_(3,"td",13),O(4),x()()),2&t){const e=n.$implicit;w(2),bt(e.path),w(2),bt(e.mod_time)}}function ZVe(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No JavaScript modules were found."),x(),pe(3,"td"),x())}const XI=function(){return["/apiexplorer"]},JI=function(t){return{endpoint:t}};function eHe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),O(3),x()(),_(4,"td",15)(5,"a",16),O(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),bt(e),w(2),S("routerLink",ml(3,XI))("queryParams",sr(4,JI,e))}}function tHe(t,n){1&t&&(_(0,"tr")(1,"td",17),O(2,"No Go RPC functions were found."),x()())}function nHe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),O(3),x()(),_(4,"td",15)(5,"a",16),O(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),bt(e),w(2),S("routerLink",ml(3,XI))("queryParams",sr(4,JI,e))}}function iHe(t,n){1&t&&(_(0,"tr")(1,"td",17),O(2,"No Lua RPC functions were found."),x()())}function rHe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),O(3),x()(),_(4,"td",15)(5,"a",16),O(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),bt(e),w(2),S("routerLink",ml(3,XI))("queryParams",sr(4,JI,e))}}function oHe(t,n){1&t&&(_(0,"tr")(1,"td",17),O(2,"No JavaScript RPC functions were found."),x()())}let sHe=(()=>{class t{route;consoleService;error="";runtimeInfo;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Runtime Modules"),x(),Z(2,qVe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),O(7,"Go Modules"),x(),_(8,"th",4),O(9,"Last Modified"),x()()(),_(10,"tbody"),Z(11,YVe,5,2,"tr",5),Z(12,XVe,4,0,"tr",6),x(),_(13,"thead",3)(14,"tr")(15,"th",7),O(16,"Lua Modules"),x()()(),_(17,"tbody"),Z(18,JVe,5,2,"tr",5),Z(19,KVe,4,0,"tr",6),x(),_(20,"thead",3)(21,"tr")(22,"th",7),O(23,"JavaScript Modules"),x()()(),_(24,"tbody"),Z(25,QVe,5,2,"tr",5),Z(26,ZVe,4,0,"tr",6),x()(),_(27,"h4",8),O(28,"Registered RPC Functions"),x(),_(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),O(33,"Go RPC Functions"),x()()(),_(34,"tbody"),Z(35,eHe,7,6,"tr",5),Z(36,tHe,3,0,"tr",6),x(),_(37,"thead",3)(38,"tr")(39,"th",7),O(40,"Lua RPC Functions"),x()()(),_(41,"tbody"),Z(42,nHe,7,6,"tr",5),Z(43,iHe,3,0,"tr",6),x(),_(44,"thead",3)(45,"tr")(46,"th",7),O(47,"JavaScript RPC Functions"),x()()(),_(48,"tbody"),Z(49,rHe,7,6,"tr",5),Z(50,oHe,3,0,"tr",6),x()()),2&i&&(w(2),S("ngIf",r.error),w(9),S("ngForOf",r.runtimeInfo.go_modules),w(1),S("ngIf",0===r.runtimeInfo.go_modules.length),w(6),S("ngForOf",r.runtimeInfo.lua_modules),w(1),S("ngIf",0===r.runtimeInfo.lua_modules.length),w(6),S("ngForOf",r.runtimeInfo.js_modules),w(1),S("ngIf",0===r.runtimeInfo.js_modules.length),w(9),S("ngForOf",r.runtimeInfo.go_rpc_functions),w(1),S("ngIf",0===r.runtimeInfo.go_rpc_functions.length),w(6),S("ngForOf",r.runtimeInfo.lua_rpc_functions),w(1),S("ngIf",0===r.runtimeInfo.lua_rpc_functions.length),w(6),S("ngForOf",r.runtimeInfo.js_rpc_functions),w(1),S("ngIf",0===r.runtimeInfo.js_rpc_functions.length))},dependencies:[Ou,Ln,vn,po],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})}return t})(),aHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lHe(t,n){1&t&&(_(0,"span"),O(1,"Filter by collection"),x())}function cHe(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.f.collection.value)}}function uHe(t,n){if(1&t){const e=vt();_(0,"button",34),ye("click",function(){const o=Be(e).$implicit;return Ve($().f.collection.setValue(o))}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function dHe(t,n){if(1&t&&(_(0,"ngb-alert",35),pe(1,"img",36),_(2,"h6",37),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying storage objects: ",e.error,"")}}function hHe(t,n){1&t&&(_(0,"th",38),O(1,"Remove"),x())}function fHe(t,n){1&t&&(_(0,"tr")(1,"td",39),O(2,"No storage objects found - change the filter criteria or add new objects."),x()())}function pHe(t,n){if(1&t){const e=vt();_(0,"td",42)(1,"button",43),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteObject(r,s,a))}),O(2,"Delete"),x()()}}function mHe(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(2),x(),_(3,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(4),x(),_(5,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(6),x(),_(7,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(8),x(),Z(9,pHe,3,0,"td",41),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.collection),w(2),bt(e.key),w(2),bt(e.user_id),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed())}}let gHe=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";collections=[];objects=[];objectCount=0;nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Storage Objects"),x(),_(2,"h6",1),O(3),x(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return r.search(0)}),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),Z(12,lHe,2,0,"span",10),Z(13,cHe,2,1,"span",10),x(),_(14,"div",11)(15,"button",12),ye("click",function(){return r.f.collection.reset()}),O(16,"\u2718 Deselect collection"),x(),pe(17,"div",13),Z(18,uHe,2,1,"button",14),x()()(),pe(19,"input",15)(20,"input",16),_(21,"div",17)(22,"span",18),ye("click",function(){return r.f.user_id.setValue(r.systemUserId)}),pe(23,"img",19),x()(),_(24,"div",17)(25,"button",20),ye("click",function(){return r.search(0)}),O(26,"Search"),x()()()()(),_(27,"div",21)(28,"div",22)(29,"button",23),ye("click",function(){return r.search(0)}),pe(30,"img",24),x(),_(31,"button",23),ye("click",function(){return r.search(1)}),pe(32,"img",25),x()()()()(),Z(33,dHe,4,2,"ngb-alert",26),_(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),O(39,"Collection Name"),x(),_(40,"th"),O(41,"Key Name"),x(),_(42,"th",30),O(43,"User ID"),x(),_(44,"th",31),O(45,"Last Update"),x(),Z(46,hHe,2,0,"th",32),x()(),_(47,"tbody"),Z(48,fHe,3,0,"tr",10),Z(49,mHe,10,5,"tr",33),x()()()),2&i&&(w(3),mn("",r.objectCount," objects found."),w(4),S("formGroup",r.searchForm),w(4),S("disabled",0===r.collections.length),w(1),S("ngIf",!r.f.collection.value||""===r.f.collection.value),w(1),S("ngIf",r.f.collection.value&&""!==r.f.collection.value),w(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),w(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),w(1),S("ngForOf",r.collections),w(7),S("disabled",r.disableSearch()),w(4),S("disabled",0===r.objects.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.objects.length),w(1),S("ngForOf",r.objects))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),vHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),yHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var KI,Yq,Xq,Jq,Kq,Qq,Zq,eY,tY,nY,iY,rY,oY,sY,aY,lY,cY,uY,dY,hY,fY,pY,mY,gY,vY,yY,_Y,bY,xY,wY,CY,SY,kY,DY,TY,EY,AY,MY,OY,IY,NY,FY,PY,jY,RY,LY,$Y,BY,VY,HY,UY,zY,GY,WY,qY,YY,XY,JY,KY,QY,ZY,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,mX,gX,vX,yX,_X,bX,xX,wX,CX,SX,kX,DX,TX,EX,AX,MX,OX,IX,NX,FX,PX,jX,RX,LX,$X,BX,VX,HX,UX,zX,GX,WX,qX,YX,XX,JX,KX,QX,ZX,eJ,tJ,nJ,iJ,rJ,oJ,sJ,aJ,lJ,cJ,uJ,dJ,hJ,fJ,pJ,mJ,gJ,vJ,yJ,_J,bJ,xJ,wJ,CJ,SJ,kJ,DJ,TJ,EJ,AJ,MJ,OJ,IJ,NJ,FJ,PJ,jJ,RJ,LJ,$J,BJ,VJ,HJ,UJ,zJ,GJ,WJ,qJ,YJ,XJ,JJ,KJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,mK,gK,vK,yK,_K,bK,xK,wK,CK,SK,kK,DK,TK,EK,AK,MK,OK,IK,NK,FK,PK,jK,RK,LK,$K,BK,VK,HK,UK,zK,GK,WK,qK,YK,XK,JK,KK,QK,ZK,eQ,tQ,nQ,iQ,rQ,oQ,sQ,aQ,lQ,cQ,uQ,dQ,hQ,fQ,pQ,mQ,gQ,vQ,yQ,_Q,bQ,xQ,wQ,CQ,SQ,kQ,DQ,TQ,EQ,AQ,MQ,OQ,IQ,NQ,FQ,PQ,jQ,RQ,LQ,$Q,BQ,VQ,HQ,UQ,zQ,GQ,WQ,qQ,YQ,XQ,JQ,KQ,QQ,ZQ,eZ,tZ,nZ,iZ,rZ,oZ,_He=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],bHe=["mainAxis","crossAxis","limiter"];function O_(t){var n="function"==typeof Map?new Map:void 0;return O_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return QI(e,arguments,Wi(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),I_(r,e)},O_(t)}function QI(t,n,e){return(QI=dZ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&I_(a,o.prototype),a}).apply(null,arguments)}function Ee(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function sZ(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Re(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Q2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function pn(){pn=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(X,te,P){X[te]=P.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(X,te,P){return Object.defineProperty(X,te,{value:P,enumerable:!0,configurable:!0,writable:!0}),X[te]}try{l({},"")}catch{l=function(te,P,W){return te[P]=W}}function c(X,te,P,W){var H=Object.create((te&&te.prototype instanceof h?te:h).prototype),le=new R(W||[]);return i(H,"_invoke",{value:k(X,P,le)}),H}function u(X,te,P){try{return{type:"normal",arg:X.call(te,P)}}catch(W){return{type:"throw",arg:W}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,v=g&&g(g(U([])));v&&v!==n&&e.call(v,o)&&(m=v);var y=p.prototype=h.prototype=Object.create(m);function b(X){["next","throw","return"].forEach(function(te){l(X,te,function(P){return this._invoke(te,P)})})}function C(X,te){function P(J,H,le,E){var I=u(X[J],X,H);if("throw"!==I.type){var N=I.arg,q=N.value;return q&&"object"==gn(q)&&e.call(q,"__await")?te.resolve(q.__await).then(function(V){P("next",V,le,E)},function(V){P("throw",V,le,E)}):te.resolve(q).then(function(V){N.value=V,le(N)},function(V){return P("throw",V,le,E)})}E(I.arg)}var W;i(this,"_invoke",{value:function(J,H){function le(){return new te(function(E,I){P(J,H,E,I)})}return W=W?W.then(le,le):le()}})}function k(X,te,P){var W="suspendedStart";return function(J,H){if("executing"===W)throw new Error("Generator is already running");if("completed"===W){if("throw"===J)throw H;return{value:void 0,done:!0}}for(P.method=J,P.arg=H;;){var le=P.delegate;if(le){var E=D(le,P);if(E){if(E===d)continue;return E}}if("next"===P.method)P.sent=P._sent=P.arg;else if("throw"===P.method){if("suspendedStart"===W)throw W="completed",P.arg;P.dispatchException(P.arg)}else"return"===P.method&&P.abrupt("return",P.arg);W="executing";var I=u(X,te,P);if("normal"===I.type){if(W=P.done?"completed":"suspendedYield",I.arg===d)continue;return{value:I.arg,done:P.done}}"throw"===I.type&&(W="completed",P.method="throw",P.arg=I.arg)}}}function D(X,te){var P=te.method,W=X.iterator[P];if(void 0===W)return te.delegate=null,"throw"===P&&X.iterator.return&&(te.method="return",te.arg=void 0,D(X,te),"throw"===te.method)||"return"!==P&&(te.method="throw",te.arg=new TypeError("The iterator does not provide a '"+P+"' method")),d;var J=u(W,X.iterator,te.arg);if("throw"===J.type)return te.method="throw",te.arg=J.arg,te.delegate=null,d;var H=J.arg;return H?H.done?(te[X.resultName]=H.value,te.next=X.nextLoc,"return"!==te.method&&(te.method="next",te.arg=void 0),te.delegate=null,d):H:(te.method="throw",te.arg=new TypeError("iterator result is not an object"),te.delegate=null,d)}function L(X){var te={tryLoc:X[0]};1 in X&&(te.catchLoc=X[1]),2 in X&&(te.finallyLoc=X[2],te.afterLoc=X[3]),this.tryEntries.push(te)}function z(X){var te=X.completion||{};te.type="normal",delete te.arg,X.completion=te}function R(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(L,this),this.reset(!0)}function U(X){if(X){var te=X[o];if(te)return te.call(X);if("function"==typeof X.next)return X;if(!isNaN(X.length)){var P=-1,W=function J(){for(;++P=0;--W){var J=this.tryEntries[W],H=J.completion;if("root"===J.tryLoc)return P("end");if(J.tryLoc<=this.prev){var le=e.call(J,"catchLoc"),E=e.call(J,"finallyLoc");if(le&&E){if(this.prev=0;--P){var W=this.tryEntries[P];if(W.tryLoc<=this.prev&&e.call(W,"finallyLoc")&&this.prev=0;--te){var P=this.tryEntries[te];if(P.finallyLoc===X)return this.complete(P.completion,P.afterLoc),z(P),d}},catch:function(X){for(var te=this.tryEntries.length-1;te>=0;--te){var P=this.tryEntries[te];if(P.tryLoc===X){var W=P.completion;if("throw"===W.type){var J=W.arg;z(P)}return J}}throw new Error("illegal catch attempt")},delegateYield:function(X,te,P){return this.delegate={iterator:U(X),resultName:te,nextLoc:P},"next"===this.method&&(this.arg=void 0),d}},t}function aZ(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function Ki(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){aZ(o,i,r,s,a,"next",l)}function a(l){aZ(o,i,r,s,a,"throw",l)}s(void 0)})}}function zn(t,n){return cZ(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||Q2(t,n)||lZ()}function lZ(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cZ(t){if(Array.isArray(t))return t}function uZ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Qe(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wi(t){return(Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function Ce(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function hZ(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function Xd(t,n){return new t(n)}var F_,eS=new Map,nN=0;function kZ(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function DHe(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=tN(t),m=eS.get(p)||function THe(t,n){var e={stylesheet:SHe(n),rules:{}};return eS.set(t,e),e}(p,t),g=m.stylesheet,v=m.rules;v[f]||(v[f]=!0,g.insertRule("@keyframes ".concat(f," ").concat(h),g.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),nN+=1,f}function P_(t){F_=t}function Xv(){if(!F_)throw new Error("Function called outside component initialization");return F_}function Yc(t){Xv().$$.on_mount.push(t)}function Hu(t){Xv().$$.on_destroy.push(t)}function DZ(){var t=Xv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=SZ(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function TZ(t,n){return Xv().$$.context.set(t,n),n}function _a(t){return Xv().$$.context.get(t)}function tS(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var Jv=[],Hi=[],nS=[],iN=[],EZ=Promise.resolve(),rN=!1;function AZ(){rN||(rN=!0,EZ.then(MZ))}function zl(){return AZ(),EZ}function Lm(t){nS.push(t)}function Uu(t){iN.push(t)}var iS,oN=new Set,Kv=0;function MZ(){if(0===Kv){var t=F_;do{try{for(;Kvl.start&&(a=d(l,b),l=null,sN(t,a.b,"start"),z&&(u(),c=kZ(t,s,a.b,a.duration,0,k,o.css))),a&&(U>=a.end?(L(s=a.b,1-s),sN(t,a.b,"end"),l||(a.b?u():--a.group.r||so(a.group.c)),a=null):U>=a.start&&(s=a.a+a.d*k((U-a.start)/a.duration),L(s,1-s))),!(!a&&!l)},0===N_.size&&eN(bZ),new Promise(function(U){N_.add({c:p,f:U})}))}return{run:function(f){va(o)?(iS||(iS=Promise.resolve()).then(function(){iS=null}),iS).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var aN=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function OHe(t,n){t.d(1),n.delete(t.key)}function lN(t,n){ae(t,1,1,function(){n.delete(t.key)})}function sS(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,m={};p--;)m[t[p].key]=p;var g=[],v=new Map,y=new Map;for(p=f;p--;){var b=d(r,o,p),C=e(b),k=s.get(C);k?i&&k.p(b,n):(k=c(C,b)).c(),v.set(C,g[p]=k),C in m&&y.set(C,Math.abs(p-m[C]))}var D=new Set,L=new Set;function z(P){K(P,1),P.m(a,u),s.set(P.key,P),u=P.first,f--}for(;h&&f;){var R=g[f-1],U=t[h-1],G=R.key,X=U.key;R===U?(u=R.first,h--,f--):v.has(X)?!s.has(G)||D.has(G)?z(R):L.has(X)?h--:y.get(G)>y.get(X)?(L.add(G),z(R)):(D.add(X),h--):(l(U,s),h--)}for(;h--;){var te=t[h];v.has(te.key)||l(te,s)}for(;f;)z(g[f-1]);return g}function $m(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function aS(t){return"object"===gn(t)&&null!==t?t:{}}function zu(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function ft(t){t&&t.c()}function dt(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||Lm(function(){var a,l=t.$$.on_mount.map(gZ).filter(va);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,ri(l)):so(l),t.$$.on_mount=[]}),s.forEach(Lm)}function ht(t,n){var e=t.$$;null!==e.fragment&&(so(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Nn(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=F_;P_(t);var c=t.$$={fragment:null,ctx:[],props:o,update:jt,not_equal:r,bound:vZ(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:vZ(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function IHe(t,n){-1===t.$$.dirty[0]&&(Jv.push(t),AZ(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function PHe(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function jHe(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?mZ:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var LHe=aN.window;function $He(t){di(t,"svelte-n7cvum",".svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}")}function IZ(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b=t[1].closeButton&&NZ(t),C=t[2];return C&&(s=Xd(C,{})),{c:function(){n=ve("div"),e=ve("div"),i=ve("div"),b&&b.c(),r=tt(),o=ve("div"),s&&ft(s.$$.fragment),j(o,"class",a=ko(t[1].classContent)+" svelte-n7cvum"),j(o,"style",t[9]),At(o,"content",!t[0]),j(i,"class",l=ko(t[1].classWindow)+" svelte-n7cvum"),j(i,"role","dialog"),j(i,"aria-modal","true"),j(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),j(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),j(i,"style",t[8]),At(i,"window",!t[0]),j(e,"class",h=ko(t[1].classWindowWrap)+" svelte-n7cvum"),j(e,"style",t[7]),At(e,"wrap",!t[0]),j(n,"id",f=t[1].id),j(n,"class",p=ko(t[1].classBg)+" svelte-n7cvum"),j(n,"style",t[6]),At(n,"bg",!t[0])},m:function(k,D){Pe(k,n,D),ue(n,e),ue(e,i),b&&b.m(i,null),ue(i,r),ue(i,o),s&&dt(s,o,null),t[50](i),t[51](e),t[52](n),g=!0,v||(y=[It(i,"introstart",function(){va(t[13])&&t[13].apply(this,arguments)}),It(i,"outrostart",function(){va(t[14])&&t[14].apply(this,arguments)}),It(i,"introend",function(){va(t[15])&&t[15].apply(this,arguments)}),It(i,"outroend",function(){va(t[16])&&t[16].apply(this,arguments)}),It(n,"mousedown",t[20]),It(n,"mouseup",t[21])],v=!0)},p:function(k,D){if((t=k)[1].closeButton?b?(b.p(t,D),2&D[0]&&K(b,1)):((b=NZ(t)).c(),K(b,1),b.m(i,r)):b&&(Lt(),ae(b,1,1,function(){b=null}),$t()),C!==(C=t[2])){if(s){Lt();var L=s;ae(L.$$.fragment,1,0,function(){ht(L,1)}),$t()}C?(ft((s=Xd(C,{})).$$.fragment),K(s.$$.fragment,1),dt(s,o,null)):s=null}(!g||2&D[0]&&a!==(a=ko(t[1].classContent)+" svelte-n7cvum"))&&j(o,"class",a),(!g||512&D[0])&&j(o,"style",t[9]),(!g||3&D[0])&&At(o,"content",!t[0]),(!g||2&D[0]&&l!==(l=ko(t[1].classWindow)+" svelte-n7cvum"))&&j(i,"class",l),(!g||2&D[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&j(i,"aria-label",c),(!g||2&D[0]&&u!==(u=t[1].ariaLabelledBy||null))&&j(i,"aria-labelledby",u),(!g||256&D[0])&&j(i,"style",t[8]),(!g||3&D[0])&&At(i,"window",!t[0]),(!g||2&D[0]&&h!==(h=ko(t[1].classWindowWrap)+" svelte-n7cvum"))&&j(e,"class",h),(!g||128&D[0])&&j(e,"style",t[7]),(!g||3&D[0])&&At(e,"wrap",!t[0]),(!g||2&D[0]&&f!==(f=t[1].id))&&j(n,"id",f),(!g||2&D[0]&&p!==(p=ko(t[1].classBg)+" svelte-n7cvum"))&&j(n,"class",p),(!g||64&D[0])&&j(n,"style",t[6]),(!g||3&D[0])&&At(n,"bg",!t[0])},i:function(k){g||(K(b),s&&K(s.$$.fragment,k),Lm(function(){d||(d=oS(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),Lm(function(){m||(m=oS(n,t[11],t[1].transitionBgProps,!0)),m.run(1)}),g=!0)},o:function(k){ae(b),s&&ae(s.$$.fragment,k),d||(d=oS(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),m||(m=oS(n,t[11],t[1].transitionBgProps,!1)),m.run(0),g=!1},d:function(k){k&&Fe(n),b&&b.d(),s&&ht(s),t[50](null),k&&d&&d.end(),t[51](null),t[52](null),k&&m&&m.end(),v=!1,so(y)}}}function NZ(t){var n,e,i,r,o,s=[VHe,BHe],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=br()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(Lt(),ae(a[d],1,1,function(){a[d]=null}),$t(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),K(i,1),i.m(r.parentNode,r))},i:function(c){o||(K(i),o=!0)},o:function(c){ae(i),o=!1},d:function(c){a[e].d(c),c&&Fe(r)}}}function BHe(t){var n,e,i,r;return{c:function(){j(n=ve("button"),"class",e=ko(t[1].classCloseButton)+" svelte-n7cvum"),j(n,"aria-label","Close modal"),j(n,"style",t[10]),j(n,"type","button"),At(n,"close",!t[0])},m:function(o,s){Pe(o,n,s),i||(r=It(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=ko(o[1].classCloseButton)+" svelte-n7cvum")&&j(n,"class",e),1024&s[0]&&j(n,"style",o[10]),3&s[0]&&At(n,"close",!o[0])},i:jt,o:jt,d:function(o){o&&Fe(n),i=!1,r()}}}function VHe(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=Xd(r,o(t))),{c:function(){n&&ft(n.$$.fragment),e=br()},m:function(s,a){n&&dt(n,s,a),Pe(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){Lt();var l=n;ae(l.$$.fragment,1,0,function(){ht(l,1)}),$t()}r?(ft((n=Xd(r,o(s))).$$.fragment),K(n.$$.fragment,1),dt(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&K(n.$$.fragment,s),i=!0)},o:function(s){n&&ae(n.$$.fragment,s),i=!1},d:function(s){s&&Fe(e),n&&ht(n,s)}}}function HHe(t){var n,e,i,r,o=t[2]&&IZ(t),s=t[49].default,a=Ss(s,t,t[48],null);return{c:function(){o&&o.c(),n=tt(),a&&a.c()},m:function(l,c){o&&o.m(l,c),Pe(l,n,c),a&&a.m(l,c),e=!0,i||(r=It(LHe,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&K(o,1)):((o=IZ(l)).c(),K(o,1),o.m(n.parentNode,n)):o&&(Lt(),ae(o,1,1,function(){o=null}),$t()),a&&a.p&&(!e||131072&c[1])&&Ds(a,s,l,l[48],e?ks(s,l[48],c,null):Ts(l[48]),null)},i:function(l){e||(K(o),K(a,l),e=!0)},o:function(l){ae(o),ae(a,l),e=!1},d:function(l){o&&o.d(l),l&&Fe(n),a&&a.d(l),i=!1,r()}}}function FZ(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Qe(Qe({},e),{},{props:Qe(Qe({},n),e.props)}))}}function UHe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y=n.$$slots,b=void 0===y?{}:y,C=n.$$scope,k=DZ(),L=n.isTabbable,z=void 0===L?function(Ue){return Ue.tabIndex>=0&&!Ue.hidden&&!Ue.disabled&&"none"!==Ue.style.display&&"hidden"!==Ue.type&&Boolean(Ue.offsetWidth||Ue.offsetHeight||Ue.getClientRects().length)}:L,R=n.show,U=void 0===R?null:R,G=n.id,X=void 0===G?null:G,te=n.key,P=void 0===te?"simple-modal":te,W=n.ariaLabel,J=void 0===W?null:W,H=n.ariaLabelledBy,le=void 0===H?null:H,E=n.closeButton,I=void 0===E||E,N=n.closeOnEsc,q=void 0===N||N,V=n.closeOnOuterClick,re=void 0===V||V,he=n.styleBg,Oe=void 0===he?{}:he,_e=n.styleWindowWrap,Xe=void 0===_e?{}:_e,Le=n.styleWindow,rt=void 0===Le?{}:Le,B=n.styleContent,ne=void 0===B?{}:B,ie=n.styleCloseButton,Me=void 0===ie?{}:ie,Ye=n.classBg,je=void 0===Ye?null:Ye,yt=n.classWindowWrap,Tt=void 0===yt?null:yt,fn=n.classWindow,Hn=void 0===fn?null:fn,Zt=n.classContent,Ei=void 0===Zt?null:Zt,ln=n.classCloseButton,ur=void 0===ln?null:ln,wr=n.unstyled,or=void 0!==wr&&wr,mr=n.setContext,gi=void 0===mr?TZ:mr,Vr=n.transitionBg,Oo=void 0===Vr?RHe:Vr,On=n.transitionBgProps,xt=void 0===On?{duration:250}:On,ai=n.transitionWindow,Ii=void 0===ai?Oo:ai,Cr=n.transitionWindowProps,vo=void 0===Cr?xt:Cr,qo=n.disableFocusTrap,pt=void 0!==qo&&qo,In={id:X,ariaLabel:J,ariaLabelledBy:le,closeButton:I,closeOnEsc:q,closeOnOuterClick:re,styleBg:Oe,styleWindowWrap:Xe,styleWindow:rt,styleContent:ne,styleCloseButton:Me,classBg:je,classWindowWrap:Tt,classWindow:Hn,classContent:Ei,classCloseButton:ur,transitionBg:Oo,transitionBgProps:xt,transitionWindow:Ii,transitionWindowProps:vo,disableFocusTrap:pt,isTabbable:z,unstyled:or},oi=Qe({},In),vi=null,Tr=function(Ue){return Ue?Object.keys(Ue).reduce(function(kn,ni){return"".concat(kn,"; ").concat((ci=ni,ci.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Ue[ni]);var ci},""):""},Hr=function(Ue){return!!(Ue&&Ue.constructor&&Ue.call&&Ue.apply)},no=function(){e(6,a=Tr(Object.assign({},{width:window.innerWidth,height:window.innerHeight},oi.styleBg))),e(7,l=Tr(oi.styleWindowWrap)),e(8,c=Tr(oi.styleWindow)),e(9,u=Tr(oi.styleContent)),e(10,d=Tr(oi.styleCloseButton)),e(11,h=oi.transitionBg),e(12,f=oi.transitionWindow)},Us=function(){},gr=Us,zs=Us,Wa=Us,qa=Us,Oc=function(Ue){var ni=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ci=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,vi=FZ(Ue,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,oi=Qe(Qe({},In),ni)),no(),He(),e(13,gr=function(li){ci.onOpen&&ci.onOpen(li),k("open"),k("opening")}),e(14,zs=function(li){ci.onClose&&ci.onClose(li),k("close"),k("closing")}),e(15,Wa=function(li){ci.onOpened&&ci.onOpened(li),k("opened")}),e(16,qa=function(li){ci.onClosed&&ci.onClosed(li),k("closed")})},xe=function(){var Ue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vi&&(e(14,zs=Ue.onClose||zs),e(16,qa=Ue.onClosed||qa),e(2,vi=null),We())},He=function(){s=window.scrollY,p=document.body.style.position,m=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},We=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=g||"",window.scrollTo({top:s,left:0,behavior:"instant"})};gi(P,{open:Oc,close:xe});var lt=!1;return Hu(function(){lt&&xe()}),Yc(function(){e(47,lt=!0)}),t.$$set=function(Ue){"isTabbable"in Ue&&e(22,z=Ue.isTabbable),"show"in Ue&&e(23,U=Ue.show),"id"in Ue&&e(24,X=Ue.id),"key"in Ue&&e(25,P=Ue.key),"ariaLabel"in Ue&&e(26,J=Ue.ariaLabel),"ariaLabelledBy"in Ue&&e(27,le=Ue.ariaLabelledBy),"closeButton"in Ue&&e(28,I=Ue.closeButton),"closeOnEsc"in Ue&&e(29,q=Ue.closeOnEsc),"closeOnOuterClick"in Ue&&e(30,re=Ue.closeOnOuterClick),"styleBg"in Ue&&e(31,Oe=Ue.styleBg),"styleWindowWrap"in Ue&&e(32,Xe=Ue.styleWindowWrap),"styleWindow"in Ue&&e(33,rt=Ue.styleWindow),"styleContent"in Ue&&e(34,ne=Ue.styleContent),"styleCloseButton"in Ue&&e(35,Me=Ue.styleCloseButton),"classBg"in Ue&&e(36,je=Ue.classBg),"classWindowWrap"in Ue&&e(37,Tt=Ue.classWindowWrap),"classWindow"in Ue&&e(38,Hn=Ue.classWindow),"classContent"in Ue&&e(39,Ei=Ue.classContent),"classCloseButton"in Ue&&e(40,ur=Ue.classCloseButton),"unstyled"in Ue&&e(0,or=Ue.unstyled),"setContext"in Ue&&e(41,gi=Ue.setContext),"transitionBg"in Ue&&e(42,Oo=Ue.transitionBg),"transitionBgProps"in Ue&&e(43,xt=Ue.transitionBgProps),"transitionWindow"in Ue&&e(44,Ii=Ue.transitionWindow),"transitionWindowProps"in Ue&&e(45,vo=Ue.transitionWindowProps),"disableFocusTrap"in Ue&&e(46,pt=Ue.disableFocusTrap),"$$scope"in Ue&&e(48,C=Ue.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&<&&(Hr(U)?Oc(U):xe())},[or,oi,vi,i,r,o,a,l,c,u,d,h,f,gr,zs,Wa,qa,Hr,xe,function(Ue){if(oi.closeOnEsc&&vi&&"Escape"===Ue.key&&(Ue.preventDefault(),xe()),vi&&"Tab"===Ue.key&&!oi.disableFocusTrap){var kn=o.querySelectorAll("*"),ni=Array.from(kn).filter(oi.isTabbable).sort(function(li,Sr){return li.tabIndex-Sr.tabIndex}),ci=ni.indexOf(document.activeElement);-1===ci&&Ue.shiftKey&&(ci=0),ci+=ni.length+(Ue.shiftKey?-1:1),ni[ci%=ni.length].focus(),Ue.preventDefault()}},function(Ue){!oi.closeOnOuterClick||Ue.target!==i&&Ue.target!==r||(v=Ue.target)},function(Ue){oi.closeOnOuterClick&&Ue.target===v&&(Ue.preventDefault(),xe())},z,U,X,P,J,le,I,q,re,Oe,Xe,rt,ne,Me,je,Tt,Hn,Ei,ur,gi,Oo,xt,Ii,vo,pt,lt,C,b,function(Ue){Hi[Ue?"unshift":"push"](function(){e(5,o=Ue)})},function(Ue){Hi[Ue?"unshift":"push"](function(){e(4,r=Ue)})},function(Ue){Hi[Ue?"unshift":"push"](function(){e(3,i=Ue)})}]}var Lo,Zr,Gu,Jd,Wu,Xc,PZ=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,UHe,HHe,ps,{isTabbable:22,show:23,id:24,key:25,ariaLabel:26,ariaLabelledBy:27,closeButton:28,closeOnEsc:29,closeOnOuterClick:30,styleBg:31,styleWindowWrap:32,styleWindow:33,styleContent:34,styleCloseButton:35,classBg:36,classWindowWrap:37,classWindow:38,classContent:39,classCloseButton:40,unstyled:0,setContext:41,transitionBg:42,transitionBgProps:43,transitionWindow:44,transitionWindowProps:45,disableFocusTrap:46},$He,[-1,-1,-1]),r}return Se(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Lo||(Lo={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(Zr||(Zr={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(Gu||(Gu={})),function(t){t.info="info",t.warning="warning",t.error="error"}(Jd||(Jd={})),function(t){t.key="key",t.value="value"}(Wu||(Wu={})),function(t){t.asc="asc",t.desc="desc"}(Xc||(Xc={}));var Bm=[{start:0,end:100}],Vm={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},zHe=Qe(Qe({},Vm),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),GHe=Qe(Qe({},Vm),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),jZ=Qe(Qe({},Vm),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),cN="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",uN="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",WHe="NO",dN="SELF",hN="NEXT_INSIDE",qHe=(Ul(KI={},Xc.asc,"ascending"),Ul(KI,Xc.desc,"descending"),KI),YHe=0;function j_(){return++YHe}function np(t){return(np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function eo(t){return Array.isArray(t)}function Do(t){return null!==t&&"object"===np(t)&&t.constructor===Object}function RZ(t){return!(!t||"object"!==np(t))&&"add"===t.op}function LZ(t){return!(!t||"object"!==np(t))&&"remove"===t.op}function fN(t){return!(!t||"object"!==np(t))&&"replace"===t.op}function pN(t){return!(!t||"object"!==np(t))&&"copy"===t.op}function Qv(t){return!(!t||"object"!==np(t))&&"move"===t.op}function mN(t){return(mN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function XHe(t,n){return t===n}function $Z(t){return t.slice(0,t.length-1)}function BZ(t){return"object"===mN(t)&&null!==t}function R_(t){return(R_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function VZ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function JHe(t,n,e){return r=function(o,s){if("object"!==R_(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==R_(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===R_(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function gN(t){if(eo(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Do(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=qu(t?t[r]:void 0,n.slice(1),e,i);if(Do(t)||eo(t))return vN(t,r,o);if(i){var s=KHe.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var KHe=/^\d+$/;function HZ(t,n,e){if(0===n.length)return e(t);if(!BZ(t))throw new Error("Path doesn't exist");var i=n[0];return vN(t,i,HZ(t[i],n.slice(1),e))}function yN(t,n){if(0===n.length)return t;if(!BZ(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=gN(t);return eo(i)&&i.splice(parseInt(e),1),Do(i)&&delete i[e],i}return t}var r=n[0];return vN(t,r,yN(t[r],n.slice(1)))}function _N(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return HZ(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=gN(o);return s.splice(parseInt(r),0,e),s})}function Jc(t,n){return void 0!==t&&(0===n.length||null!==t&&Jc(t[n[0]],n.slice(1)))}function Yu(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function an(t){return t.map(UZ).join("")}function UZ(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function bN(t,n){return t+UZ(n)}function Zv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Xu(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:XHe;if(p.length=0?z=function(){var U="",G=!0;"-"==t[s]&&(U+=h()),U+="0"==t[s]?h():m(),"."==t[s]&&(U+=h()+m(),G=!1),"e"!=t[s]&&"E"!=t[s]||(U+=h(),"+"!=t[s]&&"-"!=t[s]||(U+=h()),U+=m(),G=!1);var X=+U;return a&&G&&(X>Number.MAX_SAFE_INTEGER||X="a"&&z<="f"?L+=z.charCodeAt()-aUe+10:z>="0"&&z<="9"?L+=+z:C()}return String.fromCharCode(L)}function m(){for(var D="";t[s]>="0"&&t[s]<="9";)D+=h();if(D.length)return D;k(),b()}function g(D,L){v(D,L,y())}function v(D,L,z){i[D]=i[D]||{},i[D][L]=z}function y(){return{line:r,column:o,pos:s}}function b(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),b()}function k(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},lS.stringify=function(t,n,e){if(cS(t)){var i,r,o=0,s="object"==gn(e)?e.space:e;switch(gn(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var cUe=/"|\\/g,uUe=/[\b]/g,dUe=/\f/g,hUe=/\n/g,fUe=/\r/g,pUe=/\t/g;function uS(t){return'"'+(t=t.replace(cUe,"\\$&").replace(dUe,"\\f").replace(uUe,"\\b").replace(hUe,"\\n").replace(fUe,"\\r").replace(pUe,"\\t"))+'"'}var mUe=/~/g,gUe=/\//g;function CN(t){return t.replace(mUe,"~0").replace(gUe,"~1")}function SN(t){return(SN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function kN(t){var n="function"==typeof Map?new Map:void 0;return kN=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return DN(e,arguments,B_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),$_(r,e)},kN(t)}function DN(t,n,e){return(DN=JZ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&$_(a,o.prototype),a}).apply(null,arguments)}function JZ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $_(t,n){return($_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function B_(t){return(B_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var ip=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&$_(l,c)}(a,kN(Error));var n,e,i,s=(n=a,e=JZ(),function(){var l,c=B_(n);if(e){var u=B_(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function vUe(t,n){if(n&&("object"===SN(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function dS(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function hS(t){return t>=48&&t<=57}function yUe(t){return t>=32&&t<=1114111}var _Ue=/^[,:[\]{}()\n]$/;function KZ(t){return bUe.test(t)||t&&pS(t.charCodeAt(0))}var bUe=/^[[{\w-]$/;function xUe(t){return 10===t||13===t||9===t||8===t||12===t}function fS(t){return 32===t||10===t||9===t||13===t}function wUe(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function pS(t){return QZ(t)||TN(t)}function QZ(t){return 34===t||8220===t||8221===t}function TN(t){return 39===t||8216===t||8217===t||96===t||180===t}function V_(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function Hm(t,n){var e=t.length;if(!fS(t.charCodeAt(e-1)))return t+n;for(;fS(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function CUe(t,n,e){return t.substring(0,n)+t.substring(n+e)}var SUe={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},kUe={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Kd(t){var n=0,e="";r()||function(){throw new ip("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),KZ(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=Hm(e,",")),function(){for(var b=!0,C=!0;C;)b?b=!1:l(44)||(e=Hm(e,",")),C=r();C||(e=V_(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=V_(e,",")),n>=t.length)return e;function r(){o();var b=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&k<=57)for(n++;hS(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);hS(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);hS(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),b}function o(){var b=n,C=s();do{(C=a())&&(C=s())}while(C);return n>b}function s(){for(var b,C="";(b=fS(t.charCodeAt(n)))||wUe(t.charCodeAt(n));)C+=b?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;fS(t.charCodeAt(n-1))&&n>0;)n--;var k=t.slice(C,n);return e+=JSON.stringify(k),!0}}function f(b){if(!hS(t.charCodeAt(n))){var C=t.slice(b,n);throw new ip("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(b){throw new ip("Invalid character "+JSON.stringify(b),n)}function m(){throw new ip("Object key expected",n)}function g(){throw new ip("Object value expected",n)}function v(){throw new ip("Colon expected",n)}function y(b){for(var C=b+2;/\w/.test(t[C]);)C++;var k=t.slice(b,C);throw new ip('Invalid unicode character "'.concat(k,'"'),n)}!function(){throw new ip("Unexpected character "+JSON.stringify(t[n]),n)}()}function DUe(t,n){return"*"===t[n]&&"/"===t[n+1]}function Bs(t){return parseInt(t,10)}function EN(t){return TUe.test(t)}var TUe=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function To(t){return"object"===gn(t)&&null!==t&&t.constructor===Object}function $o(t){return"object"===gn(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function AN(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return AN(Number(t));try{var n=t&&t.valueOf();if(n!==t)return AN(n)}catch{return!1}return!1}function ZZ(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function MN(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return gn(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(To(t))return"object";var e=n.stringify(t);return e&&EN(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var EUe=/^https?:\/\/\S+$/;function mS(t){return"string"==typeof t&&EUe.test(t)}function e0(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&(EN(e)?n.parse(e):t)}var AUe=/^-?[0-9]+$/,tee="object"==(typeof global>"u"?"undefined":gn(global))&&global&&global.Object===Object&&global,MUe="object"==(typeof self>"u"?"undefined":gn(self))&&self&&self.Object===Object&&self,xa=tee||MUe||Function("return this")(),il=xa.Symbol,nee=Object.prototype,OUe=nee.hasOwnProperty,IUe=nee.toString,H_=il?il.toStringTag:void 0,NUe=Object.prototype.toString,iee=il?il.toStringTag:void 0;function bl(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":iee&&iee in Object(t)?function(n){var e=OUe.call(n,H_),i=n[H_];try{n[H_]=void 0;var r=!0}catch{}var o=IUe.call(n);return r&&(e?n[H_]=i:delete n[H_]),o}(t):NUe.call(t)}function ns(t){return null!=t&&"object"==gn(t)}function Gl(t){return"symbol"==gn(t)||ns(t)&&"[object Symbol]"==bl(t)}function ree(t){return"number"==typeof t?t:Gl(t)?NaN:+t}function Wo(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var bee=_ee(pee),nze=/\{\n\/\* \[wrapped with (.+)\] \*/,ize=/,? & /,rze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function xS(t){return function(){return t}}var oze=function(){try{var t=zm(Object,"defineProperty");return t({},"",{}),t}catch{}}(),wS=oze,sze=wS?function(t,n){return wS(t,"toString",{configurable:!0,enumerable:!1,value:xS(n),writable:!0})}:rl,NN=_ee(sze);function Qc(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var aze=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function wee(t,n,e){var o,i=n+"";return NN(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(rze,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return Qc(aze,function(s){var a="_."+s[0];o&s[1]&&!SS(r,a)&&r.push(a)}),r.sort()}((o=i.match(nze))?o[1].split(ize):[],e)))}function Cee(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return IN(t)&&bee(h,d),h.placeholder=i,wee(h,t,n)}function o0(t){return t.placeholder}var lze=/^(?:0|[1-9]\d*)$/;function af(t,n){var e=gn(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&lze.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function xl(t){return null!=t&&W_(t.length)&&!Zd(t)}function wl(t,n,e){if(!Bo(e))return!1;var i=gn(n);return!!("number"==i?xl(e)&&af(n,e.length):"string"==i&&n in e)&&Zc(e[n],t)}function s0(t){return lr(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&wl(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":gn(exports))&&exports&&!exports.nodeType&&exports,Mee=Aee&&"object"==(typeof module>"u"?"undefined":gn(module))&&module&&!module.nodeType&&module,Oee=Mee&&Mee.exports===Aee?xa.Buffer:void 0,uf=(Oee?Oee.isBuffer:void 0)||DS,Vo={};function Cc(t){return function(n){return t(n)}}Vo["[object Float32Array]"]=Vo["[object Float64Array]"]=Vo["[object Int8Array]"]=Vo["[object Int16Array]"]=Vo["[object Int32Array]"]=Vo["[object Uint8Array]"]=Vo["[object Uint8ClampedArray]"]=Vo["[object Uint16Array]"]=Vo["[object Uint32Array]"]=!0,Vo["[object Arguments]"]=Vo["[object Array]"]=Vo["[object ArrayBuffer]"]=Vo["[object Boolean]"]=Vo["[object DataView]"]=Vo["[object Date]"]=Vo["[object Error]"]=Vo["[object Function]"]=Vo["[object Map]"]=Vo["[object Number]"]=Vo["[object Object]"]=Vo["[object RegExp]"]=Vo["[object Set]"]=Vo["[object String]"]=Vo["[object WeakMap]"]=!1;var Iee="object"==(typeof exports>"u"?"undefined":gn(exports))&&exports&&!exports.nodeType&&exports,Y_=Iee&&"object"==(typeof module>"u"?"undefined":gn(module))&&module&&!module.nodeType&&module,jN=Y_&&Y_.exports===Iee&&tee.process,eu=function(){try{return Y_&&Y_.require&&Y_.require("util").types||jN&&jN.binding&&jN.binding("util")}catch{}}(),Nee=eu&&eu.isTypedArray,Gm=Nee?Cc(Nee):function(t){return ns(t)&&W_(t.length)&&!!Vo[bl(t)]},vze=Object.prototype.hasOwnProperty;function Fee(t,n){var e=ji(t),i=!e&&op(t),r=!e&&!i&&uf(t),o=!e&&!i&&!r&&Gm(t),s=e||i||r||o,a=s?PN(t.length,String):[],l=a.length;for(var c in t)!n&&!vze.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||af(c,l))||a.push(c);return a}function Pee(t,n){return function(e){return t(n(e))}}var yze=Pee(Object.keys,Object),_ze=Object.prototype.hasOwnProperty;function RN(t){if(!q_(t))return yze(t);var n=[];for(var e in Object(t))_ze.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Vs(t){return xl(t)?Fee(t):RN(t)}var bze=Object.prototype.hasOwnProperty,xze=s0(function(t,n){if(q_(n)||xl(n))eh(n,Vs(n),t);else for(var e in n)bze.call(n,e)&&G_(t,e,n[e])}),jee=xze,wze=Object.prototype.hasOwnProperty;function Cl(t){return xl(t)?Fee(t,!0):function Cze(t){if(!Bo(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=q_(t),e=[];for(var i in t)("constructor"!=i||!n&&wze.call(t,i))&&e.push(i);return e}(t)}var Sze=s0(function(t,n){eh(n,Cl(n),t)}),TS=Sze,kze=s0(function(t,n,e,i){eh(n,Cl(n),t,i)}),a0=kze,Dze=s0(function(t,n,e,i){eh(n,Vs(n),t,i)}),Ree=Dze,Tze=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eze=/^\w*$/;function LN(t,n){if(ji(t))return!1;var e=gn(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Gl(t))||Eze.test(t)||!Tze.test(t)||null!=n&&t in Object(n)}var X_=zm(Object,"create"),Aze=Object.prototype.hasOwnProperty,Mze=Object.prototype.hasOwnProperty;function Wm(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},df.prototype.set=function(t,n){var e=this.__data__,i=ES(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var J_=zm(xa,"Map");function AS(t,n){var i,r,e=t.__data__;return("string"==(r=gn(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function hf(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?La(a,n-1,e,i,r):ap(r,a):i||(r[r.length]=a)}return r}function BN(t){return null!=t&&t.length?La(t,1):[]}function ff(t){return NN(Dee(t,void 0,BN),t+"")}var Bee=ff($N),OS=Pee(Object.getPrototypeOf,Object),Vee=Function.prototype.toString,Lze=Object.prototype.hasOwnProperty,$ze=Vee.call(Object);function c0(t){if(!ns(t)||"[object Object]"!=bl(t))return!1;var n=OS(t);if(null===n)return!0;var e=Lze.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Vee.call(e)==$ze}function IS(t){if(!ns(t))return!1;var n=bl(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!c0(t)}var Bze=lr(function(t,n){try{return wc(t,void 0,n)}catch(e){return IS(e)?e:new Error(e)}}),VN=Bze;function HN(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Gi(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var UN=lr(function(t,n,e){var i=1;if(e.length){var r=rp(e,o0(UN));i|=32}return lf(t,i,n,e,r)});UN.placeholder={};var zN=UN,Vze=ff(function(t,n){return Qc(n,function(e){e=th(e),cf(t,e,zN(t[e],t))}),t}),Hee=Vze,GN=lr(function(t,n,e){var i=3;if(e.length){var r=rp(e,o0(GN));i|=32}return lf(n,i,t,e,r)});GN.placeholder={};var Uee=GN;function tu(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:tu(t,n,e)}var Hze=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function u0(t){return Hze.test(t)}var WN="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",qN="\\ud83c[\\udffb-\\udfff]",zee="[^\\ud800-\\udfff]",Gee="(?:\\ud83c[\\udde6-\\uddff]){2}",Wee="[\\ud800-\\udbff][\\udc00-\\udfff]",qee="(?:"+WN+"|"+qN+")?",zze="[\\ufe0e\\ufe0f]?"+qee+"(?:\\u200d(?:"+[zee,Gee,Wee].join("|")+")[\\ufe0e\\ufe0f]?"+qee+")*",Gze="(?:"+[zee+WN+"?",WN,Gee,Wee,"[\\ud800-\\udfff]"].join("|")+")",Wze=RegExp(qN+"(?="+qN+")|"+Gze+zze,"g");function Ku(t){return u0(t)?function(n){return n.match(Wze)||[]}(t):function(n){return n.split("")}(t)}function Yee(t){return function(n){var e=u0(n=Gr(n))?Ku(n):void 0,i=e?e[0]:n.charAt(0),r=e?lp(e,1).join(""):n.slice(1);return i[t]()+r}}var NS=Yee("toUpperCase");function YN(t){return NS(Gr(t).toLowerCase())}function XN(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function lte(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=xc(e))==e?e:0),void 0!==n&&(n=(n=xc(n))==n?n:0),Ym(xc(t),n,e)}function Qu(t){var n=this.__data__=new df(t);this.size=n.size}function cte(t,n){return t&&eh(n,Vs(n),t)}Qu.prototype.clear=function(){this.__data__=new df,this.size=0},Qu.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Qu.prototype.get=function(t){return this.__data__.get(t)},Qu.prototype.has=function(t){return this.__data__.has(t)},Qu.prototype.set=function(t,n){var e=this.__data__;if(e instanceof df){var i=e.__data__;if(!J_||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new hf(i)}return e.set(t,n),this.size=e.size,this};var ute="object"==(typeof exports>"u"?"undefined":gn(exports))&&exports&&!exports.nodeType&&exports,dte=ute&&"object"==(typeof module>"u"?"undefined":gn(module))&&module&&!module.nodeType&&module,hte=dte&&dte.exports===ute?xa.Buffer:void 0,fte=hte?hte.allocUnsafe:void 0;function pte(t,n){if(n)return t.slice();var e=t.length,i=fte?fte(e):new t.constructor(e);return t.copy(i),i}function cp(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new Jm:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&b-c>=o}function g(){var C,k,b=Z_();if(m(b))return v(b);a=setTimeout(g,(k=n-((C=b)-l),d?EGe(k,o-(C-c)):k))}function v(b){return a=void 0,h&&i?f(b):(i=r=void 0,s)}function y(){var b=Z_(),C=m(b);if(i=arguments,r=this,l=b,C){if(void 0===a)return function p(b){return c=b,a=setTimeout(g,n),u?f(b):s}(l);if(d)return clearTimeout(a),a=setTimeout(g,n),f(l)}return void 0===a&&(a=setTimeout(g,n)),s}return n=xc(n)||0,Bo(e)&&(u=!!e.leading,o=(d="maxWait"in e)?TGe(xc(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(Z_())},y}function Gte(t,n){return null==t||t!=t?n:t}var Wte=Object.prototype,AGe=Wte.hasOwnProperty,MGe=lr(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&wl(n[0],n[1],r)&&(i=1);++e=200&&(o=K_,s=!1,n=new Jm(n));e:for(;++r=0&&t.slice(e,r)==n}function une(t){return function(n){var i,r,o,e=nh(n);return"[object Map]"==e?hF(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Wo(r,function(o){return[o,i[o]]})}(n,t(n))}}var GS=une(Vs),WS=une(Cl),LGe=JN({"&":"&","<":"<",">":">",'"':""","'":"'"}),dne=/[&<>"']/g,$Ge=RegExp(dne.source);function kF(t){return(t=Gr(t))&&$Ge.test(t)?t.replace(dne,LGe):t}var hne=/[\\^$.*+?()[\]{}|]/g,BGe=RegExp(hne.source);function fne(t){return(t=Gr(t))&&BGe.test(t)?t.replace(hne,"\\$&"):t}function pne(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Gi(l))<0&&(l+=c),l=a>l?0:DF(l);a-1?r[o?n[s]:s]:void 0}}var HGe=Math.max;function TF(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Gi(e);return r<0&&(r=HGe(i+r,0)),CS(t,Ri(n),r)}var bne=_ne(TF);function xne(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function wne(t,n){return xne(t,Ri(n),ih)}var UGe=Math.max,zGe=Math.min;function EF(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Gi(e),r=e<0?UGe(i+r,0):zGe(r,i-1)),CS(t,Ri(n),r,!0)}var Cne=_ne(EF);function Sne(t,n){return xne(t,Ri(n),SF)}function ia(t){return t&&t.length?t[0]:void 0}function kne(t,n){var e=-1,i=xl(t)?Array(t.length):[];return up(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function m0(t,n){return(ji(t)?Wo:kne)(t,Ri(n))}function Dne(t,n){return La(m0(t,n),1)}function Tne(t,n){return La(m0(t,n),1/0)}function Ene(t,n,e){return e=void 0===e?1:Gi(e),La(m0(t,n),e)}function Ane(t){return null!=t&&t.length?La(t,1/0):[]}function Mne(t,n){return null!=t&&t.length?La(t,n=void 0===n?1:Gi(n)):[]}function One(t){return lf(t,512)}var Ine=ZN("floor");function Nne(t){return ff(function(n){var e=n.length,i=e,r=Kc.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==bS(o))var s=new Kc([],!0)}for(i=s?i:e;++in}function YS(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=xc(n),e=xc(e)),t(n,e)}}var Une=YS(AF),zne=YS(function(t,n){return t>=n}),qGe=Object.prototype.hasOwnProperty;function YGe(t,n){return null!=t&&qGe.call(t,n)}function Gne(t,n){return null!=t&&Pte(t,n,YGe)}var XGe=Math.max,JGe=Math.min;function Wne(t,n,e){return n=Qd(n),void 0===e?(e=n,n=0):e=Qd(e),(i=t=xc(t))>=JGe(r=n,o=e)&&i-1:!!r&&r0(t,n,e)>-1}var QGe=Math.max;function Yne(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Gi(e);return r<0&&(r=QGe(i+r,0)),r0(t,n,r)}function qi(t){return null!=t&&t.length?tu(t,0,-1):[]}var ZGe=Math.min;function OF(t,n,e){for(var i=e?CF:SS,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Wo(u,Cc(n))),l=ZGe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new Jm(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function xie(t){return void 0===t}function wie(t){return ns(t)&&"[object WeakMap]"==nh(t)}function Cie(t){return ns(t)&&"[object WeakSet]"==bl(t)}function Sie(t){return Ri("function"==typeof t?t:nu(t,1))}var uWe=Array.prototype.join;function kie(t,n){return null==t?"":uWe.call(t,n)}var dWe=h0(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Die=dWe,hWe=$S(function(t,n,e){cf(t,e,n)}),Tie=hWe,fWe=Math.max,pWe=Math.min;function Eie(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Gi(e))<0?fWe(i+r,0):pWe(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):CS(t,xee,r,!0)}var mWe=h0(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),Aie=mWe,Mie=Yee("toLowerCase");function PF(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function Wie(t,n){var e=t.length;if(e)return af(n+=n<0?e:0,e)?t[n]:void 0}function qie(t,n){return t&&t.length?Wie(t,Gi(n)):void 0}function Yie(t){return t=Gi(t),lr(function(n){return Wie(n,t)})}function HF(t,n){return null==(t=nie(t,n=sp(n,t)))||delete t[th(Fn(n))]}function _We(t){return c0(t)?void 0:t}var bWe=ff(function(t,n){var e={};if(null==t)return e;var i=!1;n=Wo(n,function(o){return o=sp(o,t),i||(i=o.length>1),o}),eh(t,iF(t),e),i&&(e=nu(e,7,_We));for(var r=n.length;r--;)HF(e,n[r]);return e}),Xie=bWe;function rb(t,n,e,i){if(!Bo(t))return t;for(var r=-1,o=(n=sp(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?m:m*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(kne(t,function(o,s,a){return{criteria:Wo(n,function(c){return c(o)}),index:++i,value:o}}))}function tre(t,n,e,i){return null==t?[]:(ji(n)||(n=null==n?[]:[n]),ji(e=i?void 0:e)||(e=null==e?[]:[e]),ere(t,n,e))}function zF(t){return ff(function(n){return n=Wo(n,Cc(Ri)),lr(function(e){var i=this;return t(n,function(r){return wc(r,i,e)})})})}var nre=zF(Wo),wWe=Math.min,CWe=lr(function(t,n){var e=(n=1==n.length&&ji(n[0])?Wo(n[0],Cc(Ri)):Wo(La(n,1),Cc(Ri))).length;return lr(function(i){for(var r=-1,o=wWe(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=SWe(n/2))&&(t+=t)}while(n);return e}var kWe=gF("length"),WF="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",qF="\\ud83c[\\udffb-\\udfff]",sre="[^\\ud800-\\udfff]",are="(?:\\ud83c[\\udde6-\\uddff]){2}",lre="[\\ud800-\\udbff][\\udc00-\\udfff]",cre="(?:"+WF+"|"+qF+")?",TWe="[\\ufe0e\\ufe0f]?"+cre+"(?:\\u200d(?:"+[sre,are,lre].join("|")+")[\\ufe0e\\ufe0f]?"+cre+")*",EWe="(?:"+[sre+WF+"?",WF,are,lre,"[\\ud800-\\udfff]"].join("|")+")",ure=RegExp(qF+"(?="+qF+")|"+EWe+TWe,"g");function _0(t){return u0(t)?function(n){for(var e=ure.lastIndex=0;ure.test(n);)++e;return e}(t):kWe(t)}var AWe=Math.ceil;function KS(t,n){var e=(n=void 0===n?" ":bc(n)).length;if(e<2)return e?GF(n,t):n;var i=GF(n,AWe(t/_0(n)));return u0(n)?lp(Ku(i),0,t).join(""):i.slice(0,t)}var MWe=Math.ceil,OWe=Math.floor;function dre(t,n,e){t=Gr(t);var i=(n=Gi(n))?_0(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return KS(OWe(r),e)+t+KS(MWe(r),e)}function hre(t,n,e){t=Gr(t);var i=(n=Gi(n))?_0(t):0;return n&&i-1;)a!==t&&yre.call(a,l,1),yre.call(t,l,1);return t}function eP(t,n){return t&&t.length&&n&&n.length?ZF(t,n):t}var _re=lr(eP);function bre(t,n,e){return t&&t.length&&n&&n.length?ZF(t,n,Ri(e)):t}function xre(t,n,e){return t&&t.length&&n&&n.length?ZF(t,n,void 0,e):t}var RWe=Array.prototype.splice;function wre(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;af(r)?RWe.call(t,r,1):HF(t,r)}}return t}var LWe=ff(function(t,n){var e=null==t?0:t.length,i=$N(t,n);return wre(t,Wo(n,function(r){return af(r,e)?+r:r}).sort(Zie)),i}),Cre=LWe,$We=Math.floor,BWe=Math.random;function tP(t,n){return t+$We(BWe()*(n-t+1))}var VWe=parseFloat,HWe=Math.min,UWe=Math.random;function Sre(t,n,e){if(e&&"boolean"!=typeof e&&wl(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Qd(t),void 0===n?(n=t,t=0):n=Qd(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=UWe();return HWe(t+r*(n-t+VWe("1e-"+((r+"").length-1))),n)}return tP(t,n)}var zWe=Math.ceil,GWe=Math.max;function kre(t){return function(n,e,i){return i&&"number"!=typeof i&&wl(n,e,i)&&(e=i=void 0),n=Qd(n),void 0===e?(e=n,n=0):e=Qd(e),function(r,o,s,a){for(var l=-1,c=GWe(zWe((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&wl(t,n[0],n[1])?n=[]:e>2&&wl(n[0],n[1],n[2])&&(n=[n[0]]),ere(t,La(n,1),[])}),iP=nqe,iqe=Math.floor,rqe=Math.min;function rP(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Gl(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Gl(s)&&(e?s<=n:s>>0)?(t=Gr(t))&&("string"==typeof n||null!=n&&!XS(n))&&!(n=bc(n))&&u0(t)?lp(Ku(t),0,e):t.split(n,e):[]}var oqe=Math.max;function roe(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:oqe(Gi(n),0),lr(function(e){var i=e[n],r=lp(e,0,n);return i&&ap(r,i),wc(t,this,r)})}var sqe=h0(function(t,n,e){return t+(e?" ":"")+NS(n)}),ooe=sqe;function soe(t,n,e){return t=Gr(t),e=null==e?0:Ym(Gi(e),0,t.length),n=bc(n),t.slice(e,e+n.length)==n}function aoe(){return{}}function loe(){return""}function coe(){return!0}var uoe=gS(function(t,n){return t-n},0);function doe(t){return t&&t.length?RF(t,rl):0}function hoe(t,n){return t&&t.length?RF(t,Ri(n)):0}function foe(t){var n=null==t?0:t.length;return n?tu(t,1,n):[]}function poe(t,n,e){return t&&t.length?tu(t,0,(n=e||void 0===n?1:Gi(n))<0?0:n):[]}function moe(t,n,e){var i=null==t?0:t.length;return i?tu(t,(n=i-(n=e||void 0===n?1:Gi(n)))<0?0:n,i):[]}function goe(t,n){return t&&t.length?US(t,Ri(n),!1,!0):[]}function voe(t,n){return t&&t.length?US(t,Ri(n)):[]}function yoe(t,n){return n(t),t}var _oe=Object.prototype,aqe=_oe.hasOwnProperty;function boe(t,n,e,i){return void 0===t||Zc(t,_oe[e])&&!aqe.call(i,e)?n:t}var lqe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function cqe(t){return"\\"+lqe[t]}var xoe=/<%=([\s\S]+?)%>/g,tk={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:xoe,variable:"",imports:{_:{escape:kF}}},uqe=/\b__p \+= '';/g,dqe=/\b(__p \+=) '' \+/g,hqe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fqe=/[()=,{}\[\]\/\s]/,pqe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nk=/($^)/,mqe=/['\n\r\u2028\u2029\\]/g,woe=Object.prototype.hasOwnProperty;function Coe(t,n,e){var i=tk.imports._.templateSettings||tk;e&&wl(t,n,e)&&(n=void 0),t=Gr(t),n=a0({},n,i,boe);var r,o,s=a0({},n.imports,i.imports,boe),a=Vs(s),l=MF(s,a),c=0,u=n.interpolate||nk,d="__p += '",h=RegExp((n.escape||nk).source+"|"+u.source+"|"+(u===xoe?pqe:nk).source+"|"+(n.evaluate||nk).source+"|$","g"),f=woe.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(g,v,y,b,C,k){return y||(y=b),d+=t.slice(c,k).replace(mqe,cqe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=k+g.length,g}),d+="';\n";var p=woe.call(n,"variable")&&n.variable;if(p){if(fqe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(uqe,""):d).replace(dqe,"$1").replace(hqe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=VN(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(m.source=d,IS(m))throw m;return m}function oP(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Bo(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),p0(t,n,{leading:i,maxWait:n,trailing:r})}function b0(t,n){return n(t)}var gqe=Math.min;function sP(t,n){if((t=Gi(t))<1||t>9007199254740991)return[];var e=4294967295,i=gqe(t,4294967295);t-=4294967295;for(var r=PN(i,n=rh(n));++e-1;);return e}function Ooe(t,n){for(var e=-1,i=t.length;++e-1;);return e}function Ioe(t,n,e){if((t=Gr(t))&&(e||void 0===n))return cee(t);if(!t||!(n=bc(n)))return t;var i=Ku(t),r=Ku(n);return lp(i,Ooe(i,r),Moe(i,r)+1).join("")}function Noe(t,n,e){if((t=Gr(t))&&(e||void 0===n))return t.slice(0,lee(t)+1);if(!t||!(n=bc(n)))return t;var i=Ku(t);return lp(i,0,Moe(i,Ku(n))+1).join("")}var vqe=/^\s+/;function Foe(t,n,e){if((t=Gr(t))&&(e||void 0===n))return t.replace(vqe,"");if(!t||!(n=bc(n)))return t;var i=Ku(t);return lp(i,Ooe(i,Ku(n))).join("")}var yqe=/\w*$/;function Poe(t,n){var e=30,i="...";if(Bo(n)){var r="separator"in n?n.separator:r;e="length"in n?Gi(n.length):e,i="omission"in n?bc(n.omission):i}var o=(t=Gr(t)).length;if(u0(t)){var s=Ku(t);o=s.length}if(e>=o)return t;var a=e-_0(i);if(a<1)return i;var l=s?lp(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),XS(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Gr(yqe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(bc(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function joe(t){return FN(t,1)}var _qe=JN({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Roe=/&(?:amp|lt|gt|quot|#39);/g,bqe=RegExp(Roe.source);function Loe(t){return(t=Gr(t))&&bqe.test(t)?t.replace(Roe,_qe):t}var xqe=f0&&1/jS(new f0([,-0]))[1]==1/0?function(t){return new f0(t)}:ho,wqe=xqe;function dp(t,n,e){var i=-1,r=SS,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=CF;else if(o>=200){var c=n?null:wqe(t);if(c)return jS(c);s=!1,r=K_,l=new Jm}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Dr&&af(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:b0,args:[r],thisArg:void 0}),new Kc(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),Zoe=Eqe;function ese(){return eF(this)}function tse(){var t=this.__wrapped__;if(t instanceof Dr){var n=t;return this.__actions__.length&&(n=new Dr(this)),(n=n.reverse()).__actions__.push({func:b0,args:[QS],thisArg:void 0}),new Kc(n,this.__chain__)}return this.thru(QS)}function cP(t,n,e){var i=t.length;if(i<2)return i?dp(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,lP(t,e)}),cse=Mqe,Gn={chunk:ate,compact:Tte,concat:Ete,difference:Zte,differenceBy:ene,differenceWith:tne,drop:ine,dropRight:rne,dropRightWhile:one,dropWhile:sne,fill:gne,findIndex:TF,findLastIndex:EF,first:ia,flatten:BN,flattenDeep:Ane,flattenDepth:Mne,fromPairs:Bne,head:ia,indexOf:Yne,initial:qi,intersection:Xne,intersectionBy:Jne,intersectionWith:Kne,join:kie,last:Fn,lastIndexOf:Eie,nth:qie,pull:_re,pullAll:eP,pullAllBy:bre,pullAllWith:xre,pullAt:Cre,remove:Ire,reverse:QS,slice:Gre,sortedIndex:Yre,sortedIndexBy:Xre,sortedIndexOf:Jre,sortedLastIndex:Kre,sortedLastIndexBy:Qre,sortedLastIndexOf:Zre,sortedUniq:toe,sortedUniqBy:noe,tail:foe,take:poe,takeRight:moe,takeRightWhile:goe,takeWhile:voe,union:$oe,unionBy:Boe,unionWith:Voe,uniq:Hoe,uniqBy:Uoe,uniqWith:zoe,unzip:ik,unzipWith:lP,without:Koe,xor:nse,xorBy:ise,xorWith:rse,zip:ose,zipObject:ase,zipObjectDeep:lse,zipWith:cse},fo={countBy:Ute,each:zS,eachRight:tb,every:mne,filter:yne,find:bne,findLast:Cne,flatMap:Dne,flatMapDeep:Tne,flatMapDepth:Ene,forEach:zS,forEachRight:tb,groupBy:g0,includes:qne,invokeMap:rie,keyBy:Tie,map:m0,orderBy:tre,partition:KF,reduce:Are,reduceRight:Mre,reject:Ore,sample:$re,sampleSize:Bre,shuffle:Ure,size:zre,some:qre,sortBy:iP},Oqe={now:Z_},gs={after:uee,ary:FN,before:HN,bind:zN,bindKey:Uee,curry:BS,curryRight:VS,debounce:p0,defer:Kte,delay:Qte,flip:One,memoize:l0,negate:y0,once:Qie,overArgs:ire,partial:XF,partialRight:mre,rearg:Tre,rest:Pre,spread:roe,throttle:oP,unary:joe,wrap:Qoe},hi={castArray:ote,clone:Ste,cloneDeep:kte,cloneDeepWith:cF,cloneWith:Dte,conformsTo:Bte,eq:Zc,gt:Une,gte:zne,isArguments:op,isArray:ji,isArrayBuffer:sie,isArrayLike:xl,isArrayLikeObject:ms,isBoolean:aie,isBuffer:uf,isDate:cie,isElement:uie,isEmpty:Ui,isEqual:ir,isEqualWith:die,isError:IS,isFinite:hie,isFunction:Zd,isInteger:NF,isLength:W_,isMap:aF,isMatch:fie,isMatchWith:pie,isNaN:mie,isNative:gie,isNil:vie,isNull:yie,isNumber:FF,isObject:Bo,isObjectLike:ns,isPlainObject:c0,isRegExp:XS,isSafeInteger:bie,isSet:lF,isString:nb,isSymbol:Gl,isTypedArray:Gm,isUndefined:xie,isWeakMap:wie,isWeakSet:Cie,lt:Oie,lte:Iie,toArray:BF,toFinite:Qd,toInteger:Gi,toLength:DF,toNumber:xc,toPlainObject:xF,toSafeInteger:Toe,toString:Gr},Sl={add:aee,ceil:ste,divide:nne,floor:Ine,max:jie,maxBy:Rie,mean:$ie,meanBy:Bie,min:zie,minBy:v0,multiply:Gie,round:Rre,subtract:uoe,sum:doe,sumBy:hoe},Iqe=lte,Nqe=Wne,Fqe=Sre,Oi={assign:jee,assignIn:TS,assignInWith:a0,assignWith:Ree,at:Bee,create:zte,defaults:qte,defaultsDeep:Xte,entries:GS,entriesIn:WS,extend:TS,extendWith:a0,findKey:wne,findLastKey:Sne,forIn:jne,forInRight:Rne,forOwn:Lne,forOwnRight:$ne,functions:Vne,functionsIn:Hne,get:MS,has:Gne,hasIn:LS,invert:Zne,invertBy:tie,invoke:iie,keys:Vs,keysIn:Cl,mapKeys:Nie,mapValues:jF,merge:Vie,mergeWith:wF,omit:Xie,omitBy:Kie,pick:gre,pickBy:UF,result:jre,set:Vre,setWith:Hre,toPairs:GS,toPairsIn:WS,transform:Aoe,unset:Goe,update:qoe,updateWith:Yoe,values:Km,valuesIn:Joe},oh={at:Zoe,chain:eF,commit:uF,lodash:me,next:VF,plant:QF,reverse:tse,tap:yoe,thru:b0,toIterator:aP,toJSON:Qm,value:Qm,valueOf:Qm,wrapperChain:ese},Wr={camelCase:rte,capitalize:YN,deburr:KN,endsWith:cne,escape:kF,escapeRegExp:fne,kebabCase:Die,lowerCase:Aie,lowerFirst:Mie,pad:dre,padEnd:hre,padStart:fre,parseInt:pre,repeat:Nre,replace:Fre,snakeCase:Wre,split:ioe,startCase:ooe,startsWith:soe,template:Coe,templateSettings:tk,toLower:koe,toUpper:Eoe,trim:Ioe,trimEnd:Noe,trimStart:Foe,truncate:Poe,unescape:Loe,upperCase:Xoe,upperFirst:NS,words:QN},to={attempt:VN,bindAll:Hee,cond:Rte,conforms:$te,constant:xS,defaultTo:Gte,flow:Fne,flowRight:Pne,identity:rl,iteratee:Sie,matches:Fie,matchesProperty:Pie,method:Hie,methodOf:Uie,mixin:LF,noop:ho,nthArg:Yie,over:nre,overEvery:rre,overSome:ore,property:vF,propertyOf:vre,range:nP,rangeRight:Dre,stubArray:FS,stubFalse:DS,stubObject:aoe,stubString:loe,stubTrue:coe,times:sP,toPath:Doe,uniqueId:hp},Pqe=Math.max,jqe=Math.min,Rqe=Math.min,Lqe=Array.prototype,use=Object.prototype.hasOwnProperty,dse=il?il.iterator:void 0,$qe=Math.max,hse=Math.min,dP=function(t){return function(n,e,i){if(null==i){var r=Bo(e),o=r&&Vs(e),s=o&&o.length&&qS(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(LF);me.after=gs.after,me.ary=gs.ary,me.assign=Oi.assign,me.assignIn=Oi.assignIn,me.assignInWith=Oi.assignInWith,me.assignWith=Oi.assignWith,me.at=Oi.at,me.before=gs.before,me.bind=gs.bind,me.bindAll=to.bindAll,me.bindKey=gs.bindKey,me.castArray=hi.castArray,me.chain=oh.chain,me.chunk=Gn.chunk,me.compact=Gn.compact,me.concat=Gn.concat,me.cond=to.cond,me.conforms=to.conforms,me.constant=to.constant,me.countBy=fo.countBy,me.create=Oi.create,me.curry=gs.curry,me.curryRight=gs.curryRight,me.debounce=gs.debounce,me.defaults=Oi.defaults,me.defaultsDeep=Oi.defaultsDeep,me.defer=gs.defer,me.delay=gs.delay,me.difference=Gn.difference,me.differenceBy=Gn.differenceBy,me.differenceWith=Gn.differenceWith,me.drop=Gn.drop,me.dropRight=Gn.dropRight,me.dropRightWhile=Gn.dropRightWhile,me.dropWhile=Gn.dropWhile,me.fill=Gn.fill,me.filter=fo.filter,me.flatMap=fo.flatMap,me.flatMapDeep=fo.flatMapDeep,me.flatMapDepth=fo.flatMapDepth,me.flatten=Gn.flatten,me.flattenDeep=Gn.flattenDeep,me.flattenDepth=Gn.flattenDepth,me.flip=gs.flip,me.flow=to.flow,me.flowRight=to.flowRight,me.fromPairs=Gn.fromPairs,me.functions=Oi.functions,me.functionsIn=Oi.functionsIn,me.groupBy=fo.groupBy,me.initial=Gn.initial,me.intersection=Gn.intersection,me.intersectionBy=Gn.intersectionBy,me.intersectionWith=Gn.intersectionWith,me.invert=Oi.invert,me.invertBy=Oi.invertBy,me.invokeMap=fo.invokeMap,me.iteratee=to.iteratee,me.keyBy=fo.keyBy,me.keys=Vs,me.keysIn=Oi.keysIn,me.map=fo.map,me.mapKeys=Oi.mapKeys,me.mapValues=Oi.mapValues,me.matches=to.matches,me.matchesProperty=to.matchesProperty,me.memoize=gs.memoize,me.merge=Oi.merge,me.mergeWith=Oi.mergeWith,me.method=to.method,me.methodOf=to.methodOf,me.mixin=dP,me.negate=y0,me.nthArg=to.nthArg,me.omit=Oi.omit,me.omitBy=Oi.omitBy,me.once=gs.once,me.orderBy=fo.orderBy,me.over=to.over,me.overArgs=gs.overArgs,me.overEvery=to.overEvery,me.overSome=to.overSome,me.partial=gs.partial,me.partialRight=gs.partialRight,me.partition=fo.partition,me.pick=Oi.pick,me.pickBy=Oi.pickBy,me.property=to.property,me.propertyOf=to.propertyOf,me.pull=Gn.pull,me.pullAll=Gn.pullAll,me.pullAllBy=Gn.pullAllBy,me.pullAllWith=Gn.pullAllWith,me.pullAt=Gn.pullAt,me.range=to.range,me.rangeRight=to.rangeRight,me.rearg=gs.rearg,me.reject=fo.reject,me.remove=Gn.remove,me.rest=gs.rest,me.reverse=Gn.reverse,me.sampleSize=fo.sampleSize,me.set=Oi.set,me.setWith=Oi.setWith,me.shuffle=fo.shuffle,me.slice=Gn.slice,me.sortBy=fo.sortBy,me.sortedUniq=Gn.sortedUniq,me.sortedUniqBy=Gn.sortedUniqBy,me.split=Wr.split,me.spread=gs.spread,me.tail=Gn.tail,me.take=Gn.take,me.takeRight=Gn.takeRight,me.takeRightWhile=Gn.takeRightWhile,me.takeWhile=Gn.takeWhile,me.tap=oh.tap,me.throttle=gs.throttle,me.thru=b0,me.toArray=hi.toArray,me.toPairs=Oi.toPairs,me.toPairsIn=Oi.toPairsIn,me.toPath=to.toPath,me.toPlainObject=hi.toPlainObject,me.transform=Oi.transform,me.unary=gs.unary,me.union=Gn.union,me.unionBy=Gn.unionBy,me.unionWith=Gn.unionWith,me.uniq=Gn.uniq,me.uniqBy=Gn.uniqBy,me.uniqWith=Gn.uniqWith,me.unset=Oi.unset,me.unzip=Gn.unzip,me.unzipWith=Gn.unzipWith,me.update=Oi.update,me.updateWith=Oi.updateWith,me.values=Oi.values,me.valuesIn=Oi.valuesIn,me.without=Gn.without,me.words=Wr.words,me.wrap=gs.wrap,me.xor=Gn.xor,me.xorBy=Gn.xorBy,me.xorWith=Gn.xorWith,me.zip=Gn.zip,me.zipObject=Gn.zipObject,me.zipObjectDeep=Gn.zipObjectDeep,me.zipWith=Gn.zipWith,me.entries=Oi.toPairs,me.entriesIn=Oi.toPairsIn,me.extend=Oi.assignIn,me.extendWith=Oi.assignInWith,dP(me,me),me.add=Sl.add,me.attempt=to.attempt,me.camelCase=Wr.camelCase,me.capitalize=Wr.capitalize,me.ceil=Sl.ceil,me.clamp=Iqe,me.clone=hi.clone,me.cloneDeep=hi.cloneDeep,me.cloneDeepWith=hi.cloneDeepWith,me.cloneWith=hi.cloneWith,me.conformsTo=hi.conformsTo,me.deburr=Wr.deburr,me.defaultTo=to.defaultTo,me.divide=Sl.divide,me.endsWith=Wr.endsWith,me.eq=hi.eq,me.escape=Wr.escape,me.escapeRegExp=Wr.escapeRegExp,me.every=fo.every,me.find=fo.find,me.findIndex=Gn.findIndex,me.findKey=Oi.findKey,me.findLast=fo.findLast,me.findLastIndex=Gn.findLastIndex,me.findLastKey=Oi.findLastKey,me.floor=Sl.floor,me.forEach=fo.forEach,me.forEachRight=fo.forEachRight,me.forIn=Oi.forIn,me.forInRight=Oi.forInRight,me.forOwn=Oi.forOwn,me.forOwnRight=Oi.forOwnRight,me.get=Oi.get,me.gt=hi.gt,me.gte=hi.gte,me.has=Oi.has,me.hasIn=Oi.hasIn,me.head=Gn.head,me.identity=rl,me.includes=fo.includes,me.indexOf=Gn.indexOf,me.inRange=Nqe,me.invoke=Oi.invoke,me.isArguments=hi.isArguments,me.isArray=ji,me.isArrayBuffer=hi.isArrayBuffer,me.isArrayLike=hi.isArrayLike,me.isArrayLikeObject=hi.isArrayLikeObject,me.isBoolean=hi.isBoolean,me.isBuffer=hi.isBuffer,me.isDate=hi.isDate,me.isElement=hi.isElement,me.isEmpty=hi.isEmpty,me.isEqual=hi.isEqual,me.isEqualWith=hi.isEqualWith,me.isError=hi.isError,me.isFinite=hi.isFinite,me.isFunction=hi.isFunction,me.isInteger=hi.isInteger,me.isLength=hi.isLength,me.isMap=hi.isMap,me.isMatch=hi.isMatch,me.isMatchWith=hi.isMatchWith,me.isNaN=hi.isNaN,me.isNative=hi.isNative,me.isNil=hi.isNil,me.isNull=hi.isNull,me.isNumber=hi.isNumber,me.isObject=Bo,me.isObjectLike=hi.isObjectLike,me.isPlainObject=hi.isPlainObject,me.isRegExp=hi.isRegExp,me.isSafeInteger=hi.isSafeInteger,me.isSet=hi.isSet,me.isString=hi.isString,me.isSymbol=hi.isSymbol,me.isTypedArray=hi.isTypedArray,me.isUndefined=hi.isUndefined,me.isWeakMap=hi.isWeakMap,me.isWeakSet=hi.isWeakSet,me.join=Gn.join,me.kebabCase=Wr.kebabCase,me.last=Fn,me.lastIndexOf=Gn.lastIndexOf,me.lowerCase=Wr.lowerCase,me.lowerFirst=Wr.lowerFirst,me.lt=hi.lt,me.lte=hi.lte,me.max=Sl.max,me.maxBy=Sl.maxBy,me.mean=Sl.mean,me.meanBy=Sl.meanBy,me.min=Sl.min,me.minBy=Sl.minBy,me.stubArray=to.stubArray,me.stubFalse=to.stubFalse,me.stubObject=to.stubObject,me.stubString=to.stubString,me.stubTrue=to.stubTrue,me.multiply=Sl.multiply,me.nth=Gn.nth,me.noop=to.noop,me.now=Oqe.now,me.pad=Wr.pad,me.padEnd=Wr.padEnd,me.padStart=Wr.padStart,me.parseInt=Wr.parseInt,me.random=Fqe,me.reduce=fo.reduce,me.reduceRight=fo.reduceRight,me.repeat=Wr.repeat,me.replace=Wr.replace,me.result=Oi.result,me.round=Sl.round,me.sample=fo.sample,me.size=fo.size,me.snakeCase=Wr.snakeCase,me.some=fo.some,me.sortedIndex=Gn.sortedIndex,me.sortedIndexBy=Gn.sortedIndexBy,me.sortedIndexOf=Gn.sortedIndexOf,me.sortedLastIndex=Gn.sortedLastIndex,me.sortedLastIndexBy=Gn.sortedLastIndexBy,me.sortedLastIndexOf=Gn.sortedLastIndexOf,me.startCase=Wr.startCase,me.startsWith=Wr.startsWith,me.subtract=Sl.subtract,me.sum=Sl.sum,me.sumBy=Sl.sumBy,me.template=Wr.template,me.times=to.times,me.toFinite=hi.toFinite,me.toInteger=Gi,me.toLength=hi.toLength,me.toLower=Wr.toLower,me.toNumber=hi.toNumber,me.toSafeInteger=hi.toSafeInteger,me.toString=hi.toString,me.toUpper=Wr.toUpper,me.trim=Wr.trim,me.trimEnd=Wr.trimEnd,me.trimStart=Wr.trimStart,me.truncate=Wr.truncate,me.unescape=Wr.unescape,me.uniqueId=to.uniqueId,me.upperCase=Wr.upperCase,me.upperFirst=Wr.upperFirst,me.each=fo.forEach,me.eachRight=fo.forEachRight,me.first=Gn.head,dP(me,(uP={},ih(me,function(t,n){use.call(me.prototype,n)||(uP[n]=t)}),uP),{chain:!1}),me.VERSION="4.17.21",(me.templateSettings=Wr.templateSettings).imports._=me,Qc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){me[t].placeholder=me}),Qc(["drop","take"],function(t,n){Dr.prototype[t]=function(e){e=void 0===e?1:$qe(Gi(e),0);var i=this.__filtered__&&!n?new Dr(this):this.clone();return i.__filtered__?i.__takeCount__=hse(e,i.__takeCount__):i.__views__.push({size:hse(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Dr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Qc(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Dr.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Ri(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),Qc(["head","last"],function(t,n){var e="take"+(n?"Right":"");Dr.prototype[t]=function(){return this[e](1).value()[0]}}),Qc(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Dr.prototype[t]=function(){return this.__filtered__?new Dr(this):this[e](1)}}),Dr.prototype.compact=function(){return this.filter(rl)},Dr.prototype.find=function(t){return this.filter(t).head()},Dr.prototype.findLast=function(t){return this.reverse().find(t)},Dr.prototype.invokeMap=lr(function(t,n){return"function"==typeof t?new Dr(this):this.map(function(e){return ib(e,t,n)})}),Dr.prototype.reject=function(t){return this.filter(y0(Ri(t)))},Dr.prototype.slice=function(t,n){t=Gi(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Dr(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Gi(n))<0?e.dropRight(-n):e.take(n-t)),e)},Dr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Dr.prototype.toArray=function(){return this.take(4294967295)},ih(Dr.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=me[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(me.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Dr,c=a[0],u=l||ji(s),d=function(v){var y=r.apply(me,ap([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,m=l&&!this.__actions__.length;if(!o&&u){s=m?s:new Dr(this);var g=t.apply(s,a);return g.__actions__.push({func:b0,args:[d],thisArg:void 0}),new Kc(g,h)}return p&&m?t.apply(this,a):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})}),Qc(["pop","push","shift","sort","splice","unshift"],function(t){var n=Lqe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);me.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(ji(o)?o:[],r)}return this[e](function(s){return n.apply(ji(s)?s:[],r)})}}),ih(Dr.prototype,function(t,n){var e=me[n];if(e){var i=e.name+"";use.call(n0,i)||(n0[i]=[]),n0[i].push({name:n,func:e})}}),n0[kS(void 0,2).name]=[{name:"wrapper",func:void 0}],Dr.prototype.clone=function(){var t=new Dr(this.__wrapped__);return t.__actions__=Wl(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wl(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wl(this.__views__),t},Dr.prototype.reverse=function(){if(this.__filtered__){var t=new Dr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Dr.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=ji(t),i=n<0,r=e?t.length:0,o=function(k,D,L){for(var z=-1,R=L.length;++z1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!To(l)||n&&c.length>0)&&(e[an(c)]=!0),To(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function pse(t){return Qe({},t)}function mse(t){return Object.values(t)}function gse(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(ri(o))),r}function fP(t,n){try{return n.parse(t)}catch{return n.parse(Kd(t))}}function vse(t,n){try{return fP(t,n)}catch{return}}function ok(t,n){t=t.replace(_se,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function yse(t){t=t.replace(_se,"");try{return Kd(t)}catch{}try{var n=Kd("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Kd("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var _se=/,\s*$/;function sk(t,n){var e=wse.exec(n);if(e){var i=Bs(e[2]),r=function(f,p){for(var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return x0(t)?t:{text:e.stringify(t.json,null,n)}}function bse(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return mP(t)?t:{json:n.parse(t.text)}}function ak(t,n,e){return Zm(t,n,e).text}function xse(t,n){return function Uqe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(x0(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(To(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var wse=/(position|char) (\d+)/,zqe=/line (\d+)/,Gqe=/column (\d+)/;function Sse(t){return Wqe.test(t)&&t.length>2}var Wqe=/^[[{]\S/;function gP(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?qqe:Yqe:e?Xqe:Jqe}var qqe={escapeValue:function(t){return kse(Ese(String(t)))},unescapeValue:function(t){return Ase(Dse(t))}},Yqe={escapeValue:function(t){return Ese(String(t))},unescapeValue:function(t){return Ase(t)}},Xqe={escapeValue:function(t){return kse(String(t))},unescapeValue:function(t){return Dse(t)}},Jqe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function kse(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function Dse(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return Tse[e]||e}catch{return n}})}var Tse={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Kqe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function Ese(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return Tse[n]||n})}function Ase(t){return t.replace(/\\["bfnrt\\]/g,function(n){return Kqe[n]||n})}function eg(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function Mse(t,n){return ob(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function tg(t,n,e){return ob(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function ob(t,n){return!!vP(t,n)}function vP(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function Ose(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function lk(t,n,e){var i=w0(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,Ose(r))}}function w0(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function ck(t){var e=w0(t)?.document.activeElement;return!!e&&ob(e,function(i){return i===t})}function Ise(t,n){return vP(t,function(e){return e.nodeName===n})}function yP(t){return tg(t,"data-type","selectable-key")?Zr.key:tg(t,"data-type","selectable-value")?Zr.value:tg(t,"data-type","insert-selection-area-inside")?Zr.inside:tg(t,"data-type","insert-selection-area-after")?Zr.after:Zr.multi}function C0(t){return encodeURIComponent(an(t))}function Nse(t){var e=vP(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?Yu(decodeURIComponent(e)):null}function fp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in Zqe||e.push(i),e.join(n)}var Zqe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},_P=aN.window;function eYe(t){di(t,"svelte-1r8q3m8",".jse-absolute-popup.svelte-1r8q3m8.svelte-1r8q3m8{position:relative;left:0;top:0;width:0;height:0;z-index:1001}.jse-absolute-popup.svelte-1r8q3m8 .jse-hidden-input.svelte-1r8q3m8{position:fixed;left:0;top:0;width:0;height:0;padding:0;margin:0;border:none;outline:none;overflow:hidden}.jse-absolute-popup.svelte-1r8q3m8 .jse-absolute-popup-content.svelte-1r8q3m8{position:absolute}")}function Fse(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,z="left"===v||b+u>window.innerWidth&&b>u;return{left:z?y.right-g:b+g,top:L?C-p:y.bottom+p,positionAbove:L,positionLeft:z}}if("number"==typeof n.left&&"number"==typeof n.top){var R=n.left,U=n.top,G=n.width,X=void 0===G?0:G,te=n.height,P=void 0===te?0:te;return{left:R,top:U,positionAbove:U+P>window.innerHeight&&U>P,positionLeft:R+X>window.innerWidth&&R>X}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function iYe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!ob(l.target,function(c){return c===i})&&s(o.id)}return Yc(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===fp(l)&&s(o.id)},function(l){a(l)},s,function(l){Hi[l?"unshift":"push"](function(){e(2,r=l)})},function(l){Hi[l?"unshift":"push"](function(){e(1,i=l)})}]}var rYe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,iYe,tYe,ps,{popup:0,closeAbsolutePopup:6},eYe),r}return Se(e)}();function jse(t,n,e){var i=t.slice();return i[6]=n[e],i}function Rse(t){var n,e;return n=new rYe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function oYe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(lYe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var lYe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function sb(t){return{value:t,label:Ui(t)?"(whole item)":iu(ql(t))}}function sh(t){return t.map(function(n){return xP.test(n)?"?.[".concat(n,"]"):bP.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var bP=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,xP=/^\d+$/;function ab(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function ah(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var cYe={id:"javascript",name:"JavaScript",description:"\n

\n Enter a JavaScript function to filter, sort, or transform the data.\n

\n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(sh(e.path)),a=function wP(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function eee(t){return AUe.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(sh(i.path),"\n")+" const valueB = b".concat(sh(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(sh(i.path),"\n")+" const valueB = b".concat(sh(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(sh(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(sh(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')()(t);return void 0!==e?e:null}},uYe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7l0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5H93c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8l0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4l0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5H210.4c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8l0 0 0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM176 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80V416H256v16c0 44.2-35.8 80-80 80z"]},lb={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},cb={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},dYe={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};function hYe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var $Ye=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,LYe,RYe,Ti,{path:4,value:0,readOnly:1,onPatch:5,focus:6},jYe),r}return Se(e)}();function Yse(t){for(var n=iP(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=hk(n,u);SP(l,d,function(g){o[c]=String(g),a(l[g])}),o.pop()}}}else if(To(l)&&i(o)){r[an(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=Re(h);try{for(p.s();!(f=p.n()).done;){var m=f.value;o[c]=m,a(l[m])}}catch(g){p.e(g)}finally{p.f()}o.pop()}}}(s),Qe(Qe({},n),{},{expandedMap:r})}function Xse(t,n){var e=S0(t.expandedMap,n),i=S0(t.enforceStringMap,n),r=S0(t.visibleSectionsMap,n);return Qe(Qe({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function Jse(t,n,e){if(e){var i=Qe({},t.enforceStringMap);return i[n]=e,Qe(Qe({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Qe({},t.enforceStringMap);return delete r[n],Qe(Qe({},t),{},{enforceStringMap:r})}return t}function Kse(t,n,e){var i=Xu(t,e),r=e.reduce(function(o,s){return RZ(s)?Qse(i,o,s):LZ(s)?Zse(i,o,s):fN(s)?(u=(c=s).path,d=AP(a=i,(l=o).expandedMap),h=AP(a,l.enforceStringMap),f=AP(a,l.visibleSectionsMap),Do(c.value)||eo(c.value)||delete d[u],eo(c.value)||delete f[u],(Do(c.value)||eo(c.value))&&delete h[u],Qe(Qe({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):pN(s)||Qv(s)?function(a,l,c){if(Qv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=EP(DP(l.expandedMap,c.from),u),h=EP(DP(l.enforceStringMap,c.from),u),f=EP(DP(l.visibleSectionsMap,c.from),u),p=l;Qv(c)&&(p=Zse(a,p,{op:"remove",path:c.from}));var m=TP((p=Qse(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),g=TP(p.enforceStringMap,h),v=TP(p.visibleSectionsMap,f);return Qe(Qe({},l),{},{expandedMap:m,enforceStringMap:g,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function Qse(t,n,e){var i=Ju(t,e.path),r=qi(i),o=an(r);if(eo(Sn(t,r))){var s=Bs(Fn(i)),a=k0(n.expandedMap,r,s,1),l=k0(n.enforceStringMap,r,s,1),c=k0(n.visibleSectionsMap,r,s,1);return c=eae(c,o,function(u){return tae(u,s,1)}),Qe(Qe({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function Zse(t,n,e){var i=Ju(t,e.path),r=qi(i),o=an(r),s=Sn(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=S0(a,i),l=S0(l,i),c=S0(c,i),eo(s)){var u=Bs(Fn(i));a=k0(a,r,u,-1),l=k0(l,r,u,-1),c=eae(c=k0(c,r,u,-1),o,function(d){return tae(d,u,-1)})}return Qe(Qe({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function S0(t,n){var e={},i=an(n);return Object.keys(t).forEach(function(r){Zv(r,i)||(e[r]=t[r])}),e}function DP(t,n){var e={};return Object.keys(t).forEach(function(i){Zv(i,n)&&(e[i]=t[i])}),e}function TP(t,n){return Qe(Qe({},t),n)}function EP(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function k0(t,n,e,i){for(var r=n.length,o=an(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:an(u),value:t[c]}))}}if(0===s.length)return t;var h=Qe({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function AP(t,n){var e={};return Object.keys(n).filter(function(i){return Jc(t,Ju(t,i))}).forEach(function(i){e[i]=n[i]}),e}function eae(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!ir(i,r)){var o=Qe({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function tae(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function pf(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof e0(o,i)}function ub(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function MP(t,n){var e=[];return function i(r,o){e.push(o);var s=an(o);if(r&&!0===n.expandedMap[s]){if(eo(r)){var a=hk(n,s);SP(r,a,function(l){i(r[l],o.concat(String(l)))})}Do(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function nae(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:Gu.value});var a=an(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:Gu.inside}),eo(o)){var l=hk(n,a);SP(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:Gu.after})})}Do(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:Gu.key}),r(o[c],u),e&&i.push({path:u,type:Gu.after})})}}(t,[]),i}function OP(t,n,e){var i=MP(t,n),r=i.map(an).indexOf(an(e));return-1!==r&&r0;){if(!0===t.pointersMap[an(i)])return!0;i.pop()}return vs(t)?e===Zr.key&&ir(t.focusPath,n):!(!Yi(t)||!(e===Zr.value&&ir(t.focusPath,n)||A0(n,t.focusPath)&&n.length>t.focusPath.length&&(e===Zr.key||e===Zr.value||e===Zr.multi)))}function oae(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Ir(r)?r.focusPath:ia(r.paths),s=function HYe(t,n,e){var i=MP(t,n),r=i.map(an),o=an(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Zu(r)||Hs(r)?Es(t,r.anchorPath,r.anchorPath):Es(t,r.anchorPath,l);if(vs(r)){var u=Sn(t,qi(s));return Array.isArray(u)||Ui(s)?fr(s,!1):ou(s,!1)}return Yi(r)?fr(s,!1):Zu(r)||Hs(r)?Es(t,o,o):Es(t,a,l)}function sae(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=nae(t,n,e),o=r.findIndex(function(s){return ir(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Sn(t,qi(r)))?fr(r,!1):ou(r,!1)}function E0(t,n){if(1===n.length){var e=ia(n);if("replace"===e.op||"move"===e.op)return fr(Ju(t,e.path),!1)}if(!Ui(n)&&n.every(function(s){return"move"===s.op})){var i=ia(n),r=n.slice(1);if((pN(i)||Qv(i))&&i.from!==i.path&&r.every(function(s){return(pN(s)||Qv(s))&&s.from===s.path}))return ou(Ju(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Ju(t,s.path)});if(!Ui(o))return{type:Zr.multi,paths:o,anchorPath:ia(o),focusPath:Fn(o),pointersMap:aae(o)}}function aae(t){var n={};return t.forEach(function(e){n[an(e)]=!0}),n}function pk(t){return Ul({},an(t),!0)}function hb(t){return void 0!==t&&(vs(t)||Yi(t)||Ir(t)&&1===t.paths.length)}function lae(t,n){return hb(n)&&$o(Sn(t,n.focusPath))?n.focusPath:qi(n.focusPath)}function A0(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Qe(Qe({},r),{},{active:o===n})});return Qe(Qe({},t),{},{items:i,itemsMap:g0(i,function(r){return an(r.path)}),activeItem:e,activeIndex:n})}function KYe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Qe(Qe({},r),{},{active:o===n})});return Qe(Qe({},t),{},{items:i,itemsMap:g0(i,function(r){return an(r.path)}),activeItem:e,activeIndex:n})}function _ae(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Do(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,m=h;p=e)return}r.pop()}else bae(String(c),l,r,Wu.value,o)}(t.toLowerCase(),n),i}function bae(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function PP(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function xae(t,n,e){var i=t;return tb(e,function(r){i=PP(i,n,r.start,r.end)}),i}function QYe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Wu.key){var c=qi(s),u=Sn(t,c),d=Fn(s),h=pb(c,Object.keys(u),d,PP(d,e,a,l));return{newSelection:E0(t,h),operations:h}}if(o===Wu.value){var f=Sn(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(an(s)));var p="string"==typeof f?f:String(f),m=an(s),g=pf(f,n.enforceStringMap,m,r),v=PP(p,e,a,l),y=[{op:"replace",path:an(s),value:g?v:e0(v,r)}];return{newSelection:E0(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function ZYe(t,n,e,i,r){for(var o=_ae(e,t,1/0),s=[],a=0;an.floating[o]&&(s=wk(s)),{main:s,cross:wk(s)}}var $Xe={start:"end",end:"start"};function UP(t){return t.replace(/start|end/g,function(n){return $Xe[n]})}var BXe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return Ki(pn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te,P,W,le,E,I,N,q,V,re;return pn().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,m=u.fallbackPlacements,v=void 0===(g=u.fallbackStrategy)?"bestFit":g,b=void 0===(y=u.fallbackAxisSideDirection)?"none":y,k=void 0===(C=u.flipAlignment)||C,D=sZ(u,_He),L=og(r),z=og(a)===a,he.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return R=he.sent,U=m||(z||!k?[wk(a)]:(void 0,_e=wk(Oe=a),[UP(Oe),_e,UP(_e)])),m||"none"===b||U.push.apply(U,ri(function(Oe,_e,Xe,Le){var rt=bk(Oe),B=function(ne,ie,Me){var Ye=["left","right"],je=["right","left"];switch(ne){case"top":case"bottom":return Me?ie?je:Ye:ie?Ye:je;case"left":case"right":return ie?["top","bottom"]:["bottom","top"];default:return[]}}(og(Oe),"start"===Xe,Le);return rt&&(B=B.map(function(ne){return ne+"-"+rt}),_e&&(B=B.concat(B.map(UP)))),B}(a,k,b,R))),G=[a].concat(ri(U)),he.next=29,Rae(n,D);case 29:if(X=he.sent,te=[],P=(null==(i=o.flip)?void 0:i.overflows)||[],h&&te.push(X[L]),p&&(W=LXe(r,s,R),te.push(X[W.main],X[W.cross])),P=[].concat(ri(P),[{placement:r,overflows:te}]),te.every(function(Oe){return Oe<=0})){he.next=48;break}if(I=((null==(le=o.flip)?void 0:le.index)||0)+1,!(N=G[I])){he.next=37;break}return he.abrupt("return",{data:{index:I,overflows:P},reset:{placement:N}});case 37:if(q=null==(E=P.filter(function(Oe){return Oe.overflows[0]<=0}).sort(function(Oe,_e){return Oe.overflows[1]-_e.overflows[1]})[0])?void 0:E.placement,q){he.next=46;break}he.t0=v,he.next="bestFit"===he.t0?42:"initialPlacement"===he.t0?45:46;break;case 42:return re=null==(V=P.map(function(Oe){return[Oe.placement,Oe.overflows.filter(function(_e){return _e>0}).reduce(function(_e,Xe){return _e+Xe},0)]}).sort(function(Oe,_e){return Oe[1]-_e[1]})[0])?void 0:V[0],re&&(q=re),he.abrupt("break",46);case 45:q=a;case 46:if(r===q){he.next=48;break}return he.abrupt("return",{reset:{placement:q}});case 48:return he.abrupt("return",{});case 49:case"end":return he.stop()}var Oe,_e},e)}))()}}},VXe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return Ki(pn().mark(function e(){var i,r,o;return pn().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=Ki(pn().mark(function l(c,u){var d,h,f,p,m,g,v,y,b,C,k,D,L,z;return pn().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d=c.placement,h=c.platform,f=c.elements,R.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=R.sent,m=og(d),g=bk(d),v="x"===xk(d),y=["left","top"].includes(m)?-1:1,b=p&&v?-1:1,C="function"==typeof u?u(c):u,k="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Qe({mainAxis:0,crossAxis:0,alignmentAxis:null},C),D=k.mainAxis,L=k.crossAxis,z=k.alignmentAxis,R.abrupt("return",(g&&"number"==typeof z&&(L="end"===g?-1*z:z),v?{x:L*b,y:D*y}:{x:D*y,y:L*b}));case 14:case"end":return R.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function HXe(t){return"x"===t?"y":"x"}var UXe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return Ki(pn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,L;return pn().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(R){return{x:R.x,y:R.y}}}:h,p=sZ(a,bHe),m={x:r,y:o},z.next=14,Rae(n,p);case 14:return g=z.sent,v=xk(og(s)),y=HXe(v),b=m[v],C=m[y],c&&(b=Lae(b+g["y"===v?"top":"left"],b,b-g["y"===v?"bottom":"right"])),d&&(C=Lae(C+g["y"===y?"top":"left"],C,C-g["y"===y?"bottom":"right"])),L=f.fn(Qe(Qe({},n),{},(Ul(i={},v,b),Ul(i,y,C),i))),z.abrupt("return",Qe(Qe({},L),{},{data:{x:L.x-r,y:L.y-o}}));case 22:case"end":return z.stop()}},e)}))()}}};function Sc(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function uh(t){return Sc(t).getComputedStyle(t)}var zP,$ae=Math.min,gb=Math.max,Ck=Math.round;function Bae(t){var n=uh(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=Ck(e)!==r||Ck(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function _p(t){return Hae(t)?(t.nodeName||"").toLowerCase():""}function Vae(){if(zP)return zP;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?zP=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function dh(t){return t instanceof Sc(t).HTMLElement}function td(t){return t instanceof Sc(t).Element}function Hae(t){return t instanceof Sc(t).Node}function Uae(t){return typeof ShadowRoot<"u"&&(t instanceof Sc(t).ShadowRoot||t instanceof ShadowRoot)}function Sk(t){var n=uh(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function zXe(t){return["table","td","th"].includes(_p(t))}function GP(t){var n=/firefox/i.test(Vae()),e=uh(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function WP(){return/^((?!chrome|android).)*safari/i.test(Vae())}function qP(t){return["html","body","#document"].includes(_p(t))}function zae(t){return td(t)?t:t.contextElement}var Gae={x:1,y:1};function j0(t){var n=zae(t);if(!dh(n))return Gae;var e=n.getBoundingClientRect(),i=Bae(n),r=i.width,o=i.height,s=i.fallback,a=(s?Ck(e.width):e.width)/r,l=(s?Ck(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function sg(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=zae(t),l=Gae;n&&(i?td(i)&&(l=j0(i)):l=j0(t));var c=a?Sc(a):window,u=WP()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var m=Sc(a),g=i&&td(i)?Sc(i):i,v=m.frameElement;v&&i&&g!==m;){var y=j0(v),b=v.getBoundingClientRect(),C=getComputedStyle(v);b.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,b.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=b.x,h+=b.y,v=Sc(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function bp(t){return((Hae(t)?t.ownerDocument:t.document)||window.document).documentElement}function kk(t){return td(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Wae(t){return sg(bp(t)).left+kk(t).scrollLeft}function vb(t){if("html"===_p(t))return t;var n=t.assignedSlot||t.parentNode||Uae(t)&&t.host||bp(t);return Uae(n)?n.host:n}function qae(t){var n=vb(t);return qP(n)?n.ownerDocument.body:dh(n)&&Sk(n)?n:qae(n)}function yb(t,n){var e;void 0===n&&(n=[]);var i=qae(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Sc(i);return r?n.concat(o,o.visualViewport||[],Sk(i)?i:[]):n.concat(i,yb(i))}function Yae(t,n,e){var i,l,c,u,d,h,f,p,m;if("viewport"===n)i=function(l,c){var u=Sc(l),d=bp(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,m=0,g=0;if(h){f=h.width,p=h.height;var v=WP();(!v||v&&"fixed"===c)&&(m=h.offsetLeft,g=h.offsetTop)}return{width:f,height:p,x:m,y:g}}(t,e);else if("document"===n)l=bp(t),c=bp(l),u=kk(l),h=gb(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=gb(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+Wae(l),m=-u.scrollTop,"rtl"===uh(d).direction&&(p+=gb(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:m};else if(td(n))i=function(l,c){var u=sg(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=dh(l)?j0(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Qe({},n);if(WP()){var o,s,a=Sc(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return VP(i)}function Xae(t,n){return dh(t)&&"fixed"!==uh(t).position?n?n(t):t.offsetParent:null}function Jae(t,n){for(var e=Sc(t),i=Xae(t,n);i&&zXe(i)&&"static"===uh(i).position;)i=Xae(i,n);return i&&("html"===_p(i)||"body"===_p(i)&&"static"===uh(i).position&&!GP(i))?e:i||function(r){for(var o=vb(r);dh(o)&&!qP(o);){if(GP(o))return o;o=vb(o)}return null}(t)||e}function GXe(t,n,e){var i=dh(n),r=bp(n),o=sg(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==_p(n)||Sk(r))&&(s=kk(n)),dh(n)){var l=sg(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=Wae(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var WXe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=yb(c).filter(function(y){return td(y)&&"body"!==_p(y)}),f=null,p="fixed"===uh(c).position,m=p?vb(c):c;td(m)&&!qP(m);){var g=uh(m),v=GP(m);"fixed"===g.position?f=null:(p?v||f:v||"static"!==g.position||!f||!["absolute","fixed"].includes(f.position))?f=g:h=h.filter(function(y){return y!==m}),m=vb(m)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(ri(o),[i]),l=s.reduce(function(c,u){var d=Yae(n,u,r);return c.top=gb(d.top,c.top),c.right=$ae(d.right,c.right),c.bottom=$ae(d.bottom,c.bottom),c.left=gb(d.left,c.left),c},Yae(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=dh(e),o=bp(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==_p(e)||Sk(o))&&(s=kk(e)),dh(e))){var c=sg(e);a=j0(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:td,getDimensions:function(t){return dh(t)?Bae(t):t.getBoundingClientRect()},getOffsetParent:Jae,getDocumentElement:bp,getScale:j0,getElementRects:function(t){var n=this;return Ki(pn().mark(function e(){var i,r,o,s,a;return pn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||Jae,a=n.getDimensions,l.t0=GXe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Qe,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===uh(t).direction}};function XXe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==gn(i[0])&&(i=u(i));var f=i.filter(function(p){var m=c(p[h],e,p);return m&&r&&null!=o&&o.length&&(m=!o.some(function(g){return!!l&&g[s]===p[s]})),m});return a&&(f=d(f)),f}function JXe(t){return YP.apply(this,arguments)}function YP(){return YP=Ki(pn().mark(function t(n){var e,i,r,o,s;return pn().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==gn(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),YP.apply(this,arguments)}function KXe(t){di(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function QXe(t){var n,e;return{c:function(){n=Yd("svg"),j(e=Yd("path"),"fill","currentColor"),j(e,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),j(n,"width","100%"),j(n,"height","100%"),j(n,"viewBox","0 0 20 20"),j(n,"focusable","false"),j(n,"aria-hidden","true"),j(n,"class","svelte-qbd276")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:jt,i:jt,o:jt,d:function(i){i&&Fe(n)}}}var ZXe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,null,QXe,ps,{},KXe),r}return Se(e)}();function eJe(t){di(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function tJe(t){var n,e;return{c:function(){n=Yd("svg"),j(e=Yd("path"),"fill","currentColor"),j(e,"d","M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),j(n,"width","100%"),j(n,"height","100%"),j(n,"viewBox","-2 -2 50 50"),j(n,"focusable","false"),j(n,"aria-hidden","true"),j(n,"role","presentation"),j(n,"class","svelte-whdbu1")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:jt,i:jt,o:jt,d:function(i){i&&Fe(n)}}}var Dk=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,null,tJe,ps,{},eJe),r}return Se(e)}();function nJe(t){di(t,"svelte-1p3nqvd",".loading.svelte-1p3nqvd{width:var(--spinner-width, 20px);height:var(--spinner-height, 20px);color:var(--spinner-color, var(--icons-color));animation:svelte-1p3nqvd-rotate 0.75s linear infinite;transform-origin:center center;transform:none}.circle_path.svelte-1p3nqvd{stroke-dasharray:90;stroke-linecap:round}@keyframes svelte-1p3nqvd-rotate{100%{transform:rotate(360deg)}}")}function iJe(t){var n,e;return{c:function(){n=Yd("svg"),j(e=Yd("circle"),"class","circle_path svelte-1p3nqvd"),j(e,"cx","50"),j(e,"cy","50"),j(e,"r","20"),j(e,"fill","none"),j(e,"stroke","currentColor"),j(e,"stroke-width","5"),j(e,"stroke-miterlimit","10"),j(n,"class","loading svelte-1p3nqvd"),j(n,"viewBox","25 25 50 50")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:jt,i:jt,o:jt,d:function(i){i&&Fe(n)}}}var rJe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,null,iJe,ps,{},nJe),r}return Se(e)}();function oJe(t){di(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:absolute;cursor:default;border:none;color:var(--input-color, var(--item-color));padding:var(--input-padding, 0);letter-spacing:var(--input-letter-spacing, inherit);margin:var(--input-margin, 0);min-width:10px;top:0;right:0;bottom:0;left:0;background:transparent;font-size:var(--font-size, 16px)}.svelte-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:relative;overflow:var(--selected-item-overflow, hidden);padding:var(--selected-item-padding, 0 20px 0 0);text-overflow:ellipsis;white-space:nowrap;color:var(--selected-item-color, inherit);font-size:var(--font-size, 16px)}.multi.svelte-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{all:unset;display:flex;align-items:center;justify-content:center;width:var(--clear-select-width, 40px);height:var(--clear-select-height, 100%);color:var(--clear-select-color, var(--icons-color));margin:var(--clear-select-margin, 0);pointer-events:all;flex-shrink:0}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--loading-width, 40px);height:var(--loading-height);color:var(--loading-color, var(--icons-color));margin:var(--loading--margin, 0);flex-shrink:0}.chevron.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--chevron-width, 40px);height:var(--chevron-height, 40px);background:var(--chevron-background, transparent);pointer-events:var(--chevron-pointer-events, none);color:var(--chevron-color, var(--icons-color));border:var(--chevron-border, 0 0 0 1px solid #d8dbdf);flex-shrink:0}.multi.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-input-padding, 0);position:relative;margin:var(--multi-select-input-margin, 5px 0);flex:1 1 40px}.svelte-select.error.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{z-index:9999;border:0px;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0px;white-space:nowrap}.multi-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--multi-item-bg, #ebedef);margin:var(--multi-item-margin, 0);outline:var(--multi-item-outline, 1px solid #ddd);border-radius:var(--multi-item-border-radius, 4px);height:var(--multi-item-height, 25px);line-height:var(--multi-item-height, 25px);display:flex;cursor:default;padding:var(--multi-item-padding, 0 5px);overflow:hidden;gap:var(--multi-item-gap, 4px);outline-offset:-1px;max-width:var(--multi-max-width, none);color:var(--multi-item-color, var(--item-color))}.multi-item.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-shadow:var(--list-shadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--list-border-radius, 4px);max-height:var(--list-max-height, 252px);overflow-y:auto;background:var(--list-background, #fff);position:var(--list-position, absolute);z-index:var(--list-z-index, 2);border:var(--list-border)}.prefloat.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{cursor:default;height:var(--item-height, var(--height, 42px));line-height:var(--item-line-height, var(--height, 42px));padding:var(--item-padding, 0 20px);color:var(--item-color, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:var(--item-transition, all 0.2s);align-items:center;width:100%}.item.group-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var sJe=function(t){return{value:8&t[0]}},Kae=function(t){return{value:t[3]}},aJe=function(t){return{listOpen:64&t[0]}},Qae=function(t){return{listOpen:t[6]}},lJe=function(t){return{}},Zae=function(t){return{}},cJe=function(t){return{}},ele=function(t){return{}},uJe=function(t){return{selection:8&t[0]}},tle=function(t){return{selection:t[3]}};function nle(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var dJe=function(t){return{}},ile=function(t){return{}},hJe=function(t){return{selection:8&t[0]}},rle=function(t){return{selection:t[127],index:t[129]}},fJe=function(t){return{}},ole=function(t){return{}},pJe=function(t){return{}},sle=function(t){return{}};function ale(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var mJe=function(t){return{item:16777216&t[0]}},lle=function(t){return{item:t[127],index:t[129]}},gJe=function(t){return{filteredItems:16777216&t[0]}},cle=function(t){return{filteredItems:t[24]}};function ule(t){var n,e,i,r,o,s,a=[_Je,yJe,vJe],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=ve("div"),i&&i.c(),j(n,"class","svelte-select-list svelte-tyxmms"),At(n,"prefloat",t[28])},m:function(u,d){Pe(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[ya(t[49].call(null,n)),It(n,"scroll",t[41]),It(n,"pointerdown",nf(t[50])),It(n,"pointerup",rf(nf(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&(Lt(),ae(l[h],1,1,function(){l[h]=null}),$t()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),K(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&At(n,"prefloat",u[28])},i:function(u){r||(K(i),r=!0)},o:function(u){ae(i),r=!1},d:function(u){u&&Fe(n),~e&&l[e].d(),t[91](null),o=!1,so(s)}}}function vJe(t){var n,e,i=t[83].empty,r=Ss(i,t,t[82],sle),o=r||{c:function(){(e=ve("div")).textContent="No options",j(e,"class","empty svelte-tyxmms")},m:function(s,a){Pe(s,e,a)},p:jt,d:function(s){s&&Fe(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Ds(r,i,s,s[82],n?ks(i,s[82],a,pJe):Ts(s[82]),sle)},i:function(s){n||(K(o,s),n=!0)},o:function(s){ae(o,s),n=!1},d:function(s){o&&o.d(s)}}}function yJe(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Ke,Jn)}:kn,ci=n.debounceWait,li=void 0===ci?300:ci,Sr=n.hideEmptyState,qr=void 0!==Sr&&Sr,fi=n.inputAttributes,vr=void 0===fi?{}:fi,Te=n.listAutoWidth,kt=void 0===Te||Te,Vt=n.showChevron,rn=void 0!==Vt&&Vt,un=n.listOffset,ii=void 0===un?5:un,Ni=n.hoverItemIndex,$n=void 0===Ni?0:Ni,ei=n.floatingConfig,Xn=void 0===ei?{}:ei,yr=n.class,Er=void 0===yr?"":yr;function Io(Ke){var Jn=[],Qi={};Ke.forEach(function(wd){var jr=wr(wd);Jn.includes(jr)||(Jn.push(jr),Qi[jr]=[],jr&&Qi[jr].push(Object.assign(Us(jr,wd),{id:jr,groupHeader:!0,selectable:Vr}))),Qi[jr].push(Object.assign({groupItem:!!jr},wd))});var Gs=[];return mr(Jn).forEach(function(wd){Qi[wd]&&Gs.push.apply(Gs,ri(Qi[wd]))}),Gs}function sa(){var Ke=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Jn=arguments.length>1?arguments[1]:void 0;e(7,$n=Ke<0?0:Ke),!Jn&&wr&&c[$n]&&!c[$n].selectable&&yo(1)}function md(){var Ke=!0;if(B){var Jn=[],Qi=[];B.forEach(function(Gs){Jn.includes(Gs[On])?Ke=!1:(Jn.push(Gs[On]),Qi.push(Gs))}),Ke||e(3,B=Qi)}return Ke}function pu(Ke){var Jn=Ke?Ke[On]:B[On];return fn.find(function(Qi){return Qi[On]===Jn})}function aa(Ke){return El.apply(this,arguments)}function El(){return(El=Ki(pn().mark(function Ke(Jn){var Qi;return pn().wrap(function(Gs){for(;;)switch(Gs.prev=Gs.next){case 0:Qi=B[Jn],e(3,B=1===B.length?void 0:B.filter(function(wd){return wd!==Qi})),L("clear",Qi);case 3:case"end":return Gs.stop()}},Ke)}))).apply(this,arguments)}function gd(Ke){var Jn;Le&&N===(null===(Jn=document)||void 0===Jn?void 0:Jn.activeElement)||(Ke&&L("focus",Ke),N.focus(),e(2,Le=!0))}function Ms(Ke){return vd.apply(this,arguments)}function vd(){return(vd=Ki(pn().mark(function Ke(Jn){return pn().wrap(function(Qi){for(;;)switch(Qi.prev=Qi.next){case 0:if(!ui&&!hx){Qi.next=2;break}return Qi.abrupt("return");case 2:(Ue||Le)&&(L("blur",Jn),yd(),e(2,Le=!1),e(26,f=void 0),N.blur());case 3:case"end":return Qi.stop()}},Ke)}))).apply(this,arguments)}function yd(){e(4,ie=""),e(6,Ue=!1)}y=Ki(pn().mark(function Ke(){return pn().wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:e(78,p=B),e(79,m=ie),e(80,g=V);case 3:case"end":return Jn.stop()}},Ke)})),Xv().$$.before_update.push(y),Yc(function(){Ue&&e(2,Le=!0),Le&&N&&N.focus()});var on,kT=n.ariaValues,we=void 0===kT?function(Ke){return"Option ".concat(Ke,", selected.")}:kT,at=n.ariaListOpen,Mt=void 0===at?function(Ke,Jn){return"You are currently focused on option ".concat(Ke,". There are ").concat(Jn," results available.")}:at,Xt=n.ariaFocused,nn=void 0===Xt?function(){return"Select is focused, type to refine list, press down to open the menu."}:Xt,Bn=null;function si(){clearTimeout(on),on=setTimeout(function(){ui=!1},100)}Hu(function(){var Ke;null===(Ke=Bn)||void 0===Ke||Ke.remove()});var ui=!1;function No(Ke){Ke&&!1!==Ke.selectable&&function(Jn){if(Jn){e(4,ie="");var Qi=Object.assign({},Jn);if(Qi.groupHeader&&!Qi.selectable)return;e(3,B=V?B?B.concat([Qi]):[Qi]:e(3,B=Qi)),setTimeout(function(){Hr&&yd(),e(26,f=void 0),L("change",B),L("select",Jn)})}}(Ke)}function Os(Ke){ui||e(7,$n=Ke)}function Yo(Ke){var Gs,Jn=Ke.item,Qi=Ke.i;if(!1!==Jn?.selectable){if(B&&!V&&B[On]===Jn[On])return yd();((Gs=Jn).groupHeader&&Gs.selectable||Gs.selectable||!Gs.hasOwnProperty("selectable"))&&(e(7,$n=Qi),No(Jn)),hx=!1}}function yo(Ke){if(0===c.filter(function(Qi){return!Object.hasOwn(Qi,"selectable")||!0===Qi.selectable}).length)return e(7,$n=0);e(7,Ke>0&&$n===c.length-1?$n=0:Ke<0&&0===$n?$n=c.length-1:$n+=Ke);var Jn=c[$n];Jn&&!1===Jn.selectable&&(1!==Ke&&-1!==Ke||yo(Ke))}var Al=_d,Sh=_d;function _d(Ke){return{update:function(Jn){Jn.scroll&&(si(),Ke.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Ar={strategy:"absolute",placement:"bottom-start",middleware:[VXe(ii),BXe(),UXe()],autoUpdate:!1},Kl=zn(function YXe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Qe(Qe(Qe({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Qe({platform:WXe},d),p=Qe(Qe({},f.platform),{},{_c:h}),NXe(c,u,Qe(Qe({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Hu(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function qXe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(ri(td(t)?yb(t):t.contextElement?yb(t.contextElement):[]),ri(yb(n))):[];p.forEach(function(b){f&&b.addEventListener("scroll",e,{passive:!0}),l&&b.addEventListener("resize",e)});var m,g=null;if(u){var v=!0;g=new ResizeObserver(function(){v||e(),v=!1}),td(t)&&!h&&g.observe(t),td(t)||!t.contextElement||h||g.observe(t.contextElement),g.observe(n)}var y=h?sg(t):null;return h&&function b(){var C=sg(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,m=requestAnimationFrame(b)}(),e(),function(){var b;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(b=g)||b.disconnect(),g=null,h&&cancelAnimationFrame(m)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Ar),3),mu=Kl[0],bd=Kl[1],kh=Kl[2],xd=!0,hx=!1;return t.$$set=function(Ke){"justValue"in Ke&&e(53,R=Ke.justValue),"filter"in Ke&&e(54,G=Ke.filter),"getItems"in Ke&&e(55,te=Ke.getItems),"id"in Ke&&e(56,W=Ke.id),"name"in Ke&&e(8,H=Ke.name),"container"in Ke&&e(0,E=Ke.container),"input"in Ke&&e(1,N=Ke.input),"multiple"in Ke&&e(9,V=Ke.multiple),"multiFullItemClearable"in Ke&&e(10,he=Ke.multiFullItemClearable),"disabled"in Ke&&e(11,_e=Ke.disabled),"focused"in Ke&&e(2,Le=Ke.focused),"value"in Ke&&e(3,B=Ke.value),"filterText"in Ke&&e(4,ie=Ke.filterText),"placeholder"in Ke&&e(57,Ye=Ke.placeholder),"placeholderAlwaysShow"in Ke&&e(58,yt=Ke.placeholderAlwaysShow),"items"in Ke&&e(52,fn=Ke.items),"label"in Ke&&e(12,Zt=Ke.label),"itemFilter"in Ke&&e(59,ln=Ke.itemFilter),"groupBy"in Ke&&e(60,wr=Ke.groupBy),"groupFilter"in Ke&&e(61,mr=Ke.groupFilter),"groupHeaderSelectable"in Ke&&e(62,Vr=Ke.groupHeaderSelectable),"itemId"in Ke&&e(13,On=Ke.itemId),"loadOptions"in Ke&&e(63,ai=Ke.loadOptions),"containerStyles"in Ke&&e(14,Cr=Ke.containerStyles),"hasError"in Ke&&e(15,qo=Ke.hasError),"filterSelectedItems"in Ke&&e(64,In=Ke.filterSelectedItems),"required"in Ke&&e(16,vi=Ke.required),"closeListOnChange"in Ke&&e(65,Hr=Ke.closeListOnChange),"createGroupHeaderItem"in Ke&&e(66,Us=Ke.createGroupHeaderItem),"searchable"in Ke&&e(17,zs=Ke.searchable),"inputStyles"in Ke&&e(18,qa=Ke.inputStyles),"clearable"in Ke&&e(68,xe=Ke.clearable),"loading"in Ke&&e(5,We=Ke.loading),"listOpen"in Ke&&e(6,Ue=Ke.listOpen),"debounce"in Ke&&e(69,ni=Ke.debounce),"debounceWait"in Ke&&e(70,li=Ke.debounceWait),"hideEmptyState"in Ke&&e(19,qr=Ke.hideEmptyState),"inputAttributes"in Ke&&e(71,vr=Ke.inputAttributes),"listAutoWidth"in Ke&&e(72,kt=Ke.listAutoWidth),"showChevron"in Ke&&e(20,rn=Ke.showChevron),"listOffset"in Ke&&e(73,ii=Ke.listOffset),"hoverItemIndex"in Ke&&e(7,$n=Ke.hoverItemIndex),"floatingConfig"in Ke&&e(74,Xn=Ke.floatingConfig),"class"in Ke&&e(21,Er=Ke.class),"ariaValues"in Ke&&e(75,we=Ke.ariaValues),"ariaListOpen"in Ke&&e(76,Mt=Ke.ariaListOpen),"ariaFocused"in Ke&&e(77,nn=Ke.ariaFocused),"$$scope"in Ke&&e(82,k=Ke.$$scope)},t.$$.update=function(){var Ke,Jn,Qi,Gs,wd,jr;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&B&&function(){if("string"==typeof B){var jr,Ws=(fn||[]).find(function(gu){return gu[On]===B});e(3,B=Ws||(Ul(jr={},On,B),Ul(jr,"label",B),jr))}else V&&Array.isArray(B)&&B.length>0&&e(3,B=B.map(function(gu){return"string"==typeof gu?{value:gu,label:gu}:gu}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!vr&&zs||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},vr)),W&&e(27,v.id=W,v),zs||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&V&&B&&(Array.isArray(B)?e(3,B=ri(B)):e(3,B=[B])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&g&&!V&&B&&e(3,B=null),520&t.$$.dirty[0]&&V&&B&&B.length>1&&md(),8&t.$$.dirty[0]&&B&&(V?JSON.stringify(B)!==JSON.stringify(p)&&md()&&L("input",B):p&&JSON.stringify(B[On])===JSON.stringify(p[On])||L("input",B)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!B&&V&&p&&L("input",B),6&t.$$.dirty[0]&&!Le&&N&&yd(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&ie!==m&&(ai||0!==ie.length)&&(ai?ni(Ki(pn().mark(function jr(){var Ws;return pn().wrap(function(gu){for(;;)switch(gu.prev=gu.next){case 0:return e(5,We=!0),gu.next=3,te({dispatch:L,loadOptions:ai,convertStringItemsToObjects:ble,filterText:ie});case 3:(Ws=gu.sent)?(e(5,We=Ws.loading),e(6,Ue=Ue?Ws.listOpen:ie.length>0),e(2,Le=Ue&&Ws.focused),e(52,fn=wr?Io(Ws.filteredItems):Ws.filteredItems)):(e(5,We=!1),e(2,Le=!0),e(6,Ue=!0));case 5:case"end":return gu.stop()}},jr)})),li):(e(6,Ue=!0),V&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=G({loadOptions:ai,filterText:ie,items:fn,multiple:V,value:B,itemId:On,groupBy:wr,label:Zt,filterSelectedItems:In,itemFilter:ln,convertStringItemsToObjects:ble,filterGroupedItems:Io})),16777800&t.$$.dirty[0]&&!V&&Ue&&B&&c&&(Ke=c.findIndex(function(jr){return jr[On]===B[On]}),sa(Ke,!0)),576&t.$$.dirty[0]&&Ue&&V&&e(7,$n=0),16&t.$$.dirty[0]&&ie&&e(7,$n=0),128&t.$$.dirty[0]&&L("hoverItem",$n),520&t.$$.dirty[0]&&e(25,i=V?B&&B.length>0:B),33554448&t.$$.dirty[0]&&e(35,r=i&&ie.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&xe&&!_e&&!We),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=yt&&V||V&&0===(null===(Jn=B)||void 0===Jn?void 0:Jn.length)?Ye:B?"":Ye),520&t.$$.dirty[0]&&e(32,a=B?(Qi=V&&B.length>0?B.map(function(jr){return jr[Zt]}).join(", "):B[Zt],we(Qi)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var jr=c[$n];return Ue&&jr?Mt(jr[Zt],c?c.length:0):nn()}()),2097152&t.$$.dirty[1]&&(jr=fn)&&0!==jr.length&&!jr.some(function(Ws){return"object"!==gn(Ws)})&&B&&(V?!B.some(function(Ws){return!Ws||!Ws[On]}):B[On])&&(Array.isArray(B)?e(3,B=B.map(function(Ws){return pu(Ws)||Ws})):e(3,B=pu()||B)),8712&t.$$.dirty[0]&&e(53,R=V?B?B.map(function(jr){return jr[On]}):null:B&&B[On]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(V||!p||B||L("input",B)),16777800&t.$$.dirty[0]&&Ue&&c&&!V&&!B&&sa(),16777216&t.$$.dirty[0]&&function(jr){Ue&&L("filter",jr)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&E&&void 0===(null===(Gs=Xn)||void 0===Gs?void 0:Gs.autoUpdate)&&e(81,Ar.autoUpdate=!0,Ar),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&E&&Xn&&kh(Object.assign(Ar,Xn)),8388608&t.$$.dirty[0]&&e(30,u=!!Bn),8388672&t.$$.dirty[0]&&function(jr,Ws){if(!jr||!Ws)return e(28,xd=!0);setTimeout(function(){e(28,xd=!1)},0)}(Bn,Ue),8388673&t.$$.dirty[0]&&Ue&&E&&Bn&&(wd=E.getBoundingClientRect().width,e(23,Bn.style.width=kt?wd+"px":"auto",Bn)),128&t.$$.dirty[0]&&e(29,d=$n),70&t.$$.dirty[0]&&N&&Ue&&!Le&&gd()},[E,N,Le,B,ie,We,Ue,$n,H,V,he,_e,Zt,On,Cr,qo,vi,zs,qa,qr,rn,Er,function(){L("clear",B),e(3,B=void 0),yd(),gd()},Bn,c,i,f,v,xd,d,u,l,a,s,o,r,aa,function(Ke){if(Le)switch(Ke.stopPropagation(),Ke.key){case"Escape":Ke.preventDefault(),yd();break;case"Enter":if(Ke.preventDefault(),Ue){if(0===c.length)break;if(B&&!V&&B[On]===c[$n][On]){yd();break}No(c[$n])}break;case"ArrowDown":Ke.preventDefault(),Ue?yo(1):(e(6,Ue=!0),e(26,f=void 0));break;case"ArrowUp":Ke.preventDefault(),Ue?yo(-1):(e(6,Ue=!0),e(26,f=void 0));break;case"Tab":if(Ue&&Le){if(0===c.length||B&&B[On]===c[$n][On])return yd();Ke.preventDefault(),No(c[$n]),yd()}break;case"Backspace":if(!V||ie.length>0)return;if(V&&B&&B.length>0){if(aa(void 0!==f?f:B.length-1),0===f||void 0===f)break;e(26,f=B.length>f?f-1:void 0)}break;case"ArrowLeft":if(!B||!V||ie.length>0)return;void 0===f?e(26,f=B.length-1):B.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!B||!V||ie.length>0||void 0===f)return;f===B.length-1?e(26,f=void 0):f",">="].map(function(W){return{value:W,label:W}}),R=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],U=null!==(i=D)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?sb(D.filter.path):null,G=null!==(o=D)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?z.find(function(W){var J;return W.value===(null===(J=D.filter)||void 0===J?void 0:J.relation)}):null,X=(null===(a=D)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",te=null!==(c=D)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?sb(D.sort.path):null,P=null!==(d=D)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?R.find(function(W){var J;return W.value===(null===(J=D.sort)||void 0===J?void 0:J.direction)}):null;return t.$$set=function(W){"json"in W&&e(11,C=W.json),"queryOptions"in W&&e(10,D=W.queryOptions),"onChange"in W&&e(12,L=W.onChange)},t.$$.update=function(){var W,J,H,le,E,I,N,q,V,re,he,Oe,_e,Xe,Le,rt,B,ne,ie,Me,Ye;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?hP(C):[]),34816&t.$$.dirty&&e(13,m=f?hP(C,!0):[]),16384&t.$$.dirty&&e(7,g=p.map(sb)),8192&t.$$.dirty&&e(6,v=m?m.map(sb):[]),1088&t.$$.dirty&&e(5,y=null!==(W=D)&&void 0!==W&&null!==(J=W.projection)&&void 0!==J&&J.paths&&v?D.projection.paths.map(function(ie){return v.find(function(Me){return ir(Me.value,ie)})}).filter(function(ie){return!!ie}):null),1&t.$$.dirty&&(le=(null===(H=U)||void 0===H?void 0:H.value)||null,ir(null===(E=D)||void 0===E||null===(I=E.filter)||void 0===I?void 0:I.path,le)||(b("changeFilterPath",le),e(10,D=qu(D,["filter","path"],le,!0)),L(D))),2&t.$$.dirty&&(q=(null===(N=G)||void 0===N?void 0:N.value)||null,ir(null===(V=D)||void 0===V||null===(re=V.filter)||void 0===re?void 0:re.relation,q)||(b("changeFilterRelation",q),e(10,D=qu(D,["filter","relation"],q,!0)),L(D))),4&t.$$.dirty&&(ir(null===(Oe=D)||void 0===Oe||null===(_e=Oe.filter)||void 0===_e?void 0:_e.value,he=X||null)||(b("changeFilterValue",he),e(10,D=qu(D,["filter","value"],he,!0)),L(D))),8&t.$$.dirty&&(ie=(null===(Xe=te)||void 0===Xe?void 0:Xe.value)||null,ir(null===(Me=D)||void 0===Me||null===(Ye=Me.sort)||void 0===Ye?void 0:Ye.path,ie)||(b("changeSortPath",ie),e(10,D=qu(D,["sort","path"],ie,!0)),L(D))),16&t.$$.dirty&&(rt=(null===(Le=P)||void 0===Le?void 0:Le.value)||null,ir(null===(B=D)||void 0===B||null===(ne=B.sort)||void 0===ne?void 0:ne.direction,rt)||(b("changeSortDirection",rt),e(10,D=qu(D,["sort","direction"],rt,!0)),L(D))),32&t.$$.dirty&&function(ie){var Me,Ye;ir(null===(Me=D)||void 0===Me||null===(Ye=Me.projection)||void 0===Ye?void 0:Ye.paths,ie)||(b("changeProjectionPaths",ie),e(10,D=qu(D,["projection","paths"],ie,!0)),L(D))}(y?y.map(function(ie){return ie.value}):null)},[U,G,X,te,P,y,v,g,z,R,D,C,L,m,p,f,function(W){e(0,U=W)},function(W){e(1,G=W)},function(){e(2,X=this.value)},function(W){e(3,te=W)},function(W){e(4,P=W)},function(W){e(5,y=W),e(10,D),e(6,v),e(13,m),e(15,f),e(11,C)}]}var TJe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,DJe,kJe,Ti,{json:11,queryOptions:10,onChange:12},SJe),r}return Se(e)}();function EJe(t){di(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function xle(t,n,e){var i=t.slice();return i[5]=n[e],i}function AJe(t){var n,e;return n=new rr({props:{data:cb}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function MJe(t){var n,e;return n=new rr({props:{data:lb}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function wle(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[MJe,AJe],f=[];function p(g,v){return g[5].id===g[0]?0:1}function m(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=ve("button"),i.c(),r=tt(),o=tn(d),s=tt(),j(n,"type","button"),j(n,"class","jse-query-language svelte-19cxesy"),j(n,"title",a="Select ".concat(t[5].name," as query language")),At(n,"selected",t[5].id===t[0])},m:function(g,v){Pe(g,n,v),f[e].m(n,null),ue(n,r),ue(n,o),ue(n,s),l=!0,c||(u=It(n,"click",m),c=!0)},p:function(g,v){var y=e;(e=p(t=g))===y?f[e].p(t,v):(Lt(),ae(f[y],1,1,function(){f[y]=null}),$t(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),K(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&qn(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&j(n,"title",a),(!l||3&v)&&At(n,"selected",t[5].id===t[0])},i:function(g){l||(K(i),l=!0)},o:function(g){ae(i),l=!1},d:function(g){g&&Fe(n),f[e].d(),c=!1,u()}}}function OJe(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&Cle(t);return s=new rr({props:{data:P0}}),{c:function(){n=ve("div"),(e=ve("div")).textContent="Transform",i=tt(),u&&u.c(),r=tt(),o=ve("button"),ft(s.$$.fragment),j(e,"class","jse-title svelte-d01h2s"),j(o,"type","button"),j(o,"class","jse-close svelte-d01h2s"),j(n,"class","jse-header svelte-d01h2s")},m:function(d,h){Pe(d,n,h),ue(n,e),ue(n,i),u&&u.m(n,null),ue(n,r),ue(n,o),dt(s,o,null),a=!0,l||(c=It(o,"click",t[2]),l=!0)},p:function(d,h){var f=zn(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&K(u,1)):((u=Cle(d)).c(),K(u,1),u.m(n,r)):u&&(Lt(),ae(u,1,1,function(){u=null}),$t())},i:function(d){a||(K(u),K(s.$$.fragment,d),a=!0)},o:function(d){ae(u),ae(s.$$.fragment,d),a=!1},d:function(d){d&&Fe(n),u&&u.d(),ht(s),l=!1,c()}}}function jJe(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=_a("simple-modal").close,c=_a("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(NJe,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){Hi[h?"unshift":"push"](function(){e(1,i=h)})}]}var RJe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,jJe,PJe,Ti,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},FJe),r}return Se(e)}(),XP=ba("jsoneditor:AutoScrollHandler"),LJe=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},Sle=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function m(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function g(v){c||(c=v),m(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||LJe,s=y.a11y||!1,gn(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),gn(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,gn(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(g)}},Tk=ba("jsoneditor:History");function kle(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){Tk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){Tk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,Tk("undo",h),a(),h}},redo:function d(){if(o())return Tk("redo",e[i-=1]),a(),e[i]}}}function R0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var L0=ba("validation");function Dle(t,n,e,i){return L0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function $Je(t,n,e,i){if(L0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Jd.info}]};if(0===t.length)return null;try{var r=R0(function(){return e.parse(t)},function(l){return L0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:R0(function(){return i.parse(t)},function(l){return L0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=R0(function(){return n(o)},function(l){return L0("validate: validated json in ".concat(l," ms"))});return Ui(s)?null:{validationErrors:s}}catch(l){var a=R0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Kd(c)),!0}catch{return!1}}(t,e)},function(c){return L0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:sk(t,l.message||l.toString()),isRepairable:a}}}var Ek=ba("jsoneditor:FocusTracker");function JP(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(Ek("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){Ek("blur"),l=!1,a()}))}(0,t.onMount)(function(){Ek("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){Ek("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function BJe(t){di(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function Tle(t,n,e){var i=t.slice();return i[8]=n[e],i}function Ele(t){var n,e;return n=new rr({props:{data:t[1]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Ale(t){var n,e;return n=new rr({props:{data:t[8].icon}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Mle(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&Ale(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=ve("button"),d&&d.c(),e=tt(),i=tn(u),r=tt(),j(n,"type","button"),j(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),j(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,m){Pe(p,n,m),d&&d.m(n,null),ue(n,e),ue(n,i),ue(n,r),a=!0,l||(c=[It(n,"click",h),It(n,"mousedown",f)],l=!0)},p:function(p,m){(t=p)[8].icon?d?(d.p(t,m),8&m&&K(d,1)):((d=Ale(t)).c(),K(d,1),d.m(n,e)):d&&(Lt(),ae(d,1,1,function(){d=null}),$t()),(!a||8&m)&&u!==(u=t[8].text+"")&&qn(i,u),(!a||8&m&&o!==(o=t[8].title))&&j(n,"title",o),(!a||8&m&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(K(d),a=!0)},o:function(p){ae(d),a=!1},d:function(p){p&&Fe(n),d&&d.d(),l=!1,so(c)}}}function VJe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&Ele(t),f=t[3],p=[],m=0;m100&&Ple(t);return{c:function(){n=ve("table"),e=ve("tbody");for(var u=0;u100?c?c.p(u,d):((c=Ple(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&Nle(t);function y(){return t[6](t[7])}return{c:function(){n=ve("tr"),e=ve("td"),ft(i.$$.fragment),r=tt(),o=ve("td"),s=tn(m),a=tt(),l=ve("td"),c=tn(g),u=tt(),d=ve("td"),v&&v.c(),j(e,"class","jse-validation-error-icon svelte-1oe8e8r"),j(o,"class","svelte-1oe8e8r"),j(l,"class","svelte-1oe8e8r"),j(d,"class","jse-validation-error-action svelte-1oe8e8r"),j(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(b,C){Pe(b,n,C),ue(n,e),dt(i,e,null),ue(n,r),ue(n,o),ue(o,s),ue(n,a),ue(n,l),ue(l,c),ue(n,u),ue(n,d),v&&v.m(d,null),h=!0,f||(p=It(n,"click",y),f=!0)},p:function(b,C){t=b,(!h||1&C)&&m!==(m=iu(ql(t[7].path))+"")&&qn(s,m),(!h||1&C)&&g!==(g=t[7].message+"")&&qn(c,g),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&K(v,1)):((v=Nle(t)).c(),K(v,1),v.m(d,null)):v&&(Lt(),ae(v,1,1,function(){v=null}),$t())},i:function(b){h||(K(i.$$.fragment,b),K(v),h=!0)},o:function(b){ae(i.$$.fragment,b),ae(v),h=!1},d:function(b){b&&Fe(n),ht(i),v&&v.d(),f=!1,p()}}}function Ple(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=ve("tr"),e=ve("td"),i=tt(),r=ve("td"),o=tt(),s=ve("td"),a=tn("(and "),l=tn(h),c=tn(" more errors)"),u=tt(),d=ve("td"),j(e,"class","svelte-1oe8e8r"),j(r,"class","svelte-1oe8e8r"),j(s,"class","svelte-1oe8e8r"),j(d,"class","svelte-1oe8e8r"),j(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){Pe(f,n,p),ue(n,e),ue(n,i),ue(n,r),ue(n,o),ue(n,s),ue(s,a),ue(s,l),ue(s,c),ue(n,u),ue(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&qn(l,h)},d:function(f){f&&Fe(n)}}}function WJe(t){var n,e,i=!Ui(t[0]),r=i&&Ile(t);return{c:function(){r&&r.c(),n=br()},m:function(o,s){r&&r.m(o,s),Pe(o,n,s),e=!0},p:function(o,s){var a=zn(s,1)[0];1&a&&(i=!Ui(o[0])),i?r?(r.p(o,a),1&a&&K(r,1)):((r=Ile(o)).c(),K(r,1),r.m(n.parentNode,n)):r&&(Lt(),ae(r,1,1,function(){r=null}),$t())},i:function(o){e||(K(r),e=!0)},o:function(o){ae(r),e=!1},d:function(o){r&&r.d(o),o&&Fe(n)}}}function qJe(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var KP=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,qJe,WJe,Ti,{validationErrors:0,selectError:1},UJe),r}return Se(e)}(),YJe=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function XJe(t){di(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function JJe(t){var n,e,i,r,o,s,a,l,c;return s=new rr({props:{data:P0}}),{c:function(){n=ve("div"),e=ve("div"),i=tn(t[0]),r=tt(),o=ve("button"),ft(s.$$.fragment),j(e,"class","jse-title svelte-d01h2s"),j(o,"type","button"),j(o,"class","jse-close svelte-d01h2s"),j(n,"class","jse-header svelte-d01h2s")},m:function(u,d){Pe(u,n,d),ue(n,e),ue(e,i),ue(n,r),ue(n,o),dt(s,o,null),a=!0,l||(c=It(o,"click",t[3]),l=!0)},p:function(u,d){var h=zn(d,1)[0];(!a||1&h)&&qn(i,u[0])},i:function(u){a||(K(s.$$.fragment,u),a=!0)},o:function(u){ae(s.$$.fragment,u),a=!1},d:function(u){u&&Fe(n),ht(s),l=!1,c()}}}function KJe(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=_a("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var QP=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,KJe,JJe,Ti,{title:0,onClose:1},XJe),r}return Se(e)}();function QJe(t){di(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function ZJe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z;return e=new QP({props:{title:"Copying and pasting"}}),{c:function(){n=ve("div"),ft(e.$$.fragment),i=tt(),r=ve("div"),(o=ve("div")).textContent="These actions are unavailable via the menu. Please use:",s=tt(),a=ve("div"),l=ve("div"),(c=ve("div")).textContent="".concat(t[1],"+C"),u=tn("\n for copy"),d=tt(),h=ve("div"),(f=ve("div")).textContent="".concat(t[1],"+X"),p=tn("\n for cut"),m=tt(),g=ve("div"),(v=ve("div")).textContent="".concat(t[1],"+V"),y=tn("\n for paste"),b=tt(),C=ve("div"),(k=ve("button")).textContent="Close",j(c,"class","jse-key svelte-1olothd"),j(l,"class","jse-shortcut"),j(f,"class","jse-key svelte-1olothd"),j(h,"class","jse-shortcut"),j(v,"class","jse-key svelte-1olothd"),j(g,"class","jse-shortcut"),j(a,"class","jse-shortcuts svelte-1olothd"),j(k,"type","button"),j(k,"class","jse-primary svelte-1olothd"),j(C,"class","jse-actions svelte-1olothd"),j(r,"class","jse-modal-contents svelte-1olothd"),j(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(R,U){Pe(R,n,U),dt(e,n,null),ue(n,i),ue(n,r),ue(r,o),ue(r,s),ue(r,a),ue(a,l),ue(l,c),ue(l,u),ue(a,d),ue(a,h),ue(h,f),ue(h,p),ue(a,m),ue(a,g),ue(g,v),ue(g,y),ue(r,b),ue(r,C),ue(C,k),D=!0,L||(z=It(k,"click",t[0]),L=!0)},p:jt,i:function(R){D||(K(e.$$.fragment,R),D=!0)},o:function(R){ae(e.$$.fragment,R),D=!1},d:function(R){R&&Fe(n),ht(e),L=!1,z()}}}function eKe(t){return[_a("simple-modal").close,YJe?"\u2318":"Ctrl"]}var jle=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,eKe,ZJe,Ti,{},QJe),r}return Se(e)}();function Rle(t){return!!t&&("space"===t.type||!0===t.space)}function Ak(t){return!!t&&("separator"===t.type||!0===t.separator)}function _b(t){return!!t&&"function"==typeof t.onClick}function ZP(t){return!!t&&"dropdown-button"===t.type&&_b(t.main)&&Array.isArray(t.items)}function Lle(t){return To(t)&&To(t.parseError)}function nKe(t){di(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var iKe=function(t){return{}},$le=function(t){return{}};function Ble(t,n,e){var i=t.slice();return i[3]=n[e],i}var rKe=function(t){return{}},Vle=function(t){return{}};function oKe(t){var n,e=Gle(t[3])+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=Gle(i[3])+"")&&qn(n,e)},i:jt,o:jt,d:function(i){i&&Fe(n)}}}function sKe(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&Hle(t),u=t[3].text&&Ule(t);return{c:function(){n=ve("button"),c&&c.c(),e=tt(),u&&u.c(),j(n,"type","button"),j(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),j(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){Pe(d,n,h),c&&c.m(n,null),ue(n,e),u&&u.m(n,null),s=!0,a||(l=It(n,"click",function(){va(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&K(c,1)):((c=Hle(t)).c(),K(c,1),c.m(n,e)):c&&(Lt(),ae(c,1,1,function(){c=null}),$t()),t[3].text?u?u.p(t,h):((u=Ule(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&j(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&j(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(K(c),s=!0)},o:function(d){ae(c),s=!1},d:function(d){d&&Fe(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function aKe(t){var n;return{c:function(){j(n=ve("div"),"class","jse-space svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function lKe(t){var n;return{c:function(){j(n=ve("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function Hle(t){var n,e;return n=new rr({props:{data:t[3].icon}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Ule(t){var n,e=t[3].text+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&qn(n,e)},d:function(i){i&&Fe(n)}}}function zle(t){var n,e,i,r,o,s,a,l=[lKe,aKe,sKe,oKe],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!Ak(d[3])),n?0:(null==e&&(e=!!Rle(d[3])),e?1:(null==i&&(i=!!_b(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=br()},m:function(d,h){c[r].m(d,h),Pe(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):(Lt(),ae(c[f],1,1,function(){c[f]=null}),$t(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),K(o,1),o.m(s.parentNode,s))},i:function(d){a||(K(o),a=!0)},o:function(d){ae(o),a=!1},d:function(d){c[r].d(d),d&&Fe(s)}}}function cKe(t){for(var n,e,i,r,o=t[2].left,s=Ss(o,t,t[1],Vle),a=t[0],l=[],c=0;c0&&b.height>0}),u),c=u(e);function u(y){var b=y.getBoundingClientRect();return{x:b.left+b.width/2,y:b.top+b.height/2,rect:b,element:y}}function d(y,b){var k=y.x-b.x,D=(y.y-b.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(k*k+D*D)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(v0(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(v0(g.filter(function(y){return o(y.element)}),h)||v0(g,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){Hi[a?"unshift":"push"](function(){e(2,i=a)})}]}var lce=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,JKe,XKe,Ti,{items:0,tip:1},NKe),r}return Se(e)}();function KKe(t){var n,e;return n=new lce({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function QKe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L=n.json,z=n.documentState,R=n.parser,U=n.showTip,G=n.onCloseContextMenu,X=n.onEditKey,te=n.onEditValue,P=n.onToggleEnforceString,W=n.onCut,J=n.onCopy,H=n.onPaste,le=n.onRemove,E=n.onDuplicate,I=n.onExtract,N=n.onInsertBefore,q=n.onInsert,V=n.onConvert,re=n.onInsertAfter,he=n.onSort,Oe=n.onTransform;function _e(){G(),X()}function Xe(){G(),te()}function Le(){G(),P()}function rt(){G(),W(!0)}function B(){G(),W(!1)}function ne(){G(),J(!0)}function ie(){G(),J(!1)}function Me(){G(),H()}function Ye(){G(),le()}function je(){G(),E()}function yt(){G(),I()}function Tt(ln){G(),c?V(ln):q(ln)}function fn(){G(),he()}function Hn(){G(),Oe()}function Zt(){G(),N()}function Ei(){G(),re()}return t.$$set=function(ln){"json"in ln&&e(2,L=ln.json),"documentState"in ln&&e(3,z=ln.documentState),"parser"in ln&&e(4,R=ln.parser),"showTip"in ln&&e(0,U=ln.showTip),"onCloseContextMenu"in ln&&e(5,G=ln.onCloseContextMenu),"onEditKey"in ln&&e(6,X=ln.onEditKey),"onEditValue"in ln&&e(7,te=ln.onEditValue),"onToggleEnforceString"in ln&&e(8,P=ln.onToggleEnforceString),"onCut"in ln&&e(9,W=ln.onCut),"onCopy"in ln&&e(10,J=ln.onCopy),"onPaste"in ln&&e(11,H=ln.onPaste),"onRemove"in ln&&e(12,le=ln.onRemove),"onDuplicate"in ln&&e(13,E=ln.onDuplicate),"onExtract"in ln&&e(14,I=ln.onExtract),"onInsertBefore"in ln&&e(15,N=ln.onInsertBefore),"onInsert"in ln&&e(16,q=ln.onInsert),"onConvert"in ln&&e(17,V=ln.onConvert),"onInsertAfter"in ln&&e(18,re=ln.onInsertAfter),"onSort"in ln&&e(19,he=ln.onSort),"onTransform"in ln&&e(20,Oe=ln.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=z.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==L),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Ui(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Sn(L,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":To(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Ir(i)||vs(i)||Yi(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Ir(i)||Yi(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&hb(i)&&!s&&!Array.isArray(Sn(L,qi(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&hb(i)),136&t.$$.dirty[1]&&e(32,p=f&&!$o(a)),4194304&t.$$.dirty[0]&&e(25,m=c),33554432&t.$$.dirty[0]&&e(24,g=m?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!m&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=m?ng(i)&&!To(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,b=m?ng(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=m?ng(i)&&$o(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,k=null!=i&&pf(a,z.enforceStringMap,an(i.focusPath),R)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,D=[{type:"row",items:[{type:"button",onClick:_e,icon:N0,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:Xe,icon:N0,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:N0,text:l,title:"Edit the value (Double-click on the value)",onClick:Xe,disabled:!f},{type:"button",icon:k?lb:cb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:Le,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:rt,icon:I0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:I0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:rt,disabled:!c},{type:"button",icon:I0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:B,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:ne,icon:yp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:yp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:ne,disabled:!c},{type:"button",icon:yp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:ie,disabled:!c}]},{type:"button",onClick:Me,icon:Tae,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:je,icon:Fae,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:yt,icon:TXe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:fn,icon:_k,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:Hn,icon:gk,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Ye,icon:RP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:g},{type:"button",onClick:function(){return Tt("structure")},icon:m?yk:F0,text:"Structure",title:g+" structure",disabled:!v},{type:"button",onClick:function(){return Tt("object")},icon:m?yk:F0,text:"Object",title:g+" structure",disabled:!y},{type:"button",onClick:function(){return Tt("array")},icon:m?yk:F0,text:"Array",title:g+" array",disabled:!b},{type:"button",onClick:function(){return Tt("value")},icon:m?yk:F0,text:"Value",title:g+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:Zt,icon:kXe,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Ei,icon:wXe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[U,D,L,z,R,G,X,te,P,W,J,H,le,E,I,N,q,V,re,he,Oe,s,c,C,g,m,b,y,v,d,u,o,p,k,f,l,h,i,a,r]}var ZKe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,QKe,KKe,Ti,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return Se(e)}();function eQe(t){di(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function cce(t,n,e){var i=t.slice();return i[13]=n[e],i}function uce(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=ve("button"),e=tn("show "),i=tn(c),r=tn("-"),o=tn(u),s=tt(),j(n,"type","button"),j(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){Pe(h,n,f),ue(n,e),ue(n,i),ue(n,r),ue(n,o),ue(n,s),a||(l=It(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&qn(i,c),16&f&&u!==(u=t[13].end+"")&&qn(o,u)},d:function(h){h&&Fe(n),a=!1,l()}}}function tQe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&b.end<=D.start)&&L.push(b),D.start>=(z?b.end:v.end)&&L.push(D),a=L))},[d,p,o,r,a,s,l,c,u,h,f,i,function(m){return p(d,m)}]}var rQe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,iQe,tQe,Ti,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},eQe),r}return Se(e)}();function oQe(t){di(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function sQe(t){var n,e,i,r,o;return e=new rr({props:{data:su}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-context-menu-pointer svelte-1yzl4st"),j(n,"title",uN),At(n,"jse-selected",t[0])},m:function(s,a){Pe(s,n,a),dt(e,n,null),i=!0,r||(o=It(n,"click",t[1]),r=!0)},p:function(s,a){var l=zn(a,1)[0];(!i||1&l)&&At(n,"jse-selected",s[0])},i:function(s){i||(K(e.$$.fragment,s),i=!0)},o:function(s){ae(e.$$.fragment,s),i=!1},d:function(s){s&&Fe(n),ht(e),r=!1,o()}}}function aQe(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var xp=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,aQe,sQe,Ti,{selected:0,onContextMenu:2},oQe),r}return Se(e)}();function lQe(t){di(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function cQe(t){var n,e,i,r,o,s,a,l=[hQe,dQe],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=ve("div"),i.c(),j(n,"data-type","selectable-key"),j(n,"class",r=ko(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){Pe(d,n,h),c[e].m(n,null),o=!0,s||(a=It(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):(Lt(),ae(c[f],1,1,function(){c[f]=null}),$t(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),K(i,1),i.m(n,null)),(!o||1&h&&r!==(r=ko(d[6](d[0]))+" svelte-24a1b2"))&&j(n,"class",r)},i:function(d){o||(K(i),o=!0)},o:function(d){ae(i),o=!1},d:function(d){d&&Fe(n),c[e].d(),s=!1,a()}}}function uQe(t){var n,e;return n=new fae({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function dQe(t){var n,e=eg(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){5&r&&e!==(e=eg(i[2].normalization.escapeValue(i[0]))+"")&&qn(n,e)},i:jt,o:jt,d:function(i){i&&Fe(n)}}}function hQe(t){var n,e;return n=new Dae({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function hce(t){var n,e;return n=new xp({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function fQe(t){var n,e,i,r,o,s=[uQe,cQe],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&hce(t);return{c:function(){e.c(),i=tt(),c&&c.c(),r=br()},m:function(u,d){a[n].m(u,d),Pe(u,i,d),c&&c.m(u,d),Pe(u,r,d),o=!0},p:function(u,d){var h=zn(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):(Lt(),ae(a[f],1,1,function(){a[f]=null}),$t(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),K(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&(Lt(),ae(c,1,1,function(){c=null}),$t()):c?(c.p(u,h),28&h&&K(c,1)):((c=hce(u)).c(),K(c,1),c.m(r.parentNode,r))},i:function(u){o||(K(e),K(c),o=!0)},o:function(u){ae(e),ae(c),o=!1},d:function(u){a[n].d(u),u&&Fe(i),c&&c.d(u),u&&Fe(r)}}}function pQe(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&vs(l):void 0),2056&t.$$.dirty&&e(4,r=i&&mp(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(ou(o,!0)))},function(h){return ch("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),m=qi(o).concat(p);d.onSelect(f===hN?fr(m,!1):ou(m,!1)),f!==dN&&d.focus()},function(){d.onSelect(ou(o,!1)),d.focus()},o,s,l,u]}var mQe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,pQe,fQe,Ti,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},lQe),r}return Se(e)}();function fce(t,n,e){var i=t.slice();return i[8]=n[e],i}function pce(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+g()/2;)y+=g(),v-=1;return v!==m&&void 0!==d[v]?{beforePath:d[v].path,offset:v-m}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,m=u.deltaY,g=fk(u.selection),v=f.findIndex(function(U){return ir(U.path,g)}),y=0,b=v,C=function(){var U;return null===(U=f[b+1])||void 0===U?void 0:U.height};void 0!==C()&&Math.abs(m)>y+C()/2;)y+=C(),b+=1;var D=Sn(h,qi(g)),L=Array.isArray(D),z=null===(d=f[L?b:b+1])||void 0===d?void 0:d.path,R=b-v;return z?{beforePath:z,offset:R}:{append:!0,offset:R}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,m,g,v,y,b,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,m=qi(d.focusPath),g=Sn(u,m);if(!(p||f&&A0(f,m)&&f.length>m.length))return[];var v=D0(d),y=fk(d),b=Fn(v),C=Fn(y),k=f?f[m.length]:void 0;if(!Do(g)){if(eo(g)){var D=Bs(b),L=Bs(C),z=void 0!==k?Bs(k):g.length;return sP(L-D+1,zU?[].concat(ri(R.slice(U,G+1)),ri(R.slice(X,R.length))).map(function(te){return ig(m,te)}):[].concat(ri(R.slice(X,U)),ri(R.slice(G+1,R.length))).map(function(te){return ig(m,te)}):[]}(n,o,s),l=Sn(n,qi(D0(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,g=u.offset,v=D0(m=u.selection),y=fk(m),b=f.findIndex(function(L){return ir(L.path,v)}),C=f.findIndex(function(L){return ir(L.path,y)}),Es(p,null===(d=f[b+g])||void 0===d?void 0:d.path,null===(h=f[C+g])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function hh(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return Zv(e,n)})}function bQe(t){di(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function xQe(t){var n,e,i,r,o,s;return e=new rr({props:{data:rg}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){Pe(a,n,l),dt(e,n,null),r=!0,o||(s=[It(n,"click",function(){va(t[0])&&t[0].apply(this,arguments)}),ya(i=jP.call(null,n,Qe({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=zn(l,1)[0];t=a,i&&va(i.update)&&2&c&&i.update.call(null,Qe({text:t[1]},t[2]))},i:function(a){r||(K(e.$$.fragment,a),r=!0)},o:function(a){ae(e.$$.fragment,a),r=!1},d:function(a){a&&Fe(n),ht(e),o=!1,so(s)}}}function wQe(t,n,e){var i,r=_a("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var V0=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,wQe,xQe,ps,{validationError:3,onExpand:0},bQe),r}return Se(e)}();function CQe(t){di(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var SQe=function(t){return{}},mce=function(t){return{}};function gce(t,n,e){var i=t.slice();return i[53]=n[e],i}var kQe=function(t){return{}},vce=function(t){return{}};function yce(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function _ce(t,n,e){var i=t.slice();return i[50]=n[e],i}var DQe=function(t){return{}},bce=function(t){return{}};function TQe(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Ir(t[7]))&&!t[7].edit&&ir(t[7].focusPath,t[1]),d=t[34].identifier,h=Ss(d,t,t[35],mce),f=!t[17]&&xce();o=new _Qe({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:Cae(t[6],t[9]),context:t[8]}});var p=u&&wce(t),m=t[15]&&Cce(t),g=!t[17]&&Sce(t);return{c:function(){n=ve("div"),e=ve("div"),h&&h.c(),i=tt(),f&&f.c(),r=tt(),ft(o.$$.fragment),s=tt(),p&&p.c(),a=tt(),m&&m.c(),l=tt(),g&&g.c(),j(e,"class","jse-contents svelte-1wlxti1"),j(n,"class","jse-contents-outer svelte-1wlxti1"),j(n,"style",t[18])},m:function(v,y){Pe(v,n,y),ue(n,e),h&&h.m(e,null),ue(e,i),f&&f.m(e,null),ue(e,r),dt(o,e,null),ue(e,s),p&&p.m(e,null),ue(n,a),m&&m.m(n,null),ue(n,l),g&&g.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Ds(h,d,v,v[35],c?ks(d,v[35],y,SQe):Ts(v[35]),mce),v[17]?f&&(f.d(1),f=null):f||((f=xce()).c(),f.m(e,r));var b={};2&y[0]&&(b.path=v[1]),1&y[0]&&(b.value=v[0]),8192&y[0]&&(b.enforceString=v[13]),65664&y[0]&&(b.selection=v[16]?v[7]:void 0),576&y[0]&&(b.searchResultItems=Cae(v[6],v[9])),256&y[0]&&(b.context=v[8]),o.$set(b),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Yi(v[7])||Ir(v[7]))&&!v[7].edit&&ir(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&K(p,1)):((p=wce(v)).c(),K(p,1),p.m(e,null)):p&&(Lt(),ae(p,1,1,function(){p=null}),$t()),v[15]?m?(m.p(v,y),32768&y[0]&&K(m,1)):((m=Cce(v)).c(),K(m,1),m.m(n,l)):m&&(Lt(),ae(m,1,1,function(){m=null}),$t()),v[17]?g&&(g.d(1),g=null):g?g.p(v,y):((g=Sce(v)).c(),g.m(n,null)),(!c||262144&y[0])&&j(n,"style",v[18])},i:function(v){c||(K(h,v),K(o.$$.fragment,v),K(p),K(m),c=!0)},o:function(v){ae(h,v),ae(o.$$.fragment,v),ae(p),ae(m),c=!1},d:function(v){v&&Fe(n),h&&h.d(v),f&&f.d(),ht(o),p&&p.d(),m&&m.d(),g&&g.d()}}}function EQe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Ir(t[7]))&&!t[7].edit&&ir(t[7].focusPath,t[1]),C=[OQe,MQe],k=[];function D(E,I){return E[12]?0:1}r=D(t),o=k[r]=C[r](t);var L=t[34].identifier,z=Ss(L,t,t[35],vce),R=!t[17]&&kce();function U(E,I){return E[12]?NQe:IQe}var G=U(t),X=G(t),te=b&&Dce(t),P=t[15]&&(!t[12]||!t[15].isChildError)&&Tce(t);function W(E,I){return E[12]?PQe:E[17]?void 0:FQe}var J=W(t),H=J&&J(t),le=t[12]&&Ece(t);return{c:function(){n=ve("div"),e=ve("div"),i=ve("button"),o.c(),s=tt(),z&&z.c(),a=tt(),R&&R.c(),l=tt(),c=ve("div"),u=ve("div"),X.c(),d=tt(),te&&te.c(),h=tt(),P&&P.c(),f=tt(),H&&H.c(),p=tt(),le&&le.c(),m=br(),j(i,"type","button"),j(i,"class","jse-expand svelte-1wlxti1"),j(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),j(u,"class","jse-meta-inner svelte-1wlxti1"),j(c,"class","jse-meta svelte-1wlxti1"),j(c,"data-type","selectable-value"),j(e,"class","jse-header svelte-1wlxti1"),j(n,"class","jse-header-outer svelte-1wlxti1"),j(n,"style",t[18])},m:function(E,I){Pe(E,n,I),ue(n,e),ue(e,i),k[r].m(i,null),ue(e,s),z&&z.m(e,null),ue(e,a),R&&R.m(e,null),ue(e,l),ue(e,c),ue(c,u),X.m(u,null),ue(e,d),te&&te.m(e,null),ue(n,h),P&&P.m(n,null),ue(n,f),H&&H.m(n,null),Pe(E,p,I),le&&le.m(E,I),Pe(E,m,I),g=!0,v||(y=It(i,"click",t[21]),v=!0)},p:function(E,I){var N=r;(r=D(E))===N?k[r].p(E,I):(Lt(),ae(k[N],1,1,function(){k[N]=null}),$t(),(o=k[r])?o.p(E,I):(o=k[r]=C[r](E)).c(),K(o,1),o.m(i,null)),z&&z.p&&(!g||16&I[1])&&Ds(z,L,E,E[35],g?ks(L,E[35],I,kQe):Ts(E[35]),vce),E[17]?R&&(R.d(1),R=null):R||((R=kce()).c(),R.m(e,l)),G===(G=U(E))&&X?X.p(E,I):(X.d(1),(X=G(E))&&(X.c(),X.m(u,null))),65922&I[0]&&(b=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Ir(E[7]))&&!E[7].edit&&ir(E[7].focusPath,E[1])),b?te?(te.p(E,I),65922&I[0]&&K(te,1)):((te=Dce(E)).c(),K(te,1),te.m(e,null)):te&&(Lt(),ae(te,1,1,function(){te=null}),$t()),!E[15]||E[12]&&E[15].isChildError?P&&(Lt(),ae(P,1,1,function(){P=null}),$t()):P?(P.p(E,I),36864&I[0]&&K(P,1)):((P=Tce(E)).c(),K(P,1),P.m(n,f)),J===(J=W(E))&&H?H.p(E,I):(H&&H.d(1),(H=J&&J(E))&&(H.c(),H.m(n,null))),(!g||262144&I[0])&&j(n,"style",E[18]),E[12]?le?(le.p(E,I),4096&I[0]&&K(le,1)):((le=Ece(E)).c(),K(le,1),le.m(m.parentNode,m)):le&&(Lt(),ae(le,1,1,function(){le=null}),$t())},i:function(E){g||(K(o),K(z,E),K(te),K(P),K(le),g=!0)},o:function(E){ae(o),ae(z,E),ae(te),ae(P),ae(le),g=!1},d:function(E){E&&Fe(n),k[r].d(),z&&z.d(E),R&&R.d(),X.d(),te&&te.d(),P&&P.d(),H&&H.d(),E&&Fe(p),le&&le.d(E),E&&Fe(m),v=!1,y()}}}function AQe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Ir(t[7]))&&!t[7].edit&&ir(t[7].focusPath,t[1]),C=[LQe,RQe],k=[];function D(E,I){return E[12]?0:1}r=D(t),o=k[r]=C[r](t);var L=t[34].identifier,z=Ss(L,t,t[35],bce),R=!t[17]&&Ice();function U(E,I){return E[12]?BQe:$Qe}var G=U(t),X=G(t),te=b&&Nce(t),P=t[15]&&(!t[12]||!t[15].isChildError)&&Fce(t);function W(E,I){return E[12]?HQe:VQe}var J=W(t),H=J(t),le=t[12]&&Pce(t);return{c:function(){n=ve("div"),e=ve("div"),i=ve("button"),o.c(),s=tt(),z&&z.c(),a=tt(),R&&R.c(),l=tt(),c=ve("div"),u=ve("div"),X.c(),d=tt(),te&&te.c(),h=tt(),P&&P.c(),f=tt(),H.c(),p=tt(),le&&le.c(),m=br(),j(i,"type","button"),j(i,"class","jse-expand svelte-1wlxti1"),j(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),j(u,"class","jse-meta-inner svelte-1wlxti1"),j(u,"data-type","selectable-value"),j(c,"class","jse-meta svelte-1wlxti1"),j(e,"class","jse-header svelte-1wlxti1"),j(n,"class","jse-header-outer svelte-1wlxti1"),j(n,"style",t[18])},m:function(E,I){Pe(E,n,I),ue(n,e),ue(e,i),k[r].m(i,null),ue(e,s),z&&z.m(e,null),ue(e,a),R&&R.m(e,null),ue(e,l),ue(e,c),ue(c,u),X.m(u,null),ue(e,d),te&&te.m(e,null),ue(n,h),P&&P.m(n,null),ue(n,f),H.m(n,null),Pe(E,p,I),le&&le.m(E,I),Pe(E,m,I),g=!0,v||(y=It(i,"click",t[21]),v=!0)},p:function(E,I){var N=r;(r=D(E))===N?k[r].p(E,I):(Lt(),ae(k[N],1,1,function(){k[N]=null}),$t(),(o=k[r])?o.p(E,I):(o=k[r]=C[r](E)).c(),K(o,1),o.m(i,null)),z&&z.p&&(!g||16&I[1])&&Ds(z,L,E,E[35],g?ks(L,E[35],I,DQe):Ts(E[35]),bce),E[17]?R&&(R.d(1),R=null):R||((R=Ice()).c(),R.m(e,l)),G===(G=U(E))&&X?X.p(E,I):(X.d(1),(X=G(E))&&(X.c(),X.m(u,null))),65922&I[0]&&(b=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Ir(E[7]))&&!E[7].edit&&ir(E[7].focusPath,E[1])),b?te?(te.p(E,I),65922&I[0]&&K(te,1)):((te=Nce(E)).c(),K(te,1),te.m(e,null)):te&&(Lt(),ae(te,1,1,function(){te=null}),$t()),!E[15]||E[12]&&E[15].isChildError?P&&(Lt(),ae(P,1,1,function(){P=null}),$t()):P?(P.p(E,I),36864&I[0]&&K(P,1)):((P=Fce(E)).c(),K(P,1),P.m(n,f)),J===(J=W(E))&&H?H.p(E,I):(H.d(1),(H=J(E))&&(H.c(),H.m(n,null))),(!g||262144&I[0])&&j(n,"style",E[18]),E[12]?le?(le.p(E,I),4096&I[0]&&K(le,1)):((le=Pce(E)).c(),K(le,1),le.m(m.parentNode,m)):le&&(Lt(),ae(le,1,1,function(){le=null}),$t())},i:function(E){g||(K(o),K(z,E),K(te),K(P),K(le),g=!0)},o:function(E){ae(o),ae(z,E),ae(te),ae(P),ae(le),g=!1},d:function(E){E&&Fe(n),k[r].d(),z&&z.d(E),R&&R.d(),X.d(),te&&te.d(),P&&P.d(),H.d(),E&&Fe(p),le&&le.d(E),E&&Fe(m),v=!1,y()}}}function xce(t){var n;return{c:function(){(n=ve("div")).textContent=":",j(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&Fe(n)}}}function wce(t){var n,e,i;return e=new xp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=ve("div"),ft(e.$$.fragment),j(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),dt(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(K(e.$$.fragment,r),i=!0)},o:function(r){ae(e.$$.fragment,r),i=!1},d:function(r){r&&Fe(n),ht(e)}}}function Cce(t){var n,e;return n=new V0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Sce(t){var n,e,i;return{c:function(){j(n=ve("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),j(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=It(n,"click",t[30]),e=!0)},p:jt,d:function(r){r&&Fe(n),e=!1,i()}}}function MQe(t){var n,e;return n=new rr({props:{data:gp}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function OQe(t){var n,e;return n=new rr({props:{data:su}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function kce(t){var n;return{c:function(){(n=ve("div")).textContent=":",j(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&Fe(n)}}}function IQe(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=ve("div")).textContent="{",e=tt(),i=ve("button"),r=tn(d),o=tt(),s=tn(h),a=tt(),(l=ve("div")).textContent="}",j(n,"class","jse-bracket svelte-1wlxti1"),j(i,"type","button"),j(i,"class","jse-tag svelte-1wlxti1"),j(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){Pe(f,n,p),Pe(f,e,p),Pe(f,i,p),ue(i,r),ue(i,o),ue(i,s),Pe(f,a,p),Pe(f,l,p),c||(u=It(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&qn(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&qn(s,h)},d:function(f){f&&Fe(n),f&&Fe(e),f&&Fe(i),f&&Fe(a),f&&Fe(l),c=!1,u()}}}function NQe(t){var n;return{c:function(){(n=ve("div")).textContent="{",j(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},p:jt,d:function(e){e&&Fe(n)}}}function Dce(t){var n,e,i;return e=new xp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=ve("div"),ft(e.$$.fragment),j(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),dt(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(K(e.$$.fragment,r),i=!0)},o:function(r){ae(e.$$.fragment,r),i=!1},d:function(r){r&&Fe(n),ht(e)}}}function Tce(t){var n,e;return n=new V0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function FQe(t){var n,e,i;return{c:function(){j(n=ve("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),j(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=It(n,"click",t[30]),e=!0)},p:jt,d:function(r){r&&Fe(n),e=!1,i()}}}function PQe(t){var n,e,i;return{c:function(){j(n=ve("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),j(n,"data-type","insert-selection-area-inside")},m:function(r,o){Pe(r,n,o),e||(i=It(n,"click",t[29]),e=!0)},p:jt,d:function(r){r&&Fe(n),e=!1,i()}}}function Ece(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&Hs(t[7])),c=l&&Ace(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=tt(),p&&p.c(),j(n,"class","jse-props svelte-1wlxti1"),j(o,"data-type","selectable-value"),j(o,"class","jse-footer svelte-1wlxti1"),j(r,"class","jse-footer-outer svelte-1wlxti1"),j(r,"style",t[18])},m:function(m,g){Pe(m,n,g),c&&c.m(n,null),ue(n,e);for(var v=0;v]',s=tt(),v&&v.c(),j(n,"class","jse-items svelte-1wlxti1"),j(o,"data-type","selectable-value"),j(o,"class","jse-footer svelte-1wlxti1"),j(r,"class","jse-footer-outer svelte-1wlxti1"),j(r,"style",t[18])},m:function(y,b){Pe(y,n,b),d&&d.m(n,null),ue(n,e);for(var C=0;C=je.start&&ne<=je.end});if(!ie)return null;fse(ie.start,Math.min(p.length,ie.end),function(je){return Xe(String(je))})}else Object.keys(p).forEach(Xe);return _e}(k,l||Bm);if(z("dragSelectionStart",{selection:k,items:N}),N){var q=D0(k),V=N.findIndex(function(he){return ir(he.path,q)}),re=nj({json:D.getJson(),documentState:D.getDocumentState(),deltaY:0,items:N}).offset;e(11,G={initialTarget:E.target,initialClientY:E.clientY,initialContentTop:W(),selectionStartIndex:V,selectionItemsCount:uae(k).length,items:N,offset:re,didMoveItems:!1}),ra.dragging=!0,document.addEventListener("mousemove",H,!0),document.addEventListener("mouseup",le)}else z("Cannot drag the current selection (probably spread over multiple sections)")}else L(E)}},function(E){ra.selecting||ra.dragging||(E.stopPropagation(),tg(E.target,"data-type","selectable-value")?e(10,R="hover-collection"):tg(E.target,"data-type","insert-selection-area-inside")?e(10,R="hover-insert-inside"):tg(E.target,"data-type","insert-selection-area-after")&&e(10,R="hover-insert-after"),clearTimeout(U))},function(E){E.stopPropagation(),U=setTimeout(function(){return e(10,R=void 0)})},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),D.onSelect(mf(m)))},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),D.onSelect(gf(m)))},function(E){D.onSelect(mf(m)),D.onContextMenu(E)},function(E){D.onSelect(gf(m)),D.onContextMenu(E)},L,h,f]}var ij=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,GQe,zQe,Ti,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},CQe,[-1,-1]),r}return Se(e)}(),WQe=ij,qQe={prefix:"fas",iconName:"jsoneditor-expand",icon:[512,512,[],"","M 0,448 V 512 h 512 v -64 z M 0,0 V 64 H 512 V 0 Z M 256,96 128,224 h 256 z M 256,416 384,288 H 128 Z"]},YQe={prefix:"fas",iconName:"jsoneditor-collapse",icon:[512,512,[],"","m 0,224 v 64 h 512 v -64 z M 256,192 384,64 H 128 Z M 256,320 128,448 h 256 z"]},rj={prefix:"fas",iconName:"jsoneditor-format",icon:[512,512,[],"","M 0,32 v 64 h 416 v -64 z M 160,160 v 64 h 352 v -64 z M 160,288 v 64 h 288 v -64 z M 0,416 v 64 h 320 v -64 z"]},XQe={prefix:"fas",iconName:"jsoneditor-compact",icon:[512,512,[],"","M 0,32 v 64 h 512 v -64 z M 0,160 v 64 h 512 v -64 z M 0,288 v 64 h 352 v -64 z"]};function JQe(t){var n,e;return n=new Mk({props:{items:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&zn(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function KQe(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,m=n.historyState,g=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,b=n.onRedo,C=n.onSort,k=n.onTransform,D=n.onContextMenu,L=n.onCopy,z=n.onRenderMenu;function R(){e(1,p=!p)}return t.$$set=function(U){"json"in U&&e(2,u=U.json),"selection"in U&&e(3,d=U.selection),"readOnly"in U&&e(4,h=U.readOnly),"showSearch"in U&&e(1,p=U.showSearch),"historyState"in U&&e(5,m=U.historyState),"onExpandAll"in U&&e(6,g=U.onExpandAll),"onCollapseAll"in U&&e(7,v=U.onCollapseAll),"onUndo"in U&&e(8,y=U.onUndo),"onRedo"in U&&e(9,b=U.onRedo),"onSort"in U&&e(10,C=U.onSort),"onTransform"in U&&e(11,k=U.onTransform),"onContextMenu"in U&&e(12,D=U.onContextMenu),"onCopy"in U&&e(13,L=U.onCopy),"onRenderMenu"in U&&e(14,z=U.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Ir(d)||vs(d)||Yi(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:qQe,title:"Expand all",className:"jse-expand-all",onClick:g,disabled:!$o(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:YQe,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!$o(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:BP,title:"Search (Ctrl+F)",className:"jse-search",onClick:R,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:yp,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:L,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:_k,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:gk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:k,disabled:h||void 0===u},l,{type:"button",icon:Oae,title:uN,className:"jse-contextmenu",onClick:D},{type:"separator"},{type:"button",icon:$P,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!m.canUndo},{type:"button",icon:LP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:b,disabled:!m.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=z(c)||c)},[o,p,u,d,h,m,g,v,y,b,C,k,D,L,z,s,a,l,c,r,i]}var QQe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,KQe,JQe,Ti,{json:2,selection:3,readOnly:4,showSearch:1,historyState:5,onExpandAll:6,onCollapseAll:7,onUndo:8,onRedo:9,onSort:10,onTransform:11,onContextMenu:12,onCopy:13,onRenderMenu:14}),r}return Se(e)}();function ZQe(t){di(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function Hce(t){var n;return{c:function(){(n=ve("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',j(n,"class","svelte-1q2qkk2")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&Fe(n)}}}function eZe(t){var n,e,i,r,o,s,a,l=!t[0]&&Hce();return{c:function(){n=ve("div"),e=ve("div"),i=tt(),r=ve("div"),o=tn("Empty document\n "),l&&l.c(),s=tt(),a=ve("div"),j(e,"class","jse-space jse-before svelte-1q2qkk2"),j(r,"class","jse-contents svelte-1q2qkk2"),j(a,"class","jse-space jse-after svelte-1q2qkk2"),j(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){Pe(c,n,u),ue(n,e),ue(n,i),ue(n,r),ue(r,o),l&&l.m(r,null),ue(n,s),ue(n,a)},p:function(c,u){zn(u,1),c[0]?l&&(l.d(1),l=null):l||((l=Hce()).c(),l.m(r,null))},i:jt,o:jt,d:function(c){c&&Fe(n),l&&l.d()}}}function tZe(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var nZe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,tZe,eZe,Ti,{readOnly:0},ZQe),r}return Se(e)}(),oj={},iZe={get exports(){return oj},set exports(t){oj=t}},Uce=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(eo(Sn(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function oZe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function sZe(t,n){return function(e,i){var r=Sn(e,t),o=Sn(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Sn(t,n);return[{op:"replace",path:an(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(To(t))return function rZe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Sn(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*sj(u,d)});for(var s=[],a=0;axb&&qce();return{c:function(){n=ve("div");for(var d=0;dxb?u?u.p(d,f):((u=qce()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:jt,o:jt,d:function(d){d&&Fe(n);for(var h=0;h0&&(a("scrollTo ",g),o.scrollTo({left:g,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(g){a("get items for path",g);var v=Sn(l,g);if(Array.isArray(v))return nP(0,v.length).map(String);if(To(v)){var y=Object.keys(v).slice(0);return y.sort(sj),y}return[]},function(g){return Jc(l,g)},p,function(){e(6,f=!f)},m,function(g){m(),p(g)},c,u,function(g){Hi[g?"unshift":"push"](function(){e(5,s=g)})},function(g){Hi[g?"unshift":"push"](function(){e(4,o=g)})}]}var CZe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,wZe,xZe,Ti,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},yZe),r}return Se(e)}();function SZe(t){di(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function nue(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",P=!t[4]&&iue(t),W=[DZe,kZe],J=[];function H(E,I){return E[2]?0:1}a=H(t),l=J[a]=W[a](t),y=new rr({props:{data:OXe}}),k=new rr({props:{data:SXe}}),z=new rr({props:{data:P0}});var le=t[0]&&!t[4]&&rue(t);return{c:function(){n=ve("div"),e=ve("form"),P&&P.c(),i=tt(),r=ve("div"),o=ve("div"),s=ve("div"),l.c(),c=tt(),u=ve("label"),d=ve("input"),h=tt(),f=ve("div"),p=tn(te),m=tn(t[10]),g=tt(),v=ve("button"),ft(y.$$.fragment),b=tt(),C=ve("button"),ft(k.$$.fragment),D=tt(),L=ve("button"),ft(z.$$.fragment),R=tt(),le&&le.c(),j(s,"class","jse-search-icon svelte-3lbrbf"),j(d,"class","jse-search-input svelte-3lbrbf"),j(d,"title","Enter text to search"),j(d,"type","text"),j(d,"placeholder","Find"),j(u,"class","jse-search-input-label svelte-3lbrbf"),j(u,"about","jse-search input"),j(f,"class","jse-search-count svelte-3lbrbf"),At(f,"jse-visible",""!==t[8]),j(v,"type","button"),j(v,"class","jse-search-next svelte-3lbrbf"),j(v,"title","Go to next search result (Enter)"),j(C,"type","button"),j(C,"class","jse-search-previous svelte-3lbrbf"),j(C,"title","Go to previous search result (Shift+Enter)"),j(L,"type","button"),j(L,"class","jse-search-clear svelte-3lbrbf"),j(L,"title","Close search box (Esc)"),j(o,"class","jse-search-section svelte-3lbrbf"),j(r,"class","jse-search-contents svelte-3lbrbf"),j(e,"class","jse-search-form svelte-3lbrbf"),j(n,"class","jse-search-box svelte-3lbrbf")},m:function(E,I){Pe(E,n,I),ue(n,e),P&&P.m(e,null),ue(e,i),ue(e,r),ue(r,o),ue(o,s),J[a].m(s,null),ue(o,c),ue(o,u),ue(u,d),ep(d,t[8]),ue(o,h),ue(o,f),ue(f,p),ue(f,m),ue(o,g),ue(o,v),dt(y,v,null),ue(o,b),ue(o,C),dt(k,C,null),ue(o,D),ue(o,L),dt(z,L,null),ue(r,R),le&&le.m(r,null),U=!0,G||(X=[It(d,"input",t[21]),ya(EZe.call(null,d)),It(v,"click",t[22]),It(C,"click",t[23]),It(L,"click",t[24]),It(e,"submit",t[12]),It(e,"keydown",t[13])],G=!0)},p:function(E,I){E[4]?P&&(Lt(),ae(P,1,1,function(){P=null}),$t()):P?(P.p(E,I),16&I&&K(P,1)):((P=iue(E)).c(),K(P,1),P.m(e,i));var N=a;(a=H(E))===N?J[a].p(E,I):(Lt(),ae(J[N],1,1,function(){J[N]=null}),$t(),(l=J[a])?l.p(E,I):(l=J[a]=W[a](E)).c(),K(l,1),l.m(s,null)),256&I&&d.value!==E[8]&&ep(d,E[8]),(!U||8&I)&&te!==(te=(-1!==E[3]?"".concat(E[3]+1,"/"):"")+"")&&qn(p,te),(!U||1024&I)&&qn(m,E[10]),(!U||256&I)&&At(f,"jse-visible",""!==E[8]),E[0]&&!E[4]?le?le.p(E,I):((le=rue(E)).c(),le.m(r,null)):le&&(le.d(1),le=null)},i:function(E){U||(K(P),K(l),K(y.$$.fragment,E),K(k.$$.fragment,E),K(z.$$.fragment,E),U=!0)},o:function(E){ae(P),ae(l),ae(y.$$.fragment,E),ae(k.$$.fragment,E),ae(z.$$.fragment,E),U=!1},d:function(E){E&&Fe(n),P&&P.d(),J[a].d(),ht(y),ht(k),ht(z),le&&le.d(),G=!1,so(X)}}}function iue(t){var n,e,i,r,o;return e=new rr({props:{data:t[0]?su:gp}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-replace-toggle svelte-3lbrbf"),j(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){Pe(s,n,a),dt(e,n,null),i=!0,r||(o=It(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?su:gp),e.$set(l)},i:function(s){i||(K(e.$$.fragment,s),i=!0)},o:function(s){ae(e.$$.fragment,s),i=!1},d:function(s){s&&Fe(n),ht(e),r=!1,o()}}}function kZe(t){var n,e;return n=new rr({props:{data:BP}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function DZe(t){var n,e;return n=new rr({props:{data:xXe,spin:!0}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function rue(t){var n,e,i,r,o,s,a,l;return{c:function(){n=ve("div"),e=ve("input"),i=tt(),(r=ve("button")).textContent="Replace",o=tt(),(s=ve("button")).textContent="All",j(e,"class","jse-replace-input svelte-3lbrbf"),j(e,"title","Enter replacement text"),j(e,"type","text"),j(e,"placeholder","Replace"),j(r,"type","button"),j(r,"title","Replace current occurrence (Ctrl+Enter)"),j(r,"class","svelte-3lbrbf"),j(s,"type","button"),j(s,"title","Replace all occurrences"),j(s,"class","svelte-3lbrbf"),j(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){Pe(c,n,u),ue(n,e),ep(e,t[9]),ue(n,i),ue(n,r),ue(n,o),ue(n,s),a||(l=[It(e,"input",t[25]),It(r,"click",t[14]),It(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&ep(e,c[9])},d:function(c){c&&Fe(n),a=!1,so(l)}}}function TZe(t){var n,e,i=t[1]&&nue(t);return{c:function(){i&&i.c(),n=br()},m:function(r,o){i&&i.m(r,o),Pe(r,n,o),e=!0},p:function(r,o){var s=zn(o,1)[0];r[1]?i?(i.p(r,s),2&s&&K(i,1)):((i=nue(r)).c(),K(i,1),i.m(n.parentNode,n)):i&&(Lt(),ae(i,1,1,function(){i=null}),$t())},i:function(r){e||(K(i),e=!0)},o:function(r){ae(i),e=!1},d:function(r){i&&i.d(r),r&&Fe(n)}}}function EZe(t){t.select()}function AZe(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,m=void 0!==p&&p,g=n.onChange,v=void 0===g?ho:g,y=n.onPrevious,b=void 0===y?ho:y,C=n.onNext,k=void 0===C?ho:C,D=n.onReplace,L=void 0===D?ho:D,z=n.onReplaceAll,R=void 0===z?ho:z,U=n.onClose,G=void 0===U?ho:U,X="",te="",P="";function W(){e(0,f=!f&&!m)}function J(){m||L(X,P)}return t.$$set=function(H){"show"in H&&e(1,s=H.show),"searching"in H&&e(2,a=H.searching),"resultCount"in H&&e(16,c=H.resultCount),"activeIndex"in H&&e(3,d=H.activeIndex),"showReplace"in H&&e(0,f=H.showReplace),"readOnly"in H&&e(4,m=H.readOnly),"onChange"in H&&e(17,v=H.onChange),"onPrevious"in H&&e(5,b=H.onPrevious),"onNext"in H&&e(6,k=H.onNext),"onReplace"in H&&e(18,L=H.onReplace),"onReplaceAll"in H&&e(19,R=H.onReplaceAll),"onClose"in H&&e(7,G=H.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=p0(v,300)),1048832&t.$$.dirty&&r(X),2&t.$$.dirty&&s&&""!==X&&v(X)},[f,s,a,d,m,b,k,G,X,P,i,W,function(H){H.preventDefault(),X!==te?(te=X,r.cancel(),v(X)):k()},function(H){H.stopPropagation();var le=fp(H);"Enter"===le&&(H.preventDefault(),k()),"Shift+Enter"===le&&(H.preventDefault(),b()),"Ctrl+Enter"===le&&(H.preventDefault(),f?J():k()),"Ctrl+H"===le&&(H.preventDefault(),W()),"Escape"===le&&(H.preventDefault(),G())},J,function(){m||R(X,P)},c,v,L,R,r,function(){e(8,X=this.value)},function(){return k()},function(){return b()},function(){return G()},function(){e(9,P=this.value)}]}var MZe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,AZe,TZe,Ti,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},SZe),r}return Se(e)}(),oue=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function OZe(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',j(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function qZe(t){var n,e,i,r,o,s,a,l,c,u=[XZe,YZe],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=ve("label"),e=ve("input"),i=tt(),o.c(),s=br(),j(e,"type","text"),e.readOnly="readonly",j(e,"tabindex","-1"),j(e,"class","jse-hidden-input svelte-qojdc1"),j(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){Pe(f,n,p),ue(n,e),t[76](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=It(e,"paste",t[34]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):(Lt(),ae(d[m],1,1,function(){d[m]=null}),$t(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),K(o,1),o.m(s.parentNode,s))},i:function(f){a||(K(o),a=!0)},o:function(f){ae(o),a=!1},d:function(f){f&&Fe(n),t[76](null),f&&Fe(i),d[r].d(f),f&&Fe(s),l=!1,c()}}}function YZe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new MZe({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new WQe({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:ho}});var m=t[18]&&gue(t),g=t[23]&&vue(t);return f=new KP({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=ve("div"),ft(s.$$.fragment),a=tt(),l=ve("div"),ft(c.$$.fragment),u=tt(),m&&m.c(),d=tt(),g&&g.c(),h=tt(),ft(f.$$.fragment),j(o,"class","jse-search-box-container svelte-qojdc1"),j(l,"class","jse-contents svelte-qojdc1"),j(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){Pe(v,o,y),dt(s,o,null),Pe(v,a,y),Pe(v,l,y),dt(c,l,null),t[77](l),Pe(v,u,y),m&&m.m(v,y),Pe(v,d,y),g&&g.m(v,y),Pe(v,h,y),dt(f,v,y),p=!0},p:function(v,y){var b,C,k,D,L={};524288&y[0]&&(L.show=v[19]),131072&y[0]&&(L.resultCount=(null===(b=v[17])||void 0===b||null===(C=b.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&(L.activeIndex=(null===(k=v[17])||void 0===k?void 0:k.activeIndex)||0),1048576&y[0]&&(L.showReplace=v[20]),2097152&y[0]&&(L.searching=v[21]),1&y[0]&&(L.readOnly=v[0]),s.$set(L);var z={};1024&y[0]&&(z.value=v[10]),65536&y[0]&&(z.expandedMap=v[16].expandedMap),65536&y[0]&&(z.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(z.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(z.validationErrorsMap=v[24]),131072&y[0]&&(z.searchResultItemsMap=null===(D=v[17])||void 0===D?void 0:D.itemsMap),65536&y[0]&&(z.selection=v[16].selection),8192&y[0]&&(z.context=v[13]),c.$set(z),v[18]?m?(m.p(v,y),262144&y[0]&&K(m,1)):((m=gue(v)).c(),K(m,1),m.m(d.parentNode,d)):m&&(Lt(),ae(m,1,1,function(){m=null}),$t()),v[23]?g?(g.p(v,y),8388608&y[0]&&K(g,1)):((g=vue(v)).c(),K(g,1),g.m(h.parentNode,h)):g&&(Lt(),ae(g,1,1,function(){g=null}),$t());var R={};4096&y[0]&&(R.validationErrors=v[12]),f.$set(R)},i:function(v){p||(K(s.$$.fragment,v),K(c.$$.fragment,v),K(m),K(g),K(f.$$.fragment,v),p=!0)},o:function(v){ae(s.$$.fragment,v),ae(c.$$.fragment,v),ae(m),ae(g),ae(f.$$.fragment,v),p=!1},d:function(v){v&&Fe(o),ht(s),v&&Fe(a),v&&Fe(l),ht(c),t[77](null),v&&Fe(u),m&&m.d(v),v&&Fe(d),g&&g.d(v),v&&Fe(h),ht(f,v)}}}function XZe(t){var n,e,i,r,o=[KZe,JZe],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=br()},m:function(l,c){s[n].m(l,c),Pe(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):(Lt(),ae(s[u],1,1,function(){s[u]=null}),$t(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),K(e,1),e.m(i.parentNode,i))},i:function(l){r||(K(e),r=!0)},o:function(l){ae(e),r=!1},d:function(l){s[n].d(l),l&&Fe(i)}}}function gue(t){var n,e;return n=new nd({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:vk,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function vue(t){var n,e;return n=new nd({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:mb,text:"Ok",onClick:t[8]},{icon:vp,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:mb,text:"Ok",onClick:i[8]},{icon:vp,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function JZe(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:vp,text:"Repair manually",onClick:t[47]}]}}),i=new fue({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){ft(n.$$.fragment),e=tt(),ft(i.$$.fragment)},m:function(o,s){dt(n,o,s),Pe(o,e,s),dt(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:vp,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(K(n.$$.fragment,o),K(i.$$.fragment,o),r=!0)},o:function(o){ae(n.$$.fragment,o),ae(i.$$.fragment,o),r=!1},d:function(o){ht(n,o),o&&Fe(e),ht(i,o)}}}function KZe(t){var n,e;return n=new nZe({props:{readOnly:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function QZe(t){var n,e,i,r,o,s,a,l,c=t[1]&&pue(t),u=t[2]&&mue(t),h=[];return o=h[r=t[25]?1:0]=[qZe,WZe][r](t),{c:function(){n=ve("div"),c&&c.c(),e=tt(),u&&u.c(),i=tt(),o.c(),j(n,"class","jse-tree-mode svelte-qojdc1"),At(n,"no-main-menu",!t[1])},m:function(f,p){Pe(f,n,p),c&&c.m(n,null),ue(n,e),u&&u.m(n,null),ue(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[It(zZe,"mousedown",t[49]),It(n,"keydown",t[41]),It(n,"mousedown",t[42]),It(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&K(c,1)):((c=pue(f)).c(),K(c,1),c.m(n,e)):c&&(Lt(),ae(c,1,1,function(){c=null}),$t()),f[2]?u?(u.p(f,p),4&p[0]&&K(u,1)):((u=mue(f)).c(),K(u,1),u.m(n,i)):u&&(Lt(),ae(u,1,1,function(){u=null}),$t()),o.p(f,p),(!s||2&p[0])&&At(n,"no-main-menu",!f[1])},i:function(f){s||(K(c),K(u),K(o),s=!0)},o:function(f){ae(c),ae(u),ae(o),s=!1},d:function(f){f&&Fe(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,so(l)}}}function ZZe(t,n,e){var i,r=ba("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=_a("simple-modal").open,h=hp(),f=hp(),p=_a("absolute-popup"),m=p.openAbsolutePopup,g=p.closeAbsolutePopup,v=!1,y=Sle(),b=n.readOnly,C=n.externalContent,k=n.mainMenuBar,D=n.navigationBar,L=n.escapeControlCharacters,z=n.escapeUnicodeCharacters,R=n.parser,U=n.parseMemoizeOne,G=n.validator,X=n.validationParser,te=n.pathParser,P=n.indentation,W=n.onError,J=n.onChange,H=n.onChangeMode,le=n.onRenderValue,E=n.onRenderMenu,I=n.onClassName,N=n.onFocus,q=n.onBlur,V=n.onSortModal,re=n.onTransformModal,he=n.onJSONEditorModal,Oe=!1;JP({onMount:Yc,onDestroy:Hu,getWindow:function(){return w0(l)},hasFocus:function(){return Oe&&document.hasFocus()||ck(l)},onFocus:function(){v=!0,N&&N()},onBlur:function(){v=!1,q&&q()}});var _e=void 0;function Xe(we){r("updateSelection",we);var at="function"==typeof we?we(ie.selection):we;ir(at,ie.selection)||e(16,ie=Qe(Qe({},ie),{},{selection:at}))}var Le,rt,B,ne=!1,ie=dk(),Me=!1,Ye=!1,je=!1,yt="";function Tt(we){return fn.apply(this,arguments)}function fn(){return(fn=Ki(pn().mark(function we(at){return pn().wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return r("search text updated",at),e(74,yt=at),Mt.next=4,zl();case 4:return Mt.next=6,ur();case 6:case"end":return Mt.stop()}},we)}))).apply(this,arguments)}function Hn(){return(Hn=Ki(pn().mark(function we(){return pn().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return e(17,Le=Le?JYe(Le):void 0),at.next=3,ur();case 3:case"end":return at.stop()}},we)}))).apply(this,arguments)}function Zt(){return(Zt=Ki(pn().mark(function we(){return pn().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return e(17,Le=Le?KYe(Le):void 0),at.next=3,ur();case 3:case"end":return at.stop()}},we)}))).apply(this,arguments)}function Ei(){return(Ei=Ki(pn().mark(function we(at,Mt){var Xt,nn,on,si;return pn().wrap(function(ui){for(;;)switch(ui.prev=ui.next){case 0:if(nn=null===(Xt=Le)||void 0===Xt?void 0:Xt.activeItem,r("handleReplace",{replacementText:Mt,activeItem:nn}),nn){ui.next=4;break}return ui.abrupt("return");case 4:return on=QYe(c,ie,Mt,nn,R),si=on.newSelection,Xn(on.operations,function(No,Os){return{state:Qe(Qe({},Os),{},{selection:si})}}),ui.next=8,zl();case 8:return ui.next=10,ur();case 10:case"end":return ui.stop()}},we)}))).apply(this,arguments)}function ln(){return(ln=Ki(pn().mark(function we(at,Mt){var Xt,on;return pn().wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return r("handleReplaceAll",{text:at,replacementText:Mt}),Xt=ZYe(c,ie,at,Mt,R),on=Xt.newSelection,Xn(Xt.operations,function(si,ui){return{state:Qe(Qe({},ui),{},{selection:on})}}),Bn.next=5,zl();case 5:return Bn.next=7,ur();case 7:case"end":return Bn.stop()}},we)}))).apply(this,arguments)}function ur(){return wr.apply(this,arguments)}function wr(){return(wr=Ki(pn().mark(function we(){var at,Mt,Xt;return pn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(Mt=null===(at=Le)||void 0===at?void 0:at.activeItem,r("focusActiveSearchResult",Le),!Mt){nn.next=9;break}return e(16,ie=Qe(Qe({},kP(c,ie,Xt=Mt.path)),{},{selection:void 0})),nn.next=7,zl();case 7:return nn.next=9,un(Xt);case 9:case"end":return nn.stop()}},we)}))).apply(this,arguments)}var gi,Vr,or=kle({onChange:function(we){e(22,mr=we)}}),mr=or.getState(),Oo=oP(function(we,at){if(""===we)return r("clearing search result"),void(void 0!==Le&&e(17,Le=void 0));e(21,je=!0),setTimeout(function(){r("searching...",we);var nn,on,Bn,si,ui,No,Os,Mt=_ae(we,at,1e3);e(17,(nn=Mt,Bn=null!=(on=Le)&&on.activeItem?wae(on.activeItem):void 0,si=nn.findIndex(function(Yo){return ir(Bn,wae(Yo))}),ui=-1!==si?si:void 0!==on?.activeIndex&&on?.activeIndex0?0:-1,Os=(No=nn.map(function(Yo,yo){return Qe(Qe({},Yo),{},{active:yo===ui})}))[ui],Le={items:No,itemsMap:g0(No,function(Yo){return an(Yo.path)}),activeItem:Os,activeIndex:ui})),e(21,je=!1)})},300),On=!1,xt=[],ai=wb(Dle);function Ii(we,at,Mt,Xt){R0(function(){var nn;try{nn=ai(we,at,Mt,Xt)}catch(on){nn=[{path:[],message:"Failed to validate: "+on.message,severity:Jd.warning}]}ir(nn,xt)||(r("validationErrors changed:",nn),e(12,xt=nn))},function(nn){return r("validationErrors updated in ".concat(nn," ms"))})}function Cr(){return r("validate"),_e?{parseError:_e,isRepairable:!1}:(Ii(c,G,R,X),Ui(xt)?null:{validationErrors:xt})}function vo(){return c}function qo(){return ie}function In(we){ne||(ne=!0,e(16,ie=ru(we,ie,[],xse({json:we},10240)?lh:db)))}function oi(we){void 0!==ie.selection&&(ie.selection&&Jc(we,ie.selection.anchorPath)&&Jc(we,ie.selection.focusPath)||(r("clearing selection: path does not exist anymore",ie.selection),e(16,ie=Qe(Qe({},ie),{},{selection:T0(we,ie)}))))}function vi(we){var at=we.previousJson,Mt=we.previousState,Xt=we.previousText,nn=we.previousTextIsRepaired;void 0===at&&void 0===Xt||(void 0!==c?or.add(void 0!==at?{undo:{patch:[{op:"replace",path:"",value:at}],state:ol(Mt),json:void 0,text:Xt,textIsRepaired:nn},redo:{patch:[{op:"replace",path:"",value:c}],state:ol(ie),json:void 0,text:u,textIsRepaired:On}}:{undo:{patch:void 0,json:void 0,text:Xt,state:ol(Mt),textIsRepaired:nn},redo:{patch:void 0,json:c,state:ol(ie),text:u,textIsRepaired:On}}):void 0!==at&&or.add({undo:{patch:void 0,json:at,state:ol(Mt),text:Xt,textIsRepaired:nn},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:On,state:ol(ie)}}))}function Tr(we,at){if(r("patch",we,at),void 0===c)throw new Error("Cannot apply patch: no JSON");var Mt={json:c,text:u},Xt=c,nn=ie,on=u,Bn=On,si=vae(c,we),ui=Kse(c,ie,we),No=E0(c,we),Os=function(Sh,_d){return void 0!==_d||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Qe(Qe({},Sh),{},{selection:_d}):Sh}(ui.documentState,No,!1);r("patch updatedSelection",No);var Yo="function"==typeof at?at(ui.json,Os):void 0;e(10,c=Yo&&void 0!==Yo.json?Yo.json:ui.json);var yo=Yo&&void 0!==Yo.state?Yo.state:Os;e(16,ie=yo),e(11,u=void 0),e(23,On=!1),e(18,B=void 0),oi(c),or.add({undo:{patch:si,json:void 0,text:on,state:ol(nn),textIsRepaired:Bn},redo:{patch:we,json:void 0,state:ol(yo),text:u,textIsRepaired:On}});var Al={json:c,previousJson:Xt,undo:si,redo:we};return ei(Mt,Al),Al}function Hr(){!b&&ie.selection&&Xe(ou(ie.selection.focusPath,!0))}function no(){if(!b&&ie.selection){var we=ie.selection.focusPath,at=Sn(c,we);$o(at)?(r("openJSONEditorModal",{path:Mt=we,value:Xt=at}),Oe=!0,he({content:{json:Xt},path:Mt,onPatch:Vr.onPatch,onClose:function(){Oe=!1,Ms()}})):Xe(fr(we,!0))}var Mt,Xt}function Us(){if(!b&&Yi(ie.selection)){var we=ie.selection.focusPath,at=an(we),Mt=Sn(c,we),Xt=!pf(Mt,ie.enforceStringMap,at,R),nn=Xt?String(Mt):e0(String(Mt),R);r("handleToggleEnforceString",{enforceString:Xt,value:Mt,updatedValue:nn}),Xn([{op:"replace",path:at,value:nn}],function(on,Bn){return{state:Jse(Bn,at,Xt)}})}}function gr(){return zs.apply(this,arguments)}function zs(){return zs=Ki(pn().mark(function we(){var at,Mt=arguments;return pn().wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return at=!(Mt.length>0&&void 0!==Mt[0])||Mt[0],Xt.next=3,lue({json:c,documentState:ie,indentation:at?P:void 0,readOnly:b,parser:R,onPatch:Xn});case 3:case"end":return Xt.stop()}},we)})),zs.apply(this,arguments)}function Wa(){return qa.apply(this,arguments)}function qa(){return qa=Ki(pn().mark(function we(){var at,Mt=arguments;return pn().wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(at=!(Mt.length>0&&void 0!==Mt[0])||Mt[0],void 0!==c){Xt.next=3;break}return Xt.abrupt("return");case 3:return Xt.next=5,cue({json:c,documentState:ie,indentation:at?P:void 0,parser:R});case 5:case"end":return Xt.stop()}},we)})),qa.apply(this,arguments)}function Oc(){d(jle,{},Qe(Qe({},Vm),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Ms()}})}function xe(we,at){d(qle,{text:we,onParse:ok,onRepair:yse,onApply:at},Qe(Qe({},Vm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Ms()}})}function He(){due({json:c,text:u,documentState:ie,keepSelection:!1,readOnly:b,onChange:J,onPatch:Xn})}function We(){!b&&void 0!==c&&ie.selection&&M0(ie.selection)&&!Ui(ie.selection.focusPath)&&(r("duplicate",{selection:ie.selection}),Xn(pae(c,uae(ie.selection))))}function lt(){b||!ie.selection||!Ir(ie.selection)&&!Yi(ie.selection)||Ui(ie.selection.focusPath)||(r("extract",{selection:ie.selection}),Xn(function(at,Mt){if(Yi(Mt))return[{op:"move",from:an(Mt.focusPath),path:""}];if(!Ir(Mt))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Xt=Sn(at,qi(Mt.focusPath));if(eo(Xt))return[{op:"replace",path:"",value:Mt.paths.map(function(on){var Bn=Bs(Fn(on));return Xt[Bn]})}];if(Do(Xt)){var nn={};return Mt.paths.forEach(function(on){var Bn=String(Fn(on));nn[Bn]=Xt[Bn]}),[{op:"replace",path:"",value:nn}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(Mt))}(c,ie.selection),function(at,Mt){if($o(at))return{state:pp(at,Mt,[])}}))}function Ue(we){void 0!==c&&Ik({insertType:we,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:b,parser:R,onPatch:Xn,onReplaceJson:yr})}function kn(we){vs(ie.selection)&&Xe(fr(ie.selection.focusPath,!1)),Ue(we)}function ni(we){if(!b&&ie.selection)if(ng(ie.selection))try{var at=ie.selection.anchorPath,Mt=Sn(c,at),Xt=function(on,Bn,si){if("array"===Bn){if(Array.isArray(on))return on;if(To(on))return mse(on);if("string"==typeof on)try{var ui=si.parse(on);if(Array.isArray(ui))return ui;if(To(ui))return mse(ui)}catch{return[on]}return[on]}if("object"===Bn){if(Array.isArray(on))return pse(on);if(To(on))return on;if("string"==typeof on)try{var No=si.parse(on);if(To(No))return No;if(Array.isArray(No))return pse(No)}catch{return{value:on}}return{value:on}}if("value"===Bn)return $o(on)?si.stringify(on):on;throw new Error("Cannot convert ".concat(MN(on,si)," to ").concat(Bn))}(Mt,we,R);if(Xt===Mt)return;var nn=[{op:"replace",path:an(at),value:Xt}];r("handleConvert",{selection:ie.selection,path:at,type:we,operations:nn}),Xn(nn,function(on,Bn){return{state:pp(on,Bn,ie.selection.focusPath)}})}catch(on){W(on)}else W(new Error("Cannot convert current selection to ".concat(we)))}function ci(){var we=oae(c,ie,!1),at=qi(ie.selection.focusPath);!Ui(we.focusPath)&&ir(at,qi(we.focusPath))?Xe(gf(we.focusPath)):Xe(mf(at)),r("insert before",{selection:ie.selection,selectionBefore:we,parentPath:at}),zl().then(El)}function li(){var we=Ir(ie.selection)?Fn(ie.selection.paths):ie.selection.focusPath;r("insert after",we),Xe(gf(we)),zl().then(El)}function Sr(we){return qr.apply(this,arguments)}function qr(){return(qr=Ki(pn().mark(function we(at){return pn().wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,hue({char:at,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:b,parser:R,onPatch:Xn,onReplaceJson:yr,onSelect:Xe});case 2:case"end":return Mt.stop()}},we)}))).apply(this,arguments)}function fi(){if(!b&&or.getState().canUndo){var we=or.undo();if(we){var at={json:c,text:u};e(10,c=we.undo.patch?Xu(c,we.undo.patch):we.undo.json),e(16,ie=we.undo.state),e(11,u=we.undo.text),e(23,On=we.undo.textIsRepaired),r("undo",{item:we,json:c,documentState:ie}),ei(at,{json:c,previousJson:at.json,redo:we.undo.patch,undo:we.redo.patch}),Ms(),ie.selection&&un(ie.selection.focusPath,!1)}}}function vr(){if(!b&&or.getState().canRedo){var we=or.redo();if(we){var at={json:c,text:u};e(10,c=we.redo.patch?Xu(c,we.redo.patch):we.redo.json),e(16,ie=we.redo.state),e(11,u=we.redo.text),e(23,On=we.redo.textIsRepaired),r("redo",{item:we,json:c,documentState:ie}),ei(at,{json:c,previousJson:at.json,redo:we.redo.patch,undo:we.undo.patch}),Ms(),ie.selection&&un(ie.selection.focusPath,!1)}}}function Te(we){var at;b||void 0===c||(Oe=!0,V({id:h,json:c,rootPath:we,onSort:(at=Ki(pn().mark(function Mt(Xt){var nn;return pn().wrap(function(on){for(;;)switch(on.prev=on.next){case 0:r("onSort",we,nn=Xt.operations),Xn(nn,function(Bn,si){return{state:Qe(Qe({},pp(Bn,si,we)),{},{selection:fr(we,!1)})}});case 3:case"end":return on.stop()}},Mt)})),function(Mt){return at.apply(this,arguments)}),onClose:function(){Oe=!1,Ms()}}))}function kt(){ie.selection&&Te(lae(c,ie.selection))}function Vt(we){var Mt=we.rootPath,Xt=we.onTransform,nn=we.onClose;void 0!==c&&Mt&&(Oe=!0,re({id:we.id||f,json:c,rootPath:Mt,onTransform:Xt?function(on){Xt({operations:on,json:c,transformedJson:Xu(c,on)})}:function(on){r("onTransform",Mt,on),Xn(on,function(Bn,si){return{state:Qe(Qe({},pp(Bn,si,Mt)),{},{selection:fr(Mt,!1)})}})},onClose:function(){Oe=!1,Ms(),nn&&nn()}}))}function rn(){ie.selection&&Vt({rootPath:lae(c,ie.selection)})}function un(we){return ii.apply(this,arguments)}function ii(){return ii=Ki(pn().mark(function we(at){var Mt,Xt,nn,on,si=arguments;return pn().wrap(function(ui){for(;;)switch(ui.prev=ui.next){case 0:return Mt=!(si.length>1&&void 0!==si[1])||si[1],e(16,ie=kP(c,ie,qi(at))),ui.next=4,zl();case 4:if(!(Xt=Ni(at))){ui.next=14;break}if(r("scrollTo",{path:at,elem:Xt,refContents:s}),nn=s.getBoundingClientRect(),on=Xt.getBoundingClientRect(),Mt){ui.next=12;break}if(!(on.bottom>nn.top&&on.topMt.bottom-20&&y(at,{container:s,offset:-(Mt.height-nn-20),duration:0})}}function ei(we,at){(void 0!==we.json||void 0!==we?.text)&&(void 0!==u?J({text:u,json:void 0},we,{contentErrors:Cr(),patchResult:at}):void 0!==c&&J({text:void 0,json:c},we,{contentErrors:Cr(),patchResult:at}))}function Xn(we,at){if(!b)return r("handlePatch",we,at),Tr(we,at)}function yr(we,at){var Mt=ie,Xt=c,nn=u,on={json:c,text:u},Bn=On,si=ru(c,ie,[],lh),ui="function"==typeof at?at(we,si):void 0;e(10,c=ui&&void 0!==ui.json?ui.json:we),e(16,ie=ui&&void 0!==ui.state?ui.state:si),e(11,u=void 0),e(23,On=!1),oi(c),vi({previousJson:Xt,previousState:Mt,previousText:nn,previousTextIsRepaired:Bn}),ei(on,null)}function Er(we,at){r("handleChangeText");var Mt=ie,Xt=c,nn=u,on={json:c,text:u},Bn=On;try{e(10,c=U(we)),e(16,ie=ru(c,ie,[],lh)),e(11,u=void 0),e(23,On=!1)}catch{try{e(10,c=U(Kd(we))),e(16,ie=ru(c,ie,[],lh)),e(11,u=we),e(23,On=!0)}catch{e(10,c=void 0),e(16,ie=dk({json:c,expand:lh})),e(11,u=we),e(23,On=!1)}}if("function"==typeof at){var si=at(c,ie);e(10,c=si&&si.json?si.json:c),e(16,ie=si&&si.state?si.state:ie)}oi(c),vi({previousJson:Xt,previousState:Mt,previousText:nn,previousTextIsRepaired:Bn}),ei(on,null)}function Io(we,at){var Mt=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:we,expanded:at,recursive:Mt}),e(16,ie=at?Mt?ru(c,ie,we,db):function VYe(t,n){return Qe(Qe({},t),{},{expandedMap:Qe(Qe({},t.expandedMap),{},Ul({},an(n),!0))})}(ie,we):Xse(ie,we)),ie.selection&&!at&&function UYe(t,n){return A0(t.focusPath,n)&&(t.focusPath.length>n.length||Hs(t))}(ie.selection,we)&&Xe(void 0),setTimeout(function(){ck(l)||Ms()})}function sa(we){r("openFind",{findAndReplace:we}),e(19,Me=!1),e(20,Ye=!1),zl().then(function(){e(19,Me=!0),e(20,Ye=we)})}function md(we,at){r("handleExpandSection",we,at);var nn,on,Bn,Mt=an(we);e(16,(on=Mt,Bn=at,ie=Qe(Qe({},nn=ie),{},{visibleSectionsMap:Qe(Qe({},nn.visibleSectionsMap),{},Ul({},on,Yse(hk(nn,on).concat(Bn))))})))}function pu(we){r("pasted json as text",we),e(18,B=we)}function aa(we){Oe=!0;var No=m(ZKe,{json:c,documentState:ie,parser:R,showTip:we.showTip,onEditKey:Hr,onEditValue:no,onToggleEnforceString:Us,onCut:gr,onCopy:Wa,onPaste:Oc,onRemove:He,onDuplicate:We,onExtract:lt,onInsertBefore:ci,onInsert:kn,onConvert:ni,onInsertAfter:li,onSort:kt,onTransform:rn,onCloseContextMenu:function(){g(No),Ms()}},{left:we.left,top:we.top,offsetTop:we.offsetTop,offsetLeft:we.offsetLeft,width:we.width,height:we.height,anchor:we.anchor,closeOnOuterClick:!0,onClose:function(){Oe=!1,Ms()}})}function El(we){if(!b&&!mp(ie.selection)){if(we&&(we.stopPropagation(),we.preventDefault()),we&&"contextmenu"===we.type&&we.target!==a)aa({left:we.clientX,top:we.clientY,width:260,height:336,showTip:!1});else{var at,Mt=null===(at=s)||void 0===at?void 0:at.querySelector(".jse-context-menu-pointer.jse-selected");if(Mt)aa({anchor:Mt,offsetTop:2,width:260,height:336,showTip:!1});else{var Xt,nn=null===(Xt=s)||void 0===Xt?void 0:Xt.getBoundingClientRect();nn&&aa({top:nn.top+2,left:nn.left+2,width:260,height:336,showTip:!1})}}return!1}}function gd(){return(gd=Ki(pn().mark(function we(){var at,Mt,Xt;return pn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return r("apply pasted json",B),Mt=(at=B).path,Xt=at.contents,Xe(fr(Mt,!1)),nn.next=5,zl();case 5:Xn([{op:"replace",path:an(Mt),value:Xt}],function(on,Bn){return{state:pp(on,Bn,Mt)}});case 7:case"end":return nn.stop()}},we)}))).apply(this,arguments)}function Ms(){r("focus"),a&&(a.focus(),a.select())}function vd(we){return at=c,Mt=ie,nn=qi(Xt=we),on=[Fn(Xt)],(si=(Bn=Sn(at,nn))?OP(Bn,Mt,on):void 0)?fr(nn.concat(si),!1):gf(Xt);var at,Mt,Xt,nn,on,Bn,si}function yd(we){i&&i.onDrag(we)}function kT(){i&&i.onDragEnd()}return t.$$set=function(we){"readOnly"in we&&e(0,b=we.readOnly),"externalContent"in we&&e(50,C=we.externalContent),"mainMenuBar"in we&&e(1,k=we.mainMenuBar),"navigationBar"in we&&e(2,D=we.navigationBar),"escapeControlCharacters"in we&&e(51,L=we.escapeControlCharacters),"escapeUnicodeCharacters"in we&&e(52,z=we.escapeUnicodeCharacters),"parser"in we&&e(3,R=we.parser),"parseMemoizeOne"in we&&e(53,U=we.parseMemoizeOne),"validator"in we&&e(54,G=we.validator),"validationParser"in we&&e(55,X=we.validationParser),"pathParser"in we&&e(4,te=we.pathParser),"indentation"in we&&e(5,P=we.indentation),"onError"in we&&e(6,W=we.onError),"onChange"in we&&e(56,J=we.onChange),"onChangeMode"in we&&e(57,H=we.onChangeMode),"onRenderValue"in we&&e(58,le=we.onRenderValue),"onRenderMenu"in we&&e(7,E=we.onRenderMenu),"onClassName"in we&&e(59,I=we.onClassName),"onFocus"in we&&e(60,N=we.onFocus),"onBlur"in we&&e(61,q=we.onBlur),"onSortModal"in we&&e(62,V=we.onSortModal),"onTransformModal"in we&&e(63,re=we.onTransformModal),"onJSONEditorModal"in we&&e(64,he=we.onJSONEditorModal)},t.$$.update=function(){var we,at;3145728&t.$$.dirty[1]&&e(73,rt=gP({escapeControlCharacters:L,escapeUnicodeCharacters:z})),524288&t.$$.dirty[1]&&function pt(we){void 0!==we.json&&function(at){if(void 0!==at){var Mt=!ir(c,at);if(r("update external json",{isChanged:Mt,currentlyText:void 0===c}),Mt){var Xt={json:c,text:u},nn=ie,on=c,Bn=u,si=On;e(10,c=at),In(c),e(11,u=void 0),e(23,On=!1),oi(c),vi({previousJson:on,previousState:nn,previousText:Bn,previousTextIsRepaired:si}),ei(Xt,null)}}}(we.json),void 0!==we.text&&function(at){if(void 0!==at&&void 0===C.json){var Mt=at!==u;if(r("update external text",{isChanged:Mt}),Mt){var Xt={json:c,text:u},nn=c,on=ie,Bn=u,si=On;try{e(10,c=U(at)),In(c),e(11,u=at),e(23,On=!1),_e=void 0}catch(ui){try{e(10,c=U(Kd(at))),In(c),e(11,u=at),e(23,On=!0),_e=void 0,oi(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,On=!1),_e=sk(u,ui.message||ui.toString())}}oi(c),vi({previousJson:nn,previousState:on,previousText:Bn,previousTextIsRepaired:si}),ei(Xt,null)}}}(we.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&Oo(yt,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Ii(c,G,R,X),4096&t.$$.dirty[0]&&e(24,(at={},(we=xt).forEach(function(Mt){at[an(Mt.path)]=Mt}),we.forEach(function(Mt){for(var Xt=Mt.path;Xt.length>0;){var nn=an(Xt=qi(Xt));nn in at||(at[nn]={isChildError:!0,path:Xt,message:"Contains invalid data",severity:Jd.warning})}}),gi=at)),512&t.$$.dirty[0]&&(i=s?function(we){var at,Mt;function Xt(si){return si<20?200:si<50?400:1200}function nn(){we&&(we.scrollTop+=.05*(at||0))}function on(si){Mt&&si===at||(Bn(),XP("startAutoScroll",si),at=si,Mt=setInterval(nn,50))}function Bn(){Mt&&(XP("stopAutoScroll"),clearInterval(Mt),Mt=void 0,at=void 0)}return XP("createAutoScrollHandler",we),{onDrag:function(si){if(we){var ui=si.clientY,No=we.getBoundingClientRect(),Os=No.top,Yo=No.bottom;uiYo?on(Xt(ui-Yo)):Bn()}},onDragEnd:function(){Bn()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Vr={readOnly:b,parser:R,normalization:rt,getJson:vo,getDocumentState:qo,findElement:Ni,findNextInside:vd,focus:Ms,onPatch:Xn,onInsert:Ue,onExpand:Io,onSelect:Xe,onFind:sa,onExpandSection:md,onPasteJson:pu,onRenderValue:le,onContextMenu:aa,onClassName:I||function(){},onDrag:yd,onDragEnd:kT}),8192&t.$$.dirty[0]&&r("context changed",Vr)},[b,k,D,R,te,P,W,E,function(){return On&&void 0!==c&&yr(c),{json:c,text:u}},s,c,u,xt,Vr,a,l,ie,Le,B,Me,Ye,je,mr,On,gi,o,Tt,function(){return Hn.apply(this,arguments)},function(){return Zt.apply(this,arguments)},function(we,at){return Ei.apply(this,arguments)},function(we,at){return ln.apply(this,arguments)},function(){e(19,Me=!1),e(20,Ye=!1),Tt(""),Ms()},function(we){r("select validation error",we),Xe(fr(we.path,!1)),un(we.path)},Wa,function(we){we.preventDefault(),uue({clipboardText:we.clipboardData.getData("text/plain"),json:c,documentState:ie,readOnly:b,parser:R,onPatch:Xn,onChangeText:Er,openRepairModal:xe})},fi,vr,function(){Te([])},function(){Vt({rootPath:[]})},function(){Io([],!0,!0)},function(){Io([],!1,!0)},function(we){var at=fp(we),Mt=we.shiftKey;if(r("keydown",{combo:at,key:we.key}),"Ctrl+X"===at&&(we.preventDefault(),gr(!0)),"Ctrl+Shift+X"===at&&(we.preventDefault(),gr(!1)),"Ctrl+C"===at&&(we.preventDefault(),Wa(!0)),"Ctrl+Shift+C"===at&&(we.preventDefault(),Wa(!1)),"Ctrl+D"===at&&(we.preventDefault(),We()),"Delete"!==at&&"Backspace"!==at||(we.preventDefault(),He()),"Insert"===at&&(we.preventDefault(),Ue("structure")),"Ctrl+A"===at&&(we.preventDefault(),Xe(fr([],!1))),"Ctrl+Q"===at&&El(we),"ArrowUp"===at||"Shift+ArrowUp"===at){we.preventDefault();var Xt=ie.selection?oae(c,ie,Mt,!0)||ie.selection:T0(c,ie);Xe(Xt),$n(Xt.focusPath)}if("ArrowDown"===at||"Shift+ArrowDown"===at){we.preventDefault();var nn=ie.selection?function(yo,Al){var Sh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ar=Al.selection;if(!Ar)return null;var Kl=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Ir(Ar)?Ar.focusPath:Fn(Ar.paths),mu=OP(yo,Al,Kl),bd=mu,kh=mu;if(null===mu||null==bd||null==kh)return null;if(Sh){var xd=OP(yo,$o(Sn(yo,Kl))?Xse(Al,Kl):Al,Kl);return null===xd?null:Zu(Ar)?Es(yo,xd,xd):Hs(Ar)?Es(yo,bd,kh):Es(yo,Ar.anchorPath,xd)}if(vs(Ar)){var hx=Sn(yo,qi(mu));return Array.isArray(hx)?fr(kh,!1):ou(kh,!1)}return Yi(Ar)?fr(kh,!1):Hs(Ar)?Es(yo,bd,kh):Es(yo,mu,mu)}(c,ie,Mt,!0)||ie.selection:T0(c,ie);Xe(nn),$n(nn.focusPath)}if("ArrowLeft"===at||"Shift+ArrowLeft"===at){we.preventDefault();var on=ie.selection?function(yo,Al){var Sh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ar=Al.selection;if(!Ar)return null;var Kl=sae(yo,Al,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),mu=Kl.caret,bd=Kl.previous;if(Sh)return Ir(Ar)?null:Es(yo,Ar.anchorPath,Ar.focusPath);if(mu&&bd)return IP(bd);var xd=Sn(yo,qi(Ar.focusPath));return Yi(Ar)&&Array.isArray(xd)?Es(yo,Ar.focusPath,Ar.focusPath):Ir(Ar)&&!Array.isArray(xd)?ou(Ar.focusPath,!1):null}(c,ie,Mt,!b)||ie.selection:T0(c,ie);Xe(on),$n(on.focusPath)}if("ArrowRight"===at||"Shift+ArrowRight"===at){we.preventDefault();var Bn=ie.selection&&void 0!==c?function(yo,Al){var Sh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ar=Al.selection;if(!Ar)return null;var Kl=sae(yo,Al,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),mu=Kl.caret,bd=Kl.next;return Sh?Ir(Ar)?null:Es(yo,Ar.anchorPath,Ar.focusPath):mu&&bd?IP(bd):Ir(Ar)?fr(Ar.focusPath,!1):null}(c,ie,Mt,!b)||ie.selection:T0(c,ie);Xe(Bn),$n(Bn.focusPath)}if("Enter"===at&&ie.selection){if(!b&&Ir(ie.selection)&&1===ie.selection.paths.length){var si=ie.selection.focusPath,ui=Sn(c,qi(si));Array.isArray(ui)&&Xe(fr(si,!1))}!b&&vs(ie.selection)&&(we.preventDefault(),Xe(Qe(Qe({},ie.selection),{},{edit:!0}))),Yi(ie.selection)&&(we.preventDefault(),$o(Sn(c,ie.selection.focusPath))?Io(ie.selection.focusPath,!0):b||Xe(Qe(Qe({},ie.selection),{},{edit:!0})))}if(1===at.replace(/^Shift\+/,"").length&&ie.selection)return we.preventDefault(),void Sr(we.key);if("Enter"===at&&(Zu(ie.selection)||Hs(ie.selection)))return we.preventDefault(),void Sr("");if("Ctrl+Enter"===at&&Yi(ie.selection)){var No=Sn(c,ie.selection.focusPath);mS(No)&&window.open(String(No),"_blank")}if("Escape"===at&&ie.selection&&(we.preventDefault(),Xe(void 0)),"Ctrl+F"===at&&(we.preventDefault(),sa(!1)),"Ctrl+H"===at&&(we.preventDefault(),sa(!0)),"Ctrl+Z"===at){we.preventDefault();var Os=document.activeElement;Os&&Os.blur&&Os.focus?(Os.blur(),setTimeout(function(){fi(),setTimeout(function(){return Os.select()})})):fi()}if("Ctrl+Shift+Z"===at){we.preventDefault();var Yo=document.activeElement;Yo&&Yo.blur&&Yo.focus?(Yo.blur(),setTimeout(function(){vr(),setTimeout(function(){return Yo.select()})})):vr()}},function(we){r("handleMouseDown",we),setTimeout(function(){setTimeout(function(){v||Mse(we.target,"BUTTON")||(Ms(),ie.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,ie=Qe(Qe({},ie),{},{selection:Es(c||{},[],[])}))))})})},El,function(we){b||aa({anchor:Ise(we.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gd.apply(this,arguments)},function(){r("clear pasted json"),e(18,B=void 0)},function(){H(Lo.text)},function(we){Xe(we),Ms(),un(we.focusPath)},function(we){!ob(we.target,function(Mt){return Mt===l})&&mp(ie.selection)&&(r("click outside the editor, stop edit mode"),Xe(function(Mt){return vs(Mt)||Yi(Mt)?Qe(Qe({},Mt),{},{edit:!1}):Mt}),v&&a&&(a.focus(),a.blur()),zl().then(function(){setTimeout(function(){a&&a.blur()})}))},C,L,z,U,G,X,J,H,le,I,N,q,V,re,he,function(){var we=arguments.length>0&&void 0!==arguments[0]?arguments[0]:db;r("expand");var at=Qe(Qe({},ie),{},{expandedMap:{},visibleSectionsMap:{}});e(16,ie=ru(c,at,[],we))},Cr,vo,Tr,Vt,un,Ni,Ms,rt,yt,function(we){e(19,Me=we)},function(we){Hi[we?"unshift":"push"](function(){e(14,a=we)})},function(we){Hi[we?"unshift":"push"](function(){e(9,s=we)})},function(we){Hi[we?"unshift":"push"](function(){e(15,l=we)})}]}var fj=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,ZZe,QZe,Ti,{readOnly:0,externalContent:50,mainMenuBar:1,navigationBar:2,escapeControlCharacters:51,escapeUnicodeCharacters:52,parser:3,parseMemoizeOne:53,validator:54,validationParser:55,pathParser:4,indentation:5,onError:6,onChange:56,onChangeMode:57,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},GZe,[-1,-1,-1,-1,-1]),r}return Se(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function eet(t){di(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function yue(t){var n,e,i,r,o,s=[net,tet],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=br()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(Lt(),ae(a[d],1,1,function(){a[d]=null}),$t(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),K(i,1),i.m(r.parentNode,r))},i:function(c){o||(K(i),o=!0)},o:function(c){ae(i),o=!1},d:function(c){a[e].d(c),c&&Fe(r)}}}function tet(t){var n;return{c:function(){n=tn("(Only available for arrays, not for objects)")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function net(t){var n,e;return n=new TJe({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function _ue(t){var n,e;return n=new fj({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ho,onError:console.error,onChange:ho,onChangeMode:ho,onFocus:ho,onBlur:ho,onSortModal:ho,onTransformModal:ho,onJSONEditorModal:ho,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function iet(t){var n,e;return{c:function(){n=ve("div"),e=tn(t[17]),j(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:function(i,r){131072&r[0]&&qn(e,i[17])},i:jt,o:jt,d:function(i){i&&Fe(n)}}}function ret(t){var n,e;return n=new fj({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ho,onError:console.error,onChange:ho,onChangeMode:ho,onFocus:ho,onBlur:ho,onSortModal:ho,onTransformModal:ho,onJSONEditorModal:ho,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function oet(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te,P,W,J,H,le,E,I,N,q,V,re,he,Oe,_e,Xe,Le,rt,B,ne=t[21](t[0]).description+"";n=new RJe({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new rr({props:{data:t[15]?su:gp}});var ie=t[15]&&yue(t);W=new rr({props:{data:t[16]?su:gp}});var Me=t[16]&&_ue(t),Ye=[ret,iet],je=[];function yt(Tt,fn){return Tt[17]?1:0}return q=yt(t),V=je[q]=Ye[q](t),{c:function(){ft(n.$$.fragment),e=tt(),i=ve("div"),r=ve("div"),o=ve("div"),(s=ve("div")).innerHTML='
    Language
    ',a=tt(),l=ve("div"),c=tt(),(u=ve("div")).innerHTML='
    Path
    ',d=tt(),h=ve("input"),p=tt(),m=ve("div"),g=ve("div"),v=ve("button"),ft(y.$$.fragment),b=tn("\n Wizard"),C=tt(),ie&&ie.c(),k=tt(),(D=ve("div")).innerHTML='
    Query
    ',L=tt(),z=ve("textarea"),R=tt(),U=ve("div"),G=ve("div"),X=ve("div"),te=ve("div"),P=ve("button"),ft(W.$$.fragment),J=tn("\n Original"),H=tt(),Me&&Me.c(),le=tt(),E=ve("div"),(I=ve("div")).innerHTML='
    Preview
    ',N=tt(),V.c(),re=tt(),he=ve("div"),Oe=ve("button"),_e=tn("Transform"),j(s,"class","jse-label svelte-107mggt"),j(l,"class","jse-description svelte-107mggt"),j(u,"class","jse-label svelte-107mggt"),j(h,"class","jse-path svelte-107mggt"),j(h,"type","text"),h.readOnly=!0,j(h,"title","Selected path"),h.value=f=Ui(t[1])?"(whole document)":iu(ql(t[1])),j(v,"type","button"),j(v,"class","svelte-107mggt"),j(g,"class","jse-label-inner svelte-107mggt"),j(m,"class","jse-label svelte-107mggt"),j(D,"class","jse-label svelte-107mggt"),j(z,"class","jse-query svelte-107mggt"),j(z,"spellcheck","false"),z.value=t[13],j(o,"class","jse-query-contents svelte-107mggt"),j(P,"type","button"),j(P,"class","svelte-107mggt"),j(te,"class","jse-label-inner svelte-107mggt"),j(X,"class","jse-label svelte-107mggt"),j(G,"class","jse-original-data svelte-107mggt"),At(G,"jse-hide",!t[16]),j(I,"class","jse-label svelte-107mggt"),j(E,"class","jse-preview-data svelte-107mggt"),j(U,"class","jse-data-contents svelte-107mggt"),At(U,"jse-hide-original-data",!t[16]),j(r,"class","jse-main-contents svelte-107mggt"),j(Oe,"type","button"),j(Oe,"class","jse-primary svelte-107mggt"),Oe.disabled=Xe=!!t[17],j(he,"class","jse-actions svelte-107mggt"),j(i,"class","jse-modal-contents svelte-107mggt")},m:function(Tt,fn){dt(n,Tt,fn),Pe(Tt,e,fn),Pe(Tt,i,fn),ue(i,r),ue(r,o),ue(o,s),ue(o,a),ue(o,l),l.innerHTML=ne,ue(o,c),ue(o,u),ue(o,d),ue(o,h),ue(o,p),ue(o,m),ue(m,g),ue(g,v),dt(y,v,null),ue(v,b),ue(o,C),ie&&ie.m(o,null),ue(o,k),ue(o,D),ue(o,L),ue(o,z),ue(r,R),ue(r,U),ue(U,G),ue(G,X),ue(X,te),ue(te,P),dt(W,P,null),ue(P,J),ue(G,H),Me&&Me.m(G,null),ue(U,le),ue(U,E),ue(E,I),ue(E,N),je[q].m(E,null),ue(i,re),ue(i,he),ue(he,Oe),ue(Oe,_e),Le=!0,rt||(B=[It(v,"click",t[25]),It(z,"input",t[23]),It(P,"click",t[26]),It(Oe,"click",t[24]),ya(aet.call(null,Oe))],rt=!0)},p:function(Tt,fn){var Hn={};512&fn[0]&&(Hn.queryLanguages=Tt[9]),1&fn[0]&&(Hn.queryLanguageId=Tt[0]),n.$set(Hn),(!Le||1&fn[0])&&ne!==(ne=Tt[21](Tt[0]).description+"")&&(l.innerHTML=ne),(!Le||2&fn[0]&&f!==(f=Ui(Tt[1])?"(whole document)":iu(ql(Tt[1])))&&h.value!==f)&&(h.value=f);var Zt={};32768&fn[0]&&(Zt.data=Tt[15]?su:gp),y.$set(Zt),Tt[15]?ie?(ie.p(Tt,fn),32768&fn[0]&&K(ie,1)):((ie=yue(Tt)).c(),K(ie,1),ie.m(o,k)):ie&&(Lt(),ae(ie,1,1,function(){ie=null}),$t()),(!Le||8192&fn[0])&&(z.value=Tt[13]);var Ei={};65536&fn[0]&&(Ei.data=Tt[16]?su:gp),W.$set(Ei),Tt[16]?Me?(Me.p(Tt,fn),65536&fn[0]&&K(Me,1)):((Me=_ue(Tt)).c(),K(Me,1),Me.m(G,null)):Me&&(Lt(),ae(Me,1,1,function(){Me=null}),$t()),(!Le||65536&fn[0])&&At(G,"jse-hide",!Tt[16]);var ln=q;(q=yt(Tt))===ln?je[q].p(Tt,fn):(Lt(),ae(je[ln],1,1,function(){je[ln]=null}),$t(),(V=je[q])?V.p(Tt,fn):(V=je[q]=Ye[q](Tt)).c(),K(V,1),V.m(E,null)),(!Le||65536&fn[0])&&At(U,"jse-hide-original-data",!Tt[16]),(!Le||131072&fn[0]&&Xe!==(Xe=!!Tt[17]))&&(Oe.disabled=Xe)},i:function(Tt){Le||(K(n.$$.fragment,Tt),K(y.$$.fragment,Tt),K(ie),K(W.$$.fragment,Tt),K(Me),K(V),Le=!0)},o:function(Tt){ae(n.$$.fragment,Tt),ae(y.$$.fragment,Tt),ae(ie),ae(W.$$.fragment,Tt),ae(Me),ae(V),Le=!1},d:function(Tt){ht(n,Tt),Tt&&Fe(e),Tt&&Fe(i),ht(y),ie&&ie.d(),ht(W),Me&&Me.d(),je[q].d(),rt=!1,so(B)}}}function set(t){var n,e,i,r,o;return e=new Lse({props:{$$slots:{default:[oet]},$$scope:{ctx:t}}}),{c:function(){n=ve("div"),ft(e.$$.fragment),j(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){Pe(s,n,a),dt(e,n,null),i=!0,r||(o=ya(Ok.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(K(e.$$.fragment,s),i=!0)},o:function(s){ae(e.$$.fragment,s),i=!1},d:function(s){s&&Fe(n),ht(e),r=!1,o()}}}function aet(t){t.focus()}function cet(t,n,e){var i,r,o=ba("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+j_():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,m=n.parseMemoizeOne,g=n.validationParser,v=n.pathParser,y=n.queryLanguages,b=n.queryLanguageId,C=n.onChangeQueryLanguage,k=n.onRenderValue,D=n.onClassName,L=n.onTransform,z=_a("simple-modal").close,R="".concat(a,":").concat(an(u)),U=ed[R]||{},G=!1!==ed.showWizard,X=!1!==ed.showOriginal,te=U.queryOptions||{},P=b===U.queryLanguageId&&U.query?U.query:le(b).createQuery(l,U.queryOptions||{}),W=U.isManual||!1,J=void 0,H={text:""};function le(I){return y.find(function(N){return N.id===I})||y[0]}var E=p0(function(I,N){try{o("previewTransform",{query:N});var q=le(b).executeQuery(I,N,p);e(18,H={json:q}),e(17,J=void 0)}catch(V){e(18,H={text:""}),e(17,J=V.toString())}},300);return t.$$set=function(I){"id"in I&&e(28,a=I.id),"json"in I&&e(29,l=I.json),"rootPath"in I&&e(1,u=I.rootPath),"indentation"in I&&e(2,d=I.indentation),"escapeControlCharacters"in I&&e(3,h=I.escapeControlCharacters),"escapeUnicodeCharacters"in I&&e(4,f=I.escapeUnicodeCharacters),"parser"in I&&e(5,p=I.parser),"parseMemoizeOne"in I&&e(6,m=I.parseMemoizeOne),"validationParser"in I&&e(7,g=I.validationParser),"pathParser"in I&&e(8,v=I.pathParser),"queryLanguages"in I&&e(9,y=I.queryLanguages),"queryLanguageId"in I&&e(0,b=I.queryLanguageId),"onChangeQueryLanguage"in I&&e(30,C=I.onChangeQueryLanguage),"onRenderValue"in I&&e(10,k=I.onRenderValue),"onClassName"in I&&e(11,D=I.onClassName),"onTransform"in I&&e(31,L=I.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Sn(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&E(i,P),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,ed[R]={queryOptions:te,query:P,queryLanguageId:b,isManual:W},ed),o("store state in memory",R,ed[R]))},[b,u,d,h,f,p,m,g,v,y,k,D,te,P,i,G,X,J,H,r,z,le,function(I){e(12,te=I),e(13,P=le(b).createQuery(l,I)),e(33,W=!1),o("updateQueryByWizard",{queryOptions:te,query:P,isManual:W})},function(I){e(13,P=I.target.value),e(33,W=!0),o("handleChangeQuery",{query:P,isManual:W})},function(){try{o("handleTransform",{query:P});var I=le(b).executeQuery(i,P,p);L([{op:"replace",path:an(u),value:I}]),z()}catch(N){console.error(N),e(18,H={text:""}),e(17,J=N.toString())}},function(){e(15,G=!G),e(32,ed.showWizard=G,ed)},function(){e(16,X=!X),e(32,ed.showOriginal=X,ed)},function(I){o("handleChangeQueryLanguage",I),e(0,b=I),C(I);var N=le(b);e(13,P=N.createQuery(l,te)),e(33,W=!1)},a,l,C,L,ed,W]}var uet=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,cet,set,Ti,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},eet,[-1,-1]),r}return Se(e)}(),wp={};function det(t){di(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function bue(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new ag({props:c}),Hi.push(function(){return zu(o,"value",l)}),{c:function(){n=ve("tr"),(e=ve("th")).textContent="Property",i=tt(),r=ve("td"),ft(o.$$.fragment),j(e,"class","svelte-1y818v2"),j(r,"class","svelte-1y818v2")},m:function(u,d){Pe(u,n,d),ue(n,e),ue(n,i),ue(n,r),dt(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],Uu(function(){return s=!1})),o.$set(h)},i:function(u){a||(K(o.$$.fragment,u),a=!0)},o:function(u){ae(o.$$.fragment,u),a=!1},d:function(u){u&&Fe(n),ht(o)}}}function xue(t){var n,e;return{c:function(){n=ve("div"),e=tn(t[5]),j(n,"class","jse-error svelte-1y818v2")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:function(i,r){32&r&&qn(e,i[5])},d:function(i){i&&Fe(n)}}}function het(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te,P,W,J;e=new QP({props:{title:t[4]?"Sort array items":"Sort object keys"}});var H=t[4]&&(t[3].length>1||void 0===t[1])&&bue(t);function le(N){t[15](N)}var E={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(E.value=t[2]),k=new ag({props:E}),Hi.push(function(){return zu(k,"value",le)});var I=t[5]&&xue(t);return{c:function(){n=ve("div"),ft(e.$$.fragment),i=tt(),r=ve("div"),o=ve("table"),(s=ve("colgroup")).innerHTML=' \n ',a=tt(),l=ve("tbody"),c=ve("tr"),(u=ve("th")).textContent="Path",d=tt(),h=ve("td"),f=ve("input"),m=tt(),H&&H.c(),g=tt(),v=ve("tr"),(y=ve("th")).textContent="Direction",b=tt(),C=ve("td"),ft(k.$$.fragment),L=tt(),z=ve("div"),I&&I.c(),R=tt(),U=ve("div"),G=ve("button"),X=tn("Sort"),j(u,"class","svelte-1y818v2"),j(f,"class","jse-path svelte-1y818v2"),j(f,"type","text"),f.readOnly=!0,j(f,"title","Selected path"),f.value=p=Ui(t[0])?"(whole document)":iu(ql(t[0])),j(h,"class","svelte-1y818v2"),j(y,"class","svelte-1y818v2"),j(C,"class","svelte-1y818v2"),j(o,"class","svelte-1y818v2"),j(z,"class","jse-space svelte-1y818v2"),j(G,"type","button"),j(G,"class","jse-primary svelte-1y818v2"),G.disabled=te=!!t[4]&&!t[1],j(U,"class","jse-actions svelte-1y818v2"),j(r,"class","jse-modal-contents svelte-1y818v2"),j(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(N,q){Pe(N,n,q),dt(e,n,null),ue(n,i),ue(n,r),ue(r,o),ue(o,s),ue(o,a),ue(o,l),ue(l,c),ue(c,u),ue(c,d),ue(c,h),ue(h,f),ue(l,m),H&&H.m(l,null),ue(l,g),ue(l,v),ue(v,y),ue(v,b),ue(v,C),dt(k,C,null),ue(r,L),ue(r,z),I&&I.m(z,null),ue(r,R),ue(r,U),ue(U,G),ue(G,X),P=!0,W||(J=[It(G,"click",t[8]),ya(fet.call(null,G)),ya(Ok.call(null,n,t[6]))],W=!0)},p:function(N,q){var V=zn(q,1)[0],re={};16&V&&(re.title=N[4]?"Sort array items":"Sort object keys"),e.$set(re),(!P||1&V&&p!==(p=Ui(N[0])?"(whole document)":iu(ql(N[0])))&&f.value!==p)&&(f.value=p),N[4]&&(N[3].length>1||void 0===N[1])?H?(H.p(N,V),26&V&&K(H,1)):((H=bue(N)).c(),K(H,1),H.m(l,g)):H&&(Lt(),ae(H,1,1,function(){H=null}),$t());var he={};!D&&4&V&&(D=!0,he.value=N[2],Uu(function(){return D=!1})),k.$set(he),N[5]?I?I.p(N,V):((I=xue(N)).c(),I.m(z,null)):I&&(I.d(1),I=null),(!P||18&V&&te!==(te=!!N[4]&&!N[1]))&&(G.disabled=te)},i:function(N){P||(K(e.$$.fragment,N),K(H),K(k.$$.fragment,N),P=!0)},o:function(N){ae(e.$$.fragment,N),ae(H),ae(k.$$.fragment,N),P=!1},d:function(N){N&&Fe(n),ht(e),H&&H.d(),ht(k),I&&I.d(),W=!1,so(J)}}}function fet(t){t.focus()}function pet(t,n,e){var i,r,o,s=ba("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=_a("simple-modal").close,h="".concat(a,":").concat(an(c)),f=Sn(l,c),p={value:1,label:"ascending"},m=[p,{value:-1,label:"descending"}],g=wp[h]&&wp[h].selectedProperty||void 0,v=wp[h]&&wp[h].selectedDirection||p,y=void 0;return t.$$set=function(b){"id"in b&&e(9,a=b.id),"json"in b&&e(10,l=b.json),"rootPath"in b&&e(0,c=b.rootPath),"onSort"in b&&e(11,u=b.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?hP(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(sb):void 0),10&t.$$.dirty&&void 0===g&&o&&1===o.length&&e(1,g=o[0]),4102&t.$$.dirty&&(e(12,wp[h]={selectedProperty:g,selectedDirection:v},wp),s("store state in memory",h,wp[h]))},e(4,i=Array.isArray(f)),[c,g,v,o,i,y,d,m,function(){try{var b,C;e(5,y=void 0);var k=null===(b=g)||void 0===b?void 0:b.value,D=null===(C=v)||void 0===C?void 0:C.value,L=zce(l,c,k,D);u({operations:L,rootPath:c,itemPath:k,direction:D}),d()}catch(z){e(5,y=z.toString())}},a,l,u,wp,r,function(b){e(1,g=b),e(3,o),e(13,r),e(4,i)},function(b){e(2,v=b)}]}var met=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,pet,het,Ti,{id:9,json:10,rootPath:0,onSort:11},det),r}return Se(e)}();function fh(){}function Fk(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function get(t){var n,e;return n=new Mk({props:{items:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&zn(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function vet(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,m=n.canRedo,g=n.canFormat,v=n.canCompact,y=n.canSort,b=n.canTransform,C=n.onRenderMenu;return t.$$set=function(k){"readOnly"in k&&e(1,s=k.readOnly),"onFormat"in k&&e(2,a=k.onFormat),"onCompact"in k&&e(3,l=k.onCompact),"onSort"in k&&e(4,c=k.onSort),"onTransform"in k&&e(5,u=k.onTransform),"onToggleSearch"in k&&e(6,d=k.onToggleSearch),"onUndo"in k&&e(7,h=k.onUndo),"onRedo"in k&&e(8,f=k.onRedo),"canUndo"in k&&e(9,p=k.canUndo),"canRedo"in k&&e(10,m=k.canRedo),"canFormat"in k&&e(11,g=k.canFormat),"canCompact"in k&&e(12,v=k.canCompact),"canSort"in k&&e(13,y=k.canSort),"canTransform"in k&&e(14,b=k.canTransform),"onRenderMenu"in k&&e(15,C=k.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:rj,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!g},{type:"button",icon:XQe,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:_k,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:gk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!b},{type:"button",icon:BP,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:$P,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:LP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!m},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,r]}var yet=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,vet,get,Ti,{readOnly:1,onFormat:2,onCompact:3,onSort:4,onTransform:5,onToggleSearch:6,onUndo:7,onRedo:8,canUndo:9,canRedo:10,canFormat:11,canCompact:12,canSort:13,canTransform:14,onRenderMenu:15}),r}return Se(e)}(),ao=function(){function t(){Ce(this,t)}return Se(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),Pk.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),Pk.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new Sb(this),o=new Sb(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new Sb(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new Cue(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Sue(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new id(n):Pk.from(id.split(n,[])):t.empty}}]),t}(),id=function(t){wt(e,ao);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function _et(t){var n,e=-1,i=Re(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return Ce(this,e),(r=n.call(this)).text=i,r.length=o,r}return Se(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new bet(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(wue(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=jk(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return hr(Wi(e.prototype),"replace",this).call(this,i,r,o);var s=jk(this.text,jk(o.text,wue(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):Pk.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=Re(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),Pk=function(t){wt(e,ao);var n=Ct(e);function e(i,r){var o;Ce(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=Re(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return Se(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return hr(Wi(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return hr(Wi(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=zn(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(R,U){return R+U.length+1},-1),s=0,a=Re(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(R){a.e(R)}finally{a.f()}if(s<32){var c,u=[],d=Re(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(R){d.e(R)}finally{d.f()}return new id(u,o)}var f=Math.max(32,s>>5),p=f<<1,m=f>>1,g=[],v=0,y=-1,b=[];function C(R){var U;if(R.lines>p&&R instanceof e){var G,X=Re(R.children);try{for(X.s();!(G=X.n()).done;)C(G.value)}catch(te){X.e(te)}finally{X.f()}}else R.lines>m&&(v>m||!v)?(k(),g.push(R)):R instanceof id&&v&&(U=b[b.length-1])instanceof id&&R.lines+U.lines<=32?(v+=R.lines,y+=R.length+1,b[b.length-1]=new id(U.text.concat(R.text),U.length+1+R.length)):(v+R.lines>f&&k(),v+=R.lines,y+=R.length+1,b.push(R))}function k(){0!=v&&(g.push(1==b.length?b[0]:e.from(b,y)),y=-1,v=b.length=0)}var D,L=Re(i);try{for(L.s();!(D=L.n()).done;)C(D.value)}catch(R){L.e(R)}finally{L.f()}return k(),1==g.length?g[0]:new e(g,o)}}]),e}();function jk(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;Ce(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof id?n.text.length:n.children.length)<<1]}return Se(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof id?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof id){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof id?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),Cue=function(){function t(n,e,i){Ce(this,t),this.value="",this.done=!1,this.cursor=new Sb(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return Se(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),Sue=function(){function t(n){Ce(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return Se(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),t}();typeof Symbol<"u"&&(ao.prototype[Symbol.iterator]=function(){return this.iter()},Sb.prototype[Symbol.iterator]=Cue.prototype[Symbol.iterator]=Sue.prototype[Symbol.iterator]=function(){return this});for(var bet=function(){function t(n,e,i,r){Ce(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return Se(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),U0="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(function(t){return t?parseInt(t,36):1}),Rk=1;Rkt)return U0[n-1]<=t;return!1}function kue(t){return t>=127462&&t<=127487}function Dl(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?wet:Due)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function Due(t,n,e){if(n==t.length)return n;n&&Tue(t.charCodeAt(n))&&Eue(t.charCodeAt(n-1))&&n--;var i=$a(t,n);for(n+=kc(i);n=0&&kue($a(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function wet(t,n,e){for(;n>0;){var i=Due(t,n-2,e);if(i=56320&&t<57344}function Eue(t){return t>=55296&&t<56320}function $a(t,n){var e=t.charCodeAt(n);if(!Eue(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return Tue(i)?i-56320+(e-55296<<10)+65536:e}function pj(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function kc(t){return t<65536?1:2}var mj=/\r\n?|\n/,Tl=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Tl||(Tl={})),z0=function(){function t(n){Ce(this,t),this.sections=n}return Se(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Tl.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Tl.Simple&&c>=n&&(i==Tl.TrackDel&&rn||i==Tl.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),rd=function(t){wt(e,z0);var n=Ct(e);function e(i,r){var o;return Ce(this,e),(o=n.call(this,i)).inserted=r,o}return Se(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return gj(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return vj(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){gj(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return z0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new kb(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&Cp(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||m<0||v>r)throw new RangeError("Invalid change range ".concat(m," to ").concat(v," (in doc of length ").concat(r,")"));var b=y?"string"==typeof y?ao.of(y.split(o||mj)):y:ao.empty,C=b.length;if(m==v&&0==C)return;ml&&sl(s,m-l,-1),sl(s,v-m,C),Cp(a,s,b),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function Cp(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function vj(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new kb(t),a=new kb(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);sl(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?rd.createSet(r,o):z0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new kb(t),s=new kb(n),a=!1;;){if(o.done&&s.done)return r?rd.createSet(i,r):z0.create(i);if(0==o.ins)sl(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;sl(i,l,u,a),r&&u&&Cp(r,i,s.text)}else-1==s.ins?(sl(i,o.off?0:o.len,l,a),r&&Cp(r,i,o.textBit(l))):(sl(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&Cp(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else sl(i,0,s.ins,a),r&&Cp(r,i,s.text),s.next()}}var kb=function(){function t(n){Ce(this,t),this.set=n,this.i=0,this.next()}return Se(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?ao.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?ao.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),Lk=function(){function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.flags=i}return Se(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return Qt.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return Qt.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Qt.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),Qt=function(){function t(n,e){Ce(this,t),this.ranges=n,this.mainIndex=e}return Se(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return Lk.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return Lk.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function Mue(t,n){var e,i=Re(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var yj=0,Qn=function(){function t(n,e,i,r,o){Ce(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=yj++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return Se(t,[{key:"of",value:function(n){return new $k([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $k(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $k(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:_j),!!n.static,n.enables)}}]),t}();function _j(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var $k=function(){function t(n,e,i,r){Ce(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=yj++}return Se(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=Re(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(m){f.e(m)}finally{f.f()}return{create:function(m){return m.values[l]=o(m),1},update:function(m,g){if(u&&g.docChanged||d&&(g.docChanged||g.selection)||bj(m,h)){var v=o(m);if(c?!Oue(v,m.values[l],s):!s(v,m.values[l]))return m.values[l]=v,1}return 0},reconfigure:function(m,g){var v,y=g.config.address[a];if(null!=y){var b=Bk(g,y);if(r.dependencies.every(function(C){return C instanceof Qn?g.facet(C)===m.facet(C):!(C instanceof Ba)||g.field(C,!1)==m.field(C,!1)})||(c?Oue(v=o(m),b,s):s(v=o(m),b)))return m.values[l]=b,0}else v=o(m);return m.values[l]=v,1}}}}]),t}();function Oue(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,Iue.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(yj++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function Db(t){return function(n){return new Nue(n,t)}}var G0={highest:Db(0),high:Db(1),default:Db(2),low:Db(3),lowest:Db(4)},Nue=Se(function t(n,e){Ce(this,t),this.inner=n,this.prec=e}),Sp=function(){function t(){Ce(this,t)}return Se(t,[{key:"of",value:function(n){return new wj(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),wj=Se(function t(n,e){Ce(this,t),this.compartment=n,this.inner=e}),Fue=function(){function t(n,e,i,r,o,s){for(Ce(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,k,D,L,z,o=[],s=Object.create(null),a=new Map,l=Re((C=n,k=e,D=a,L=[[],[],[],[],[]],z=new Map,function R(U,G){var X=z.get(U);if(null!=X){if(X<=G)return;var te=L[X].indexOf(U);te>-1&&L[X].splice(te,1),U instanceof wj&&D.delete(U.compartment)}if(z.set(U,G),Array.isArray(U)){var P,W=Re(U);try{for(W.s();!(P=W.n()).done;)R(P.value,G)}catch(le){W.e(le)}finally{W.f()}}else if(U instanceof wj){if(D.has(U.compartment))throw new RangeError("Duplicate use of compartment in extensions");var J=k.get(U.compartment)||U.inner;D.set(U.compartment,J),R(J,G)}else if(U instanceof Nue)R(U.inner,U.prec);else if(U instanceof Ba)L[G].push(U),U.provides&&R(U.provides,G);else if(U instanceof $k)L[G].push(U),U.facet.extensions&&R(U.facet.extensions,2);else{var H=U.extension;if(!H)throw new Error("Unrecognized extension value in extension set (".concat(U,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));R(H,G)}}(C,2),L.reduce(function(U,G){return U.concat(G)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Ba?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=m[p];u[C.id]=h.length<<1,h.push(function(k){return C.slot(k)})},p=0,m=o;p>1;function I(N){for(var q=[],V=0;V>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function Bk(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Pue=Qn.define(),jue=Qn.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Rue=Qn.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Lue=Qn.define(),$ue=Qn.define(),Bue=Qn.define(),Vue=Qn.define({combine:function(t){return!!t.length&&t[0]}}),kp=function(){function t(n,e){Ce(this,t),this.type=n,this.value=e}return Se(t,null,[{key:"define",value:function(){return new Tet}}]),t}(),Tet=function(){function t(){Ce(this,t)}return Se(t,[{key:"of",value:function(n){return new kp(this,n)}}]),t}(),Eet=function(){function t(n){Ce(this,t),this.map=n}return Se(t,[{key:"of",value:function(n){return new cr(this,n)}}]),t}(),cr=function(){function t(n,e){Ce(this,t),this.type=n,this.value=e}return Se(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new Eet((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=Re(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();cr.reconfigure=cr.define(),cr.appendConfig=cr.define();var Yl=function(){function t(n,e,i,r,o,s){Ce(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&Mue(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return Se(t,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(n){var e,i=Re(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function Aet(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=Hue(u,Cj(l,h,a.changes.newLength),!0))}return u==a?a:Yl.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=Re(c.facet(Lue));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:Aet(u,h))}}catch(b){d.e(b)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=rd.empty(c.doc.length);else{var m=a.changes.filter(u);f=m.changes,p=m.filtered.mapDesc(m.changes).invertedDesc}a=Yl.create(c,f,a.selection&&a.selection.map(p),cr.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var g=c.facet($ue),v=g.length-1;v>=0;v--){var y=g[v](a);a=y instanceof Yl?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Yl?y[0]:Uue(c,W0(y),!1)}return a}(s):s)}Yl.time=kp.define(),Yl.userEvent=kp.define(),Yl.addToHistory=kp.define(),Yl.remote=kp.define();var Met=[];function W0(t){return null==t?Met:Array.isArray(t)?t:[t]}var Sj,is=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(is||(is={})),Oet=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{Sj=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var Ao=function(){function t(n,e,i,r,o,s){Ce(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return Tb(this,i),Bk(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof rd?n:rd.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return ao.of(n.split(this.facet(t.lineSeparator)||mj))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(Tb(this,e),Bk(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Ba&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(Vue)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=Re(this.facet(Pue));try{for(s.s();!(i=s.n()).done;){var a,c=Re((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function Iet(t){return function(n){if(!/\S/.test(n))return is.Space;if(function(i){if(Sj)return Sj.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||Oet.test(o)))return!0}return!1}(n))return is.Word;for(var e=0;e-1)return is.Word;return is.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Dl(i,a,!1);if(s(i.slice(c,a))!=is.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:Qt.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Fue.resolve(n.extensions||[],new Map),i=n.doc instanceof ao?n.doc:ao.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||mj)),r=n.selection?n.selection instanceof Qt?n.selection:Qt.single(n.selection.anchor,n.selection.head):Qt.single(0);return Mue(r,i.length),e.staticFacet(jue)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function lu(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=Re(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();cg.prototype.startSide=cg.prototype.endSide=0,cg.prototype.point=!1,cg.prototype.mapMode=Tl.TrackDel;var kj=function(){function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.value=i}return Se(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function Dj(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var Net=function(){function t(n,e,i,r){Ce(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Ho=function(){function t(n,e,i,r){Ce(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=Re(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(Dj)),this.isEmpty)return i.length?t.of(i):this;for(var d=new Gue(this,null,-1).goto(0),h=0,f=[],p=new ug;d.value||h=0){var m=i[h++];p.addInner(m.from,m.to,m.value)||f.push(m)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Tj.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Tj.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=zue(s,a,i),c=new Eb(s,l,o),u=new Eb(a,l,o);i.iterGaps(function(d,h,f){return Wue(c,d,u,h,f,r)}),i.empty&&0==i.length&&Wue(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=zue(o,s),l=new Eb(o,a,0).goto(i),c=new Eb(s,a,0).goto(i);;){if(l.to!=c.to||!Aj(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new Eb(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new ug,o=Re(n instanceof kj?[n]:i?function Fet(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(Dj);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Ho.empty=new Ho([],[],null,-1),Ho.empty.nextLayer=Ho.empty;var ug=function(){function t(){Ce(this,t),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return Se(t,[{key:"finishChunk",value:function(n){this.chunks.push(new Net(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Ho.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Ho.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function zue(t,n,e){var i,r=new Map,o=Re(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;Ce(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return Se(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=Re(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)Ej(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=Re(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)Ej(this.heap,o);(this.to-n||this.value.endSide-e)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),Ej(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new Gue(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function Ej(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var Eb=function(){function t(n,e,i){Ce(this,t),this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Tj.from(n,e,i)}return Se(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){Vk(this.active,n),Vk(this.activeTo,n),Vk(this.activeRank,n),this.minActive=que(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Vk(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function Wue(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&Aj(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!Aj(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function Aj(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function que(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Dl(t,r)}return!0===i?-1:t.length}for(var Yue=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),Oj=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Xue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},Dp=function(){function t(n,e){Ce(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var m=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(g){return a.map(function(v){return g.replace(/&/,v)})}).reduce(function(g,v){return g.concat(v)}),m,c);else if(m&&"object"==gn(m)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,d,f)}else null!=m&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()})+": "+m+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return Se(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=Xue[Yue]||1;return Xue[Yue]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[Oj]||new Pet(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),Uk=null,Pet=function(){function t(n){if(Ce(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Uk)return n.adoptedStyleSheets=[Uk.sheet].concat(n.adoptedStyleSheets),n[Oj]=Uk;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),Uk=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[Oj]=this}return Se(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Jue=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),jet=typeof navigator<"u"&&/Mac/.test(navigator.platform),Ret=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Let=jet||Jue&&+Jue[1]<57,Va=0;Va<10;Va++)Tp[48+Va]=Tp[96+Va]=String(Va);for(Va=1;Va<=24;Va++)Tp[Va+111]="F"+Va;for(Va=65;Va<=90;Va++)Tp[Va]=String.fromCharCode(Va+32),Mb[Va]=String.fromCharCode(Va);for(var Ij in Tp)Mb.hasOwnProperty(Ij)||(Mb[Ij]=Tp[Ij]);function zk(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function q0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function Gk(t,n){if(!n.anchorNode)return!1;try{return q0(t,n.anchorNode)}catch{return!1}}function Ob(t){return 3==t.nodeType?X0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Wk(t,n,e,i){return!!e&&(Kue(t,n,e,i,-1)||Kue(t,n,e,i,1))}function qk(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function Kue(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:Ib(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=qk(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?Ib(t):0}}}function Ib(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var Que={left:0,right:0,top:0,bottom:0};function Nj(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function $et(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var Zue,Bet=function(){function t(){Ce(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Se(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),Y0=null;function ede(t){if(t.setActive)return t.setActive();if(Y0)return t.focus(Y0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==Y0?{get preventScroll(){return Y0={preventScroll:!0},!0}}:void 0),!Y0){Y0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=Zue||(Zue=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function J0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function tde(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Dc=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Ce(this,t),this.node=n,this.offset=e,this.precise=i}return Se(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,qk(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,qk(n)+1,e)}}]),t}(),Fj=[],ys=function(){function t(){Ce(this,t),this.parent=null,this.dom=null,this.dirty=2}return Se(t,[{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(n){var e,i=this.posAtStart,r=Re(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=Re(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=nde(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=nde(i)}else if(1&this.dirty){var u,d=Re(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==Ib(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fj;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function nde(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}ys.prototype.breakAfter=0;var ide=function(){function t(n,e,i){Ce(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return Se(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function rde(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),Zn={mac:ude||/Mac/.test(Tc.platform),windows:/Win/.test(Tc.platform),linux:/Linux|X11/.test(Tc.platform),ie:Yk,ie_version:sde?Pj.documentMode||6:Rj?+Rj[1]:jj?+jj[1]:0,gecko:ade,gecko_version:ade?+(/Firefox\/(\d+)/.exec(Tc.userAgent)||[0,0])[1]:0,chrome:!!Lj,chrome_version:Lj?+Lj[1]:0,ios:ude,android:/Android\b/.test(Tc.userAgent),webkit:lde,safari:cde,webkit_version:lde?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=Pj.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},Nb=function(t){wt(e,ys);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).text=i,r}return Se(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Dc(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return $j(this.dom,i,r)}}]),e}(),dg=function(t){wt(e,ys);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Ce(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=Re(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(An(r))}catch(u){l.e(u)}finally{l.f()}return r}return Se(e,[{key:"setAttrs",value:function(i){if(tde(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),hr(Wi(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return fde(this,i)}},{key:"coordsAt",value:function(i,r){return mde(this,i,r)}}]),e}();function $j(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?Zn.chrome||Zn.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return Zn.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?Nj(l,s<0):l||null}var Bj=function(t){wt(e,ys);var n=Ct(e);function e(i,r,o){var s;return Ce(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return Se(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:Nj(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){hr(Wi(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),dde=function(t){wt(e,Bj);var n=Ct(e);function e(){return Ce(this,e),n.apply(this,arguments)}return Se(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?Vj(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Dc(s,Math.min(a,s.nodeValue.length))}):new Dc(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?hde(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?Vj(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return $j(a,l,c)}):$j(a,i,r)}},{key:"destroy",value:function(){var i;hr(Wi(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function Vj(t,n,e,i,r,o){if(e instanceof dg){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=ys.get(s);if(!a)return o(t,n);var l=q0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return ao.empty}}]),e}();function fde(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof dg&&r.length&&(i=r[r.length-1])instanceof dg&&i.mark.eq(n.mark)?pde(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function mde(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new gde(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new Fb(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=vde(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new Fb(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new Wj(i)}},{key:"set",value:function(i){return Ho.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();mi.none=Ho.empty;var gde=function(t){wt(e,mi);var n=Ct(e);function e(i){var r;Ce(this,e);var o=vde(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return Se(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&zj(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return hr(Wi(e.prototype),"range",this).call(this,i,r)}}]),e}();gde.prototype.point=!1;var Wj=function(t){wt(e,mi);var n=Ct(e);function e(i){return Ce(this,e),n.call(this,-2e8,-2e8,null,i)}return Se(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&zj(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return hr(Wi(e.prototype),"range",this).call(this,i,r)}}]),e}();Wj.prototype.mapMode=Tl.TrackBefore,Wj.prototype.point=!0;var Fb=function(t){wt(e,mi);var n=Ct(e);function e(i,r,o,s,a,l){var c;return Ce(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Tl.TrackBefore:Tl.TrackAfter:Tl.TrackDel,c}return Se(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return hr(Wi(e.prototype),"range",this).call(this,i,r)}}]),e}();function vde(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function qj(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}Fb.prototype.point=!0;var od=function(t){wt(e,ys);var n=Ct(e);function e(){var i;return Ce(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),ode(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){zj(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){pde(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=Uj(r,this.attrs||{})),o&&(this.attrs=Uj({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return fde(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(tde(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Gj(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),hr(Wi(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&ys.get(s)instanceof dg;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=ys.get(s))||void 0===o?void 0:o.isEditable)||Zn.ios&&this.children.some(function(l){return l instanceof Nb})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof Nb)||/[^ -~]/.test(s.text))return null;var a=Ob(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return mde(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return go.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),Yj=function(t){wt(e,ys);var n=Ct(e);function e(i,r,o){var s;return Ce(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(Xk(new Hj(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(Xk(new Nb(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof Fb){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof Fb)if(i.block){var l=i.type;l!=go.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Yj(i.widget||new yde("div"),a,l))}else{var c=Bj.create(i.widget||new yde("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(Xk(new Hj(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(Xk(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Ho.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function Xk(t,n){var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)t=new dg(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var yde=function(t){wt(e,Ep);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).tag=i,r}return Se(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),_de=Qn.define(),bde=Qn.define(),xde=Qn.define(),wde=Qn.define(),Xj=Qn.define(),Cde=Qn.define(),Sde=Qn.define(),kde=Qn.define({combine:function(t){return t.some(function(n){return n})}}),Dde=Qn.define({combine:function(t){return t.some(function(n){return n})}}),Tde=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;Ce(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return Se(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),Ede=cr.define({map:function(t,n){return t.map(n)}});function Ec(t,n,e){var i=t.facet(wde);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var Jk=Qn.define({combine:function(t){return!t.length||t[0]}}),Uet=0,Pb=Qn.define(),wa=function(){function t(n,e,i,r){Ce(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return Se(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(Uet++,n,i.eventHandlers,function(a){var l=[Pb.of(a)];return s&&l.push(jb.of(function(c){var u=c.plugin(a);return u?s(u):mi.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),Jj=function(){function t(n){Ce(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return Se(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Ec(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Ec(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Ec(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),Ade=Qn.define(),Kj=Qn.define(),jb=Qn.define(),Mde=Qn.define(),Ode=Qn.define(),Rb=Qn.define(),K0=function(){function t(n,e,i,r){Ce(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return Se(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),Ide=function(){function t(n,e,i){Ce(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=rd.empty(this.startState.doc.length);var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new K0(l,c,u,d))}),this.changedRanges=a}return Se(t,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some(function(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),rs=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(rs||(rs={})),Qj=rs.LTR,zet=rs.RTL;function Nde(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),os=[];function Lde(t){return[new Q0(0,t,0)]}var $de="";function Xet(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=Q0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Dl(t.text,s,u);if($de=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return Qt.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=Re(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=ys.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function Vde(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var Hde=Se(function t(n,e){Ce(this,t),this.node=n,this.offset=e,this.pos=-1}),Ude=function(t){wt(e,ys);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).view=i,r.compositionDeco=mi.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new od],r.children[0].setParent(An(r)),r.updateDeco(),r.updateInner([new K0(0,0,0,i.state.doc.length)],0),r}return Se(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=mi.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=Gde(a);if(!c)return mi.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),m=Math.max(p,l.mapPos(d,-1)),g=a.state,v=3==h.nodeType?h.nodeValue:new Bde([],g).readRange(h.firstChild,null).text;if(m-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=Het.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,m=h.openStart,g=h.openEnd,v=o.findPos(c,1),y=v.i,b=v.off,C=o.findPos(l,-1);rde(this,C.i,C.off,y,b,f,p,m,g)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(Zn.gecko&&a.empty&&function Jet(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Dc(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&Wk(l.node,l.offset,d.anchorNode,d.anchorOffset)&&Wk(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){Zn.android&&Zn.chrome&&i.dom.contains(d.focusNode)&&function ett(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=zk(i.view.root);if(h)if(a.empty){if(Zn.gecko){var f=function Qet(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var g=[c,l];l=g[0],c=g[1]}m.setEnd(c.node,c.offset),m.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(m)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Dc(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Dc(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=zk(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=od.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||Gk(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=ys.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=go.WidgetBefore&&a.type!=go.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==go.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==rs.LTR,d=0,h=0;hs)break;if(d>=o){var m=f.dom.getBoundingClientRect();if(r.push(m.height),l){var g=f.dom.lastChild,v=g?Ob(g):[];if(v.length){var y=v[v.length-1],b=u?y.right-m.left:m.right-y.left;b>c&&(c=b,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?rs.RTL:rs.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof od){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=Ob(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new ide(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(mi.replace({widget:new zde(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return mi.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(jb).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=Re(this.view.state.facet(Ode).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var m=p.left,g=p.right,v=p.top,y=p.bottom;null!=m&&(c=Math.max(c,m)),null!=g&&(u=Math.max(u,g)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,k,D,L,z,R,U,G){for(var X=C.ownerDocument,te=X.defaultView||window,P=C;P;)if(1==P.nodeType){var W=void 0,J=P==X.body;if(J)W=$et(te);else{if(P.scrollHeight<=P.clientHeight&&P.scrollWidth<=P.clientWidth){P=P.assignedSlot||P.parentNode;continue}var H=P.getBoundingClientRect();W={left:H.left,right:H.left+P.clientWidth,top:H.top,bottom:H.top+P.clientHeight}}var le=0,E=0;if("nearest"==z)k.top0&&k.bottom>W.bottom+E&&(E=k.bottom-W.bottom+E+U)):k.bottom>W.bottom&&(E=k.bottom-W.bottom+U,D<0&&k.top-E0&&k.right>W.right+le&&(le=k.right-W.right+le+R)):k.right>W.right&&(le=k.right-W.right+R,D<0&&k.left0&&e<=0)n=Ib(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var Zet=function(){function t(){Ce(this,t),this.changes=[]}return Se(t,[{key:"compareRange",value:function(n,e){qj(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){qj(n,e,this.changes)}}]),t}();function ttt(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function ntt(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function t4(t,n){return t.topn.top+1}function qde(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function n4(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=Ob(h),p=0;pv||s==v&&o>g){i=h,r=m,o=g,s=v;var y=v?e0?p0)}0==g?e>m.bottom&&(!c||c.bottomm.top)&&(l=h,u=m):c&&t4(c,m)?c=Yde(c,m.bottom):u&&t4(u,m)&&(u=qde(u,m.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var b=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?Xde(i,b,e):d&&"false"!=i.contentEditable?n4(i,b,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function Xde(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((Zn.chrome||Zn.gecko)&&X0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function Jde(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=go.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:Kde(t,s,r,c,u);var m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=g.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,b=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(m.caretPositionFromPoint){var C=m.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,b=C.offset)}else if(m.caretRangeFromPoint){var k=m.caretRangeFromPoint(c,u);k&&(b=k.startOffset,(!t.contentDOM.contains(y=k.startContainer)||Zn.safari&&function itt(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return X0(t,i-1,i).getBoundingClientRect().left>e}(y,b,c)||Zn.chrome&&function rtt(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():X0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,b,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var D=od.find(t.docView,p);if(!D)return d>r.top+r.height/2?r.to:r.from;var L=n4(D.dom,c,u);y=L.node,b=L.offset}var z=t.docView.nearest(y);if(!z)return null;if(z.isWidget){var R=z.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+Mj(s,o,t.state.tabSize)}function Qde(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=Xet(r,o,s,a,e),u=$de;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=Qt.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function i4(t,n,e){for(var i=t.state.facet(Mde).map(function(a){return a(t)});;){var r,o=!1,s=Re(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?Qt.cursor(a,1):Qt.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var stt=function(){function t(n){var e=this;Ce(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=oa[s];n.contentDOM.addEventListener(s,function(l){the(n,l)&&i(a,l)},r4[s]),e.registeredEvents.push(s)};for(var o in oa)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(oa.mousedown,s)}),Zn.chrome&&102==Zn.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,Zn.safari&&n.contentDOM.addEventListener("input",function(){return null})}return Se(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=Re(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){the(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=Re(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Ec(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=Re(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Ec(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,J0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(Zn.safari&&!Zn.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),Zde=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],att="dthko",ehe=[16,17,18,20,91,92,224,225];function Kk(t){return.7*t+8}var ltt=function(){function t(n,e,i,r){Ce(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Ao.allowMultipleSelections)&&(a=e,(l=n.state.facet(_de)).length?l[0](a):Zn.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(bde);return l.length?l[0](a):Zn.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=zk(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=dhe(e))&&null}return Se(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-Kk(o.left-n.clientX):n.clientX>=o.right&&(i=Kk(n.clientX-o.right)),n.clientY<=o.top?r=-Kk(o.top-n.clientY):n.clientY>=o.bottom&&(r=Kk(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.scroll()},50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}},{key:"scroll",value:function(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}},{key:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function the(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=ys.get(i))&&e.ignoreEvent(n))return!1;return!0}var oa=Object.create(null),r4=Object.create(null),nhe=Zn.ie&&Zn.ie_version<15||Zn.ios&&Zn.webkit_version<604;function ihe(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=o4&&i.selection.ranges.every(function(c){return c.empty})&&o4==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:Qt.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:Qt.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function rhe(t,n,e,i){if(1==i)return Qt.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return Qt.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,m=f;u<0?p=Dl(h.text,f,!1):m=Dl(h.text,f);for(var g=d(h.text.slice(p,m));p>0;){var v=Dl(h.text,p,!1);if(d(h.text.slice(v,p))!=g)break;p=v}for(;mDate.now()-2e3)){var e,i=null,r=Re(t.state.facet(xde));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=ahe(s=t,a=n),c=dhe(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=ahe(s,d),m=rhe(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var g=rhe(s,l.pos,l.bias,c),v=Math.min(g.from,m.from),y=Math.max(g.to,m.to);m=v1&&u.ranges.some(function(b){return b.eq(m)})?function(b,C){for(var k=0;;k++)if(b.ranges[k].eq(C))return Qt.create(b.ranges.slice(0,k).concat(b.ranges.slice(k+1)),b.mainIndex==k?0:b.mainIndex-(b.mainIndex>k?1:0))}(u,m):f?u.addRange(m):Qt.create([m])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new ltt(t,n,i,o)),o&&t.observer.ignore(function(){return ede(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var ohe=function(t,n){return t>=n.top&&t<=n.bottom},she=function(t,n,e){return ohe(n,e)&&t>=e.left&&t<=e.right};function ctt(t,n,e,i){var r=od.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&she(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&she(e,i,a)?1:s&&ohe(i,s)?-1:1}function ahe(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:ctt(t,e,n.clientX,n.clientY)}}var utt=Zn.ie&&Zn.ie_version<=11,lhe=null,che=0,uhe=0;function dhe(t){if(!utt)return t.detail;var n=lhe,e=uhe;return lhe=t,uhe=Date.now(),che=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(che+1)%3:1}function hhe(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}oa.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},oa.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&hhe(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;am&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),m=y.number}}catch(b){g.e(b)}finally{g.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){o4=o?i:null;var s=nhe?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var fhe=kp.define();function phe(t,n){var e,i=[],r=Re(t.facet(Sde));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:fhe.of(!0)}):null}function mhe(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=phe(t.state,n);e?t.dispatch(e):t.update([])}},10)}oa.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),mhe(t)},oa.blur=function(t){t.observer.clearSelectionRange(),mhe(t)},oa.compositionstart=oa.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},oa.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,Zn.chrome&&Zn.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},oa.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},oa.beforeinput=function(t,n){var e,i;if(Zn.chrome&&Zn.android&&(i=Zde.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var ghe=["pre-wrap","normal","pre-line","break-spaces"],dtt=function(){function t(n){Ce(this,t),this.lineWrapping=n,this.doc=ao.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Se(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return ghe.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;Ce(this,t),this.length=n,this.height=e,this.flags=i}return Se(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Uo.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Uo.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),mh=function(t){wt(e,vhe);var n=Ct(e);function e(i,r){var o;return Ce(this,e),(o=n.call(this,i,r,go.Text)).collapsed=0,o.widgetHeight=0,o}return Se(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof Z0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof Z0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):sd.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),Z0=function(t){wt(e,sd);var n=Ct(e);function e(i){return Ce(this,e),n.call(this,i,0)}return Se(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,m=Math.max(o,i-p/2);return new hg(f.from,f.length,m,p,go.Text)}var g=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+g);return new hg(v.from,v.length,o+u*g,u,go.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Uo.ByHeight)return this.blockAt(i,o,s,a);if(r==Uo.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new hg(c,l.to-c,0,0,go.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,m=o.doc.lineAt(i),g=f+m.length*p,v=m.number-h;return new hg(m.from,m.length,Math.max(s,Math.min(s+f*v+p*(m.from-a-v),s+this.height-g)),g,go.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var m=o.doc.lineAt(f);if(f==i){var g=m.number-u;p+=d*g+h*(i-a-g)}var v=d+h*m.length;l(new hg(m.from,m.length,p,v,go.Text)),p+=v,f=m.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return sd.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new mh(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=sd.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),ftt=function(t){wt(e,sd);var n=Ct(e);function e(i,r,o){var s;return Ce(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return Se(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Uo.ByPosNoHeight?Uo.ByPosNoHeight:Uo.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Uo.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=Re(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&yhe(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?sd.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function yhe(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof Z0&&(i=t[n+1])instanceof Z0&&t.splice(n-1,3,new Z0(e.length+1+i.length))}var ptt=function(){function t(n,e){Ce(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return Se(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof mh?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new mh(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new mh(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new Z0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof mh)return n;var e=new mh(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=go.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=go.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof mh||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function ytt(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var s4=function(){function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.size=i}return Se(t,[{key:"draw",value:function(n){return mi.replace({widget:new _tt(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new Qk(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?bhe:new xtt(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:Lb(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(jb).filter(function(c){return"function"!=typeof c});var o=K0.extendWithRanges(n.changedRanges,function mtt(t,n,e){var i=new gtt;return Ho.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:rd.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(Dde)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?rs.RTL:rs.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?ytt:vtt)(e,this.paddingTop),p=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var b=n.docView.measureTextSize(),C=b.lineHeight,k=b.charWidth;(s=C>0&&r.refresh(o,C,k,v/k,y))&&(n.docView.minWidth=0,c|=8)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),r.heightChanged=!1;var D,L=Re(this.viewports);try{for(L.s();!(D=L.n()).done;){var z=D.value,R=z.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(z);this.heightMap=(s?sd.empty().applyChanges(this.stateDeco,ao.empty,this.heightOracle,[new K0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new htt(z.from,R))}}catch(G){L.e(G)}finally{L.f()}r.heightChanged&&(c|=2)}var U=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return U&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||U)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),c}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new Qk(r.lineAt(this.visibleTop-1e3*i,Uo.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Uo.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Uo.ByPos,o,0,0);l=new Qk(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Uo.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Uo.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=rs.LTR&&!r)return[];var l,c=[],u=function X(te,P,W,J){if(!(P-tete&&N=W.from&&re.to<=W.to&&Math.abs(re.from-te)he})});if(!q){if(P=P})){var V=e.moveToLineBoundary(Qt.cursor(P),!1,!0).head;V>te&&(P=V)}q=new s4(te,P,i.gapSize(W,te,P,J))}c.push(q)}},d=Re(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,m,h,f),g=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||Lb(this.heightMap.lineAt(n,Uo.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return Lb(this.heightMap.lineAt(this.scaler.fromDOM(n),Uo.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return Lb(this.heightMap.blockAt(this.scaler.fromDOM(n),this.heightOracle,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),t}(),Qk=Se(function t(n,e){Ce(this,t),this.from=n,this.to=e});function btt(t,n,e){var i=[],r=t,o=0;return Ho.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function eD(t,n){var e,i=0,r=Re(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var bhe={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},xtt=function(){function t(n,e,i){Ce(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Uo.ByPos,n,0,0).top,p=e.lineAt(h,Uo.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=Re(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return Se(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),l4=Dp.newName(),xhe=Dp.newName(),whe=Dp.newName(),Che={"&light":"."+xhe,"&dark":"."+whe};function c4(t,n,e){return new Dp(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var wtt=c4("."+l4,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Che),Ctt=Se(function t(n,e,i,r){Ce(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var m=f.observer.selectionRange,g=m.anchorNode,v=m.anchorOffset,y=m.focusNode,b=m.focusOffset;return g&&(p.push(new Hde(g,v)),y==g&&b==v||p.push(new Hde(y,b))),p}(n),c=new Bde(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var m=f[0].pos,g=2==f.length?f[1].pos:m;return m>-1&&g>-1?Qt.single(m+p,g+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!q0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!q0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=Qt.single(h,d)}});function She(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||Zn.android&&n.text.length0&&J>0&&R.charCodeAt(W-1)==U.charCodeAt(J-1);)W--,J--;return"end"==X&&(G-=W+Math.max(0,P-Math.min(W,J))-P),W=W?P-G:0)+(J-W),W=P):J=J?P-G:0)+(W-J),J=P),{from:P,toA:W,toB:J}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(Zn.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:ao.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(Jk)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(Zn.mac||Zn.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=Qt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:ao.of([" "])}):Zn.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=Qt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:ao.of([" "])}),e){var d=t.state;if(Zn.ios&&t.inputState.flushIOSKey(t)||Zn.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&J0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&J0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&J0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(Cde).some(function(R){return R(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+m))}else{var g=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=g.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),b=Gde(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,k=r.to-r.from;h=d.changeByRange(function(R){if(R.from==r.from&&R.to==r.to)return{changes:g,range:v||R.map(g)};var U=R.to-C,G=U-y.length;if(R.to-R.from!=k||t.state.sliceDoc(G,U)!=y||b&&R.to>=b.from&&R.from<=b.to)return{range:R};var X=d.changes({from:G,to:U,insert:e.insert}),te=R.to-r.to;return{changes:X,range:v?Qt.range(Math.max(0,v.anchor+te),Math.max(0,v.head+te)):R.map(X)}})}else h={changes:g,selection:v&&d.selection.replaceRange(v)}}var D="input.type";return t.composing&&(D+=".compose",t.inputState.compositionFirstChange&&(D+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:D}),!0}if(i&&!i.main.eq(r)){var L=!1,z="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(L=!0),z=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:L,userEvent:z}),!0}return!1}var Stt={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},u4=Zn.ie&&Zn.ie_version<=11,ktt=function(){function t(n){var e=this;Ce(this,t),this.view=n,this.active=!1,this.selectionRange=new Bet,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(Zn.ie&&Zn.ie_version<=11||Zn.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),u4&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(function(){var i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return Se(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(Jk)?i.root.activeElement==this.dom:Gk(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(Zn.ie&&Zn.ie_version<=11||Zn.android&&Zn.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Wk(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=Zn.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(Wk(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||zk(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=Gk(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=Re(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=Re(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&Gk(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Ctt(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=She(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=khe(e,n.previousSibling||n.target.previousSibling,-1),r=khe(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=Re(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function khe(t,n,e){for(;n;){var i=ys.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Wn=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function Vet(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new _he(e.state||Ao.create(e)),this.plugins=this.state.facet(Pb).map(function(s){return new Jj(s)});var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new ktt(this),this.inputState=new stt(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Ude(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return Se(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Yl?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=Re(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(R){l.e(R)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(R){return R.annotation(fhe)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=phe(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(Ao.phrases)!=this.state.facet(Ao.phrases))return this.setState(a);(i=Ide.create(this,a,n)).flags|=d;var m=this.viewState.scrollTarget;try{this.updateState=2;var g,v=Re(n);try{for(v.s();!(g=v.n()).done;){var y=g.value;if(m&&(m=m.map(y.changes)),y.scrollIntoView){var b=y.state.selection.main;m=new Tde(b.empty?b:Qt.cursor(b.head,b.head>b.anchor?-1:1))}var C,k=Re(y.effects);try{for(k.s();!(C=k.n()).done;){var D=C.value;D.is(Ede)&&(m=D.value)}}catch(R){k.e(R)}finally{k.f()}}}catch(R){v.e(R)}finally{v.f()}this.viewState.update(i,m),this.bidiCache=The.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(Rb)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(R){return R.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(tD)!=i.state.facet(tD)&&(this.viewState.mustMeasureContent=!0),(o||s||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var L,z=Re(this.state.facet(Xj));try{for(z.s();!(L=z.n()).done;)(0,L.value)(i)}catch(R){z.e(R)}finally{z.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!She(e,p)&&f.force&&J0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new _he(n),this.plugins=n.facet(Pb).map(function(a){return new Jj(a)}),this.pluginMap.clear();var o,s=Re(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new Ude(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(Pb),i=n.state.facet(Pb);if(e!=i){var r,o=[],s=Re(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new Jj(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(g){s.e(g)}finally{s.f()}var u,d=Re(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(g){d.e(g)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=Re(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(g){p.e(g)}finally{p.f()}}for(var m=0;m0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var f=[];if(!(4&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var m=f.map(function(R){try{return R.read(n)}catch(U){return Ec(n.state,U),Dhe}}),g=Ide.create(this,this.state,[]),v=!1,y=!1;g.flags|=h,i?i.flags|=h:i=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),v=this.docView.update(g));for(var b=0;b1||k<-1)&&(this.scrollDOM.scrollTop+=k,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var D,L=Re(this.state.facet(Xj));try{for(L.s();!(D=L.n()).done;)(0,D.value)(i)}catch(R){L.e(R)}finally{L.f()}}}}},{key:"themeClasses",get:function(){return l4+" "+(this.state.facet(a4)?whe:xhe)+" "+this.state.facet(tD)}},{key:"updateAttrs",value:function(){var n=this,e=Ehe(this,Ade,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Jk)?"true":"false",class:"cm-content",style:"".concat(Zn.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),Ehe(this,Kj,i);var r=this.observer.ignore(function(){var o=Gj(n.contentDOM,n.contentAttrs,i),s=Gj(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=Re(n);try{for(r.s();!(e=r.n()).done;){var o,s=Re(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(Rb),Dp.mount(this.root,this.styleModules.concat(wtt).reverse())}},{key:"readMeasured",value:function(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}},{key:"requestMeasure",value:function(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==rs.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return Qt.cursor(l,e?-1:1)}var c=od.find(t.docView,n.head);return Qt.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return i4(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return Qt.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var m=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-m.from))),u=(c<0?m.top:m.bottom)+p}for(var g=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var b=u+(v+y)*c,C=Jde(r,{x:g,y:b},!1,c);if(bh.bottom||(c<0?Cl))return Qt.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Jde(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return Nj(i,o[Q0.find(o,n-r.from,-1,e)].dir==rs.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(kde)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>Dtt)return Lde(n.length);var e,i=this.textDirectionAt(n.from),r=Re(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==Qj?1:2,d=l==Qj?2:1;if(!a||1==u&&!Yet.test(a))return Lde(c);for(var h=0,f=u,p=u;h=0;te-=3)if(ph[te+1]==-z){var P=ph[te+2],W=2&P?u:4&P?1&P?d:u:0;W&&(os[U]=os[ph[te]]=W),G=te;break}}else{if(189==ph.length)break;ph[G++]=U,ph[G++]=L,ph[G++]=X}else if(2==(R=os[U])||1==R){var J=R==u;X=J?0:1;for(var H=G-3;H>=0;H-=3){var le=ph[H+2];if(2&le)break;if(J)ph[H+2]|=2;else{if(4&le)break;ph[H+2]|=4}}}for(var E=0;EOe;){for(var Le=Xe,rt=2!=os[--Xe];Xe>Oe&&rt==(2!=os[Xe-1]);)Xe--;re.push(new Q0(Xe,Le,rt?2:1))}else re.push(new Q0(Oe,he,0))}else for(var B=0;BDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){ede(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=Re(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ede.of(new Tde("number"==typeof n?Qt.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return wa.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=Dp.newName(),r=[tD.of(i),Rb.of(c4(".".concat(i),n))];return e&&e.dark&&r.push(a4.of(!0)),r}},{key:"baseTheme",value:function(n){return G0.lowest(Rb.of(c4("."+l4,n,Che)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&ys.get(i)||ys.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Wn.styleModule=Rb,Wn.inputHandler=Cde,Wn.focusChangeEffect=Sde,Wn.perLineTextDirection=kde,Wn.exceptionSink=wde,Wn.updateListener=Xj,Wn.editable=Jk,Wn.mouseSelectionStyle=xde,Wn.dragMovesSelection=bde,Wn.clickAddsSelectionRange=_de,Wn.decorations=jb,Wn.atomicRanges=Mde,Wn.scrollMargins=Ode,Wn.darkTheme=a4,Wn.contentAttributes=Kj,Wn.editorAttributes=Ade,Wn.lineWrapping=Wn.contentAttributes.of({class:"cm-lineWrapping"}),Wn.announce=cr.define();var Dtt=4096,Dhe={},The=function(){function t(n,e,i,r){Ce(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return Se(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:rs.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&Uj(s,e)}return e}var Ttt=Zn.mac?"mac":Zn.windows?"win":Zn.linux?"linux":"key";function nD(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var Att=G0.default(Wn.domEventHandlers({keydown:function(t,n){return Ohe(Mhe(n.state),t,n,"editor")}})),iD=Qn.define({enables:Att}),Ahe=new WeakMap;function Mhe(t){var n=t.facet(iD),e=Ahe.get(n);return e||Ahe.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ttt,s=Object.create(null),a=Object.create(null),l=function(D,L){var z=a[D];if(null==z)a[D]=L;else if(z!=L)throw new Error("Key binding "+D+" is used both as a regular binding and as a multi-stroke prefix")},c=function(D,L,z,R){for(var U,G,X=s[D]||(s[D]=Object.create(null)),te=L.split(/ (?!$)/).map(function(le){return function Ett(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==rs.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=Ihe(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=Fhe(t,i),f=Fhe(t,r),p=h.type==go.Text?h:null,m=f.type==go.Text?f:null;if(t.lineWrapping&&(p&&(p=Nhe(t,i,p)),m&&(m=Nhe(t,r,m))),p&&m&&p.from==m.from)return C(k(e.from,e.to,p));var g=p?k(e.from,null,p):D(h,!1),v=m?k(null,e.to,m):D(f,!0),y=[];return(p||h).to<(m||f).from-1?y.push(b(u,g.bottom,d,v.top)):g.bottomW&&le.from=I)break;Oe>E&&te(Math.max(he,E),null==L&&he<=W,Math.min(Oe,I),null==z&&Oe>=J,re.dir)}}catch(_e){V.e(_e)}finally{V.f()}if((E=q.to+1)>=I)break}}}catch(_e){H.e(_e)}finally{H.f()}return 0==X.length&&te(W,null==L,J,null==z,t.textDirection),{top:U,bottom:G,horizontal:X}}function D(L,z){var R=a.top+(z?L.top:L.bottom);return{top:R,bottom:R,horizontal:[]}}}(n,e,i)}}]),t}();function Ihe(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==rs.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function Nhe(t,n,e){var i=Qt.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:go.Text}}function Fhe(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=Re(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==go.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var Ott=function(){function t(n,e){Ce(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return Se(t,[{key:"update",value:function(n){n.startState.facet(rD)!=n.state.facet(rD)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(rD);e0&&void 0!==arguments[0]?arguments[0]:{}),Ntt,Ftt,Ptt,Dde.of(!0)]}function Rhe(t){return t.startState.facet($b)!=t.state.facet($b)}var Ntt=Phe({above:!0,markers:function(t){var n,e=t.state,i=e.facet($b),r=[],o=Re(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||jhe:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:Qt.cursor(s.head,s.head>s.anchor?-1:1),d=Re(d4.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Rhe(t);return e&&Lhe(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Lhe(n.state,t)},class:"cm-cursorLayer"});function Lhe(t,n){n.style.animationDuration=t.facet($b).cursorBlinkRate+"ms"}var Ftt=Phe({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:d4.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Rhe(t)},class:"cm-selectionLayer"}),$he={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};jhe&&($he[".cm-line"].caretColor="transparent !important");var Ptt=G0.highest(Wn.theme($he)),Bhe=cr.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),Bb=Ba.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(Bhe)?i.value:e},t)}}),jtt=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Se(t,[{key:"update",value:function(n){var e,i=n.state.field(Bb);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(Bb)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(Bb),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(Bb)!=n&&this.view.dispatch({effects:Bhe.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function Vhe(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var Rtt=function(){function t(n){Ce(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return Se(t,[{key:"createDeco",value:function(n){var e,i=this,r=new ug,o=r.add.bind(r),s=Re(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],m=Re(h);try{for(m.s();!(f=m.n()).done;){var g=f.value,v=g.from,y=g.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(b){m.e(b)}finally{m.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;Vhe(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=Re(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:m})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),h4=null!=/x/.unicode?"gu":"g",Ltt=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",h4),$tt={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},f4=null,oD=Qn.define({combine:function(t){var n=lu(t,{render:null,specialChars:Ltt,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==f4&&typeof document<"u"&&document.body){var i=document.body.style;f4=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return f4||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,h4)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,h4)),n}});function Btt(){return[oD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Hhe||(Hhe=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.decorations=mi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(oD)),this.decorations=this.decorator.createDeco(n)}return Se(t,[{key:"makeDecorator",value:function(n){var e=this;return new Rtt({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=$a(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=Ab(l.text,c,o-l.from);return mi.replace({widget:new Utt((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=mi.replace({widget:new Htt(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(oD);n.startState.facet(oD)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var Hhe=null,Htt=function(t){wt(e,Ep);var n=Ct(e);function e(i,r){var o;return Ce(this,e),(o=n.call(this)).options=i,o.code=r,o}return Se(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+($tt[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),Utt=function(t){wt(e,Ep);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).width=i,r}return Se(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),ztt=mi.line({class:"cm-activeLine"}),Gtt=wa.fromClass(function(){function t(n){Ce(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=Re(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(ztt.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return mi.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function Uhe(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):Ab(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function qtt(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Wn.mouseSelectionStyle.of(function(e,i){return n(i)?function Wtt(t,n){var e=Uhe(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=Uhe(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var m=Math.min(u.off,d.off),g=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=g&&p.push(Qt.range(y.from+m,y.to+g))}else for(var b=Math.min(u.col,d.col),C=Math.max(u.col,d.col),k=h;k<=f;k++){var D=c.doc.line(k),L=Mj(D.text,b,c.tabSize,!0);if(L<0)p.push(Qt.cursor(D.to));else{var z=Mj(D.text,C,c.tabSize);p.push(Qt.range(D.from+L,D.from+z))}}return p}(t.state,e,a);return l.length?Qt.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var Ytt={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},Xtt={style:"cursor: crosshair"};function Jtt(){var n=zn(Ytt[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=wa.fromClass(function(){function o(s){Ce(this,o),this.view=s,this.isDown=!1}return Se(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Wn.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?Xtt:null})]}var zhe=function(){function t(n,e,i){Ce(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return Se(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=Re(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Se(t,[{key:"createContainer",value:function(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(p4);if(r.position!=this.position){this.position=r.position;var o,s=Re(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=Re(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=Re(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(p4).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,m=null!==(e=Ghe.get(l))&&void 0!==e?e:d.bottom-d.top,g=l.offset||Ztt,v=this.view.textDirection==rs.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+g.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-g.x),b=!!a.above;!a.strictSide&&(b?u.top-(d.bottom-d.top)-g.yr.bottom)&&b==r.bottom-u.bottom>u.top-r.top&&(b=!b);var C=(b?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&R.topk&&(k=b?R.top-m-2-f:R.bottom+f+2)}}catch(U){z.e(U)}finally{z.f()}}"absolute"==this.position?(c.style.top=k-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=k+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?g.x:-g.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:k,right:D,bottom:k+m}),c.classList.toggle("cm-tooltip-above",b),c.classList.toggle("cm-tooltip-below",!b),l.positioned&&l.positioned(n.space)}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),Qtt=Wn.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Ztt={x:0,y:0},sD=Qn.define({enables:[Whe,Qtt]}),aD=Qn.define(),ent=function(){function t(n){var e=this;Ce(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new zhe(n,aD,function(i){return e.createHostedView(i)})}return Se(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),tnt=sD.compute([aD],function(t){var n=t.facet(aD).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,ri(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,ri(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:ent.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),nnt=function(){function t(n,e,i,r,o){Ce(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Se(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==rs.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=cr.define(),i=Ba.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Tl.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=Re(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(ont)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return aD.from(r)}});return[i,wa.define(function(r){return new nnt(r,t,i,e,n.hoverTime||300)}),tnt]}var ont=cr.define(),Yhe=Qn.define({combine:function(t){var n,e,i,r=Re(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function Vb(t,n){var e=t.plugin(Xhe),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var Xhe=wa.fromClass(function(){function t(n){Ce(this,t),this.input=n.state.facet(Hb),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(Yhe);this.top=new lD(n,!0,e.topContainer),this.bottom=new lD(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=Re(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return Se(t,[{key:"update",value:function(n){var e=n.state.facet(Yhe);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new lD(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new lD(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(Hb);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=Re(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,m=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),tfe=function(){function t(n,e){var i=this;Ce(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=Zhe(e.markers(n)),e.initialSpacer&&(this.spacer=new nfe(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Se(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=Zhe(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Ho.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=Re(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),nfe=function(){function t(n,e,i,r){Ce(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return Se(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Qhe(),unt]}function ife(t){for(var n=9;ni&&(i=s,e.push(hnt.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Ho.of(e)}),pnt=0,y4=Se(function t(n,e){Ce(this,t),this.from=n,this.to=e}),pr=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,t),this.id=pnt++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Se(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=cu.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();pr.closedBy=new pr({deserialize:function(t){return t.split(" ")}}),pr.openedBy=new pr({deserialize:function(t){return t.split(" ")}}),pr.group=new pr({deserialize:function(t){return t.split(" ")}}),pr.contextHash=new pr({perNode:!0}),pr.lookAhead=new pr({perNode:!0}),pr.mounted=new pr({perNode:!0});var mnt=Object.create(null),cu=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Ce(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return Se(t,[{key:"prop",value:function(n){return this.props[n.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(pr.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):mnt,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=Re(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=Re(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(pr.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();cu.none=new cu("",Object.create(null),0,8);var Ha,gnt=function(){function t(n){Ce(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=uD.get(this)||this.topNode,r=new fD(i);return r.moveTo(n,e),uD.set(this,r._tree),r}},{key:"topNode",get:function(){return new Gb(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t1(uD.get(this)||this.topNode,n,e,!1);return uD.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t1(rfe.get(this)||this.topNode,n,e,!0);return rfe.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|Ha.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:x4(cu.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(cu.none,i,r,o)})}}],[{key:"build",value:function(n){return function _nt(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new vnt(e,e.length):e,d=i.types,h=0,f=0;function p(k,D,L,z,R){for(var U=u.id,G=u.start,X=u.end,te=u.size,P=f;te<0;){if(u.next(),-1==te)return L.push(a[U]),void z.push(G-k);if(-3==te)return void(h=U);if(-4==te)return void(f=U);throw new RangeError("Unrecognized record size: ".concat(te))}var J,H,rt,le=d[U],E=G-k;if(X-G<=o&&(H=function(rt,B){var ne=u.fork(),ie=0,Me=0,Ye=0,je=ne.end-o,yt={size:0,start:0,skip:0};e:for(var Tt=ne.pos-rt;ne.pos>Tt;){var fn=ne.size;if(ne.id==B&&fn>=0)yt.size=ie,yt.start=Me,yt.skip=Ye,Ye+=4,ie+=4,ne.next();else{var Hn=ne.pos-fn;if(fn<0||Hn=c?4:0,Ei=ne.start;for(ne.next();ne.pos>Hn;){if(ne.size<0){if(-3!=ne.size)break e;Zt+=4}else ne.id>=c&&(Zt+=4);ne.next()}Me=Ei,ie+=fn,Ye+=Zt}}return(B<0||ie==rt)&&(yt.size=ie,yt.start=Me,yt.skip=Ye),yt.size>4?yt:void 0}(u.pos-D,R))){for(var I=new Uint16Array(H.size-H.skip),N=u.pos-H.size,q=I.length;u.pos>N;)q=v(H.start,I,q);J=new zb(I,X-H.start,i),E=H.start-k}else{var V=u.pos-te;u.next();for(var re=[],he=[],Oe=U>=c?U:-1,_e=0,Xe=X;u.pos>V;)Oe>=0&&u.id==Oe&&u.size>=0?(u.end<=Xe-o&&(m(re,he,G,_e,u.end,Xe,Oe,P),_e=re.length,Xe=u.end),u.next()):p(G,V,re,he,Oe);if(Oe>=0&&_e>0&&_e-1&&_e>0){var Le=(rt=le,function(B,ne,ie){var Me,Ye,je=0,yt=B.length-1;if(yt>=0&&(Me=B[yt])instanceof Ua){if(!yt&&Me.type==rt&&Me.length==ie)return Me;(Ye=Me.prop(pr.lookAhead))&&(je=ne[yt]+Me.length+Ye)}return g(rt,B,ne,ie,je)});J=x4(le,re,he,0,re.length,0,X-G,Le,Le)}else J=g(le,re,he,X-G,P-X)}L.push(J),z.push(E)}function m(k,D,L,z,R,U,G,X){for(var te=[],P=[];k.length>z;)te.push(k.pop()),P.push(D.pop()+L-R);k.push(g(i.types[G],te,P,U-R,X-U)),D.push(R-L)}function g(k,D,L,z){var R=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,U=arguments.length>5?arguments[5]:void 0;if(h){var G=[pr.contextHash,h];U=U?[G].concat(U):[G]}if(R>25){var X=[pr.lookAhead,R];U=U?[X].concat(U):[X]}return new Ua(k,D,L,z,U)}function v(k,D,L){var z=u.id,R=u.start,U=u.end,G=u.size;if(u.next(),G>=0&&z4)for(var te=u.pos-(G-4);u.pos>te;)L=v(k,D,L);D[--L]=X,D[--L]=U-k,D[--L]=R-k,D[--L]=z}else-3==G?h=z:-4==G&&(f=z);return L}for(var y=[],b=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,b,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?b[0]+y[0].length:0;return new Ua(d[t.topID],y.reverse(),b.reverse(),C)}(n)}}]),t}();Ua.empty=new Ua(cu.none,[],[],0);var vnt=function(){function t(n,e){Ce(this,t),this.buffer=n,this.index=e}return Se(t,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new t(this.buffer,this.index)}}]),t}(),zb=function(){function t(n,e,i){Ce(this,t),this.buffer=n,this.length=e,this.set=i}return Se(t,[{key:"type",get:function(){return cu.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function sfe(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function t1(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(ofe(r,i,h,h+d.length))if(d instanceof zb){if(o&Ha.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new _4(new ynt(s,d,n,h),null,f)}else if(o&Ha.IncludeAnonymous||!d.type.isAnonymous||b4(d)){var p=void 0;if(!(o&Ha.IgnoreMounts)&&d.props&&(p=d.prop(pr.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var m=new t(d,h,n,s);return o&Ha.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&Ha.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._parent)))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this._tree.children.length-1,-1,0,4)}},{key:"childAfter",value:function(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&Ha.IgnoreOverlays)&&(i=this._tree.prop(pr.mounted))&&i.overlay){var o,s=n-this.from,a=Re(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new fD(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return sfe(this,n)}},{key:"getChild",value:function(n){var r=dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return hD(this,n)}}]),t}();function dD(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function hD(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var ynt=Se(function t(n,e,i,r){Ce(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),_4=function(){function t(n,e,i){Ce(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&Ha.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);return o<0?null:new t(this.context,this,o)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new fD(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Ua(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return sfe(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return hD(this,n)}}]),t}(),fD=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Ce(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof Gb)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof Gb?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&Ha.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&Ha.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&Ha.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&Ha.IncludeAnonymous||u instanceof zb||!u.type.isAnonymous||b4(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return hD(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function b4(t){return t.children.some(function(n){return n instanceof zb||!n.type.isAnonymous||b4(n)})}var afe=new WeakMap;function pD(t,n){if(!t.isAnonymous||n instanceof zb||n.type!=t)return 1;var e=afe.get(n);if(null==e){e=1;var i,r=Re(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Ua)){e=1;break}e+=pD(t,o)}}catch(s){r.e(s)}finally{r.f()}afe.set(n,e)}return e}function x4(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;L+=z}if(C==k+1){if(L>d){var R=m[k];p(R.children,R.positions,0,R.children.length,g[k]+b);continue}h.push(m[k])}else h.push(x4(t,m,g,k,C,D,g[C-1]+m[C-1].length-D,null,l));f.push(D+b-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var mD=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Ce(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return Se(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=Re(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:cfe.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),wnt=0,cfe=function(){function t(){Ce(this,t),this.instances=[],this.id=wnt++}return Se(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(m){return m.base==n&&(g=e).length==(v=m.modified).length&&g.every(function(y,b){return y==v[b]});var g,v});if(i)return i;var r,o=[],s=new Mp(o,n,e),a=Re(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(m){a.e(m)}finally{a.f()}var l,c=ufe(e),u=Re(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=Re(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(m){f.e(m)}finally{f.f()}}}catch(m){u.e(m)}finally{u.f()}return s}}]),t}();function ufe(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var m=new Cnt(i,l,f>0?a.slice(0,f):null);n[p]=m.sort(n[p])}}}catch(g){o.e(g)}finally{o.f()}}return hfe.add(n)}var hfe=new pr,Cnt=function(){function t(n,e,i,r){Ce(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return Se(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new Dnt(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var w4,Dnt=function(){function t(n,e,i){Ce(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return Se(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function(L){return!L.scope||L.scope(s)}));for(var c=r,u=s.prop(hfe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=Snt(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(pr.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(function(L){return!L.scope||L.scope(f.tree.type)}),g=n.firstChild(),v=0,y=a;;v++){var b=v=C)&&n.nextSibling()););if(!b||C>i)break;(y=b.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,b.from+a),Math.min(i,y),r,m),this.startSpan(y,c))}g&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),xn=Mp.define,gD=xn(),Op=xn(),pfe=xn(Op),mfe=xn(Op),Ip=xn(),vD=xn(Ip),C4=xn(Ip),vh=xn(),fg=xn(vh),yh=xn(),_h=xn(),S4=xn(),Wb=xn(S4),yD=xn(),dn={comment:gD,lineComment:xn(gD),blockComment:xn(gD),docComment:xn(gD),name:Op,variableName:xn(Op),typeName:pfe,tagName:xn(pfe),propertyName:mfe,attributeName:xn(mfe),className:xn(Op),labelName:xn(Op),namespace:xn(Op),macroName:xn(Op),literal:Ip,string:vD,docString:xn(vD),character:xn(vD),attributeValue:xn(vD),number:C4,integer:xn(C4),float:xn(C4),bool:xn(Ip),regexp:xn(Ip),escape:xn(Ip),color:xn(Ip),url:xn(Ip),keyword:yh,self:xn(yh),null:xn(yh),atom:xn(yh),unit:xn(yh),modifier:xn(yh),operatorKeyword:xn(yh),controlKeyword:xn(yh),definitionKeyword:xn(yh),moduleKeyword:xn(yh),operator:_h,derefOperator:xn(_h),arithmeticOperator:xn(_h),logicOperator:xn(_h),bitwiseOperator:xn(_h),compareOperator:xn(_h),updateOperator:xn(_h),definitionOperator:xn(_h),typeOperator:xn(_h),controlOperator:xn(_h),punctuation:S4,separator:xn(S4),bracket:Wb,angleBracket:xn(Wb),squareBracket:xn(Wb),paren:xn(Wb),brace:xn(Wb),content:vh,heading:fg,heading1:xn(fg),heading2:xn(fg),heading3:xn(fg),heading4:xn(fg),heading5:xn(fg),heading6:xn(fg),contentSeparator:xn(vh),list:xn(vh),quote:xn(vh),emphasis:xn(vh),strong:xn(vh),link:xn(vh),monospace:xn(vh),strikethrough:xn(vh),inserted:xn(),deleted:xn(),changed:xn(),invalid:xn(),meta:yD,documentMeta:xn(yD),annotation:xn(yD),processingInstruction:xn(yD),definition:Mp.defineModifier(),constant:Mp.defineModifier(),function:Mp.defineModifier(),standard:Mp.defineModifier(),local:Mp.defineModifier(),special:Mp.defineModifier()};ffe([{tag:dn.link,class:"tok-link"},{tag:dn.heading,class:"tok-heading"},{tag:dn.emphasis,class:"tok-emphasis"},{tag:dn.strong,class:"tok-strong"},{tag:dn.keyword,class:"tok-keyword"},{tag:dn.atom,class:"tok-atom"},{tag:dn.bool,class:"tok-bool"},{tag:dn.url,class:"tok-url"},{tag:dn.labelName,class:"tok-labelName"},{tag:dn.inserted,class:"tok-inserted"},{tag:dn.deleted,class:"tok-deleted"},{tag:dn.literal,class:"tok-literal"},{tag:dn.string,class:"tok-string"},{tag:dn.number,class:"tok-number"},{tag:[dn.regexp,dn.escape,dn.special(dn.string)],class:"tok-string2"},{tag:dn.variableName,class:"tok-variableName"},{tag:dn.local(dn.variableName),class:"tok-variableName tok-local"},{tag:dn.definition(dn.variableName),class:"tok-variableName tok-definition"},{tag:dn.special(dn.variableName),class:"tok-variableName2"},{tag:dn.definition(dn.propertyName),class:"tok-propertyName tok-definition"},{tag:dn.typeName,class:"tok-typeName"},{tag:dn.namespace,class:"tok-namespace"},{tag:dn.className,class:"tok-className"},{tag:dn.macroName,class:"tok-macroName"},{tag:dn.propertyName,class:"tok-propertyName"},{tag:dn.operator,class:"tok-operator"},{tag:dn.comment,class:"tok-comment"},{tag:dn.meta,class:"tok-meta"},{tag:dn.invalid,class:"tok-invalid"},{tag:dn.punctuation,class:"tok-punctuation"}]);var n1=new pr,Tnt=new pr,ad=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";Ce(this,t),this.data=n,this.name=r,Ao.prototype.hasOwnProperty("tree")||Object.defineProperty(Ao.prototype,"tree",{get:function(){return al(this)}}),this.parser=e,this.extension=[Np.of(this),Ao.languageData.of(function(o,s,a){var l=gfe(o,s,a),c=l.type.prop(n1);if(!c)return[];var u=o.facet(c),d=l.type.prop(Tnt);if(d){var h,f=l.resolve(s-l.from,a),p=Re(d);try{for(p.s();!(h=p.n()).done;){var m=h.value;if(m.test(f,o)){var g=o.facet(m.facet);return"replace"==m.type?g:g.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return Se(t,[{key:"isActiveAt",value:function(n,e){return gfe(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(n1)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(Np);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(n1)!=e.data){var l=s.prop(pr.mounted);if(l){if(l.tree.prop(n1)==e.data){if(l.overlay){var c,u=Re(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(m){u.e(m)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),qb=null,Mnt=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;Ce(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return Se(t,[{key:"startParse",value:function(){return this.parser.startParse(new Ant(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Ua.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(mD.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=qb;qb=this;try{return n()}finally{qb=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=vfe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,m,g,v){return l.push({fromA:p,toA:m,fromB:g,toB:v})}),i=mD.applyChanges(i,l),r=Ua.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=Re(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=vfe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Ua.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){wt(r,lfe);var i=Ct(r);function r(){return Ce(this,r),i.apply(this,arguments)}return Se(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=qb;if(u){var d,h=Re(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Ua(cu.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return qb}}]),t}();function vfe(t,n,e){return mD.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var k4=function(){function t(n){Ce(this,t),this.context=n,this.tree=n.tree}return Se(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=Mnt.create(n.facet(Np).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();ad.state=Ba.define({create:k4.init,update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(ad.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(Np)!=n.state.facet(Np)?k4.init(n.state):t.apply(n)}});var yfe=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(yfe=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var D4=typeof navigator<"u"&&null!==(w4=navigator.scheduling)&&void 0!==w4&&w4.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,Ont=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Se(t,[{key:"update",value:function(n){var e=this.view.state.field(ad.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(ad.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=yfe(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return D4&&D4()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ad.setState.of(new k4(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Ec(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),Np=Qn.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[ad.state,Ont,Wn.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),Int=Se(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Ce(this,t),this.language=n,this.support=e,this.extension=[n,e]}),Nnt=Qn.define(),_D=Qn.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function i1(t){var n=t.facet(_D);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function Yb(t,n){var e="",i=t.tabSize,r=t.facet(_D)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,t),this.state=n,this.options=e,this.unit=i1(n)}return Se(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return Ab(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),_fe=new pr;function Fnt(t){var n=t.type.prop(_fe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(pr.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,m=function(g){var v=g.node,y=v.childAfter(v.from),b=v.lastChild;if(!y)return null;for(var C=g.options.simulateBreak,k=g.state.doc.lineAt(y.from),D=null==C||C<=k.from?k.to:Math.min(k.to,C),L=y.to;;){var z=v.childAfter(L);if(!z||z==b)return null;if(!z.type.isSkipped)return z.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var Lnt=Qn.define(),wfe=new pr;function xD(t,n,e){var i,r=Re(t.facet(Lnt));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=al(s);if(c.lengthl)){if(h&&f.from=a&&m.to>l&&(h=m)}}return h}(t,n,e)}function Cfe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var wD=cr.define({map:Cfe}),Xb=cr.define({map:Cfe});function Sfe(t){var n,e=[],i=Re(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var pg=Ba.define({create:function(){return mi.none},update:function(t,n){t=t.map(n.changes);var e,i=Re(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(wD)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[Afe.range(a.value.from,a.value.to)]}):a.is(Xb)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Wn.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function kfe(t,n){return t.field(pg,!1)?n:n.concat(cr.appendConfig.of(Efe()))}function Dfe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Wn.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var $nt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=Re(Sfe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=xD(t.state,i.from,i.to);if(r)return t.dispatch({effects:kfe(t.state,[wD.of(r),Dfe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(pg,!1))return!1;var n,e=[],i=Re(Sfe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=CD(t.state,r.from,r.to);o&&e.push(Xb.of(o),Dfe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},Vnt),t),e=new E4(n,!0),i=new E4(n,!1),r=wa.fromClass(function(){function s(a){Ce(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return Se(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(Np)!=a.state.facet(Np)||a.startState.field(pg,!1)!=a.state.field(pg,!1)||al(a.startState)!=al(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new ug,u=Re(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=CD(a.state,d.from,d.to)?i:xD(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,Khe({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Ho.empty},initialSpacer:function(){return new E4(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=CD(s.state,a.from,a.to);if(c)return s.dispatch({effects:Xb.of(c)}),!0;var u=xD(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:wD.of(u)}),!0)}})}),Efe()]}var Unt=Wn.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),A4=function(){function t(n,e){var i;function r(a){var l=Dp.newName();return(i||(i=Object.create(null)))["."+l]=a,l}Ce(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof ad?function(a){return a.prop(n1)==s.data}:s?function(a){return a==s}:void 0,this.style=ffe(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new Dp(i):null,this.themeType=e.themeType}return Se(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),M4=Qn.define(),Mfe=Qn.define({combine:function(t){return t.length?[t[0]]:null}});function O4(t){var n=t.facet(M4);return n.length?n:t.facet(Mfe)}function Ofe(t,n){var e,i=[Gnt];return t instanceof A4&&(t.module&&i.push(Wn.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?Mfe.of(t):e?M4.computeN([Wn.darkTheme],function(r){return r.facet(Wn.darkTheme)==("dark"==e)?[t]:[]}):M4.of(t)),i}var znt=function(){function t(n){Ce(this,t),this.markCache=Object.create(null),this.tree=al(n.state),this.decorations=this.buildDeco(n,O4(n.state))}return Se(t,[{key:"update",value:function(n){var e=al(n.state),i=O4(n.state),r=i!=O4(n.startState);e.length0&&bh(n.state,s.head-1,1,r)||r.afterCursor&&(bh(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),Qnt]}var eit=new pr;function I4(t,n,e){var i=t.prop(n<0?pr.openedBy:pr.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function N4(t){var n=t.type.prop(eit);return n?n(t.node):t}function bh(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=al(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=I4(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return tit(0,0,e,l,u,c,o)}}return function nit(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,m=e>0?0:f.length-1,g=e>0?f.length:-1;m!=g;m+=e){var v=s.indexOf(f[m]);if(!(v<0||i.resolveInner(p+m,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function tit(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(Ffe.push(t),console.warn(n))}function ait(t,n){var e,i=null,r=Re(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||dn[o];s?"function"==typeof s?i?i=s(i):P4(o,"Modifier ".concat(o," used at start of tag")):i?P4(o,"Tag ".concat(o," used as modifier")):i=s:P4(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=cu.define({id:Nfe.length,name:a,props:[dfe(Ul({},a,i))]});return Nfe.push(l),l.id}function j4(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var lit=j4(function hit(t,n){var e,r=[],o=-1,s=Re(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=R4(n,f.from).line;if(!p)continue;var m=/^\s*/.exec(f.text)[0].length,g=m==f.length,v=f.text.slice(m,m+p.length)==p?m:-1;m=0})){var te,P=[],W=Re(r);try{for(W.s();!(te=W.n()).done;){var J=te.value,H=J.line,le=J.comment;if(le>=0){var I=H.from+le,N=I+J.token.length;" "==H.text[N-H.from]&&N++,P.push({from:I,to:N})}}}catch(q){W.e(q)}finally{W.f()}return{changes:P}}return null},0),cit=j4(Rfe,0),uit=j4(function(t,n){return Rfe(t,n,function(e){var i,r=[],o=Re(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function R4(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function Rfe(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return R4(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function dit(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,m=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(m,m+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Wn.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?B4:"historyRedo"==n.inputType?kD:null;return!!i&&(n.preventDefault(),i(e))}})]}function SD(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field($4,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var B4=SD(0,!1),kD=SD(1,!1),git=SD(0,!0),vit=SD(1,!0);function $fe(t){return function(n){var e=n.field($4,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var yit=$fe(0),_it=$fe(1),vf=function(){function t(n,e,i,r,o){Ce(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return Se(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&rd.fromJSON(n.changes),[],n.mapped&&z0.fromJSON(n.mapped),n.startSelection&&Qt.fromJSON(n.startSelection),n.selectionsAfter.map(Qt.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=uu,o=Re(n.startState.facet(pit));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,uu)}},{key:"selection",value:function(n){return new t(void 0,uu,void 0,void 0,n)}}]),t}();function DD(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function Bfe(t,n){return t.length?n.length?t.concat(n):t:n}var uu=[];function Vfe(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),DD(t,t.length-1,1e9,e.setSelAfter(i)))}return[vf.selection([n])]}function bit(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function V4(t,n){if(!t.length)return t;for(var e=t.length,i=uu;e;){var r=xit(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[vf.selection(i)]:uu}function xit(t,n,e){var i=Bfe(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):uu,e);if(!t.changes)return vf.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new vf(r,cr.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var wit=/^(input\.type|delete)($|\.)/,Jb=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;Ce(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return Se(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||wit.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?DD(s,s.length-1,r.minDepth,new vf(n.changes.compose(a.changes),Bfe(n.effects,a.effects),a.mapped,a.startSelection,uu)):DD(s,s.length,r.minDepth,n),uu,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:uu;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function ED(t,n,e){for(var i=al(t).resolveInner(n.head),r=e?pr.closedBy:pr.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;Sit(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?bh(t,i.from,1):bh(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,Qt.cursor(l,e?-1:1)}function Wfe(t,n){return ld(t,function(e){if(!e.empty)return TD(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var qfe=function(t){return Wfe(t,!1)},Yfe=function(t){return Wfe(t,!0)};function Xfe(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=MD(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=MD(t,s,!1),a=MD(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:Qt.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Wn.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function MD(t,n,e){if(t instanceof Wn){var i,r=Re(t.state.facet(Wn.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var hpe=function(t,n){return AD(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function vpe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=Re(OD(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=Re(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(Qt.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(g){d.e(g)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=Re(a.ranges);try{for(p.s();!(f=p.n()).done;){var m=f.value;o.push(Qt.range(m.anchor-c,m.head-c))}}catch(g){p.e(g)}finally{p.f()}}}}}catch(g){s.e(g)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:Qt.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function ype(t,n,e){if(t.readOnly)return!1;var i,r=[],o=Re(OD(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var kit=_pe(!1),Dit=_pe(!0);function _pe(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var m,g=al(f).resolveInner(p),v=g.childBefore(p),y=g.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(m=v.type.prop(pr.closedBy))&&m.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new bD(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=T4(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:Qt.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var bpe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(z4(n,function(i,r){r.push({from:i.from,insert:n.facet(_D)})}),{userEvent:"input.indent"})),!0)},xpe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(z4(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=Ab(o,n.tabSize),a=0,l=Yb(n,Math.max(0,s-i1(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:gpe}].concat(Tit.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Ait=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return ld(t,function(n){return ED(t.state,n,!ll(t))})},shift:function(t){return du(t,function(n){return ED(t.state,n,!ll(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return ld(t,function(n){return ED(t.state,n,ll(t))})},shift:function(t){return du(t,function(n){return ED(t.state,n,ll(t))})}},{key:"Alt-ArrowUp",run:function(t){return vpe(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return ype(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return vpe(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return ype(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=Qt.create([i.main]):i.main.empty||(r=Qt.create([Qt.cursor(i.main.head)])),!!r&&(e(xh(n,r)),!0)}},{key:"Mod-Enter",run:Dit},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=OD(n).map(function(r){return Qt.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:Qt.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=r1(n.selection,function(r){for(var o,s=al(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return Qt.range(s.to,s.from)});return e(xh(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:xpe},{key:"Mod-]",run:bpe},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new bD(n,{overrideIndentation:function(s){return i[s]??-1}}),o=z4(n,function(s,a,l){var c=T4(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=Yb(n,c);(u!=d||l.from0?o--:s0&&bh(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;Ce(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(Cpe(a))}:Cpe,this.query=this.normalize(e)}return Se(t,[{key:"peek",value:function(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return $a(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=pj(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=kc(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(Ce(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=Spe,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Tpe(n,e,i,r,o);this.re=new RegExp(e,G4+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=ID(n,r),this.getLine(this.curLineStart)}return Se(t,[{key:"getLine",value:function(n){this.iter.next(n),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=ID(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return W4.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=ID(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Dpe.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function ID(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function q4(t){var n=Mo("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=zn(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:ND.of(!1),selection:Qt.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Mo("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:ND.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Mo("label",t.state.phrase("Go to line"),": ",n)," ",Mo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(kpe.prototype[Symbol.iterator]=Tpe.prototype[Symbol.iterator]=function(){return this});var ND=cr.define(),Epe=Ba.define({create:function(){return!0},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(ND)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return Hb.from(t,function(n){return n?q4:null})}}),Oit=Wn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Iit={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ape=Qn.define({combine:function(t){return lu(t,Iit,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Nit=mi.mark({class:"cm-selectionMatch"}),Fit=mi.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Mpe(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==is.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==is.Word)}var Pit=wa.fromClass(function(){function t(n){Ce(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(Ape),i=n.state,r=i.selection;if(r.ranges.length>1)return mi.none;var o,y,b,C,k,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return mi.none;var l=i.wordAt(s.head);if(!l)return mi.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return mi.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!Mpe(a=i.charCategorizer(s.head),i,s.from,s.to)||(k=s.to,(y=a)((b=i).sliceDoc(C=s.from,C+1))!=is.Word||y(b.sliceDoc(k-1,k))!=is.Word))return mi.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return mi.none}var u,d=[],h=Re(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new o1(i.doc,o,f.from,f.to);!p.next().done;){var m=p.value,g=m.from,v=m.to;if((!a||Mpe(a,i,g,v))&&(s.empty&&g<=s.from&&v>=s.to?d.push(Fit.range(g,v)):(g>=s.to||v<=s.from)&&d.push(Nit.range(g,v)),d.length>e.maxMatches))return mi.none}}catch(y){h.e(y)}finally{h.f()}return mi.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),jit=Wn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),FD=Qn.define({combine:function(t){return lu(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Wit(n)}})}});function Rit(t){return t?[FD.of(t),tR]:tR}var Ope=function(){function t(n){Ce(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,G4),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return Se(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new $it(this):new Lit(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:Ao.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?a1(this,r,e,i):s1(this,r,e,i)}}]),t}(),Ipe=Se(function t(n){Ce(this,t),this.spec=n});function s1(t,n,e,i){return new o1(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=s1(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function a1(t,n,e,i){return new kpe(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(PD(a.input,a.index))!=is.Word||r(jD(a.input,a.index))!=is.Word)&&(r(jD(a.input,a.index+a[0].length))!=is.Word||r(PD(a.input,a.index+a[0].length))!=is.Word)}):void 0},e,i);var r}function PD(t,n){return t.slice(Dl(t,n,!1),n)}function jD(t,n){return t.slice(n,Dl(t,n))}var $it=function(t){wt(e,Ipe);var n=Ct(e);function e(){return Ce(this,e),n.apply(this,arguments)}return Se(e,[{key:"nextMatch",value:function(i,r,o){var s=a1(this.spec,i,o,i.doc.length).next();return s.done&&(s=a1(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=a1(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=a1(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),Kb=cr.define(),Y4=cr.define(),Pp=Ba.define({create:function(t){return new X4(K4(t).create(),null)},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(Kb)?t=new X4(r.value.create(),t.panel):r.is(Y4)&&(t=new X4(t.query,r.value?J4:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return Hb.from(t,function(n){return n.panel})}}),X4=Se(function t(n,e){Ce(this,t),this.query=n,this.panel=e}),Bit=mi.mark({class:"cm-searchMatch"}),Vit=mi.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Hit=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.decorations=this.highlight(n.state.field(Pp))}return Se(t,[{key:"update",value:function(n){var e=n.state.field(Pp);(e!=n.startState.field(Pp)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return mi.none;for(var i=this.view,r=new ug,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Vit:Bit)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function Qb(t){return function(n){var e=n.state.field(Pp,!1);return e&&e.query.spec.valid?t(n,e):Q4(n)}}var RD=Qb(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:eR(t,r),userEvent:"select.search"}),!0)}),LD=Qb(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:eR(t,o),userEvent:"select.search"}),!0)}),Uit=Qb(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:Qt.create(e.map(function(i){return Qt.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),Npe=Qb(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Wn.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(eR(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),zit=Qb(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Wn.announce.of(r),userEvent:"input.replace.all"}),!0});function J4(t){return t.state.facet(FD).createPanel(t)}function K4(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(FD);return new Ope({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var Q4=function(t){var n=t.state.field(Pp,!1);if(n&&n.panel){var e=Vb(t,J4);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=K4(t.state,n.query.spec);r.valid&&t.dispatch({effects:Kb.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[Y4.of(!0),n?Kb.of(K4(t.state,n.query.spec)):cr.appendConfig.of(tR)]});return!0},Z4=function(t){var n=t.state.field(Pp,!1);if(!n||!n.panel)return!1;var e=Vb(t,J4);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Y4.of(!1)}),!0},Git=[{key:"Mod-f",run:Q4,scope:"editor search-panel"},{key:"F3",run:RD,shift:LD,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:RD,shift:LD,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Z4,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new o1(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(Qt.range(c.value.from,c.value.to))}return e(n.update({selection:Qt.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=Vb(t,q4);if(!n){var e=[ND.of(!0)];null==t.state.field(Epe,!1)&&e.push(cr.appendConfig.of([Epe,Oit])),t.dispatch({effects:e}),n=Vb(t,q4)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=Qt.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||Qt.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return m=y,p=v,"continue";if(h){var b=s.wordAt(y.value.from);if(!b||b.from!=y.value.from||b.to!=y.value.to)return m=y,p=v,"continue"}return p=v,m=y,{v:y.value}}if(v)return m=y,p=v,{v:null};y=new o1(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,m=y},p=!1,m=new o1(s.doc,a,u[u.length-1].to);;){var g=f(p,m);if("continue"!==g&&"object"===gn(g))return g.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(Qt.range(o.from,o.to),!1),effects:Wn.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Wit=function(){function t(n){var e=this;Ce(this,t),this.view=n;var i=this.query=n.state.field(Pp).query.spec;function r(o,s,a){return Mo("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Mo("input",{value:i.search,placeholder:Ac(n,"Find"),"aria-label":Ac(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Mo("input",{value:i.replace,placeholder:Ac(n,"Replace"),"aria-label":Ac(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Mo("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Mo("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Mo("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Mo("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return RD(n)},[Ac(n,"next")]),r("prev",function(){return LD(n)},[Ac(n,"previous")]),r("select",function(){return Uit(n)},[Ac(n,"all")]),Mo("label",null,[this.caseField,Ac(n,"match case")]),Mo("label",null,[this.reField,Ac(n,"regexp")]),Mo("label",null,[this.wordField,Ac(n,"by word")])].concat(ri(n.state.readOnly?[]:[Mo("br"),this.replaceField,r("replace",function(){return Npe(n)},[Ac(n,"replace")]),r("replaceAll",function(){return zit(n)},[Ac(n,"replace all")])]),[Mo("button",{name:"close",onclick:function(){return Z4(n)},"aria-label":Ac(n,"close"),type:"button"},["\xd7"])]))}return Se(t,[{key:"commit",value:function(){var n=new Ope({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:Kb.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return Ohe(Mhe(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?LD:RD)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),Npe(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=Re(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=Re(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(Kb)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(FD).top}}]),t}();function Ac(t,n){return t.state.phrase(n)}var $D=/[\s\.,:;?!]/;function eR(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!$D.test(l[c+1])&&$D.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!$D.test(l[u-1])&&$D.test(l[u])){l=l.slice(0,u);break}return Wn.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var qit=Wn.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),tR=[Pp,G0.lowest(Hit),qit],Fpe=function(){function t(n,e,i){Ce(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return Se(t,[{key:"tokenBefore",value:function(n){for(var e=al(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Rpe(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Ppe(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var jpe=Se(function t(n,e,i){Ce(this,t),this.completion=n,this.source=e,this.match=i});function jp(t){return t.selection.main.head}function Rpe(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Lpe(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:Qt.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:Qt.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var $pe=new WeakMap;function Xit(t){if(!Array.isArray(t))return t;var n=$pe.get(t);return n||$pe.set(t,n=function Yit(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=zn(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=Re(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(U=pj(R))!=U.toLowerCase()?1:U!=U.toUpperCase()?2:0;(!D||1==G&&C||0==z&&0!=G)&&(e[m]==R||i[m]==R&&(g=!0)?s[m++]=D:s.length&&(k=!1)),z=G,D+=kc(R)}return m==c&&0==s[0]&&k?this.result((g?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,b]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,b]:m==c?this.result((g?-200:0)-100-700+(k?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=Re(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?kc($a(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),wh=Qn.define({combine:function(t){return lu(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function Bpe(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Kit=function(){function t(n,e){var i=this;Ce(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(wh);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,ri(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var m=d.label,g=0,v=1;vg&&p.appendChild(document.createTextNode(m.slice(g,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(m.slice(y,b))),C.className="cm-completionMatchedText",g=b}return g=this.range.to)&&(this.range=Bpe(i.options.length,i.selected,this.view.state.facet(wh).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Ec(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,Hpe(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],m=0,g=Re(d);try{for(g.s();!(f=g.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,b=v.result.getMatch,C=Re(v.result.options);try{for(C.s();!(y=C.n()).done;){var k=y.value,D=[1e9-m++];if(b){var L,z=Re(b(k));try{for(z.s();!(L=z.n()).done;)D.push(L.value)}catch(N){z.e(N)}finally{z.f()}}p.push(new jpe(k,v,D))}}catch(N){C.e(N)}finally{C.f()}}else{var U,G=new Jit(h.sliceDoc(v.from,v.to)),X=void 0,te=Re(v.result.options);try{for(te.s();!(U=te.n()).done;){var P=U.value;(X=G.match(P.label))&&(null!=P.boost&&(X[0]+=P.boost),p.push(new jpe(P,v,X)))}}catch(N){te.e(N)}finally{te.f()}}}}catch(N){g.e(N)}finally{g.f()}var W,J=[],H=null,le=h.facet(wh).compareCompletions,E=Re(p.sort(function(N,q){return q.match[0]-N.match[0]||le(N.completion,q.completion)}));try{for(E.s();!(W=E.n()).done;){var I=W.value;!H||H.label!=I.completion.label||H.detail!=I.completion.detail||null!=H.type&&null!=I.completion.type&&H.type!=I.completion.type||H.apply!=I.completion.apply?J.push(I):Vpe(I.completion)>Vpe(H)&&(J[J.length-1]=I),H=I.completion}}catch(N){E.e(N)}finally{E.f()}return J}(n,e);if(!s.length)return null;var a,l=e.facet(wh).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var trt=[];function nR(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var mg=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;Ce(this,t),this.source=n,this.state=e,this.explicitPos=i}return Se(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=nR(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(iR))r=new t(r.source,1,a.value?jp(n.state):-1);else if(a.is(BD))r=new t(r.source,0);else if(a.is(Upe)){var l,c=Re(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(jp(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),nrt=function(t){wt(e,mg);var n=Ct(e);function e(i,r,o,s,a){var l;return Ce(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return Se(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=jp(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&jp(i.startState)==this.from)return new mg(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,m){if(!h)return!1;var g=f.sliceDoc(p,m);return"function"==typeof h?h(g,p,m,f):Rpe(h,!0).test(g)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new Fpe(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:jp(i.state)):new mg(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new mg(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),iR=cr.define(),BD=cr.define(),Upe=cr.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),zpe=cr.define(),hu=Ba.define({create:function(){return Zit.start()},update:function(t,n){return t.update(n)},provide:function(t){return[sD.from(t,function(n){return n.tooltip}),Wn.contentAttributes.from(t,function(n){return n.attrs})]}});function VD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(hu,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function rnt(t,n){var e=t.plugin(Whe);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:zpe.of(a)}),!0}}var irt=Se(function t(n,e){Ce(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),rrt=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=Re(n.state.field(hu).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return Se(t,[{key:"update",value:function(n){var e=this,i=n.state.field(hu);if(n.selectionSet||n.docChanged||n.startState.field(hu)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!nR(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=Re(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Ec(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,ri(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(m){return m.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=Re(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==nR(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=Re(this.view.state.field(hu).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=jp(i),o=new Fpe(i,r,n.explicitPos==r),s=new irt(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:BD.of(null)}),Ec(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(wh),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new nrt(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:jp(l.updates.length?l.updates[0].startState:e.view.state)),d=Re(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(hu).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,m=new mg(l.active.source,0),g=Re(l.updates);try{for(g.s();!(p=g.n()).done;)m=m.update(p.value,r)}catch(y){g.e(y)}finally{g.f()}1!=m.state&&i.push(m)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),HD={brackets:["(","[","{","'",'"'],before:")]}:;>"},gg=cr.define({map:function(t,n){return n.mapPos(t,-1,Tl.TrackAfter)??void 0}}),rR=cr.define({map:function(t,n){return n.mapPos(t)}}),oR=new(function(t){wt(e,cg);var n=Ct(e);function e(){return Ce(this,e),n.apply(this,arguments)}return Se(e)}());oR.startSide=1,oR.endSide=-1;var Gpe=Ba.define({create:function(){return Ho.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Ho.empty)}t=t.map(n.changes);var r,o=Re(n.effects);try{var s=function(){var a=r.value;a.is(gg)?t=t.update({add:[oR.range(a.value,a.value+1)]}):a.is(rR)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function Wpe(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return pj(t<128?t:t+1)}function qpe(t,n){return t.languageDataAt("closeBrackets",n)[0]||HD}var srt="object"==(typeof navigator>"u"?"undefined":gn(navigator))&&/Android\b/.test(navigator.userAgent),art=Wn.inputHandler.of(function(t,n,e,i){if((srt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==kc($a(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=qpe(s,s.selection.main.head),u=c.brackets||HD.brackets,d=Re(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=Wpe($a(h,0));if(a==h)return f==h?drt(s,h,u.indexOf(h+h+h)>-1):crt(s,h,f,c.before||HD.before);if(a==f&&Ype(s,s.selection.main.from))return urt(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),lrt=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=qpe(n,n.selection.main.head).brackets||HD.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=kc($a(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=Re(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&UD(n.doc,s.head)==Wpe($a(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:Qt.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function Ype(t,n){var e=!1;return t.field(Gpe).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function UD(t,n){var e=t.sliceString(n,n+2);return e.slice(0,kc($a(e,0)))}function crt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:gg.of(s.to+n.length),range:Qt.range(s.anchor+n.length,s.head+n.length)};var a=UD(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:gg.of(s.head+n.length),range:Qt.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function urt(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&UD(t.doc,o.head)==e?Qt.cursor(o.head+e.length):i=o});return i?null:t.update({selection:Qt.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return rR.of(o.from)})})}function drt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:gg.of(o.to+n.length),range:Qt.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=UD(t.doc,s);if(a==n){if(Xpe(t,s))return{changes:{insert:n+n,from:s},effects:gg.of(s+n.length),range:Qt.cursor(s+n.length)};if(Ype(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:Qt.cursor(s+n.length*(l?3:1)),effects:rR.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&Xpe(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:gg.of(s+n.length),range:Qt.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=is.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=is.Word&&!function(u,d,h){for(var f=al(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var m=f.firstChild;m&&m.from==f.from&&m.to-m.from>h.length;){if(u.sliceDoc(m.to-h.length,m.to)==h)return!1;m=m.firstChild}return!0}var g=f.to==d&&f.parent;if(!g)break;f=g}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:gg.of(s+n.length),range:Qt.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Xpe(t,n){var e=al(t).resolveInner(n+1);return e.parent&&e.from==n}function hrt(){return[hu,wh.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),rrt,frt,ort]}var Jpe=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(hu,!1)&&(t.dispatch({effects:iR.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(hu,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:BD.of(null)}),0))}},{key:"ArrowDown",run:VD(!0)},{key:"ArrowUp",run:VD(!1)},{key:"PageDown",run:VD(!0,"page")},{key:"PageUp",run:VD(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(hu,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Lpe(t,n.open.options[n.open.selected]),0))}}],frt=G0.highest(iD.computeN([wh],function(t){return t.facet(wh).defaultKeymap?[Jpe]:[]})),prt=Se(function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.diagnostic=i}),Zb=function(){function t(n,e,i){Ce(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return Se(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(vg).markerFilter;o&&(r=o(r));var s=mi.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?mi.widget({widget:new _rt(a),diagnostic:a}).range(a.from):mi.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,l1(s))}}]),t}();function l1(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new prt(r,o,a.diagnostic),!1}),i}function Kpe(t,n){return!(!t.effects.some(function(e){return e.is(zD)})&&!t.changes.touchesRange(n.pos))}function Qpe(t,n){return t.field(Mc,!1)?n:n.concat(cr.appendConfig.of([Mc,Wn.decorations.compute([Mc],function(e){var i=e.field(Mc),r=i.selected;return r&&i.panel&&r.from!=r.to?mi.set([mrt.range(r.from,r.to)]):mi.none}),int(grt,{hideOn:Kpe}),brt]))}var zD=cr.define(),sR=cr.define(),Zpe=cr.define(),Mc=Ba.define({create:function(){return new Zb(mi.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=l1(e,t.selected.diagnostic,r)||l1(e,null,r)}t=new Zb(e,t.panel,i)}var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(zD)?t=Zb.init(a.value,t.panel,n.state):a.is(sR)?t=new Zb(t.diagnostics,a.value?ome.open:null,t.selected):a.is(Zpe)&&(t=new Zb(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[Hb.from(t,function(n){return n.panel}),Wn.decorations.from(t,function(n){return n.diagnostics})]}}),mrt=mi.mark({class:"cm-lintRange cm-lintRange-active"});function grt(t,n,e){var i=t.state.field(Mc).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=nme(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=Re(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=l1(this.view.state.field(Mc).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Zpe.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function GD(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function aR(t){return GD(''),'width="6" height="3"')}var brt=Wn.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:aR("#d11")},".cm-lintRange-warning":{backgroundImage:aR("orange")},".cm-lintRange-info":{backgroundImage:aR("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),xrt=function(t){wt(e,gh);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return Se(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(WD).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,m,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:lR.of({pos:f.from,above:!1,create:function(){return{dom:eme(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,m=l,window.addEventListener("mousemove",function v(y){var b=m.getBoundingClientRect();if(!(y.clientX>b.left-10&&y.clientXb.top-10&&y.clientY')},".cm-lint-marker-warning":{content:GD('')},".cm-lint-marker-error":{content:GD('')}}),WD=Qn.define({combine:function(t){return lu(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function krt(){return[WD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),sme,Crt,Srt,ame]}var lme,Drt=function(){return[dnt(),fnt,Btt(),mit(),Hnt(),Itt(),[Bb,jtt],Ao.allowMultipleSelections.of(!0),Ao.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=Re(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var m=T4(c,p.from);if(null!=m){var g=/^\s*/.exec(p.text)[0],v=Yb(c,m);g!=v&&d.push({from:p.from,to:p.from+g.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),Ofe(Wnt,{fallback:!0}),Znt(),[art,Gpe],hrt(),qtt(),Jtt(),Gtt,(n=[jit,Pit],n),iD.of([].concat(lrt,ri(Ait),Git,Cit,$nt,Jpe,vrt))];var n}(),Trt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;Ce(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return Se(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%3==0}).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Ert(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new cme(r,r.start):null,0,null)}}]),t}(),cme=Se(function t(n,e){Ce(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(lme||(lme={}));var Ert=function(){function t(n){Ce(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return Se(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),Art=function(){function t(n,e,i){Ce(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return Se(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),qD=Se(function t(){Ce(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),ume=new qD,Mrt=function(){function t(n,e){Ce(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ume,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return Se(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=ume,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=Re(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),YD=function(){function t(n,e){Ce(this,t),this.data=n,this.id=e}return Se(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,m=0,g=i[a+2];if(!(r.next<0&&g>m&&65535==i[d+3*g-3])){for(;m>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}m=v+1}}break}a=i[d+3*g-1]}}(this.data,n,e,this.id)}}]),t}();function XD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}YD.prototype.contextual=YD.prototype.fallback=YD.prototype.extend=!1;var dme,cd=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),cR=null;function hme(t,n,e){var i=t.cursor(Ha.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(dme||(dme={}));var fme,Ort=function(){function t(n,e){Ce(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Se(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?hme(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?hme(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Ua){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),Irt=function(){function t(n,e){Ce(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new qD})}return Se(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new qD).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new qD,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Ort(i,n.nodeSet):null}return Se(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,b=null,C=Re(v);try{for(C.s();!(y=C.n()).done;){var k=y.value,D=k.p.stoppedAt;(k.pos==k.p.stream.end||null!=D&&k.pos>D)&&k.p.parser.stateFlag(k.state,2)&&(!b||b.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&m.buffer.length>500){if(!((f.score-m.score||f.buffer.length-m.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var g=1;g ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(pr.contextHash)||0)==l))return n.useNode(c,u),cd&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Ua)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Ua&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),cd&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(b):i.push(b)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return pme(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),cd&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(cd&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)cd&&(h=this.stackID(d)+" -> ");var p,m=Re(a.recoverByInsert(l));try{for(m.s();!(p=m.n()).done;){var g=p.value;cd&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i)}}catch(v){m.e(v)}finally{m.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),cd&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),pme(a,i)):(!r||r.score=0)d(v,m,p[g++]);else{for(var y=p[g+-v],b=-v;b>0;b--)d(p[g++],m,y);g++}}}}catch(D){f.e(D)}finally{f.f()}}o.nodeSet=new gnt(s.map(function(D,L){return cu.define({name:L>=o.minRepeatTerm?void 0:D,id:L,props:c[L],top:l.indexOf(L)>-1,error:0==L,skipped:i.skippedNodes&&i.skippedNodes.indexOf(L)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,ri(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=XD(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var k=0;k2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=yf(this.data,o+2)}if(r==yf(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=yf(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=mme(this.data,this.tokenPrecTable,r);return o<0||mme(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=Re(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&_me(t);return{c:function(){n=ve("div"),r&&r.c(),e=tt(),o&&o.c(),i=tt(),s&&s.c(),j(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){Pe(a,n,l),r&&r.m(n,null),ue(n,e),o&&o.m(n,null),ue(n,i),s&&s.m(n,null)},p:function(a,l){var c=zn(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=vme(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=yme(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=_me(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:jt,o:jt,d:function(a){a&&Fe(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Vrt(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,m,g;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(m=p.selection)||void 0===m||null===(g=m.ranges)||void 0===g?void 0:g.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var Hrt=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Vrt,Brt,ps,{editorState:3},$rt),r}return Se(e)}(),uR=A4.define([{tag:dn.propertyName,color:"var(--jse-key-color)"},{tag:dn.number,color:"var(--jse-value-color-number)"},{tag:dn.bool,color:"var(--jse-value-color-boolean)"},{tag:dn.string,color:"var(--jse-value-color-string)"},{tag:dn.keyword,color:"var(--jse-value-color-null)"}]),Urt=Ofe(uR),zrt=uR.style;function dR(t){return t.doc.lineAt(t.selection.main.head)}function bme(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=bme(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=bme(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=dR(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,m=Re(d.visibleRanges);try{for(m.s();!(h=m.n()).done;)for(var g=h.value,y=g.to,b=g.from;b<=y;){var C=f.doc.lineAt(b);p.has(C)||p.add(C),b=C.to+1}}catch(k){m.e(k)}finally{m.f()}return p}(this.view,n),o=new Grt(r,n,this.unitWidth),s=n.facet(JD).hideFirstIndent,a=Re(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=qrt(c,this.unitWidth,s);i.add(l.from,l.from,mi.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Xrt(){return[JD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Wrt,wa.fromClass(Yrt,{decorations:function(n){return n.decorations}})]}function Jrt(t){di(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function hR(t){var n=t.slice();return n[93]=0===n[10].length,n}function xme(t){var n,e;return n=new yet({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Krt(t){var n;return{c:function(){(n=ve("div")).innerHTML='
    \n
    loading...
    ',j(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function Qrt(t){var n,e,i,r,o,s=t[92]&&wme(t),a=!t[92]&&Cme(t);return{c:function(){n=ve("div"),e=tt(),s&&s.c(),i=tt(),a&&a.c(),r=br(),j(n,"class","jse-contents svelte-1yqirn0"),At(n,"jse-hidden",t[92])},m:function(l,c){Pe(l,n,c),t[50](n),Pe(l,e,c),s&&s.m(l,c),Pe(l,i,c),a&&a.m(l,c),Pe(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&At(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&K(s,1)):((s=wme(l)).c(),K(s,1),s.m(i.parentNode,i)):s&&(Lt(),ae(s,1,1,function(){s=null}),$t()),l[92]?a&&(Lt(),ae(a,1,1,function(){a=null}),$t()):a?(a.p(l,c),1152&c[0]&&K(a,1)):((a=Cme(l)).c(),K(a,1),a.m(r.parentNode,r))},i:function(l){o||(K(s),K(a),o=!0)},o:function(l){ae(s),ae(a),o=!1},d:function(l){l&&Fe(n),t[50](null),l&&Fe(e),s&&s.d(l),l&&Fe(i),a&&a.d(l),l&&Fe(r)}}}function wme(t){var n,e,i,r,o,s=ah(t[10]||"",2e4)+"";return n=new nd({props:{icon:rg,type:"error",message:"The JSON document is larger than ".concat(Fk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(Fk(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){ft(n.$$.fragment),e=tt(),i=ve("div"),r=tn(s),j(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){dt(n,a,l),Pe(a,e,l),Pe(a,i,l),ue(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(Fk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(Fk(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=ah(a[10]||"",2e4)+"")&&qn(r,s)},i:function(a){o||(K(n.$$.fragment,a),o=!0)},o:function(a){ae(n.$$.fragment,a),o=!1},d:function(a){ht(n,a),a&&Fe(e),a&&Fe(i)}}}function Cme(t){var n,e,i,r,o,s=!t[13]&&t[8]&&Sse(t[10]),a=t[2]&&Sme(t),l=t[13]&&kme(t),c=s&&Dme(t);return r=new KP({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=tt(),l&&l.c(),e=tt(),c&&c.c(),i=tt(),ft(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),Pe(u,n,d),l&&l.m(u,d),Pe(u,e,d),c&&c.m(u,d),Pe(u,i,d),dt(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&K(a,1)):((a=Sme(u)).c(),K(a,1),a.m(n.parentNode,n)):a&&(Lt(),ae(a,1,1,function(){a=null}),$t()),u[13]?l?(l.p(u,d),8192&d[0]&&K(l,1)):((l=kme(u)).c(),K(l,1),l.m(e.parentNode,e)):l&&(Lt(),ae(l,1,1,function(){l=null}),$t()),9472&d[0]&&(s=!u[13]&&u[8]&&Sse(u[10])),s?c?(c.p(u,d),9472&d[0]&&K(c,1)):((c=Dme(u)).c(),K(c,1),c.m(i.parentNode,i)):c&&(Lt(),ae(c,1,1,function(){c=null}),$t());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(K(a),K(l),K(c),K(r.$$.fragment,u),o=!0)},o:function(u){ae(a),ae(l),ae(c),ae(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&Fe(n),l&&l.d(u),u&&Fe(e),c&&c.d(u),u&&Fe(i),ht(r,u)}}}function Sme(t){var n,e;return n=new Hrt({props:{editorState:t[6]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function kme(t){var n,e;return n=new nd({props:{type:"error",icon:rg,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Dme(t){var n,e;return n=new nd({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:rj,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:P0,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:rj,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:P0,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Zrt(t){var n,e,i,r,o,s=t[1]&&xme(hR(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[Qrt,Krt][i](c(t,i)),{c:function(){n=ve("div"),s&&s.c(),e=tt(),r.c(),j(n,"class","jse-text-mode svelte-1yqirn0"),At(n,"no-main-menu",!t[1])},m:function(u,d){Pe(u,n,d),s&&s.m(n,null),ue(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(hR(u),d),2&d[0]&&K(s,1)):((s=xme(hR(u))).c(),K(s,1),s.m(n,e)):s&&(Lt(),ae(s,1,1,function(){s=null}),$t()),r.p(c(u,i),d),(!o||2&d[0])&&At(n,"no-main-menu",!u[1])},i:function(u){o||(K(s),K(r),o=!0)},o:function(u){ae(s),ae(r),o=!1},d:function(u){u&&Fe(n),s&&s.d(),l[i].d(),t[52](null)}}}function Tme(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function eot(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,m=n.escapeUnicodeCharacters,g=n.parser,v=n.validator,y=n.validationParser,b=n.onChange,C=n.onChangeMode,k=n.onError,D=n.onFocus,L=n.onBlur,z=n.onRenderMenu,R=n.onSortModal,U=n.onTransformModal,G=ba("jsoneditor:TextMode"),X={key:"Mod-i",run:ie,shift:Me,preventDefault:!0},te=typeof window>"u";G("isSSR:",te);var P=!1,W=!0,J=[],H=new Sp,le=new Sp,E=new Sp,I=new Sp,N=new Sp,q=new Sp,V=h,re=ak(V,f,g),he=m;Yc(Ki(pn().mark(function pt(){return pn().wrap(function(In){for(;;)switch(In.prev=In.next){case 0:if(!te){In.next=2;break}return In.abrupt("return");case 2:try{s=Hn({target:o,initialText:Oo(re,P)?"":i.escapeValue(re),readOnly:c,indentation:f})}catch(oi){console.error(oi)}case 3:case"end":return In.stop()}},pt)}))),Hu(function(){s&&(G("Destroy CodeMirror editor"),s.destroy())});var Oe=!1,_e=!1,Xe=hp(),Le=hp();function rt(){s&&(G("focus"),s.focus())}var B=!1;function ne(pt){G("patch",pt);var In=g.parse(re),oi=Xu(In,pt),vi=zZ(In,pt);return ur({text:g.stringify(oi,null,f)}),{json:oi,previousJson:In,undo:vi,redo:pt}}function ie(){if(G("format"),c)return!1;try{var pt=g.parse(re);return ur({text:g.stringify(pt,null,f)}),e(8,W=!0),!0}catch(In){k(In)}return!1}function Me(){if(G("compact"),c)return!1;try{var pt=g.parse(re);return ur({text:g.stringify(pt)}),e(8,W=!1),!0}catch(In){k(In)}return!1}function Ye(){if(G("repair"),!c)try{ur({text:Kd(re)}),e(49,On="valid"),e(13,xt=null)}catch(pt){k(pt)}}function je(pt){var In=pt.id,oi=pt.rootPath,vi=pt.onTransform,Tr=pt.onClose;try{var Hr=g.parse(re);B=!0,U({id:In||Le,json:Hr,rootPath:oi||[],onTransform:function(no){vi?vi({operations:no,json:Hr,transformedJson:Xu(Hr,no)}):(G("onTransform",no),ne(no))},onClose:function(){B=!1,rt(),Tr&&Tr()}})}catch(no){k(no)}}function yt(pt,In){G("setSelection",{anchor:pt,head:In}),s&&s.dispatch(s.state.update({selection:{anchor:pt,head:In},scrollIntoView:!0}))}function Tt(pt,In){if(1===In.state.selection.ranges.length){var oi=In.state.selection.ranges[0],vi=re.slice(oi.from,oi.to);if("{"===vi||"["===vi){var Tr=lS.parse(re),Hr=Object.keys(Tr.pointers).find(function(Us){var gr;return(null===(gr=Tr.pointers[Us].value)||void 0===gr?void 0:gr.pos)===oi.from}),no=Tr.pointers[Hr];Hr&&no&&no.value&&no.valueEnd&&(G("pointer found, selecting inner contents of path:",Hr,no),yt(no.value.pos+1,no.valueEnd.pos-1))}}}function fn(){return function(pt){return vg.of({source:pt,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(ai,{delay:300})}function Hn(pt){var In=pt.target,oi=pt.initialText,vi=pt.readOnly,Tr=pt.indentation;G("Create CodeMirror editor",{readOnly:vi,indentation:Tr});var Hr=Ao.create({doc:oi,extensions:[iD.of([Mit,X]),H.of(fn()),krt(),Drt,Urt,Xrt({hideFirstIndent:!0}),Wn.domEventHandlers({dblclick:Tt}),Wn.updateListener.of(function(no){e(6,l=no.state),no.docChanged&&gi()}),new Int(Lrt),Rit({top:!0}),E.of(Ao.readOnly.of(vi)),le.of(Wn.editable.of(!vi)),N.of(Ao.tabSize.of(p)),I.of(or(Tr)),q.of(Wn.theme({},{dark:Zt()})),Wn.lineWrapping]});return s=new Wn({state:Hr,parent:In})}function Zt(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Ei(pt){var In=pt.path,oi=pt.message,vi=function(Tr,Hr){try{var no=lS.parse(Tr),Us=an(Hr),gr=no.pointers[Us];if(gr)return{path:Hr,line:gr.key?gr.key.line:gr.value?gr.value.line:0,column:gr.key?gr.key.column:gr.value?gr.value.column:0,from:gr.key?gr.key.pos:gr.value?gr.value.pos:0,to:gr.keyEnd?gr.keyEnd.pos:gr.valueEnd?gr.valueEnd.pos:0}}catch(zs){console.error(zs)}return null}(i.escapeValue(re),In);return{path:In,line:vi.line,column:vi.column,from:vi.from,to:vi.to,message:oi,severity:Jd.warning,actions:[]}}function ln(pt,In){var Tr=pt.position;return{path:[],line:pt.line,column:pt.column,from:Tr,to:Tr,severity:Jd.error,message:pt.message,actions:In&&!c?[{name:"Auto repair",apply:function(){return Ye()}}]:null}}function ur(pt){var In=arguments.length>1&&void 0!==arguments[1]&&arguments[1],oi=ak(pt,f,g),vi=!ir(pt,V),Tr=V;V=pt,e(10,re=oi),G("setCodeMirrorContent",{isChanged:vi,forceUpdate:In}),s&&(vi||In)&&(Oo(re,P)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(re)}}),mr(),vi&&Vr(V,Tr))}function wr(){if(s){var pt=s?i.unescapeValue(s.state.doc.toString()):"",In=pt!==re;if(G("onChangeCodeMirrorValue",{isChanged:In}),In){var oi=V;e(10,re=pt),V={text:re},mr(),Vr(V,oi)}}}function or(pt){return _D.of("number"==typeof pt?" ".repeat(pt):pt)}function mr(){e(11,Oe=yit(s.state)>0),e(12,_e=_it(s.state)>0),G({canUndo:Oe,canRedo:_e})}JP({onMount:Yc,onDestroy:Hu,getWindow:function(){return w0(a)},hasFocus:function(){return B&&document.hasFocus()||ck(a)},onFocus:D,onBlur:L});var gi=p0(wr,300);function Vr(pt,In){b&&b(pt,In,{contentErrors:Ii(),patchResult:null})}function Oo(pt,In){return!!pt&&pt.length>10485760&&!In}var On="valid",xt=null;function ai(){if(Oo(re,P))return[];var pt=Ii();return Lle(pt)?[Tme(ln(pt.parseError,pt.isRepairable))]:function tKe(t){return To(t)&&Array.isArray(t.validationErrors)}(pt)?pt.validationErrors.map(Ei).map(Tme):[]}function Ii(){G("validate:start"),gi.flush();var pt=Cr(i.escapeValue(re),v,g,y);return Lle(pt)?(e(49,On=pt.isRepairable?"repairable":"invalid"),e(13,xt=pt.parseError),e(9,J=[])):(e(49,On="valid"),e(13,xt=null),e(9,J=pt?.validationErrors||[])),G("validate:end"),pt}var Cr=wb($Je);function vo(){xt&&function(pt){G("select parse error",pt);var In=ln(pt,!1);yt(In.from,In.to),rt()}(xt)}var qo={icon:DXe,text:"Show me",title:"Move to the parse error location",onClick:vo};return t.$$set=function(pt){"readOnly"in pt&&e(0,c=pt.readOnly),"mainMenuBar"in pt&&e(1,u=pt.mainMenuBar),"statusBar"in pt&&e(2,d=pt.statusBar),"externalContent"in pt&&e(29,h=pt.externalContent),"indentation"in pt&&e(30,f=pt.indentation),"tabSize"in pt&&e(31,p=pt.tabSize),"escapeUnicodeCharacters"in pt&&e(32,m=pt.escapeUnicodeCharacters),"parser"in pt&&e(33,g=pt.parser),"validator"in pt&&e(34,v=pt.validator),"validationParser"in pt&&e(35,y=pt.validationParser),"onChange"in pt&&e(36,b=pt.onChange),"onChangeMode"in pt&&e(37,C=pt.onChangeMode),"onError"in pt&&e(38,k=pt.onError),"onFocus"in pt&&e(39,D=pt.onFocus),"onBlur"in pt&&e(40,L=pt.onBlur),"onRenderMenu"in pt&&e(3,z=pt.onRenderMenu),"onSortModal"in pt&&e(41,R=pt.onSortModal),"onTransformModal"in pt&&e(42,U=pt.onTransformModal)},t.$$.update=function(){var pt;2&t.$$.dirty[1]&&(i=gP({escapeControlCharacters:!1,escapeUnicodeCharacters:m})),536870912&t.$$.dirty[0]&&ur(h),8&t.$$.dirty[1]&&(G("updateLinter",v),s&&s.dispatch({effects:H.reconfigure(fn())})),1073741824&t.$$.dirty[0]&&(pt=f,s&&(G("updateIndentation",pt),s.dispatch({effects:I.reconfigure(or(pt))}))),1&t.$$.dirty[1]&&function(pt){s&&(G("updateTabSize",pt),s.dispatch({effects:N.reconfigure(Ao.tabSize.of(pt))}))}(p),1&t.$$.dirty[0]&&function(pt){s&&(G("updateReadOnly",pt),s.dispatch({effects:[E.reconfigure(Ao.readOnly.of(pt)),le.reconfigure(Wn.editable.of(!pt))]}))}(c),131074&t.$$.dirty[1]&&he!==m&&(e(48,he=m),G("forceUpdateText",{escapeUnicodeCharacters:m}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(re)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==On||c?[qo]:[{icon:vk,text:"Auto repair",title:"Automatically repair JSON",onClick:Ye},qo])},[c,u,d,z,o,a,l,P,W,J,re,Oe,_e,xt,r,te,ie,Me,function(){var pt;if(!c)try{var In=g.parse(re);B=!0,R({id:Xe,json:In,rootPath:[],onSort:(pt=Ki(pn().mark(function oi(vi){var Tr;return pn().wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:G("onSort",Tr=vi.operations),ne(Tr);case 3:case"end":return Hr.stop()}},oi)})),function(oi){return pt.apply(this,arguments)}),onClose:function(){B=!1,rt()}})}catch(oi){k(oi)}},function(){c||je({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?Z4(s):Q4(s))},function(){c||s&&(B4(s),rt())},function(){c||s&&(kD(s),rt())},function(){e(7,P=!0),ur(h,!0)},function(){C(Lo.tree)},function(){wr()},function(pt){G("select validation error",pt);var In=Ei(pt);yt(In.from,In.to),rt()},Oo,vo,h,f,p,m,g,v,y,b,C,k,D,L,R,U,rt,ne,je,function(){G("refresh"),zl().then(function(){if(s){var pt=Zt();G("updateTheme",{dark:pt}),s.dispatch({effects:[q.reconfigure(Wn.theme({},{dark:pt}))]})}})},Ii,he,On,function(pt){Hi[pt?"unshift":"push"](function(){e(4,o=pt)})},function(){return e(8,W=!1)},function(pt){Hi[pt?"unshift":"push"](function(){e(5,a=pt)})}]}var tot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,eot,Zrt,Ti,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Jrt,[-1,-1,-1,-1]),r}return Se(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function not(t){var n,e;return n=new Mk({props:{items:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&zn(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function iot(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:_k,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:gk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:Oae,title:uN,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:$P,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:LP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var rot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,iot,not,Ti,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return Se(e)}();function Eme(t,n,e){var i=t.slice();return i[9]=n[e],i}function Ame(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[g],b=qi(v);b.length>0&&!Jc(m,b);)y.unshift({op:"add",path:an(b),value:{}}),b=qi(b);return y}}return g})),f);var p,m}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Yi(c)&&mp(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var aot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,sot,oot,Ti,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Se(e)}();function lot(t){di(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function cot(t){var n,e,i,r,o=ah(t[2].stringify(t[1]),50)+"";return{c:function(){n=ve("button"),e=tn(o),j(n,"type","button"),j(n,"class","jse-inline-value svelte-l28mqd"),At(n,"jse-selected",t[3])},m:function(s,a){Pe(s,n,a),ue(n,e),i||(r=It(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=zn(a,1)[0];6&l&&o!==(o=ah(s[2].stringify(s[1]),50)+"")&&qn(e,o),8&l&&At(n,"jse-selected",s[3])},i:jt,o:jt,d:function(s){s&&Fe(n),i=!1,r()}}}function uot(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=eo(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var dot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,uot,cot,Ti,{path:0,value:1,parser:2,isSelected:3,onEdit:4},lot),r}return Se(e)}();function hot(t){di(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function Mme(t){var n,e,i,r;return e=new rr({props:{data:t[1]===Xc.asc?su:Mae}}),{c:function(){n=ve("span"),ft(e.$$.fragment),j(n,"class","jse-column-sort-icon svelte-h4fort"),j(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){Pe(o,n,s),dt(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===Xc.asc?su:Mae),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&j(n,"title",i)},i:function(o){r||(K(e.$$.fragment,o),r=!0)},o:function(o){ae(e.$$.fragment,o),r=!1},d:function(o){o&&Fe(n),ht(e)}}}function fot(t){var n,e,i,r,o,s,a,l,c=ah(t[3],50)+"",u=void 0!==t[1]&&Mme(t);return{c:function(){n=ve("button"),e=ve("span"),i=tn(c),r=tt(),u&&u.c(),j(e,"class","jse-column-name"),j(n,"type","button"),j(n,"class","jse-column-header svelte-h4fort"),j(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),At(n,"jse-readonly",t[0])},m:function(d,h){Pe(d,n,h),ue(n,e),ue(e,i),ue(n,r),u&&u.m(n,null),s=!0,a||(l=It(n,"click",t[4]),a=!0)},p:function(d,h){var f=zn(h,1)[0];(!s||8&f)&&c!==(c=ah(d[3],50)+"")&&qn(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&K(u,1)):((u=Mme(d)).c(),K(u,1),u.m(n,null)):u&&(Lt(),ae(u,1,1,function(){u=null}),$t()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&j(n,"title",o),(!s||1&f)&&At(n,"jse-readonly",d[0])},i:function(d){s||(K(u),s=!0)},o:function(d){ae(u),s=!1},d:function(d){d&&Fe(n),u&&u.d(),a=!1,l()}}}function pot(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Ui(s)?"values":iu(ql(s))),96&t.$$.dirty&&e(1,r=ir(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=qHe[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===Xc.asc?Xc.desc:Xc.asc})},s,a,c]}var KD,QD,mot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,pot,fot,Ti,{path:5,sortedColumn:6,readOnly:0,onSort:7},hot),r}return Se(e)}();function Ome(t,n){return KD||(QD=new WeakMap,KD=new ResizeObserver(function(e){var i,r=Re(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=QD.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),QD.set(t,n),KD.observe(t),{destroy:function(){QD.delete(t),KD.unobserve(t)}}}function got(t){var n,e;return n=new lce({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function vot(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,m=n.documentState,g=n.parser,v=n.showTip,y=n.onCloseContextMenu,b=n.onEditValue,C=n.onEditRow,k=n.onToggleEnforceString,D=n.onCut,L=n.onCopy,z=n.onPaste,R=n.onRemove,U=n.onDuplicateRow,G=n.onInsertBeforeRow,X=n.onInsertAfterRow,te=n.onRemoveRow;function P(){y(),b()}function W(){y(),C()}function J(){y(),k()}function H(){y(),D(!0)}function le(){y(),D(!1)}function E(){y(),L(!0)}function I(){y(),L(!1)}function N(){y(),z()}function q(){y(),R()}function V(){y(),U()}function re(){y(),G()}function he(){y(),X()}function Oe(){y(),te()}return t.$$set=function(_e){"json"in _e&&e(2,p=_e.json),"documentState"in _e&&e(3,m=_e.documentState),"parser"in _e&&e(4,g=_e.parser),"showTip"in _e&&e(0,v=_e.showTip),"onCloseContextMenu"in _e&&e(5,y=_e.onCloseContextMenu),"onEditValue"in _e&&e(6,b=_e.onEditValue),"onEditRow"in _e&&e(7,C=_e.onEditRow),"onToggleEnforceString"in _e&&e(8,k=_e.onToggleEnforceString),"onCut"in _e&&e(9,D=_e.onCut),"onCopy"in _e&&e(10,L=_e.onCopy),"onPaste"in _e&&e(11,z=_e.onPaste),"onRemove"in _e&&e(12,R=_e.onRemove),"onDuplicateRow"in _e&&e(13,U=_e.onDuplicateRow),"onInsertBeforeRow"in _e&&e(14,G=_e.onInsertBeforeRow),"onInsertAfterRow"in _e&&e(15,X=_e.onInsertAfterRow),"onRemoveRow"in _e&&e(16,te=_e.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=m.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Ui(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Sn(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Ir(i)||vs(i)||Yi(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Ir(i)||Yi(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&hb(i)&&!s&&Array.isArray(Sn(p,qi(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&hb(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!$o(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&ng(i)&&To(a),29491200&t.$$.dirty[0]&&d&&ng(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&ng(i)&&$o(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&pf(a,m.enforceStringMap,an(i.focusPath),g)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:P,icon:N0,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:N0,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:P,disabled:!c},{type:"button",icon:h?lb:cb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:J,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:H,icon:I0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:I0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:H,disabled:!l},{type:"button",icon:I0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:le,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:E,icon:yp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:yp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:E,disabled:!l},{type:"button",icon:yp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:I,disabled:!l}]},{type:"button",onClick:N,icon:Tae,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:q,icon:RP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:W,icon:N0,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:V,icon:Fae,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:re,icon:F0,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:he,icon:F0,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:Oe,icon:RP,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,m,g,y,b,C,k,D,L,z,R,U,G,X,te,o,l,u,h,c,i,a,d,r,s]}var yot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,vot,got,Ti,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return Se(e)}();function _ot(t){di(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function Ime(t,n,e){var i=t.slice();i[12]=n[e];var r=Sn(i[0],i[12]).length;return i[13]=r,i}function bot(t){var n,e;return{c:function(){n=tn(t[5]),e=tn(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){Pe(i,n,r),Pe(i,e,r)},p:function(i,r){32&r&&qn(n,i[5])},d:function(i){i&&Fe(n),i&&Fe(e)}}}function xot(t){var n;return{c:function(){n=tn("An object cannot be opened in table mode. You can open a nested array instead, or open the\n document in tree mode.")},m:function(e,i){Pe(e,n,i)},p:jt,d:function(e){e&&Fe(n)}}}function Nme(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=iu(ql(t[12]))+"",m=t[13]+"",g=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=ve("button"),e=tn(t[6]),i=tn(' "'),r=tn(p),o=tn('"\n '),s=ve("span"),a=tn("("),l=tn(m),c=tt(),u=tn(g),d=tn(")"),j(s,"class","jse-nested-array-count svelte-1te5h1h"),j(n,"type","button"),j(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,b){Pe(y,n,b),ue(n,e),ue(n,i),ue(n,r),ue(n,o),ue(n,s),ue(s,a),ue(s,l),ue(s,c),ue(s,u),ue(s,d),h||(f=It(n,"click",v),h=!0)},p:function(y,b){t=y,64&b&&qn(e,t[6]),8&b&&p!==(p=iu(ql(t[12]))+"")&&qn(r,p),9&b&&m!==(m=t[13]+"")&&qn(l,m),9&b&&g!==(g=1!==t[13]?"items":"item")&&qn(u,g)},d:function(y){y&&Fe(n),h=!1,f()}}}function wot(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v;function y(z,R){return z[4]?xot:bot}for(var b=y(t),C=b(t),k=t[3],D=[],L=0;L1&&void 0!==arguments[1]?arguments[1]:2,m=[];return function g(v,y){Do(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Ui(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Do(l)?"An object":eo(l)?"An empty array":"A ".concat(MN(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Lo.tree)}]}var Sot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Cot,wot,Ti,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},_ot),r}return Se(e)}();function kot(t){di(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function Dot(t){var n,e,i,r,o,s;return e=new rr({props:{data:IXe}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-column-header svelte-h4fort"),j(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){Pe(a,n,l),dt(e,n,null),r=!0,o||(s=It(n,"click",t[3]),o=!0)},p:function(a,l){var c=zn(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&j(n,"title",i)},i:function(a){r||(K(e.$$.fragment,a),r=!0)},o:function(a){ae(e.$$.fragment,a),r=!1},d:function(a){a&&Fe(n),ht(e),o=!1,s()}}}function Tot(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Eot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Tot,Dot,Ti,{count:0,maxSampleCount:1,onRefresh:2},kot),r}return Se(e)}();function Aot(t){di(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function Fme(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Pme(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Sn(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function jme(t,n,e){var i=t.slice();return i[125]=n[e],i}function Rme(t){var n,e;return n=new rot({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Mot(t){var n;return{c:function(){(n=ve("div")).innerHTML='
    \n
    loading...
    ',j(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function Oot(t){var n,e,i,r,o,s,a,l,c,u=[Fot,Not,Iot],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=ve("label"),e=ve("input"),i=tt(),o.c(),s=br(),j(e,"type","text"),e.readOnly="readonly",j(e,"tabindex","-1"),j(e,"class","jse-hidden-input svelte-hs49xj"),j(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){Pe(f,n,p),ue(n,e),t[71](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=It(e,"paste",t[37]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):(Lt(),ae(d[m],1,1,function(){d[m]=null}),$t(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),K(o,1),o.m(s.parentNode,s))},i:function(f){a||(K(o),a=!0)},o:function(f){ae(o),a=!1},d:function(f){f&&Fe(n),t[71](null),f&&Fe(i),d[r].d(f),f&&Fe(s),l=!1,c()}}}function Iot(t){var n,e;return n=new Sot({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Not(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:vp,text:"Repair manually",onClick:t[35]}]}}),i=new fue({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){ft(n.$$.fragment),e=tt(),ft(i.$$.fragment)},m:function(o,s){dt(n,o,s),Pe(o,e,s),dt(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:vp,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(K(n.$$.fragment,o),K(i.$$.fragment,o),r=!0)},o:function(o){ae(n.$$.fragment,o),ae(i.$$.fragment,o),r=!1},d:function(o){ht(n,o),o&&Fe(e),ht(i,o)}}}function Fot(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R=!Ui(null===(n=t[21])||void 0===n?void 0:n.root),U=R&&Lme(t),G=t[9],X=[],te=0;te"u";a("isSSR:",m);var g,v,y,b,C,k,D=n.readOnly,L=n.externalContent,z=n.mainMenuBar,R=n.escapeControlCharacters,U=n.escapeUnicodeCharacters,G=n.flattenColumns,X=n.parser,te=n.parseMemoizeOne,P=n.validator,W=n.validationParser,J=n.indentation,H=n.onChange,le=n.onChangeMode,E=n.onRenderValue,I=n.onRenderMenu,N=n.onFocus,q=n.onBlur,V=n.onSortModal,re=n.onTransformModal,he=n.onJSONEditorModal;JP({onMount:Yc,onDestroy:Hu,getWindow:function(){return w0(v)},hasFocus:function(){return rt&&document.hasFocus()||ck(v)},onFocus:function(){N&&N()},onBlur:function(){q&&q()}});var Oe,_e=void 0,Xe=1e4,Le=[],rt=!1,B={},ne=600,ie=0;function Me(Te){a("updateSelection",Te);var kt="function"==typeof Te?Te(je.selection):Te;ir(kt,je.selection)||e(10,je=Qe(Qe({},je),{},{selection:kt}))}function Ye(Te){void 0!==je.selection&&void 0!==Te&&(je.selection&&Jc(Te,je.selection.anchorPath)&&Jc(Te,je.selection.focusPath)||(a("clearing selection: path does not exist anymore",je.selection),e(10,je=Qe(Qe({},je),{},{selection:T0(Te,je)}))))}var Tt,je=dk(),yt=!1,fn=kle({onChange:function(Te){e(19,Hn=Te)}}),Hn=fn.getState();function Ei(Te){var kt=Te.previousJson,Vt=Te.previousState,rn=Te.previousText,un=Te.previousTextIsRepaired;void 0===kt&&void 0===rn||(void 0!==C?fn.add(void 0!==kt?{undo:{patch:[{op:"replace",path:"",value:kt}],state:ol(Vt),json:void 0,text:rn,textIsRepaired:un},redo:{patch:[{op:"replace",path:"",value:C}],state:ol(je),json:void 0,text:k,textIsRepaired:yt}}:{undo:{patch:void 0,json:void 0,text:rn,state:ol(Vt),textIsRepaired:un},redo:{patch:void 0,json:C,state:ol(je),text:k,textIsRepaired:yt}}):void 0!==kt&&fn.add({undo:{patch:void 0,json:kt,state:ol(Vt),text:rn,textIsRepaired:un},redo:{patch:void 0,json:void 0,text:k,textIsRepaired:yt,state:ol(je)}}))}var ln=[],ur=wb(Dle);function wr(Te,kt,Vt,rn){R0(function(){var un;try{un=ur(Te,kt,Vt,rn)}catch(ii){un=[{path:[],message:"Failed to validate: "+ii.message,severity:Jd.warning}]}ir(un,ln)||(a("validationErrors changed:",un),e(11,ln=un))},function(un){return a("validationErrors updated in ".concat(un," ms"))})}function or(){return a("validate"),_e?{parseError:_e,isRepairable:!1}:(wr(C,P,X,W),Ui(ln)?null:{validationErrors:ln})}function mr(Te,kt){if(a("patch",Te,kt),void 0===C)throw new Error("Cannot apply patch: no JSON");var Vt={json:C},rn=C,un=je,ii=yt,Ni=vae(C,Te),$n=Kse(C,je,Te).json,ei=function PZe(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=au(Yu(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return ir(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Qe(Qe({},t),{},{sortedColumn:void 0}):t}(je,Te,Le),Xn="function"==typeof kt?kt($n,ei):void 0;e(7,C=Xn&&void 0!==Xn.json?Xn.json:$n);var yr=Xn&&void 0!==Xn.state?Xn.state:ei;e(10,je=yr),e(15,k=void 0),e(18,yt=!1),e(17,Oe=void 0),fn.add({undo:{patch:Ni,json:void 0,text:void 0,state:ol(un),textIsRepaired:ii},redo:{patch:Te,json:void 0,state:ol(yr),text:void 0,textIsRepaired:yt}});var Er={json:C,previousJson:rn,undo:Ni,redo:Te};return Vr(Vt,Er),Er}function gi(Te,kt){if(!D)return mr(Te,kt)}function Vr(Te,kt){(void 0!==Te.json||void 0!==Te?.text)&&(void 0!==k?H({text:k,json:void 0},Te,{contentErrors:or(),patchResult:kt}):void 0!==C&&H({text:void 0,json:C},Te,{contentErrors:or(),patchResult:kt}))}function Oo(Te){a("handleFind",Te)}function On(Te){a("pasted json as text",Te),e(17,Oe=Te)}function xt(Te){var kt=parseInt(Te[0]),Vt=[String(kt+1)].concat(ri(Te.slice(1)));return Jc(C,Vt)?fr(Vt,!1):fr(Te,!1)}function ai(){b&&(b.focus(),b.select())}function Ii(){je.selection||Me(function(){if(eo(C)&&!Ui(C)&&!Ui(Le))return fr(["0"].concat(ri(Le[0])),!1)}())}function Cr(Te){var kt=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Vt=lj(Te,Le,B,18),rn=Vt-ie,un=pt(Te);a("scrollTo",{path:Te,top:Vt,scrollTop:ie,elem:un});var ii=y.getBoundingClientRect();if(un&&!kt){var Ni=un.getBoundingClientRect();if(Ni.bottom>ii.top&&Ni.topVt.right&&e(13,y.scrollLeft+=rn.right-Vt.right,y),rn.left($n=ie+ii.height-18)&&e(13,y.scrollTop+=un-$n,y),rn0&&void 0!==Vt[0])||Vt[0],void 0!==C){rn.next=3;break}return rn.abrupt("return");case 3:return rn.next=5,cue({json:C,documentState:je,indentation:kt?J:void 0,parser:X});case 5:case"end":return rn.stop()}},Te)})),qa.apply(this,arguments)}function Oc(){due({json:C,text:k,documentState:je,keepSelection:!0,readOnly:D,onChange:H,onPatch:gi})}function xe(){!function jZe(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&M0(e.selection)){var s=au(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;kl("duplicate row",{rowIndex:a});var c=[String(a)];o(pae(n,[c]),function(u,d){var h=fr(lg({rowIndex:a0?a-1:void 0,h=void 0!==d?fr(lg({rowIndex:d,columnIndex:l},i),!1):void 0;return kl("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Qe(Qe({},u),{},{selection:h})}})}}({json:C,documentState:je,columns:Le,readOnly:D,onPatch:gi})}function Ue(){return(Ue=Ki(pn().mark(function Te(kt){return pn().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,hue({char:kt,selectInside:!1,refJsonEditor:v,json:C,documentState:je,readOnly:D,parser:X,onPatch:gi,onReplaceJson:kn,onSelect:Me});case 2:case"end":return Vt.stop()}},Te)}))).apply(this,arguments)}function kn(Te,kt){var Vt=je,rn=C,un=k,ii={json:C,text:k},Ni=yt,$n=ru(C,je,[],lh),ei="function"==typeof kt?kt(Te,$n):void 0;e(7,C=ei&&void 0!==ei.json?ei.json:Te),e(10,je=ei&&void 0!==ei.state?ei.state:$n),e(15,k=void 0),e(18,yt=!1),Ye(C),Ei({previousJson:rn,previousState:Vt,previousText:un,previousTextIsRepaired:Ni}),Vr(ii,null)}function ni(Te,kt){a("handleChangeText");var Vt=je,rn=C,un=k,ii={json:C,text:k},Ni=yt;try{e(7,C=te(Te)),e(10,je=ru(C,je,[],lh)),e(15,k=void 0),e(18,yt=!1)}catch{try{e(7,C=te(Kd(Te))),e(10,je=ru(C,je,[],lh)),e(15,k=Te),e(18,yt=!0)}catch{e(7,C=void 0),e(10,je=dk({json:C,expand:lh})),e(15,k=Te),e(18,yt=!1)}}if("function"==typeof kt){var $n=kt(C,je);e(7,C=$n&&$n.json?$n.json:C),e(10,je=$n&&$n.state?$n.state:je)}Ye(C),Ei({previousJson:rn,previousState:Vt,previousText:un,previousTextIsRepaired:Ni}),Vr(ii,null)}function ci(Te){var Vt=Te.rootPath,rn=Te.onTransform,un=Te.onClose;D||void 0===C||(rt=!0,re({id:Te.id||p,json:C,rootPath:Vt||[],onTransform:rn?function(ii){rn({operations:ii,json:C,transformedJson:Xu(C,ii)})}:function(ii){a("onTransform",Vt,ii),gi(ii)},onClose:function(){rt=!1,ai(),un&&un()}}))}function li(Te){a("openJSONEditorModal",{path:Te}),rt=!0,he({content:{json:Sn(C,Te)},path:Te,onPatch:Tt.onPatch,onClose:function(){rt=!1,ai()}})}function Sr(Te,kt){l(qle,{text:Te,onParse:ok,onRepair:yse,onApply:kt},Qe(Qe({},Vm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ai()}})}function qr(){if(!D&&fn.getState().canUndo){var Te=fn.undo();if(Te){var kt={json:C,text:k};e(7,C=Te.undo.patch?Xu(C,Te.undo.patch):Te.undo.json),e(10,je=Te.undo.state),e(15,k=Te.undo.text),e(18,yt=Te.undo.textIsRepaired),a("undo",{item:Te,json:C}),Vr(kt,{json:C,previousJson:kt.json,redo:Te.undo.patch,undo:Te.redo.patch}),ai(),je.selection&&Cr(je.selection.focusPath,!1)}}}function fi(){if(!D&&fn.getState().canRedo){var Te=fn.redo();if(Te){var kt={json:C,text:k};e(7,C=Te.redo.patch?Xu(C,Te.redo.patch):Te.redo.json),e(10,je=Te.redo.state),e(15,k=Te.redo.text),e(18,yt=Te.redo.textIsRepaired),a("redo",{item:Te,json:C}),Vr(kt,{json:C,previousJson:kt.json,redo:Te.redo.patch,undo:Te.undo.patch}),ai(),je.selection&&Cr(je.selection.focusPath,!1)}}}function vr(Te,kt){e(68,B[kt]=Te.getBoundingClientRect().height,B)}return t.$$set=function(Te){"readOnly"in Te&&e(0,D=Te.readOnly),"externalContent"in Te&&e(47,L=Te.externalContent),"mainMenuBar"in Te&&e(1,z=Te.mainMenuBar),"escapeControlCharacters"in Te&&e(48,R=Te.escapeControlCharacters),"escapeUnicodeCharacters"in Te&&e(49,U=Te.escapeUnicodeCharacters),"flattenColumns"in Te&&e(50,G=Te.flattenColumns),"parser"in Te&&e(2,X=Te.parser),"parseMemoizeOne"in Te&&e(51,te=Te.parseMemoizeOne),"validator"in Te&&e(52,P=Te.validator),"validationParser"in Te&&e(53,W=Te.validationParser),"indentation"in Te&&e(3,J=Te.indentation),"onChange"in Te&&e(54,H=Te.onChange),"onChangeMode"in Te&&e(4,le=Te.onChangeMode),"onRenderValue"in Te&&e(55,E=Te.onRenderValue),"onRenderMenu"in Te&&e(5,I=Te.onRenderMenu),"onFocus"in Te&&e(56,N=Te.onFocus),"onBlur"in Te&&e(57,q=Te.onBlur),"onSortModal"in Te&&e(58,V=Te.onSortModal),"onTransformModal"in Te&&e(59,re=Te.onTransformModal),"onJSONEditorModal"in Te&&e(60,he=Te.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,g=gP({escapeControlCharacters:R,escapeUnicodeCharacters:U})),65536&t.$$.dirty[1]&&function Zt(Te){var kt=C,Vt=x0(Te)?Te.text!==k:!ir(kt,Te.json);if(a("update external content",{isChanged:Vt}),Vt){var rn={json:C,text:k},un=C,ii=je,Ni=k,$n=yt;if(x0(Te))try{e(7,C=te(Te.text)),e(15,k=Te.text),e(18,yt=!1),e(16,_e=void 0)}catch(ei){try{e(7,C=te(Kd(Te.text))),e(15,k=Te.text),e(18,yt=!0),e(16,_e=void 0)}catch{e(7,C=void 0),e(15,k=L.text),e(18,yt=!1),e(16,_e=sk(k,ei.message||ei.toString()))}}else e(7,C=Te.json),e(15,k=void 0),e(18,yt=!1),e(16,_e=void 0);Ye(C),je.sortedColumn&&e(10,je=Qe(Qe({},je),{},{sortedColumn:void 0})),Ei({previousJson:un,previousState:ii,previousText:Ni,previousTextIsRepaired:$n}),Vr(rn,null)}}(L),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,Le=eo(C)?function(Te,kt){var Vt,rn=new Set(kt.map(an)),un=new Set(Te.map(an)),ii=Re(rn);try{for(ii.s();!(Vt=ii.n()).done;){var Ni=Vt.value;un.has(Ni)||rn.delete(Ni)}}catch(yr){ii.e(yr)}finally{ii.f()}var $n,ei=Re(un);try{for(ei.s();!($n=ei.n()).done;){var Xn=$n.value;rn.has(Xn)||rn.add(Xn)}}catch(yr){ei.e(yr)}finally{ei.f()}return ri(rn).map(Yu)}(function(Te,kt){var Vt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,rn={};Array.isArray(Te)&&function Hqe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rXe),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(Te,kt,Vt,rn,un){for(var ii=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Ni=eo(Vt)?Vt.length:0,$n=function IZe(t,n){var e=Object.values(t);return Ui(e)?n:e.reduce(function(r,o){return r+o})/e.length}(rn,un),ei=Te-ii,Xn=kt+2*ii,yr=function(gd){return rn[gd]||un},Er=0,Io=0;Io0&&(Io-=yr(--Er));for(var sa=Er,md=0;md0?fr(lg({rowIndex:yr.rowIndex,columnIndex:Io-1},ei),!1):Xn;Me(Vt),qo(Vt.focusPath)}if("ArrowRight"===kt&&(Te.preventDefault(),Ii(),je.selection)){var rn=function(ei,Xn){var yr=au(Xn.focusPath,ei),Io=yr.columnIndex;return Io0?fr(lg({rowIndex:Er-1,columnIndex:yr.columnIndex},ei),!1):Xn}(Le,je.selection);Me(un),qo(un.focusPath)}if("ArrowDown"===kt&&(Te.preventDefault(),Ii(),je.selection)){var ii=function(ei,Xn,yr){var Er=au(yr.focusPath,Xn),Io=Er.rowIndex;return Io1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new Jme({props:{mode:Fn(t[18]).mode,content:Fn(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:fh,onBlur:fh,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&Kme(t),k=t[18].length>1&&Qme(t);function D(R,U){return R[0]?Wot:qot}var L=D(t),z=L(t);return{c:function(){n=ve("div"),ft(e.$$.fragment),i=tt(),r=ve("div"),(o=ve("div")).innerHTML='
    Path
    ',s=tt(),a=ve("input"),l=tt(),(c=ve("div")).innerHTML='
    Contents
    ',u=tt(),d=ve("div"),ft(h.$$.fragment),f=tt(),p=ve("div"),C&&C.c(),m=tt(),k&&k.c(),g=tt(),z.c(),j(o,"class","jse-label svelte-1hibiw3"),j(a,"class","jse-path svelte-1hibiw3"),j(a,"type","text"),a.readOnly=!0,j(a,"title","Selected path"),a.value=t[21],j(c,"class","jse-label svelte-1hibiw3"),j(d,"class","jse-modal-inline-editor svelte-1hibiw3"),j(p,"class","jse-actions svelte-1hibiw3"),j(r,"class","jse-modal-contents svelte-1hibiw3"),j(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(R,U){Pe(R,n,U),dt(e,n,null),ue(n,i),ue(n,r),ue(r,o),ue(r,s),ue(r,a),ue(r,l),ue(r,c),ue(r,u),ue(r,d),dt(h,d,null),ue(r,f),ue(r,p),C&&C.m(p,null),ue(p,m),k&&k.m(p,null),ue(p,g),z.m(p,null),v=!0,y||(b=ya(Ok.call(null,n,t[23])),y=!0)},p:function(R,U){var G={};262144&U[0]&&(G.title="Edit nested content "+(R[18].length>1?" (".concat(R[18].length,")"):"")),e.$set(G),(!v||2097152&U[0]&&a.value!==R[21])&&(a.value=R[21]);var X={};262144&U[0]&&(X.mode=Fn(R[18]).mode),262144&U[0]&&(X.content=Fn(R[18]).content),1&U[0]&&(X.readOnly=R[0]),2&U[0]&&(X.indentation=R[1]),4&U[0]&&(X.tabSize=R[2]),32&U[0]&&(X.statusBar=R[5]),8&U[0]&&(X.mainMenuBar=R[3]),16&U[0]&&(X.navigationBar=R[4]),64&U[0]&&(X.escapeControlCharacters=R[6]),128&U[0]&&(X.escapeUnicodeCharacters=R[7]),256&U[0]&&(X.flattenColumns=R[8]),512&U[0]&&(X.parser=R[9]),1048576&U[0]&&(X.parseMemoizeOne=R[20]),1024&U[0]&&(X.validator=R[10]),2048&U[0]&&(X.validationParser=R[11]),4096&U[0]&&(X.pathParser=R[12]),8192&U[0]&&(X.onRenderValue=R[13]),16384&U[0]&&(X.onClassName=R[14]),32768&U[0]&&(X.onRenderMenu=R[15]),65536&U[0]&&(X.onSortModal=R[16]),131072&U[0]&&(X.onTransformModal=R[17]),h.$set(X),R[19]?C?C.p(R,U):((C=Kme(R)).c(),C.m(p,m)):C&&(C.d(1),C=null),R[18].length>1?k?(k.p(R,U),262144&U[0]&&K(k,1)):((k=Qme(R)).c(),K(k,1),k.m(p,g)):k&&(Lt(),ae(k,1,1,function(){k=null}),$t()),L===(L=D(R))&&z?z.p(R,U):(z.d(1),(z=L(R))&&(z.c(),z.m(p,null)))},i:function(R){v||(K(e.$$.fragment,R),K(h.$$.fragment,R),K(k),v=!0)},o:function(R){ae(e.$$.fragment,R),ae(h.$$.fragment,R),ae(k),v=!1},d:function(R){R&&Fe(n),ht(e),ht(h),C&&C.d(),k&&k.d(),z.d(),y=!1,b()}}}function Zme(t){t.focus()}function Xot(t,n,e){var i,r,o,s=ba("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,m=n.statusBar,g=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,b=n.parser,C=n.validator,k=n.validationParser,D=n.pathParser,L=n.onRenderValue,z=n.onClassName,R=n.onRenderMenu,U=n.onSortModal,G=n.onTransformModal,X=_a("simple-modal").close,te=[{mode:W(a),content:a,relativePath:l}],P=void 0;function W(H){return mP(H)&&eo(H.json)?Lo.table:Lo.tree}function J(H){s("handleChange",H);var le=Qe(Qe({},Fn(te)),{},{content:H});e(18,te=[].concat(ri(qi(te)),[le]))}return t.$$set=function(H){"content"in H&&e(28,a=H.content),"path"in H&&e(29,l=H.path),"onPatch"in H&&e(30,c=H.onPatch),"readOnly"in H&&e(0,u=H.readOnly),"indentation"in H&&e(1,d=H.indentation),"tabSize"in H&&e(2,h=H.tabSize),"mainMenuBar"in H&&e(3,f=H.mainMenuBar),"navigationBar"in H&&e(4,p=H.navigationBar),"statusBar"in H&&e(5,m=H.statusBar),"escapeControlCharacters"in H&&e(6,g=H.escapeControlCharacters),"escapeUnicodeCharacters"in H&&e(7,v=H.escapeUnicodeCharacters),"flattenColumns"in H&&e(8,y=H.flattenColumns),"parser"in H&&e(9,b=H.parser),"validator"in H&&e(10,C=H.validator),"validationParser"in H&&e(11,k=H.validationParser),"pathParser"in H&&e(12,D=H.pathParser),"onRenderValue"in H&&e(13,L=H.onRenderValue),"onClassName"in H&&e(14,z=H.onClassName),"onRenderMenu"in H&&e(15,R=H.onRenderMenu),"onSortModal"in H&&e(16,U=H.onSortModal),"onTransformModal"in H&&e(17,G=H.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=te.flatMap(function(H){return H.relativePath})),1&t.$$.dirty[1]&&e(21,r=Ui(i)?"(whole document)":iu(ql(i))),512&t.$$.dirty[0]&&e(20,o=wb(b.parse))},[u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,te,P,o,r,function(){if(s("handleApply"),!u)try{e(19,P=void 0);var H=[{op:"replace",path:an(Fn(te).relativePath),value:bse(Fn(te).content,b).json}];if(te.length>1){var le={json:Xu(bse(te[te.length-2].content,b).json,H)};e(18,te=qi(te)),J(le)}else c(H),X()}catch(E){e(19,P=E.toString())}},function(){s("handleClose"),te.length>1?(e(18,te=qi(te)),e(19,P=void 0)):X()},J,function(H){s("handleChangeMode",H);var le=Qe(Qe({},Fn(te)),{},{mode:H});e(18,te=[].concat(ri(qi(te)),[le]))},function(H){e(19,P=H.toString()),console.error(H)},function(H){var le=H.content,E=H.path;s("handleJSONEditorModal",{content:le,path:E});var I={mode:W(le),content:le,relativePath:E};e(18,te=[].concat(ri(te),[I]))},a,l,c,i]}var Jot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Xot,Yot,Ti,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},Got,[-1,-1]),r}return Se(e)}();function Kot(t,n,e){var i=_a("simple-modal");return[i.open,i.close]}var Qot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Kot,null,Ti,{open:0,close:1}),r}return Se(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function Zot(t){di(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function ege(t){var n,e;return n=new Jme({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){ft(n.$$.fragment)},m:function(r,o){dt(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(K(n.$$.fragment,r),e=!0)},o:function(r){ae(n.$$.fragment,r),e=!1},d:function(r){t[56](null),ht(n,r)}}}function est(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new Qot({props:l}),Hi.push(function(){return zu(n,"open",a)});var c=ege(t);return{c:function(){ft(n.$$.fragment),i=tt(),r=ve("div"),c.c(),j(r,"class","jse-main svelte-sxaskb"),At(r,"jse-focus",t[20])},m:function(u,d){dt(n,u,d),Pe(u,i,d),Pe(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],Uu(function(){return e=!1})),n.$set(h),524288&d[0]&&Ti(s,s=u[19])?(Lt(),ae(c,1,1,jt),$t(),(c=ege(u)).c(),K(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&At(r,"jse-focus",u[20])},i:function(u){o||(K(n.$$.fragment,u),K(c),o=!0)},o:function(u){ae(n.$$.fragment,u),ae(c),o=!1},d:function(u){ht(n,u),u&&Fe(i),u&&Fe(r),c.d(u)}}}function tst(t){var n,e;return n=new PZ({props:{closeOnEsc:!1,$$slots:{default:[est]},$$scope:{ctx:t}}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function nst(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},jZ,{closeOnEsc:!1}],o={$$slots:{default:[tst]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(m,g){return"".concat(m).concat(g)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(m,g){return g instanceof e&&(m[g.str]=(m[g.str]||0)+1),m},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,m=new Array(p>1?p-1:0),g=1;g1?p-1:0),g=1;g0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;Ce(this,l),this._names={},this._prefixes=u,this._parent=d}return Se(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){wt(u,l);var c=Ct(u);function u(d,h){var f;return Ce(this,u),(f=c.call(this,h)).prefix=d,f}return Se(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(Jq||(Jq=Ee([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)(Kq||(Kq=Ee(["\n"],["\\n"]))),a=function(l){wt(u,l);var c=Ct(u);function u(d){var h;return Ce(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Qe(Qe({},d),{},{_n:d.lines?s:e.nil}),h}return Se(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),m=p.prefix,g=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[m];if(v){var y=v.get(g);if(y)return y}else v=this._values[m]=new Map;v.set(g,p);var b=this._scope[m]||(this._scope[m]=[]),C=b.length;return b[C]=h.ref,p.setValue(h,{property:m,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(Qq||(Qq=Ee(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m=arguments.length>3?arguments[3]:void 0,g=e.nil,v=function(b){var C=d[b];if(!C)return"continue";var k=p[b]=p[b]||new Map;C.forEach(function(D){if(!k.has(D)){k.set(D,n.Started);var L=h(D);if(L){var z=f.opts.es5?t.varKinds.var:t.varKinds.const;g=(0,e._)(Zq||(Zq=Ee(["",""," "," = ",";",""])),g,z,D,L,f.opts._n)}else{if(!(L=m?.(D)))throw new i(D);g=(0,e._)(eY||(eY=Ee(["","","",""])),g,L,f.opts._n)}k.set(D,n.Completed)}})};for(var y in d)v(y);return g}}]),u}(r);t.ValueScope=a}(hge)),hge}function xr(){return dge||(dge=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=eT(),e=fge(),i=eT();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=fge();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function N(){Ce(this,N)}return Se(N,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(q,V){return this}}]),N}(),s=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe){var _e;return Ce(this,V),(_e=q.call(this)).varKind=re,_e.name=he,_e.rhs=Oe,_e}return Se(V,[{key:"render",value:function(re){var Oe=re._n,_e=re.es5?e.varKinds.var:this.varKind,Xe=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(_e," ").concat(this.name).concat(Xe,";")+Oe}},{key:"optimizeNames",value:function(re,he){if(re[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,re,he)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),V}(o),a=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe){var _e;return Ce(this,V),(_e=q.call(this)).lhs=re,_e.rhs=he,_e.sideEffects=Oe,_e}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+he}},{key:"optimizeNames",value:function(re,he){if(!(this.lhs instanceof n.Name)||re[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,re,he),this}},{key:"names",get:function(){return te(this.lhs instanceof n.Name?{}:Qe({},this.lhs.names),this.rhs)}}]),V}(o),l=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe,_e){var Xe;return Ce(this,V),(Xe=q.call(this,re,Oe,_e)).op=he,Xe}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+he}}]),V}(a),c=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).label=re,he.names={},he}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.label,":")+he}}]),V}(o),u=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).label=re,he.names={},he}return Se(V,[{key:"render",value:function(re){var he=re._n,Oe=this.label?" ".concat(this.label):"";return"break".concat(Oe,";")+he}}]),V}(o),d=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).error=re,he}return Se(V,[{key:"render",value:function(re){var he=re._n;return"throw ".concat(this.error,";")+he}},{key:"names",get:function(){return this.error.names}}]),V}(o),h=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).code=re,he}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.code,";")+he}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(re,he){return this.code=P(this.code,re,he),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),V}(o),f=function(N){wt(V,N);var q=Ct(V);function V(){var re,he=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Ce(this,V),(re=q.call(this)).nodes=he,re}return Se(V,[{key:"render",value:function(re){return this.nodes.reduce(function(he,Oe){return he+Oe.render(re)},"")}},{key:"optimizeNodes",value:function(){for(var re=this.nodes,he=re.length;he--;){var Oe=re[he].optimizeNodes();Array.isArray(Oe)?re.splice.apply(re,[he,1].concat(ri(Oe))):Oe?re[he]=Oe:re.splice(he,1)}return re.length>0?this:void 0}},{key:"optimizeNames",value:function(re,he){for(var Oe=this.nodes,_e=Oe.length;_e--;){var Xe=Oe[_e];Xe.optimizeNames(re,he)||(W(re,Xe.names),Oe.splice(_e,1))}return Oe.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(re,he){return X(re,he.names)},{})}}]),V}(o),p=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){return"{"+re._n+hr(Wi(V.prototype),"render",this).call(this,re)+"}"+re._n}}]),V}(f),m=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V)}(f),g=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V)}(p);g.kind="else";var v=function(N){wt(V,N);var q=Ct(V);function V(re,he){var Oe;return Ce(this,V),(Oe=q.call(this,he)).condition=re,Oe}return Se(V,[{key:"render",value:function(re){var he="if(".concat(this.condition,")")+hr(Wi(V.prototype),"render",this).call(this,re);return this.else&&(he+="else "+this.else.render(re)),he}},{key:"optimizeNodes",value:function(){hr(Wi(V.prototype),"optimizeNodes",this).call(this);var re=this.condition;if(!0===re)return this.nodes;var he=this.else;if(he){var Oe=he.optimizeNodes();he=this.else=Array.isArray(Oe)?new g(Oe):Oe}return he?!1===re?he instanceof V?he:he.nodes:this.nodes.length?this:new V(J(re),he instanceof V?[he]:he.nodes):!1!==re&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(re,he){var Oe;if(this.else=null===(Oe=this.else)||void 0===Oe?void 0:Oe.optimizeNames(re,he),hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he)||this.else)return this.condition=P(this.condition,re,he),this}},{key:"names",get:function(){var re=hr(Wi(V.prototype),"names",this);return te(re,this.condition),this.else&&X(re,this.else.names),re}}]),V}(p);v.kind="if";var y=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V)}(p);y.kind="for";var b=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).iteration=re,he}return Se(V,[{key:"render",value:function(re){return"for(".concat(this.iteration,")")+hr(Wi(V.prototype),"render",this).call(this,re)}},{key:"optimizeNames",value:function(re,he){if(hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he))return this.iteration=P(this.iteration,re,he),this}},{key:"names",get:function(){return X(hr(Wi(V.prototype),"names",this),this.iteration.names)}}]),V}(y),C=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe,_e){var Xe;return Ce(this,V),(Xe=q.call(this)).varKind=re,Xe.name=he,Xe.from=Oe,Xe.to=_e,Xe}return Se(V,[{key:"render",value:function(re){var Oe=this.name,_e=this.from,Xe=this.to;return"for(".concat(re.es5?e.varKinds.var:this.varKind," ").concat(Oe,"=").concat(_e,"; ").concat(Oe,"<").concat(Xe,"; ").concat(Oe,"++)")+hr(Wi(V.prototype),"render",this).call(this,re)}},{key:"names",get:function(){var re=te(hr(Wi(V.prototype),"names",this),this.from);return te(re,this.to)}}]),V}(y),k=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe,_e){var Xe;return Ce(this,V),(Xe=q.call(this)).loop=re,Xe.varKind=he,Xe.name=Oe,Xe.iterable=_e,Xe}return Se(V,[{key:"render",value:function(re){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+hr(Wi(V.prototype),"render",this).call(this,re)}},{key:"optimizeNames",value:function(re,he){if(hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he))return this.iterable=P(this.iterable,re,he),this}},{key:"names",get:function(){return X(hr(Wi(V.prototype),"names",this),this.iterable.names)}}]),V}(y),D=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe){var _e;return Ce(this,V),(_e=q.call(this)).name=re,_e.args=he,_e.async=Oe,_e}return Se(V,[{key:"render",value:function(re){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(p);D.kind="func";var L=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){return"return "+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(f);L.kind="return";var z=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){var he="try"+hr(Wi(V.prototype),"render",this).call(this,re);return this.catch&&(he+=this.catch.render(re)),this.finally&&(he+=this.finally.render(re)),he}},{key:"optimizeNodes",value:function(){var re,he;return hr(Wi(V.prototype),"optimizeNodes",this).call(this),null===(re=this.catch)||void 0===re||re.optimizeNodes(),null===(he=this.finally)||void 0===he||he.optimizeNodes(),this}},{key:"optimizeNames",value:function(re,he){var Oe,_e;return hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he),null===(Oe=this.catch)||void 0===Oe||Oe.optimizeNames(re,he),null===(_e=this.finally)||void 0===_e||_e.optimizeNames(re,he),this}},{key:"names",get:function(){var re=hr(Wi(V.prototype),"names",this);return this.catch&&X(re,this.catch.names),this.finally&&X(re,this.finally.names),re}}]),V}(p),R=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).error=re,he}return Se(V,[{key:"render",value:function(re){return"catch(".concat(this.error,")")+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(p);R.kind="catch";var U=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){return"finally"+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(p);U.kind="finally";var G=function(){function N(q){var V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,N),this._values={},this._blockStarts=[],this._constants={},this.opts=Qe(Qe({},V),{},{_n:V.lines?"\n":""}),this._extScope=q,this._scope=new e.Scope({parent:q}),this._nodes=[new m]}return Se(N,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(q){return this._scope.name(q)}},{key:"scopeName",value:function(q){return this._extScope.name(q)}},{key:"scopeValue",value:function(q,V){var re=this._extScope.value(q,V);return(this._values[re.prefix]||(this._values[re.prefix]=new Set)).add(re),re}},{key:"getScopeValue",value:function(q,V){return this._extScope.getValue(q,V)}},{key:"scopeRefs",value:function(q){return this._extScope.scopeRefs(q,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(q,V,re,he){var Oe=this._scope.toName(V);return void 0!==re&&he&&(this._constants[Oe.str]=re),this._leafNode(new s(q,Oe,re)),Oe}},{key:"const",value:function(q,V,re){return this._def(e.varKinds.const,q,V,re)}},{key:"let",value:function(q,V,re){return this._def(e.varKinds.let,q,V,re)}},{key:"var",value:function(q,V,re){return this._def(e.varKinds.var,q,V,re)}},{key:"assign",value:function(q,V,re){return this._leafNode(new a(q,V,re))}},{key:"add",value:function(q,V){return this._leafNode(new l(q,t.operators.ADD,V))}},{key:"code",value:function(q){return"function"==typeof q?q():q!==n.nil&&this._leafNode(new h(q)),this}},{key:"object",value:function(){for(var q=["{"],V=arguments.length,re=new Array(V),he=0;he1&&q.push(","),q.push(Le),(Le!==rt||this.opts.es5)&&(q.push(":"),(0,n.addCodeArg)(q,rt))}return q.push("}"),new n._Code(q)}},{key:"if",value:function(q,V,re){if(this._blockNode(new v(q)),V&&re)this.code(V).else().code(re).endIf();else if(V)this.code(V).endIf();else if(re)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(q){return this._elseNode(new v(q))}},{key:"else",value:function(){return this._elseNode(new g)}},{key:"endIf",value:function(){return this._endBlockNode(v,g)}},{key:"_for",value:function(q,V){return this._blockNode(q),V&&this.code(V).endFor(),this}},{key:"for",value:function(q,V){return this._for(new b(q),V)}},{key:"forRange",value:function(q,V,re,he){var Oe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,_e=this._scope.toName(q);return this._for(new C(Oe,_e,V,re),function(){return he(_e)})}},{key:"forOf",value:function(q,V,re){var he=this,Oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,_e=this._scope.toName(q);if(this.opts.es5){var Xe=V instanceof n.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,n._)(tY||(tY=Ee(["",".length"])),Xe),function(Le){he.var(_e,(0,n._)(nY||(nY=Ee(["","[","]"])),Xe,Le)),re(_e)})}return this._for(new k("of",Oe,_e,V),function(){return re(_e)})}},{key:"forIn",value:function(q,V,re){var he=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(q,(0,n._)(iY||(iY=Ee(["Object.keys(",")"])),V),re);var Oe=this._scope.toName(q);return this._for(new k("in",he,Oe,V),function(){return re(Oe)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(q){return this._leafNode(new c(q))}},{key:"break",value:function(q){return this._leafNode(new u(q))}},{key:"return",value:function(q){var V=new L;if(this._blockNode(V),this.code(q),1!==V.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(L)}},{key:"try",value:function(q,V,re){if(!V&&!re)throw new Error('CodeGen: "try" without "catch" and "finally"');var he=new z;if(this._blockNode(he),this.code(q),V){var Oe=this.name("e");this._currNode=he.catch=new R(Oe),V(Oe)}return re&&(this._currNode=he.finally=new U,this.code(re)),this._endBlockNode(R,U)}},{key:"throw",value:function(q){return this._leafNode(new d(q))}},{key:"block",value:function(q,V){return this._blockStarts.push(this._nodes.length),q&&this.code(q).endBlock(V),this}},{key:"endBlock",value:function(q){var V=this._blockStarts.pop();if(void 0===V)throw new Error("CodeGen: not in self-balancing block");var re=this._nodes.length-V;if(re<0||void 0!==q&&re!==q)throw new Error("CodeGen: wrong number of nodes: ".concat(re," vs ").concat(q," expected"));return this._nodes.length=V,this}},{key:"func",value:function(q){var he=arguments.length>3?arguments[3]:void 0;return this._blockNode(new D(q,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),he&&this.code(he).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(D)}},{key:"optimize",value:function(){for(var q=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;q-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(q){return this._currNode.nodes.push(q),this}},{key:"_blockNode",value:function(q){this._currNode.nodes.push(q),this._nodes.push(q)}},{key:"_endBlockNode",value:function(q,V){var re=this._currNode;if(re instanceof q||V&&re instanceof V)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(V?"".concat(q.kind,"/").concat(V.kind):q.kind,'"'))}},{key:"_elseNode",value:function(q){var V=this._currNode;if(!(V instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=q,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var q=this._nodes;return q[q.length-1]},set:function(q){var V=this._nodes;V[V.length-1]=q}}]),N}();function X(N,q){for(var V in q)N[V]=(N[V]||0)+(q[V]||0);return N}function te(N,q){return q instanceof n._CodeOrName?X(N,q.names):N}function P(N,q,V){return N instanceof n.Name?re(N):(he=N)instanceof n._Code&&he._items.some(function(Oe){return Oe instanceof n.Name&&1===q[Oe.str]&&void 0!==V[Oe.str]})?new n._Code(N._items.reduce(function(he,Oe){return Oe instanceof n.Name&&(Oe=re(Oe)),Oe instanceof n._Code?he.push.apply(he,ri(Oe._items)):he.push(Oe),he},[])):N;var he;function re(he){var Oe=V[he.str];return void 0===Oe||1!==q[he.str]?he:(delete q[he.str],Oe)}}function W(N,q){for(var V in q)N[V]=(N[V]||0)-(q[V]||0)}function J(N){return"boolean"==typeof N||"number"==typeof N||null===N?!N:(0,n._)(rY||(rY=Ee(["!",""])),I(N))}t.CodeGen=G,t.not=J;var H=E(t.operators.AND);t.and=function(){for(var N=arguments.length,q=new Array(N),V=0;V1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var m in f)if(p[m])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,m=f.mergeToName,g=f.mergeValues,v=f.resultToName;return function(y,b,C,k){var D=void 0===C?b:C instanceof n.Name?(b instanceof n.Name?p(y,b,C):m(y,b,C),C):b instanceof n.Name?(m(y,C,b),b):g(b,C);return k!==n.Name||D instanceof n.Name?D:v(y,D)}}function l(f,p){if(!0===p)return f.var("props",!0);var m=f.var("props",(0,n._)(_Y||(_Y=Ee(["{}"]))));return void 0!==p&&c(f,m,p),m}function c(f,p,m){Object.keys(m).forEach(function(g){return f.assign((0,n._)(bY||(bY=Ee(["","",""])),p,(0,n.getProperty)(g)),!0)})}t.toHash=function(f){var p,m={},g=Re(f);try{for(g.s();!(p=g.n()).done;)m[p.value]=!0}catch(v){g.e(v)}finally{g.f()}return m},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var m in f)if("$ref"!==m&&p.all[m])return!0;return!1},t.schemaRefOrVal=function(f,p,m,g){var v=f.topSchemaRef,y=f.schemaPath;if(!g){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(aY||(aY=Ee(["",""])),p)}return(0,n._)(lY||(lY=Ee(["","","",""])),v,y,(0,n.getProperty)(m))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var m,g=Re(f);try{for(g.s();!(m=g.n()).done;)p(m.value)}catch(v){g.e(v)}finally{g.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,m){return f.if((0,n._)(cY||(cY=Ee([""," !== true && "," !== undefined"])),m,p),function(){f.if((0,n._)(uY||(uY=Ee([""," === true"])),p),function(){return f.assign(m,!0)},function(){return f.assign(m,(0,n._)(dY||(dY=Ee([""," || {}"])),m)).code((0,n._)(hY||(hY=Ee(["Object.assign(",", ",")"])),m,p))})})},mergeToName:function(f,p,m){return f.if((0,n._)(fY||(fY=Ee([""," !== true"])),m),function(){!0===p?f.assign(m,!0):(f.assign(m,(0,n._)(pY||(pY=Ee([""," || {}"])),m)),c(f,m,p))})},mergeValues:function(f,p){return!0===f||Qe(Qe({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,m){return f.if((0,n._)(mY||(mY=Ee([""," !== true && "," !== undefined"])),m,p),function(){return f.assign(m,(0,n._)(gY||(gY=Ee([""," === true ? true : "," > "," ? "," : ",""])),p,m,p,m,p))})},mergeToName:function(f,p,m){return f.if((0,n._)(vY||(vY=Ee([""," !== true"])),m),function(){return f.assign(m,!0===p||(0,n._)(yY||(yY=Ee([""," > "," ? "," : ",""])),m,p,m,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(m){if(p="strict mode: ".concat(p),!0===m)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,m){if(f instanceof n.Name){var g=p===u.Num;return(0,n._)(m?g?xY||(xY=Ee(['"[" + ',' + "]"'])):wY||(wY=Ee(['"[\'" + ',' + "\']"'])):g?CY||(CY=Ee(['"/" + ',""])):SY||(SY=Ee(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return m?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Lr);var pge,mge,gge,tT={};function Lp(){if(pge)return tT;pge=1,Object.defineProperty(tT,"__esModule",{value:!0});var t=xr(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return tT.default=n,tT}function nT(){return mge||(mge=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=xr(),e=Lr,i=Lp();function r(d,h){var f=d.const("err",h);d.if((0,n._)(LY||(LY=Ee([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)($Y||($Y=Ee(["[","]"])),f))},(0,n._)(BY||(BY=Ee(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(VY||(VY=Ee(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(HY||(HY=Ee(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(UY||(UY=Ee(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(kY||(kY=Ee(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(DY||(DY=Ee(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(TY||(TY=Ee(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,m=d.it,g=m.gen,v=m.compositeRule,y=m.allErrors,b=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(g,b):o(m,(0,n._)(EY||(EY=Ee(["[","]"])),b))},t.reportExtraError=function(d){var p=d.it,g=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),g||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(AY||(AY=Ee([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(MY||(MY=Ee(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,m=d.data,g=d.errsCount,v=d.it;if(void 0===g)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",g,i.default.errors,function(b){h.const(y,(0,n._)(OY||(OY=Ee(["","[","]"])),i.default.vErrors,b)),h.if((0,n._)(IY||(IY=Ee(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(NY||(NY=Ee(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(FY||(FY=Ee(["",".schemaPath"])),y),(0,n.str)(PY||(PY=Ee(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(jY||(jY=Ee(["",".schema"])),y),p),h.assign((0,n._)(RY||(RY=Ee(["",".data"])),y),m))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(zY||(zY=Ee(["{}"]))):function(p,m){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,g),c(p,g)];return function u(d,h,f){var p=h.params,m=h.message,v=d.data,y=d.schemaValue,b=d.it,C=b.opts,k=b.propertyName,D=b.topSchemaRef,L=b.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(YY||(YY=Ee(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof m?m(d):m]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(XY||(XY=Ee(["","",""])),D,L)],[i.default.data,v]),k&&f.push([s.propertyName,k])}(p,m,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,m=p?(0,n.str)(GY||(GY=Ee(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,m)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,m=h.schemaPath,g=h.parentSchema?p:(0,n.str)(WY||(WY=Ee(["","/",""])),p,f);return m&&(g=(0,n.str)(qY||(qY=Ee(["","",""])),g,(0,e.getErrorPath)(m,e.Type.Str))),[s.schemaPath,g]}}(age)),age}var ex={},_g={};Object.defineProperty(_g,"__esModule",{value:!0}),_g.getRules=_g.isJSONType=void 0;var hst=new Set(["string","number","integer","boolean","null","object","array"]);_g.isJSONType=function(t){return"string"==typeof t&&hst.has(t)},_g.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Qe(Qe({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var vge,bf={};function yge(){if(vge)return bf;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return vge=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.shouldUseRule=bf.shouldUseGroup=bf.schemaHasRulesForType=void 0,bf.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},bf.shouldUseGroup=t,bf.shouldUseRule=n,bf}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=_g,i=yge(),r=nT(),o=xr(),s=Lr;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var D,m=f.gen,g=f.data,v=f.opts,y=(D=v.coerceTypes)?p.filter(function(L){return l.has(L)||"array"===D&&"array"===L}):[],b=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(b){var C=u(p,g,v.strictNumbers,n.Wrong);m.if(C,function(){y.length?function(k,D,L){var z=k.gen,R=k.data,U=k.opts,G=z.let("dataType",(0,o._)(KY||(KY=Ee(["typeof ",""])),R)),X=z.let("coerced",(0,o._)(QY||(QY=Ee(["undefined"]))));"array"===U.coerceTypes&&z.if((0,o._)(ZY||(ZY=Ee([""," == 'object' && Array.isArray(",") && ",".length == 1"])),G,R,R),function(){return z.assign(R,(0,o._)(eX||(eX=Ee(["","[0]"])),R)).assign(G,(0,o._)(tX||(tX=Ee(["typeof ",""])),R)).if(u(D,R,U.strictNumbers),function(){return z.assign(X,R)})}),z.if((0,o._)(nX||(nX=Ee([""," !== undefined"])),X));var te,P=Re(L);try{for(P.s();!(te=P.n()).done;){var W=te.value;(l.has(W)||"array"===W&&"array"===U.coerceTypes)&&J(W)}}catch(H){P.e(H)}finally{P.f()}function J(H){switch(H){case"string":return void z.elseIf((0,o._)(rX||(rX=Ee(["",' == "number" || ',' == "boolean"'])),G,G)).assign(X,(0,o._)(oX||(oX=Ee(['"" + ',""])),R)).elseIf((0,o._)(sX||(sX=Ee([""," === null"])),R)).assign(X,(0,o._)(aX||(aX=Ee(['""']))));case"number":return void z.elseIf((0,o._)(lX||(lX=Ee(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),G,R,G,R,R,R)).assign(X,(0,o._)(cX||(cX=Ee(["+",""])),R));case"integer":return void z.elseIf((0,o._)(uX||(uX=Ee(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),G,R,G,R,R,R,R)).assign(X,(0,o._)(dX||(dX=Ee(["+",""])),R));case"boolean":return void z.elseIf((0,o._)(hX||(hX=Ee(["",' === "false" || '," === 0 || "," === null"])),R,R,R)).assign(X,!1).elseIf((0,o._)(fX||(fX=Ee(["",' === "true" || '," === 1"])),R,R)).assign(X,!0);case"null":return z.elseIf((0,o._)(pX||(pX=Ee(["",' === "" || '," === 0 || "," === false"])),R,R,R)),void z.assign(X,null);case"array":z.elseIf((0,o._)(mX||(mX=Ee(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),G,G,G,R)).assign(X,(0,o._)(gX||(gX=Ee(["[","]"])),R))}}z.else(),h(k),z.endIf(),z.if((0,o._)(iX||(iX=Ee([""," !== undefined"])),X),function(){var H,le,E,I,N;z.assign(R,X),le=X,I=(H=k).parentData,N=H.parentDataProperty,(E=H.gen).if((0,o._)(vX||(vX=Ee([""," !== undefined"])),I),function(){return E.assign((0,o._)(yX||(yX=Ee(["","[","]"])),I,N),le)})})}(f,p,y):h(f)})}return b};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,m){var g,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(_X||(_X=Ee([""," "," null"])),p,y);case"array":g=(0,o._)(bX||(bX=Ee(["Array.isArray(",")"])),p);break;case"object":g=(0,o._)(xX||(xX=Ee([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":g=b((0,o._)(wX||(wX=Ee(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":g=b();break;default:return(0,o._)(CX||(CX=Ee(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?g:(0,o.not)(g);function b(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)(SX||(SX=Ee(["typeof ",' == "number"'])),p),C,m?(0,o._)(kX||(kX=Ee(["isFinite(",")"])),p):o.nil)}}function u(f,p,m,g){if(1===f.length)return c(f[0],p,m,g);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var b=(0,o._)(DX||(DX=Ee(["typeof ",' != "object"'])),p);v=y.null?b:(0,o._)(TX||(TX=Ee(["!"," || ",""])),p,b),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,m,g));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,m=f.schemaValue;return"string"==typeof p?(0,o._)(EX||(EX=Ee(["{type: ","}"])),p):(0,o._)(AX||(AX=Ee(["{type: ","}"])),m)}};function h(f){var m,g,v,y,b,p=(g=(m=f).gen,v=m.data,b=(0,s.schemaRefOrVal)(m,y=m.schema,"type"),{gen:g,keyword:"type",data:v,schema:y.type,schemaCode:b,schemaValue:b,parentSchema:y,params:{},it:m});(0,r.reportError)(p,d)}t.reportTypeError=h}(ex);var _ge,bge,xge,tx={},ud={},lo={};function dd(){if(bge)return lo;bge=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.validateUnion=lo.validateArray=lo.usePattern=lo.callValidateCode=lo.schemaProperties=lo.allSchemaProperties=lo.noPropertyInData=lo.propertyInData=lo.isOwnProperty=lo.hasPropFunc=lo.reportMissingProp=lo.checkMissingProp=lo.checkReportMissingProp=void 0;var t=xr(),n=Lr,e=Lp(),i=Lr;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(jX||(jX=Ee(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(RX||(RX=Ee(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(BX||(BX=Ee(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}lo.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(FX||(FX=Ee(["",""])),u)},!0),c.error()})},lo.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,ri(u.map(function(m){return(0,t.and)(s(h,f,m,p.ownProperties),(0,t._)(PX||(PX=Ee([""," = ",""])),d,m))})))},lo.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},lo.hasPropFunc=r,lo.isOwnProperty=o,lo.propertyInData=function(c,u,d,h){var f=(0,t._)(LX||(LX=Ee(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)($X||($X=Ee([""," && ",""])),f,o(c,u,d)):f},lo.noPropertyInData=s,lo.allSchemaProperties=a,lo.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},lo.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,m=c.it,g=m.gen,v=m.topSchemaRef,y=m.schemaPath,b=m.errorPath,C=c.it,k=h?(0,t._)(VX||(VX=Ee(["",", ",", ","",""])),f,p,v,y):p,D=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,b)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&D.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var L=(0,t._)(HX||(HX=Ee(["",", ",""])),k,g.object.apply(g,D));return d!==t.nil?(0,t._)(UX||(UX=Ee(["",".call(",", ",")"])),u,d,L):(0,t._)(zX||(zX=Ee(["","(",")"])),u,L)};var l=(0,t._)(GX||(GX=Ee(["new RegExp"])));return lo.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,m=p(u,f);return d.scopeValue("pattern",{key:m.toString(),ref:m,code:(0,t._)(WX||(WX=Ee(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},lo.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var m=u.let("valid",!0);return g(function(){return u.assign(m,!1)}),m}return u.var(p,!0),g(function(){return u.break()}),p;function g(v){var y=u.const("len",(0,t._)(qX||(qX=Ee(["",".length"])),d));u.forRange("i",0,y,function(b){c.subschema({keyword:h,dataProp:b,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},lo.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(g){return(0,n.alwaysValidSchema)(f,g)})||f.opts.unevaluated){var p=u.let("valid",!1),m=u.name("_valid");u.block(function(){return d.forEach(function(g,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},m);u.assign(p,(0,t._)(YX||(YX=Ee([""," || ",""])),p,m)),c.mergeValidEvaluated(y,m)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},lo}var wge,xf={},za={},Cge=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==gn(n)&&"object"==gn(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},fR={},pst={get exports(){return fR},set exports(t){fR=t}},$p=pst.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),iT(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function iT(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==gn(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in $p.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!pR(t):!!n&&Sge(t)<=n)};var _st=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function pR(t){for(var n in t){if(_st.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(pR)||"object"==gn(e)&&pR(e))return!0}return!1}function Sge(t){var n=0;for(var e in t)if("$ref"===e||(n++,!yst.has(e)&&("object"==gn(t[e])&&(0,mst.eachItem)(t[e],function(i){return n+=Sge(i)}),n===1/0)))return 1/0;return n}function kge(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=u1(n));var i=t.parse(n);return Dge(t,i)}function Dge(t,n){return t.serialize(n).split("#")[0]+"#"}za.getFullPath=kge,za._getFullPath=Dge;var bst=/#\/?$/;function u1(t){return t?t.replace(bst,""):""}za.normalizeId=u1,za.resolveUrl=function(t,n,e){return e=u1(e),t.resolve(n,e)};var Tge,xst=/^[a-z_][-a-z0-9._]*$/i;function rT(){if(Tge)return _f;Tge=1,Object.defineProperty(_f,"__esModule",{value:!0}),_f.getData=_f.KeywordCxt=_f.validateFunctionCode=void 0;var t=function(){if(gge)return yg;gge=1,Object.defineProperty(yg,"__esModule",{value:!0}),yg.boolOrEmptySchema=yg.topBoolOrEmptySchema=void 0;var P=nT(),W=xr(),J=Lp(),H={message:"boolean schema is false"};function le(E,I){(0,P.reportError)({gen:E.gen,keyword:"false schema",data:E.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:E},H,void 0,I)}return yg.topBoolOrEmptySchema=function(E){var I=E.gen,N=E.schema,q=E.validateName;!1===N?le(E,!1):"object"==gn(N)&&!0===N.$async?I.return(J.default.data):(I.assign((0,W._)(JY||(JY=Ee(["",".errors"])),q),null),I.return(!0))},yg.boolOrEmptySchema=function(E,I){var N=E.gen;!1===E.schema?(N.var(I,!1),le(E)):N.var(I,!0)},yg}(),n=ex,e=yge(),i=ex,r=function(){if(_ge)return tx;_ge=1,Object.defineProperty(tx,"__esModule",{value:!0}),tx.assignDefaults=void 0;var P=xr(),W=Lr;function J(H,le,E){var I=H.gen,N=H.compositeRule,q=H.data,V=H.opts;if(void 0!==E){var re=(0,P._)(MX||(MX=Ee(["","",""])),q,(0,P.getProperty)(le));if(N)(0,W.checkStrictMode)(H,"default is ignored for: ".concat(re));else{var he=(0,P._)(OX||(OX=Ee([""," === undefined"])),re);"empty"===V.useDefaults&&(he=(0,P._)(IX||(IX=Ee([""," || "," === null || ",' === ""'])),he,re,re)),I.if(he,(0,P._)(NX||(NX=Ee([""," = ",""])),re,(0,P.stringify)(E)))}}}return tx.assignDefaults=function(H,le){var E=H.schema,I=E.properties,N=E.items;if("object"===le&&I)for(var q in I)J(H,q,I[q].default);else"array"===le&&Array.isArray(N)&&N.forEach(function(V,re){return J(H,re,V.default)})},tx}(),o=function fst(){if(xge)return ud;xge=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.validateKeywordUsage=ud.validSchemaType=ud.funcKeywordCode=ud.macroKeywordCode=void 0;var t=xr(),n=Lp(),e=dd(),i=nT();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(tJ||(tJ=Ee(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return ud.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var m=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},m),s.pass(m,function(){return s.error(!0)})},ud.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,k){if(k.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var m=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,g=o(c,u,m),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(ZX||(ZX=Ee(["await "]))):t.nil,k=p.opts.passContext?n.default.this:n.default.self,D=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(eJ||(eJ=Ee(["","",""])),C,(0,e.callValidateCode)(s,g,k,D)),a.modifying)}function b(C){var k;c.if((0,t.not)(null!==(k=a.valid)&&void 0!==k?k:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),b(function(){return s.error()});else{var C=a.async?(D=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(XX||(XX=Ee(["await "]))))},function(L){return c.assign(v,!1).if((0,t._)(JX||(JX=Ee([""," instanceof ",""])),L,p.ValidationError),function(){return c.assign(D,(0,t._)(KX||(KX=Ee(["",".errors"])),L))},function(){return c.throw(L)})}),D):(k=(0,t._)(QX||(QX=Ee(["",".errors"])),g),c.assign(k,null),y(t.nil),k);a.modifying&&r(s),b(function(){return function(D,L){var z=D.gen;z.if((0,t._)(nJ||(nJ=Ee(["Array.isArray(",")"])),L),function(){z.assign(n.default.vErrors,(0,t._)(iJ||(iJ=Ee([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,L,n.default.vErrors,L)).assign(n.default.errors,(0,t._)(rJ||(rJ=Ee(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(D)},function(){return D.error()})}(s,C)})}var D,k}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},ud.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==gn(s)&&!Array.isArray(s):gn(s)==c||l&&void 0===s})},ud.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(m){return!Object.prototype.hasOwnProperty.call(c,m)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},ud}(),s=function(){if(wge)return xf;wge=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.extendSubschemaMode=xf.extendSubschemaData=xf.getSubschema=void 0;var P=xr(),W=Lr;return xf.getSubschema=function(J,H){var le=H.keyword,E=H.schemaProp,I=H.schema,N=H.schemaPath,q=H.errSchemaPath,V=H.topSchemaRef;if(void 0!==le&&void 0!==I)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==le){var re=J.schema[le];return void 0===E?{schema:re,schemaPath:(0,P._)(oJ||(oJ=Ee(["","",""])),J.schemaPath,(0,P.getProperty)(le)),errSchemaPath:"".concat(J.errSchemaPath,"/").concat(le)}:{schema:re[E],schemaPath:(0,P._)(sJ||(sJ=Ee(["","","",""])),J.schemaPath,(0,P.getProperty)(le),(0,P.getProperty)(E)),errSchemaPath:"".concat(J.errSchemaPath,"/").concat(le,"/").concat((0,W.escapeFragment)(E))}}if(void 0!==I){if(void 0===N||void 0===q||void 0===V)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:I,schemaPath:N,topSchemaRef:V,errSchemaPath:q}}throw new Error('either "keyword" or "schema" must be passed')},xf.extendSubschemaData=function(J,H,le){var E=le.dataProp,I=le.dataPropType,N=le.data,q=le.dataTypes,V=le.propertyName;if(void 0!==N&&void 0!==E)throw new Error('both "data" and "dataProp" passed, only one allowed');var re=H.gen;if(void 0!==E){var he=H.errorPath,Oe=H.dataPathArr,_e=H.opts;Xe(re.let("data",(0,P._)(aJ||(aJ=Ee(["","",""])),H.data,(0,P.getProperty)(E)),!0)),J.errorPath=(0,P.str)(lJ||(lJ=Ee(["","",""])),he,(0,W.getErrorPath)(E,I,_e.jsPropertySyntax)),J.parentDataProperty=(0,P._)(cJ||(cJ=Ee(["",""])),E),J.dataPathArr=[].concat(ri(Oe),[J.parentDataProperty])}function Xe(Le){J.data=Le,J.dataLevel=H.dataLevel+1,J.dataTypes=[],H.definedProperties=new Set,J.parentData=H.data,J.dataNames=[].concat(ri(H.dataNames),[Le])}void 0!==N&&(Xe(N instanceof P.Name?N:re.let("data",N,!0)),void 0!==V&&(J.propertyName=V)),q&&(J.dataTypes=q)},xf.extendSubschemaMode=function(J,H){var le=H.jtdDiscriminator,E=H.jtdMetadata,I=H.compositeRule,N=H.createErrors,q=H.allErrors;void 0!==I&&(J.compositeRule=I),void 0!==N&&(J.createErrors=N),void 0!==q&&(J.allErrors=q),J.jtdDiscriminator=le,J.jtdMetadata=E},xf}(),a=xr(),l=Lp(),c=za,u=Lr,d=nT();function h(P,W){var N,J=P.gen,H=P.validateName,le=P.schema,E=P.schemaEnv,I=P.opts;I.code.es5?J.func(H,(0,a._)(uJ||(uJ=Ee(["",", ",""])),l.default.data,l.default.valCxt),E.$async,function(){var N,q;J.code((0,a._)(dJ||(dJ=Ee(['"use strict"; ',""])),f(le,I))),q=I,(N=J).if(l.default.valCxt,function(){N.var(l.default.instancePath,(0,a._)(mJ||(mJ=Ee(["",".",""])),l.default.valCxt,l.default.instancePath)),N.var(l.default.parentData,(0,a._)(gJ||(gJ=Ee(["",".",""])),l.default.valCxt,l.default.parentData)),N.var(l.default.parentDataProperty,(0,a._)(vJ||(vJ=Ee(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),N.var(l.default.rootData,(0,a._)(yJ||(yJ=Ee(["",".",""])),l.default.valCxt,l.default.rootData)),q.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(_J||(_J=Ee(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){N.var(l.default.instancePath,(0,a._)(bJ||(bJ=Ee(['""'])))),N.var(l.default.parentData,(0,a._)(xJ||(xJ=Ee(["undefined"])))),N.var(l.default.parentDataProperty,(0,a._)(wJ||(wJ=Ee(["undefined"])))),N.var(l.default.rootData,l.default.data),q.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(CJ||(CJ=Ee(["{}"]))))}),J.code(W)}):J.func(H,(0,a._)(hJ||(hJ=Ee(["",", ",""])),l.default.data,(N=I,(0,a._)(fJ||(fJ=Ee(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,N.dynamicRef?(0,a._)(pJ||(pJ=Ee([", ","={}"])),l.default.dynamicAnchors):a.nil))),E.$async,function(){return J.code(f(le,I)).code(W)})}function f(P,W){var J="object"==gn(P)&&P[W.schemaId];return J&&(W.code.source||W.code.process)?(0,a._)(OJ||(OJ=Ee(["/*# sourceURL="," */"])),J):a.nil}function m(P){var W=P.schema,J=P.self;if("boolean"==typeof W)return!W;for(var H in W)if(J.RULES.all[H])return!0;return!1}function g(P){return"boolean"!=typeof P.schema}function v(P){var W,J,H,E;(0,u.checkUnknownRules)(P),H=(W=P).errSchemaPath,E=W.self,(J=W.schema).$ref&&W.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(J,E.RULES)&&E.logger.warn('$ref: keywords ignored in schema at path "'.concat(H,'"'))}function y(P,W){if(P.opts.jtd)return C(P,[],!1,W);var J=(0,n.getSchemaTypes)(P.schema);C(P,J,!(0,n.coerceAndCheckDataType)(P,J),W)}function b(P){var W=P.gen,J=P.schemaEnv,le=P.errSchemaPath,E=P.opts,I=P.schema.$comment;if(!0===E.$comment)W.code((0,a._)(NJ||(NJ=Ee(["",".logger.log(",")"])),l.default.self,I));else if("function"==typeof E.$comment){var N=(0,a.str)(FJ||(FJ=Ee(["","/$comment"])),le),q=W.scopeValue("root",{ref:J.root});W.code((0,a._)(PJ||(PJ=Ee(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,I,N,q))}}function C(P,W,J,H){var he,Oe,_e,Xe,le=P.gen,E=P.schema,I=P.data,N=P.allErrors,q=P.opts,V=P.self.RULES;function re(he){(0,e.shouldUseGroup)(E,he)&&(he.type?(le.if((0,i.checkDataType)(he.type,I,q.strictNumbers)),k(P,he),1===W.length&&W[0]===he.type&&J&&(le.else(),(0,i.reportTypeError)(P)),le.endIf()):k(P,he),N||le.if((0,a._)(HJ||(HJ=Ee([""," === ",""])),l.default.errors,H||0)))}!E.$ref||!q.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(E,V)?(q.jtd||(Oe=W,(he=P).schemaEnv.meta||!he.opts.strictTypes||(function(_e,Xe){if(Xe.length){if(!_e.dataTypes.length)return void(_e.dataTypes=Xe);Xe.forEach(function(Le){L(_e.dataTypes,Le)||z(_e,'type "'.concat(Le,'" not allowed by context "').concat(_e.dataTypes.join(","),'"'))}),function(Le,rt){var B,ne=[],ie=Re(Le.dataTypes);try{for(ie.s();!(B=ie.n()).done;){var Me=B.value;L(rt,Me)?ne.push(Me):rt.includes("integer")&&"number"===Me&&ne.push("integer")}}catch(Ye){ie.e(Ye)}finally{ie.f()}Le.dataTypes=ne}(_e,Xe)}}(he,Oe),he.opts.allowUnionTypes||(_e=he,(Xe=Oe).length>1&&(2!==Xe.length||!Xe.includes("null"))&&z(_e,"use allowUnionTypes to allow union type keyword")),function(_e,Xe){var Le=_e.self.RULES.all;for(var rt in Le){var B=Le[rt];if("object"==gn(B)&&(0,e.shouldUseRule)(_e.schema,B)){var ne=B.definition.type;ne.length&&!ne.some(function(ie){return D(Xe,ie)})&&z(_e,'missing type "'.concat(ne.join(","),'" for keyword "').concat(rt,'"'))}}}(he,he.dataTypes))),le.block(function(){var he,Oe=Re(V.rules);try{for(Oe.s();!(he=Oe.n()).done;)re(he.value)}catch(_e){Oe.e(_e)}finally{Oe.f()}re(V.post)})):le.block(function(){return U(P,"$ref",V.all.$ref.definition)})}function k(P,W){var J=P.gen,H=P.schema;P.opts.useDefaults&&(0,r.assignDefaults)(P,W.type),J.block(function(){var le,E=Re(W.rules);try{for(E.s();!(le=E.n()).done;){var I=le.value;(0,e.shouldUseRule)(H,I)&&U(P,I.keyword,I.definition,W.type)}}catch(N){E.e(N)}finally{E.f()}})}function D(P,W){return P.includes(W)||"number"===W&&P.includes("integer")}function L(P,W){return P.includes(W)||"integer"===W&&P.includes("number")}function z(P,W){W+=' at "'.concat(P.schemaEnv.baseId+P.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(P,W,P.opts.strictTypes)}_f.validateFunctionCode=function(P){var W,J,H,le;g(P)&&(v(P),m(P))?(J=(W=P).schema,H=W.opts,le=W.gen,h(W,function(){var E,N;H.$comment&&J.$comment&&b(W),N=(E=W).opts,void 0!==E.schema.default&&N.useDefaults&&N.strictSchema&&(0,u.checkStrictMode)(E,"default is ignored in the schema root"),le.let(l.default.vErrors,null),le.let(l.default.errors,0),H.unevaluated&&function(E){var I=E.gen,N=E.validateName;E.evaluated=I.const("evaluated",(0,a._)(SJ||(SJ=Ee(["",".evaluated"])),N)),I.if((0,a._)(kJ||(kJ=Ee(["",".dynamicProps"])),E.evaluated),function(){return I.assign((0,a._)(DJ||(DJ=Ee(["",".props"])),E.evaluated),(0,a._)(TJ||(TJ=Ee(["undefined"]))))}),I.if((0,a._)(EJ||(EJ=Ee(["",".dynamicItems"])),E.evaluated),function(){return I.assign((0,a._)(AJ||(AJ=Ee(["",".items"])),E.evaluated),(0,a._)(MJ||(MJ=Ee(["undefined"]))))})}(W),y(W),function(E){var he,Oe,_e,Xe,Le,I=E.gen,q=E.validateName,V=E.ValidationError,re=E.opts;E.schemaEnv.$async?I.if((0,a._)(jJ||(jJ=Ee([""," === 0"])),l.default.errors),function(){return I.return(l.default.data)},function(){return I.throw((0,a._)(RJ||(RJ=Ee(["new ","(",")"])),V,l.default.vErrors))}):(I.assign((0,a._)(LJ||(LJ=Ee(["",".errors"])),q),l.default.vErrors),re.unevaluated&&(Oe=(he=E).gen,_e=he.evaluated,Le=he.items,(Xe=he.props)instanceof a.Name&&Oe.assign((0,a._)(BJ||(BJ=Ee(["",".props"])),_e),Xe),Le instanceof a.Name&&Oe.assign((0,a._)(VJ||(VJ=Ee(["",".items"])),_e),Le)),I.return((0,a._)($J||($J=Ee([""," === 0"])),l.default.errors)))}(W)})):h(P,function(){return(0,t.topBoolOrEmptySchema)(P)})};var R=function(){function P(W,J,H){if(Ce(this,P),(0,o.validateKeywordUsage)(W,J,H),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=H,this.data=W.data,this.schema=W.schema[H],this.$data=J.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(W,this.schema,H,this.$data),this.schemaType=J.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=J,this.$data)this.schemaCode=W.gen.const("vSchema",te(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,J.schemaType,J.allowUndefined))throw new Error("".concat(H," value must be ").concat(JSON.stringify(J.schemaType)));("code"in J?J.trackErrors:!1!==J.errors)&&(this.errsCount=W.gen.const("_errs",l.default.errors))}return Se(P,[{key:"result",value:function(W,J,H){this.failResult((0,a.not)(W),J,H)}},{key:"failResult",value:function(W,J,H){this.gen.if(W),H?H():this.error(),J?(this.gen.else(),J(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(W,J){this.failResult((0,a.not)(W),void 0,J)}},{key:"fail",value:function(W){if(void 0===W)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(W){if(!this.$data)return this.fail(W);var J=this.schemaCode;this.fail((0,a._)(UJ||(UJ=Ee([""," !== undefined && (",")"])),J,(0,a.or)(this.invalid$data(),W)))}},{key:"error",value:function(W,J,H){if(J)return this.setParams(J),this._error(W,H),void this.setParams({});this._error(W,H)}},{key:"_error",value:function(W,J){(W?d.reportExtraError:d.reportError)(this,this.def.error,J)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(W){this.allErrors||this.gen.if(W)}},{key:"setParams",value:function(W,J){J?Object.assign(this.params,W):this.params=W}},{key:"block$data",value:function(W,J){var H=this,le=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){H.check$data(W,le),J()})}},{key:"check$data",value:function(){var W=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,J=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var H=this.gen,le=this.schemaCode,E=this.schemaType,I=this.def;H.if((0,a.or)((0,a._)(zJ||(zJ=Ee([""," === undefined"])),le),J)),W!==a.nil&&H.assign(W,!0),(E.length||I.validateSchema)&&(H.elseIf(this.invalid$data()),this.$dataError(),W!==a.nil&&H.assign(W,!1)),H.else()}}},{key:"invalid$data",value:function(){var W=this.gen,J=this.schemaCode,H=this.schemaType,le=this.def,E=this.it;return(0,a.or)(function(){if(H.length){if(!(J instanceof a.Name))throw new Error("ajv implementation error");var I=Array.isArray(H)?H:[H];return(0,a._)(GJ||(GJ=Ee(["",""])),(0,i.checkDataTypes)(I,J,E.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(le.validateSchema){var I=W.scopeValue("validate$data",{ref:le.validateSchema});return(0,a._)(WJ||(WJ=Ee(["!","(",")"])),I,J)}return a.nil}())}},{key:"subschema",value:function(W,J){var H=(0,s.getSubschema)(this.it,W);(0,s.extendSubschemaData)(H,this.it,W),(0,s.extendSubschemaMode)(H,W);var le=Qe(Qe(Qe({},this.it),H),{},{items:void 0,props:void 0});return function p(P,W){g(P)&&(v(P),m(P))?function(J,H){var N,q,E=J.gen;J.opts.$comment&&J.schema.$comment&&b(J),(q=(N=J).schema[N.opts.schemaId])&&(N.baseId=(0,c.resolveUrl)(N.opts.uriResolver,N.baseId,q)),function(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}(J);var I=E.const("_errs",l.default.errors);y(J,I),E.var(H,(0,a._)(IJ||(IJ=Ee([""," === ",""])),I,l.default.errors))}(P,W):(0,t.boolOrEmptySchema)(P,W)}(le,J),le}},{key:"mergeEvaluated",value:function(W,J){var H=this.it,le=this.gen;H.opts.unevaluated&&(!0!==H.props&&void 0!==W.props&&(H.props=u.mergeEvaluated.props(le,W.props,H.props,J)),!0!==H.items&&void 0!==W.items&&(H.items=u.mergeEvaluated.items(le,W.items,H.items,J)))}},{key:"mergeValidEvaluated",value:function(W,J){var H=this,le=this.it;if(le.opts.unevaluated&&(!0!==le.props||!0!==le.items))return this.gen.if(J,function(){return H.mergeEvaluated(W,a.Name)}),!0}}]),P}();function U(P,W,J,H){var le=new R(P,J,W);"code"in J?J.code(le,H):le.$data&&J.validate?(0,o.funcKeywordCode)(le,J):"macro"in J?(0,o.macroKeywordCode)(le,J):(J.compile||J.validate)&&(0,o.funcKeywordCode)(le,J)}_f.KeywordCxt=R;var G=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function te(P,W){var J,H,le=W.dataLevel,E=W.dataNames,I=W.dataPathArr;if(""===P)return l.default.rootData;if("/"===P[0]){if(!G.test(P))throw new Error("Invalid JSON-pointer: ".concat(P));J=P,H=l.default.rootData}else{var N=X.exec(P);if(!N)throw new Error("Invalid JSON-pointer: ".concat(P));var q=+N[1];if("#"===(J=N[2])){if(q>=le)throw new Error(_e("property/index",q));return I[le-q]}if(q>le)throw new Error(_e("data",q));if(H=E[le-q],!J)return H}var V,re=H,he=Re(J.split("/"));try{for(he.s();!(V=he.n()).done;){var Oe=V.value;Oe&&(H=(0,a._)(qJ||(qJ=Ee(["","",""])),H,(0,a.getProperty)((0,u.unescapeJsonPointer)(Oe))),re=(0,a._)(YJ||(YJ=Ee([""," && ",""])),re,H))}}catch(Xe){he.e(Xe)}finally{he.f()}return re;function _e(Xe,Le){return"Cannot access ".concat(Xe," ").concat(Le," levels up, current level is ").concat(le)}}return _f.getData=te,_f}za.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=u1(t[r]||n),a={"":s},l=kge(o,s,!1),c={},u=new Set;return vst(t,{allKeys:!0},function(f,p,m,g){if(void 0!==g){var v=l+p,y=a[g];"string"==typeof f[r]&&(y=b.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function b(k){if(k=u1(y?(0,this.opts.uriResolver.resolve)(y,k):k),u.has(k))throw h(k);u.add(k);var L=this.refs[k];return"string"==typeof L&&(L=this.refs[L]),"object"==gn(L)?d(f,L.schema,k):k!==u1(v)&&("#"===k[0]?(d(f,c[k],k),c[k]=f):this.refs[k]=v),k}function C(k){if("string"==typeof k){if(!xst.test(k))throw new Error('invalid anchor "'.concat(k,'"'));b.call(this,"#".concat(k))}}}),c;function d(f,p,m){if(void 0!==p&&!gst(f,p))throw h(m)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var Ege,oT={};function mR(){if(Ege)return oT;Ege=1,Object.defineProperty(oT,"__esModule",{value:!0});var t=function(n){wt(i,O_(Error));var e=Ct(i);function i(r){var o;return Ce(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return Se(i)}();return oT.default=t,oT}var Age,sT={};function gR(){if(Age)return sT;Age=1,Object.defineProperty(sT,"__esModule",{value:!0});var t=za,n=function(e){wt(r,O_(Error));var i=Ct(r);function r(o,s,a,l){var c;return Ce(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return Se(r)}();return sT.default=n,sT}var Xl={};Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.resolveSchema=Xl.getCompilingSchema=Xl.resolveRef=Xl.compileSchema=Xl.SchemaEnv=void 0;var hd=xr(),wst=mR(),bg=Lp(),fd=za,Mge=Lr,Cst=rT(),aT=Se(function t(n){var e,i;Ce(this,t),this.refs={},this.dynamicAnchors={},"object"==gn(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,fd.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function vR(t){var n=Oge.call(this,t);if(n)return n;var e,i=(0,fd.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new hd.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:wst.default,code:(0,hd._)(XJ||(XJ=Ee(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:bg.default.data,parentData:bg.default.parentData,parentDataProperty:bg.default.parentDataProperty,dataNames:[bg.default.data],dataPathArr:[hd.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,hd.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:hd.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hd._)(JJ||(JJ=Ee(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,Cst.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(bg.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(bg.default.self),"".concat(bg.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,m=d.items;f.evaluated={props:p instanceof hd.Name?void 0:p,items:m instanceof hd.Name?void 0:m,dynamicProps:p instanceof hd.Name,dynamicItems:m instanceof hd.Name},f.source&&(f.source.evaluated=(0,hd.stringify)(f.evaluated))}return t.validate=f,t}catch(g){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),g}finally{this._compilations.delete(t)}}function Sst(t){return(0,fd.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:vR.call(this,t)}function Oge(t){var n,e,i,r=Re(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function kst(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||lT.call(this,t,n)}function lT(t,n){var e=this.opts.uriResolver.parse(n),i=(0,fd._getFullPath)(this.opts.uriResolver,e),r=(0,fd.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return yR.call(this,e,t);var o=(0,fd.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=lT.call(this,t,s);return"object"!==gn(a?.schema)?void 0:yR.call(this,e,a)}if("object"===gn(s?.schema)){if(s.validate||vR.call(this,s),o===(0,fd.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,fd.resolveUrl)(this.opts.uriResolver,r,u)),new aT({schema:l,schemaId:c,root:t,baseId:r})}return yR.call(this,e,s)}}Xl.SchemaEnv=aT,Xl.compileSchema=vR,Xl.resolveRef=function(t,n,e){var i;e=(0,fd.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=kst.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new aT({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=Sst.call(this,o):void 0},Xl.getCompilingSchema=Oge,Xl.resolveSchema=lT;var Dst=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yR(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=Re(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,Mge.unescapeFragment)(c)];if(void 0===u)return;var d="object"===gn(r=u)&&r[this.opts.schemaId];!Dst.has(c)&&d&&(i=(0,fd.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,Mge.schemaHasRulesButRef)(r,this.RULES)){var h=(0,fd.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=lT.call(this,o,h)}return(a=a||new aT({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var Tst={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},_R={},Ige={};(function(t){function n(){for(var xe=arguments.length,He=Array(xe),We=0;We1){He[0]=He[0].slice(0,-1);for(var lt=He.length-1,Ue=1;Ue= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=Math.floor,G=String.fromCharCode;function X(xe){throw new RangeError(z[xe])}function P(xe,He){var We=xe.split("@"),lt="";return We.length>1&&(lt=We[0]+"@",xe=We[1]),lt+function te(xe,He){for(var We=[],lt=xe.length;lt--;)We[lt]=He(xe[lt]);return We}((xe=xe.replace(L,".")).split("."),He).join(".")}function W(xe){for(var He=[],We=0,lt=xe.length;We=55296&&Ue<=56319&&We>1,xe+=U(xe/He);xe>455;lt+=f)xe=U(xe/35);return U(lt+36*xe/(xe+38))},I=function(xe){var He=[],We=xe.length,lt=0,Ue=128,kn=72,ni=xe.lastIndexOf("-");ni<0&&(ni=0);for(var ci=0;ci=128&&X("not-basic"),He.push(xe.charCodeAt(ci));for(var li=ni>0?ni+1:0;li=We&&X("invalid-input");var vr=H(xe.charCodeAt(li++));(vr>=f||vr>U((h-lt)/qr))&&X("overflow"),lt+=vr*qr;var Te=fi<=kn?1:fi>=kn+26?26:fi-kn;if(vrU(h/kt)&&X("overflow"),qr*=kt}var Vt=He.length+1;kn=E(lt-Sr,Vt,0==Sr),U(lt/Vt)>h-Ue&&X("overflow"),Ue+=U(lt/Vt),lt%=Vt,He.splice(lt++,0,Ue)}return String.fromCodePoint.apply(String,He)},N=function(xe){var He=[],We=(xe=W(xe)).length,lt=128,Ue=0,kn=72,ni=!0,ci=!1,li=void 0;try{for(var Sr,qr=xe[Symbol.iterator]();!(ni=(Sr=qr.next()).done);ni=!0){var fi=Sr.value;fi<128&&He.push(G(fi))}}catch(vd){ci=!0,li=vd}finally{try{!ni&&qr.return&&qr.return()}finally{if(ci)throw li}}var vr=He.length,Te=vr;for(vr&&He.push("-");Te=lt&&$nU((h-Ue)/ei)&&X("overflow"),Ue+=(kt-lt)*ei,lt=kt;var Xn=!0,yr=!1,Er=void 0;try{for(var Io,sa=xe[Symbol.iterator]();!(Xn=(Io=sa.next()).done);Xn=!0){var md=Io.value;if(mdh&&X("overflow"),md==lt){for(var pu=Ue,aa=f;;aa+=f){var El=aa<=kn?1:aa>=kn+26?26:aa-kn;if(pu>6|192).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase():"%"+(He>>12|224).toString(16).toUpperCase()+"%"+(He>>6&63|128).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase()}function _e(xe){for(var He="",We=0,lt=xe.length;We=194&&Ue<224){if(lt-We>=6){var kn=parseInt(xe.substr(We+4,2),16);He+=String.fromCharCode((31&Ue)<<6|63&kn)}else He+=xe.substr(We,6);We+=6}else if(Ue>=224){if(lt-We>=9){var ni=parseInt(xe.substr(We+4,2),16),ci=parseInt(xe.substr(We+7,2),16);He+=String.fromCharCode((15&Ue)<<12|(63&ni)<<6|63&ci)}else He+=xe.substr(We,9);We+=9}else He+=xe.substr(We,3),We+=3}return He}function Xe(xe,He){function We(lt){var Ue=_e(lt);return Ue.match(He.UNRESERVED)?Ue:lt}return xe.scheme&&(xe.scheme=String(xe.scheme).replace(He.PCT_ENCODED,We).toLowerCase().replace(He.NOT_SCHEME,"")),void 0!==xe.userinfo&&(xe.userinfo=String(xe.userinfo).replace(He.PCT_ENCODED,We).replace(He.NOT_USERINFO,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.host&&(xe.host=String(xe.host).replace(He.PCT_ENCODED,We).toLowerCase().replace(He.NOT_HOST,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.path&&(xe.path=String(xe.path).replace(He.PCT_ENCODED,We).replace(xe.scheme?He.NOT_PATH:He.NOT_PATH_NOSCHEME,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.query&&(xe.query=String(xe.query).replace(He.PCT_ENCODED,We).replace(He.NOT_QUERY,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.fragment&&(xe.fragment=String(xe.fragment).replace(He.PCT_ENCODED,We).replace(He.NOT_FRAGMENT,Oe).replace(He.PCT_ENCODED,r)),xe}function Le(xe){return xe.replace(/^0*(.*)/,"$1")||"0"}function rt(xe,He){var We=xe.match(He.IPV4ADDRESS)||[],lt=u(We,2)[1];return lt?lt.split(".").map(Le).join("."):xe}function B(xe,He){var We=xe.match(He.IPV6ADDRESS)||[],lt=u(We,3),Ue=lt[1],kn=lt[2];if(Ue){for(var ni=Ue.toLowerCase().split("::").reverse(),ci=u(ni,2),li=ci[0],Sr=ci[1],qr=Sr?Sr.split(":").map(Le):[],fi=li.split(":").map(Le),vr=He.IPV4ADDRESS.test(fi[fi.length-1]),Te=vr?7:8,kt=fi.length-Te,Vt=Array(Te),rn=0;rn1){var Ni=Vt.slice(0,un.index),$n=Vt.slice(un.index+un.length);ii=Ni.join(":")+"::"+$n.join(":")}else ii=Vt.join(":");return kn&&(ii+="%"+kn),ii}return xe}var ne=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie=void 0==="".match(/(){0}/)[1];function Me(xe){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},We={},lt=!1!==He.iri?c:l;"suffix"===He.reference&&(xe=(He.scheme?He.scheme+":":"")+"//"+xe);var Ue=xe.match(ne);if(Ue){ie?(We.scheme=Ue[1],We.userinfo=Ue[3],We.host=Ue[4],We.port=parseInt(Ue[5],10),We.path=Ue[6]||"",We.query=Ue[7],We.fragment=Ue[8],isNaN(We.port)&&(We.port=Ue[5])):(We.scheme=Ue[1]||void 0,We.userinfo=-1!==xe.indexOf("@")?Ue[3]:void 0,We.host=-1!==xe.indexOf("//")?Ue[4]:void 0,We.port=parseInt(Ue[5],10),We.path=Ue[6]||"",We.query=-1!==xe.indexOf("?")?Ue[7]:void 0,We.fragment=-1!==xe.indexOf("#")?Ue[8]:void 0,isNaN(We.port)&&(We.port=xe.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ue[4]:void 0)),We.host&&(We.host=B(rt(We.host,lt),lt)),We.reference=void 0!==We.scheme||void 0!==We.userinfo||void 0!==We.host||void 0!==We.port||We.path||void 0!==We.query?void 0===We.scheme?"relative":void 0===We.fragment?"absolute":"uri":"same-document",He.reference&&"suffix"!==He.reference&&He.reference!==We.reference&&(We.error=We.error||"URI is not a "+He.reference+" reference.");var kn=he[(He.scheme||We.scheme||"").toLowerCase()];if(He.unicodeSupport||kn&&kn.unicodeSupport)Xe(We,lt);else{if(We.host&&(He.domainHost||kn&&kn.domainHost))try{We.host=re.toASCII(We.host.replace(lt.PCT_ENCODED,_e).toLowerCase())}catch(ni){We.error=We.error||"Host's domain name can not be converted to ASCII via punycode: "+ni}Xe(We,l)}kn&&kn.parse&&kn.parse(We,He)}else We.error=We.error||"URI can not be parsed.";return We}var je=/^\.\.?\//,yt=/^\/\.(\/|$)/,Tt=/^\/\.\.(\/|$)/,fn=/^\/?(?:.|\n)*?(?=\/|$)/;function Hn(xe){for(var He=[];xe.length;)if(xe.match(je))xe=xe.replace(je,"");else if(xe.match(yt))xe=xe.replace(yt,"/");else if(xe.match(Tt))xe=xe.replace(Tt,"/"),He.pop();else if("."===xe||".."===xe)xe="";else{var We=xe.match(fn);if(!We)throw new Error("Unexpected dot segment condition");var lt=We[0];xe=xe.slice(lt.length),He.push(lt)}return He.join("")}function Zt(xe){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},We=He.iri?c:l,lt=[],Ue=he[(He.scheme||xe.scheme||"").toLowerCase()];if(Ue&&Ue.serialize&&Ue.serialize(xe,He),xe.host&&!We.IPV6ADDRESS.test(xe.host)&&(He.domainHost||Ue&&Ue.domainHost))try{xe.host=He.iri?re.toUnicode(xe.host):re.toASCII(xe.host.replace(We.PCT_ENCODED,_e).toLowerCase())}catch(ci){xe.error=xe.error||"Host's domain name can not be converted to "+(He.iri?"Unicode":"ASCII")+" via punycode: "+ci}Xe(xe,We),"suffix"!==He.reference&&xe.scheme&&(lt.push(xe.scheme),lt.push(":"));var kn=function Ye(xe,He){var We=!1!==He.iri?c:l,lt=[];return void 0!==xe.userinfo&&(lt.push(xe.userinfo),lt.push("@")),void 0!==xe.host&<.push(B(rt(String(xe.host),We),We).replace(We.IPV6ADDRESS,function(Ue,kn,ni){return"["+kn+(ni?"%25"+ni:"")+"]"})),"number"!=typeof xe.port&&"string"!=typeof xe.port||(lt.push(":"),lt.push(String(xe.port))),lt.length?lt.join(""):void 0}(xe,He);if(void 0!==kn&&("suffix"!==He.reference&<.push("//"),lt.push(kn),xe.path&&"/"!==xe.path.charAt(0)&<.push("/")),void 0!==xe.path){var ni=xe.path;He.absolutePath||Ue&&Ue.absolutePath||(ni=Hn(ni)),void 0===kn&&(ni=ni.replace(/^\/\//,"/%2F")),lt.push(ni)}return void 0!==xe.query&&(lt.push("?"),lt.push(xe.query)),void 0!==xe.fragment&&(lt.push("#"),lt.push(xe.fragment)),lt.join("")}function Ei(xe,He){var We=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},lt={};return arguments[3]||(xe=Me(Zt(xe,We),We),He=Me(Zt(He,We),We)),!(We=We||{}).tolerant&&He.scheme?(lt.scheme=He.scheme,lt.userinfo=He.userinfo,lt.host=He.host,lt.port=He.port,lt.path=Hn(He.path||""),lt.query=He.query):(void 0!==He.userinfo||void 0!==He.host||void 0!==He.port?(lt.userinfo=He.userinfo,lt.host=He.host,lt.port=He.port,lt.path=Hn(He.path||""),lt.query=He.query):(He.path?("/"===He.path.charAt(0)?lt.path=Hn(He.path):(lt.path=void 0===xe.userinfo&&void 0===xe.host&&void 0===xe.port||xe.path?xe.path?xe.path.slice(0,xe.path.lastIndexOf("/")+1)+He.path:He.path:"/"+He.path,lt.path=Hn(lt.path)),lt.query=He.query):(lt.path=xe.path,lt.query=void 0!==He.query?He.query:xe.query),lt.userinfo=xe.userinfo,lt.host=xe.host,lt.port=xe.port),lt.scheme=xe.scheme),lt.fragment=He.fragment,lt}function mr(xe,He){return xe&&xe.toString().replace(He&&He.iri?c.PCT_ENCODED:l.PCT_ENCODED,_e)}var gi={scheme:"http",domainHost:!0,parse:function(xe,He){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,He){var We="https"===String(xe.scheme).toLowerCase();return xe.port!==(We?443:80)&&""!==xe.port||(xe.port=void 0),xe.path||(xe.path="/"),xe}},Vr={scheme:"https",domainHost:gi.domainHost,parse:gi.parse,serialize:gi.serialize};function Oo(xe){return"boolean"==typeof xe.secure?xe.secure:"wss"===String(xe.scheme).toLowerCase()}var On={scheme:"ws",domainHost:!0,parse:function(xe,He){var We=xe;return We.secure=Oo(We),We.resourceName=(We.path||"/")+(We.query?"?"+We.query:""),We.path=void 0,We.query=void 0,We},serialize:function(xe,He){if(xe.port!==(Oo(xe)?443:80)&&""!==xe.port||(xe.port=void 0),"boolean"==typeof xe.secure&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var We=xe.resourceName.split("?"),lt=u(We,2),Ue=lt[0],kn=lt[1];xe.path=Ue&&"/"!==Ue?Ue:void 0,xe.query=kn,xe.resourceName=void 0}return xe.fragment=void 0,xe}},xt={scheme:"wss",domainHost:On.domainHost,parse:On.parse,serialize:On.serialize},ai={},Ii="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Cr="[0-9A-Fa-f]",vo=e(e("%[EFef]"+Cr+"%"+Cr+Cr+"%"+Cr+Cr)+"|"+e("%[89A-Fa-f]"+Cr+"%"+Cr+Cr)+"|"+e("%"+Cr+Cr)),pt=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),oi=new RegExp(Ii,"g"),vi=new RegExp(vo,"g"),Tr=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pt),"g"),Hr=new RegExp(n("[^]",Ii,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),no=Hr;function Us(xe){var He=_e(xe);return He.match(oi)?He:xe}var gr={scheme:"mailto",parse:function(xe,He){var We=xe,lt=We.to=We.path?We.path.split(","):[];if(We.path=void 0,We.query){for(var Ue=!1,kn={},ni=We.query.split("&"),ci=0,li=ni.length;ci string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=function(){function E(){var I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,E),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts=Qe(Qe({},I),function y(E){var I,N,q,V,re,he,Oe,_e,Xe,Le,rt,B,ne,ie,Me,Ye,je,yt,Tt,fn,Hn,Zt,Ei,ln,ur,wr=E.strict,or=null===(I=E.code)||void 0===I?void 0:I.optimize,mr=!0===or||void 0===or?1:or||0,gi=null!==(q=null===(N=E.code)||void 0===N?void 0:N.regExp)&&void 0!==q?q:f,Vr=null!==(V=E.uriResolver)&&void 0!==V?V:h.default;return{strictSchema:null===(he=null!==(re=E.strictSchema)&&void 0!==re?re:wr)||void 0===he||he,strictNumbers:null===(_e=null!==(Oe=E.strictNumbers)&&void 0!==Oe?Oe:wr)||void 0===_e||_e,strictTypes:null!==(Le=null!==(Xe=E.strictTypes)&&void 0!==Xe?Xe:wr)&&void 0!==Le?Le:"log",strictTuples:null!==(B=null!==(rt=E.strictTuples)&&void 0!==rt?rt:wr)&&void 0!==B?B:"log",strictRequired:null!==(ie=null!==(ne=E.strictRequired)&&void 0!==ne?ne:wr)&&void 0!==ie&&ie,code:E.code?Qe(Qe({},E.code),{},{optimize:mr,regExp:gi}):{optimize:mr,regExp:gi},loopRequired:null!==(Me=E.loopRequired)&&void 0!==Me?Me:200,loopEnum:null!==(Ye=E.loopEnum)&&void 0!==Ye?Ye:200,meta:null===(je=E.meta)||void 0===je||je,messages:null===(yt=E.messages)||void 0===yt||yt,inlineRefs:null===(Tt=E.inlineRefs)||void 0===Tt||Tt,schemaId:null!==(fn=E.schemaId)&&void 0!==fn?fn:"$id",addUsedSchema:null===(Hn=E.addUsedSchema)||void 0===Hn||Hn,validateSchema:null===(Zt=E.validateSchema)||void 0===Zt||Zt,validateFormats:null===(Ei=E.validateFormats)||void 0===Ei||Ei,unicodeRegExp:null===(ln=E.unicodeRegExp)||void 0===ln||ln,int32range:null===(ur=E.int32range)||void 0===ur||ur,uriResolver:Vr}}(I));var N=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:N.es5,lines:N.lines}),this.logger=function G(E){if(!1===E)return U;if(void 0===E)return console;if(E.log&&E.warn&&E.error)return E;throw new Error("logger must implement log, warn and error methods")}(I.logger);var re=I.validateFormats;I.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,g,I,"NOT SUPPORTED"),C.call(this,v,I,"DEPRECATED","warn"),this._metaOpts=R.call(this),I.formats&&L.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&z.call(this,I.keywords),"object"==gn(I.meta)&&this.addMetaSchema(I.meta),D.call(this),I.validateFormats=re}return Se(E,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var I=this.opts,N=I.$data,q=I.meta,V=I.schemaId,re=d;"id"===V&&((re=Qe({},d)).id=re.$id,delete re.$id),q&&N&&this.addMetaSchema(re,re[V],!1)}},{key:"defaultMeta",value:function(){var I=this.opts,N=I.meta,q=I.schemaId;return this.opts.defaultMeta="object"==gn(N)?N[q]||N:void 0}},{key:"validate",value:function(I,N){var q;if("string"==typeof I){if(!(q=this.getSchema(I)))throw new Error('no schema with key or ref "'.concat(I,'"'))}else q=this.compile(I);var V=q(N);return"$async"in q||(this.errors=q.errors),V}},{key:"compile",value:function(I,N){var q=this._addSchema(I,N);return q.validate||this._compileSchemaEnv(q)}},{key:"compileAsync",value:function(I,N){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var q=this.opts.loadSchema;return V.call(this,I,N);function V(Me,Ye){return re.apply(this,arguments)}function re(){return(re=Ki(pn().mark(function Me(Ye,je){var yt;return pn().wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Tt.next=2,he.call(this,Ye.$schema);case 2:return yt=this._addSchema(Ye,je),Tt.abrupt("return",yt.validate||_e.call(this,yt));case 4:case"end":return Tt.stop()}},Me,this)}))).apply(this,arguments)}function he(Me){return Oe.apply(this,arguments)}function Oe(){return(Oe=Ki(pn().mark(function Me(Ye){return pn().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(!Ye||this.getSchema(Ye)){je.next=3;break}return je.next=3,V.call(this,{$ref:Ye},!0);case 3:case"end":return je.stop()}},Me,this)}))).apply(this,arguments)}function _e(Me){return Xe.apply(this,arguments)}function Xe(){return(Xe=Ki(pn().mark(function Me(Ye){return pn().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.prev=0,je.abrupt("return",this._compileSchemaEnv(Ye));case 4:if(je.prev=4,je.t0=je.catch(0),je.t0 instanceof r.default){je.next=8;break}throw je.t0;case 8:return Le.call(this,je.t0),je.next=11,rt.call(this,je.t0.missingSchema);case 11:return je.abrupt("return",_e.call(this,Ye));case 12:case"end":return je.stop()}},Me,this,[[0,4]])}))).apply(this,arguments)}function Le(Me){var Ye=Me.missingSchema,je=Me.missingRef;if(this.refs[Ye])throw new Error("AnySchema ".concat(Ye," is loaded but ").concat(je," cannot be resolved"))}function rt(Me){return B.apply(this,arguments)}function B(){return(B=Ki(pn().mark(function Me(Ye){var je;return pn().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,ne.call(this,Ye);case 2:if(je=yt.sent,this.refs[Ye]){yt.next=6;break}return yt.next=6,he.call(this,je.$schema);case 6:this.refs[Ye]||this.addSchema(je,Ye,N);case 7:case"end":return yt.stop()}},Me,this)}))).apply(this,arguments)}function ne(Me){return ie.apply(this,arguments)}function ie(){return(ie=Ki(pn().mark(function Me(Ye){var je;return pn().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!(je=this._loading[Ye])){yt.next=3;break}return yt.abrupt("return",je);case 3:return yt.prev=3,yt.next=6,this._loading[Ye]=q(Ye);case 6:return yt.abrupt("return",yt.sent);case 7:return yt.prev=7,delete this._loading[Ye],yt.finish(7);case 10:case"end":return yt.stop()}},Me,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(I,N,q){var V,re=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(I)){var he,Oe=Re(I);try{for(Oe.s();!(he=Oe.n()).done;)this.addSchema(he.value,void 0,q,re)}catch(Le){Oe.e(Le)}finally{Oe.f()}return this}if("object"===gn(I)){var Xe=this.opts.schemaId;if(void 0!==(V=I[Xe])&&"string"!=typeof V)throw new Error("schema ".concat(Xe," must be string"))}return N=(0,l.normalizeId)(N||V),this._checkUnique(N),this.schemas[N]=this._addSchema(I,q,N,re,!0),this}},{key:"addMetaSchema",value:function(I,N){return this.addSchema(I,N,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(I,N){if("boolean"==typeof I)return!0;var q;if(void 0!==(q=I.$schema)&&"string"!=typeof q)throw new Error("$schema must be a string");if(!(q=q||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var V=this.validate(q,I);if(!V&&N){var re="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(re);this.logger.error(re)}return V}},{key:"getSchema",value:function(I){for(var N;"string"==typeof(N=k.call(this,I));)I=N;if(void 0===N){var V=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(N=s.resolveSchema.call(this,V,I)))return;this.refs[I]=N}return N.validate||this._compileSchemaEnv(N)}},{key:"removeSchema",value:function(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(gn(I)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var N=k.call(this,I);return"object"==gn(N)&&this._cache.delete(N.schema),delete this.schemas[I],delete this.refs[I],this;case"object":this._cache.delete(I);var V=I[this.opts.schemaId];return V&&(V=(0,l.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(I){var N,q=Re(I);try{for(q.s();!(N=q.n()).done;)this.addKeyword(N.value)}catch(re){q.e(re)}finally{q.f()}return this}},{key:"addKeyword",value:function(I,N){var q,V=this;if("string"==typeof I)q=I,"object"==gn(N)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),N.keyword=q);else{if("object"!=gn(I)||void 0!==N)throw new Error("invalid addKeywords parameters");if(q=(N=I).keyword,Array.isArray(q)&&!q.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(te.call(this,q,N),!N)return(0,u.eachItem)(q,function(he){return P.call(V,he)}),this;J.call(this,N);var re=Qe(Qe({},N),{},{type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)});return(0,u.eachItem)(q,0===re.type.length?function(he){return P.call(V,he,re)}:function(he){return re.type.forEach(function(Oe){return P.call(V,he,re,Oe)})}),this}},{key:"getKeyword",value:function(I){var N=this.RULES.all[I];return"object"==gn(N)?N.definition:!!N}},{key:"removeKeyword",value:function(I){var N=this.RULES;delete N.keywords[I],delete N.all[I];var q,V=Re(N.rules);try{for(V.s();!(q=V.n()).done;){var re=q.value,he=re.rules.findIndex(function(Oe){return Oe.keyword===I});he>=0&&re.rules.splice(he,1)}}catch(Oe){V.e(Oe)}finally{V.f()}return this}},{key:"addFormat",value:function(I,N){return"string"==typeof N&&(N=new RegExp(N)),this.formats[I]=N,this}},{key:"errorsText",value:function(){var I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},q=N.separator,V=void 0===q?", ":q,re=N.dataVar,he=void 0===re?"data":re;return I&&0!==I.length?I.map(function(Oe){return"".concat(he).concat(Oe.instancePath," ").concat(Oe.message)}).reduce(function(Oe,_e){return Oe+V+_e}):"No errors"}},{key:"$dataMetaSchema",value:function(I,N){var q=this.RULES.all;I=JSON.parse(JSON.stringify(I));var V,re=Re(N);try{for(re.s();!(V=re.n()).done;){var he,Oe=V.value.split("/").slice(1),_e=I,Xe=Re(Oe);try{for(Xe.s();!(he=Xe.n()).done;)_e=_e[he.value]}catch(ie){Xe.e(ie)}finally{Xe.f()}for(var Le in q){var rt=q[Le];if("object"==gn(rt)){var ne=_e[Le];rt.definition.$data&&ne&&(_e[Le]=le(ne))}}}}catch(ie){re.e(ie)}finally{re.f()}return I}},{key:"_removeAllSchemas",value:function(I,N){for(var q in I){var V=I[q];N&&!N.test(q)||("string"==typeof V?delete I[q]:V&&!V.meta&&(this._cache.delete(V.schema),delete I[q]))}}},{key:"_addSchema",value:function(I,N,q){var V,re=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,he=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,Oe=this.opts.schemaId;if("object"==gn(I))V=I[Oe];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof I)throw new Error("schema must be object or boolean")}var _e=this._cache.get(I);if(void 0!==_e)return _e;q=(0,l.normalizeId)(V||q);var Xe=l.getSchemaRefs.call(this,I,q);return _e=new s.SchemaEnv({schema:I,schemaId:Oe,meta:N,baseId:q,localRefs:Xe}),this._cache.set(_e.schema,_e),he&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=_e),re&&this.validateSchema(I,!0),_e}},{key:"_checkUnique",value:function(I){if(this.schemas[I]||this.refs[I])throw new Error('schema with key or id "'.concat(I,'" already exists'))}},{key:"_compileSchemaEnv",value:function(I){if(I.meta?this._compileMetaSchema(I):s.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}},{key:"_compileMetaSchema",value:function(I){var N=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,I)}finally{this.opts=N}}}]),E}();function C(E,I,N){var q=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var V in E){var re=V;re in I&&this.logger[q]("".concat(N,": option ").concat(V,". ").concat(E[re]))}}function k(E){return E=(0,l.normalizeId)(E),this.schemas[E]||this.refs[E]}function D(){var E=this.opts.schemas;if(E)if(Array.isArray(E))this.addSchema(E);else for(var I in E)this.addSchema(E[I],I)}function L(){for(var E in this.opts.formats){var I=this.opts.formats[E];I&&this.addFormat(E,I)}}function z(E){if(Array.isArray(E))this.addVocabulary(E);else for(var I in this.logger.warn("keywords option as map is deprecated, pass array"),E){var N=E[I];N.keyword||(N.keyword=I),this.addKeyword(N)}}function R(){var E,I=Qe({},this.opts),N=Re(p);try{for(N.s();!(E=N.n()).done;)delete I[E.value]}catch(q){N.e(q)}finally{N.f()}return I}t.default=b,b.ValidationError=i.default,b.MissingRefError=r.default;var U={log:function(){},warn:function(){},error:function(){}},X=/^[a-z_$][a-z0-9_$:-]*$/i;function te(E,I){var N=this.RULES;if((0,u.eachItem)(E,function(q){if(N.keywords[q])throw new Error("Keyword ".concat(q," is already defined"));if(!X.test(q))throw new Error("Keyword ".concat(q," has invalid name"))}),I&&I.$data&&!("code"in I)&&!("validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function P(E,I,N){var q,V=this,re=I?.post;if(N&&re)throw new Error('keyword with "post" flag cannot have "type"');var he=this.RULES,Oe=re?he.post:he.rules.find(function(Xe){return Xe.type===N});if(Oe||he.rules.push(Oe={type:N,rules:[]}),he.keywords[E]=!0,I){var _e={keyword:E,definition:Qe(Qe({},I),{},{type:(0,c.getJSONTypes)(I.type),schemaType:(0,c.getJSONTypes)(I.schemaType)})};I.before?W.call(this,Oe,_e,I.before):Oe.rules.push(_e),he.all[E]=_e,null===(q=I.implements)||void 0===q||q.forEach(function(Xe){return V.addKeyword(Xe)})}}function W(E,I,N){var q=E.rules.findIndex(function(V){return V.keyword===N});q>=0?E.rules.splice(q,0,I):(E.rules.push(I),this.logger.warn("rule ".concat(N," is not defined")))}function J(E){var I=E.metaSchema;void 0!==I&&(E.$data&&this.opts.$data&&(I=le(I)),E.validateSchema=this.compile(I,!0))}var H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function le(E){return{anyOf:[E,H]}}}(sge);var bR={},xR={},wR={};Object.defineProperty(wR,"__esModule",{value:!0}),wR.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var xg={};Object.defineProperty(xg,"__esModule",{value:!0}),xg.callRef=xg.getValidate=void 0;var Ast=gR(),Fge=dd(),Jl=xr(),d1=Lp(),Pge=Xl,cT=Lr,Mst={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return uT(t,s,o,o.$async);var m=n.scopeValue("root",{ref:c});return uT(t,(0,Jl._)(KJ||(KJ=Ee(["",".validate"])),m),c,c.$async)}();var u,d,h,f,m,g,p=Pge.resolveRef.call(l,c,r,e);if(void 0===p)throw new Ast.default(i.opts.uriResolver,r,e);return p instanceof Pge.SchemaEnv?(g=jge(t,m=p),void uT(t,g,m,m.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,Jl.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:Jl.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function jge(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,Jl._)(QJ||(QJ=Ee(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function uT(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?d1.default.this:Jl.nil;function c(d){var h=(0,Jl._)(tK||(tK=Ee(["",".errors"])),d);r.assign(d1.default.vErrors,(0,Jl._)(nK||(nK=Ee([""," === null ? "," : ",".concat(",")"])),d1.default.vErrors,h,d1.default.vErrors,h)),r.assign(d1.default.errors,(0,Jl._)(iK||(iK=Ee(["",".length"])),d1.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=cT.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,Jl._)(rK||(rK=Ee(["",".evaluated.props"])),d));o.props=cT.mergeEvaluated.props(r,p,o.props,Jl.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=cT.mergeEvaluated.items(r,f.items,o.items));else{var m=r.var("items",(0,Jl._)(oK||(oK=Ee(["",".evaluated.items"])),d));o.items=cT.mergeEvaluated.items(r,m,o.items,Jl.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,Jl._)(ZJ||(ZJ=Ee(["await ",""])),(0,Fge.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,Jl._)(eK||(eK=Ee(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,Fge.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}xg.getValidate=jge,xg.callRef=uT,xg.default=Mst,Object.defineProperty(xR,"__esModule",{value:!0}),xR.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wR.default,xg.default];var CR={},SR={};Object.defineProperty(SR,"__esModule",{value:!0});var dT=xr(),Bp=dT.operators,hT={maximum:{okStr:"<=",ok:Bp.LTE,fail:Bp.GT},minimum:{okStr:">=",ok:Bp.GTE,fail:Bp.LT},exclusiveMaximum:{okStr:"<",ok:Bp.LT,fail:Bp.GTE},exclusiveMinimum:{okStr:">",ok:Bp.GT,fail:Bp.LTE}},Nst={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,dT.str)(sK||(sK=Ee(["must be "," ",""])),hT[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,dT._)(aK||(aK=Ee(["{comparison: ",", limit: ","}"])),hT[n].okStr,e)}},Fst={keyword:Object.keys(hT),type:"number",schemaType:"number",$data:!0,error:Nst,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,dT._)(lK||(lK=Ee([""," "," "," || isNaN(",")"])),e,hT[n].fail,i,e))}};SR.default=Fst;var kR={};Object.defineProperty(kR,"__esModule",{value:!0});var nx=xr(),Pst={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,nx.str)(cK||(cK=Ee(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,nx._)(uK||(uK=Ee(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,nx._)(dK||(dK=Ee(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,nx._)(hK||(hK=Ee([""," !== parseInt(",")"])),o,o);t.fail$data((0,nx._)(fK||(fK=Ee(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};kR.default=Pst;var DR={},TR={};function Rge(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(ox.nil,g);else{var v,y=Re(e);try{for(y.s();!(v=y.n()).done;)(0,rx.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:b=v}),void n.forOf(b,i,function(){n.assign(C,(0,rx.propertyInData)(n,r,b,a.ownProperties)),n.if((0,ox.not)(C),function(){t.error(),n.break()})},ox.nil);var b,C}),t.ok(y)}else n.if((0,rx.checkMissingProp)(t,e,v)),(0,rx.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=Re(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,m='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,zst.checkStrictMode)(s,m,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function g(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,rx.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};MR.default=Gst;var OR={};Object.defineProperty(OR,"__esModule",{value:!0});var sx=xr(),Wst={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,sx.str)(EK||(EK=Ee(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,sx._)(AK||(AK=Ee(["{limit: ","}"])),n)}},qst={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Wst,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?sx.operators.GT:sx.operators.LT;t.fail$data((0,sx._)(MK||(MK=Ee(["",".length "," ",""])),e,r,i))}};OR.default=qst;var IR={},ax={};Object.defineProperty(ax,"__esModule",{value:!0});var Lge=Cge;Lge.code='require("ajv/dist/runtime/equal").default',ax.default=Lge,Object.defineProperty(IR,"__esModule",{value:!0});var NR=ex,Ga=xr(),Yst=Lr,Xst=ax,Jst={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,Ga.str)(OK||(OK=Ee(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,Ga._)(IK||(IK=Ee(["{i: ",", j: ","}"])),e,i)}},Kst={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Jst,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,NR.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,Ga._)(FK||(FK=Ee(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,Ga._)(PK||(PK=Ee([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,Ga._)(NK||(NK=Ee([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),m=(0,NR.checkDataTypes)(c,p,a.opts.strictNumbers,NR.DataType.Wrong),g=n.const("indices",(0,Ga._)(jK||(jK=Ee(["{}"]))));n.for((0,Ga._)(RK||(RK=Ee([";","--;"])),h),function(){n.let(p,(0,Ga._)(LK||(LK=Ee(["","[","]"])),e,h)),n.if(m,(0,Ga._)($K||($K=Ee(["continue"])))),c.length>1&&n.if((0,Ga._)(BK||(BK=Ee(["typeof ",' == "string"'])),p),(0,Ga._)(VK||(VK=Ee(["",' += "_"'])),p)),n.if((0,Ga._)(HK||(HK=Ee(["typeof ","[",'] == "number"'])),g,p),function(){n.assign(f,(0,Ga._)(UK||(UK=Ee(["","[","]"])),g,p)),t.error(),n.assign(l,!1).break()}).code((0,Ga._)(zK||(zK=Ee(["","[","] = ",""])),g,p,h))})}function d(h,f){var p=(0,Yst.useFunc)(n,Xst.default),m=n.name("outer");n.label(m).for((0,Ga._)(GK||(GK=Ee([";","--;"])),h),function(){return n.for((0,Ga._)(WK||(WK=Ee([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,Ga._)(qK||(qK=Ee(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(m)})})})}}};IR.default=Kst;var FR={};Object.defineProperty(FR,"__esModule",{value:!0});var PR=xr(),Qst=Lr,Zst=ax,eat={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,PR._)(YK||(YK=Ee(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==gn(o)?t.fail$data((0,PR._)(XK||(XK=Ee(["!","(",", ",")"])),(0,Qst.useFunc)(n,Zst.default),e,r)):t.fail((0,PR._)(JK||(JK=Ee([""," !== ",""])),o,e))}};FR.default=eat;var jR={};Object.defineProperty(jR,"__esModule",{value:!0});var lx=xr(),tat=Lr,nat=ax,iat={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,lx._)(KK||(KK=Ee(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,tat.useFunc)(n,nat.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,lx._)(QK||(QK=Ee(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=lx.or.apply(void 0,ri(r.map(function(h,f){return p=d,"object"===gn(g=r[m=f])&&null!==g?(0,lx._)(ZK||(ZK=Ee(["","(",", ","[","])"])),u(),e,p,m):(0,lx._)(eQ||(eQ=Ee([""," === ",""])),e,g);var p,m,g})))}t.pass(l)}};jR.default=iat,Object.defineProperty(CR,"__esModule",{value:!0}),CR.default=[SR.default,kR.default,DR.default,ER.default,AR.default,MR.default,OR.default,IR.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},FR.default,jR.default];var RR={},h1={};Object.defineProperty(h1,"__esModule",{value:!0}),h1.validateAdditionalItems=void 0;var Cg=xr(),LR=Lr,pat={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Cg.str)(tQ||(tQ=Ee(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Cg._)(nQ||(nQ=Ee(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?$ge(t,i):(0,LR.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function $ge(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,Cg._)(iQ||(iQ=Ee(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,Cg._)(rQ||(rQ=Ee([""," <= ",""])),a,n.length));else if("object"==gn(i)&&!(0,LR.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,Cg._)(oQ||(oQ=Ee([""," <= ",""])),a,n.length));e.if((0,Cg.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:LR.Type.Num},c),s.allErrors||e.if((0,Cg.not)(c),function(){return e.break()})});var c}),t.ok(l)}}h1.validateAdditionalItems=$ge,h1.default=pat;var $R={},f1={};Object.defineProperty(f1,"__esModule",{value:!0}),f1.validateTuple=void 0;var Bge=xr(),pT=Lr,mat=dd(),gat={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return Vge(t,"additionalItems",n);e.items=!0,(0,pT.alwaysValidSchema)(e,n)||t.ok((0,mat.validateArray)(t))}};function Vge(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var g='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,pT.checkStrictMode)(a,g,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=pT.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,Bge._)(sQ||(sQ=Ee(["",".length"])),o));e.forEach(function(d,h){(0,pT.alwaysValidSchema)(a,d)||(i.if((0,Bge._)(aQ||(aQ=Ee([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}f1.validateTuple=Vge,f1.default=gat,Object.defineProperty($R,"__esModule",{value:!0});var vat=f1,yat={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,vat.validateTuple)(t,"items")}};$R.default=yat;var BR={};Object.defineProperty(BR,"__esModule",{value:!0});var Hge=xr(),_at=Lr,bat=dd(),xat=h1,wat={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Hge.str)(lQ||(lQ=Ee(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Hge._)(cQ||(cQ=Ee(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,_at.alwaysValidSchema)(i,n)||(r?(0,xat.validateAdditionalItems)(t,r):t.ok((0,bat.validateArray)(t)))}};BR.default=wat;var VR={};Object.defineProperty(VR,"__esModule",{value:!0});var fu=xr(),mT=Lr,Cat={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,fu.str)(uQ||(uQ=Ee(["must contain at least "," valid item(s)"])),e):(0,fu.str)(dQ||(dQ=Ee(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,fu._)(hQ||(hQ=Ee(["{minContains: ","}"])),e):(0,fu._)(fQ||(fQ=Ee(["{minContains: ",", maxContains: ","}"])),e,i)}},Sat={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Cat,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,fu._)(pQ||(pQ=Ee(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,mT.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,mT.alwaysValidSchema)(a,r)){var d=(0,fu._)(mQ||(mQ=Ee([""," >= ",""])),u,n);return void 0!==e&&(d=(0,fu._)(gQ||(gQ=Ee([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,fu._)(vQ||(vQ=Ee(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,mT.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var m=i.name("_valid"),g=i.let("count",0);p(m,function(){return i.if(m,function(){return v=g,i.code((0,fu._)(yQ||(yQ=Ee(["","++"])),v)),void(void 0===e?i.if((0,fu._)(_Q||(_Q=Ee([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,fu._)(bQ||(bQ=Ee([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,fu._)(xQ||(xQ=Ee([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(m,g){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:mT.Type.Num,compositeRule:!0},m),g()})}}};VR.default=Sat;var Uge={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=xr(),e=Lr,i=dd();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(wQ||(wQ=Ee(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(CQ||(CQ=Ee(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=zn(function(d){var h=d.schema,f={},p={};for(var m in h)"__proto__"!==m&&((Array.isArray(h[m])?f:p)[m]=h[m]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(m){var g=l[m];if(0===g.length)return"continue";var v=(0,i.propertyInData)(c,u,m,d.opts.ownProperties);a.setParams({property:m,depsCount:g.length,deps:g.join(", ")}),d.allErrors?c.if(v,function(){var y,b=Re(g);try{for(b.s();!(y=b.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(k){b.e(k)}finally{b.f()}}):(c.if((0,n._)(SQ||(SQ=Ee([""," && (",")"])),v,(0,i.checkMissingProp)(a,g,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(g){if((0,e.alwaysValidSchema)(h,l[g]))return"continue";c.if((0,i.propertyInData)(c,u,g,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:g},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var m in l)p(m)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(Uge);var HR={};Object.defineProperty(HR,"__esModule",{value:!0});var zge=xr(),kat=Lr,Dat={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,zge._)(kQ||(kQ=Ee(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,kat.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,zge.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};HR.default=Dat;var gT={};Object.defineProperty(gT,"__esModule",{value:!0});var vT=dd(),pd=xr(),Tat=Lp(),yT=Lr,Eat={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,pd._)(DQ||(DQ=Ee(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,yT.alwaysValidSchema)(s,e)){var c=(0,vT.allSchemaProperties)(i.properties),u=(0,vT.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(m){var g;if(c.length>8){var v=(0,yT.schemaRefOrVal)(s,i.properties,"properties");g=(0,vT.isOwnProperty)(n,v,m)}else g=c.length?pd.or.apply(void 0,ri(c.map(function(y){return(0,pd._)(EQ||(EQ=Ee([""," === ",""])),m,y)}))):pd.nil;return u.length&&(g=pd.or.apply(void 0,[g].concat(ri(u.map(function(y){return(0,pd._)(AQ||(AQ=Ee(["",".test(",")"])),(0,vT.usePattern)(t,y),m)}))))),(0,pd.not)(g)}(p),function(){return h(p)}):h(p)}),t.ok((0,pd._)(TQ||(TQ=Ee([""," === ",""])),o,Tat.default.errors))}function d(p){n.code((0,pd._)(MQ||(MQ=Ee(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==gn(e)&&!(0,yT.alwaysValidSchema)(s,e)){var m=n.name("valid");"failing"===l.removeAdditional?(f(p,m,!1),n.if((0,pd.not)(m),function(){t.reset(),d(p)})):(f(p,m),a||n.if((0,pd.not)(m),function(){return n.break()}))}}}function f(p,m,g){var v={keyword:"additionalProperties",dataProp:p,dataPropType:yT.Type.Str};!1===g&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,m)}}};gT.default=Eat;var UR={};Object.defineProperty(UR,"__esModule",{value:!0});var Aat=rT(),Gge=dd(),zR=Lr,Wge=gT,Mat={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&Wge.default.code(new Aat.KeywordCxt(o,Wge.default,"additionalProperties"));var s,a=(0,Gge.allSchemaProperties)(e),l=Re(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=zR.mergeEvaluated.props(n,(0,zR.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,zR.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=Re(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?g(p):(n.if((0,Gge.propertyInData)(n,r,p,o.opts.ownProperties)),g(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function g(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};UR.default=Mat;var GR={};Object.defineProperty(GR,"__esModule",{value:!0});var qge=dd(),_T=xr(),Yge=Lr,Xge=Lr,Oat={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,qge.allSchemaProperties)(e),l=a.filter(function(p){return(0,Yge.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof _T.Name||(o.props=(0,Xge.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,m=Re(a);try{for(m.s();!(p=m.n()).done;){var g=p.value;c&&h(g),o.allErrors?f(g):(n.var(u,!0),f(g),n.if(u))}}catch(v){m.e(v)}finally{m.f()}}()}function h(p){for(var m in c)new RegExp(p).test(m)&&(0,Yge.checkStrictMode)(o,"property ".concat(m," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(m){n.if((0,_T._)(OQ||(OQ=Ee(["",".test(",")"])),(0,qge.usePattern)(t,p),m),function(){var g=l.includes(p);g||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:m,dataPropType:Xge.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,_T._)(IQ||(IQ=Ee(["","[","]"])),d,m),!0):g||o.allErrors||n.if((0,_T.not)(u),function(){return n.break()})})})}}};GR.default=Oat;var WR={};Object.defineProperty(WR,"__esModule",{value:!0});var Iat=Lr,Nat={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,Iat.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};WR.default=Nat;var qR={};Object.defineProperty(qR,"__esModule",{value:!0});var Fat={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dd().validateUnion,error:{message:"must match a schema in anyOf"}};qR.default=Fat;var YR={};Object.defineProperty(YR,"__esModule",{value:!0});var bT=xr(),Pat=Lr,jat={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,bT._)(NQ||(NQ=Ee(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Pat.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,bT._)(FQ||(FQ=Ee([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,bT._)(PQ||(PQ=Ee(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,bT.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};YR.default=jat;var XR={};Object.defineProperty(XR,"__esModule",{value:!0});var Rat=Lr,Lat={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,Rat.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};XR.default=Lat;var JR={};Object.defineProperty(JR,"__esModule",{value:!0});var xT=xr(),Jge=Lr,$at={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,xT.str)(jQ||(jQ=Ee(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,xT._)(RQ||(RQ=Ee(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,Jge.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=Kge(i,"then"),o=Kge(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,xT.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,xT._)(LQ||(LQ=Ee(["",""])),d)):t.setParams({ifClause:d})}}}};function Kge(t,n){var e=t.schema[n];return void 0!==e&&!(0,Jge.alwaysValidSchema)(t,e)}JR.default=$at;var KR={};Object.defineProperty(KR,"__esModule",{value:!0});var Bat=Lr,Vat={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,Bat.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};KR.default=Vat,Object.defineProperty(RR,"__esModule",{value:!0});var Hat=h1,Uat=$R,zat=f1,Gat=BR,Wat=VR,qat=Uge,Yat=HR,Xat=gT,Jat=UR,Kat=GR,Qat=WR,Zat=qR,elt=YR,tlt=XR,nlt=JR,ilt=KR;RR.default=function(){var n=[Qat.default,Zat.default,elt.default,tlt.default,nlt.default,ilt.default,Yat.default,Xat.default,qat.default,Jat.default,Kat.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Uat.default,Gat.default):n.push(Hat.default,zat.default),n.push(Wat.default),n};var QR={},ZR={};Object.defineProperty(ZR,"__esModule",{value:!0});var As=xr(),rlt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,As.str)($Q||($Q=Ee(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,As._)(BQ||(BQ=Ee(["{format: ","}"])),n)}},code:function(t,n){var g,v,h,f,p,m,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,As._)(VQ||(VQ=Ee(["","[","]"])),h,s)),p=e.let("fType"),m=e.let("format"),e.if((0,As._)(HQ||(HQ=Ee(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,As._)(UQ||(UQ=Ee(["",'.type || "string"'])),f)).assign(m,(0,As._)(zQ||(zQ=Ee(["",".validate"])),f))},function(){return e.assign(p,(0,As._)(GQ||(GQ=Ee(['"string"'])))).assign(m,f)}),t.fail$data((0,As.or)(!1===l.strictSchema?As.nil:(0,As._)(WQ||(WQ=Ee([""," && !",""])),s,m),(g=u.$async?(0,As._)(qQ||(qQ=Ee(["(",".async ? await ","(",") : ","(","))"])),f,m,i,m,i):(0,As._)(YQ||(YQ=Ee(["","(",")"])),m,i),v=(0,As._)(XQ||(XQ=Ee(["(typeof ",' == "function" ? '," : ",".test(","))"])),m,g,m,i),(0,As._)(JQ||(JQ=Ee([""," && "," !== true && "," === "," && !",""])),m,m,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=zn(function(v){var y=v instanceof RegExp?(0,As.regexpCode)(v):l.code.formats?(0,As._)(KQ||(KQ=Ee(["","",""])),l.code.formats,(0,As.getProperty)(o)):void 0,b=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=gn(v)||v instanceof RegExp?["string",v,b]:[v.type||"string",v.validate,(0,As._)(QQ||(QQ=Ee(["",".validate"])),b)]}(h),3),m=f[1],g=f[2];f[0]===n&&t.pass(function(){if("object"==gn(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,As._)(ZQ||(ZQ=Ee(["await ","(",")"])),g,i)}return(0,As._)("function"==typeof m?eZ||(eZ=Ee(["","(",")"])):tZ||(tZ=Ee(["",".test(",")"])),g,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};ZR.default=rlt,Object.defineProperty(QR,"__esModule",{value:!0}),QR.default=[ZR.default];var p1={};Object.defineProperty(p1,"__esModule",{value:!0}),p1.contentVocabulary=p1.metadataVocabulary=void 0,p1.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],p1.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(bR,"__esModule",{value:!0});var llt=QR,Qge=p1,clt=[xR.default,CR.default,(0,RR.default)(),llt.default,Qge.metadataVocabulary,Qge.contentVocabulary];bR.default=clt;var eL={},Zge={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(Zge),Object.defineProperty(eL,"__esModule",{value:!0});var m1=xr(),tL=Zge,eve=Xl,ult=Lr,dlt={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===tL.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,m1._)(nZ||(nZ=Ee(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,m1._)(iZ||(iZ=Ee(["","",""])),e,(0,m1.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,m1.Name),h}n.if((0,m1._)(rZ||(rZ=Ee(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},m=C(r),g=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",m="Colon",g="Rbrace",v="Number",y="Current",b="Expref",C="Pipe",L="EQ",z="GT",R="LT",U="GTE",G="LTE",X="NE",te="Flatten",P="Star",W="Filter",J="Dot",le="Lbrace",E="Lbracket",I="Lparen",N="Literal",q={".":J,"*":P,",":p,":":m,"{":le,"}":g,"]":h,"(":I,")":f,"@":y},V={"<":!0,">":!0,"=":!0,"!":!0},re={" ":!0,"\t":!0,"\n":!0};function he(B){return B>="0"&&B<="9"||"-"===B}function Oe(){}Oe.prototype={tokenize:function(B){var ne,ie,Me,Ye,je=[];for(this._current=0;this._current="a"&&Ye<="z"||Ye>="A"&&Ye<="Z"||"_"===Ye)ne=this._current,ie=this._consumeUnquotedIdentifier(B),je.push({type:u,value:ie,start:ne});else if(void 0!==q[B[this._current]])je.push({type:q[B[this._current]],value:B[this._current],start:this._current}),this._current++;else if(he(B[this._current]))Me=this._consumeNumber(B),je.push(Me);else if("["===B[this._current])Me=this._consumeLBracket(B),je.push(Me);else if('"'===B[this._current])ne=this._current,ie=this._consumeQuotedIdentifier(B),je.push({type:d,value:ie,start:ne});else if("'"===B[this._current])ne=this._current,ie=this._consumeRawStringLiteral(B),je.push({type:N,value:ie,start:ne});else if("`"===B[this._current]){ne=this._current;var yt=this._consumeLiteral(B);je.push({type:N,value:yt,start:ne})}else if(void 0!==V[B[this._current]])je.push(this._consumeOperator(B));else if(void 0!==re[B[this._current]])this._current++;else if("&"===B[this._current])ne=this._current,this._current++,"&"===B[this._current]?(this._current++,je.push({type:"And",value:"&&",start:ne})):je.push({type:b,value:"&",start:ne});else{if("|"!==B[this._current]){var Tt=new Error("Unknown character:"+B[this._current]);throw Tt.name="LexerError",Tt}ne=this._current,this._current++,"|"===B[this._current]?(this._current++,je.push({type:"Or",value:"||",start:ne})):je.push({type:C,value:"|",start:ne})}return je},_consumeUnquotedIdentifier:function(B){var ne,ie=this._current;for(this._current++;this._current="a"&&ne<="z"||ne>="A"&&ne<="Z"||ne>="0"&&ne<="9"||"_"===ne);)this._current++;return B.slice(ie,this._current)},_consumeQuotedIdentifier:function(B){var ne=this._current;this._current++;for(var ie=B.length;'"'!==B[this._current]&&this._current"===ie?"="===B[this._current]?(this._current++,{type:U,value:">=",start:ne}):{type:z,value:">",start:ne}:"="===ie&&"="===B[this._current]?(this._current++,{type:L,value:"==",start:ne}):void 0},_consumeLiteral:function(B){this._current++;for(var ne,ie=this._current,Me=B.length;"`"!==B[this._current]&&this._current=0||["true","false","null"].indexOf(B)>=0)return!0;if(!("-0123456789".indexOf(B[0])>=0))return!1;try{return JSON.parse(B),!0}catch{return!1}}};var _e={};function Xe(){}function Le(B){this.runtime=B}function rt(B){this._interpreter=B,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}_e.EOF=0,_e.UnquotedIdentifier=0,_e.QuotedIdentifier=0,_e.Rbracket=0,_e.Rparen=0,_e.Comma=0,_e.Rbrace=0,_e.Number=0,_e.Current=0,_e.Expref=0,_e.Pipe=1,_e.Or=2,_e.And=3,_e.EQ=5,_e.GT=5,_e.LT=5,_e.GTE=5,_e.LTE=5,_e.NE=5,_e.Flatten=9,_e.Star=20,_e.Filter=21,_e.Dot=40,_e.Not=45,_e.Lbrace=50,_e.Lbracket=55,_e.Lparen=60,Xe.prototype={parse:function(B){this._loadTokens(B),this.index=0;var ne=this.expression(0);if("EOF"!==this._lookahead(0)){var ie=this._lookaheadToken(0),Me=new Error("Unexpected token type: "+ie.type+", value: "+ie.value);throw Me.name="ParserError",Me}return ne},_loadTokens:function(B){var ne=(new Oe).tokenize(B);ne.push({type:"EOF",value:"",start:B.length}),this.tokens=ne},expression:function(B){var ne=this._lookaheadToken(0);this._advance();for(var ie=this.nud(ne),Me=this._lookahead(0);B<_e[Me];)this._advance(),ie=this.led(Me,ie),Me=this._lookahead(0);return ie},_lookahead:function(B){return this.tokens[this.index+B].type},_lookaheadToken:function(B){return this.tokens[this.index+B]},_advance:function(){this.index++},nud:function(B){var ne,ie;switch(B.type){case N:return{type:"Literal",value:B.value};case u:return{type:"Field",name:B.value};case d:var Me={type:"Field",name:B.value};if(this._lookahead(0)===I)throw new Error("Quoted identifier not allowed for function names.");return Me;case"Not":return{type:"NotExpression",children:[ne=this.expression(_e.Not)]};case P:return ne=null,{type:"ValueProjection",children:[{type:"Identity"},ne=this._lookahead(0)===h?{type:"Identity"}:this._parseProjectionRHS(_e.Star)]};case W:return this.led(B.type,{type:"Identity"});case le:return this._parseMultiselectHash();case te:return{type:"Projection",children:[{type:te,children:[{type:"Identity"}]},ne=this._parseProjectionRHS(_e.Flatten)]};case E:return this._lookahead(0)===v||this._lookahead(0)===m?(ne=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},ne)):this._lookahead(0)===P&&this._lookahead(1)===h?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},ne=this._parseProjectionRHS(_e.Star)]}):this._parseMultiselectList();case y:return{type:y};case b:return{type:"ExpressionReference",children:[ie=this.expression(_e.Expref)]};case I:for(var Ye=[];this._lookahead(0)!==f;)this._lookahead(0)===y?(ie={type:y},this._advance()):ie=this.expression(0),Ye.push(ie);return this._match(f),Ye[0];default:this._errorToken(B)}},led:function(B,ne){var ie;switch(B){case J:var Me=_e.Dot;return this._lookahead(0)!==P?{type:"Subexpression",children:[ne,ie=this._parseDotRHS(Me)]}:(this._advance(),{type:"ValueProjection",children:[ne,ie=this._parseProjectionRHS(Me)]});case C:return ie=this.expression(_e.Pipe),{type:C,children:[ne,ie]};case"Or":return{type:"OrExpression",children:[ne,ie=this.expression(_e.Or)]};case"And":return{type:"AndExpression",children:[ne,ie=this.expression(_e.And)]};case I:for(var Ye,je=ne.name,yt=[];this._lookahead(0)!==f;)this._lookahead(0)===y?(Ye={type:y},this._advance()):Ye=this.expression(0),this._lookahead(0)===p&&this._match(p),yt.push(Ye);return this._match(f),{type:"Function",name:je,children:yt};case W:var Tt=this.expression(0);return this._match(h),{type:"FilterProjection",children:[ne,ie=this._lookahead(0)===te?{type:"Identity"}:this._parseProjectionRHS(_e.Filter),Tt]};case te:return{type:"Projection",children:[{type:te,children:[ne]},this._parseProjectionRHS(_e.Flatten)]};case L:case X:case z:case U:case R:case G:return this._parseComparator(ne,B);case E:var fn=this._lookaheadToken(0);return fn.type===v||fn.type===m?(ie=this._parseIndexExpression(),this._projectIfSlice(ne,ie)):(this._match(P),this._match(h),{type:"Projection",children:[ne,ie=this._parseProjectionRHS(_e.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(B){if(this._lookahead(0)!==B){var ne=this._lookaheadToken(0),ie=new Error("Expected "+B+", got: "+ne.type);throw ie.name="ParserError",ie}this._advance()},_errorToken:function(B){var ne=new Error("Invalid token ("+B.type+'): "'+B.value+'"');throw ne.name="ParserError",ne},_parseIndexExpression:function(){if(this._lookahead(0)===m||this._lookahead(1)===m)return this._parseSliceExpression();var B={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(h),B},_projectIfSlice:function(B,ne){var ie={type:"IndexExpression",children:[B,ne]};return"Slice"===ne.type?{type:"Projection",children:[ie,this._parseProjectionRHS(_e.Star)]}:ie},_parseSliceExpression:function(){for(var B=[null,null,null],ne=0,ie=this._lookahead(0);ie!==h&&ne<3;){if(ie===m)ne++,this._advance();else{if(ie!==v){var Me=this._lookahead(0),Ye=new Error("Syntax error, unexpected token: "+Me.value+"("+Me.type+")");throw Ye.name="Parsererror",Ye}B[ne]=this._lookaheadToken(0).value,this._advance()}ie=this._lookahead(0)}return this._match(h),{type:"Slice",children:B}},_parseComparator:function(B,ne){return{type:"Comparator",name:ne,children:[B,this.expression(_e[ne])]}},_parseDotRHS:function(B){var ne=this._lookahead(0);return[u,d,P].indexOf(ne)>=0?this.expression(B):ne===E?(this._match(E),this._parseMultiselectList()):ne===le?(this._match(le),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(B){var ne;if(_e[this._lookahead(0)]<10)ne={type:"Identity"};else if(this._lookahead(0)===E)ne=this.expression(B);else if(this._lookahead(0)===W)ne=this.expression(B);else{if(this._lookahead(0)!==J){var ie=this._lookaheadToken(0),Me=new Error("Sytanx error, unexpected token: "+ie.value+"("+ie.type+")");throw Me.name="ParserError",Me}this._match(J),ne=this._parseDotRHS(B)}return ne},_parseMultiselectList:function(){for(var B=[];this._lookahead(0)!==h;){var ne=this.expression(0);if(B.push(ne),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:B}},_parseMultiselectHash:function(){for(var B,ne,ie,Me=[],Ye=[u,d];;){if(B=this._lookaheadToken(0),Ye.indexOf(B.type)<0)throw new Error("Expecting an identifier token, got: "+B.type);if(ne=B.value,this._advance(),this._match(m),ie={type:"KeyValuePair",name:ne,value:this.expression(0)},Me.push(ie),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===g){this._match(g);break}}return{type:"MultiSelectHash",children:Me}}},Le.prototype={search:function(B,ne){return this.visit(B,ne)},visit:function(B,ne){var ie,Me,Ye,je,yt,Tt,fn,Hn,Zt;switch(B.type){case"Field":return null!==ne&&e(ne)?void 0===(Tt=ne[B.name])?null:Tt:null;case"Subexpression":for(Ye=this.visit(B.children[0],ne),Zt=1;Zt0)for(Zt=wr;Ztor;Zt+=mr)Ye.push(ne[Zt]);return Ye;case"Projection":var gi=this.visit(B.children[0],ne);if(!n(gi))return null;for(Hn=[],Zt=0;Ztyt;break;case U:Ye=je>=yt;break;case R:Ye=je=B&&(ne=ie<0?B-1:B),ne}},rt.prototype={callFunction:function(B,ne){var ie=this.functionTable[B];if(void 0===ie)throw new Error("Unknown function: "+B+"()");return this._validateArgs(B,ne,ie._signature),ie._func.call(this,ne)},_validateArgs:function(B,ne,ie){var Me,Ye,je,yt;if(ie[ie.length-1].variadic){if(ne.length=0;Me--)ie+=ne[Me];return ie}var Ye=B[0].slice(0);return Ye.reverse(),Ye},_functionAbs:function(B){return Math.abs(B[0])},_functionCeil:function(B){return Math.ceil(B[0])},_functionAvg:function(B){for(var ne=0,ie=B[0],Me=0;Me=0},_functionFloor:function(B){return Math.floor(B[0])},_functionLength:function(B){return e(B[0])?Object.keys(B[0]).length:B[0].length},_functionMap:function(B){for(var ne=[],ie=this._interpreter,Me=B[0],Ye=B[1],je=0;je0){if(this._getTypeName(B[0][0])===s)return Math.max.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Me=1;Me0){if(this._getTypeName(B[0][0])===s)return Math.min.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Me=1;Meln?1:Eiyt&&(yt=ie,ne=Ye[Tt]);return ne},_functionMinBy:function(B){for(var ne,ie,Ye=B[0],je=this.createKeyFunction(B[1],[s,a]),yt=1/0,Tt=0;Tt1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var glt=function(){function t(n,e,i,r){nL(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=wT(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),m=wT(p,4),b=m[3];void 0===b&&(b=1),o.rgba=[m[0],m[1],m[2],b]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return iL(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return ive(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return ive(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=mlt[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=wT(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(g-=1),g<.16666666666666666?p+6*(m-p)*g:g<.5?m:g<.6666666666666666?p+(m-p)*(.6666666666666666-g)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),vlt=function(){function t(){nL(this,t),this._events=[]}return iL(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function rL(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,m=c.clientY,g=r(c.clientX-d.left,0,h),v=r(m-d.top,0,f);e(g/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function Ch(t,n){return(n||document).querySelector(t)}function rve(t){t.preventDefault(),t.stopPropagation()}function oL(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&rve(o),i(o))})}var ove=function(){function t(n){nL(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new vlt,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return iL(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),oL(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(rve(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new glt(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=Ch(".picker_hue",o),this._domSL=Ch(".picker_sl",o),this._domA=Ch(".picker_alpha",o),this._domEdit=Ch(".picker_editor input",o),this._domSample=Ch(".picker_sample",o),this._domOkay=Ch(".picker_done button",o),this._domCancel=Ch(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),rL(r,this._domH,function(l,c){return e._setHSLA(l)}),rL(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&rL(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),oL(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),oL(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=Ch(".picker_selector",this._domH),d=Ch(".picker_selector",l),h=Ch(".picker_selector",c);b(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,b(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function b(k,D,L){D.style.left=100*L+"%"}function C(k,D,L){D.style.top=100*L+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),sL=document.createElement("style");sL.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(sL),ove.StyleElement=sL;var ylt=Object.freeze({__proto__:null,default:ove});const _lt=["editor"];function blt(t,n){if(1&t&&(_(0,"ngb-alert",38),pe(1,"img",39),_(2,"h6",40),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while modifying storage object: ",e.error,"")}}function xlt(t,n){1&t&&(_(0,"ngb-alert",41),pe(1,"img",42),_(2,"h6",40),O(3,"Storage object was modified successfully."),x()()),2&t&&S("dismissible",!1)}function wlt(t,n){1&t&&(_(0,"span"),O(1,"Save as a copy"),x())}function Clt(t,n){1&t&&O(0,"Save")}function Slt(t,n){if(1&t&&(_(0,"button",43),Z(1,wlt,2,0,"span",44),Z(2,Clt,1,0,"ng-template",null,45,cs),x()),2&t){const e=Ta(3),i=$();S("disabled",i.updating),w(1),S("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const aL=function(){return["/storage"]},klt=function(t){return{collection:t}},Dlt=function(t,n){return{collection:t,key:n}},Tlt=function(t,n,e){return{collection:t,key:n,user_id:e}},lL=function(t){return{"is-invalid":t}},ux=function(t){return{active:t}};let Elt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;editor;jsonEditor;error="";object;objectForm;updating=!1;updated=!1;ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Co.required],keyname:["",Co.required],user_id:["",Co.required],permission_read:[{value:0,disabled:!1},Co.required],permission_write:[{value:0,disabled:!1},Co.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(_lt,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:88,vars:60,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["id","permission_read","name","permission_read",1,"btn-group","btn-group-toggle"],[1,"btn","btn-outline-secondary",3,"ngClass"],["formControlName","permission_read","type","radio",3,"value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["id","permission_write","name","permission_write",1,"btn-group","btn-group-toggle"],["formControlName","permission_write","type","radio",3,"value"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Storage Object"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),O(6,"Storage"),x(),_(7,"li",4)(8,"a",5),O(9),x()(),_(10,"li",4)(11,"a",5),O(12),x()(),_(13,"li",4)(14,"a",5),O(15),x()()()()(),Z(16,blt,4,2,"ngb-alert",6),Z(17,xlt,4,1,"ngb-alert",7),_(18,"form",8),ye("ngSubmit",function(){return r.updateObject()}),_(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),O(23,"Collection"),x()(),pe(24,"input",13),_(25,"div",14),O(26,"Collection is required"),x()(),_(27,"div",10)(28,"div",11)(29,"label",15),O(30,"Key"),x()(),pe(31,"input",16),_(32,"div",14),O(33,"Key is required"),x()()(),_(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),O(38,"User ID"),x()(),pe(39,"input",18),_(40,"div",14),O(41,"User ID is required"),x()(),_(42,"div",19)(43,"div",11)(44,"label",20),O(45,"Read Permission"),x()(),_(46,"div",21)(47,"label",22),pe(48,"input",23),O(49," No Read "),x(),_(50,"label",22),pe(51,"input",23),O(52," Owner Read "),x(),_(53,"label",22),pe(54,"input",23),O(55," Public Read "),x()()()(),_(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),O(60,"Version"),x()(),pe(61,"input",25),x(),_(62,"div",19)(63,"div",11)(64,"label",26),O(65,"Write Permission"),x()(),_(66,"div",27)(67,"label",22),pe(68,"input",28),O(69," No Write "),x(),_(70,"label",22),pe(71,"input",28),O(72," Owner Write "),x()()()(),_(73,"div",29)(74,"div",10)(75,"div",11)(76,"label",30),O(77,"Create Time"),x()(),pe(78,"input",31),x(),_(79,"div",10)(80,"div",11)(81,"label",32),O(82,"Update Time"),x()(),pe(83,"input",33),x()(),_(84,"div",34),pe(85,"div",35,36),x(),Z(87,Slt,4,3,"button",37),x()),2&i&&(w(8),S("routerLink",ml(32,aL))("queryParams",sr(33,klt,r.object.collection)),w(1),bt(r.object.collection),w(2),S("routerLink",ml(35,aL))("queryParams",Mr(36,Dlt,r.object.collection,r.object.key)),w(1),bt(r.object.key),w(2),S("routerLink",ml(39,aL))("queryParams",ty(40,Tlt,r.object.collection,r.object.key,r.object.user_id)),w(1),bt(r.object.user_id),w(1),S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.objectForm),w(6),S("ngClass",sr(44,lL,r.f.collection.dirty&&r.f.collection.errors)),w(1),S("hidden",r.f.collection.disabled||r.f.collection.valid||r.f.collection.pristine),w(6),S("ngClass",sr(46,lL,r.f.keyname.dirty&&r.f.keyname.errors)),w(1),S("hidden",r.f.keyname.disabled||r.f.keyname.valid||r.f.keyname.pristine),w(7),S("ngClass",sr(48,lL,r.f.user_id.dirty&&r.f.user_id.errors)),w(1),S("hidden",r.f.user_id.disabled||r.f.user_id.valid||r.f.user_id.pristine),w(7),S("ngClass",sr(50,ux,0==r.f.permission_read.value)),w(1),S("value",0),w(2),S("ngClass",sr(52,ux,1==r.f.permission_read.value)),w(1),S("value",1),w(2),S("ngClass",sr(54,ux,2==r.f.permission_read.value)),w(1),S("value",2),w(7),S("value",r.object.version),w(6),S("ngClass",sr(56,ux,0==r.f.permission_write.value)),w(1),S("value",0),w(2),S("ngClass",sr(58,ux,1==r.f.permission_write.value)),w(1),S("value",1),w(7),S("value",r.object.create_time),w(5),S("value",r.object.update_time),w(4),S("ngIf",r.updateAllowed()))},dependencies:[Ou,nm,vn,po,fa,Qs,j3,da,ha,Hf,js,Zs],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),Alt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Mlt(t,n){if(1&t&&(_(0,"ngb-alert",18),pe(1,"img",19),_(2,"h6",20),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while processing request: ",e.error,"")}}function Olt(t,n){1&t&&(_(0,"th",21),O(1,"Remove"),x())}function Ilt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"Yes"),x()}}function Nlt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"No"),x()}}function Flt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"Yes"),x()}}function Plt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"No"),x()}}function jlt(t,n){if(1&t){const e=vt();_(0,"td",26)(1,"button",27),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteLeaderboard(r,s,a))}),O(2,"Delete"),x()()}}function Rlt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(2),x(),_(3,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(4),x(),_(5,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(6),x(),_(7,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(8),x(),Z(9,Ilt,2,0,"td",23),Z(10,Nlt,2,0,"td",23),Z(11,Flt,2,0,"td",23),Z(12,Plt,2,0,"td",23),Z(13,jlt,3,0,"td",24),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.id),w(2),bt(i.orderString[e.sort_order]),w(2),bt(i.operatorString[e.operator]),w(2),bt(""===e.reset_schedule?"-":e.reset_schedule),w(1),S("ngIf",e.authoritative),w(1),S("ngIf",!e.authoritative),w(1),S("ngIf",e.tournament),w(1),S("ngIf",!e.tournament),w(1),S("ngIf",i.deleteAllowed())}}function Llt(t,n){1&t&&(_(0,"tr")(1,"td",28),O(2,"No leaderboards were found."),x()())}let $lt=(()=>{class t{route;router;authService;consoleService;deleteConfirmService;error="";leaderboards=[];nextCursor="";leaderboardsCount=0;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};constructor(e,i,r,o,s){this.route=e,this.router=i,this.authService=r,this.consoleService=o,this.deleteConfirmService=s}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(zo),de(bi),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),O(4,"Leaderboards"),x(),_(5,"h6",4),O(6),x()(),_(7,"div",5)(8,"div",6)(9,"button",7),ye("click",function(){return r.search(0)}),pe(10,"img",8),x(),_(11,"button",7),ye("click",function(){return r.search(1)}),pe(12,"img",9),x()()()()(),Z(13,Mlt,4,2,"ngb-alert",10),_(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),O(18,"Leaderboard ID"),x(),_(19,"th",13),O(20,"Sort Order"),x(),_(21,"th",13),O(22,"Operator"),x(),_(23,"th",13),O(24,"Reset Schedule"),x(),_(25,"th",14),O(26,"Authoritative"),x(),_(27,"th",14),O(28,"Tournament"),x(),Z(29,Olt,2,0,"th",15),x()(),_(30,"tbody"),Z(31,Rlt,14,9,"tr",16),Z(32,Llt,3,0,"tr",17),x()()),2&i&&(w(6),mn("",r.leaderboardsCount," leaderboards found."),w(3),S("disabled",0===r.leaderboards.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(16),S("ngIf",r.deleteAllowed()),w(2),S("ngForOf",r.leaderboards),w(1),S("ngIf",0===r.leaderboards.length))},dependencies:[Ln,vn,po],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Blt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vlt(t,n){if(1&t&&(_(0,"ngb-alert",31),pe(1,"img",32),_(2,"h6",33),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying accounts: ",e.error,"")}}function Hlt(t,n){if(1&t){const e=vt();_(0,"ngb-alert",31),pe(1,"img",32),_(2,"h6",33),O(3,"Query ongoing..."),x(),_(4,"button",34),ye("click",function(){return Be(e),Ve($().cancelQuery())}),O(5,"Cancel!"),x()()}2&t&&S("dismissible",!1)}function Ult(t,n){1&t&&(_(0,"th",35),O(1,"Remove"),x())}function zlt(t,n){1&t&&(_(0,"tr")(1,"td",36),O(2,"No users found - change the filter criteria or add new user accounts."),x()())}function Glt(t,n){1&t&&pe(0,"td")}function Wlt(t,n){if(1&t){const e=vt();_(0,"td",39)(1,"button",40),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteAccount(r,s,a))}),O(2,"Delete"),x()()}}function qlt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(2),x(),_(3,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(6),x(),_(7,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(8),x(),Z(9,Glt,1,0,"td",29),Z(10,Wlt,3,0,"td",38),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.id),w(2),bt(e.username),w(2),bt(e.display_name),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Ylt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";accountsCount=0;accounts=[];nextCursor="";prevCursor="";searchForm;querySubject;ongoingQuery=!1;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.querySubject=new dr,this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}ngOnDestroy(){this.querySubject.next(),this.querySubject.complete()}search(e){this.ongoingQuery&&this.querySubject.next(),this.ongoingQuery=!0;let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).pipe(Ko(this.querySubject)).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"}),this.ongoingQuery=!1},o=>{this.error=o,this.ongoingQuery=!1})}cancelQuery(){this.querySubject.next(),this.ongoingQuery=!1}deleteAccount(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:46,vars:10,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button",1,"btn","btn-danger",3,"click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Accounts"),x(),_(2,"h6",1),O(3),x(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return r.search(0)}),_(8,"div",6),pe(9,"input",7),_(10,"div",8)(11,"span",9),ye("click",function(){return r.f.filter.setValue(r.systemUserId)}),pe(12,"img",10),x()(),_(13,"div",8)(14,"div",11)(15,"button",12),ye("click",function(){return r.f.filter_type.setValue(0),r.search(0)}),O(16,"Search"),x(),_(17,"div",13),pe(18,"button",14),_(19,"div",15)(20,"button",16),ye("click",function(){return r.f.filter_type.setValue(1),r.search(0)}),O(21,"Tombstones"),x()()()()()()()(),_(22,"div",17)(23,"div",18)(24,"button",19),ye("click",function(){return r.search(0)}),pe(25,"img",20),x(),_(26,"button",19),ye("click",function(){return r.search(1)}),pe(27,"img",21),x()()()()(),Z(28,Vlt,4,2,"ngb-alert",22),Z(29,Hlt,6,1,"ngb-alert",22),_(30,"div",23)(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),O(35,"User ID"),x(),_(36,"th"),O(37,"Username"),x(),_(38,"th"),O(39,"Display Name"),x(),_(40,"th",27),O(41,"Last Update"),x(),Z(42,Ult,2,0,"th",28),x()(),_(43,"tbody"),Z(44,zlt,3,0,"tr",29),Z(45,qlt,11,6,"tr",30),x()()()),2&i&&(w(3),mn("",r.accountsCount," accounts found."),w(4),S("formGroup",r.searchForm),w(11),S("disabled",!r.f.filter.value||""===r.f.filter.value),w(6),S("disabled",0===r.accounts.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(1),S("ngIf",r.ongoingQuery),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.accounts.length),w(1),S("ngForOf",r.accounts))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Xlt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Jlt(t,n){if(1&t){const e=vt();_(0,"button",15),ye("click",function(r){return Be(e),Ve($().exportAccount(r))}),pe(1,"img",16),O(2,"Export"),x()}}function Klt(t,n){1&t&&(_(0,"span"),O(1,"Unban"),x())}function Qlt(t,n){1&t&&(_(0,"span"),O(1,"Ban"),x())}function Zlt(t,n){if(1&t){const e=vt();_(0,"button",15),ye("click",function(r){return Be(e),Ve($().banUnbanAccount(r))}),pe(1,"img",17),Z(2,Klt,2,0,"span",18),Z(3,Qlt,2,0,"span",18),x()}if(2&t){const e=$();w(2),S("ngIf",e.account.disable_time),w(1),S("ngIf",!e.account.disable_time)}}function ect(t,n){if(1&t){const e=vt();_(0,"button",19),ye("click",function(r){return Be(e),Ve($().deleteAccount(r,!1))}),pe(1,"img",20),O(2,"Delete"),x()}}function tct(t,n){if(1&t){const e=vt();_(0,"button",19),ye("click",function(r){return Be(e),Ve($().deleteAccount(r,!0))}),pe(1,"img",21),O(2,"Recorded delete"),x()}}function nct(t,n){if(1&t&&(_(0,"ngb-alert",22),pe(1,"img",23),_(2,"h6",24),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}const ict=function(t,n){return["/accounts",t,n]};function rct(t,n){if(1&t&&(_(0,"div"),sc(1,25),_(2,"a",26),O(3),x(),ac(),x()),2&t){const e=n.$implicit,i=$();w(1),S("ngbNavItem",e.path),w(1),S("routerLink",Mr(3,ict,i.account.user.id,e.path)),w(1),bt(e.label)}}const oct=function(){return["/accounts"]},sct=function(){return["/storage"]},act=function(t){return{user_id:t}};let lct=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;account;error="";views=[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,qI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Account"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),O(7,"Account"),x()(),_(8,"li",6),O(9),x()()(),_(10,"div"),Z(11,Jlt,3,0,"button",7),Z(12,Zlt,4,2,"button",7),Z(13,ect,3,0,"button",8),Z(14,tct,3,0,"button",8),x()(),Z(15,nct,4,2,"ngb-alert",9),_(16,"nav",10,11),Z(18,rct,4,6,"div",12),_(19,"div"),sc(20,13),_(21,"a",14),O(22," Storage "),x(),ac(),x()(),pe(23,"router-outlet")),2&i&&(w(6),S("routerLink",ml(10,oct)),w(3),bt(r.account.user.id),w(2),S("ngIf",r.exportAllowed()),w(1),S("ngIf",r.banAllowed()),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.error),w(3),S("ngForOf",r.views),w(3),S("routerLink",ml(11,sct))("queryParams",sr(12,act,r.account.user.id)))},dependencies:[cm,Ou,Ny,Ln,vn,po,zd,Yh,r_,Yf],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),cct=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const uct=["editor"];function dct(t,n){if(1&t&&(_(0,"ngb-alert",29),pe(1,"img",30),_(2,"h6",31),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function hct(t,n){1&t&&(_(0,"ngb-alert",32),pe(1,"img",33),_(2,"h6",31),O(3,"Account was modified successfully."),x()()),2&t&&S("dismissible",!1)}function fct(t,n){1&t&&(_(0,"button",34),O(1,"Save"),x()),2&t&&S("disabled",$().updating)}const pct=function(t){return{"is-invalid":t}};let mct=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Co.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(uct,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(Z(0,dct,4,2,"ngb-alert",0),Z(1,hct,4,1,"ngb-alert",1),_(2,"form",2),ye("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),O(7,"User ID"),x()(),pe(8,"input",7),x(),_(9,"div",4)(10,"div",5)(11,"label",8),O(12,"Username"),x()(),pe(13,"input",9),_(14,"div",10),O(15,"Username is required"),x()()(),_(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),O(20,"Display Name"),x()(),pe(21,"input",12),x(),_(22,"div",13)(23,"div",5)(24,"label",14),O(25,"Avatar URL"),x()(),pe(26,"input",15),x()(),_(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),O(31,"Location"),x()(),pe(32,"input",17),x(),_(33,"div",13)(34,"div",5)(35,"label",18),O(36,"Timezone"),x()(),pe(37,"input",19),x()(),_(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),O(42,"Create Time"),x()(),pe(43,"input",22),x(),_(44,"div",4)(45,"div",5)(46,"label",23),O(47,"Update Time"),x()(),pe(48,"input",24),x()(),_(49,"div",25),pe(50,"div",26,27),x(),Z(52,fct,2,1,"button",28),x()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.accountForm),w(6),S("value",r.account.user.id),w(5),S("ngClass",sr(9,pct,r.f.username.dirty&&r.f.username.errors)),w(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),w(29),S("value",r.account.user.create_time),w(5),S("value",r.account.user.update_time),w(4),S("ngIf",r.updateAllowed()))},dependencies:[nm,vn,po,fa,Qs,da,ha,Hf,js,Zs]})}return t})();function gct(t,n){if(1&t&&(_(0,"ngb-alert",36),pe(1,"img",37),_(2,"h6",38),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function vct(t,n){1&t&&(_(0,"ngb-alert",39),pe(1,"img",40),_(2,"h6",38),O(3,"Account was modified successfully."),x()()),2&t&&S("dismissible",!1)}function yct(t,n){if(1&t&&(_(0,"option",41),O(1),x()),2&t){const e=n.$implicit,i=n.index;Ph("value",i),S("selected",0===i),w(1),bt(e.id)}}function _ct(t,n){1&t&&(_(0,"button",42),O(1,"Save"),x()),2&t&&S("disabled",$().updating)}let bct=(()=>{class t{route;router;consoleService;authService;formBuilder;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(Z(0,gct,4,2,"ngb-alert",0),Z(1,vct,4,1,"ngb-alert",1),_(2,"form",2),ye("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),O(7,"Device IDs"),x()(),_(8,"div",7)(9,"button",8),ye("click",function(){return r.copyDeviceIdToClipboard(r.f.selected_device_id_index.value)}),pe(10,"img",9),O(11," Copy "),x(),_(12,"select",10),Z(13,yct,2,3,"option",11),x(),_(14,"div",12)(15,"button",13),ye("click",function(s){return r.unlinkDeviceId(s)}),O(16,"Unlink"),x()()()(),_(17,"div",4)(18,"div",5)(19,"label",14),O(20,"Custom ID"),x()(),_(21,"div",7),pe(22,"input",15),_(23,"div",12)(24,"button",13),ye("click",function(s){return r.unlinkCustomID(s)}),O(25,"Unlink"),x()()()()(),_(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),O(30,"Facebook ID"),x()(),_(31,"div",7),pe(32,"input",17),_(33,"div",12)(34,"button",13),ye("click",function(s){return r.unlinkFacebook(s)}),O(35,"Unlink"),x()()()(),_(36,"div",18)(37,"div",5)(38,"label",19),O(39,"FB Instant Game ID"),x()(),_(40,"div",7),pe(41,"input",20),_(42,"div",12)(43,"button",13),ye("click",function(s){return r.unlinkFacebookInstantGames(s)}),O(44,"Unlink"),x()()()()(),_(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),O(49,"Apple ID"),x()(),_(50,"div",7),pe(51,"input",22),_(52,"div",12)(53,"button",13),ye("click",function(s){return r.unlinkApple(s)}),O(54,"Unlink"),x()()()(),_(55,"div",18)(56,"div",5)(57,"label",23),O(58,"GameCenter ID"),x()(),_(59,"div",7),pe(60,"input",24),_(61,"div",12)(62,"button",13),ye("click",function(s){return r.unlinkGameCenter(s)}),O(63,"Unlink"),x()()()()(),_(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),O(68,"Google ID"),x()(),_(69,"div",7),pe(70,"input",26),_(71,"div",12)(72,"button",13),ye("click",function(s){return r.unlinkGoogle(s)}),O(73,"Unlink"),x()()()(),_(74,"div",4)(75,"div",5)(76,"label",27),O(77,"Steam ID"),x()(),_(78,"div",7),pe(79,"input",28),_(80,"div",12)(81,"button",13),ye("click",function(s){return r.unlinkSteam(s)}),O(82,"Unlink"),x()()()()(),_(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),O(87,"Email"),x(),pe(88,"br"),x(),pe(89,"input",30),x(),_(90,"div",4)(91,"div",5)(92,"label",31),O(93,"Password"),x()(),pe(94,"input",32),x()(),_(95,"div",33)(96,"div",4),pe(97,"div",5),_(98,"span",34),O(99),x()(),pe(100,"div",4),x(),Z(101,_ct,2,1,"button",35),x()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.accountForm),w(11),S("ngForOf",r.account.devices),w(2),S("disabled",!r.updateAllowed()||0===r.account.devices.length),w(7),S("value",r.account.custom_id),w(2),S("disabled",!r.updateAllowed()||!r.account.custom_id||""===r.account.custom_id),w(8),S("value",r.account.user.facebook_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_id||""===r.account.user.facebook_id),w(7),S("value",r.account.user.facebook_instant_game_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_instant_game_id||""===r.account.user.facebook_instant_game_id),w(8),S("value",r.account.user.apple_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.apple_id||""===r.account.user.apple_id),w(7),S("value",r.account.user.gamecenter_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.gamecenter_id||""===r.account.user.gamecenter_id),w(8),S("value",r.account.user.google_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.google_id||""===r.account.user.google_id),w(7),S("value",r.account.user.steam_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.steam_id||""===r.account.user.steam_id),w(18),mn("Verification Status: ",null===r.account.verify_time?"Not Verified":"Verified",""),w(2),S("ngIf",r.updateAllowed()))},dependencies:[Ln,vn,po,fa,HC,UC,Qs,kv,da,ha,js,Zs],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})}return t})();const xct=["editor"];function wct(t,n){if(1&t&&(_(0,"ngb-alert",24),pe(1,"img",25),_(2,"h6",26),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Cct(t,n){1&t&&(_(0,"ngb-alert",27),pe(1,"img",28),_(2,"h6",26),O(3,"Account was modified successfully."),x()()),2&t&&S("dismissible",!1)}function Sct(t,n){if(1&t){const e=vt();_(0,"button",29),ye("click",function(){return Be(e),Ve($().updateWallet())}),O(1,"Save"),x()}2&t&&S("disabled",$().updating)}function kct(t,n){1&t&&(_(0,"th",30),O(1,"Remove"),x())}function Dct(t,n){1&t&&(_(0,"tr")(1,"td",31),O(2,"No wallet ledger items found."),x()())}function Tct(t,n){1&t&&pe(0,"div",37)}function Ect(t,n){1&t&&pe(0,"div",38)}function Act(t,n){if(1&t){const e=vt();_(0,"td")(1,"button",39),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteLedgerItem(r,s,a))}),O(2,"Delete"),x()()}}function Mct(t,n){if(1&t&&(_(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),O(4),x()()()()),2&t){const e=$().$implicit;w(4),bt(e.metadata)}}function Oct(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",32),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),Z(3,Tct,1,0,"div",33),Z(4,Ect,1,0,"div",34),x(),O(5),x(),_(6,"td",35)(7,"pre",36),O(8),x()(),_(9,"td"),O(10),x(),Z(11,Act,3,0,"td",22),x(),Z(12,Mct,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.walletLedgerMetadataOpen[e]),w(1),S("ngIf",r.walletLedgerMetadataOpen[e]),w(1),mn(" ",i.id," "),w(3),bt(i.changeset),w(2),bt(i.update_time),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.walletLedgerMetadataOpen[e])}}let Ict=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;editor;jsonEditor;error="";account;walletLedger=[];walletLedgerMetadataOpen=[];updating=!1;updated=!1;nextCursor="";prevCursor="";limit=100;userID;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(xct,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(Z(0,wct,4,2,"ngb-alert",0),Z(1,Cct,4,1,"ngb-alert",1),_(2,"div",2),pe(3,"div",3,4),x(),Z(5,Sct,2,1,"button",5),pe(6,"hr",6),_(7,"div",7)(8,"div",8),pe(9,"div",9),_(10,"div",10)(11,"div",11)(12,"button",12),ye("click",function(){return r.loadData("")}),pe(13,"img",13),x(),_(14,"button",12),ye("click",function(){return r.loadData(r.prevCursor)}),pe(15,"img",14),x(),_(16,"button",12),ye("click",function(){return r.loadData(r.nextCursor)}),pe(17,"img",15),x()()()()(),_(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),O(23,"ID"),x(),_(24,"th"),O(25,"Changeset"),x(),_(26,"th",20),O(27,"Update Time"),x(),Z(28,kct,2,0,"th",21),x()(),_(29,"tbody"),Z(30,Dct,3,0,"tr",22),Z(31,Oct,13,7,"ng-template",23),x()()()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(4),S("ngIf",r.updateAllowed()),w(7),S("disabled",0===r.walletLedger.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(12),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.walletLedger.length),w(1),S("ngForOf",r.walletLedger))},dependencies:[Ln,vn,po],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})}return t})(),Nct=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Fct(t,n){if(1&t&&(_(0,"ngb-alert",10),pe(1,"img",11),_(2,"h6",12),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Pct(t,n){1&t&&(_(0,"th",13),O(1,"Remove"),x())}function jct(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No friends found."),x()())}function Rct(t,n){1&t&&(_(0,"span"),O(1,"Friend (0)"),x())}function Lct(t,n){1&t&&(_(0,"span"),O(1,"Invite Sent (1)"),x())}function $ct(t,n){1&t&&(_(0,"span"),O(1,"Invite Received (2)"),x())}function Bct(t,n){1&t&&(_(0,"span"),O(1,"Blocked (3)"),x())}function Vct(t,n){if(1&t){const e=vt();_(0,"td",17)(1,"button",18),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteFriend(r,s,a))}),O(2,"Delete"),x()()}}function Hct(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o.user))}),O(2),x(),_(3,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o.user))}),O(4),x(),_(5,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o.user))}),Z(6,Rct,2,0,"span",8),Z(7,Lct,2,0,"span",8),Z(8,$ct,2,0,"span",8),Z(9,Bct,2,0,"span",8),x(),_(10,"td"),O(11),x(),Z(12,Vct,3,0,"td",16),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.user.id),w(2),bt(e.user.username),w(2),S("ngIf",0===e.state),w(1),S("ngIf",1===e.state),w(1),S("ngIf",2===e.state),w(1),S("ngIf",3===e.state),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed())}}let Uct=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;friends=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(Z(0,Fct,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),O(6,"User ID"),x(),_(7,"th"),O(8,"Username"),x(),_(9,"th",5),O(10,"State"),x(),_(11,"th",6),O(12,"Update Time"),x(),Z(13,Pct,2,0,"th",7),x()(),_(14,"tbody"),Z(15,jct,3,0,"tr",8),Z(16,Hct,13,8,"tr",9),x()()()),2&i&&(S("ngIf",r.error),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.friends.length),w(1),S("ngForOf",r.friends))},dependencies:[Ln,vn,po],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),zct=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Gct(t,n){if(1&t&&(_(0,"ngb-alert",10),pe(1,"img",11),_(2,"h6",12),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Wct(t,n){1&t&&(_(0,"th",13),O(1,"Remove"),x())}function qct(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No group membership found."),x()())}function Yct(t,n){1&t&&(_(0,"span"),O(1,"Superadmin (0)"),x())}function Xct(t,n){1&t&&(_(0,"span"),O(1,"Admin (1)"),x())}function Jct(t,n){1&t&&(_(0,"span"),O(1,"Member (2)"),x())}function Kct(t,n){1&t&&(_(0,"span"),O(1,"Join Request (3)"),x())}function Qct(t,n){1&t&&(_(0,"span"),O(1,"Banned (4)"),x())}function Zct(t,n){if(1&t){const e=vt();_(0,"td")(1,"button",16),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteGroupUser(r,s,a))}),O(2,"Delete"),x()()}}function eut(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(2),x(),_(3,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),Z(6,Yct,2,0,"span",8),Z(7,Xct,2,0,"span",8),Z(8,Jct,2,0,"span",8),Z(9,Kct,2,0,"span",8),Z(10,Qct,2,0,"span",8),x(),_(11,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(12),x(),Z(13,Zct,3,0,"td",8),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.group.id),w(2),bt(e.group.name),w(2),S("ngIf",0===e.state),w(1),S("ngIf",1===e.state),w(1),S("ngIf",2===e.state),w(1),S("ngIf",3===e.state),w(1),S("ngIf",4===e.state),w(2),bt(e.group.update_time),w(1),S("ngIf",i.deleteAllowed())}}let tut=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;groups=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(Z(0,Gct,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),O(6,"Group ID"),x(),_(7,"th"),O(8,"Name"),x(),_(9,"th",5),O(10,"State"),x(),_(11,"th",6),O(12,"Update Time"),x(),Z(13,Wct,2,0,"th",7),x()(),_(14,"tbody"),Z(15,qct,3,0,"tr",8),Z(16,eut,14,9,"tr",9),x()()()),2&i&&(S("ngIf",r.error),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.groups.length),w(1),S("ngForOf",r.groups))},dependencies:[Ln,vn,po],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),nut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const iut=["editor"];function rut(t,n){if(1&t&&(_(0,"ngb-alert",34),pe(1,"img",35),_(2,"h6",36),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function out(t,n){1&t&&(_(0,"ngb-alert",37),pe(1,"img",38),_(2,"h6",36),O(3,"Group was modified successfully."),x()()),2&t&&S("dismissible",!1)}function sut(t,n){1&t&&(_(0,"button",39),O(1,"Save"),x()),2&t&&S("disabled",$().updating)}const aut=function(t){return["/accounts",t]},lut=function(t){return{"is-invalid":t}};let cut=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";group;groupForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Co.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(iut,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(Z(0,rut,4,2,"ngb-alert",0),Z(1,out,4,1,"ngb-alert",1),_(2,"form",2),ye("ngSubmit",function(){return r.updateGroup()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),O(7,"Group ID"),x()(),pe(8,"input",7),x(),_(9,"div",4)(10,"div",5)(11,"label",8),O(12,"Creator ID"),x()(),_(13,"a",9),pe(14,"input",10),x()()(),_(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),O(19,"Name"),x()(),pe(20,"input",12),_(21,"div",13),O(22,"Name is required"),x()(),_(23,"div",4)(24,"div",5)(25,"label",14),O(26,"Description"),x()(),pe(27,"input",15),x()(),_(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),O(32,"Avatar URL"),x()(),pe(33,"input",18),x(),_(34,"div",4)(35,"div",5)(36,"label",19),O(37,"Language"),x()(),pe(38,"input",20),x()(),_(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),O(43,"Members"),x()(),pe(44,"input",21),x(),_(45,"div",16)(46,"div",5)(47,"label",22),O(48,"Max Count"),x()(),pe(49,"input",23),x()(),_(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),O(54,"Open"),x()(),pe(55,"input",24),x()(),_(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),O(60,"Create Time"),x()(),pe(61,"input",27),x(),_(62,"div",4)(63,"div",5)(64,"label",28),O(65,"Update Time"),x()(),pe(66,"input",29),x()(),_(67,"div",30),pe(68,"div",31,32),x(),Z(70,sut,2,1,"button",33),x()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.groupForm),w(6),S("value",r.group.id),w(5),S("routerLink",sr(12,aut,r.group.creator_id)),w(1),S("value",r.group.creator_id),w(6),S("ngClass",sr(14,lut,r.f.name.dirty&&r.f.name.errors)),w(1),S("hidden",r.f.name.disabled||r.f.name.valid||r.f.name.pristine),w(23),S("value",r.group.edge_count),w(17),S("value",r.group.create_time),w(5),S("value",r.group.update_time),w(4),S("ngIf",r.updateAllowed()))},dependencies:[Ou,nm,vn,po,fa,Qs,OC,da,ha,Hf,js,Zs]})}return t})();function uut(t,n){if(1&t&&(_(0,"ngb-alert",13),pe(1,"img",14),_(2,"h6",15),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function dut(t,n){1&t&&(_(0,"span"),O(1,"Add by membership state"),x())}function hut(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$(2);w(1),bt(e.activeState)}}function fut(t,n){if(1&t){const e=vt();_(0,"button",20),ye("click",function(){const o=Be(e).$implicit;return Ve($(2).activeState=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function put(t,n){if(1&t&&(_(0,"div",16)(1,"button",17),Z(2,dut,2,0,"span",11),Z(3,hut,2,1,"span",11),x(),_(4,"div",18),Z(5,fut,2,1,"button",19),x()()),2&t){const e=$();w(2),S("ngIf",!e.activeState||""===e.activeState),w(1),S("ngIf",e.activeState&&""!==e.activeState),w(2),S("ngForOf",e.states)}}function mut(t,n){if(1&t){const e=vt();_(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),pe(5,"input",26),_(6,"div",27)(7,"div",28)(8,"button",29),ye("click",function(){return Be(e),Ve($().add())}),O(9,"Add"),x()()()()()()()()}if(2&t){const e=$();w(3),S("formGroup",e.addForm)}}function gut(t,n){1&t&&(_(0,"th",30),O(1,"Demote"),x())}function vut(t,n){1&t&&(_(0,"th",30),O(1,"Promote"),x())}function yut(t,n){1&t&&(_(0,"th",31),O(1,"Remove"),x())}function _ut(t,n){1&t&&(_(0,"tr")(1,"td",32),O(2,"No group membership found."),x()())}function but(t,n){1&t&&(_(0,"span"),O(1,"Superadmin (0)"),x())}function xut(t,n){1&t&&(_(0,"span"),O(1,"Admin (1)"),x())}function wut(t,n){1&t&&(_(0,"span"),O(1,"Member (2)"),x())}function Cut(t,n){1&t&&(_(0,"span"),O(1,"Join Request (3)"),x())}function Sut(t,n){1&t&&(_(0,"span"),O(1,"Banned (4)"),x())}function kut(t,n){if(1&t){const e=vt();_(0,"td",36)(1,"button",37),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().demoteGroupUser(r,s,a))}),st(),_(2,"svg",38),pe(3,"path",39),x()()()}}function Dut(t,n){if(1&t){const e=vt();_(0,"td",36)(1,"button",37),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().promoteGroupUser(r,s,a))}),st(),_(2,"svg",40),pe(3,"path",41),x()()()}}function Tut(t,n){if(1&t){const e=vt();_(0,"td",42)(1,"button",43),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteGroupUser(r,s,a))}),O(2,"Delete"),x()()}}function Eut(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(2),x(),_(3,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),Z(6,but,2,0,"span",11),Z(7,xut,2,0,"span",11),Z(8,wut,2,0,"span",11),Z(9,Cut,2,0,"span",11),Z(10,Sut,2,0,"span",11),x(),_(11,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(12),x(),Z(13,kut,4,0,"td",34),Z(14,Dut,4,0,"td",34),Z(15,Tut,3,0,"td",35),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.user.id),w(2),bt(e.user.username),w(2),S("ngIf",0===e.state),w(1),S("ngIf",1===e.state),w(1),S("ngIf",2===e.state),w(1),S("ngIf",3===e.state),w(1),S("ngIf",4===e.state),w(2),bt(e.user.update_time),w(1),S("ngIf",i.editionAllowed()),w(1),S("ngIf",i.editionAllowed()),w(1),S("ngIf",i.editionAllowed())}}let Aut=(()=>{class t{route;router;consoleService;formBuilder;authService;error="";group;members=[];activeState="Add Member";states=["Add Member","Join"];addForm;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(Na),de(zo))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(Z(0,uut,4,2,"ngb-alert",0),Z(1,put,6,3,"div",1),Z(2,mut,10,1,"div",2),_(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),O(8,"User ID"),x(),_(9,"th"),O(10,"Name"),x(),_(11,"th",7),O(12,"State"),x(),_(13,"th",8),O(14,"Update Time"),x(),Z(15,gut,2,0,"th",9),Z(16,vut,2,0,"th",9),Z(17,yut,2,0,"th",10),x()(),_(18,"tbody"),Z(19,_ut,3,0,"tr",11),Z(20,Eut,16,11,"tr",12),x()()()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",!r.group.open&&r.editionAllowed()),w(1),S("ngIf",r.editionAllowed()),w(13),S("ngIf",r.editionAllowed()),w(1),S("ngIf",r.editionAllowed()),w(1),S("ngIf",r.editionAllowed()),w(2),S("ngIf",0===r.members.length),w(1),S("ngForOf",r.members))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Mut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Out(t,n){if(1&t&&(_(0,"ngb-alert",28),pe(1,"img",29),_(2,"h6",30),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Iut(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.activeType)}}function Nut(t,n){if(1&t){const e=vt();_(0,"button",31),ye("click",function(){const o=Be(e).$implicit;return Ve($().activeType=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function Fut(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.activeNode)}}function Put(t,n){if(1&t){const e=vt();_(0,"button",31),ye("click",function(){const o=Be(e).$implicit;return Ve($().activeNode=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function jut(t,n){1&t&&(_(0,"tr")(1,"td",32),O(2,"No realtime matches were found."),x()())}function Rut(t,n){1&t&&pe(0,"div",40)}function Lut(t,n){1&t&&pe(0,"div",41)}function $ut(t,n){if(1&t){const e=vt();_(0,"div",37),ye("click",function(){Be(e);const r=$(),o=r.index,s=r.$implicit,a=$();return a.getMatchState(o,s),Ve(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),Z(1,Rut,1,0,"div",38),Z(2,Lut,1,0,"div",39),x()}if(2&t){const e=$().index,i=$();w(1),S("ngIf",!i.matchStatesOpen[e]),w(1),S("ngIf",i.matchStatesOpen[e])}}function But(t,n){1&t&&pe(0,"div",42)}function Vut(t,n){1&t&&(_(0,"span"),O(1,"Yes"),x())}function Hut(t,n){1&t&&(_(0,"span"),O(1,"No"),x())}function Uut(t,n){1&t&&pe(0,"img",51)}function zut(t,n){if(1&t&&(_(0,"div")(1,"small")(2,"b"),O(3,"Current Tick"),x()(),_(4,"pre",47)(5,"small"),O(6),x()(),_(7,"small")(8,"b"),O(9,"Match State"),x()(),_(10,"pre",47)(11,"small"),O(12),x()()()),2&t){const e=$(2).index,i=$();w(6),bt(i.matchStates[e].tick),w(6),bt(i.matchStates[e].state)}}function Gut(t,n){1&t&&pe(0,"img",51)}function Wut(t,n){if(1&t&&(_(0,"pre",47)(1,"small"),O(2),x()()),2&t){const e=$(2).index,i=$();w(2),bt(i.getMatchPresencesString(i.matchStates[e].presences))}}function qut(t,n){if(1&t&&(_(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),O(6,"Match Label"),x()(),_(7,"pre",47)(8,"small"),O(9),x()()(),_(10,"div",48),Z(11,Uut,1,0,"img",49),Z(12,zut,13,2,"div",7),x(),_(13,"div",48)(14,"small")(15,"b"),O(16,"Match Presences"),x()(),Z(17,Gut,1,0,"img",49),Z(18,Wut,3,1,"pre",50),x()()()()),2&t){const e=$(),i=e.$implicit,r=e.index,o=$();w(9),bt(i.api_match.label),w(2),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),S("ngIf",null!==o.matchStates[r]),w(5),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),S("ngIf",null!==o.matchStates[r])}}function Yut(t,n){if(1&t&&(_(0,"tr")(1,"td"),Z(2,$ut,3,2,"div",33),Z(3,But,1,0,"div",34),O(4),x(),_(5,"td"),O(6),x(),_(7,"td",35),Z(8,Vut,2,0,"span",7),Z(9,Hut,2,0,"span",7),x(),_(10,"td"),O(11),x(),_(12,"td"),O(13),x(),_(14,"td"),O(15),x()(),Z(16,qut,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=$();w(2),S("ngIf",i.api_match.authoritative),w(1),S("ngIf",!i.api_match.authoritative),w(1),mn(" ",i.api_match.match_id," "),w(2),bt(i.api_match.size),w(2),S("ngIf",i.api_match.authoritative),w(1),S("ngIf",!i.api_match.authoritative),w(2),bt(i.node),w(2),bt(i.api_match.handler_name),w(2),bt(i.api_match.authoritative?i.api_match.tick_rate:"-"),w(1),S("ngIf",r.matchStatesOpen[e])}}let Xut=(()=>{class t{route;router;formBuilder;consoleService;error="";matches=[];matchStates=[];matchStatesOpen=[];updated=!1;searchForm1;searchForm2;searchForm3;type;activeType="All";types=["All","Authoritative","Relayed"];activeNode="All Nodes";nodes=["All Nodes"];constructor(e,i,r,o){this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));const i=e.get("type");this.type=Number(i);const r=e.get("node");if(this.route.data.subscribe(o=>{o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1===this.type||2===this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,sve(this.consoleService,e,0===e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(Na),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Active Matches"),x(),_(2,"h6",1),O(3),x(),Z(4,Out,4,2,"ngb-alert",2),_(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),Z(9,Iut,2,1,"span",7),x(),_(10,"div",8),Z(11,Nut,2,1,"button",9),x()()(),_(12,"div",10)(13,"button",11),ye("click",function(){return r.search()}),O(14,"Search"),x()()(),_(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),ye("ngSubmit",function(){return r.search()}),_(19,"div",16),pe(20,"input",17),x()(),_(21,"form",15),ye("ngSubmit",function(){return r.search()}),_(22,"div",16),pe(23,"input",17),x()(),_(24,"form",15),ye("ngSubmit",function(){return r.search()}),_(25,"div",16),pe(26,"input",18),_(27,"div",10)(28,"div",5)(29,"button",19),Z(30,Fut,2,1,"span",7),x(),_(31,"div",8),Z(32,Put,2,1,"button",9),x()()()()()()()(),_(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),O(39,"Match ID"),x()(),_(40,"th",23),O(41,"Presence Count"),x(),_(42,"th",24),O(43,"Authoritative"),x(),_(44,"th",24),O(45,"Node"),x(),_(46,"th",25),O(47,"Handler Name"),x(),_(48,"th",26),O(49,"Tick Rate"),x()()(),_(50,"tbody"),Z(51,jut,3,0,"tr",7),Z(52,Yut,17,10,"ng-template",27),x()()()),2&i&&(w(3),mn("",r.matches.length," running matches found."),w(1),S("ngIf",r.error),w(5),S("ngIf",r.activeType&&""!==r.activeType),w(2),S("ngForOf",r.types),w(7),S("hidden","All"!==r.activeType)("formGroup",r.searchForm1),w(3),S("hidden","Relayed"!==r.activeType)("formGroup",r.searchForm2),w(3),S("hidden","Authoritative"!==r.activeType)("formGroup",r.searchForm3),w(6),S("ngIf",r.activeNode&&""!==r.activeNode),w(2),S("ngForOf",r.nodes),w(6),jn("pl-3",r.matches.length>0),w(13),S("ngIf",0===r.matches.length),w(1),S("ngForOf",r.matches))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Jut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));return sve(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))))}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sve(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return Rn(null)}let Kut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(et(r=>Rn(r.nodes.map(o=>o.name)))).pipe(Ll(r=>(e.data={...e.data,error:r},Rn([]))))}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qut(t,n){if(1&t&&(_(0,"ngb-alert",25),pe(1,"img",26),_(2,"h6",27),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying groups: ",e.error,"")}}function Zut(t,n){1&t&&(_(0,"th",28),O(1,"Remove"),x())}function edt(t,n){1&t&&(_(0,"tr")(1,"td",29),O(2,"No groups found - change the filter criteria or add new user groups."),x()())}function tdt(t,n){1&t&&pe(0,"td")}function ndt(t,n){if(1&t){const e=vt();_(0,"td",32)(1,"button",33),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteGroup(r,s,a))}),O(2,"Delete"),x()()}}function idt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",30),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewGroup(o))}),O(2),x(),_(3,"td",30),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewGroup(o))}),O(4),x(),_(5,"td",30),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewGroup(o))}),O(6),x(),Z(7,tdt,1,0,"td",23),Z(8,ndt,3,0,"td",31),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.id),w(2),bt(e.name),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let rdt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";groupsCount=0;groups=[];nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Groups"),x(),_(2,"h6",1),O(3),x(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return r.search(0)}),_(8,"div",6),pe(9,"input",7),_(10,"div",8)(11,"div",9)(12,"button",10),ye("click",function(){return r.search(0)}),O(13,"Search"),x()()()()()(),_(14,"div",11)(15,"div",12)(16,"button",13),ye("click",function(){return r.search(0)}),pe(17,"img",14),x(),_(18,"button",13),ye("click",function(){return r.search(1)}),pe(19,"img",15),x()()()()(),Z(20,Qut,4,2,"ngb-alert",16),_(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),O(26,"Group ID"),x(),_(27,"th"),O(28,"Name"),x(),_(29,"th",21),O(30,"Last Update"),x(),Z(31,Zut,2,0,"th",22),x()(),_(32,"tbody"),Z(33,edt,3,0,"tr",23),Z(34,idt,9,5,"tr",24),x()()()),2&i&&(w(3),mn("",r.groupsCount," groups found."),w(4),S("formGroup",r.searchForm),w(9),S("disabled",0===r.groups.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(11),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.groups.length),w(1),S("ngForOf",r.groups))},dependencies:[Ln,vn,po,fa,Qs,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),odt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sdt(t,n){if(1&t){const e=vt();_(0,"button",13),ye("click",function(r){return Be(e),Ve($().exportGroup(r))}),pe(1,"img",14),O(2,"Export"),x()}}function adt(t,n){if(1&t){const e=vt();_(0,"button",15),ye("click",function(r){return Be(e),Ve($().deleteGroup(r,!1))}),pe(1,"img",16),O(2,"Delete"),x()}}function ldt(t,n){if(1&t&&(_(0,"ngb-alert",17),pe(1,"img",18),_(2,"h6",19),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}const cdt=function(t,n){return["/groups",t,n]};function udt(t,n){if(1&t&&(_(0,"div"),sc(1,20),_(2,"a",21),O(3),x(),ac(),x()),2&t){const e=n.$implicit,i=$();w(1),S("ngbNavItem",e.path),w(1),S("routerLink",Mr(3,cdt,i.group.id,e.path)),w(1),bt(e.label)}}const ddt=function(){return["/groups"]};let hdt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;group;error="";views=[{label:"Details",path:"details"},{label:"Members",path:"members"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,qI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Group"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),O(7,"Group"),x()(),_(8,"li",6),O(9),x()()(),_(10,"div"),Z(11,sdt,3,0,"button",7),Z(12,adt,3,0,"button",8),x()(),Z(13,ldt,4,2,"ngb-alert",9),_(14,"nav",10,11),Z(16,udt,4,6,"div",12),x(),pe(17,"router-outlet")),2&i&&(w(6),S("routerLink",ml(6,ddt)),w(3),bt(r.group.id),w(2),S("ngIf",r.exportAllowed()),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.error),w(3),S("ngForOf",r.views))},dependencies:[cm,Ou,Ny,Ln,vn,po,zd,Yh,r_,Yf],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),fdt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function pdt(t,n){if(1&t){const e=vt();_(0,"button",12),ye("click",function(r){return Be(e),Ve($().deleteLeaderboard(r))}),pe(1,"img",13),O(2,"Delete Leaderboard"),x()}}function mdt(t,n){if(1&t&&(_(0,"ngb-alert",14),pe(1,"img",15),_(2,"h6",16),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}const gdt=function(t,n){return["/leaderboards",t,n]};function vdt(t,n){if(1&t&&(_(0,"div"),sc(1,17),_(2,"a",18),O(3),x(),ac(),x()),2&t){const e=n.$implicit,i=$();w(1),S("ngbNavItem",e.path),w(1),S("routerLink",Mr(3,gdt,i.leaderboard.id,e.path)),w(1),bt(e.label)}}const ydt=function(){return["/leaderboards"]};let _dt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;leaderboard;error="";views=[{label:"Details",path:"details"},{label:"Records",path:"records"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Leaderboard"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),O(7,"Leaderboards"),x()(),_(8,"li",6),O(9),x()()(),_(10,"div"),Z(11,pdt,3,0,"button",7),x()(),Z(12,mdt,4,2,"ngb-alert",8),_(13,"nav",9,10),Z(15,vdt,4,6,"div",11),x(),pe(16,"router-outlet")),2&i&&(w(6),S("routerLink",ml(5,ydt)),w(3),bt(r.leaderboard.id),w(2),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.error),w(3),S("ngForOf",r.views))},dependencies:[cm,Ou,Ny,Ln,vn,po,zd,Yh,r_,Yf],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),bdt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const xdt=["editor"];function wdt(t,n){if(1&t&&(_(0,"ngb-alert",24),pe(1,"img",25),_(2,"h6",26),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Cdt(t,n){if(1&t&&(_(0,"div",27)(1,"h6"),O(2,"Tournament"),x(),pe(3,"hr",28),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),O(8,"Title"),x()(),pe(9,"input",30),x(),_(10,"div",3)(11,"div",4)(12,"label",31),O(13,"Description"),x()(),pe(14,"input",32),x()(),_(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),O(19,"Category"),x()(),pe(20,"input",34),x(),_(21,"div",3)(22,"div",4)(23,"label",35),O(24,"Max Num Score"),x()(),pe(25,"input",36),x()(),_(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),O(30,"Size"),x()(),pe(31,"input",38),x(),_(32,"div",3)(33,"div",4)(34,"label",39),O(35,"Max Size"),x()(),pe(36,"input",40),x()(),_(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),O(41,"Duration"),x()(),pe(42,"input",42),x(),_(43,"div",3)(44,"div",4)(45,"label",43),O(46,"Join Required"),x()(),pe(47,"input",44),x()(),_(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),O(52,"Start Time"),x()(),pe(53,"input",46),x(),_(54,"div",3)(55,"div",4)(56,"label",47),O(57,"End Time"),x()(),pe(58,"input",48),x()(),_(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),O(63,"Start Active"),x()(),pe(64,"input",50),x(),_(65,"div",3)(66,"div",4)(67,"label",51),O(68,"End Active"),x()(),pe(69,"input",52),x()()()),2&t){const e=$();w(9),S("value",e.leaderboard.title),w(5),S("value",e.leaderboard.description),w(6),S("value",e.leaderboard.category),w(5),S("value",e.leaderboard.max_num_score),w(6),S("value",e.leaderboard.size),w(5),S("value",e.leaderboard.max_size),w(6),S("value",e.leaderboard.duration),w(5),S("value",e.leaderboard.join_required),w(6),S("value",e.leaderboard.start_time),w(5),S("value",e.leaderboard.end_time),w(6),S("value",e.leaderboard.start_active),w(5),S("value",e.leaderboard.end_active)}}let Sdt=(()=>{class t{route;editor;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};jsonEditor;leaderboard;error="";constructor(e){this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}static \u0275fac=function(i){return new(i||t)(de(Pr))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(xdt,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(i,r){1&i&&(Z(0,wdt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),O(6,"ID"),x()(),pe(7,"input",6),x(),_(8,"div",3)(9,"div",4)(10,"label",7),O(11,"Authoritative"),x()(),pe(12,"input",8),x()(),_(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),O(17,"Sort Order"),x()(),pe(18,"input",10),x(),_(19,"div",3)(20,"div",4)(21,"label",11),O(22,"Operator"),x()(),pe(23,"input",12),x()(),_(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),O(28,"Reset Schedule"),x()(),pe(29,"input",14),x(),_(30,"div",3)(31,"div",4)(32,"label",15),O(33,"Create Time"),x()(),pe(34,"input",16),x()(),_(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),O(39,"Prev Reset"),x()(),pe(40,"input",18),x(),_(41,"div",3)(42,"div",4)(43,"label",15),O(44,"Next Reset"),x()(),pe(45,"input",19),x()()(),Z(46,Cdt,70,12,"div",20),_(47,"div",21),pe(48,"div",22,23),x()),2&i&&(S("ngIf",r.error),w(7),S("value",r.leaderboard.id),w(5),S("value",r.leaderboard.authoritative),w(6),S("value",r.orderString[r.leaderboard.sort_order]),w(5),S("value",r.operatorString[r.leaderboard.operator]),w(6),S("value",r.leaderboard.reset_schedule),w(5),S("value",r.leaderboard.create_time),w(6),S("value",r.leaderboard.prev_reset),w(5),S("value",r.leaderboard.next_reset),w(1),S("ngIf",r.leaderboard.tournament))},dependencies:[vn,po],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})();function kdt(t,n){if(1&t&&(_(0,"ngb-alert",19),pe(1,"img",20),_(2,"h6",21),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Ddt(t,n){1&t&&(_(0,"th",22),O(1,"Remove"),x())}function Tdt(t,n){1&t&&(_(0,"tr")(1,"td",23),O(2,"No records found."),x()())}function Edt(t,n){1&t&&pe(0,"div",28)}function Adt(t,n){1&t&&pe(0,"div",29)}function Mdt(t,n){if(1&t){const e=vt();_(0,"td",30)(1,"button",31),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteRecord(r,s,a))}),O(2,"Delete"),x()()}}function Odt(t,n){if(1&t&&(_(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),O(4),x()()()()),2&t){const e=$().$implicit;w(4),bt(e.metadata)}}function Idt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",24),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),Z(3,Edt,1,0,"div",25),Z(4,Adt,1,0,"div",26),x(),O(5),x(),_(6,"td"),O(7),x(),_(8,"td"),O(9),x(),_(10,"td"),O(11),x(),_(12,"td"),O(13),x(),_(14,"td"),O(15),x(),_(16,"td"),O(17),x(),Z(18,Mdt,3,0,"td",27),x(),Z(19,Odt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.recordsMetadataOpen[e]),w(1),S("ngIf",r.recordsMetadataOpen[e]),w(1),mn(" ",i.owner_id," "),w(2),bt(i.username),w(2),bt(i.score),w(2),bt(i.subscore),w(2),bt(i.rank),w(2),bt(i.num_score),w(2),bt(i.expiry_time?i.expiry_time:"-"),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.recordsMetadataOpen[e])}}let Ndt=(()=>{class t{route;consoleService;authService;deleteConfirmService;error="";leaderboard;records=[];recordsMetadataOpen=[];nextCursor="";prevCursor="";constructor(e,i,r,o){this.route=e,this.consoleService=i,this.authService=r,this.deleteConfirmService=o}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(Z(0,kdt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),pe(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return r.loadRecords(0)}),pe(7,"img",7),x(),_(8,"button",6),ye("click",function(){return r.loadRecords(-1)}),pe(9,"img",8),x(),_(10,"button",6),ye("click",function(){return r.loadRecords(1)}),pe(11,"img",9),x()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),O(17,"Owner ID"),x(),_(18,"th"),O(19,"Username"),x(),_(20,"th",14),O(21,"Score"),x(),_(22,"th",14),O(23,"Subscore"),x(),_(24,"th",14),O(25,"Rank"),x(),_(26,"th",14),O(27,"No. of scores"),x(),_(28,"th",15),O(29,"Expiry Time"),x(),Z(30,Ddt,2,0,"th",16),x()(),_(31,"tbody"),Z(32,Tdt,3,0,"tr",17),Z(33,Idt,20,11,"ng-template",18),x()()()),2&i&&(S("ngIf",r.error),w(6),S("disabled",0===r.records.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(20),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.records.length),w(1),S("ngForOf",r.records))},dependencies:[Ln,vn,po]})}return t})(),Fdt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Pdt=["editorReq"],jdt=["editorVars"],Rdt=["editorRes"];function Ldt(t,n){if(1&t&&(_(0,"ngb-alert",27),pe(1,"img",28),_(2,"h6",29),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error invoking RPC call: ",e.error,"")}}function $dt(t,n){if(1&t&&(_(0,"option",30),O(1),x()),2&t){const e=n.$implicit;Ph("value",e.method),w(1),bt(e.method)}}function Bdt(t,n){if(1&t&&(_(0,"option",30),O(1),x()),2&t){const e=n.$implicit;Ph("value",e.method),w(1),bt(e.method)}}function Vdt(t,n){if(1&t){const e=vt();_(0,"button",31),ye("click",function(){return Be(e),Ve($().addSessionVars())}),O(1,"Add Session Variables"),x()}}let Hdt=(()=>{class t{route;router;consoleService;formBuilder;editorReq;editorVars;editorRes;jsonEditorReq;jsonEditorVars;jsonEditorRes;error="";rpcEndpoints=[];endpoints=[];endpointCallForm;addVars=!1;constructor(e,i,r,o){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Co.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditorReq=new Rp({target:this.editorReq.nativeElement,props:{mode:Lo.text,readOnly:!0}}),this.jsonEditorVars=new Rp({target:this.editorVars.nativeElement,props:{mode:Lo.text}}),this.jsonEditorRes=new Rp({target:this.editorRes.nativeElement,props:{mode:Lo.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=Zm(this.jsonEditorReq.get()).text}catch(s){return void(this.error=s)}let i={};try{const s=Zm(this.jsonEditorVars.get()).text;if(""!==s){const a=JSON.parse(s);Object.keys(a).forEach(l=>{if("string"!=typeof l)throw new Error(`Invalid session variables: ${l} must be a string`);if("string"!=typeof a[l])throw new Error(`Invalid session variables: ${a[l]} must be a string`)}),i=a}}catch(s){return void(this.error=s)}const r={user_id:this.f.user_id.value,body:e,session_vars:i};let o=null;o=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,r):this.consoleService.callApiEndpoint("",this.f.method.value,r),o.subscribe(s=>{if(s.error_message&&""!==s.error_message)this.jsonEditorRes.set({json:s.error_message});else{e="";try{e=""===s.body?s.body:JSON.stringify(JSON.parse(s.body),null,2)}catch(a){return void(this.error=a)}this.jsonEditorRes.set({text:e})}},s=>{this.jsonEditorRes.set({text:""}),this.error=s})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditorReq){if(!e||""===e)return this.jsonEditorReq.set({text:""}),void this.jsonEditorReq.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditorReq.set({text:i}),this.jsonEditorReq.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}addSessionVars(){this.addVars=!0,this.jsonEditorVars.set({json:{"":"","":""}})}get f(){return this.endpointCallForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&(xo(Pdt,5),xo(jdt,5),xo(Rdt,5)),2&i){let o;wn(o=Cn())&&(r.editorReq=o.first),wn(o=Cn())&&(r.editorVars=o.first),wn(o=Cn())&&(r.editorRes=o.first)}},decls:43,vars:8,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","btn btn-primary","type","button",3,"click",4,"ngIf"],[1,"row","mb-3",3,"hidden"],[1,"col-md-6","py-3"],[1,"text-muted","pt-2"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","200px"],["editorVars",""],[1,"row","mb-3"],[1,"col-lg-6","py-3"],[2,"height","500px"],["editorReq",""],["editorRes",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"API Explorer"),x(),Z(2,Ldt,4,2,"ngb-alert",1),_(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),ye("ngSubmit",function(){return r.sendRequest()}),_(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),O(11,"Select Endpoint"),x(),Z(12,$dt,2,2,"option",10),_(13,"option",11),O(14,"----"),x(),Z(15,Bdt,2,2,"option",10),x()(),pe(16,"input",12),_(17,"div",13)(18,"button",14),O(19,"Send Request"),x()()()()()()(),Z(20,Vdt,2,0,"button",15),_(21,"div",16)(22,"div",17)(23,"h5"),O(24,"Session Vars"),x(),_(25,"div",18),O(26,"Add variables as object of string to string key-value pairs."),x(),_(27,"div",19),pe(28,"div",20,21),x()()(),_(30,"div",22)(31,"div",23)(32,"h5"),O(33,"Request Body"),x(),_(34,"div",19),pe(35,"div",24,25),x()(),_(37,"div",23)(38,"h5"),O(39,"Response"),x(),_(40,"div",19),pe(41,"div",24,26),x()()()),2&i&&(w(2),S("ngIf",r.error),w(4),S("formGroup",r.endpointCallForm),w(4),S("value",""),w(2),S("ngForOf",r.rpcEndpoints),w(3),S("ngForOf",r.endpoints),w(3),S("disabled",r.f.method.invalid),w(2),S("ngIf",!r.addVars),w(1),S("hidden",!r.addVars))},dependencies:[Ln,vn,po,fa,HC,UC,Qs,kv,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})}return t})(),Udt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function zdt(t,n){if(1&t&&(_(0,"ngb-alert",16),pe(1,"img",17),_(2,"h6",18),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while processing request: ",e.error,"")}}function Gdt(t,n){1&t&&(_(0,"th"),O(1,"User ID"),x())}function Wdt(t,n){1&t&&pe(0,"div",23)}function qdt(t,n){1&t&&pe(0,"div",24)}function Ydt(t,n){if(1&t&&(_(0,"td"),O(1),x()),2&t){const e=$().$implicit;w(1),bt(e.user_id)}}function Xdt(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),O(6,"Provider Response"),x()()(),_(7,"div")(8,"pre",28)(9,"small"),O(10),x()()()()()()),2&t){const e=$().$implicit;w(10),bt(e.provider_response)}}function Jdt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),Z(3,Wdt,1,0,"div",20),Z(4,qdt,1,0,"div",21),x(),O(5),x(),Z(6,Ydt,2,1,"td",13),_(7,"td"),O(8),x(),_(9,"td"),O(10),x(),_(11,"td"),O(12),x(),_(13,"td"),O(14),x(),_(15,"td"),O(16),x()(),Z(17,Xdt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.purchasesRowsOpen[e]),w(1),S("ngIf",r.purchasesRowsOpen[e]),w(1),mn(" ",i.transaction_id," "),w(1),S("ngIf",!r.userId),w(2),bt(i.product_id),w(2),bt(r.getStoreText(i.store)),w(2),bt(i.purchase_time),w(2),bt(i.create_time),w(2),bt(r.getRefundText(i.refund_time)),w(1),S("ngIf",r.purchasesRowsOpen[e])}}function Kdt(t,n){1&t&&(_(0,"tr")(1,"td",29),O(2,"No purchases were found."),x()())}let ave=(()=>{class t{route;consoleService;purchases=[];purchasesRowsOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;transactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.route.data.subscribe(i=>{this.purchases=i[0].validated_purchases,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.transactionId.firstChange||(this.transactionId?(this.transactionId=this.transactionId.trim(),this.consoleService.getPurchase("",this.transactionId).subscribe(i=>{this.purchases=[i]},i=>{this.error=i})):""===this.transactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listPurchases("",this.userId,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(zy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["app-purchases"]],inputs:{transactionId:["transaction_id","transactionId"]},features:[Yn],decls:32,vars:7,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[4,"ngIf"],[2,"width","180px"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","6"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","6",1,"text-muted"]],template:function(i,r){1&i&&(Z(0,zdt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),pe(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return r.loadData("")}),pe(7,"img",7),x(),_(8,"button",6),ye("click",function(){return r.loadData(r.prevCursor)}),pe(9,"img",8),x(),_(10,"button",6),ye("click",function(){return r.loadData(r.nextCursor)}),pe(11,"img",9),x()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),O(17,"Transaction ID"),x(),Z(18,Gdt,2,0,"th",13),_(19,"th"),O(20,"Product ID"),x(),_(21,"th"),O(22,"Store"),x(),_(23,"th",14),O(24,"Purchase Time"),x(),_(25,"th",14),O(26,"Create Time"),x(),_(27,"th",14),O(28,"Refund Time"),x()()(),_(29,"tbody"),Z(30,Jdt,18,10,"ng-template",15),Z(31,Kdt,3,0,"tr",13),x()()()),2&i&&(S("ngIf",r.error),w(6),S("disabled",0===r.purchases.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(8),S("ngIf",!r.userId),w(12),S("ngForOf",r.purchases),w(1),S("ngIf",0===r.purchases.length))},dependencies:[Ln,vn,po]})}return t})(),lve=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listPurchases("",r,100,"")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qdt(t,n){1&t&&(_(0,"span"),O(1,"Filter by type"),x())}function Zdt(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.activeFilter)}}function eht(t,n){if(1&t){const e=vt();_(0,"button",39),ye("click",function(){const o=Be(e).$implicit;return Ve($().activeFilter=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function tht(t,n){if(1&t&&(_(0,"h6"),O(1),x()),2&t){const e=$();w(1),mn("Showing results for chat room label: ",e.f1.label.value,"")}}const nht=function(t){return["/groups",t]};function iht(t,n){if(1&t&&(_(0,"h6"),O(1,"Showing results for group ID: "),_(2,"a",40),O(3),x()()),2&t){const e=$();w(2),S("routerLink",sr(2,nht,e.route.snapshot.queryParamMap.get("group_id"))),w(1),bt(e.f2.group_id.value)}}const cve=function(t){return["/accounts",t]};function rht(t,n){if(1&t&&(_(0,"h6"),O(1,"Showing results for user IDs: "),_(2,"a",40),O(3),x(),O(4,", "),_(5,"a",40),O(6),x()()),2&t){const e=$();w(2),S("routerLink",sr(4,cve,e.route.snapshot.queryParamMap.get("user_id_one"))),w(1),bt(e.f3.user_id_one.value),w(2),S("routerLink",sr(6,cve,e.route.snapshot.queryParamMap.get("user_id_two"))),w(1),bt(e.f3.user_id_two.value)}}function oht(t,n){if(1&t&&(_(0,"ngb-alert",41),pe(1,"img",42),_(2,"h6",43),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying messages: ",e.error,"")}}function sht(t,n){1&t&&(_(0,"th",44),O(1,"Remove"),x())}function aht(t,n){if(1&t&&(_(0,"tr")(1,"td",45),O(2,"No messages found."),x()()),2&t){const e=$();w(1),ut("colspan",e.deleteAllowed()?6:5)}}function lht(t,n){1&t&&pe(0,"div",54)}function cht(t,n){1&t&&pe(0,"div",55)}function uht(t,n){1&t&&pe(0,"td")}function dht(t,n){if(1&t){const e=vt();_(0,"td",56)(1,"button",57),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteMessage(r,s,a))}),O(2,"Delete"),x()()}}function hht(t,n){if(1&t&&(_(0,"tr",58)(1,"td"),O(2),x()()),2&t){const e=$().$implicit,i=$();w(1),ut("colspan",i.deleteAllowed()?6:5),w(1),mn(" ",e.content," ")}}function fht(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td"),O(2),x(),_(3,"td",46),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",47),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(6),x(),_(7,"td",48)(8,"div",49),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),Z(9,lht,1,0,"div",50),Z(10,cht,1,0,"div",51),x(),O(11),x(),_(12,"td"),O(13),x(),Z(14,uht,1,0,"td",3),Z(15,dht,3,0,"td",52),x(),Z(16,hht,3,2,"tr",53)}if(2&t){const e=n.$implicit,i=n.index,r=$();w(2),bt(e.code),w(2),bt(e.sender_id),w(2),bt(e.username),w(3),S("ngIf",!r.messageStatesOpen[i]),w(1),S("ngIf",r.messageStatesOpen[i]),w(1),mn(" ",e.content," "),w(2),bt(e.create_time),w(1),S("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),w(1),S("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),w(1),S("ngIf",r.messageStatesOpen[i])}}function pht(t,n){if(1&t&&(_(0,"ngb-alert",59),pe(1,"img",42),_(2,"h6",43),O(3,"Failed to delete data."),x(),_(4,"p",60),O(5),x()()),2&t){const e=$();S("dismissible",!1),w(5),bt(e.deleteError)}}function mht(t,n){if(1&t){const e=vt();_(0,"ngb-alert",61),ye("close",function(){return Be(e),Ve($().deleteSuccess=!1)}),pe(1,"img",62),_(2,"h6",43),O(3),x()()}if(2&t){const e=$();S("dismissible",!0),w(3),Ef("",e.totalDeleted," messages ",e.totalDeleted>0?"successfully":""," deleted.")}}function ght(t,n){if(1&t){const e=vt();_(0,"button",63),ye("click",function(){return Be(e),Ve($().deleteData())}),O(1,"Delete messages"),x()}2&t&&S("disabled",$().deleting)}let vht=(()=>{class t{route;router;consoleService;authService;formBuilder;modalService;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";messages=[];nextCursor="";searchForm1;searchForm2;searchForm3;type;confirmDeleteForm;deleteError="";deleteSuccess=!1;deleting=!1;totalDeleted=0;activeFilter="";filters=["Chat Room","Group Chat","Direct Chat"];messageStatesOpen=[];constructor(e,i,r,o,s,a,l){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.deleteConfirmService=l,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Co.compose([Co.required,Co.pattern("DELETE")])],numberValueControl:{title:"Choose how many days to retain:",id:"days"},days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");const i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2===this.type||3===this.type||4===this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(e=>{this.deleteError="",this.deleting=!0;const i=new Date,r=Number(e.days);i.setDate(i.getDate()-r),this.consoleService.deleteChannelMessages("",i.toISOString(),null).subscribe(o=>{this.totalDeleted=Number(o.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const s=this.route.snapshot.queryParamMap,a=s.get("type");let l=s.get("label");l||(l="0");const c=s.get("group_id"),u=s.get("user_id_one"),d=s.get("user_id_two");let h=s.get("cursor");h||(h=""),a&&this.updateMessages(Number(a),l,c,u,d,h)},o=>{this.deleting=!1,this.deleteError=o})},this.confirmDeleteForm,"Delete messages","Are you sure you want to delete all messages before retain days?")}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(f2),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:68,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Chat Messages"),x(),_(2,"div",1)(3,"button",2),Z(4,Qdt,2,0,"span",3),Z(5,Zdt,2,1,"span",3),x(),_(6,"div",4),Z(7,eht,2,1,"button",5),x()(),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),pe(13,"input",11),_(14,"div",12)(15,"div",13)(16,"button",14),ye("click",function(){return r.type=2,r.search(0)}),O(17,"Search"),x()()()()(),_(18,"form",9)(19,"div",10),pe(20,"input",15),_(21,"div",12)(22,"div",13)(23,"button",14),ye("click",function(){return r.type=3,r.search(0)}),O(24,"Search "),x()()()()(),_(25,"form",9)(26,"div",10),pe(27,"input",16),_(28,"div",12)(29,"span",17),ye("click",function(){return r.f3.user_id_one.setValue(r.systemUserId)}),pe(30,"img",18),x()(),pe(31,"input",19),_(32,"div",12)(33,"div",13)(34,"button",14),ye("click",function(){return r.type=4,r.search(0)}),O(35,"Search "),x()()()()()(),_(36,"div",20)(37,"div",21)(38,"button",22),ye("click",function(){return r.search(0)}),pe(39,"img",23),x(),_(40,"button",22),ye("click",function(){return r.search(1)}),pe(41,"img",24),x()()()()(),Z(42,tht,2,1,"h6",3),Z(43,iht,4,4,"h6",3),Z(44,rht,7,8,"h6",3),Z(45,oht,4,2,"ngb-alert",25),_(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),O(51,"Code"),x(),_(52,"th",30),O(53,"Sender ID"),x(),_(54,"th",31),O(55,"Username"),x(),_(56,"th"),O(57,"Content"),x(),_(58,"th",32),O(59,"Create Time"),x(),Z(60,sht,2,0,"th",33),x()(),_(61,"tbody"),Z(62,aht,3,1,"tr",3),Z(63,fht,17,10,"ng-template",34),x()()(),Z(64,pht,6,2,"ngb-alert",35),Z(65,mht,4,3,"ngb-alert",36),_(66,"div",37),Z(67,ght,2,1,"button",38),x()),2&i&&(w(4),S("ngIf",!r.activeFilter||""===r.activeFilter),w(1),S("ngIf",r.activeFilter&&""!==r.activeFilter),w(2),S("ngForOf",r.filters),w(4),S("hidden","Chat Room"!==r.activeFilter)("formGroup",r.searchForm1),w(7),S("hidden","Group Chat"!==r.activeFilter)("formGroup",r.searchForm2),w(7),S("hidden","Direct Chat"!==r.activeFilter)("formGroup",r.searchForm3),w(13),S("disabled",0===r.messages.length),w(2),S("disabled",""===r.nextCursor||null===r.nextCursor),w(2),S("ngIf",0!=r.messages.length&&""===r.error&&2==r.type),w(1),S("ngIf",0!=r.messages.length&&""===r.error&&3==r.type),w(1),S("ngIf",0!=r.messages.length&&""===r.error&&4==r.type),w(1),S("ngIf",r.error),w(15),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.messages.length),w(1),S("ngForOf",r.messages),w(1),S("ngIf",r.deleteError),w(1),S("ngIf",r.deleteSuccess),w(2),S("ngIf",r.deleteMessagesAllowed()))},dependencies:[Ou,Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})}return t})(),yht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))));default:return Rn(null)}}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function _ht(t,n){if(1&t&&(_(0,"ngb-alert",16),pe(1,"img",17),_(2,"h6",18),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while processing request: ",e.error,"")}}function bht(t,n){1&t&&pe(0,"div",23)}function xht(t,n){1&t&&pe(0,"div",24)}function wht(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),O(6,"Provider Response"),x()()(),_(7,"div")(8,"pre",28)(9,"small"),O(10),x()()(),_(11,"div",29)(12,"small")(13,"b"),O(14,"Provider Notification"),x()()(),_(15,"div")(16,"pre",28)(17,"small"),O(18),x()()()()()()),2&t){const e=$().$implicit;w(10),bt(e.provider_response),w(8),bt(e.provider_notification)}}function Cht(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.subscriptionsRowOpen[o]=!s.subscriptionsRowOpen[o])}),Z(3,bht,1,0,"div",20),Z(4,xht,1,0,"div",21),x(),O(5),x(),_(6,"td"),O(7),x(),_(8,"td"),O(9),x(),_(10,"td"),O(11),x(),_(12,"td"),O(13),x(),_(14,"td"),O(15),x(),_(16,"td"),O(17),x()(),Z(18,wht,19,2,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.subscriptionsRowOpen[e]),w(1),S("ngIf",r.subscriptionsRowOpen[e]),w(1),mn(" ",i.product_id," "),w(2),bt(i.original_transaction_id),w(2),bt(r.getStoreText(i.store)),w(2),bt(i.purchase_time),w(2),bt(i.expiry_time),w(2),bt(i.create_time),w(2),bt(r.getRefundText(i.refund_time)),w(1),S("ngIf",r.subscriptionsRowOpen[e])}}function Sht(t,n){1&t&&(_(0,"tr")(1,"td",30),O(2,"No subscriptions were found."),x()())}let uve=(()=>{class t{route;consoleService;subscriptions=[];subscriptionsRowOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;originalTransactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.userId=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(i=>{this.subscriptions=i[0].validated_subscriptions,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.originalTransactionId.firstChange||(this.originalTransactionId?(this.originalTransactionId=this.originalTransactionId.trim(),this.consoleService.getSubscription("",this.originalTransactionId).subscribe(i=>{this.subscriptions=[i]},i=>{this.error=i})):""===this.originalTransactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listSubscriptions("",this.userId,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.subscriptionsRowOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(zy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["app-subscriptions"]],inputs:{originalTransactionId:["original_transaction_id","originalTransactionId"]},features:[Yn],decls:33,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],[1,"pt-2"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(Z(0,_ht,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),pe(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return r.loadData("")}),pe(7,"img",7),x(),_(8,"button",6),ye("click",function(){return r.loadData(r.prevCursor)}),pe(9,"img",8),x(),_(10,"button",6),ye("click",function(){return r.loadData(r.nextCursor)}),pe(11,"img",9),x()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),O(17,"Product ID"),x(),_(18,"th"),O(19,"Original Transaction ID"),x(),_(20,"th"),O(21,"Store"),x(),_(22,"th",13),O(23,"Purchase Time"),x(),_(24,"th",13),O(25,"Expiry Time"),x(),_(26,"th",13),O(27,"Create Time"),x(),_(28,"th",13),O(29,"Refund Time"),x()()(),_(30,"tbody"),Z(31,Cht,19,10,"ng-template",14),Z(32,Sht,3,0,"tr",15),x()()()),2&i&&(S("ngIf",r.error),w(6),S("disabled",0===r.subscriptions.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(21),S("ngForOf",r.subscriptions),w(1),S("ngIf",0===r.subscriptions.length))},dependencies:[Ln,vn,po]})}return t})(),dve=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listSubscriptions("",r,100,"")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const kht=[{path:"",component:XPe,canActivate:[m3e],canActivateChild:[JPe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:sVe,resolve:[aVe]},{path:"config",component:$Ve,resolve:[BVe]},{path:"users",component:GVe,resolve:[WVe]},{path:"modules",component:sHe,resolve:[aHe]},{path:"storage",component:gHe,resolve:[vHe,yHe],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Elt,resolve:[Alt],pathMatch:"full"},{path:"leaderboards",component:$lt,resolve:[Blt]},{path:"leaderboards/:id",component:_dt,resolve:[bdt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:Sdt,resolve:[]},{path:"records",component:Ndt,resolve:[Fdt]}]},{path:"matches",component:Xut,resolve:[Jut,Kut]},{path:"groups",component:rdt,resolve:[odt]},{path:"groups/:id",component:hdt,resolve:[fdt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:cut,resolve:[]},{path:"members",component:Aut,resolve:[Mut],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Ylt,resolve:[Xlt]},{path:"accounts/:id",component:lct,resolve:[cct],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:mct,resolve:[]},{path:"authentication",component:bct,resolve:[]},{path:"wallet",component:Ict,resolve:[Nct]},{path:"friends",component:Uct,resolve:[zct]},{path:"groups",component:tut,resolve:[nut]},{path:"purchases",component:ave,resolve:[lve]},{path:"subscriptions",component:uve,resolve:[dve]}]},{path:"apiexplorer",component:Hdt,resolve:[Udt]},{path:"chat",component:vht,resolve:[yht]},{path:"purchases",component:(()=>{class t{formBuilder;transactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({transaction_id:[""]})}search(){this.transactionId=this.f.transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:12,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","transaction_id","placeholder","Search by transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Purchases"),x(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),ye("ngSubmit",function(){return r.search()}),_(6,"div",5),pe(7,"input",6),_(8,"div",7)(9,"button",8),ye("click",function(){return r.search()}),O(10,"Search"),x()()()()()()(),pe(11,"app-purchases",9)),2&i&&(w(5),S("formGroup",r.searchForm),w(6),S("transaction_id",r.transactionId))},dependencies:[fa,Qs,da,ha,js,Zs,ave],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[lve]},{path:"subscriptions",component:(()=>{class t{formBuilder;originalTransactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({original_transaction_id:[""]})}search(){this.originalTransactionId=this.f.original_transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:13,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","original_transaction_id","placeholder","Search by original_transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"original_transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Subscriptions"),x(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),ye("ngSubmit",function(){return r.search()}),_(6,"div",5),pe(7,"input",6),_(8,"div",7)(9,"div",8)(10,"button",9),ye("click",function(){return r.search()}),O(11,"Search"),x()()()()()()()(),pe(12,"app-subscriptions",10)),2&i&&(w(5),S("formGroup",r.searchForm),w(7),S("original_transaction_id",r.originalTransactionId))},dependencies:[fa,Qs,da,ha,js,Zs,uve],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[dve]}]},{path:"login",component:f3e,canActivate:[p3e]},{path:"**",redirectTo:""}];let Dht=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ki({type:t});static \u0275inj=wi({imports:[LV.forRoot(kht,{useHash:!0}),LV]})}return t})(),Tht=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Rt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(i,r){1&i&&pe(0,"router-outlet")},dependencies:[cm]})}return t})();new class Aht extends Vd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Oht=1;const Iht=Promise.resolve(),CT={};function hve(t){return t in CT&&(delete CT[t],!0)}const fve={setImmediate(t){const n=Oht++;return CT[n]=!0,Iht.then(()=>hve(n)&&t()),n},clearImmediate(t){hve(t)}};new class Fht extends Vd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=fve.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(fve.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const uft=new Vn("ng-select-selection-model");function dft(){return new hft}class hft{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}let fft=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[{provide:uft,useValue:dft}],imports:[Mf]}),t})(),pft=(()=>{class t{authenticationService;constructor(e){this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}static \u0275fac=function(i){return new(i||t)(gt(zo))};static \u0275prov=Et({token:t,factory:t.\u0275fac})}return t})(),mft=(()=>{class t{authenticationService;router;constructor(e,i){this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Ll(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),sm(r.error.message||r.statusText))))}static \u0275fac=function(i){return new(i||t)(gt(zo),gt(_r))};static \u0275prov=Et({token:t,factory:t.\u0275fac})}return t})(),gft=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ki({type:t,bootstrap:[Tht]});static \u0275inj=wi({providers:[u3e,jz,{provide:Y3,useValue:{host:document.location.origin,timeout:15e3}},{provide:W3,useClass:pft,multi:!0},{provide:W3,useClass:mft,multi:!0}],imports:[xVe,Dht,yM,$De,a3e,BPe,$9e,$Me.forRoot({apiKey:"",debug:!1,loadOnInitialization:!1}),BDe,jMe,PMe,fft]})}return t})();ISe().bootstrapModule(gft).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},343:(Yt,Dn)=>{"use strict";Dn.byteLength=function $e(A){var F=Ze(A),Ae=F[1];return 3*(F[0]+Ae)/4-Ae},Dn.toByteArray=function oe(A){var F,yn,ee=Ze(A),Ae=ee[0],Je=ee[1],St=new Ie(function ge(A,F,ee){return 3*(F+ee)/4-ee}(0,Ae,Je)),Ft=0,Gt=Je>0?Ae-4:Ae;for(yn=0;yn>16&255,St[Ft++]=F>>8&255,St[Ft++]=255&F;return 2===Je&&(F=nt[A.charCodeAt(yn)]<<2|nt[A.charCodeAt(yn+1)]>>4,St[Ft++]=255&F),1===Je&&(F=nt[A.charCodeAt(yn)]<<10|nt[A.charCodeAt(yn+1)]<<4|nt[A.charCodeAt(yn+2)]>>2,St[Ft++]=F>>8&255,St[Ft++]=255&F),St},Dn.fromByteArray=function T(A){for(var F,ee=A.length,Ae=ee%3,Je=[],Ft=0,Gt=ee-Ae;FtGt?Gt:Ft+16383));return 1===Ae?Je.push(ke[(F=A[ee-1])>>2]+ke[F<<4&63]+"=="):2===Ae&&Je.push(ke[(F=(A[ee-2]<<8)+A[ee-1])>>10]+ke[F>>4&63]+ke[F<<2&63]+"="),Je.join("")};for(var ke=[],nt=[],Ie=typeof Uint8Array<"u"?Uint8Array:Array,ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ze=0,be=ct.length;ze0)throw new Error("Invalid string. Length must be a multiple of 4");var ee=A.indexOf("=");return-1===ee&&(ee=F),[ee,ee===F?0:4-ee%4]}function ce(A){return ke[A>>18&63]+ke[A>>12&63]+ke[A>>6&63]+ke[63&A]}function se(A,F,ee){for(var Je=[],St=F;St{"use strict";var Ie=ke(343),ct=ke(461),ze="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;Dn.lW=ge,Dn.h2=50;var be=2147483647;function $e(De){if(De>be)throw new RangeError('The value "'+De+'" is invalid for option "size"');var Y=new Uint8Array(De);return Object.setPrototypeOf(Y,ge.prototype),Y}function ge(De,Y,Q){if("number"==typeof De){if("string"==typeof Y)throw new TypeError('The "string" argument must be of type string. Received type number');return T(De)}return oe(De,Y,Q)}function oe(De,Y,Q){if("string"==typeof De)return function A(De,Y){if(("string"!=typeof Y||""===Y)&&(Y="utf8"),!ge.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);var Q=0|Gt(De,Y),Ne=$e(Q),et=Ne.write(De,Y);return et!==Q&&(Ne=Ne.slice(0,et)),Ne}(De,Y);if(ArrayBuffer.isView(De))return function ee(De){if(la(De,Uint8Array)){var Y=new Uint8Array(De);return Ae(Y.buffer,Y.byteOffset,Y.byteLength)}return F(De)}(De);if(null==De)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof De);if(la(De,ArrayBuffer)||De&&la(De.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(la(De,SharedArrayBuffer)||De&&la(De.buffer,SharedArrayBuffer)))return Ae(De,Y,Q);if("number"==typeof De)throw new TypeError('The "value" argument must not be of type number. Received type number');var Ne=De.valueOf&&De.valueOf();if(null!=Ne&&Ne!==De)return ge.from(Ne,Y,Q);var et=function Je(De){if(ge.isBuffer(De)){var Y=0|St(De.length),Q=$e(Y);return 0===Q.length||De.copy(Q,0,0,Y),Q}return void 0!==De.length?"number"!=typeof De.length||ro(De.length)?$e(0):F(De):"Buffer"===De.type&&Array.isArray(De.data)?F(De.data):void 0}(De);if(et)return et;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof De[Symbol.toPrimitive])return ge.from(De[Symbol.toPrimitive]("string"),Y,Q);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof De)}function ce(De){if("number"!=typeof De)throw new TypeError('"size" argument must be of type number');if(De<0)throw new RangeError('The value "'+De+'" is invalid for option "size"')}function T(De){return ce(De),$e(De<0?0:0|St(De))}function F(De){for(var Y=De.length<0?0:0|St(De.length),Q=$e(Y),Ne=0;Ne=be)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+be.toString(16)+" bytes");return 0|De}function Gt(De,Y){if(ge.isBuffer(De))return De.length;if(ArrayBuffer.isView(De)||la(De,ArrayBuffer))return De.byteLength;if("string"!=typeof De)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof De);var Q=De.length,Ne=arguments.length>2&&!0===arguments[2];if(!Ne&&0===Q)return 0;for(var et=!1;;)switch(Y){case"ascii":case"latin1":case"binary":return Q;case"utf8":case"utf-8":return Nc(De).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Q;case"hex":return Q>>>1;case"base64":return _u(De).length;default:if(et)return Ne?-1:Nc(De).length;Y=(""+Y).toLowerCase(),et=!0}}function yn(De,Y,Q){var Ne=!1;if((void 0===Y||Y<0)&&(Y=0),Y>this.length||((void 0===Q||Q>this.length)&&(Q=this.length),Q<=0)||(Q>>>=0)<=(Y>>>=0))return"";for(De||(De="utf8");;)switch(De){case"hex":return yu(this,Y,Q);case"utf8":case"utf-8":return _n(this,Y,Q);case"ascii":return Kn(this,Y,Q);case"latin1":case"binary":return Ic(this,Y,Q);case"base64":return Ca(this,Y,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Fo(this,Y,Q);default:if(Ne)throw new TypeError("Unknown encoding: "+De);De=(De+"").toLowerCase(),Ne=!0}}function en(De,Y,Q){var Ne=De[Y];De[Y]=De[Q],De[Q]=Ne}function Ai(De,Y,Q,Ne,et){if(0===De.length)return-1;if("string"==typeof Q?(Ne=Q,Q=0):Q>2147483647?Q=2147483647:Q<-2147483648&&(Q=-2147483648),ro(Q=+Q)&&(Q=et?0:De.length-1),Q<0&&(Q=De.length+Q),Q>=De.length){if(et)return-1;Q=De.length-1}else if(Q<0){if(!et)return-1;Q=0}if("string"==typeof Y&&(Y=ge.from(Y,Ne)),ge.isBuffer(Y))return 0===Y.length?-1:$r(De,Y,Q,Ne,et);if("number"==typeof Y)return Y&=255,"function"==typeof Uint8Array.prototype.indexOf?et?Uint8Array.prototype.indexOf.call(De,Y,Q):Uint8Array.prototype.lastIndexOf.call(De,Y,Q):$r(De,[Y],Q,Ne,et);throw new TypeError("val must be string, number or Buffer")}function $r(De,Y,Q,Ne,et){var ot,Ht=1,Kt=De.length,Zi=Y.length;if(void 0!==Ne&&("ucs2"===(Ne=String(Ne).toLowerCase())||"ucs-2"===Ne||"utf16le"===Ne||"utf-16le"===Ne)){if(De.length<2||Y.length<2)return-1;Ht=2,Kt/=2,Zi/=2,Q/=2}function M(hn,fe){return 1===Ht?hn[fe]:hn.readUInt16BE(fe*Ht)}if(et){var Dt=-1;for(ot=Q;otKt&&(Q=Kt-Zi),ot=Q;ot>=0;ot--){for(var Ut=!0,Bt=0;Btet&&(Ne=et):Ne=et;var Ht=Y.length;Ne>Ht/2&&(Ne=Ht/2);for(var Kt=0;Kt>8,Ht.push(Q%256),Ht.push(Ne);return Ht}(Y,De.length-Q),De,Q,Ne)}function Ca(De,Y,Q){return Ie.fromByteArray(0===Y&&Q===De.length?De:De.slice(Y,Q))}function _n(De,Y,Q){Q=Math.min(De.length,Q);for(var Ne=[],et=Y;et239?4:Ht>223?3:Ht>191?2:1;if(et+Zi<=Q)switch(Zi){case 1:Ht<128&&(Kt=Ht);break;case 2:128==(192&(M=De[et+1]))&&(Ut=(31&Ht)<<6|63&M)>127&&(Kt=Ut);break;case 3:ot=De[et+2],128==(192&(M=De[et+1]))&&128==(192&ot)&&(Ut=(15&Ht)<<12|(63&M)<<6|63&ot)>2047&&(Ut<55296||Ut>57343)&&(Kt=Ut);break;case 4:ot=De[et+2],Dt=De[et+3],128==(192&(M=De[et+1]))&&128==(192&ot)&&128==(192&Dt)&&(Ut=(15&Ht)<<18|(63&M)<<12|(63&ot)<<6|63&Dt)>65535&&Ut<1114112&&(Kt=Ut)}null===Kt?(Kt=65533,Zi=1):Kt>65535&&(Ne.push((Kt-=65536)>>>10&1023|55296),Kt=56320|1023&Kt),Ne.push(Kt),et+=Zi}return function Sd(De){var Y=De.length;if(Y<=Cd)return String.fromCharCode.apply(String,De);for(var Q="",Ne=0;Neet.length?ge.from(Kt).copy(et,Ht):Uint8Array.prototype.set.call(et,Kt,Ht);else{if(!ge.isBuffer(Kt))throw new TypeError('"list" argument must be an Array of Buffers');Kt.copy(et,Ht)}Ht+=Kt.length}return et},ge.byteLength=Gt,ge.prototype._isBuffer=!0,ge.prototype.swap16=function(){var Y=this.length;if(Y%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Q=0;QQ&&(Y+=" ... "),""},ze&&(ge.prototype[ze]=ge.prototype.inspect),ge.prototype.compare=function(Y,Q,Ne,et,Ht){if(la(Y,Uint8Array)&&(Y=ge.from(Y,Y.offset,Y.byteLength)),!ge.isBuffer(Y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Y);if(void 0===Q&&(Q=0),void 0===Ne&&(Ne=Y?Y.length:0),void 0===et&&(et=0),void 0===Ht&&(Ht=this.length),Q<0||Ne>Y.length||et<0||Ht>this.length)throw new RangeError("out of range index");if(et>=Ht&&Q>=Ne)return 0;if(et>=Ht)return-1;if(Q>=Ne)return 1;if(this===Y)return 0;for(var Kt=(Ht>>>=0)-(et>>>=0),Zi=(Ne>>>=0)-(Q>>>=0),M=Math.min(Kt,Zi),ot=this.slice(et,Ht),Dt=Y.slice(Q,Ne),Ut=0;Ut>>=0,isFinite(Ne)?(Ne>>>=0,void 0===et&&(et="utf8")):(et=Ne,Ne=void 0)}var Ht=this.length-Q;if((void 0===Ne||Ne>Ht)&&(Ne=Ht),Y.length>0&&(Ne<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");et||(et="utf8");for(var Kt=!1;;)switch(et){case"hex":return Ur(this,Y,Q,Ne);case"utf8":case"utf-8":return ss(this,Y,Q,Ne);case"ascii":case"latin1":case"binary":return Ya(this,Y,Q,Ne);case"base64":return dr(this,Y,Q,Ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vu(this,Y,Q,Ne);default:if(Kt)throw new TypeError("Unknown encoding: "+et);et=(""+et).toLowerCase(),Kt=!0}},ge.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Cd=4096;function Kn(De,Y,Q){var Ne="";Q=Math.min(De.length,Q);for(var et=Y;etNe)&&(Q=Ne);for(var et="",Ht=Y;HtQ)throw new RangeError("Trying to access beyond buffer length")}function io(De,Y,Q,Ne,et,Ht){if(!ge.isBuffer(De))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>et||YDe.length)throw new RangeError("Index out of range")}function Sa(De,Y,Q,Ne,et,Ht){if(Q+Ne>De.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("Index out of range")}function Yr(De,Y,Q,Ne,et){return Y=+Y,Q>>>=0,et||Sa(De,0,Q,4),ct.write(De,Y,Q,Ne,23,4),Q+4}function cl(De,Y,Q,Ne,et){return Y=+Y,Q>>>=0,et||Sa(De,0,Q,8),ct.write(De,Y,Q,Ne,52,8),Q+8}ge.prototype.slice=function(Y,Q){var Ne=this.length;(Y=~~Y)<0?(Y+=Ne)<0&&(Y=0):Y>Ne&&(Y=Ne),(Q=void 0===Q?Ne:~~Q)<0?(Q+=Ne)<0&&(Q=0):Q>Ne&&(Q=Ne),Q>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=this[Y],Ht=1,Kt=0;++Kt>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=this[Y+--Q],Ht=1;Q>0&&(Ht*=256);)et+=this[Y+--Q]*Ht;return et},ge.prototype.readUint8=ge.prototype.readUInt8=function(Y,Q){return Y>>>=0,Q||_o(Y,1,this.length),this[Y]},ge.prototype.readUint16LE=ge.prototype.readUInt16LE=function(Y,Q){return Y>>>=0,Q||_o(Y,2,this.length),this[Y]|this[Y+1]<<8},ge.prototype.readUint16BE=ge.prototype.readUInt16BE=function(Y,Q){return Y>>>=0,Q||_o(Y,2,this.length),this[Y]<<8|this[Y+1]},ge.prototype.readUint32LE=ge.prototype.readUInt32LE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+16777216*this[Y+3]},ge.prototype.readUint32BE=ge.prototype.readUInt32BE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),16777216*this[Y]+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},ge.prototype.readIntLE=function(Y,Q,Ne){Y>>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=this[Y],Ht=1,Kt=0;++Kt=(Ht*=128)&&(et-=Math.pow(2,8*Q)),et},ge.prototype.readIntBE=function(Y,Q,Ne){Y>>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=Q,Ht=1,Kt=this[Y+--et];et>0&&(Ht*=256);)Kt+=this[Y+--et]*Ht;return Kt>=(Ht*=128)&&(Kt-=Math.pow(2,8*Q)),Kt},ge.prototype.readInt8=function(Y,Q){return Y>>>=0,Q||_o(Y,1,this.length),128&this[Y]?-1*(255-this[Y]+1):this[Y]},ge.prototype.readInt16LE=function(Y,Q){Y>>>=0,Q||_o(Y,2,this.length);var Ne=this[Y]|this[Y+1]<<8;return 32768&Ne?4294901760|Ne:Ne},ge.prototype.readInt16BE=function(Y,Q){Y>>>=0,Q||_o(Y,2,this.length);var Ne=this[Y+1]|this[Y]<<8;return 32768&Ne?4294901760|Ne:Ne},ge.prototype.readInt32LE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},ge.prototype.readInt32BE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},ge.prototype.readFloatLE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),ct.read(this,Y,!0,23,4)},ge.prototype.readFloatBE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),ct.read(this,Y,!1,23,4)},ge.prototype.readDoubleLE=function(Y,Q){return Y>>>=0,Q||_o(Y,8,this.length),ct.read(this,Y,!0,52,8)},ge.prototype.readDoubleBE=function(Y,Q){return Y>>>=0,Q||_o(Y,8,this.length),ct.read(this,Y,!1,52,8)},ge.prototype.writeUintLE=ge.prototype.writeUIntLE=function(Y,Q,Ne,et){Y=+Y,Q>>>=0,Ne>>>=0,et||io(this,Y,Q,Ne,Math.pow(2,8*Ne)-1,0);var Kt=1,Zi=0;for(this[Q]=255&Y;++Zi>>=0,Ne>>>=0,et||io(this,Y,Q,Ne,Math.pow(2,8*Ne)-1,0);var Kt=Ne-1,Zi=1;for(this[Q+Kt]=255&Y;--Kt>=0&&(Zi*=256);)this[Q+Kt]=Y/Zi&255;return Q+Ne},ge.prototype.writeUint8=ge.prototype.writeUInt8=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,1,255,0),this[Q]=255&Y,Q+1},ge.prototype.writeUint16LE=ge.prototype.writeUInt16LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,65535,0),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},ge.prototype.writeUint16BE=ge.prototype.writeUInt16BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,65535,0),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},ge.prototype.writeUint32LE=ge.prototype.writeUInt32LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,4294967295,0),this[Q+3]=Y>>>24,this[Q+2]=Y>>>16,this[Q+1]=Y>>>8,this[Q]=255&Y,Q+4},ge.prototype.writeUint32BE=ge.prototype.writeUInt32BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,4294967295,0),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},ge.prototype.writeIntLE=function(Y,Q,Ne,et){if(Y=+Y,Q>>>=0,!et){var Ht=Math.pow(2,8*Ne-1);io(this,Y,Q,Ne,Ht-1,-Ht)}var Kt=0,Zi=1,M=0;for(this[Q]=255&Y;++Kt>0)-M&255;return Q+Ne},ge.prototype.writeIntBE=function(Y,Q,Ne,et){if(Y=+Y,Q>>>=0,!et){var Ht=Math.pow(2,8*Ne-1);io(this,Y,Q,Ne,Ht-1,-Ht)}var Kt=Ne-1,Zi=1,M=0;for(this[Q+Kt]=255&Y;--Kt>=0&&(Zi*=256);)Y<0&&0===M&&0!==this[Q+Kt+1]&&(M=1),this[Q+Kt]=(Y/Zi>>0)-M&255;return Q+Ne},ge.prototype.writeInt8=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,1,127,-128),Y<0&&(Y=255+Y+1),this[Q]=255&Y,Q+1},ge.prototype.writeInt16LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,32767,-32768),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},ge.prototype.writeInt16BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,32767,-32768),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},ge.prototype.writeInt32LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,2147483647,-2147483648),this[Q]=255&Y,this[Q+1]=Y>>>8,this[Q+2]=Y>>>16,this[Q+3]=Y>>>24,Q+4},ge.prototype.writeInt32BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},ge.prototype.writeFloatLE=function(Y,Q,Ne){return Yr(this,Y,Q,!0,Ne)},ge.prototype.writeFloatBE=function(Y,Q,Ne){return Yr(this,Y,Q,!1,Ne)},ge.prototype.writeDoubleLE=function(Y,Q,Ne){return cl(this,Y,Q,!0,Ne)},ge.prototype.writeDoubleBE=function(Y,Q,Ne){return cl(this,Y,Q,!1,Ne)},ge.prototype.copy=function(Y,Q,Ne,et){if(!ge.isBuffer(Y))throw new TypeError("argument should be a Buffer");if(Ne||(Ne=0),!et&&0!==et&&(et=this.length),Q>=Y.length&&(Q=Y.length),Q||(Q=0),et>0&&et=this.length)throw new RangeError("Index out of range");if(et<0)throw new RangeError("sourceEnd out of bounds");et>this.length&&(et=this.length),Y.length-Q>>=0,Ne=void 0===Ne?this.length:Ne>>>0,Y||(Y=0),"number"==typeof Y)for(Kt=Q;Kt55295&&Q<57344){if(!et){if(Q>56319){(Y-=3)>-1&&Ht.push(239,191,189);continue}if(Kt+1===Ne){(Y-=3)>-1&&Ht.push(239,191,189);continue}et=Q;continue}if(Q<56320){(Y-=3)>-1&&Ht.push(239,191,189),et=Q;continue}Q=65536+(et-55296<<10|Q-56320)}else et&&(Y-=3)>-1&&Ht.push(239,191,189);if(et=null,Q<128){if((Y-=1)<0)break;Ht.push(Q)}else if(Q<2048){if((Y-=2)<0)break;Ht.push(Q>>6|192,63&Q|128)}else if(Q<65536){if((Y-=3)<0)break;Ht.push(Q>>12|224,Q>>6&63|128,63&Q|128)}else{if(!(Q<1114112))throw new Error("Invalid code point");if((Y-=4)<0)break;Ht.push(Q>>18|240,Q>>12&63|128,Q>>6&63|128,63&Q|128)}}return Ht}function _u(De){return Ie.toByteArray(function kd(De){if((De=(De=De.split("=")[0]).trim().replace(Ql,"")).length<2)return"";for(;De.length%4!=0;)De+="=";return De}(De))}function Xa(De,Y,Q,Ne){for(var et=0;et=Y.length||et>=De.length);++et)Y[et+Q]=De[et];return et}function la(De,Y){return De instanceof Y||null!=De&&null!=De.constructor&&null!=De.constructor.name&&De.constructor.name===Y.name}function ro(De){return De!=De}var Ml=function(){for(var De="0123456789abcdef",Y=new Array(256),Q=0;Q<16;++Q)for(var Ne=16*Q,et=0;et<16;++et)Y[Ne+et]=De[Q]+De[et];return Y}()},797:function(Yt){Yt.exports=function(Dn){var ke={};function nt(Ie){if(ke[Ie])return ke[Ie].exports;var ct=ke[Ie]={exports:{},id:Ie,loaded:!1};return Dn[Ie].call(ct.exports,ct,ct.exports,nt),ct.loaded=!0,ct.exports}return nt.m=Dn,nt.c=ke,nt.p="",nt(0)}([function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(1),ct=nt(3),ze=nt(8),be=nt(15);function Ze(se,T,A){var F=null,ee=function(Ai,$r){A&&A(Ai,$r),F&&F.visit(Ai,$r)},Ae="function"==typeof A?ee:null,Je=!1;if(T){var St="boolean"==typeof T.attachComment&&T.attachComment;((Je="boolean"==typeof T.comment&&T.comment)||St)&&((F=new Ie.CommentHandler).attach=St,T.comment=!0,Ae=ee)}var Gt,Ft=!1;T&&"string"==typeof T.sourceType&&(Ft="module"===T.sourceType),Gt=T&&"boolean"==typeof T.jsx&&T.jsx?new ct.JSXParser(se,T,Ae):new ze.Parser(se,T,Ae);var en=Ft?Gt.parseModule():Gt.parseScript();return Je&&F&&(en.comments=F.comments),Gt.config.tokens&&(en.tokens=Gt.tokens),Gt.config.tolerant&&(en.errors=Gt.errorHandler.errors),en}ke.parse=Ze,ke.parseModule=function $e(se,T,A){var F=T||{};return F.sourceType="module",Ze(se,F,A)},ke.parseScript=function ge(se,T,A){var F=T||{};return F.sourceType="script",Ze(se,F,A)},ke.tokenize=function oe(se,T,A){var ee,F=new be.Tokenizer(se,T);ee=[];try{for(;;){var Ae=F.getNextToken();if(!Ae)break;A&&(Ae=A(Ae)),ee.push(Ae)}}catch(Je){F.errorHandler.tolerate(Je)}return F.errorHandler.tolerant&&(ee.errors=F.errors()),ee};var ce=nt(2);ke.Syntax=ce.Syntax,ke.version="4.0.1"},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(2),ct=function(){function ze(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return ze.prototype.insertInnerComments=function(be,Ze){if(be.type===Ie.Syntax.BlockStatement&&0===be.body.length){for(var $e=[],ge=this.leading.length-1;ge>=0;--ge){var oe=this.leading[ge];Ze.end.offset>=oe.start&&($e.unshift(oe.comment),this.leading.splice(ge,1),this.trailing.splice(ge,1))}$e.length&&(be.innerComments=$e)}},ze.prototype.findTrailingComments=function(be){var Ze=[];if(this.trailing.length>0){for(var $e=this.trailing.length-1;$e>=0;--$e){var ge=this.trailing[$e];ge.start>=be.end.offset&&Ze.unshift(ge.comment)}return this.trailing.length=0,Ze}var oe=this.stack[this.stack.length-1];if(oe&&oe.node.trailingComments){var ce=oe.node.trailingComments[0];ce&&ce.range[0]>=be.end.offset&&(Ze=oe.node.trailingComments,delete oe.node.trailingComments)}return Ze},ze.prototype.findLeadingComments=function(be){for(var $e,Ze=[];this.stack.length>0&&(ge=this.stack[this.stack.length-1])&&ge.start>=be.start.offset;)$e=ge.node,this.stack.pop();if($e){for(var ce=($e.leadingComments?$e.leadingComments.length:0)-1;ce>=0;--ce){var se=$e.leadingComments[ce];se.range[1]<=be.start.offset&&(Ze.unshift(se),$e.leadingComments.splice(ce,1))}return $e.leadingComments&&0===$e.leadingComments.length&&delete $e.leadingComments,Ze}for(ce=this.leading.length-1;ce>=0;--ce){var ge;(ge=this.leading[ce]).start<=be.start.offset&&(Ze.unshift(ge.comment),this.leading.splice(ce,1))}return Ze},ze.prototype.visitNode=function(be,Ze){if(!(be.type===Ie.Syntax.Program&&be.body.length>0)){this.insertInnerComments(be,Ze);var $e=this.findTrailingComments(Ze),ge=this.findLeadingComments(Ze);ge.length>0&&(be.leadingComments=ge),$e.length>0&&(be.trailingComments=$e),this.stack.push({node:be,start:Ze.start.offset})}},ze.prototype.visitComment=function(be,Ze){var $e="L"===be.type[0]?"Line":"Block",ge={type:$e,value:be.value};if(be.range&&(ge.range=be.range),be.loc&&(ge.loc=be.loc),this.comments.push(ge),this.attach){var oe={comment:{type:$e,value:be.value,range:[Ze.start.offset,Ze.end.offset]},start:Ze.start.offset};be.loc&&(oe.comment.loc=be.loc),be.type=$e,this.leading.push(oe),this.trailing.push(oe)}},ze.prototype.visit=function(be,Ze){"LineComment"===be.type||"BlockComment"===be.type?this.visitComment(be,Ze):this.attach&&this.visitNode(be,Ze)},ze}();ke.CommentHandler=ct},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(Dn,ke,nt){"use strict";var T,Ie=this&&this.__extends||(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,F){A.__proto__=F}||function(A,F){for(var ee in F)F.hasOwnProperty(ee)&&(A[ee]=F[ee])},function(A,F){function ee(){this.constructor=A}T(A,F),A.prototype=null===F?Object.create(F):(ee.prototype=F.prototype,new ee)});Object.defineProperty(ke,"__esModule",{value:!0});var ct=nt(4),ze=nt(5),be=nt(6),Ze=nt(7),$e=nt(8),ge=nt(13),oe=nt(14);function ce(T){var A;switch(T.type){case be.JSXSyntax.JSXIdentifier:A=T.name;break;case be.JSXSyntax.JSXNamespacedName:var ee=T;A=ce(ee.namespace)+":"+ce(ee.name);break;case be.JSXSyntax.JSXMemberExpression:var Ae=T;A=ce(Ae.object)+"."+ce(Ae.property)}return A}ge.TokenName[100]="JSXIdentifier",ge.TokenName[101]="JSXText";var se=function(T){function A(F,ee,Ae){return T.call(this,F,ee,Ae)||this}return Ie(A,T),A.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():T.prototype.parsePrimaryExpression.call(this)},A.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},A.prototype.finishJSX=function(){this.nextToken()},A.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},A.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},A.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},A.prototype.scanXHTMLEntity=function(F){for(var ee="&",Ae=!0,Je=!1,St=!1,Ft=!1;!this.scanner.eof()&&Ae&&!Je;){var Gt=this.scanner.source[this.scanner.index];if(Gt===F)break;if(Je=";"===Gt,ee+=Gt,++this.scanner.index,!Je)switch(ee.length){case 2:St="#"===Gt;break;case 3:St&&(Ae=(Ft="x"===Gt)||ct.Character.isDecimalDigit(Gt.charCodeAt(0)),St=St&&!Ft);break;default:Ae=(Ae=Ae&&!(St&&!ct.Character.isDecimalDigit(Gt.charCodeAt(0))))&&!(Ft&&!ct.Character.isHexDigit(Gt.charCodeAt(0)))}}if(Ae&&Je&&ee.length>2){var yn=ee.substr(1,ee.length-2);St&&yn.length>1?ee=String.fromCharCode(parseInt(yn.substr(1),10)):Ft&&yn.length>2?ee=String.fromCharCode(parseInt("0"+yn.substr(1),16)):!St&&!Ft&&oe.XHTMLEntities[yn]&&(ee=oe.XHTMLEntities[yn])}return ee},A.prototype.lexJSX=function(){var F=this.scanner.source.charCodeAt(this.scanner.index);if(60===F||62===F||47===F||58===F||61===F||123===F||125===F)return{type:7,value:ee=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===F||39===F){for(var Ae=this.scanner.index,Je=this.scanner.source[this.scanner.index++],St="";!this.scanner.eof()&&(Ft=this.scanner.source[this.scanner.index++])!==Je;)St+="&"===Ft?this.scanXHTMLEntity(Je):Ft;return{type:8,value:St,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Ae,end:this.scanner.index}}if(46===F){var ee,Gt=this.scanner.source.charCodeAt(this.scanner.index+1),yn=this.scanner.source.charCodeAt(this.scanner.index+2);return Ae=this.scanner.index,this.scanner.index+=(ee=46===Gt&&46===yn?"...":".").length,{type:7,value:ee,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Ae,end:this.scanner.index}}if(96===F)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(ct.Character.isIdentifierStart(F)&&92!==F){for(Ae=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var Ft=this.scanner.source.charCodeAt(this.scanner.index);if(ct.Character.isIdentifierPart(Ft)&&92!==Ft)++this.scanner.index;else{if(45!==Ft)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(Ae,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Ae,end:this.scanner.index}}return this.scanner.lex()},A.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var F=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(F)),F},A.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var F=this.scanner.index,ee="";!this.scanner.eof();){var Ae=this.scanner.source[this.scanner.index];if("{"===Ae||"<"===Ae)break;++this.scanner.index,ee+=Ae,ct.Character.isLineTerminator(Ae.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===Ae&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var Je={type:101,value:ee,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:F,end:this.scanner.index};return ee.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(Je)),Je},A.prototype.peekJSXToken=function(){var F=this.scanner.saveState();this.scanner.scanComments();var ee=this.lexJSX();return this.scanner.restoreState(F),ee},A.prototype.expectJSX=function(F){var ee=this.nextJSXToken();(7!==ee.type||ee.value!==F)&&this.throwUnexpectedToken(ee)},A.prototype.matchJSX=function(F){var ee=this.peekJSXToken();return 7===ee.type&&ee.value===F},A.prototype.parseJSXIdentifier=function(){var F=this.createJSXNode(),ee=this.nextJSXToken();return 100!==ee.type&&this.throwUnexpectedToken(ee),this.finalize(F,new ze.JSXIdentifier(ee.value))},A.prototype.parseJSXElementName=function(){var F=this.createJSXNode(),ee=this.parseJSXIdentifier();if(this.matchJSX(":")){var Ae=ee;this.expectJSX(":");var Je=this.parseJSXIdentifier();ee=this.finalize(F,new ze.JSXNamespacedName(Ae,Je))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var St=ee;this.expectJSX(".");var Ft=this.parseJSXIdentifier();ee=this.finalize(F,new ze.JSXMemberExpression(St,Ft))}return ee},A.prototype.parseJSXAttributeName=function(){var ee,F=this.createJSXNode(),Ae=this.parseJSXIdentifier();if(this.matchJSX(":")){var Je=Ae;this.expectJSX(":");var St=this.parseJSXIdentifier();ee=this.finalize(F,new ze.JSXNamespacedName(Je,St))}else ee=Ae;return ee},A.prototype.parseJSXStringLiteralAttribute=function(){var F=this.createJSXNode(),ee=this.nextJSXToken();8!==ee.type&&this.throwUnexpectedToken(ee);var Ae=this.getTokenRaw(ee);return this.finalize(F,new Ze.Literal(ee.value,Ae))},A.prototype.parseJSXExpressionAttribute=function(){var F=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var ee=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(F,new ze.JSXExpressionContainer(ee))},A.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},A.prototype.parseJSXNameValueAttribute=function(){var F=this.createJSXNode(),ee=this.parseJSXAttributeName(),Ae=null;return this.matchJSX("=")&&(this.expectJSX("="),Ae=this.parseJSXAttributeValue()),this.finalize(F,new ze.JSXAttribute(ee,Ae))},A.prototype.parseJSXSpreadAttribute=function(){var F=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var ee=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(F,new ze.JSXSpreadAttribute(ee))},A.prototype.parseJSXAttributes=function(){for(var F=[];!this.matchJSX("/")&&!this.matchJSX(">");){var ee=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();F.push(ee)}return F},A.prototype.parseJSXOpeningElement=function(){var F=this.createJSXNode();this.expectJSX("<");var ee=this.parseJSXElementName(),Ae=this.parseJSXAttributes(),Je=this.matchJSX("/");return Je&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(F,new ze.JSXOpeningElement(ee,Je,Ae))},A.prototype.parseJSXBoundaryElement=function(){var F=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var ee=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(F,new ze.JSXClosingElement(ee))}var Ae=this.parseJSXElementName(),Je=this.parseJSXAttributes(),St=this.matchJSX("/");return St&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(F,new ze.JSXOpeningElement(Ae,St,Je))},A.prototype.parseJSXEmptyExpression=function(){var F=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(F,new ze.JSXEmptyExpression)},A.prototype.parseJSXExpressionContainer=function(){var ee,F=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(ee=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),ee=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(F,new ze.JSXExpressionContainer(ee))},A.prototype.parseJSXChildren=function(){for(var F=[];!this.scanner.eof();){var ee=this.createJSXChildNode(),Ae=this.nextJSXText();if(Ae.start0))break;Ft=this.finalize(F.node,new ze.JSXElement(F.opening,F.children,F.closing)),(F=ee[ee.length-1]).children.push(Ft),ee.pop()}}return F},A.prototype.parseJSXElement=function(){var F=this.createJSXNode(),ee=this.parseJSXOpeningElement(),Ae=[],Je=null;if(!ee.selfClosing){var St=this.parseComplexJSXElement({node:F,opening:ee,closing:Je,children:Ae});Ae=St.children,Je=St.closing}return this.finalize(F,new ze.JSXElement(ee,Ae,Je))},A.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var F=this.parseJSXElement();return this.finishJSX(),F},A.prototype.isStartOfExpression=function(){return T.prototype.isStartOfExpression.call(this)||this.match("<")},A}($e.Parser);ke.JSXParser=se},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var nt={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};ke.Character={fromCodePoint:function(Ie){return Ie<65536?String.fromCharCode(Ie):String.fromCharCode(55296+(Ie-65536>>10))+String.fromCharCode(56320+(Ie-65536&1023))},isWhiteSpace:function(Ie){return 32===Ie||9===Ie||11===Ie||12===Ie||160===Ie||Ie>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(Ie)>=0},isLineTerminator:function(Ie){return 10===Ie||13===Ie||8232===Ie||8233===Ie},isIdentifierStart:function(Ie){return 36===Ie||95===Ie||Ie>=65&&Ie<=90||Ie>=97&&Ie<=122||92===Ie||Ie>=128&&nt.NonAsciiIdentifierStart.test(ke.Character.fromCodePoint(Ie))},isIdentifierPart:function(Ie){return 36===Ie||95===Ie||Ie>=65&&Ie<=90||Ie>=97&&Ie<=122||Ie>=48&&Ie<=57||92===Ie||Ie>=128&&nt.NonAsciiIdentifierPart.test(ke.Character.fromCodePoint(Ie))},isDecimalDigit:function(Ie){return Ie>=48&&Ie<=57},isHexDigit:function(Ie){return Ie>=48&&Ie<=57||Ie>=65&&Ie<=70||Ie>=97&&Ie<=102},isOctalDigit:function(Ie){return Ie>=48&&Ie<=55}}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(6);ke.JSXClosingElement=function F(ee){this.type=Ie.JSXSyntax.JSXClosingElement,this.name=ee},ke.JSXElement=function F(ee,Ae,Je){this.type=Ie.JSXSyntax.JSXElement,this.openingElement=ee,this.children=Ae,this.closingElement=Je},ke.JSXEmptyExpression=function F(){this.type=Ie.JSXSyntax.JSXEmptyExpression},ke.JSXExpressionContainer=function F(ee){this.type=Ie.JSXSyntax.JSXExpressionContainer,this.expression=ee},ke.JSXIdentifier=function F(ee){this.type=Ie.JSXSyntax.JSXIdentifier,this.name=ee},ke.JSXMemberExpression=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXMemberExpression,this.object=ee,this.property=Ae},ke.JSXAttribute=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXAttribute,this.name=ee,this.value=Ae},ke.JSXNamespacedName=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXNamespacedName,this.namespace=ee,this.name=Ae},ke.JSXOpeningElement=function F(ee,Ae,Je){this.type=Ie.JSXSyntax.JSXOpeningElement,this.name=ee,this.selfClosing=Ae,this.attributes=Je},ke.JSXSpreadAttribute=function F(ee){this.type=Ie.JSXSyntax.JSXSpreadAttribute,this.argument=ee},ke.JSXText=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXText,this.value=ee,this.raw=Ae}},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(2);ke.ArrayExpression=function Ge(qe){this.type=Ie.Syntax.ArrayExpression,this.elements=qe},ke.ArrayPattern=function Ge(qe){this.type=Ie.Syntax.ArrayPattern,this.elements=qe},ke.ArrowFunctionExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ArrowFunctionExpression,this.id=null,this.params=qe,this.body=_t,this.generator=!1,this.expression=bn,this.async=!1},ke.AssignmentExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.AssignmentExpression,this.operator=qe,this.left=_t,this.right=bn},ke.AssignmentPattern=function Ge(qe,_t){this.type=Ie.Syntax.AssignmentPattern,this.left=qe,this.right=_t},ke.AsyncArrowFunctionExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ArrowFunctionExpression,this.id=null,this.params=qe,this.body=_t,this.generator=!1,this.expression=bn,this.async=!0},ke.AsyncFunctionDeclaration=function Ge(qe,_t,bn){this.type=Ie.Syntax.FunctionDeclaration,this.id=qe,this.params=_t,this.body=bn,this.generator=!1,this.expression=!1,this.async=!0},ke.AsyncFunctionExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.FunctionExpression,this.id=qe,this.params=_t,this.body=bn,this.generator=!1,this.expression=!1,this.async=!0},ke.AwaitExpression=function Ge(qe){this.type=Ie.Syntax.AwaitExpression,this.argument=qe},ke.BinaryExpression=function Ge(qe,_t,bn){this.type="||"===qe||"&&"===qe?Ie.Syntax.LogicalExpression:Ie.Syntax.BinaryExpression,this.operator=qe,this.left=_t,this.right=bn},ke.BlockStatement=function Ge(qe){this.type=Ie.Syntax.BlockStatement,this.body=qe},ke.BreakStatement=function Ge(qe){this.type=Ie.Syntax.BreakStatement,this.label=qe},ke.CallExpression=function Ge(qe,_t){this.type=Ie.Syntax.CallExpression,this.callee=qe,this.arguments=_t},ke.CatchClause=function Ge(qe,_t){this.type=Ie.Syntax.CatchClause,this.param=qe,this.body=_t},ke.ClassBody=function Ge(qe){this.type=Ie.Syntax.ClassBody,this.body=qe},ke.ClassDeclaration=function Ge(qe,_t,bn){this.type=Ie.Syntax.ClassDeclaration,this.id=qe,this.superClass=_t,this.body=bn},ke.ClassExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ClassExpression,this.id=qe,this.superClass=_t,this.body=bn},ke.ComputedMemberExpression=function Ge(qe,_t){this.type=Ie.Syntax.MemberExpression,this.computed=!0,this.object=qe,this.property=_t},ke.ConditionalExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ConditionalExpression,this.test=qe,this.consequent=_t,this.alternate=bn},ke.ContinueStatement=function Ge(qe){this.type=Ie.Syntax.ContinueStatement,this.label=qe},ke.DebuggerStatement=function Ge(){this.type=Ie.Syntax.DebuggerStatement},ke.Directive=function Ge(qe,_t){this.type=Ie.Syntax.ExpressionStatement,this.expression=qe,this.directive=_t},ke.DoWhileStatement=function Ge(qe,_t){this.type=Ie.Syntax.DoWhileStatement,this.body=qe,this.test=_t},ke.EmptyStatement=function Ge(){this.type=Ie.Syntax.EmptyStatement},ke.ExportAllDeclaration=function Ge(qe){this.type=Ie.Syntax.ExportAllDeclaration,this.source=qe},ke.ExportDefaultDeclaration=function Ge(qe){this.type=Ie.Syntax.ExportDefaultDeclaration,this.declaration=qe},ke.ExportNamedDeclaration=function Ge(qe,_t,bn){this.type=Ie.Syntax.ExportNamedDeclaration,this.declaration=qe,this.specifiers=_t,this.source=bn},ke.ExportSpecifier=function Ge(qe,_t){this.type=Ie.Syntax.ExportSpecifier,this.exported=_t,this.local=qe},ke.ExpressionStatement=function Ge(qe){this.type=Ie.Syntax.ExpressionStatement,this.expression=qe},ke.ForInStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.ForInStatement,this.left=qe,this.right=_t,this.body=bn,this.each=!1},ke.ForOfStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.ForOfStatement,this.left=qe,this.right=_t,this.body=bn},ke.ForStatement=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.ForStatement,this.init=qe,this.test=_t,this.update=bn,this.body=Nr},ke.FunctionDeclaration=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.FunctionDeclaration,this.id=qe,this.params=_t,this.body=bn,this.generator=Nr,this.expression=!1,this.async=!1},ke.FunctionExpression=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.FunctionExpression,this.id=qe,this.params=_t,this.body=bn,this.generator=Nr,this.expression=!1,this.async=!1},ke.Identifier=function Ge(qe){this.type=Ie.Syntax.Identifier,this.name=qe},ke.IfStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.IfStatement,this.test=qe,this.consequent=_t,this.alternate=bn},ke.ImportDeclaration=function Ge(qe,_t){this.type=Ie.Syntax.ImportDeclaration,this.specifiers=qe,this.source=_t},ke.ImportDefaultSpecifier=function Ge(qe){this.type=Ie.Syntax.ImportDefaultSpecifier,this.local=qe},ke.ImportNamespaceSpecifier=function Ge(qe){this.type=Ie.Syntax.ImportNamespaceSpecifier,this.local=qe},ke.ImportSpecifier=function Ge(qe,_t){this.type=Ie.Syntax.ImportSpecifier,this.local=qe,this.imported=_t},ke.LabeledStatement=function Ge(qe,_t){this.type=Ie.Syntax.LabeledStatement,this.label=qe,this.body=_t},ke.Literal=function Ge(qe,_t){this.type=Ie.Syntax.Literal,this.value=qe,this.raw=_t},ke.MetaProperty=function Ge(qe,_t){this.type=Ie.Syntax.MetaProperty,this.meta=qe,this.property=_t},ke.MethodDefinition=function Ge(qe,_t,bn,Nr,g1){this.type=Ie.Syntax.MethodDefinition,this.key=qe,this.computed=_t,this.value=bn,this.kind=Nr,this.static=g1},ke.Module=function Ge(qe){this.type=Ie.Syntax.Program,this.body=qe,this.sourceType="module"},ke.NewExpression=function Ge(qe,_t){this.type=Ie.Syntax.NewExpression,this.callee=qe,this.arguments=_t},ke.ObjectExpression=function Ge(qe){this.type=Ie.Syntax.ObjectExpression,this.properties=qe},ke.ObjectPattern=function Ge(qe){this.type=Ie.Syntax.ObjectPattern,this.properties=qe},ke.Property=function Ge(qe,_t,bn,Nr,g1,Mi){this.type=Ie.Syntax.Property,this.key=_t,this.computed=bn,this.value=Nr,this.kind=qe,this.method=g1,this.shorthand=Mi},ke.RegexLiteral=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.Literal,this.value=qe,this.raw=_t,this.regex={pattern:bn,flags:Nr}},ke.RestElement=function Ge(qe){this.type=Ie.Syntax.RestElement,this.argument=qe},ke.ReturnStatement=function Ge(qe){this.type=Ie.Syntax.ReturnStatement,this.argument=qe},ke.Script=function Ge(qe){this.type=Ie.Syntax.Program,this.body=qe,this.sourceType="script"},ke.SequenceExpression=function Ge(qe){this.type=Ie.Syntax.SequenceExpression,this.expressions=qe},ke.SpreadElement=function Ge(qe){this.type=Ie.Syntax.SpreadElement,this.argument=qe},ke.StaticMemberExpression=function Ge(qe,_t){this.type=Ie.Syntax.MemberExpression,this.computed=!1,this.object=qe,this.property=_t},ke.Super=function Ge(){this.type=Ie.Syntax.Super},ke.SwitchCase=function Ge(qe,_t){this.type=Ie.Syntax.SwitchCase,this.test=qe,this.consequent=_t},ke.SwitchStatement=function Ge(qe,_t){this.type=Ie.Syntax.SwitchStatement,this.discriminant=qe,this.cases=_t},ke.TaggedTemplateExpression=function Ge(qe,_t){this.type=Ie.Syntax.TaggedTemplateExpression,this.tag=qe,this.quasi=_t},ke.TemplateElement=function Ge(qe,_t){this.type=Ie.Syntax.TemplateElement,this.value=qe,this.tail=_t},ke.TemplateLiteral=function Ge(qe,_t){this.type=Ie.Syntax.TemplateLiteral,this.quasis=qe,this.expressions=_t},ke.ThisExpression=function Ge(){this.type=Ie.Syntax.ThisExpression},ke.ThrowStatement=function Ge(qe){this.type=Ie.Syntax.ThrowStatement,this.argument=qe},ke.TryStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.TryStatement,this.block=qe,this.handler=_t,this.finalizer=bn},ke.UnaryExpression=function Ge(qe,_t){this.type=Ie.Syntax.UnaryExpression,this.operator=qe,this.argument=_t,this.prefix=!0},ke.UpdateExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.UpdateExpression,this.operator=qe,this.argument=_t,this.prefix=bn},ke.VariableDeclaration=function Ge(qe,_t){this.type=Ie.Syntax.VariableDeclaration,this.declarations=qe,this.kind=_t},ke.VariableDeclarator=function Ge(qe,_t){this.type=Ie.Syntax.VariableDeclarator,this.id=qe,this.init=_t},ke.WhileStatement=function Ge(qe,_t){this.type=Ie.Syntax.WhileStatement,this.test=qe,this.body=_t},ke.WithStatement=function Ge(qe,_t){this.type=Ie.Syntax.WithStatement,this.object=qe,this.body=_t},ke.YieldExpression=function Ge(qe,_t){this.type=Ie.Syntax.YieldExpression,this.argument=qe,this.delegate=_t}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(9),ct=nt(10),ze=nt(11),be=nt(7),Ze=nt(12),$e=nt(2),ge=nt(13),oe="ArrowParameterPlaceHolder",ce=function(){function se(T,A,F){void 0===A&&(A={}),this.config={range:"boolean"==typeof A.range&&A.range,loc:"boolean"==typeof A.loc&&A.loc,source:null,tokens:"boolean"==typeof A.tokens&&A.tokens,comment:"boolean"==typeof A.comment&&A.comment,tolerant:"boolean"==typeof A.tolerant&&A.tolerant},this.config.loc&&A.source&&null!==A.source&&(this.config.source=String(A.source)),this.delegate=F,this.errorHandler=new ct.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new Ze.Scanner(T,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return se.prototype.throwError=function(T){for(var A=[],F=1;F0&&this.delegate)for(var A=0;A>="===T||">>>="===T||"&="===T||"^="===T||"|="===T},se.prototype.isolateCoverGrammar=function(T){var A=this.context.isBindingElement,F=this.context.isAssignmentTarget,ee=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Ae=T.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=A,this.context.isAssignmentTarget=F,this.context.firstCoverInitializedNameError=ee,Ae},se.prototype.inheritCoverGrammar=function(T){var A=this.context.isBindingElement,F=this.context.isAssignmentTarget,ee=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Ae=T.call(this);return this.context.isBindingElement=this.context.isBindingElement&&A,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&F,this.context.firstCoverInitializedNameError=ee||this.context.firstCoverInitializedNameError,Ae},se.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},se.prototype.parsePrimaryExpression=function(){var A,F,ee,T=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),A=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(T,new be.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,ze.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,F=this.nextToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.Literal(F.value,ee));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,F=this.nextToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.Literal("true"===F.value,ee));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,F=this.nextToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.Literal(null,ee));break;case 10:A=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,A=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":A=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":A=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,F=this.nextRegexToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.RegexLiteral(F.regex,ee,F.pattern,F.flags));break;default:A=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?A=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?A=this.finalize(T,new be.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?A=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),A=this.finalize(T,new be.ThisExpression)):A=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:A=this.throwUnexpectedToken(this.nextToken())}return A},se.prototype.parseSpreadElement=function(){var T=this.createNode();this.expect("...");var A=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(T,new be.SpreadElement(A))},se.prototype.parseArrayInitializer=function(){var T=this.createNode(),A=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),A.push(null);else if(this.match("...")){var F=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),A.push(F)}else A.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(T,new be.ArrayExpression(A))},se.prototype.parsePropertyMethod=function(T){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var A=this.context.strict,F=this.context.allowStrictDirective;this.context.allowStrictDirective=T.simple;var ee=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&T.firstRestricted&&this.tolerateUnexpectedToken(T.firstRestricted,T.message),this.context.strict&&T.stricted&&this.tolerateUnexpectedToken(T.stricted,T.message),this.context.strict=A,this.context.allowStrictDirective=F,ee},se.prototype.parsePropertyMethodFunction=function(){var A=this.createNode(),F=this.context.allowYield;this.context.allowYield=!0;var ee=this.parseFormalParameters(),Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(A,new be.FunctionExpression(null,ee.params,Ae,!1))},se.prototype.parsePropertyMethodAsyncFunction=function(){var T=this.createNode(),A=this.context.allowYield,F=this.context.await;this.context.allowYield=!1,this.context.await=!0;var ee=this.parseFormalParameters(),Ae=this.parsePropertyMethod(ee);return this.context.allowYield=A,this.context.await=F,this.finalize(T,new be.AsyncFunctionExpression(null,ee.params,Ae))},se.prototype.parseObjectPropertyKey=function(){var F,T=this.createNode(),A=this.nextToken();switch(A.type){case 8:case 6:this.context.strict&&A.octal&&this.tolerateUnexpectedToken(A,ze.Messages.StrictOctalLiteral);var ee=this.getTokenRaw(A);F=this.finalize(T,new be.Literal(A.value,ee));break;case 3:case 1:case 5:case 4:F=this.finalize(T,new be.Identifier(A.value));break;case 7:"["===A.value?(F=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):F=this.throwUnexpectedToken(A);break;default:F=this.throwUnexpectedToken(A)}return F},se.prototype.isPropertyKey=function(T,A){return T.type===$e.Syntax.Identifier&&T.name===A||T.type===$e.Syntax.Literal&&T.value===A},se.prototype.parseObjectProperty=function(T){var ee,A=this.createNode(),F=this.lookahead,Ae=null,Je=null,St=!1,Ft=!1,Gt=!1,yn=!1;if(3===F.type){var en=F.value;this.nextToken(),St=this.match("["),Ae=(yn=!(this.hasLineTerminator||"async"!==en||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(A,new be.Identifier(en))}else this.match("*")?this.nextToken():(St=this.match("["),Ae=this.parseObjectPropertyKey());var Ai=this.qualifiedPropertyName(this.lookahead);if(3===F.type&&!yn&&"get"===F.value&&Ai)ee="get",St=this.match("["),Ae=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod();else if(3===F.type&&!yn&&"set"===F.value&&Ai)ee="set",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseSetterMethod();else if(7===F.type&&"*"===F.value&&Ai)ee="init",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),Ft=!0;else if(Ae||this.throwUnexpectedToken(this.lookahead),ee="init",this.match(":")&&!yn)!St&&this.isPropertyKey(Ae,"__proto__")&&(T.value&&this.tolerateError(ze.Messages.DuplicateProtoProperty),T.value=!0),this.nextToken(),Je=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))Je=yn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),Ft=!0;else if(3===F.type)if(en=this.finalize(A,new be.Identifier(F.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),Gt=!0;var $r=this.isolateCoverGrammar(this.parseAssignmentExpression);Je=this.finalize(A,new be.AssignmentPattern(en,$r))}else Gt=!0,Je=en;else this.throwUnexpectedToken(this.nextToken());return this.finalize(A,new be.Property(ee,Ae,St,Je,Ft,Gt))},se.prototype.parseObjectInitializer=function(){var T=this.createNode();this.expect("{");for(var A=[],F={value:!1};!this.match("}");)A.push(this.parseObjectProperty(F)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(T,new be.ObjectExpression(A))},se.prototype.parseTemplateHead=function(){Ie.assert(this.lookahead.head,"Template literal must start with a template head");var T=this.createNode(),A=this.nextToken();return this.finalize(T,new be.TemplateElement({raw:A.value,cooked:A.cooked},A.tail))},se.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var T=this.createNode(),A=this.nextToken();return this.finalize(T,new be.TemplateElement({raw:A.value,cooked:A.cooked},A.tail))},se.prototype.parseTemplateLiteral=function(){var T=this.createNode(),A=[],F=[],ee=this.parseTemplateHead();for(F.push(ee);!ee.tail;)A.push(this.parseExpression()),ee=this.parseTemplateElement(),F.push(ee);return this.finalize(T,new be.TemplateLiteral(F,A))},se.prototype.reinterpretExpressionAsPattern=function(T){switch(T.type){case $e.Syntax.Identifier:case $e.Syntax.MemberExpression:case $e.Syntax.RestElement:case $e.Syntax.AssignmentPattern:break;case $e.Syntax.SpreadElement:T.type=$e.Syntax.RestElement,this.reinterpretExpressionAsPattern(T.argument);break;case $e.Syntax.ArrayExpression:T.type=$e.Syntax.ArrayPattern;for(var A=0;A")||this.expect("=>"),T={type:oe,params:[],async:!1};else{var A=this.lookahead,F=[];if(this.match("..."))T=this.parseRestElement(F),this.expect(")"),this.match("=>")||this.expect("=>"),T={type:oe,params:[T],async:!1};else{var ee=!1;if(this.context.isBindingElement=!0,T=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var Ae=[];for(this.context.isAssignmentTarget=!1,Ae.push(T);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var Je=0;Je")||this.expect("=>"),this.context.isBindingElement=!1,Je=0;Je")&&(T.type===$e.Syntax.Identifier&&"yield"===T.name&&(ee=!0,T={type:oe,params:[T],async:!1}),!ee)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),T.type===$e.Syntax.SequenceExpression)for(Je=0;Je")){for(var Ft=0;Ft0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var Ae=[T,this.lookahead],Je=A,St=this.isolateCoverGrammar(this.parseExponentiationExpression),Ft=[Je,F.value,St],Gt=[ee];!((ee=this.binaryPrecedence(this.lookahead))<=0);){for(;Ft.length>2&&ee<=Gt[Gt.length-1];){St=Ft.pop();var yn=Ft.pop();Gt.pop(),Je=Ft.pop(),Ae.pop();var en=this.startNode(Ae[Ae.length-1]);Ft.push(this.finalize(en,new be.BinaryExpression(yn,Je,St)))}Ft.push(this.nextToken().value),Gt.push(ee),Ae.push(this.lookahead),Ft.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var Ai=Ft.length-1;A=Ft[Ai];for(var $r=Ae.pop();Ai>1;){var Ur=Ae.pop();en=this.startNode(Ur,$r&&$r.lineStart),A=this.finalize(en,new be.BinaryExpression(yn=Ft[Ai-1],Ft[Ai-2],A)),Ai-=2,$r=Ur}}return A},se.prototype.parseConditionalExpression=function(){var T=this.lookahead,A=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var F=this.context.allowIn;this.context.allowIn=!0;var ee=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=F,this.expect(":");var Ae=this.isolateCoverGrammar(this.parseAssignmentExpression);A=this.finalize(this.startNode(T),new be.ConditionalExpression(A,ee,Ae)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return A},se.prototype.checkPatternParam=function(T,A){switch(A.type){case $e.Syntax.Identifier:this.validateParam(T,A,A.name);break;case $e.Syntax.RestElement:this.checkPatternParam(T,A.argument);break;case $e.Syntax.AssignmentPattern:this.checkPatternParam(T,A.left);break;case $e.Syntax.ArrayPattern:for(var F=0;F")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var Ae=T.async,Je=this.reinterpretAsCoverFormalsList(T);if(Je){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var St=this.context.strict,Ft=this.context.allowStrictDirective;this.context.allowStrictDirective=Je.simple;var Gt=this.context.allowYield,yn=this.context.await;this.context.allowYield=!0,this.context.await=Ae;var en=this.startNode(A);this.expect("=>");var Ai=void 0;if(this.match("{")){var $r=this.context.allowIn;this.context.allowIn=!0,Ai=this.parseFunctionSourceElements(),this.context.allowIn=$r}else Ai=this.isolateCoverGrammar(this.parseAssignmentExpression);var Ur=Ai.type!==$e.Syntax.BlockStatement;this.context.strict&&Je.firstRestricted&&this.throwUnexpectedToken(Je.firstRestricted,Je.message),this.context.strict&&Je.stricted&&this.tolerateUnexpectedToken(Je.stricted,Je.message),T=this.finalize(en,Ae?new be.AsyncArrowFunctionExpression(Je.params,Ai,Ur):new be.ArrowFunctionExpression(Je.params,Ai,Ur)),this.context.strict=St,this.context.allowStrictDirective=Ft,this.context.allowYield=Gt,this.context.await=yn}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(ze.Messages.InvalidLHSInAssignment),this.context.strict&&T.type===$e.Syntax.Identifier){var ss=T;this.scanner.isRestrictedWord(ss.name)&&this.tolerateUnexpectedToken(F,ze.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(ss.name)&&this.tolerateUnexpectedToken(F,ze.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(T):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var Ya=(F=this.nextToken()).value,dr=this.isolateCoverGrammar(this.parseAssignmentExpression);T=this.finalize(this.startNode(A),new be.AssignmentExpression(Ya,T,dr)),this.context.firstCoverInitializedNameError=null}}return T},se.prototype.parseExpression=function(){var T=this.lookahead,A=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var F=[];for(F.push(A);2!==this.lookahead.type&&this.match(",");)this.nextToken(),F.push(this.isolateCoverGrammar(this.parseAssignmentExpression));A=this.finalize(this.startNode(T),new be.SequenceExpression(F))}return A},se.prototype.parseStatementListItem=function(){var T;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,ze.Messages.IllegalExportDeclaration),T=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,ze.Messages.IllegalImportDeclaration),T=this.parseImportDeclaration();break;case"const":T=this.parseLexicalDeclaration({inFor:!1});break;case"function":T=this.parseFunctionDeclaration();break;case"class":T=this.parseClassDeclaration();break;case"let":T=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:T=this.parseStatement()}else T=this.parseStatement();return T},se.prototype.parseBlock=function(){var T=this.createNode();this.expect("{");for(var A=[];!this.match("}");)A.push(this.parseStatementListItem());return this.expect("}"),this.finalize(T,new be.BlockStatement(A))},se.prototype.parseLexicalBinding=function(T,A){var F=this.createNode(),Ae=this.parsePattern([],T);this.context.strict&&Ae.type===$e.Syntax.Identifier&&this.scanner.isRestrictedWord(Ae.name)&&this.tolerateError(ze.Messages.StrictVarName);var Je=null;return"const"===T?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(ze.Messages.DeclarationMissingInitializer,"const")):(!A.inFor&&Ae.type!==$e.Syntax.Identifier||this.match("="))&&(this.expect("="),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(F,new be.VariableDeclarator(Ae,Je))},se.prototype.parseBindingList=function(T,A){for(var F=[this.parseLexicalBinding(T,A)];this.match(",");)this.nextToken(),F.push(this.parseLexicalBinding(T,A));return F},se.prototype.isLexicalDeclaration=function(){var T=this.scanner.saveState();this.scanner.scanComments();var A=this.scanner.lex();return this.scanner.restoreState(T),3===A.type||7===A.type&&"["===A.value||7===A.type&&"{"===A.value||4===A.type&&"let"===A.value||4===A.type&&"yield"===A.value},se.prototype.parseLexicalDeclaration=function(T){var A=this.createNode(),F=this.nextToken().value;Ie.assert("let"===F||"const"===F,"Lexical declaration must be either let or const");var ee=this.parseBindingList(F,T);return this.consumeSemicolon(),this.finalize(A,new be.VariableDeclaration(ee,F))},se.prototype.parseBindingRestElement=function(T,A){var F=this.createNode();this.expect("...");var ee=this.parsePattern(T,A);return this.finalize(F,new be.RestElement(ee))},se.prototype.parseArrayPattern=function(T,A){var F=this.createNode();this.expect("[");for(var ee=[];!this.match("]");)if(this.match(","))this.nextToken(),ee.push(null);else{if(this.match("...")){ee.push(this.parseBindingRestElement(T,A));break}ee.push(this.parsePatternWithDefault(T,A)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(F,new be.ArrayPattern(ee))},se.prototype.parsePropertyPattern=function(T,A){var St,Ft,F=this.createNode(),ee=!1,Ae=!1;if(3===this.lookahead.type){var Gt=this.lookahead;St=this.parseVariableIdentifier();var yn=this.finalize(F,new be.Identifier(Gt.value));if(this.match("=")){T.push(Gt),Ae=!0,this.nextToken();var en=this.parseAssignmentExpression();Ft=this.finalize(this.startNode(Gt),new be.AssignmentPattern(yn,en))}else this.match(":")?(this.expect(":"),Ft=this.parsePatternWithDefault(T,A)):(T.push(Gt),Ae=!0,Ft=yn)}else ee=this.match("["),St=this.parseObjectPropertyKey(),this.expect(":"),Ft=this.parsePatternWithDefault(T,A);return this.finalize(F,new be.Property("init",St,ee,Ft,!1,Ae))},se.prototype.parseObjectPattern=function(T,A){var F=this.createNode(),ee=[];for(this.expect("{");!this.match("}");)ee.push(this.parsePropertyPattern(T,A)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(F,new be.ObjectPattern(ee))},se.prototype.parsePattern=function(T,A){var F;return this.match("[")?F=this.parseArrayPattern(T,A):this.match("{")?F=this.parseObjectPattern(T,A):(this.matchKeyword("let")&&("const"===A||"let"===A)&&this.tolerateUnexpectedToken(this.lookahead,ze.Messages.LetInLexicalBinding),T.push(this.lookahead),F=this.parseVariableIdentifier(A)),F},se.prototype.parsePatternWithDefault=function(T,A){var F=this.lookahead,ee=this.parsePattern(T,A);if(this.match("=")){this.nextToken();var Ae=this.context.allowYield;this.context.allowYield=!0;var Je=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=Ae,ee=this.finalize(this.startNode(F),new be.AssignmentPattern(ee,Je))}return ee},se.prototype.parseVariableIdentifier=function(T){var A=this.createNode(),F=this.nextToken();return 4===F.type&&"yield"===F.value?this.context.strict?this.tolerateUnexpectedToken(F,ze.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(F):3!==F.type?this.context.strict&&4===F.type&&this.scanner.isStrictModeReservedWord(F.value)?this.tolerateUnexpectedToken(F,ze.Messages.StrictReservedWord):(this.context.strict||"let"!==F.value||"var"!==T)&&this.throwUnexpectedToken(F):(this.context.isModule||this.context.await)&&3===F.type&&"await"===F.value&&this.tolerateUnexpectedToken(F),this.finalize(A,new be.Identifier(F.value))},se.prototype.parseVariableDeclaration=function(T){var A=this.createNode(),ee=this.parsePattern([],"var");this.context.strict&&ee.type===$e.Syntax.Identifier&&this.scanner.isRestrictedWord(ee.name)&&this.tolerateError(ze.Messages.StrictVarName);var Ae=null;return this.match("=")?(this.nextToken(),Ae=this.isolateCoverGrammar(this.parseAssignmentExpression)):ee.type!==$e.Syntax.Identifier&&!T.inFor&&this.expect("="),this.finalize(A,new be.VariableDeclarator(ee,Ae))},se.prototype.parseVariableDeclarationList=function(T){var A={inFor:T.inFor},F=[];for(F.push(this.parseVariableDeclaration(A));this.match(",");)this.nextToken(),F.push(this.parseVariableDeclaration(A));return F},se.prototype.parseVariableStatement=function(){var T=this.createNode();this.expectKeyword("var");var A=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(T,new be.VariableDeclaration(A,"var"))},se.prototype.parseEmptyStatement=function(){var T=this.createNode();return this.expect(";"),this.finalize(T,new be.EmptyStatement)},se.prototype.parseExpressionStatement=function(){var T=this.createNode(),A=this.parseExpression();return this.consumeSemicolon(),this.finalize(T,new be.ExpressionStatement(A))},se.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(ze.Messages.StrictFunction),this.parseStatement()},se.prototype.parseIfStatement=function(){var A,T=this.createNode(),F=null;this.expectKeyword("if"),this.expect("(");var ee=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),A=this.finalize(this.createNode(),new be.EmptyStatement)):(this.expect(")"),A=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),F=this.parseIfClause())),this.finalize(T,new be.IfStatement(ee,A,F))},se.prototype.parseDoWhileStatement=function(){var T=this.createNode();this.expectKeyword("do");var A=this.context.inIteration;this.context.inIteration=!0;var F=this.parseStatement();this.context.inIteration=A,this.expectKeyword("while"),this.expect("(");var ee=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(T,new be.DoWhileStatement(F,ee))},se.prototype.parseWhileStatement=function(){var A,T=this.createNode();this.expectKeyword("while"),this.expect("(");var F=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),A=this.finalize(this.createNode(),new be.EmptyStatement);else{this.expect(")");var ee=this.context.inIteration;this.context.inIteration=!0,A=this.parseStatement(),this.context.inIteration=ee}return this.finalize(T,new be.WhileStatement(F,A))},se.prototype.parseForStatement=function(){var Ae,Je,Ur,T=null,A=null,F=null,ee=!0,St=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){T=this.createNode(),this.nextToken();var Ft=this.context.allowIn;this.context.allowIn=!1;var Gt=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=Ft,1===Gt.length&&this.matchKeyword("in")){var yn=Gt[0];yn.init&&(yn.id.type===$e.Syntax.ArrayPattern||yn.id.type===$e.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(ze.Messages.ForInOfLoopInitializer,"for-in"),T=this.finalize(T,new be.VariableDeclaration(Gt,"var")),this.nextToken(),Ae=T,Je=this.parseExpression(),T=null}else 1===Gt.length&&null===Gt[0].init&&this.matchContextualKeyword("of")?(T=this.finalize(T,new be.VariableDeclaration(Gt,"var")),this.nextToken(),Ae=T,Je=this.parseAssignmentExpression(),T=null,ee=!1):(T=this.finalize(T,new be.VariableDeclaration(Gt,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){T=this.createNode();var en=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(Ft=this.context.allowIn,this.context.allowIn=!1,Gt=this.parseBindingList(en,{inFor:!0}),this.context.allowIn=Ft,1===Gt.length&&null===Gt[0].init&&this.matchKeyword("in")?(T=this.finalize(T,new be.VariableDeclaration(Gt,en)),this.nextToken(),Ae=T,Je=this.parseExpression(),T=null):1===Gt.length&&null===Gt[0].init&&this.matchContextualKeyword("of")?(T=this.finalize(T,new be.VariableDeclaration(Gt,en)),this.nextToken(),Ae=T,Je=this.parseAssignmentExpression(),T=null,ee=!1):(this.consumeSemicolon(),T=this.finalize(T,new be.VariableDeclaration(Gt,en)))):(T=this.finalize(T,new be.Identifier(en)),this.nextToken(),Ae=T,Je=this.parseExpression(),T=null)}else{var Ai=this.lookahead;if(Ft=this.context.allowIn,this.context.allowIn=!1,T=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=Ft,this.matchKeyword("in"))(!this.context.isAssignmentTarget||T.type===$e.Syntax.AssignmentExpression)&&this.tolerateError(ze.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(T),Ae=T,Je=this.parseExpression(),T=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||T.type===$e.Syntax.AssignmentExpression)&&this.tolerateError(ze.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(T),Ae=T,Je=this.parseAssignmentExpression(),T=null,ee=!1;else{if(this.match(",")){for(var $r=[T];this.match(",");)this.nextToken(),$r.push(this.isolateCoverGrammar(this.parseAssignmentExpression));T=this.finalize(this.startNode(Ai),new be.SequenceExpression($r))}this.expect(";")}}if(typeof Ae>"u"&&(this.match(";")||(A=this.parseExpression()),this.expect(";"),this.match(")")||(F=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),Ur=this.finalize(this.createNode(),new be.EmptyStatement);else{this.expect(")");var ss=this.context.inIteration;this.context.inIteration=!0,Ur=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=ss}return this.finalize(St,typeof Ae>"u"?new be.ForStatement(T,A,F,Ur):ee?new be.ForInStatement(Ae,Je,Ur):new be.ForOfStatement(Ae,Je,Ur))},se.prototype.parseContinueStatement=function(){var T=this.createNode();this.expectKeyword("continue");var A=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var F=this.parseVariableIdentifier();A=F,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+F.name)||this.throwError(ze.Messages.UnknownLabel,F.name)}return this.consumeSemicolon(),null===A&&!this.context.inIteration&&this.throwError(ze.Messages.IllegalContinue),this.finalize(T,new be.ContinueStatement(A))},se.prototype.parseBreakStatement=function(){var T=this.createNode();this.expectKeyword("break");var A=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var F=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+F.name)||this.throwError(ze.Messages.UnknownLabel,F.name),A=F}return this.consumeSemicolon(),null===A&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(ze.Messages.IllegalBreak),this.finalize(T,new be.BreakStatement(A))},se.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(ze.Messages.IllegalReturn);var T=this.createNode();this.expectKeyword("return");var F=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(T,new be.ReturnStatement(F))},se.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(ze.Messages.StrictModeWith);var A,T=this.createNode();this.expectKeyword("with"),this.expect("(");var F=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),A=this.finalize(this.createNode(),new be.EmptyStatement)):(this.expect(")"),A=this.parseStatement()),this.finalize(T,new be.WithStatement(F,A))},se.prototype.parseSwitchCase=function(){var A,T=this.createNode();this.matchKeyword("default")?(this.nextToken(),A=null):(this.expectKeyword("case"),A=this.parseExpression()),this.expect(":");for(var F=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)F.push(this.parseStatementListItem());return this.finalize(T,new be.SwitchCase(A,F))},se.prototype.parseSwitchStatement=function(){var T=this.createNode();this.expectKeyword("switch"),this.expect("(");var A=this.parseExpression();this.expect(")");var F=this.context.inSwitch;this.context.inSwitch=!0;var ee=[],Ae=!1;for(this.expect("{");!this.match("}");){var Je=this.parseSwitchCase();null===Je.test&&(Ae&&this.throwError(ze.Messages.MultipleDefaultsInSwitch),Ae=!0),ee.push(Je)}return this.expect("}"),this.context.inSwitch=F,this.finalize(T,new be.SwitchStatement(A,ee))},se.prototype.parseLabelledStatement=function(){var F,T=this.createNode(),A=this.parseExpression();if(A.type===$e.Syntax.Identifier&&this.match(":")){this.nextToken();var ee=A,Ae="$"+ee.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,Ae)&&this.throwError(ze.Messages.Redeclaration,"Label",ee.name),this.context.labelSet[Ae]=!0;var Je=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),Je=this.parseClassDeclaration();else if(this.matchKeyword("function")){var St=this.lookahead,Ft=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(St,ze.Messages.StrictFunction):Ft.generator&&this.tolerateUnexpectedToken(St,ze.Messages.GeneratorInLegacyContext),Je=Ft}else Je=this.parseStatement();delete this.context.labelSet[Ae],F=new be.LabeledStatement(ee,Je)}else this.consumeSemicolon(),F=new be.ExpressionStatement(A);return this.finalize(T,F)},se.prototype.parseThrowStatement=function(){var T=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(ze.Messages.NewlineAfterThrow);var A=this.parseExpression();return this.consumeSemicolon(),this.finalize(T,new be.ThrowStatement(A))},se.prototype.parseCatchClause=function(){var T=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var A=[],F=this.parsePattern(A),ee={},Ae=0;Ae0&&this.tolerateError(ze.Messages.BadGetterArity);var Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(T,new be.FunctionExpression(null,ee.params,Ae,false))},se.prototype.parseSetterMethod=function(){var T=this.createNode(),F=this.context.allowYield;this.context.allowYield=!0;var ee=this.parseFormalParameters();1!==ee.params.length?this.tolerateError(ze.Messages.BadSetterArity):ee.params[0]instanceof be.RestElement&&this.tolerateError(ze.Messages.BadSetterRestParameter);var Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(T,new be.FunctionExpression(null,ee.params,Ae,false))},se.prototype.parseGeneratorMethod=function(){var T=this.createNode(),F=this.context.allowYield;this.context.allowYield=!0;var ee=this.parseFormalParameters();this.context.allowYield=!1;var Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(T,new be.FunctionExpression(null,ee.params,Ae,!0))},se.prototype.isStartOfExpression=function(){var T=!0,A=this.lookahead.value;switch(this.lookahead.type){case 7:T="["===A||"("===A||"{"===A||"+"===A||"-"===A||"!"===A||"~"===A||"++"===A||"--"===A||"/"===A||"/="===A;break;case 4:T="class"===A||"delete"===A||"function"===A||"let"===A||"new"===A||"super"===A||"this"===A||"typeof"===A||"void"===A||"yield"===A}return T},se.prototype.parseYieldExpression=function(){var T=this.createNode();this.expectKeyword("yield");var A=null,F=!1;if(!this.hasLineTerminator){var ee=this.context.allowYield;this.context.allowYield=!1,(F=this.match("*"))?(this.nextToken(),A=this.parseAssignmentExpression()):this.isStartOfExpression()&&(A=this.parseAssignmentExpression()),this.context.allowYield=ee}return this.finalize(T,new be.YieldExpression(A,F))},se.prototype.parseClassElement=function(T){var A=this.lookahead,F=this.createNode(),ee="",Ae=null,Je=null,St=!1,Ft=!1,Gt=!1,yn=!1;if(this.match("*"))this.nextToken();else if(St=this.match("["),"static"===(Ae=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(A=this.lookahead,Gt=!0,St=this.match("["),this.match("*")?this.nextToken():Ae=this.parseObjectPropertyKey()),3===A.type&&!this.hasLineTerminator&&"async"===A.value){var Ai=this.lookahead.value;":"!==Ai&&"("!==Ai&&"*"!==Ai&&(yn=!0,A=this.lookahead,Ae=this.parseObjectPropertyKey(),3===A.type&&"constructor"===A.value&&this.tolerateUnexpectedToken(A,ze.Messages.ConstructorIsAsync))}var $r=this.qualifiedPropertyName(this.lookahead);return 3===A.type?"get"===A.value&&$r?(ee="get",St=this.match("["),Ae=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod()):"set"===A.value&&$r&&(ee="set",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseSetterMethod()):7===A.type&&"*"===A.value&&$r&&(ee="init",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),Ft=!0),!ee&&Ae&&this.match("(")&&(ee="init",Je=yn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),Ft=!0),ee||this.throwUnexpectedToken(this.lookahead),"init"===ee&&(ee="method"),St||(Gt&&this.isPropertyKey(Ae,"prototype")&&this.throwUnexpectedToken(A,ze.Messages.StaticPrototype),!Gt&&this.isPropertyKey(Ae,"constructor")&&(("method"!==ee||!Ft||Je&&Je.generator)&&this.throwUnexpectedToken(A,ze.Messages.ConstructorSpecialMethod),T.value?this.throwUnexpectedToken(A,ze.Messages.DuplicateConstructor):T.value=!0,ee="constructor")),this.finalize(F,new be.MethodDefinition(Ae,St,Je,ee,Gt))},se.prototype.parseClassElementList=function(){var T=[],A={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():T.push(this.parseClassElement(A));return this.expect("}"),T},se.prototype.parseClassBody=function(){var T=this.createNode(),A=this.parseClassElementList();return this.finalize(T,new be.ClassBody(A))},se.prototype.parseClassDeclaration=function(T){var A=this.createNode(),F=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var ee=T&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),Ae=null;this.matchKeyword("extends")&&(this.nextToken(),Ae=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Je=this.parseClassBody();return this.context.strict=F,this.finalize(A,new be.ClassDeclaration(ee,Ae,Je))},se.prototype.parseClassExpression=function(){var T=this.createNode(),A=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var F=3===this.lookahead.type?this.parseVariableIdentifier():null,ee=null;this.matchKeyword("extends")&&(this.nextToken(),ee=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Ae=this.parseClassBody();return this.context.strict=A,this.finalize(T,new be.ClassExpression(F,ee,Ae))},se.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var T=this.createNode(),A=this.parseDirectivePrologues();2!==this.lookahead.type;)A.push(this.parseStatementListItem());return this.finalize(T,new be.Module(A))},se.prototype.parseScript=function(){for(var T=this.createNode(),A=this.parseDirectivePrologues();2!==this.lookahead.type;)A.push(this.parseStatementListItem());return this.finalize(T,new be.Script(A))},se.prototype.parseModuleSpecifier=function(){var T=this.createNode();8!==this.lookahead.type&&this.throwError(ze.Messages.InvalidModuleSpecifier);var A=this.nextToken(),F=this.getTokenRaw(A);return this.finalize(T,new be.Literal(A.value,F))},se.prototype.parseImportSpecifier=function(){var A,F,T=this.createNode();return 3===this.lookahead.type?(F=A=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),F=this.parseVariableIdentifier())):(F=A=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),F=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(T,new be.ImportSpecifier(F,A))},se.prototype.parseNamedImports=function(){this.expect("{");for(var T=[];!this.match("}");)T.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),T},se.prototype.parseImportDefaultSpecifier=function(){var T=this.createNode(),A=this.parseIdentifierName();return this.finalize(T,new be.ImportDefaultSpecifier(A))},se.prototype.parseImportNamespaceSpecifier=function(){var T=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(ze.Messages.NoAsAfterImportNamespace),this.nextToken();var A=this.parseIdentifierName();return this.finalize(T,new be.ImportNamespaceSpecifier(A))},se.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(ze.Messages.IllegalImportDeclaration);var T=this.createNode();this.expectKeyword("import");var A,F=[];return 8===this.lookahead.type||(this.match("{")?F=F.concat(this.parseNamedImports()):this.match("*")?F.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(F.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?F.push(this.parseImportNamespaceSpecifier()):this.match("{")?F=F.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?ze.Messages.UnexpectedToken:ze.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),A=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(T,new be.ImportDeclaration(F,A))},se.prototype.parseExportSpecifier=function(){var T=this.createNode(),A=this.parseIdentifierName(),F=A;return this.matchContextualKeyword("as")&&(this.nextToken(),F=this.parseIdentifierName()),this.finalize(T,new be.ExportSpecifier(A,F))},se.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(ze.Messages.IllegalExportDeclaration);var A,T=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var F=this.parseFunctionDeclaration(!0);A=this.finalize(T,new be.ExportDefaultDeclaration(F))}else this.matchKeyword("class")?(F=this.parseClassDeclaration(!0),A=this.finalize(T,new be.ExportDefaultDeclaration(F))):this.matchContextualKeyword("async")?(F=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),A=this.finalize(T,new be.ExportDefaultDeclaration(F))):(this.matchContextualKeyword("from")&&this.throwError(ze.Messages.UnexpectedToken,this.lookahead.value),F=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),A=this.finalize(T,new be.ExportDefaultDeclaration(F)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?ze.Messages.UnexpectedToken:ze.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var Ae=this.parseModuleSpecifier();this.consumeSemicolon(),A=this.finalize(T,new be.ExportAllDeclaration(Ae))}else if(4===this.lookahead.type){switch(F=void 0,this.lookahead.value){case"let":case"const":F=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":F=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}A=this.finalize(T,new be.ExportNamedDeclaration(F,[],null))}else if(this.matchAsyncFunction())F=this.parseFunctionDeclaration(),A=this.finalize(T,new be.ExportNamedDeclaration(F,[],null));else{var Je=[],St=null,Ft=!1;for(this.expect("{");!this.match("}");)Ft=Ft||this.matchKeyword("default"),Je.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),St=this.parseModuleSpecifier(),this.consumeSemicolon()):Ft?this.throwError(this.lookahead.value?ze.Messages.UnexpectedToken:ze.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),A=this.finalize(T,new be.ExportNamedDeclaration(null,Je,St))}return A},se}();ke.Parser=ce},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.assert=function nt(Ie,ct){if(!Ie)throw new Error("ASSERT: "+ct)}},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var nt=function(){function Ie(){this.errors=[],this.tolerant=!1}return Ie.prototype.recordError=function(ct){this.errors.push(ct)},Ie.prototype.tolerate=function(ct){if(!this.tolerant)throw ct;this.recordError(ct)},Ie.prototype.constructError=function(ct,ze){var be=new Error(ct);try{throw be}catch(Ze){Object.create&&Object.defineProperty&&(be=Object.create(Ze),Object.defineProperty(be,"column",{value:ze}))}return be},Ie.prototype.createError=function(ct,ze,be,Ze){var ge=this.constructError("Line "+ze+": "+Ze,be);return ge.index=ct,ge.lineNumber=ze,ge.description=Ze,ge},Ie.prototype.throwError=function(ct,ze,be,Ze){throw this.createError(ct,ze,be,Ze)},Ie.prototype.tolerateError=function(ct,ze,be,Ze){var $e=this.createError(ct,ze,be,Ze);if(!this.tolerant)throw $e;this.recordError($e)},Ie}();ke.ErrorHandler=nt},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(9),ct=nt(4),ze=nt(11);function be(ge){return"0123456789abcdef".indexOf(ge.toLowerCase())}function Ze(ge){return"01234567".indexOf(ge)}var $e=function(){function ge(oe,ce){this.source=oe,this.errorHandler=ce,this.trackComment=!1,this.isModule=!1,this.length=oe.length,this.index=0,this.lineNumber=oe.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return ge.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},ge.prototype.restoreState=function(oe){this.index=oe.index,this.lineNumber=oe.lineNumber,this.lineStart=oe.lineStart},ge.prototype.eof=function(){return this.index>=this.length},ge.prototype.throwUnexpectedToken=function(oe){return void 0===oe&&(oe=ze.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,oe)},ge.prototype.tolerateUnexpectedToken=function(oe){void 0===oe&&(oe=ze.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,oe)},ge.prototype.skipSingleLineComment=function(oe){var se,T,ce=[];for(this.trackComment&&(ce=[],se=this.index-oe,T={start:{line:this.lineNumber,column:this.index-this.lineStart-oe},end:{}});!this.eof();){var A=this.source.charCodeAt(this.index);if(++this.index,ct.Character.isLineTerminator(A))return this.trackComment&&(T.end={line:this.lineNumber,column:this.index-this.lineStart-1},ce.push({multiLine:!1,slice:[se+oe,this.index-1],range:[se,this.index-1],loc:T})),13===A&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ce}return this.trackComment&&(T.end={line:this.lineNumber,column:this.index-this.lineStart},ce.push({multiLine:!1,slice:[se+oe,this.index],range:[se,this.index],loc:T})),ce},ge.prototype.skipMultiLineComment=function(){var ce,se,oe=[];for(this.trackComment&&(oe=[],ce=this.index-2,se={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var T=this.source.charCodeAt(this.index);if(ct.Character.isLineTerminator(T))13===T&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===T){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(se.end={line:this.lineNumber,column:this.index-this.lineStart},oe.push({multiLine:!0,slice:[ce+2,this.index-2],range:[ce,this.index],loc:se})),oe;++this.index}else++this.index}return this.trackComment&&(se.end={line:this.lineNumber,column:this.index-this.lineStart},oe.push({multiLine:!0,slice:[ce+2,this.index],range:[ce,this.index],loc:se})),this.tolerateUnexpectedToken(),oe},ge.prototype.scanComments=function(){var oe;this.trackComment&&(oe=[]);for(var ce=0===this.index;!this.eof();){var se=this.source.charCodeAt(this.index);if(ct.Character.isWhiteSpace(se))++this.index;else if(ct.Character.isLineTerminator(se))++this.index,13===se&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ce=!0;else if(47===se)if(47===(se=this.source.charCodeAt(this.index+1))){this.index+=2;var T=this.skipSingleLineComment(2);this.trackComment&&(oe=oe.concat(T)),ce=!0}else{if(42!==se)break;this.index+=2,T=this.skipMultiLineComment(),this.trackComment&&(oe=oe.concat(T))}else if(ce&&45===se){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,T=this.skipSingleLineComment(3),this.trackComment&&(oe=oe.concat(T))}else{if(60!==se||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,T=this.skipSingleLineComment(4),this.trackComment&&(oe=oe.concat(T))}}return oe},ge.prototype.isFutureReservedWord=function(oe){switch(oe){case"enum":case"export":case"import":case"super":return!0;default:return!1}},ge.prototype.isStrictModeReservedWord=function(oe){switch(oe){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},ge.prototype.isRestrictedWord=function(oe){return"eval"===oe||"arguments"===oe},ge.prototype.isKeyword=function(oe){switch(oe.length){case 2:return"if"===oe||"in"===oe||"do"===oe;case 3:return"var"===oe||"for"===oe||"new"===oe||"try"===oe||"let"===oe;case 4:return"this"===oe||"else"===oe||"case"===oe||"void"===oe||"with"===oe||"enum"===oe;case 5:return"while"===oe||"break"===oe||"catch"===oe||"throw"===oe||"const"===oe||"yield"===oe||"class"===oe||"super"===oe;case 6:return"return"===oe||"typeof"===oe||"delete"===oe||"switch"===oe||"export"===oe||"import"===oe;case 7:return"default"===oe||"finally"===oe||"extends"===oe;case 8:return"function"===oe||"continue"===oe||"debugger"===oe;case 10:return"instanceof"===oe;default:return!1}},ge.prototype.codePointAt=function(oe){var ce=this.source.charCodeAt(oe);if(ce>=55296&&ce<=56319){var se=this.source.charCodeAt(oe+1);se>=56320&&se<=57343&&(ce=1024*(ce-55296)+se-56320+65536)}return ce},ge.prototype.scanHexEscape=function(oe){for(var ce="u"===oe?4:2,se=0,T=0;T1114111||"}"!==oe)&&this.throwUnexpectedToken(),ct.Character.fromCodePoint(ce)},ge.prototype.getIdentifier=function(){for(var oe=this.index++;!this.eof();){var ce=this.source.charCodeAt(this.index);if(92===ce)return this.index=oe,this.getComplexIdentifier();if(ce>=55296&&ce<57343)return this.index=oe,this.getComplexIdentifier();if(!ct.Character.isIdentifierPart(ce))break;++this.index}return this.source.slice(oe,this.index)},ge.prototype.getComplexIdentifier=function(){var se,oe=this.codePointAt(this.index),ce=ct.Character.fromCodePoint(oe);for(this.index+=ce.length,92===oe&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,se=this.scanUnicodeCodePointEscape()):(null===(se=this.scanHexEscape("u"))||"\\"===se||!ct.Character.isIdentifierStart(se.charCodeAt(0)))&&this.throwUnexpectedToken(),ce=se);!this.eof()&&(oe=this.codePointAt(this.index),ct.Character.isIdentifierPart(oe));)ce+=se=ct.Character.fromCodePoint(oe),this.index+=se.length,92===oe&&(ce=ce.substr(0,ce.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,se=this.scanUnicodeCodePointEscape()):(null===(se=this.scanHexEscape("u"))||"\\"===se||!ct.Character.isIdentifierPart(se.charCodeAt(0)))&&this.throwUnexpectedToken(),ce+=se);return ce},ge.prototype.octalToDecimal=function(oe){var ce="0"!==oe,se=Ze(oe);return!this.eof()&&ct.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ce=!0,se=8*se+Ze(this.source[this.index++]),"0123".indexOf(oe)>=0&&!this.eof()&&ct.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(se=8*se+Ze(this.source[this.index++]))),{code:se,octal:ce}},ge.prototype.scanIdentifier=function(){var oe,ce=this.index,se=92===this.source.charCodeAt(ce)?this.getComplexIdentifier():this.getIdentifier();if(3!=(oe=1===se.length?3:this.isKeyword(se)?4:"null"===se?5:"true"===se||"false"===se?1:3)&&ce+se.length!==this.index){var T=this.index;this.index=ce,this.tolerateUnexpectedToken(ze.Messages.InvalidEscapedReservedWord),this.index=T}return{type:oe,value:se,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ce,end:this.index}},ge.prototype.scanPunctuator=function(){var oe=this.index,ce=this.source[this.index];switch(ce){case"(":case"{":"{"===ce&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,ce="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(ce=this.source.substr(this.index,4))?this.index+=4:"==="===(ce=ce.substr(0,3))||"!=="===ce||">>>"===ce||"<<="===ce||">>="===ce||"**="===ce?this.index+=3:"&&"===(ce=ce.substr(0,2))||"||"===ce||"=="===ce||"!="===ce||"+="===ce||"-="===ce||"*="===ce||"/="===ce||"++"===ce||"--"===ce||"<<"===ce||">>"===ce||"&="===ce||"|="===ce||"^="===ce||"%="===ce||"<="===ce||">="===ce||"=>"===ce||"**"===ce?this.index+=2:"<>=!+-*%&|^/".indexOf(ce=this.source[this.index])>=0&&++this.index}return this.index===oe&&this.throwUnexpectedToken(),{type:7,value:ce,lineNumber:this.lineNumber,lineStart:this.lineStart,start:oe,end:this.index}},ge.prototype.scanHexLiteral=function(oe){for(var ce="";!this.eof()&&ct.Character.isHexDigit(this.source.charCodeAt(this.index));)ce+=this.source[this.index++];return 0===ce.length&&this.throwUnexpectedToken(),ct.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+ce,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:oe,end:this.index}},ge.prototype.scanBinaryLiteral=function(oe){for(var se,ce="";!this.eof()&&("0"===(se=this.source[this.index])||"1"===se);)ce+=this.source[this.index++];return 0===ce.length&&this.throwUnexpectedToken(),this.eof()||(se=this.source.charCodeAt(this.index),(ct.Character.isIdentifierStart(se)||ct.Character.isDecimalDigit(se))&&this.throwUnexpectedToken()),{type:6,value:parseInt(ce,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:oe,end:this.index}},ge.prototype.scanOctalLiteral=function(oe,ce){var se="",T=!1;for(ct.Character.isOctalDigit(oe.charCodeAt(0))?(T=!0,se="0"+this.source[this.index++]):++this.index;!this.eof()&&ct.Character.isOctalDigit(this.source.charCodeAt(this.index));)se+=this.source[this.index++];return!T&&0===se.length&&this.throwUnexpectedToken(),(ct.Character.isIdentifierStart(this.source.charCodeAt(this.index))||ct.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(se,8),octal:T,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ce,end:this.index}},ge.prototype.isImplicitOctalLiteral=function(){for(var oe=this.index+1;oe=0&&(T=T.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(F,ee,Ae){var Je=parseInt(ee||Ae,16);return Je>1114111&&A.throwUnexpectedToken(ze.Messages.InvalidRegExp),Je<=65535?String.fromCharCode(Je):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(T)}catch{this.throwUnexpectedToken(ze.Messages.InvalidRegExp)}try{return new RegExp(oe,ce)}catch{return null}},ge.prototype.scanRegExpBody=function(){var oe=this.source[this.index];Ie.assert("/"===oe,"Regular expression literal must start with a slash");for(var ce=this.source[this.index++],se=!1,T=!1;!this.eof();)if(ce+=oe=this.source[this.index++],"\\"===oe)oe=this.source[this.index++],ct.Character.isLineTerminator(oe.charCodeAt(0))&&this.throwUnexpectedToken(ze.Messages.UnterminatedRegExp),ce+=oe;else if(ct.Character.isLineTerminator(oe.charCodeAt(0)))this.throwUnexpectedToken(ze.Messages.UnterminatedRegExp);else if(se)"]"===oe&&(se=!1);else{if("/"===oe){T=!0;break}"["===oe&&(se=!0)}return T||this.throwUnexpectedToken(ze.Messages.UnterminatedRegExp),ce.substr(1,ce.length-2)},ge.prototype.scanRegExpFlags=function(){for(var ce="";!this.eof();){var se=this.source[this.index];if(!ct.Character.isIdentifierPart(se.charCodeAt(0)))break;if(++this.index,"\\"!==se||this.eof())ce+=se;else if("u"===(se=this.source[this.index])){++this.index;var T=this.index,A=this.scanHexEscape("u");if(null!==A)for(ce+=A;T=55296&&oe<57343&&ct.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},ge}();ke.Scanner=$e},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.TokenName={},ke.TokenName[1]="Boolean",ke.TokenName[2]="",ke.TokenName[3]="Identifier",ke.TokenName[4]="Keyword",ke.TokenName[5]="Null",ke.TokenName[6]="Numeric",ke.TokenName[7]="Punctuator",ke.TokenName[8]="String",ke.TokenName[9]="RegularExpression",ke.TokenName[10]="Template"},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(10),ct=nt(12),ze=nt(13),be=function(){function $e(){this.values=[],this.curly=this.paren=-1}return $e.prototype.beforeFunctionExpression=function(ge){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(ge)>=0},$e.prototype.isRegexStart=function(){var ge=this.values[this.values.length-1],oe=null!==ge;switch(ge){case"this":case"]":oe=!1;break;case")":var ce=this.values[this.paren-1];oe="if"===ce||"while"===ce||"for"===ce||"with"===ce;break;case"}":if(oe=!1,"function"===this.values[this.curly-3])oe=!!(se=this.values[this.curly-4])&&!this.beforeFunctionExpression(se);else if("function"===this.values[this.curly-4]){var se;oe=!(se=this.values[this.curly-5])||!this.beforeFunctionExpression(se)}}return oe},$e.prototype.push=function(ge){7===ge.type||4===ge.type?("{"===ge.value?this.curly=this.values.length:"("===ge.value&&(this.paren=this.values.length),this.values.push(ge.value)):this.values.push(null)},$e}(),Ze=function(){function $e(ge,oe){this.errorHandler=new Ie.ErrorHandler,this.errorHandler.tolerant=!!oe&&"boolean"==typeof oe.tolerant&&oe.tolerant,this.scanner=new ct.Scanner(ge,this.errorHandler),this.scanner.trackComment=!!oe&&"boolean"==typeof oe.comment&&oe.comment,this.trackRange=!!oe&&"boolean"==typeof oe.range&&oe.range,this.trackLoc=!!oe&&"boolean"==typeof oe.loc&&oe.loc,this.buffer=[],this.reader=new be}return $e.prototype.errors=function(){return this.errorHandler.errors},$e.prototype.getNextToken=function(){if(0===this.buffer.length){var ge=this.scanner.scanComments();if(this.scanner.trackComment)for(var oe=0;oe=se.status}function Ze(ce){try{ce.dispatchEvent(new MouseEvent("click"))}catch{var se=document.createEvent("MouseEvents");se.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),ce.dispatchEvent(se)}}var $e="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,ge=$e.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),oe=$e.saveAs||("object"!=typeof window||window!==$e?function(){}:"download"in HTMLAnchorElement.prototype&&!ge?function(ce,se,T){var A=$e.URL||$e.webkitURL,F=document.createElement("a");F.download=se=se||ce.name||"download",F.rel="noopener","string"==typeof ce?(F.href=ce,F.origin===location.origin?Ze(F):be(F.href)?ze(ce,se,T):Ze(F,F.target="_blank")):(F.href=A.createObjectURL(ce),setTimeout(function(){A.revokeObjectURL(F.href)},4e4),setTimeout(function(){Ze(F)},0))}:"msSaveOrOpenBlob"in navigator?function(ce,se,T){if(se=se||ce.name||"download","string"!=typeof ce)navigator.msSaveOrOpenBlob(function ct(ce,se){return typeof se>"u"?se={autoBom:!1}:"object"!=typeof se&&(console.warn("Deprecated: Expected third argument to be a object"),se={autoBom:!se}),se.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(ce.type)?new Blob(["\ufeff",ce],{type:ce.type}):ce}(ce,T),se);else if(be(ce))ze(ce,se,T);else{var A=document.createElement("a");A.href=ce,A.target="_blank",setTimeout(function(){Ze(A)})}}:function(ce,se,T,A){if((A=A||open("","_blank"))&&(A.document.title=A.document.body.innerText="downloading..."),"string"==typeof ce)return ze(ce,se,T);var F="application/octet-stream"===ce.type,ee=/constructor/i.test($e.HTMLElement)||$e.safari,Ae=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ae||F&&ee||ge)&&typeof FileReader<"u"){var Je=new FileReader;Je.onloadend=function(){var Gt=Je.result;Gt=Ae?Gt:Gt.replace(/^data:[^;]*;/,"data:attachment/file;"),A?A.location.href=Gt:location=Gt,A=null},Je.readAsDataURL(ce)}else{var St=$e.URL||$e.webkitURL,Ft=St.createObjectURL(ce);A?A.location=Ft:location.href=Ft,A=null,setTimeout(function(){St.revokeObjectURL(Ft)},4e4)}});$e.saveAs=oe.saveAs=oe,Yt.exports=oe})?ke.apply(Dn,[]):ke)&&(Yt.exports=Ie)},461:(Yt,Dn)=>{Dn.read=function(ke,nt,Ie,ct,ze){var be,Ze,$e=8*ze-ct-1,ge=(1<<$e)-1,oe=ge>>1,ce=-7,se=Ie?ze-1:0,T=Ie?-1:1,A=ke[nt+se];for(se+=T,be=A&(1<<-ce)-1,A>>=-ce,ce+=$e;ce>0;be=256*be+ke[nt+se],se+=T,ce-=8);for(Ze=be&(1<<-ce)-1,be>>=-ce,ce+=ct;ce>0;Ze=256*Ze+ke[nt+se],se+=T,ce-=8);if(0===be)be=1-oe;else{if(be===ge)return Ze?NaN:1/0*(A?-1:1);Ze+=Math.pow(2,ct),be-=oe}return(A?-1:1)*Ze*Math.pow(2,be-ct)},Dn.write=function(ke,nt,Ie,ct,ze,be){var Ze,$e,ge,oe=8*be-ze-1,ce=(1<>1,T=23===ze?Math.pow(2,-24)-Math.pow(2,-77):0,A=ct?0:be-1,F=ct?1:-1,ee=nt<0||0===nt&&1/nt<0?1:0;for(nt=Math.abs(nt),isNaN(nt)||nt===1/0?($e=isNaN(nt)?1:0,Ze=ce):(Ze=Math.floor(Math.log(nt)/Math.LN2),nt*(ge=Math.pow(2,-Ze))<1&&(Ze--,ge*=2),(nt+=Ze+se>=1?T/ge:T*Math.pow(2,1-se))*ge>=2&&(Ze++,ge/=2),Ze+se>=ce?($e=0,Ze=ce):Ze+se>=1?($e=(nt*ge-1)*Math.pow(2,ze),Ze+=se):($e=nt*Math.pow(2,se-1)*Math.pow(2,ze),Ze=0));ze>=8;ke[Ie+A]=255&$e,A+=F,$e/=256,ze-=8);for(Ze=Ze<0;ke[Ie+A]=255&Ze,A+=F,Ze/=256,oe-=8);ke[Ie+A-F]|=128*ee}},870:(Yt,Dn,ke)=>{"use strict";var nt=ke(133);Yt.exports=nt},133:(Yt,Dn,ke)=>{"use strict";var nt=ke(840),Ie=ke(34);function ct(ze){return function(){throw new Error("Function "+ze+" is deprecated and cannot be used.")}}Yt.exports.Type=ke(647),Yt.exports.Schema=ke(372),Yt.exports.FAILSAFE_SCHEMA=ke(746),Yt.exports.JSON_SCHEMA=ke(147),Yt.exports.CORE_SCHEMA=ke(192),Yt.exports.DEFAULT_SAFE_SCHEMA=ke(31),Yt.exports.DEFAULT_FULL_SCHEMA=ke(94),Yt.exports.load=nt.load,Yt.exports.loadAll=nt.loadAll,Yt.exports.safeLoad=nt.safeLoad,Yt.exports.safeLoadAll=nt.safeLoadAll,Yt.exports.dump=Ie.dump,Yt.exports.safeDump=Ie.safeDump,Yt.exports.YAMLException=ke(314),Yt.exports.MINIMAL_SCHEMA=ke(746),Yt.exports.SAFE_SCHEMA=ke(31),Yt.exports.DEFAULT_SCHEMA=ke(94),Yt.exports.scan=ct("scan"),Yt.exports.parse=ct("parse"),Yt.exports.compose=ct("compose"),Yt.exports.addConstructor=ct("addConstructor")},997:Yt=>{"use strict";function Dn(be){return typeof be>"u"||null===be}Yt.exports.isNothing=Dn,Yt.exports.isObject=function ke(be){return"object"==typeof be&&null!==be},Yt.exports.toArray=function nt(be){return Array.isArray(be)?be:Dn(be)?[]:[be]},Yt.exports.repeat=function ct(be,Ze){var ge,$e="";for(ge=0;ge{"use strict";var nt=ke(997),Ie=ke(314),ct=ke(94),ze=ke(31),be=Object.prototype.toString,Ze=Object.prototype.hasOwnProperty,$e=9,ge=10,oe=13,ce=32,se=33,T=34,A=35,F=37,ee=38,Ae=39,Je=42,St=44,Ft=45,Gt=58,yn=61,en=62,Ai=63,$r=64,Ur=91,ss=93,Ya=96,dr=123,vu=124,Ca=125,_n={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Cd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kn(fe){var mt,Ot,Jt;if(mt=fe.toString(16).toUpperCase(),fe<=255)Ot="x",Jt=2;else if(fe<=65535)Ot="u",Jt=4;else{if(!(fe<=4294967295))throw new Ie("code point within a string may not be greater than 0xFFFFFFFF");Ot="U",Jt=8}return"\\"+Ot+nt.repeat("0",Jt-mt.length)+mt}function Ic(fe){this.schema=fe.schema||ct,this.indent=Math.max(1,fe.indent||2),this.noArrayIndent=fe.noArrayIndent||!1,this.skipInvalid=fe.skipInvalid||!1,this.flowLevel=nt.isNothing(fe.flowLevel)?-1:fe.flowLevel,this.styleMap=function Sd(fe,mt){var Ot,Jt,qt,Pt,cn,Wt,Ge;if(null===mt)return{};for(Ot={},qt=0,Pt=(Jt=Object.keys(mt)).length;qt0?fe.charCodeAt(Pt-1):null,Nr=Nr&&cl(cn,Wt)}else{for(Pt=0;PtJt&&" "!==fe[bn+1],bn=Pt);else if(!Sa(cn))return Xa;Wt=Pt>0?fe.charCodeAt(Pt-1):null,Nr=Nr&&cl(cn,Wt)}qe=qe||_t&&Pt-bn-1>Jt&&" "!==fe[bn+1]}return Ge||qe?Ot>9&&kd(fe)?Xa:qe?_u:Dd:Nr&&!qt(fe)?Nc:Fc}(mt,Jt||fe.flowLevel>-1&&Ot>=fe.flowLevel,fe.indent,Pt,function Wt(Ge){return function _o(fe,mt){var Ot,Jt;for(Ot=0,Jt=fe.implicitTypes.length;Ot"+Ml(mt,fe.indent)+De(yu(function Y(fe,mt){for(var Pt,cn,Ot=/(\n+)([^\n]*)/g,Jt=(qe=void 0,qe=fe.indexOf("\n"),Ot.lastIndex=qe=-1!==qe?qe:fe.length,Q(fe.slice(0,qe),mt)),qt="\n"===fe[0]||" "===fe[0];cn=Ot.exec(fe);){var Ge=cn[2];Pt=" "===Ge[0],Jt+=cn[1]+(qt||Pt||""===Ge?"":"\n")+Q(Ge,mt),qt=Pt}var qe;return Jt}(mt,Pt),qt));case Xa:return'"'+function Ne(fe){for(var Ot,Jt,qt,mt="",Pt=0;Pt=55296&&Ot<=56319&&(Jt=fe.charCodeAt(Pt+1))>=56320&&Jt<=57343?(mt+=Kn(1024*(Ot-55296)+Jt-56320+65536),Pt++):mt+=!(qt=_n[Ot])&&Sa(Ot)?fe[Pt]:qt||Kn(Ot);return mt}(mt)+'"';default:throw new Ie("impossible error: invalid scalar style")}}()}function Ml(fe,mt){var Ot=kd(fe)?String(mt):"",Jt="\n"===fe[fe.length-1];return Ot+(!Jt||"\n"!==fe[fe.length-2]&&"\n"!==fe?Jt?"":"-":"+")+"\n"}function De(fe){return"\n"===fe[fe.length-1]?fe.slice(0,-1):fe}function Q(fe,mt){if(""===fe||" "===fe[0])return fe;for(var Jt,Pt,Ot=/ [^ ]/g,qt=0,cn=0,Wt=0,Ge="";Jt=Ot.exec(fe);)(Wt=Jt.index)-qt>mt&&(Ge+="\n"+fe.slice(qt,Pt=cn>qt?cn:Wt),qt=Pt+1),cn=Wt;return Ge+="\n",(Ge+=fe.length-qt>mt&&cn>qt?fe.slice(qt,cn)+"\n"+fe.slice(cn+1):fe.slice(qt)).slice(1)}function M(fe,mt,Ot){var Jt,qt,Pt,cn,Wt,Ge;for(Pt=0,cn=(qt=Ot?fe.explicitTypes:fe.implicitTypes).length;Pt tag resolver accepts not "'+Ge+'" style');Jt=Wt.represent[Ge](mt,Ge)}fe.dump=Jt}return!0}return!1}function ot(fe,mt,Ot,Jt,qt,Pt){fe.tag=null,fe.dump=Ot,M(fe,Ot,!1)||M(fe,Ot,!0);var cn=be.call(fe.dump);Jt&&(Jt=fe.flowLevel<0||fe.flowLevel>mt);var Ge,qe,Wt="[object Object]"===cn||"[object Array]"===cn;if(Wt&&(qe=-1!==(Ge=fe.duplicates.indexOf(Ot))),(null!==fe.tag&&"?"!==fe.tag||qe||2!==fe.indent&&mt>0)&&(qt=!1),qe&&fe.usedDuplicates[Ge])fe.dump="*ref_"+Ge;else{if(Wt&&qe&&!fe.usedDuplicates[Ge]&&(fe.usedDuplicates[Ge]=!0),"[object Object]"===cn)Jt&&0!==Object.keys(fe.dump).length?(function Zi(fe,mt,Ot,Jt){var Wt,Ge,qe,_t,bn,Nr,qt="",Pt=fe.tag,cn=Object.keys(Ot);if(!0===fe.sortKeys)cn.sort();else if("function"==typeof fe.sortKeys)cn.sort(fe.sortKeys);else if(fe.sortKeys)throw new Ie("sortKeys must be a boolean or a function");for(Wt=0,Ge=cn.length;Wt1024)&&(fe.dump&&ge===fe.dump.charCodeAt(0)?Nr+="?":Nr+="? "),Nr+=fe.dump,bn&&(Nr+=Fo(fe,mt)),ot(fe,mt+1,_t,!0,bn)&&(fe.dump&&ge===fe.dump.charCodeAt(0)?Nr+=":":Nr+=": ",qt+=Nr+=fe.dump));fe.tag=Pt,fe.dump=qt||"{}"}(fe,mt,fe.dump,qt),qe&&(fe.dump="&ref_"+Ge+fe.dump)):(function Kt(fe,mt,Ot){var cn,Wt,Ge,qe,_t,Jt="",qt=fe.tag,Pt=Object.keys(Ot);for(cn=0,Wt=Pt.length;cn1024&&(_t+="? "),_t+=fe.dump+(fe.condenseFlow?'"':"")+":"+(fe.condenseFlow?"":" "),ot(fe,mt,qe,!1,!1)&&(Jt+=_t+=fe.dump));fe.tag=qt,fe.dump="{"+Jt+"}"}(fe,mt,fe.dump),qe&&(fe.dump="&ref_"+Ge+" "+fe.dump));else if("[object Array]"===cn){var _t=fe.noArrayIndent&&mt>0?mt-1:mt;Jt&&0!==fe.dump.length?(function Ht(fe,mt,Ot,Jt){var cn,Wt,qt="",Pt=fe.tag;for(cn=0,Wt=Ot.length;cn "+fe.dump)}return!0}function Dt(fe,mt){var qt,Pt,Ot=[],Jt=[];for(Ut(fe,Ot,Jt),qt=0,Pt=Jt.length;qt{"use strict";function Dn(ke,nt){Error.call(this),this.name="YAMLException",this.reason=ke,this.mark=nt,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Dn.prototype=Object.create(Error.prototype)).constructor=Dn,Dn.prototype.toString=function(nt){var Ie=this.name+": ";return Ie+=this.reason||"(unknown reason)",!nt&&this.mark&&(Ie+=" "+this.mark.toString()),Ie},Yt.exports=Dn},840:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(314),ct=ke(48),ze=ke(31),be=ke(94),Ze=Object.prototype.hasOwnProperty,$e=1,ge=2,oe=3,ce=4,se=1,T=2,A=3,F=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,Ae=/[,\[\]\{\}]/,Je=/^(?:!|!!|![a-z\-]+!)$/i,St=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ft(M){return Object.prototype.toString.call(M)}function Gt(M){return 10===M||13===M}function yn(M){return 9===M||32===M}function en(M){return 9===M||32===M||10===M||13===M}function Ai(M){return 44===M||91===M||93===M||123===M||125===M}function $r(M){var ot;return 48<=M&&M<=57?M-48:97<=(ot=32|M)&&ot<=102?ot-97+10:-1}function Ur(M){return 120===M?2:117===M?4:85===M?8:0}function ss(M){return 48<=M&&M<=57?M-48:-1}function Ya(M){return 48===M?"\0":97===M?"\x07":98===M?"\b":116===M||9===M?"\t":110===M?"\n":118===M?"\v":102===M?"\f":114===M?"\r":101===M?"\x1b":32===M?" ":34===M?'"':47===M?"/":92===M?"\\":78===M?"\x85":95===M?"\xa0":76===M?"\u2028":80===M?"\u2029":""}function dr(M){return M<=65535?String.fromCharCode(M):String.fromCharCode(55296+(M-65536>>10),56320+(M-65536&1023))}for(var vu=new Array(256),Ca=new Array(256),_n=0;_n<256;_n++)vu[_n]=Ya(_n)?1:0,Ca[_n]=Ya(_n);function Cd(M,ot){this.input=M,this.filename=ot.filename||null,this.schema=ot.schema||be,this.onWarning=ot.onWarning||null,this.legacy=ot.legacy||!1,this.json=ot.json||!1,this.listener=ot.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=M.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Sd(M,ot){return new Ie(ot,new ct(M.filename,M.input,M.position,M.line,M.position-M.lineStart))}function Kn(M,ot){throw Sd(M,ot)}function Ic(M,ot){M.onWarning&&M.onWarning.call(null,Sd(M,ot))}var yu={YAML:function(ot,Dt,Ut){var Bt,hn,fe;null!==ot.version&&Kn(ot,"duplication of %YAML directive"),1!==Ut.length&&Kn(ot,"YAML directive accepts exactly one argument"),null===(Bt=/^([0-9]+)\.([0-9]+)$/.exec(Ut[0]))&&Kn(ot,"ill-formed argument of the YAML directive"),hn=parseInt(Bt[1],10),fe=parseInt(Bt[2],10),1!==hn&&Kn(ot,"unacceptable YAML version of the document"),ot.version=Ut[0],ot.checkLineBreaks=fe<2,1!==fe&&2!==fe&&Ic(ot,"unsupported YAML version of the document")},TAG:function(ot,Dt,Ut){var Bt,hn;2!==Ut.length&&Kn(ot,"TAG directive accepts exactly two arguments"),hn=Ut[1],Je.test(Bt=Ut[0])||Kn(ot,"ill-formed tag handle (first argument) of the TAG directive"),Ze.call(ot.tagMap,Bt)&&Kn(ot,'there is a previously declared suffix for "'+Bt+'" tag handle'),St.test(hn)||Kn(ot,"ill-formed tag prefix (second argument) of the TAG directive"),ot.tagMap[Bt]=hn}};function Fo(M,ot,Dt,Ut){var Bt,hn,fe,mt;if(ot1&&(M.result+=nt.repeat("\n",ot-1))}function Xa(M,ot){var Dt,Ot,Ut=M.tag,Bt=M.anchor,hn=[],mt=!1;for(null!==M.anchor&&(M.anchorMap[M.anchor]=hn),Ot=M.input.charCodeAt(M.position);0!==Ot&&45===Ot&&en(M.input.charCodeAt(M.position+1));)if(mt=!0,M.position++,Yr(M,!0,-1)&&M.lineIndent<=ot)hn.push(null),Ot=M.input.charCodeAt(M.position);else if(Dt=M.line,Y(M,ot,oe,!1,!0),hn.push(M.result),Yr(M,!0,-1),Ot=M.input.charCodeAt(M.position),(M.line===Dt||M.lineIndent>ot)&&0!==Ot)Kn(M,"bad indentation of a sequence entry");else if(M.lineIndentot?Ot=1:M.lineIndent===ot?Ot=0:M.lineIndentot?Ot=1:M.lineIndent===ot?Ot=0:M.lineIndentot)&&(Y(M,ot,ce,!0,Bt)&&(Ge?cn=M.result:Wt=M.result),Ge||(io(M,Jt,qt,Pt,cn,Wt,hn,fe),Pt=cn=Wt=null),Yr(M,!0,-1),_t=M.input.charCodeAt(M.position)),M.lineIndent>ot&&0!==_t)Kn(M,"bad indentation of a mapping entry");else if(M.lineIndent=0))break;0===qt?Kn(M,"bad explicit indentation width of a block scalar; it cannot be less than one"):fe?Kn(M,"repeat of an indentation width identifier"):(mt=ot+qt-1,fe=!0)}if(yn(Pt)){do{Pt=M.input.charCodeAt(++M.position)}while(yn(Pt));if(35===Pt)do{Pt=M.input.charCodeAt(++M.position)}while(!Gt(Pt)&&0!==Pt)}for(;0!==Pt;){for(Sa(M),M.lineIndent=0,Pt=M.input.charCodeAt(M.position);(!fe||M.lineIndentmt&&(mt=M.lineIndent),Gt(Pt))Ot++;else{if(M.lineIndent0){for(Bt=fe,hn=0;Bt>0;Bt--)(fe=$r(mt=M.input.charCodeAt(++M.position)))>=0?hn=(hn<<4)+fe:Kn(M,"expected hexadecimal character");M.result+=dr(hn),M.position++}else Kn(M,"unknown escape sequence");Dt=Ut=M.position}else Gt(mt)?(Fo(M,Dt,Ut,!0),Ql(M,Yr(M,!1,ot)),Dt=Ut=M.position):M.position===M.lineStart&&cl(M)?Kn(M,"unexpected end of the document within a double quoted scalar"):(M.position++,Ut=M.position)}Kn(M,"unexpected end of the stream within a double quoted scalar")}(M,Ge)?qt=!0:function De(M){var ot,Dt,Ut;if(42!==(Ut=M.input.charCodeAt(M.position)))return!1;for(Ut=M.input.charCodeAt(++M.position),ot=M.position;0!==Ut&&!en(Ut)&&!Ai(Ut);)Ut=M.input.charCodeAt(++M.position);return M.position===ot&&Kn(M,"name of an alias node must contain at least one character"),Dt=M.input.slice(ot,M.position),Ze.call(M.anchorMap,Dt)||Kn(M,'unidentified alias "'+Dt+'"'),M.result=M.anchorMap[Dt],Yr(M,!0,-1),!0}(M)?(qt=!0,(null!==M.tag||null!==M.anchor)&&Kn(M,"alias node should not have any properties")):function kd(M,ot,Dt){var Bt,hn,fe,mt,Ot,Jt,qt,Wt,Pt=M.kind,cn=M.result;if(en(Wt=M.input.charCodeAt(M.position))||Ai(Wt)||35===Wt||38===Wt||42===Wt||33===Wt||124===Wt||62===Wt||39===Wt||34===Wt||37===Wt||64===Wt||96===Wt||(63===Wt||45===Wt)&&(en(Bt=M.input.charCodeAt(M.position+1))||Dt&&Ai(Bt)))return!1;for(M.kind="scalar",M.result="",hn=fe=M.position,mt=!1;0!==Wt;){if(58===Wt){if(en(Bt=M.input.charCodeAt(M.position+1))||Dt&&Ai(Bt))break}else if(35===Wt){if(en(M.input.charCodeAt(M.position-1)))break}else{if(M.position===M.lineStart&&cl(M)||Dt&&Ai(Wt))break;if(Gt(Wt)){if(Ot=M.line,Jt=M.lineStart,qt=M.lineIndent,Yr(M,!1,-1),M.lineIndent>=ot){mt=!0,Wt=M.input.charCodeAt(M.position);continue}M.position=fe,M.line=Ot,M.lineStart=Jt,M.lineIndent=qt;break}}mt&&(Fo(M,hn,fe,!1),Ql(M,M.line-Ot),hn=fe=M.position,mt=!1),yn(Wt)||(fe=M.position+1),Wt=M.input.charCodeAt(++M.position)}return Fo(M,hn,fe,!1),!!M.result||(M.kind=Pt,M.result=cn,!1)}(M,Ge,$e===Dt)&&(qt=!0,null===M.tag&&(M.tag="?")),null!==M.anchor&&(M.anchorMap[M.anchor]=M.result)):0===Ot&&(qt=mt&&Xa(M,qe))),null!==M.tag&&"!"!==M.tag)if("?"===M.tag){for(null!==M.result&&"scalar"!==M.kind&&Kn(M,'unacceptable node kind for ! tag; it should be "scalar", not "'+M.kind+'"'),Pt=0,cn=M.implicitTypes.length;Pt tag; it should be "'+Wt.kind+'", not "'+M.kind+'"'),Wt.resolve(M.result)?(M.result=Wt.construct(M.result),null!==M.anchor&&(M.anchorMap[M.anchor]=M.result)):Kn(M,"cannot resolve a node with !<"+M.tag+"> explicit tag")):Kn(M,"unknown tag !<"+M.tag+">");return null!==M.listener&&M.listener("close",M),null!==M.tag||null!==M.anchor||qt}function Q(M){var Dt,Ut,Bt,fe,ot=M.position,hn=!1;for(M.version=null,M.checkLineBreaks=M.legacy,M.tagMap={},M.anchorMap={};0!==(fe=M.input.charCodeAt(M.position))&&(Yr(M,!0,-1),fe=M.input.charCodeAt(M.position),!(M.lineIndent>0||37!==fe));){for(hn=!0,fe=M.input.charCodeAt(++M.position),Dt=M.position;0!==fe&&!en(fe);)fe=M.input.charCodeAt(++M.position);for(Bt=[],(Ut=M.input.slice(Dt,M.position)).length<1&&Kn(M,"directive name must not be less than one character in length");0!==fe;){for(;yn(fe);)fe=M.input.charCodeAt(++M.position);if(35===fe){do{fe=M.input.charCodeAt(++M.position)}while(0!==fe&&!Gt(fe));break}if(Gt(fe))break;for(Dt=M.position;0!==fe&&!en(fe);)fe=M.input.charCodeAt(++M.position);Bt.push(M.input.slice(Dt,M.position))}0!==fe&&Sa(M),Ze.call(yu,Ut)?yu[Ut](M,Ut,Bt):Ic(M,'unknown document directive "'+Ut+'"')}Yr(M,!0,-1),0===M.lineIndent&&45===M.input.charCodeAt(M.position)&&45===M.input.charCodeAt(M.position+1)&&45===M.input.charCodeAt(M.position+2)?(M.position+=3,Yr(M,!0,-1)):hn&&Kn(M,"directives end mark is expected"),Y(M,M.lineIndent-1,ce,!1,!0),Yr(M,!0,-1),M.checkLineBreaks&&ee.test(M.input.slice(ot,M.position))&&Ic(M,"non-ASCII line breaks are interpreted as content"),M.documents.push(M.result),M.position===M.lineStart&&cl(M)?46===M.input.charCodeAt(M.position)&&(M.position+=3,Yr(M,!0,-1)):M.position"u"&&(Dt=ot,ot=null);var Ut=Ne(M,Dt);if("function"!=typeof ot)return Ut;for(var Bt=0,hn=Ut.length;Bt"u"&&(Dt=ot,ot=null),et(M,ot,nt.extend({schema:ze},Dt))},Yt.exports.safeLoad=function Zi(M,ot){return Ht(M,nt.extend({schema:ze},ot))}},48:(Yt,Dn,ke)=>{"use strict";var nt=ke(997);function Ie(ct,ze,be,Ze,$e){this.name=ct,this.buffer=ze,this.position=be,this.line=Ze,this.column=$e}Ie.prototype.getSnippet=function(ze,be){var Ze,$e,ge,oe,ce;if(!this.buffer)return null;for(ze=ze||4,be=be||75,Ze="",$e=this.position;$e>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt($e-1));)if(this.position-($e-=1)>be/2-1){Ze=" ... ",$e+=5;break}for(ge="",oe=this.position;oebe/2-1){ge=" ... ",oe-=5;break}return ce=this.buffer.slice($e,oe),nt.repeat(" ",ze)+Ze+ce+ge+"\n"+nt.repeat(" ",ze+this.position-$e+Ze.length)+"^"},Ie.prototype.toString=function(ze){var be,Ze="";return this.name&&(Ze+='in "'+this.name+'" '),Ze+="at line "+(this.line+1)+", column "+(this.column+1),ze||(be=this.getSnippet())&&(Ze+=":\n"+be),Ze},Yt.exports=Ie},372:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(314),ct=ke(647);function ze($e,ge,oe){var ce=[];return $e.include.forEach(function(se){oe=ze(se,ge,oe)}),$e[ge].forEach(function(se){oe.forEach(function(T,A){T.tag===se.tag&&T.kind===se.kind&&ce.push(A)}),oe.push(se)}),oe.filter(function(se,T){return-1===ce.indexOf(T)})}function Ze($e){this.include=$e.include||[],this.implicit=$e.implicit||[],this.explicit=$e.explicit||[],this.implicit.forEach(function(ge){if(ge.loadKind&&"scalar"!==ge.loadKind)throw new Ie("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=ze(this,"implicit",[]),this.compiledExplicit=ze(this,"explicit",[]),this.compiledTypeMap=function be(){var ge,oe,$e={scalar:{},sequence:{},mapping:{},fallback:{}};function ce(se){$e[se.kind][se.tag]=$e.fallback[se.tag]=se}for(ge=0,oe=arguments.length;ge{"use strict";var nt=ke(372);Yt.exports=new nt({include:[ke(147)]})},94:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=nt.DEFAULT=new nt({include:[ke(31)],explicit:[ke(771),ke(632),ke(716)]})},31:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=new nt({include:[ke(192)],implicit:[ke(934),ke(996)],explicit:[ke(486),ke(166),ke(711),ke(738)]})},746:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=new nt({explicit:[ke(464),ke(322),ke(71)]})},147:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=new nt({include:[ke(746)],implicit:[ke(568),ke(911),ke(877),ke(615)]})},647:(Yt,Dn,ke)=>{"use strict";var nt=ke(314),Ie=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],ct=["scalar","sequence","mapping"];Yt.exports=function be(Ze,$e){if($e=$e||{},Object.keys($e).forEach(function(ge){if(-1===Ie.indexOf(ge))throw new nt('Unknown option "'+ge+'" is met in definition of "'+Ze+'" YAML type.')}),this.tag=Ze,this.kind=$e.kind||null,this.resolve=$e.resolve||function(){return!0},this.construct=$e.construct||function(ge){return ge},this.instanceOf=$e.instanceOf||null,this.predicate=$e.predicate||null,this.represent=$e.represent||null,this.defaultStyle=$e.defaultStyle||null,this.styleAliases=function ze(Ze){var $e={};return null!==Ze&&Object.keys(Ze).forEach(function(ge){Ze[ge].forEach(function(oe){$e[String(oe)]=ge})}),$e}($e.styleAliases||null),-1===ct.indexOf(this.kind))throw new nt('Unknown kind "'+this.kind+'" is specified for "'+Ze+'" YAML type.')}},486:(Yt,Dn,ke)=>{"use strict";var nt;try{nt=ke(172).lW}catch{}var ct=ke(647),ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";Yt.exports=new ct("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function be(oe){if(null===oe)return!1;var ce,se,T=0,A=oe.length,F=ze;for(se=0;se64)){if(ce<0)return!1;T+=6}return T%8==0},construct:function Ze(oe){var ce,se,T=oe.replace(/[\r\n=]/g,""),A=T.length,F=ze,ee=0,Ae=[];for(ce=0;ce>16&255),Ae.push(ee>>8&255),Ae.push(255&ee)),ee=ee<<6|F.indexOf(T.charAt(ce));return 0==(se=A%4*6)?(Ae.push(ee>>16&255),Ae.push(ee>>8&255),Ae.push(255&ee)):18===se?(Ae.push(ee>>10&255),Ae.push(ee>>2&255)):12===se&&Ae.push(ee>>4&255),nt?nt.from?nt.from(Ae):new nt(Ae):Ae},predicate:function ge(oe){return nt&&nt.isBuffer(oe)},represent:function $e(oe){var T,A,ce="",se=0,F=oe.length,ee=ze;for(T=0;T>18&63],ce+=ee[se>>12&63],ce+=ee[se>>6&63],ce+=ee[63&se]),se=(se<<8)+oe[T];return 0==(A=F%3)?(ce+=ee[se>>18&63],ce+=ee[se>>12&63],ce+=ee[se>>6&63],ce+=ee[63&se]):2===A?(ce+=ee[se>>10&63],ce+=ee[se>>4&63],ce+=ee[se<<2&63],ce+=ee[64]):1===A&&(ce+=ee[se>>2&63],ce+=ee[se<<4&63],ce+=ee[64],ce+=ee[64]),ce}})},911:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function Ie(be){if(null===be)return!1;var Ze=be.length;return 4===Ze&&("true"===be||"True"===be||"TRUE"===be)||5===Ze&&("false"===be||"False"===be||"FALSE"===be)},construct:function ct(be){return"true"===be||"True"===be||"TRUE"===be},predicate:function ze(be){return"[object Boolean]"===Object.prototype.toString.call(be)},represent:{lowercase:function(be){return be?"true":"false"},uppercase:function(be){return be?"TRUE":"FALSE"},camelcase:function(be){return be?"True":"False"}},defaultStyle:"lowercase"})},615:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(647),ct=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ze=/^[-+]?[0-9]+e/;Yt.exports=new Ie("tag:yaml.org,2002:float",{kind:"scalar",resolve:function ze(oe){return!(null===oe||!ct.test(oe)||"_"===oe[oe.length-1])},construct:function be(oe){var ce,se,T,A;return se="-"===(ce=oe.replace(/_/g,"").toLowerCase())[0]?-1:1,A=[],"+-".indexOf(ce[0])>=0&&(ce=ce.slice(1)),".inf"===ce?1===se?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===ce?NaN:ce.indexOf(":")>=0?(ce.split(":").forEach(function(F){A.unshift(parseFloat(F,10))}),ce=0,T=1,A.forEach(function(F){ce+=F*T,T*=60}),se*ce):se*parseFloat(ce,10)},predicate:function ge(oe){return"[object Number]"===Object.prototype.toString.call(oe)&&(oe%1!=0||nt.isNegativeZero(oe))},represent:function $e(oe,ce){var se;if(isNaN(oe))switch(ce){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===oe)switch(ce){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===oe)switch(ce){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(nt.isNegativeZero(oe))return"-0.0";return se=oe.toString(10),Ze.test(se)?se.replace("e",".e"):se},defaultStyle:"lowercase"})},877:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(647);function ct(oe){return 48<=oe&&oe<=57||65<=oe&&oe<=70||97<=oe&&oe<=102}function ze(oe){return 48<=oe&&oe<=55}function be(oe){return 48<=oe&&oe<=57}Yt.exports=new Ie("tag:yaml.org,2002:int",{kind:"scalar",resolve:function Ze(oe){if(null===oe)return!1;var A,ce=oe.length,se=0,T=!1;if(!ce)return!1;if(("-"===(A=oe[se])||"+"===A)&&(A=oe[++se]),"0"===A){if(se+1===ce)return!0;if("b"===(A=oe[++se])){for(se++;se=0?"0b"+oe.toString(2):"-0b"+oe.toString(2).slice(1)},octal:function(oe){return oe>=0?"0"+oe.toString(8):"-0"+oe.toString(8).slice(1)},decimal:function(oe){return oe.toString(10)},hexadecimal:function(oe){return oe>=0?"0x"+oe.toString(16).toUpperCase():"-0x"+oe.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},716:(Yt,Dn,ke)=>{"use strict";var nt;try{nt=ke(797)}catch{typeof window<"u"&&(nt=window.esprima)}var ct=ke(647);Yt.exports=new ct("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function ze(ge){if(null===ge)return!1;try{var ce=nt.parse("("+ge+")",{range:!0});return!("Program"!==ce.type||1!==ce.body.length||"ExpressionStatement"!==ce.body[0].type||"ArrowFunctionExpression"!==ce.body[0].expression.type&&"FunctionExpression"!==ce.body[0].expression.type)}catch{return!1}},construct:function be(ge){var T,oe="("+ge+")",ce=nt.parse(oe,{range:!0}),se=[];if("Program"!==ce.type||1!==ce.body.length||"ExpressionStatement"!==ce.body[0].type||"ArrowFunctionExpression"!==ce.body[0].expression.type&&"FunctionExpression"!==ce.body[0].expression.type)throw new Error("Failed to resolve function");return ce.body[0].expression.params.forEach(function(A){se.push(A.name)}),T=ce.body[0].expression.body.range,new Function(se,"BlockStatement"===ce.body[0].expression.body.type?oe.slice(T[0]+1,T[1]-1):"return "+oe.slice(T[0],T[1]))},predicate:function $e(ge){return"[object Function]"===Object.prototype.toString.call(ge)},represent:function Ze(ge){return ge.toString()}})},632:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function Ie(Ze){if(null===Ze||0===Ze.length)return!1;var $e=Ze,ge=/\/([gim]*)$/.exec(Ze),oe="";return!("/"===$e[0]&&(ge&&(oe=ge[1]),oe.length>3||"/"!==$e[$e.length-oe.length-1]))},construct:function ct(Ze){var $e=Ze,ge=/\/([gim]*)$/.exec(Ze),oe="";return"/"===$e[0]&&(ge&&(oe=ge[1]),$e=$e.slice(1,$e.length-oe.length-1)),new RegExp($e,oe)},predicate:function be(Ze){return"[object RegExp]"===Object.prototype.toString.call(Ze)},represent:function ze(Ze){var $e="/"+Ze.source+"/";return Ze.global&&($e+="g"),Ze.multiline&&($e+="m"),Ze.ignoreCase&&($e+="i"),$e}})},771:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function Ie(){return!0},construct:function ct(){},predicate:function be(Ze){return typeof Ze>"u"},represent:function ze(){return""}})},71:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Ie){return null!==Ie?Ie:{}}})},996:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Ie(ct){return"<<"===ct||null===ct}})},568:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:function Ie(be){if(null===be)return!0;var Ze=be.length;return 1===Ze&&"~"===be||4===Ze&&("null"===be||"Null"===be||"NULL"===be)},construct:function ct(){return null},predicate:function ze(be){return null===be},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},166:(Yt,Dn,ke)=>{"use strict";var nt=ke(647),Ie=Object.prototype.hasOwnProperty,ct=Object.prototype.toString;Yt.exports=new nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function ze(Ze){if(null===Ze)return!0;var ge,oe,ce,se,T,$e=[],A=Ze;for(ge=0,oe=A.length;ge{"use strict";var nt=ke(647),Ie=Object.prototype.toString;Yt.exports=new nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function ct(be){if(null===be)return!0;var Ze,$e,ge,oe,ce,se=be;for(ce=new Array(se.length),Ze=0,$e=se.length;Ze<$e;Ze+=1){if("[object Object]"!==Ie.call(ge=se[Ze])||1!==(oe=Object.keys(ge)).length)return!1;ce[Ze]=[oe[0],ge[oe[0]]]}return!0},construct:function ze(be){if(null===be)return[];var Ze,$e,ge,oe,ce,se=be;for(ce=new Array(se.length),Ze=0,$e=se.length;Ze<$e;Ze+=1)ge=se[Ze],oe=Object.keys(ge),ce[Ze]=[oe[0],ge[oe[0]]];return ce}})},322:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Ie){return null!==Ie?Ie:[]}})},738:(Yt,Dn,ke)=>{"use strict";var nt=ke(647),Ie=Object.prototype.hasOwnProperty;Yt.exports=new nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:function ct(be){if(null===be)return!0;var Ze,$e=be;for(Ze in $e)if(Ie.call($e,Ze)&&null!==$e[Ze])return!1;return!0},construct:function ze(be){return null!==be?be:{}}})},464:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Ie){return null!==Ie?Ie:""}})},934:(Yt,Dn,ke)=>{"use strict";var nt=ke(647),Ie=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ct=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Yt.exports=new nt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function ze($e){return null!==$e&&(null!==Ie.exec($e)||null!==ct.exec($e))},construct:function be($e){var ge,oe,ce,se,T,A,F,Ft,ee=0,Ae=null;if(null===(ge=Ie.exec($e))&&(ge=ct.exec($e)),null===ge)throw new Error("Date resolve error");if(oe=+ge[1],ce=+ge[2]-1,se=+ge[3],!ge[4])return new Date(Date.UTC(oe,ce,se));if(T=+ge[4],A=+ge[5],F=+ge[6],ge[7]){for(ee=ge[7].slice(0,3);ee.length<3;)ee+="0";ee=+ee}return ge[9]&&(Ae=6e4*(60*+ge[10]+ +(ge[11]||0)),"-"===ge[9]&&(Ae=-Ae)),Ft=new Date(Date.UTC(oe,ce,se,T,A,F,ee)),Ae&&Ft.setTime(Ft.getTime()-Ae),Ft},instanceOf:Date,represent:function Ze($e){return $e.toISOString()}})}},Yt=>{Yt(Yt.s=378)}]); \ No newline at end of file diff --git a/console/ui/dist/prod-nt/static/main.c4960f6b7eee23f1.js b/console/ui/dist/prod-nt/static/main.c4960f6b7eee23f1.js new file mode 100644 index 0000000000..1d184d1996 --- /dev/null +++ b/console/ui/dist/prod-nt/static/main.c4960f6b7eee23f1.js @@ -0,0 +1 @@ +(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{951:(Pg,Bb,Gf)=>{"use strict";function xu(t){return"function"==typeof t}let Wf=!1;const Ia={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Wf&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Wf=t},get useDeprecatedSynchronousErrorHandling(){return Wf}};function Rl(t){setTimeout(()=>{throw t},0)}const qf={closed:!0,next(t){},error(t){if(Ia.useDeprecatedSynchronousErrorHandling)throw t;Rl(t)},complete(){}},nl=Array.isArray||(t=>t&&"number"==typeof t.length);function Na(t){return null!==t&&"object"==typeof t}const Cd=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class pn{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof pn)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof Cd?e.errors:e),[])}pn.EMPTY=((t=new pn).closed=!0,t);const ua="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Ln extends pn{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=qf;break;case 1:if(!n){this.destination=qf;break}if("object"==typeof n){n instanceof Ln?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new Vb(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new Vb(this,n,e,i)}}[ua](){return this}static create(n,e,i){const r=new Ln(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class Vb extends Ln{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;xu(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==qf&&(s=Object.create(e),xu(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;Ia.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=Ia;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):Rl(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;Rl(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);Ia.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),Ia.useDeprecatedSynchronousErrorHandling)throw i;Rl(i)}}__tryOrSetError(n,e,i){if(!Ia.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return Ia.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(Rl(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const _h="function"==typeof Symbol&&Symbol.observable||"@@observable";function bh(t){return t}function fF(t){return 0===t.length?bh:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let ar=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function j0(t,n,e){if(t){if(t instanceof Ln)return t;if(t[ua])return t[ua]()}return t||n||e?new Ln(t,n,e):new Ln(qf)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||Ia.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),Ia.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){Ia.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Hb(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof Ln?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=pF(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[_h](){return this}pipe(...e){return 0===e.length?this:fF(e)(this)}toPromise(e){return new(e=pF(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function pF(t){if(t||(t=Ia.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Rg=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class I0e extends pn{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class gF extends Ln{constructor(n){super(n),this.destination=n}}let hr=(()=>{class t extends ar{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[ua](){return new gF(this)}lift(e){const i=new mF(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Rg;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew mF(n,e),t})();class mF extends hr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):pn.EMPTY}}function Jf(t){return t&&"function"==typeof t.schedule}function xn(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new N0e(t,n))}}class N0e{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new j0e(n,this.project,this.thisArg))}}class j0e extends Ln{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const vF=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function _F(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const uD=t=>{if(t&&"function"==typeof t[_h])return(t=>n=>{const e=t[_h]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(yF(t))return vF(t);if(_F(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Rl),n))(t);if(t&&"function"==typeof t[wh])return(t=>n=>{const e=t[wh]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${Na(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function dD(t,n){return new ar(e=>{const i=new pn;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function Jo(t,n){return n?function z0e(t,n){if(null!=t){if(function H0e(t){return t&&"function"==typeof t[_h]}(t))return function $0e(t,n){return new ar(e=>{const i=new pn;return i.add(n.schedule(()=>{const r=t[_h]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(_F(t))return function B0e(t,n){return new ar(e=>{const i=new pn;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(yF(t))return dD(t,n);if(function U0e(t){return t&&"function"==typeof t[wh]}(t)||"string"==typeof t)return function V0e(t,n){if(!t)throw new Error("Iterable cannot be null");return new ar(e=>{const i=new pn;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[wh](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof ar?t:new ar(uD(t))}class P0 extends Ln{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class R0 extends Ln{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function L0(t,n){if(n.closed)return;if(t instanceof ar)return t.subscribe(n);let e;try{e=uD(t)(n)}catch(i){n.error(i)}return e}function _o(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(_o((r,o)=>Jo(t(r,o)).pipe(xn((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new G0e(t,e)))}class G0e{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new W0e(n,this.project,this.concurrent))}}class W0e extends R0{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function Lg(t=Number.POSITIVE_INFINITY){return _o(bh,t)}function F0(t,n){return n?dD(t,n):new ar(vF(t))}function hD(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Jf(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof ar?t[0]:Lg(n)(F0(t,e))}function Ub(){return function(n){return n.lift(new q0e(n))}}class q0e{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new Y0e(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class Y0e extends Ln{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class fD extends ar{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new pn,n.add(this.source.subscribe(new K0e(this.getSubject(),this))),n.closed&&(this._connection=null,n=pn.EMPTY)),n}refCount(){return Ub()(this)}}const J0e=(()=>{const t=fD.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class K0e extends gF{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class Z0e{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function e1e(){return new hr}function bF(){return t=>Ub()(function Q0e(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new Z0e(r,n));const o=Object.create(i,J0e);return o.source=i,o.subjectFactory=r,o}}(e1e)(t))}function fr(t){for(let n in t)if(t[n]===fr)return n;throw Error("Could not find renamed property on target object.")}function pD(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function br(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(br).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function gD(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const t1e=fr({__forward_ref__:fr});function Fn(t){return t.__forward_ref__=Fn,t.toString=function(){return br(this())},t}function Tn(t){return mD(t)?t():t}function mD(t){return"function"==typeof t&&t.hasOwnProperty(t1e)&&t.__forward_ref__===Fn}function vD(t){return t&&!!t.\u0275providers}const zb="https://g.co/ng/security#xss";class et extends Error{constructor(n,e){super(Gb(n,e)),this.code=n}}function Gb(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Un(t){return"string"==typeof t?t:null==t?"":String(t)}function Wb(t,n){throw new et(-201,!1)}function Ki(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}function Ke(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Dn(t){return{providers:t.providers||[],imports:t.imports||[]}}function qb(t){return wF(t,Yb)||wF(t,CF)}function wF(t,n){return t.hasOwnProperty(n)?t[n]:null}function xF(t){return t&&(t.hasOwnProperty(yD)||t.hasOwnProperty(c1e))?t[yD]:null}const Yb=fr({\u0275prov:fr}),yD=fr({\u0275inj:fr}),CF=fr({ngInjectableDef:fr}),c1e=fr({ngInjectorDef:fr});var An=(()=>((An=An||{})[An.Default=0]="Default",An[An.Host=1]="Host",An[An.Self=2]="Self",An[An.SkipSelf=4]="SkipSelf",An[An.Optional=8]="Optional",An))();let _D;function Fl(t){const n=_D;return _D=t,n}function SF(t,n,e){const i=qb(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&An.Optional?null:void 0!==n?n:void Wb(br(t))}const Pr=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),$0={},bD="__NG_DI_FLAG__",Jb="ngTempTokenPath",d1e="ngTokenPath",h1e=/\n/gm,f1e="\u0275",kF="__source";let B0;function Fg(t){const n=B0;return B0=t,n}function p1e(t,n=An.Default){if(void 0===B0)throw new et(-203,!1);return null===B0?SF(t,void 0,n):B0.get(t,n&An.Optional?null:void 0,n)}function Ve(t,n=An.Default){return(function u1e(){return _D}()||p1e)(Tn(t),n)}function $n(t,n=An.Default){return Ve(t,Kb(n))}function Kb(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function wD(t){const n=[];for(let e=0;e((Cu=Cu||{})[Cu.OnPush=0]="OnPush",Cu[Cu.Default=1]="Default",Cu))(),_c=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(_c||(_c={})),_c))();const kd={},Gi=[],Xb=fr({\u0275cmp:fr}),xD=fr({\u0275dir:fr}),CD=fr({\u0275pipe:fr}),DF=fr({\u0275mod:fr}),Td=fr({\u0275fac:fr}),H0=fr({__NG_ELEMENT_ID__:fr});let y1e=0;function nt(t){return Sd(()=>{const n=EF(t),e={...n,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Cu.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||_c.Emulated,id:"c"+y1e++,styles:t.styles||Gi,_:null,schemas:t.schemas||null,tView:null};MF(e);const i=t.dependencies;return e.directiveDefs=Qb(i,!1),e.pipeDefs=Qb(i,!0),e})}function b1e(t){return Xi(t)||Ks(t)}function w1e(t){return null!==t}function Mn(t){return Sd(()=>({type:t.type,bootstrap:t.bootstrap||Gi,declarations:t.declarations||Gi,imports:t.imports||Gi,exports:t.exports||Gi,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function AF(t,n){if(null==t)return kd;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}function pt(t){return Sd(()=>{const n=EF(t);return MF(n),n})}function da(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Xi(t){return t[Xb]||null}function Ks(t){return t[xD]||null}function ja(t){return t[CD]||null}function rl(t,n){const e=t[DF]||null;if(!e&&!0===n)throw new Error(`Type ${br(t)} does not have '\u0275mod' property.`);return e}function EF(t){const n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||Gi,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:AF(t.inputs,n),outputs:AF(t.outputs)}}function MF(t){t.features?.forEach(n=>n(t))}function Qb(t,n){if(!t)return null;const e=n?ja:b1e;return()=>("function"==typeof t?t():t).map(i=>e(i)).filter(w1e)}const Dd=0,Lt=1,ei=2,so=3,bc=4,Kf=5,Xs=6,Bg=7,bo=8,Zb=9,ew=10,ri=11,SD=12,U0=13,OF=14,Vg=15,Qs=16,z0=17,Hg=18,Su=19,G0=20,IF=21,Rr=22,kD=1,NF=2,tw=7,nw=8,Ug=9,ha=10;function ol(t){return Array.isArray(t)&&"object"==typeof t[kD]}function wc(t){return Array.isArray(t)&&!0===t[kD]}function TD(t){return 0!=(4&t.flags)}function W0(t){return t.componentOffset>-1}function iw(t){return 1==(1&t.flags)}function xc(t){return!!t.template}function C1e(t){return 0!=(256&t[ei])}function Xf(t,n){return t.hasOwnProperty(Td)?t[Td]:null}class T1e{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Kt(){return RF}function RF(t){return t.type.prototype.ngOnChanges&&(t.setInput=A1e),D1e}function D1e(){const t=FF(this),n=t?.current;if(n){const e=t.previous;if(e===kd)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function A1e(t,n,e,i){const r=this.declaredInputs[e],o=FF(t)||function E1e(t,n){return t[LF]=n}(t,{previous:kd,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new T1e(l&&l.currentValue,n,a===kd),t[i]=n}Kt.ngInherit=!0;const LF="__ngSimpleChanges__";function FF(t){return t[LF]||null}const $l=function(t,n,e){},$F="svg";function Ts(t){for(;Array.isArray(t);)t=t[Dd];return t}function rw(t,n){return Ts(n[t])}function sl(t,n){return Ts(n[t.index])}function VF(t,n){return t.data[n]}function zg(t,n){return t[n]}function Pa(t,n){const e=n[t];return ol(e)?e:e[Dd]}function ow(t){return 64==(64&t[ei])}function Ch(t,n){return null==n?null:t[n]}function HF(t){t[Hg]=0}function AD(t,n){t[Kf]+=n;let e=t,i=t[so];for(;null!==i&&(1===n&&1===e[Kf]||-1===n&&0===e[Kf]);)i[Kf]+=n,e=i,i=i[so]}const zn={lFrame:QF(null),bindingsEnabled:!0};function zF(){return zn.bindingsEnabled}function st(){return zn.lFrame.lView}function Ri(){return zn.lFrame.tView}function we(t){return zn.lFrame.contextLView=t,t[bo]}function xe(t){return zn.lFrame.contextLView=null,t}function Ds(){let t=GF();for(;null!==t&&64===t.type;)t=t.parent;return t}function GF(){return zn.lFrame.currentTNode}function q0(){const t=zn.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function ku(t,n){const e=zn.lFrame;e.currentTNode=t,e.isParent=n}function ED(){return zn.lFrame.isParent}function MD(){zn.lFrame.isParent=!1}function fa(){const t=zn.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Ad(){return zn.lFrame.bindingIndex}function Gg(){return zn.lFrame.bindingIndex++}function Ed(t){const n=zn.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function YF(t){zn.lFrame.inI18n=t}function H1e(t,n){const e=zn.lFrame;e.bindingIndex=e.bindingRootIndex=t,OD(n)}function OD(t){zn.lFrame.currentDirectiveIndex=t}function JF(){return zn.lFrame.currentQueryIndex}function ND(t){zn.lFrame.currentQueryIndex=t}function z1e(t){const n=t[Lt];return 2===n.type?n.declTNode:1===n.type?t[Xs]:null}function KF(t,n,e){if(e&An.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&An.Host||(r=z1e(o),null===r||(o=o[Vg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=zn.lFrame=XF();return i.currentTNode=n,i.lView=t,!0}function jD(t){const n=XF(),e=t[Lt];zn.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function XF(){const t=zn.lFrame,n=null===t?null:t.child;return null===n?QF(t):n}function QF(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function ZF(){const t=zn.lFrame;return zn.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const e5=ZF;function PD(){const t=ZF();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function pa(){return zn.lFrame.selectedIndex}function Qf(t){zn.lFrame.selectedIndex=t}function Jr(){const t=zn.lFrame;return VF(t.tView,t.selectedIndex)}function Ne(){zn.lFrame.currentNamespace=$F}function Zf(){!function Y1e(){zn.lFrame.currentNamespace=null}()}function sw(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[Hg]+=65536),(a>11>16&&(3&t[ei])===n){t[ei]+=2048,$l(4,a,o);try{o.call(a)}finally{$l(5,a,o)}}}else{$l(4,a,o);try{o.call(a)}finally{$l(5,a,o)}}}const Wg=-1;class Y0{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function FD(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[Vg],e--;return i}let $D=!0;function dw(t){const n=$D;return $D=t,n}const s5=255,a5=5;let nye=0;const Tu={};function hw(t,n){const e=l5(t,n);if(-1!==e)return e;const i=n[Lt];i.firstCreatePass&&(t.injectorIndex=n.length,BD(i.data,t),BD(n,null),BD(i.blueprint,null));const r=VD(t,n),o=t.injectorIndex;if(o5(r)){const s=cw(r),a=uw(r,n),l=a[Lt].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function BD(t,n){t.push(0,0,0,0,0,0,0,0,n)}function l5(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function VD(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=g5(r),null===i)return Wg;if(e++,r=r[Vg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return Wg}function HD(t,n,e){!function iye(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(H0)&&(i=e[H0]),null==i&&(i=e[H0]=nye++);const r=i&s5;n.data[t+(r>>a5)]|=1<=0?n&s5:aye:n}(e);if("function"==typeof o){if(!KF(n,t,i))return i&An.Host?c5(r,0,i):u5(n,e,i,r);try{const s=o(i);if(null!=s||i&An.Optional)return s;Wb()}finally{e5()}}else if("number"==typeof o){let s=null,a=l5(t,n),l=Wg,c=i&An.Host?n[Qs][Xs]:null;for((-1===a||i&An.SkipSelf)&&(l=-1===a?VD(t,n):n[a+8],l!==Wg&&p5(i,!1)?(s=n[Lt],a=cw(l),n=uw(l,n)):a=-1);-1!==a;){const u=n[Lt];if(f5(o,a,u.data)){const d=oye(a,n,e,s,i,c);if(d!==Tu)return d}l=n[a+8],l!==Wg&&p5(i,n[Lt].data[a+8]===c)&&f5(o,a,n)?(s=u,a=cw(l),n=uw(l,n)):a=-1}}return r}function oye(t,n,e,i,r,o){const s=n[Lt],a=s.data[t+8],u=fw(a,s,e,null==i?W0(a)&&$D:i!=s&&0!=(3&a.type),r&An.Host&&o===a);return null!==u?ep(n,s,u,a):Tu}function fw(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&xc(f)&&f.type===e)return l}return null}function ep(t,n,e,i){let r=t[e];const o=n.data;if(function Q1e(t){return t instanceof Y0}(r)){const s=r;s.resolving&&function n1e(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new et(-200,`Circular dependency in DI detected for ${t}${e}`)}(function Ji(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Un(t)}(o[e]));const a=dw(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Fl(s.injectImpl):null;KF(t,i,An.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function K1e(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=RF(n);(e.preOrderHooks??(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&Fl(l),dw(a),s.resolving=!1,e5()}}return r}function f5(t,n,e){return!!(e[n+(t>>a5)]&1<{const n=t.prototype.constructor,e=n[Td]||UD(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Td]||UD(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function UD(t){return mD(t)?()=>{const n=UD(Tn(t));return n&&n()}:Xf(t)}function g5(t){const n=t[Lt],e=n.type;return 2===e?n.declTNode:1===e?t[Xs]:null}function Sh(t){return function rye(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function zD(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(Jg)?l[Jg]:Object.defineProperty(l,Jg,{value:[]})[Jg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class Ut{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function tp(t,n){t.forEach(e=>Array.isArray(e)?tp(e,n):n(e))}function v5(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function pw(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function Q0(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function hye(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function WD(t,n){const e=Qg(t,n);if(e>=0)return t[1|e]}function Qg(t,n){return function y5(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Ra=Ra||{})[Ra.Important=1]="Important",Ra[Ra.DashCase=2]="DashCase",Ra))();const Oye=/^>|^->||--!>|)/,Nye="\u200b$1\u200b";const QD=new Map;let jye=0;const eA="__ngContext__";function Zs(t,n){ol(n)?(t[eA]=n[G0],function Rye(t){QD.set(t[G0],t)}(n)):t[eA]=n}let tA;function nA(t,n){return tA(t,n)}function r1(t){const n=t[so];return wc(n)?n[so]:n}function iA(t){return F5(t[U0])}function rA(t){return F5(t[bc])}function F5(t){for(;null!==t&&!wc(t);)t=t[bc];return t}function em(t,n,e,i,r){if(null!=i){let o,s=!1;wc(i)?o=i:ol(i)&&(s=!0,i=i[Dd]);const a=Ts(i);0===t&&null!==e?null==r?z5(n,e,a):np(n,e,a,r||null,!0):1===t&&null!==e?np(n,e,a,r||null,!0):2===t?dA(n,a,s):3===t&&n.destroyNode(a),null!=o&&function o_e(t,n,e,i,r){const o=e[tw];o!==Ts(e)&&em(n,t,i,o,r);for(let a=ha;an.replace(Iye,Nye))}(n))}function sA(t,n,e){return t.createElement(n,e)}function B5(t,n){const e=t[Ug],i=e.indexOf(n),r=n[so];512&n[ei]&&(n[ei]&=-513,AD(r,-1)),e.splice(i,1)}function aA(t,n){if(t.length<=ha)return;const e=ha+n,i=t[e];if(i){const r=i[z0];null!==r&&r!==t&&B5(r,i),n>0&&(t[e-1][bc]=i[bc]);const o=pw(t,ha+n);!function Yye(t,n){o1(t,n,n[ri],2,null,null),n[Dd]=null,n[Xs]=null}(i[Lt],i);const s=o[Su];null!==s&&s.detachView(o[Lt]),i[so]=null,i[bc]=null,i[ei]&=-65}return i}function V5(t,n){if(!(128&n[ei])){const e=n[ri];e.destroyNode&&o1(t,n,e,3,null,null),function Xye(t){let n=t[U0];if(!n)return lA(t[Lt],t);for(;n;){let e=null;if(ol(n))e=n[U0];else{const i=n[ha];i&&(e=i)}if(!e){for(;n&&!n[bc]&&n!==t;)ol(n)&&lA(n[Lt],n),n=n[so];null===n&&(n=t),ol(n)&&lA(n[Lt],n),e=n&&n[bc]}n=e}}(n)}}function lA(t,n){if(!(128&n[ei])){n[ei]&=-65,n[ei]|=128,function t_e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===_c.None||o===_c.Emulated)return null}return sl(i,e)}}function np(t,n,e,i,r){t.insertBefore(n,e,i,r)}function z5(t,n,e){t.appendChild(n,e)}function G5(t,n,e,i,r){null!==i?np(t,n,e,i,r):z5(t,n,e)}function yw(t,n){return t.parentNode(n)}function W5(t,n,e){return Y5(t,n,e)}function q5(t,n,e){return 40&t.type?sl(t,e):null}let cA,ww,pA,xw,Y5=q5;function J5(t,n){Y5=t,cA=n}function _w(t,n,e,i){const r=H5(t,i,n),o=n[ri],a=W5(i.parent||n[Xs],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return ww}()?.createHTML(t)||t}function e$(){return void 0!==pA?pA:typeof document<"u"?document:void 0}function gA(){if(void 0===xw&&(xw=null,Pr.trustedTypes))try{xw=Pr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return xw}function t$(t){return gA()?.createHTML(t)||t}function i$(t){return gA()?.createScriptURL(t)||t}class ip{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${zb})`}}class h_e extends ip{getTypeName(){return"HTML"}}class f_e extends ip{getTypeName(){return"Style"}}class p_e extends ip{getTypeName(){return"Script"}}class g_e extends ip{getTypeName(){return"URL"}}class m_e extends ip{getTypeName(){return"ResourceURL"}}function ll(t){return t instanceof ip?t.changingThisBreaksApplicationSecurity:t}function Du(t,n){const e=function v_e(t){return t instanceof ip&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${zb})`)}return e===n}function r$(t){const n=new S_e(t);return function k_e(){try{return!!(new window.DOMParser).parseFromString(tm(""),"text/html")}catch{return!1}}()?new C_e(n):n}class C_e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(tm(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class S_e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=tm(n),e}}const T_e=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Cw(t){return(t=String(t)).match(T_e)?t:"unsafe:"+t}function Md(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function s1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const o$=Md("area,br,col,hr,img,wbr"),s$=Md("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),a$=Md("rp,rt"),mA=s1(o$,s1(s$,Md("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),s1(a$,Md("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),s1(a$,s$)),vA=Md("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),l$=s1(vA,Md("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Md("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),D_e=Md("script,style,template");class A_e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!mA.hasOwnProperty(e))return this.sanitizedSomething=!0,!D_e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();mA.hasOwnProperty(e)&&!o$.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(c$(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const E_e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,M_e=/([^\#-~ |!])/g;function c$(t){return t.replace(/&/g,"&").replace(E_e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(M_e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Sw;function u$(t,n){let e=null;try{Sw=Sw||r$(t);let i=n?String(n):"";e=Sw.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Sw.getInertBodyElement(i)}while(i!==o);return tm((new A_e).sanitizeChildren(yA(e)||e))}finally{if(e){const i=yA(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function yA(t){return"content"in t&&function O_e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var wr=(()=>((wr=wr||{})[wr.NONE=0]="NONE",wr[wr.HTML=1]="HTML",wr[wr.STYLE=2]="STYLE",wr[wr.SCRIPT=3]="SCRIPT",wr[wr.URL=4]="URL",wr[wr.RESOURCE_URL=5]="RESOURCE_URL",wr))();function kw(t){const n=l1();return n?t$(n.sanitize(wr.HTML,t)||""):Du(t,"HTML")?t$(ll(t)):u$(e$(),Un(t))}function a1(t){const n=l1();return n?n.sanitize(wr.URL,t)||"":Du(t,"URL")?ll(t):Cw(Un(t))}function d$(t){const n=l1();if(n)return i$(n.sanitize(wr.RESOURCE_URL,t)||"");if(Du(t,"ResourceURL"))return i$(ll(t));throw new et(904,!1)}function l1(){const t=st();return t&&t[SD]}const Tw=new Ut("ENVIRONMENT_INITIALIZER"),f$=new Ut("INJECTOR",-1),p$=new Ut("INJECTOR_DEF_TYPES");class g${get(n,e=$0){if(e===$0){const i=new Error(`NullInjectorError: No provider for ${br(n)}!`);throw i.name="NullInjectorError",i}return e}}function F_e(...t){return{\u0275providers:m$(0,t),\u0275fromNgModule:!0}}function m$(t,...n){const e=[],i=new Set;let r;return tp(n,o=>{const s=o;_A(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&v$(r,e),e}function v$(t,n){for(let e=0;e{n.push(o)})}}function _A(t,n,e,i){if(!(t=Tn(t)))return!1;let r=null,o=xF(t);const s=!o&&Xi(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=xF(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)_A(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{tp(o.imports,u=>{_A(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&v$(c,n)}if(!a){const c=Xf(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:Gi},{provide:p$,useValue:r,multi:!0},{provide:Tw,useValue:()=>Ve(r),multi:!0})}const l=o.providers;null==l||a||bA(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function bA(t,n){for(let e of t)vD(e)&&(e=e.\u0275providers),Array.isArray(e)?bA(e,n):n(e)}const $_e=fr({provide:String,useValue:fr});function wA(t){return null!==t&&"object"==typeof t&&$_e in t}function rp(t){return"function"==typeof t}const xA=new Ut("Set Injector scope."),Dw={},V_e={};let CA;function Aw(){return void 0===CA&&(CA=new g$),CA}class Vl{}class b$ extends Vl{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,kA(n,s=>this.processProvider(s)),this.records.set(f$,nm(void 0,this)),r.has("environment")&&this.records.set(Vl,nm(void 0,this));const o=this.records.get(xA);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(p$.multi,Gi,An.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=Fg(this),i=Fl(void 0);try{return n()}finally{Fg(e),Fl(i)}}get(n,e=$0,i=An.Default){this.assertNotDestroyed(),i=Kb(i);const r=Fg(this),o=Fl(void 0);try{if(!(i&An.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function W_e(t){return"function"==typeof t||"object"==typeof t&&t instanceof Ut}(n)&&qb(n);a=l&&this.injectableDefInScope(l)?nm(SA(n),Dw):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&An.Self?Aw():this.parent).get(n,e=i&An.Optional&&e===$0?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Jb]=s[Jb]||[]).unshift(br(n)),r)throw s;return function m1e(t,n,e,i){const r=t[Jb];throw n[kF]&&r.unshift(n[kF]),t.message=function v1e(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==f1e?t.slice(2):t;let r=br(n);if(Array.isArray(n))r=n.map(br).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):br(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(h1e,"\n ")}`}("\n"+t.message,r,e,i),t[d1e]=r,t[Jb]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{Fl(o),Fg(r)}}resolveInjectorInitializers(){const n=Fg(this),e=Fl(void 0);try{const i=this.get(Tw.multi,Gi,An.Self);for(const r of i)r()}finally{Fg(n),Fl(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(br(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new et(205,!1)}processProvider(n){let e=rp(n=Tn(n))?n:Tn(n&&n.provide);const i=function U_e(t){return wA(t)?nm(void 0,t.useValue):nm(w$(t),Dw)}(n);if(rp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=nm(void 0,Dw,!0),r.factory=()=>wD(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Dw&&(e.value=V_e,e.value=e.factory()),"object"==typeof e.value&&e.value&&function G_e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=Tn(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function SA(t){const n=qb(t),e=null!==n?n.factory:Xf(t);if(null!==e)return e;if(t instanceof Ut)throw new et(204,!1);if(t instanceof Function)return function H_e(t){const n=t.length;if(n>0)throw Q0(n,"?"),new et(204,!1);const e=function l1e(t){return t&&(t[Yb]||t[CF])||null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new et(204,!1)}function w$(t,n,e){let i;if(rp(t)){const r=Tn(t);return Xf(r)||SA(r)}if(wA(t))i=()=>Tn(t.useValue);else if(function _$(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...wD(t.deps||[]));else if(function y$(t){return!(!t||!t.useExisting)}(t))i=()=>Ve(Tn(t.useExisting));else{const r=Tn(t&&(t.useClass||t.provide));if(!function z_e(t){return!!t.deps}(t))return Xf(r)||SA(r);i=()=>new r(...wD(t.deps))}return i}function nm(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function kA(t,n){for(const e of t)Array.isArray(e)?kA(e,n):e&&vD(e)?kA(e.\u0275providers,n):n(e)}class q_e{}class x${}class J_e{resolveComponentFactory(n){throw function Y_e(t){const n=Error(`No component factory found for ${br(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let im=(()=>{class t{}return t.NULL=new J_e,t})();function K_e(){return rm(Ds(),st())}function rm(t,n){return new En(sl(t,n))}let En=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=K_e,t})();function X_e(t){return t instanceof En?t.nativeElement:t}class om{}let hs=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function Q_e(){const t=st(),e=Pa(Ds().index,t);return(ol(e)?e:t)[ri]}(),t})(),Z_e=(()=>{class t{}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:()=>null}),t})();class c1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const ebe=new c1("15.2.9"),TA={},DA="ngOriginalError";function AA(t){return t[DA]}class sm{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&AA(n);for(;e&&AA(e);)e=AA(e);return e||null}}function S$(t){return t.ownerDocument.defaultView}function Od(t){return t instanceof Function?t():t}function T$(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const D$="ng-template";function ube(t,n,e){let i=0,r=!0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==T$(f,c,0)||2&i&&c!==h){if(Cc(i))return!1;s=!0}}}}else{if(!s&&!Cc(i)&&!Cc(l))return!1;if(s&&Cc(l))continue;s=!1,i=l|1&i}}return Cc(i)||s}function Cc(t){return 0==(1&t)}function fbe(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Cc(s)&&(n+=M$(o,r),r=""),i=s,o=o||!Cc(i);e++}return""!==r&&(n+=M$(o,r)),n}const Gn={};function x(t){O$(Ri(),st(),pa()+t,!1)}function O$(t,n,e,i){if(!i)if(3==(3&n[ei])){const o=t.preOrderCheckHooks;null!==o&&aw(n,o,e)}else{const o=t.preOrderHooks;null!==o&&lw(n,o,0,e)}Qf(e)}function P$(t,n=null,e=null,i){const r=R$(t,n,e,i);return r.resolveInjectorInitializers(),r}function R$(t,n=null,e=null,i,r=new Set){const o=[e||Gi,F_e(t)];return i=i||("object"==typeof t?void 0:br(t)),new b$(o,n||Aw(),i||null,r)}let fs=(()=>{class t{static create(e,i){if(Array.isArray(e))return P$({name:""},i,e,"");{const r=e.name??"";return P$({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=$0,t.NULL=new g$,t.\u0275prov=Ke({token:t,providedIn:"any",factory:()=>Ve(f$)}),t.__NG_ELEMENT_ID__=-1,t})();function te(t,n=An.Default){const e=st();return null===e?Ve(t,n):d5(Ds(),e,Tn(t),n)}function z$(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;iRr&&O$(t,n,Rr,!1),$l(s?2:0,r),e(i,r)}finally{Qf(o),$l(s?3:1,r)}}function PA(t,n,e){if(TD(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,u1(t,e,r.hostVars,Gn),r)}function VA(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Un(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}function owe(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&HA(e)}}function HA(t){for(let i=iA(t);null!==i;i=rA(i))for(let r=ha;r0&&HA(o)}const e=t[Lt].components;if(null!==e)for(let i=0;i0&&HA(r)}}function uwe(t,n){const e=Pa(n,t),i=e[Lt];(function dwe(t,n){for(let e=n.length;e-1&&(aA(n,i),pw(e,i))}this._attachedToViewContainer=!1}V5(this._lView[Lt],this._lView)}onDestroy(n){q$(this._lView[Lt],this._lView,null,n)}markForCheck(){Nw(this._cdRefInjectingView||this._lView)}detach(){this._lView[ei]&=-65}reattach(){this._lView[ei]|=64}detectChanges(){jw(this._lView[Lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new et(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Kye(t,n){o1(t,n,n[ri],2,null,null)}(this._lView[Lt],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new et(902,!1);this._appRef=n}}class hwe extends d1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;jw(n[Lt],n,n[bo],!1)}checkNoChanges(){}get context(){return null}}class i6 extends im{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=Xi(n);return new h1(e,this.ngModule)}}function r6(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class pwe{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=Kb(i);const r=this.injector.get(n,TA,i);return r!==TA||e===TA?r:this.parentInjector.get(n,e,i)}}class h1 extends x${get inputs(){return r6(this.componentDef.inputs)}get outputs(){return r6(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function _be(t){return t.map(ybe).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof Vl?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new pwe(n,o):n,a=s.get(om,null);if(null===a)throw new et(407,!1);const l=s.get(Z_e,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function Ube(t,n,e){return t.selectRootElement(n,e===_c.ShadowDom)}(c,i,this.componentDef.encapsulation):sA(c,u,function fwe(t){const n=t.toLowerCase();return"svg"===n?$F:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=FA(0,null,null,1,0,null,null,null,null,null),p=Mw(null,f,null,h,null,null,a,c,l,s,null);let g,m;jD(p);try{const v=this.componentDef;let y,b=null;v.findHostDirectiveDefs?(y=[],b=new Map,v.findHostDirectiveDefs(v,y,b),y.push(v)):y=[v];const C=function mwe(t,n){const e=t[Lt],i=Rr;return t[i]=n,cm(e,i,2,"#host",null)}(p,d),k=function vwe(t,n,e,i,r,o,s,a){const l=r[Lt];!function ywe(t,n,e,i){for(const r of t)n.mergedAttrs=J0(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(Pw(n,n.mergedAttrs,!0),null!==e&&Z5(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Mw(r,W$(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&BA(l,t,i.length-1),Iw(r,u),r[t.index]=u}(C,d,v,y,p,a,c);m=VF(f,Rr),d&&function bwe(t,n,e,i){if(i)FD(t,e,["ng-version",ebe.full]);else{const{attrs:r,classes:o}=function bbe(t){const n=[],e=[];let i=1,r=2;for(;i0&&Q5(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function wwe(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=J0(r.hostAttrs,e=J0(e,r.hostAttrs))}}(i)}function GA(t){return t===kd?{}:t===Gi?[]:t}function Swe(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function kwe(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function Twe(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function f1(t){return n=>{n.findHostDirectiveDefs=s6,n.hostDirectives=(Array.isArray(t)?t:t()).map(e=>"function"==typeof e?{directive:Tn(e),inputs:kd,outputs:kd}:{directive:Tn(e.directive),inputs:a6(e.inputs),outputs:a6(e.outputs)})}}function s6(t,n,e){if(null!==t.hostDirectives)for(const i of t.hostDirectives){const r=Ks(i.directive);Mwe(r.declaredInputs,i.inputs),s6(r,n,e),e.set(r,i),n.push(r)}}function a6(t){if(void 0===t||0===t.length)return kd;const n={};for(let e=0;es(Ts(C[i.index])):i.index;let b=null;if(!s&&a&&(b=function $we(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==b)(b.__ngLastListenerFn__||b).__ngNextListenerFn__=o,b.__ngLastListenerFn__=o,h=!1;else{o=C6(i,n,u,o,!1);const C=e.listen(m,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=C6(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const g=p.length;if(g)for(let m=0;m-1?Pa(t.index,n):n);let l=x6(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=x6(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function P(t=1){return function G1e(t){return(zn.lFrame.contextLView=function W1e(t,n){for(;t>0;)n=n[Vg],t--;return n}(t,zn.lFrame.contextLView))[bo]}(t)}function Bwe(t,n){let e=null;const i=function pbe(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function JA(t){return 2|t}function ap(t){return(131068&t)>>2}function KA(t,n){return-131069&t|n<<2}function XA(t){return 1|t}function I6(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?Dh(o):ap(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];Wwe(t[a],n)&&(l=!0,t[a+1]=i?XA(u):JA(u)),a=i?Dh(u):ap(u)}l&&(t[e+1]=i?JA(o):XA(o))}function Wwe(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&Qg(t,n)>=0}const Xo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function N6(t){return t.substring(Xo.key,Xo.keyEnd)}function j6(t,n){const e=Xo.textEnd;return e===n?-1:(n=Xo.keyEnd=function Kwe(t,n,e){for(;n32;)n++;return n}(t,Xo.key=n,e),_m(t,n,e))}function _m(t,n,e){for(;n=0;e=j6(n,e))al(t,N6(n),!0)}function Sc(t,n,e,i){const r=st(),o=Ri(),s=Ed(2);o.firstUpdatePass&&B6(o,t,s,i),n!==Gn&&ea(r,s,n)&&H6(o,o.data[pa()],r,r[ri],t,r[s+1]=function axe(t,n){return null==t||""===t||("string"==typeof n?t+=n:"object"==typeof t&&(t=br(ll(t)))),t}(n,e),i,s)}function kc(t,n,e,i){const r=Ri(),o=Ed(2);r.firstUpdatePass&&B6(r,null,o,i);const s=st();if(e!==Gn&&ea(s,o,e)){const a=r.data[pa()];if(z6(a,i)&&!$6(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=gD(l,e||"")),qA(r,a,s,e,i)}else!function sxe(t,n,e,i,r,o,s,a){r===Gn&&(r=Gi);let l=0,c=0,u=0=t.expandoStartIndex}function B6(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[pa()],s=$6(t,e);z6(o,i)&&null===n&&!s&&(n=!1),n=function exe(t,n,e,i){const r=function ID(t){const n=zn.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=m1(e=QA(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=QA(r,t,n,e,i),null===o){let l=function txe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==ap(i))return t[Dh(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=QA(null,t,n,l[1],i),l=m1(l,n.attrs,i),function nxe(t,n,e,i){t[Dh(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function ixe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=Dh(t[a+1]);t[i+1]=$w(h,a),0!==h&&(t[h+1]=KA(t[h+1],i)),t[a+1]=function Hwe(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=$w(a,0),0!==a&&(t[a+1]=KA(t[a+1],i)),a=i;else t[i+1]=$w(l,0),0===a?a=i:t[l+1]=KA(t[l+1],i),l=i;c&&(t[i+1]=JA(t[i+1])),I6(t,u,i,!0),I6(t,u,i,!1),function Gwe(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&Qg(o,n)>=0&&(e[i+1]=XA(e[i+1]))}(n,u,t,i,o),s=$w(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function QA(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Gn&&(h=d?Gi:void 0);let f=d?WD(h,i):u===i?h:void 0;if(c&&!Bw(f)&&(f=WD(l,i)),Bw(f)&&(a=f,s))return a;const p=t[r+1];r=s?Dh(p):ap(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=WD(l,i))}return a}function Bw(t){return void 0!==t}function z6(t,n){return 0!=(t.flags&(n?8:16))}function A(t,n=""){const e=st(),i=Ri(),r=t+Rr,o=i.firstCreatePass?cm(i,r,1,n,null):i.data[r],s=e[r]=oA(e[ri],n);_w(i,e,s,o),ku(o,!1)}function ze(t){return wt("",t,""),ze}function wt(t,n,e){const i=st(),r=dm(i,t,n,e);return r!==Gn&&Id(i,pa(),r),wt}function Ah(t,n,e,i,r){const o=st(),s=hm(o,t,n,e,i,r);return s!==Gn&&Id(o,pa(),s),Ah}function Fa(t,n,e){const i=st();return ea(i,Gg(),n)&&cl(Ri(),Jr(),i,t,n,i[ri],e,!0),Fa}const lp=void 0;var kxe=["en",[["a","p"],["AM","PM"],lp],[["AM","PM"],lp,lp],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],lp,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],lp,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",lp,"{1} 'at' {0}",lp],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function Sxe(t){const e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let bm={};function ga(t){const n=function Txe(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=d8(n);if(e)return e;const i=n.split("-")[0];if(e=d8(i),e)return e;if("en"===i)return kxe;throw new et(701,!1)}function d8(t){return t in bm||(bm[t]=Pr.ng&&Pr.ng.common&&Pr.ng.common.locales&&Pr.ng.common.locales[t]),bm[t]}var Et=(()=>((Et=Et||{})[Et.LocaleId=0]="LocaleId",Et[Et.DayPeriodsFormat=1]="DayPeriodsFormat",Et[Et.DayPeriodsStandalone=2]="DayPeriodsStandalone",Et[Et.DaysFormat=3]="DaysFormat",Et[Et.DaysStandalone=4]="DaysStandalone",Et[Et.MonthsFormat=5]="MonthsFormat",Et[Et.MonthsStandalone=6]="MonthsStandalone",Et[Et.Eras=7]="Eras",Et[Et.FirstDayOfWeek=8]="FirstDayOfWeek",Et[Et.WeekendRange=9]="WeekendRange",Et[Et.DateFormat=10]="DateFormat",Et[Et.TimeFormat=11]="TimeFormat",Et[Et.DateTimeFormat=12]="DateTimeFormat",Et[Et.NumberSymbols=13]="NumberSymbols",Et[Et.NumberFormats=14]="NumberFormats",Et[Et.CurrencyCode=15]="CurrencyCode",Et[Et.CurrencySymbol=16]="CurrencySymbol",Et[Et.CurrencyName=17]="CurrencyName",Et[Et.Currencies=18]="Currencies",Et[Et.Directionality=19]="Directionality",Et[Et.PluralCase=20]="PluralCase",Et[Et.ExtraData=21]="ExtraData",Et))();const Dxe=["zero","one","two","few","many"],wm="en-US",Vw={marker:"element"},Hw={marker:"ICU"};var ao=(()=>((ao=ao||{})[ao.SHIFT=2]="SHIFT",ao[ao.APPEND_EAGERLY=1]="APPEND_EAGERLY",ao[ao.COMMENT=2]="COMMENT",ao))();let h8=wm;function f8(t){(function Ll(t,n){null==t&&Ki(n,t,null,"!=")})(t,"Expected localeId to be defined"),"string"==typeof t&&(h8=t.toLowerCase().replace(/_/g,"-"))}function p8(t,n,e){const i=n.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?q5(t,0,e):Ts(e[r])}function g8(t,n,e,i,r){const o=n.insertBeforeIndex;if(Array.isArray(o)){let s=i,a=null;if(3&n.type||(a=s,s=r),null!==s&&-1===n.componentOffset)for(let l=1;l1)for(let e=t.length-2;e>=0;e--){const i=t[e];v8(i)||Oxe(i,n)&&null===Ixe(i)&&Nxe(i,n.index)}}function v8(t){return!(64&t.type)}function Oxe(t,n){return v8(n)||t.index>n.index}function Ixe(t){const n=t.insertBeforeIndex;return Array.isArray(n)?n[0]:n}function Nxe(t,n){const e=t.insertBeforeIndex;Array.isArray(e)?e[0]=n:(J5(p8,g8),t.insertBeforeIndex=n)}function v1(t,n){const e=t.data[n];return null===e||"string"==typeof e?null:e.hasOwnProperty("currentCaseLViewIndex")?e:e.value}function Rxe(t,n,e){const i=NA(t,e,64,null,null);return m8(n,i),i}function Uw(t,n){const e=n[t.currentCaseLViewIndex];return null===e?e:e<0?~e:e}function y8(t){return t>>>17}function _8(t){return(131070&t)>>>1}let y1=0,_1=0;function w8(t,n,e,i){const r=e[ri];let s,o=null;for(let a=0;a>>1,e),null,null,f,p,null)}else switch(l){case Hw:const c=n[++a],u=n[++a];null===e[u]&&Zs(e[u]=qye(r,c),e);break;case Vw:const d=n[++a],h=n[++a];null===e[h]&&Zs(e[h]=sA(r,d,null),e)}}}function x8(t,n,e,i,r){for(let o=0;o>>2;switch(3&u){case 1:const h=e[++c],f=e[++c],p=t.data[d];"string"==typeof p?VA(n[ri],n[d],null,p,h,l,f):cl(t,p,n,h,l,n[ri],f,!1);break;case 0:const g=n[d];null!==g&&$5(n[ri],g,l);break;case 2:Vxe(t,v1(t,d),n,l);break;case 3:C8(t,v1(t,d),i,n)}}}}else{const l=e[o+1];if(l>0&&3==(3&l)){const u=v1(t,l>>>2);n[u.currentCaseLViewIndex]<0&&C8(t,u,i,n)}}o+=a}}function C8(t,n,e,i){let r=i[n.currentCaseLViewIndex];if(null!==r){let o=y1;r<0&&(r=i[n.currentCaseLViewIndex]=~r,o=-1),x8(t,i,n.update[r],e,o)}}function Vxe(t,n,e,i){const r=function Hxe(t,n){let e=t.cases.indexOf(n);if(-1===e)switch(t.type){case 1:{const i=function Axe(t,n){const e=function u8(t){return ga(t)[Et.PluralCase]}(n)(parseInt(t,10)),i=Dxe[e];return void 0!==i?i:"other"}(n,function Mxe(){return h8}());e=t.cases.indexOf(i),-1===e&&"other"!==i&&(e=t.cases.indexOf("other"));break}case 0:e=t.cases.indexOf("other")}return-1===e?null:e}(n,i);if(Uw(n,e)!==r&&(S8(t,n,e),e[n.currentCaseLViewIndex]=null===r?null:~r,null!==r)){const s=e[n.anchorIdx];s&&w8(t,n.create[r],e,s)}}function S8(t,n,e){let i=Uw(n,e);if(null!==i){const r=n.remove[i];for(let o=0;o0){const a=rw(s,e);null!==a&&dA(e[ri],a)}else S8(t,v1(t,~s),e)}}}function Uxe(){const t=[];let e,i,n=-1;function o(a,l){n=0;const c=Uw(a,l);i=null!==c?a.remove[c]:Gi}function s(){if(n0?e[a]:(t.push(n,i),o(e[Lt].data[~a],e),s())}return 0===t.length?null:(i=t.pop(),n=t.pop(),s())}return function r(a,l){for(e=l;t.length;)t.pop();return o(a.value,l),s}}const zw=/\ufffd(\d+):?\d*\ufffd/gi,Gxe=/\ufffd(\d+)\ufffd/,T8=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,b1="\ufffd",Wxe=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,qxe=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,Yxe=/\uE500/g;function D8(t,n,e,i,r,o,s){const a=u1(t,i,1,null);let l=a<e.length&&e.push(l)}return{type:i,mainBinding:r,cases:n,values:e}}function ZA(t){if(!t)return[];let n=0;const e=[],i=[],r=/[{}]/g;let o;for(r.lastIndex=0;o=r.exec(t);){const a=o.index;if("}"==o[0]){if(e.pop(),0==e.length){const l=t.substring(n,a);T8.test(l)?i.push(nCe(l)):i.push(l),n=a+1}}else{if(0==e.length){const l=t.substring(n,a);i.push(l),n=a+1}e.push("{")}}const s=t.substring(n);return i.push(s),i}function iCe(t,n,e,i,r,o,s,a){const l=[],c=[],u=[];n.cases.push(o),n.create.push(l),n.remove.push(c),n.update.push(u);const h=r$(e$()).getInertBodyElement(s),f=yA(h)||h;return f?O8(t,n,e,i,l,c,u,f,r,a,0):0}function O8(t,n,e,i,r,o,s,a,l,c,u){let d=0,h=a.firstChild;for(;h;){const f=u1(t,e,1,null);switch(h.nodeType){case Node.ELEMENT_NODE:const p=h,g=p.tagName.toLowerCase();if(mA.hasOwnProperty(g)){eE(r,Vw,g,l,f),t.data[f]=g;const b=p.attributes;for(let C=0;C>>ao.SHIFT;let d=t[u];null===d&&(d=t[u]=(s&ao.COMMENT)===ao.COMMENT?r.createComment(a):oA(r,a)),c&&null!==e&&np(r,e,d,i,!1)}})(r,l.create,u,a&&8&a.type?r[a.index]:null),YF(!0)}function Es(t,n,e){j8(t,n,e),function P8(){YF(!1)}()}function xm(t){return function Fxe(t){t&&(y1|=1<0){const i=t.data[e];x8(t,n,Array.isArray(i)?i:i.update,Ad()-_1-1,y1)}y1=0,_1=0}(Ri(),st(),t+Rr)}function tE(t,n,e,i,r){if(t=Tn(t),Array.isArray(t))for(let o=0;o>20;if(rp(t)||!t.multi){const f=new Y0(l,r,te),p=iE(a,n,r?u:u+h,d);-1===p?(HD(hw(c,s),o,a),nE(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=iE(a,n,u+h,d),p=iE(a,n,u,u+h),m=p>=0&&e[p];if(r&&!m||!r&&!(f>=0&&e[f])){HD(hw(c,s),o,a);const v=function wCe(t,n,e,i,r){const o=new Y0(t,e,te);return o.multi=[],o.index=n,o.componentProviders=0,R8(o,r,i&&!e),o}(r?bCe:_Ce,e.length,r,i,l);!r&&m&&(e[p].providerFactory=v),nE(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else nE(o,t,f>-1?f:p,R8(e[r?p:f],l,!r&&i));!r&&i&&m&&e[p].componentProviders++}}}function nE(t,n,e,i){const r=rp(n),o=function B_e(t){return!!t.useClass}(n);if(r||o){const l=(o?Tn(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function R8(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function iE(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function yCe(t,n,e){const i=Ri();if(i.firstCreatePass){const r=xc(t);tE(e,i.data,i.blueprint,r,!0),tE(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class Cm{}class L8{}class F8 extends Cm{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new i6(this);const i=rl(n);this._bootstrapComponents=Od(i.bootstrap),this._r3Injector=R$(n,e,[{provide:Cm,useValue:this},{provide:im,useValue:this.componentFactoryResolver}],br(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class oE extends L8{constructor(n){super(),this.moduleType=n}create(n){return new F8(this.moduleType,n)}}class CCe extends Cm{constructor(n,e,i){super(),this.componentFactoryResolver=new i6(this),this.instance=null;const r=new b$([...n,{provide:Cm,useValue:this},{provide:im,useValue:this.componentFactoryResolver}],e||Aw(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Gw(t,n,e=null){return new CCe(t,n,e).injector}let SCe=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=m$(0,e.type),r=i.length>0?Gw([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Ke({token:t,providedIn:"environment",factory:()=>new t(Ve(Vl))}),t})();function No(t){t.getStandaloneInjector=n=>n.get(SCe).getOrCreateStandaloneInjector(t)}function ma(t,n,e){const i=fa()+t,r=st();return r[i]===Gn?Eu(r,i,e?n.call(e):n()):function p1(t,n){return t[n]}(r,i)}function ui(t,n,e,i){return G8(st(),fa(),t,n,e,i)}function Ni(t,n,e,i,r){return function W8(t,n,e,i,r,o,s){const a=n+e;return op(t,a,r,o)?Eu(t,a+2,s?i.call(s,r,o):i(r,o)):S1(t,a+2)}(st(),fa(),t,n,e,i,r)}function C1(t,n,e,i,r,o){return function q8(t,n,e,i,r,o,s,a){const l=n+e;return function Fw(t,n,e,i,r){const o=op(t,n,e,i);return ea(t,n+2,r)||o}(t,l,r,o,s)?Eu(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):S1(t,l+3)}(st(),fa(),t,n,e,i,r,o)}function S1(t,n){const e=t[n];return e===Gn?void 0:e}function G8(t,n,e,i,r,o){const s=n+e;return ea(t,s,r)?Eu(t,s+1,o?i.call(o,r):i(r)):S1(t,s+1)}function aE(t,n){const e=Ri();let i;const r=t+Rr;e.firstCreatePass?(i=function $Ce(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Xf(i.type)),s=Fl(te);try{const a=dw(!1),l=o();return dw(a),function Rwe(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,st(),r,l),l}finally{Fl(s)}}function lE(t,n,e){const i=t+Rr,r=st(),o=zg(r,i);return function k1(t,n){return t[Lt].data[n].pure}(r,i)?G8(r,fa(),n,o.transform,e,o):o.transform(e)}function cE(t){return n=>{setTimeout(t,void 0,n)}}const Oe=class zCe extends hr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=cE(o),r&&(r=cE(r)),s&&(s=cE(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof pn&&n.add(a),a}};function GCe(){return this._results[Symbol.iterator]()}class uE{get changes(){return this._changes||(this._changes=new Oe)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=uE.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=GCe)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Bl(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function uye(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=YCe,t})();const WCe=ir,qCe=class extends WCe{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Mw(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[z0]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Su];return null!==s&&(r[Su]=s.createEmbeddedView(i)),jA(i,r,n),new d1(r)}};function YCe(){return Ww(Ds(),st())}function Ww(t,n){return 4&t.type?new qCe(n,t,rm(t,n)):null}let $a=(()=>{class t{}return t.__NG_ELEMENT_ID__=JCe,t})();function JCe(){return Q8(Ds(),st())}const KCe=$a,K8=class extends KCe{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return rm(this._hostTNode,this._hostLView)}get injector(){return new qg(this._hostTNode,this._hostLView)}get parentInjector(){const n=VD(this._hostTNode,this._hostLView);if(o5(n)){const e=uw(n,this._hostLView),i=cw(n);return new qg(e[Lt].data[i+8],e)}return new qg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=X8(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-ha}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function X0(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new h1(Xi(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Vl,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Lt];if(function j1e(t){return wc(t[so])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[so],h=new K8(d,d[Xs],d[so]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function Qye(t,n,e,i){const r=ha+i,o=e.length;i>0&&(e[r-1][bc]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=ha;d{class t{constructor(e){this.appInits=e,this.resolve=Yw,this.reject=Yw,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Ve(Jw,8))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const D1=new Ut("AppId",{providedIn:"root",factory:function wB(){return`${xE()}${xE()}${xE()}`}});function xE(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const xB=new Ut("Platform Initializer"),A1=new Ut("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),CB=new Ut("AnimationModuleType");let x2e=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const hl=new Ut("LocaleId",{providedIn:"root",factory:()=>$n(hl,An.Optional|An.SkipSelf)||function C2e(){return typeof $localize<"u"&&$localize.locale||wm}()});class k2e{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let SB=(()=>{class t{compileModuleSync(e){return new oE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Od(rl(e).declarations).reduce((s,a)=>{const l=Xi(a);return l&&s.push(new h1(l)),s},[]);return new k2e(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const A2e=(()=>Promise.resolve(0))();function CE(t){typeof Zone>"u"?A2e.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class si{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Oe(!1),this.onMicrotaskEmpty=new Oe(!1),this.onStable=new Oe(!1),this.onError=new Oe(!1),typeof Zone>"u")throw new et(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function E2e(){let t=Pr.requestAnimationFrame,n=Pr.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function I2e(t){const n=()=>{!function O2e(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Pr,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,kE(t),t.isCheckStableRunning=!0,SE(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),kE(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return DB(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),AB(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return DB(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),AB(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,kE(t),SE(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!si.isInAngularZone())throw new et(909,!1)}static assertNotInAngularZone(){if(si.isInAngularZone())throw new et(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,M2e,Yw,Yw);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const M2e={};function SE(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function kE(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function DB(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function AB(t){t._nesting--,SE(t)}class N2e{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Oe,this.onMicrotaskEmpty=new Oe,this.onStable=new Oe,this.onError=new Oe}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const EB=new Ut(""),Xw=new Ut("");let AE,TE=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,AE||(function j2e(t){AE=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{si.assertNotInAngularZone(),CE(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())CE(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(Ve(si),Ve(DE),Ve(Xw))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),DE=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return AE?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const jd=!1;let Eh=null;const MB=new Ut("AllowMultipleToken"),EE=new Ut("PlatformDestroyListeners"),OB=new Ut("appBootstrapListener");class IB{constructor(n,e){this.name=n,this.token=e}}function jB(t,n,e=[]){const i=`Platform: ${n}`,r=new Ut(i);return(o=[])=>{let s=ME();if(!s||s.injector.get(MB,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function L2e(t){if(Eh&&!Eh.get(MB,!1))throw new et(400,!1);Eh=t;const n=t.get(RB);(function NB(t){const n=t.get(xB,null);n&&n.forEach(e=>e())})(t)}(function PB(t=[],n){return fs.create({name:n,providers:[{provide:xA,useValue:"platform"},{provide:EE,useValue:new Set([()=>Eh=null])},...t]})}(a,i))}return function $2e(t){const n=ME();if(!n)throw new et(401,!1);return n}()}}function ME(){return Eh?.get(RB)??null}let RB=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function FB(t,n){let e;return e="noop"===t?new N2e:("zone.js"===t?void 0:t)||new si(n),e}(i?.ngZone,function LB(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:si,useValue:r}];return r.run(()=>{const s=fs.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(sm,null);if(!l)throw new et(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qw(this._modules,a),c.unsubscribe()})}),function $B(t,n,e){try{const i=e();return g1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(Kw);return c.runInitializers(),c.donePromise.then(()=>(f8(a.injector.get(hl,wm)||wm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=BB({},i);return function P2e(t,n,e){const i=new oE(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Pd);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new et(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new et(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(EE,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Ve(fs))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function BB(t,n){return Array.isArray(n)?n.reduce(BB,t):{...t,...n}}let Pd=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new ar(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new ar(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{si.assertNotInAngularZone(),CE(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{si.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=hD(o,s.pipe(bF()))}bootstrap(e,i){const r=e instanceof x$;if(!this._injector.get(Kw).done){!r&&function $g(t){const n=Xi(t)||Ks(t)||ja(t);return null!==n&&n.standalone}(e);throw new et(405,jd)}let s;s=r?e:this._injector.get(im).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function R2e(t){return t.isBoundToModule}(s)?void 0:this._injector.get(Cm),c=s.create(fs.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(EB,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qw(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new et(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qw(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(OB,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new et(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(Ve(si),Ve(Vl),Ve(sm))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Qw(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let jo=(()=>{class t{}return t.__NG_ELEMENT_ID__=V2e,t})();function V2e(t){return function H2e(t,n,e){if(W0(t)&&!e){const i=Pa(t.index,n);return new d1(i,i)}return 47&t.type?new d1(n[Qs],n):null}(Ds(),st(),16==(16&t))}class GB{constructor(){}supports(n){return Lw(n)}create(n){return new Y2e(n)}}const q2e=(t,n)=>n;class Y2e{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||q2e}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new J2e(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new WB),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new WB),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class J2e{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class K2e{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class WB{constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new K2e,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function qB(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Q2e(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class Q2e{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function JB(){return new tx([new GB])}let tx=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||JB()),deps:[[t,new e1,new Z0]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new et(901,!1)}}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:JB}),t})();function KB(){return new E1([new YB])}let E1=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||KB()),deps:[[t,new e1,new Z0]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new et(901,!1)}}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:KB}),t})();const tSe=jB(null,"core",[]);let nSe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(Ve(Pd))},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();function Tm(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}function PE(t,n){const e=Xi(t),i=n.elementInjector||Aw();return new h1(e).create(i,n.projectableNodes,n.hostElement,n.environmentInjector)}let RE=null;function Rd(){return RE}class oSe{}const lr=new Ut("DocumentToken");let LE=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function sSe(){return Ve(XB)}()},providedIn:"platform"}),t})();const aSe=new Ut("Location Initialized");let XB=(()=>{class t extends LE{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Rd().getBaseHref(this._doc)}onPopState(e){const i=Rd().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Rd().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){QB()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){QB()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:function(){return function lSe(){return new XB(Ve(lr))}()},providedIn:"platform"}),t})();function QB(){return!!window.history.pushState}function FE(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function ZB(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function Ld(t){return t&&"?"!==t[0]?"?"+t:t}let up=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(t7)},providedIn:"root"}),t})();const e7=new Ut("appBaseHref");let t7=(()=>{class t extends up{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??$n(lr).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return FE(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ld(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ld(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ld(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(Ve(LE),Ve(e7,8))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),cSe=(()=>{class t extends up{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=FE(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ld(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ld(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(Ve(LE),Ve(e7,8))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),$E=(()=>{class t{constructor(e){this._subject=new Oe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function hSe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(ZB(n7(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ld(i))}normalize(e){return t.stripTrailingSlash(function dSe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,n7(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ld(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ld(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=Ld,t.joinWithSlash=FE,t.stripTrailingSlash=ZB,t.\u0275fac=function(e){return new(e||t)(Ve(up))},t.\u0275prov=Ke({token:t,factory:function(){return function uSe(){return new $E(Ve(up))}()},providedIn:"root"}),t})();function n7(t){return t.replace(/\/index.html$/,"")}var Ba=(()=>((Ba=Ba||{})[Ba.Decimal=0]="Decimal",Ba[Ba.Percent=1]="Percent",Ba[Ba.Currency=2]="Currency",Ba[Ba.Scientific=3]="Scientific",Ba))(),Lr=(()=>((Lr=Lr||{})[Lr.Format=0]="Format",Lr[Lr.Standalone=1]="Standalone",Lr))(),Wn=(()=>((Wn=Wn||{})[Wn.Narrow=0]="Narrow",Wn[Wn.Abbreviated=1]="Abbreviated",Wn[Wn.Wide=2]="Wide",Wn[Wn.Short=3]="Short",Wn))(),Kr=(()=>((Kr=Kr||{})[Kr.Short=0]="Short",Kr[Kr.Medium=1]="Medium",Kr[Kr.Long=2]="Long",Kr[Kr.Full=3]="Full",Kr))(),Sn=(()=>((Sn=Sn||{})[Sn.Decimal=0]="Decimal",Sn[Sn.Group=1]="Group",Sn[Sn.List=2]="List",Sn[Sn.PercentSign=3]="PercentSign",Sn[Sn.PlusSign=4]="PlusSign",Sn[Sn.MinusSign=5]="MinusSign",Sn[Sn.Exponential=6]="Exponential",Sn[Sn.SuperscriptingExponent=7]="SuperscriptingExponent",Sn[Sn.PerMille=8]="PerMille",Sn[Sn.Infinity=9]="Infinity",Sn[Sn.NaN=10]="NaN",Sn[Sn.TimeSeparator=11]="TimeSeparator",Sn[Sn.CurrencyDecimal=12]="CurrencyDecimal",Sn[Sn.CurrencyGroup=13]="CurrencyGroup",Sn))();function r7(t,n,e){const i=ga(t),o=zl([i[Et.DayPeriodsFormat],i[Et.DayPeriodsStandalone]],n);return zl(o,e)}function o7(t,n,e){const i=ga(t),o=zl([i[Et.DaysFormat],i[Et.DaysStandalone]],n);return zl(o,e)}function BE(t,n,e){const i=ga(t),o=zl([i[Et.MonthsFormat],i[Et.MonthsStandalone]],n);return zl(o,e)}function nx(t,n){return zl(ga(t)[Et.DateFormat],n)}function ix(t,n){return zl(ga(t)[Et.TimeFormat],n)}function rx(t,n){return zl(ga(t)[Et.DateTimeFormat],n)}function Ul(t,n){const e=ga(t),i=e[Et.NumberSymbols][n];if(typeof i>"u"){if(n===Sn.CurrencyDecimal)return e[Et.NumberSymbols][Sn.Decimal];if(n===Sn.CurrencyGroup)return e[Et.NumberSymbols][Sn.Group]}return i}function s7(t){if(!t[Et.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Et.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function zl(t,n){for(let e=n;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new Error("Locale data API: locale data undefined")}function HE(t){const[n,e]=t.split(":");return{hours:+n,minutes:+e}}const xSe=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,M1={},CSe=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Qo=(()=>((Qo=Qo||{})[Qo.Short=0]="Short",Qo[Qo.ShortGMT=1]="ShortGMT",Qo[Qo.Long=2]="Long",Qo[Qo.Extended=3]="Extended",Qo))(),On=(()=>((On=On||{})[On.FullYear=0]="FullYear",On[On.Month=1]="Month",On[On.Date=2]="Date",On[On.Hours=3]="Hours",On[On.Minutes=4]="Minutes",On[On.Seconds=5]="Seconds",On[On.FractionalSeconds=6]="FractionalSeconds",On[On.Day=7]="Day",On))(),ti=(()=>((ti=ti||{})[ti.DayPeriods=0]="DayPeriods",ti[ti.Days=1]="Days",ti[ti.Months=2]="Months",ti[ti.Eras=3]="Eras",ti))();function a7(t,n,e,i){let r=function ISe(t){if(u7(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[r,o=1,s=1]=t.split("-").map(a=>+a);return ox(r,o-1,s)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(xSe))return function NSe(t){const n=new Date(0);let e=0,i=0;const r=t[8]?n.setUTCFullYear:n.setFullYear,o=t[8]?n.setUTCHours:n.setHours;t[9]&&(e=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));const s=Number(t[4]||0)-e,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return o.call(n,s,a,l,c),n}(i)}const n=new Date(t);if(!u7(n))throw new Error(`Unable to convert "${t}" into a date`);return n}(t);n=Fd(e,n)||n;let a,s=[];for(;n;){if(a=CSe.exec(n),!a){s.push(n);break}{s=s.concat(a.slice(1));const u=s.pop();if(!u)break;n=u}}let l=r.getTimezoneOffset();i&&(l=c7(i,l),r=function OSe(t,n,e){const i=e?-1:1,r=t.getTimezoneOffset();return function MSe(t,n){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+n),t}(t,i*(c7(n,r)-r))}(r,i,!0));let c="";return s.forEach(u=>{const d=function ESe(t){if(zE[t])return zE[t];let n;switch(t){case"G":case"GG":case"GGG":n=Cr(ti.Eras,Wn.Abbreviated);break;case"GGGG":n=Cr(ti.Eras,Wn.Wide);break;case"GGGGG":n=Cr(ti.Eras,Wn.Narrow);break;case"y":n=Ro(On.FullYear,1,0,!1,!0);break;case"yy":n=Ro(On.FullYear,2,0,!0,!0);break;case"yyy":n=Ro(On.FullYear,3,0,!1,!0);break;case"yyyy":n=Ro(On.FullYear,4,0,!1,!0);break;case"Y":n=cx(1);break;case"YY":n=cx(2,!0);break;case"YYY":n=cx(3);break;case"YYYY":n=cx(4);break;case"M":case"L":n=Ro(On.Month,1,1);break;case"MM":case"LL":n=Ro(On.Month,2,1);break;case"MMM":n=Cr(ti.Months,Wn.Abbreviated);break;case"MMMM":n=Cr(ti.Months,Wn.Wide);break;case"MMMMM":n=Cr(ti.Months,Wn.Narrow);break;case"LLL":n=Cr(ti.Months,Wn.Abbreviated,Lr.Standalone);break;case"LLLL":n=Cr(ti.Months,Wn.Wide,Lr.Standalone);break;case"LLLLL":n=Cr(ti.Months,Wn.Narrow,Lr.Standalone);break;case"w":n=UE(1);break;case"ww":n=UE(2);break;case"W":n=UE(1,!0);break;case"d":n=Ro(On.Date,1);break;case"dd":n=Ro(On.Date,2);break;case"c":case"cc":n=Ro(On.Day,1);break;case"ccc":n=Cr(ti.Days,Wn.Abbreviated,Lr.Standalone);break;case"cccc":n=Cr(ti.Days,Wn.Wide,Lr.Standalone);break;case"ccccc":n=Cr(ti.Days,Wn.Narrow,Lr.Standalone);break;case"cccccc":n=Cr(ti.Days,Wn.Short,Lr.Standalone);break;case"E":case"EE":case"EEE":n=Cr(ti.Days,Wn.Abbreviated);break;case"EEEE":n=Cr(ti.Days,Wn.Wide);break;case"EEEEE":n=Cr(ti.Days,Wn.Narrow);break;case"EEEEEE":n=Cr(ti.Days,Wn.Short);break;case"a":case"aa":case"aaa":n=Cr(ti.DayPeriods,Wn.Abbreviated);break;case"aaaa":n=Cr(ti.DayPeriods,Wn.Wide);break;case"aaaaa":n=Cr(ti.DayPeriods,Wn.Narrow);break;case"b":case"bb":case"bbb":n=Cr(ti.DayPeriods,Wn.Abbreviated,Lr.Standalone,!0);break;case"bbbb":n=Cr(ti.DayPeriods,Wn.Wide,Lr.Standalone,!0);break;case"bbbbb":n=Cr(ti.DayPeriods,Wn.Narrow,Lr.Standalone,!0);break;case"B":case"BB":case"BBB":n=Cr(ti.DayPeriods,Wn.Abbreviated,Lr.Format,!0);break;case"BBBB":n=Cr(ti.DayPeriods,Wn.Wide,Lr.Format,!0);break;case"BBBBB":n=Cr(ti.DayPeriods,Wn.Narrow,Lr.Format,!0);break;case"h":n=Ro(On.Hours,1,-12);break;case"hh":n=Ro(On.Hours,2,-12);break;case"H":n=Ro(On.Hours,1);break;case"HH":n=Ro(On.Hours,2);break;case"m":n=Ro(On.Minutes,1);break;case"mm":n=Ro(On.Minutes,2);break;case"s":n=Ro(On.Seconds,1);break;case"ss":n=Ro(On.Seconds,2);break;case"S":n=Ro(On.FractionalSeconds,1);break;case"SS":n=Ro(On.FractionalSeconds,2);break;case"SSS":n=Ro(On.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=ax(Qo.Short);break;case"ZZZZZ":n=ax(Qo.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=ax(Qo.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=ax(Qo.Long);break;default:return null}return zE[t]=n,n}(u);c+=d?d(r,e,l):"''"===u?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function ox(t,n,e){const i=new Date(0);return i.setFullYear(t,n,e),i.setHours(0,0,0),i}function Fd(t,n){const e=function fSe(t){return ga(t)[Et.LocaleId]}(t);if(M1[e]=M1[e]||{},M1[e][n])return M1[e][n];let i="";switch(n){case"shortDate":i=nx(t,Kr.Short);break;case"mediumDate":i=nx(t,Kr.Medium);break;case"longDate":i=nx(t,Kr.Long);break;case"fullDate":i=nx(t,Kr.Full);break;case"shortTime":i=ix(t,Kr.Short);break;case"mediumTime":i=ix(t,Kr.Medium);break;case"longTime":i=ix(t,Kr.Long);break;case"fullTime":i=ix(t,Kr.Full);break;case"short":const r=Fd(t,"shortTime"),o=Fd(t,"shortDate");i=sx(rx(t,Kr.Short),[r,o]);break;case"medium":const s=Fd(t,"mediumTime"),a=Fd(t,"mediumDate");i=sx(rx(t,Kr.Medium),[s,a]);break;case"long":const l=Fd(t,"longTime"),c=Fd(t,"longDate");i=sx(rx(t,Kr.Long),[l,c]);break;case"full":const u=Fd(t,"fullTime"),d=Fd(t,"fullDate");i=sx(rx(t,Kr.Full),[u,d])}return i&&(M1[e][n]=i),i}function sx(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(e,i){return null!=n&&i in n?n[i]:e})),t}function Dc(t,n,e="-",i,r){let o="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,o=e));let s=String(t);for(;s.length0||a>-e)&&(a+=e),t===On.Hours)0===a&&-12===e&&(a=12);else if(t===On.FractionalSeconds)return function SSe(t,n){return Dc(t,3).substring(0,n)}(a,n);const l=Ul(s,Sn.MinusSign);return Dc(a,n,l,i,r)}}function Cr(t,n,e=Lr.Format,i=!1){return function(r,o){return function TSe(t,n,e,i,r,o){switch(e){case ti.Months:return BE(n,r,i)[t.getMonth()];case ti.Days:return o7(n,r,i)[t.getDay()];case ti.DayPeriods:const s=t.getHours(),a=t.getMinutes();if(o){const c=function vSe(t){const n=ga(t);return s7(n),(n[Et.ExtraData][2]||[]).map(i=>"string"==typeof i?HE(i):[HE(i[0]),HE(i[1])])}(n),u=function ySe(t,n,e){const i=ga(t);s7(i);const o=zl([i[Et.ExtraData][0],i[Et.ExtraData][1]],n)||[];return zl(o,e)||[]}(n,r,i),d=c.findIndex(h=>{if(Array.isArray(h)){const[f,p]=h,g=s>=f.hours&&a>=f.minutes,m=s0?Math.floor(r/60):Math.ceil(r/60);switch(t){case Qo.Short:return(r>=0?"+":"")+Dc(s,2,o)+Dc(Math.abs(r%60),2,o);case Qo.ShortGMT:return"GMT"+(r>=0?"+":"")+Dc(s,1,o);case Qo.Long:return"GMT"+(r>=0?"+":"")+Dc(s,2,o)+":"+Dc(Math.abs(r%60),2,o);case Qo.Extended:return 0===i?"Z":(r>=0?"+":"")+Dc(s,2,o)+":"+Dc(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${t}"`)}}}const DSe=0,lx=4;function l7(t){return ox(t.getFullYear(),t.getMonth(),t.getDate()+(lx-t.getDay()))}function UE(t,n=!1){return function(e,i){let r;if(n){const o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{const o=l7(e),s=function ASe(t){const n=ox(t,DSe,1).getDay();return ox(t,0,1+(n<=lx?lx:lx+7)-n)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return Dc(r,t,Ul(i,Sn.MinusSign))}}function cx(t,n=!1){return function(e,i){return Dc(l7(e).getFullYear(),t,Ul(i,Sn.MinusSign),n)}}const zE={};function c7(t,n){t=t.replace(/:/g,"");const e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function u7(t){return t instanceof Date&&!isNaN(t.valueOf())}const jSe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,d7=22,ux=".",O1="0",PSe=";",RSe=",",GE="#";function YE(t){const n=parseInt(t);if(isNaN(n))throw new Error("Invalid integer literal when parsing "+t);return n}function p7(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const KE=/\s+/,g7=[];let dp=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=g7,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(KE):g7}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(KE):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(KE).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(te(tx),te(E1),te(En),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class WSe{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Bt=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new WSe(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),y7(a,r)}});for(let r=0,o=i.length;r{y7(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(te($a),te(ir),te(tx))},t.\u0275dir=pt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function y7(t,n){t.context.$implicit=n.item}let Ct=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new YSe,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){_7("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){_7("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(te($a),te(ir))},t.\u0275dir=pt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class YSe{constructor(){this.$implicit=null,this.ngIf=null}}function _7(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${br(n)}'.`)}class XE{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let dx=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),b7=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new XE(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(te($a),te(ir),te(dx,9))},t.\u0275dir=pt({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),x7=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Ra.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(E1),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),Ac=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(te($a))},t.\u0275dir=pt({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Kt]}),t})();let S7=(()=>{class t{constructor(e){this._locale=e}transform(e,i,r){if(!function QE(t){return!(null==t||""===t||t!=t)}(e))return null;r=r||this._locale;try{return function $Se(t,n,e){return function WE(t,n,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(t)){let c=function HSe(t){let i,r,o,s,a,n=Math.abs(t)+"",e=0;for((r=n.indexOf(ux))>-1&&(n=n.replace(ux,"")),(o=n.search(/e/i))>0?(r<0&&(r=o),r+=+n.slice(o+1),n=n.substring(0,o)):r<0&&(r=n.length),o=0;n.charAt(o)===O1;o++);if(o===(a=n.length))i=[0],r=1;else{for(a--;n.charAt(a)===O1;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(n.charAt(o))}return r>d7&&(i=i.splice(0,d7-1),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(t);s&&(c=function VSe(t){if(0===t.digits[0])return t;const n=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===n?t.digits.push(0,0):1===n&&t.digits.push(0),t.integerLen+=2),t}(c));let u=n.minInt,d=n.minFrac,h=n.maxFrac;if(o){const y=o.match(jSe);if(null===y)throw new Error(`${o} is not a valid digit info`);const b=y[1],C=y[3],k=y[5];null!=b&&(u=YE(b)),null!=C&&(d=YE(C)),null!=k?h=YE(k):null!=C&&d>h&&(h=d)}!function USe(t,n,e){if(n>e)throw new Error(`The minimum number of digits after fraction (${n}) is higher than the maximum (${e}).`);let i=t.digits,r=i.length-t.integerLen;const o=Math.min(Math.max(n,r),e);let s=o+t.integerLen,a=i[s];if(s>0){i.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[s-1]++;for(;r=c?p.pop():l=!1),h>=10?1:0},0);u&&(i.unshift(u),t.integerLen++)}(c,d,h);let f=c.digits,p=c.integerLen;const g=c.exponent;let m=[];for(l=f.every(y=>!y);p0?m=f.splice(p,f.length):(m=f,f=[0]);const v=[];for(f.length>=n.lgSize&&v.unshift(f.splice(-n.lgSize,f.length).join(""));f.length>n.gSize;)v.unshift(f.splice(-n.gSize,f.length).join(""));f.length&&v.unshift(f.join("")),a=v.join(Ul(e,i)),m.length&&(a+=Ul(e,r)+m.join("")),g&&(a+=Ul(e,Sn.Exponential)+"+"+g)}else a=Ul(e,Sn.Infinity);return a=t<0&&!l?n.negPre+a+n.negSuf:n.posPre+a+n.posSuf,a}(t,function qE(t,n="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(PSe),r=i[0],o=i[1],s=-1!==r.indexOf(ux)?r.split(ux):[r.substring(0,r.lastIndexOf(O1)+1),r.substring(r.lastIndexOf(O1)+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf(GE));for(let u=0;u{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();const k7="browser";function T7(t){return t===k7}let wke=(()=>{class t{}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:()=>new xke(Ve(lr),window)}),t})();class xke{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function Cke(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=D7(this.window.history)||D7(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function D7(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class A7{}class Kke extends oSe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class nM extends Kke{static makeCurrent(){!function rSe(t){RE||(RE=t)}(new nM)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function Xke(){return N1=N1||document.querySelector("base"),N1?N1.getAttribute("href"):null}();return null==e?null:function Qke(t){px=px||document.createElement("a"),px.setAttribute("href",t);const n=px.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){N1=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return p7(document.cookie,n)}}let px,N1=null;const N7=new Ut("TRANSITION_ID"),eTe=[{provide:Jw,useFactory:function Zke(t,n,e){return()=>{e.get(Kw).donePromise.then(()=>{const i=Rd(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const gx=new Ut("EventManagerPlugins");let mx=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),j1=(()=>{class t extends P7{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const iM={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},rM=/%COMP%/g,F7=new Ut("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function $7(t,n){return n.flat(100).map(e=>e.replace(rM,t))}function B7(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let vx=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new oM(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof U7?r.applyToHost(e):r instanceof sM&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case _c.Emulated:o=new U7(s,a,i,this.appId,l);break;case _c.ShadowDom:return new cTe(s,a,e,i);default:o=new sM(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Ve(mx),Ve(j1),Ve(D1),Ve(F7))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();class oM{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(iM[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(H7(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(H7(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=iM[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=iM[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Ra.DashCase|Ra.Important)?n.style.setProperty(e,i,r&Ra.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Ra.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,B7(i)):this.eventManager.addEventListener(n,e,B7(i))}}function H7(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class cTe extends oM{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=$7(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class sM extends oM{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=$7(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class U7 extends sM{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function sTe(t){return"_ngcontent-%COMP%".replace(rM,t)}(s),this.hostAttr=function aTe(t){return"_nghost-%COMP%".replace(rM,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let uTe=(()=>{class t extends j7{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const z7=["alt","control","meta","shift"],dTe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},hTe={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let fTe=(()=>{class t extends j7{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Rd().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),z7.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=dTe[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),z7.forEach(s=>{s!==r&&(0,hTe[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const W7=[{provide:A1,useValue:k7},{provide:xB,useValue:function pTe(){nM.makeCurrent()},multi:!0},{provide:lr,useFactory:function mTe(){return function d_e(t){pA=t}(document),document},deps:[]}],vTe=jB(tSe,"browser",W7),q7=new Ut(""),Y7=[{provide:Xw,useClass:class tTe{addToWindow(n){Pr.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},Pr.getAllAngularTestabilities=()=>n.getAllTestabilities(),Pr.getAllAngularRootElements=()=>n.getAllRootElements(),Pr.frameworkStabilizers||(Pr.frameworkStabilizers=[]),Pr.frameworkStabilizers.push(i=>{const r=Pr.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?Rd().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:EB,useClass:TE,deps:[si,DE,Xw]},{provide:TE,useClass:TE,deps:[si,DE,Xw]}],J7=[{provide:xA,useValue:"root"},{provide:sm,useFactory:function gTe(){return new sm},deps:[]},{provide:gx,useClass:uTe,multi:!0,deps:[lr,si,A1]},{provide:gx,useClass:fTe,multi:!0,deps:[lr]},{provide:vx,useClass:vx,deps:[mx,j1,D1,F7]},{provide:om,useExisting:vx},{provide:P7,useExisting:j1},{provide:j1,useClass:j1,deps:[lr]},{provide:mx,useClass:mx,deps:[gx,si]},{provide:A7,useClass:nTe,deps:[]},[]];let lM=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:D1,useValue:e.appId},{provide:N7,useExisting:D1},eTe]}}}return t.\u0275fac=function(e){return new(e||t)(Ve(q7,12))},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[...J7,...Y7],imports:[Mh,nSe]}),t})(),K7=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function _Te(){return new K7(Ve(lr))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let Z7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new(e||t):Ve(e9),i},providedIn:"root"}),t})(),e9=(()=>{class t extends Z7{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case wr.NONE:return i;case wr.HTML:return Du(i,"HTML")?ll(i):u$(this._doc,String(i)).toString();case wr.STYLE:return Du(i,"Style")?ll(i):i;case wr.SCRIPT:if(Du(i,"Script"))return ll(i);throw new Error("unsafe value used in a script context");case wr.URL:return Du(i,"URL")?ll(i):Cw(String(i));case wr.RESOURCE_URL:if(Du(i,"ResourceURL"))return ll(i);throw new Error(`unsafe value used in a resource URL context (see ${zb})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${zb})`)}}bypassSecurityTrustHtml(e){return function y_e(t){return new h_e(t)}(e)}bypassSecurityTrustStyle(e){return function __e(t){return new f_e(t)}(e)}bypassSecurityTrustScript(e){return function b_e(t){return new p_e(t)}(e)}bypassSecurityTrustUrl(e){return function w_e(t){return new g_e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function x_e(t){return new m_e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function STe(t){return new e9(t.get(lr))}(Ve(fs)),i},providedIn:"root"}),t})();class t9{}class kTe{}const $d="*";function ta(t,n){return{type:7,name:t,definitions:n,options:{}}}function Ms(t,n=null){return{type:4,styles:n,timings:t}}function n9(t,n=null){return{type:2,steps:t,options:n}}function Ai(t){return{type:6,styles:t,offset:null}}function Os(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function i9(t){Promise.resolve().then(t)}class P1{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){i9(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class r9{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?i9(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const uM="!";function o9(t){return new et(3e3,!1)}function sDe(){return typeof window<"u"&&typeof window.document<"u"}function dM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Ih(t){switch(t.length){case 0:return new P1;case 1:return t[0];default:return new r9(t)}}function s9(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,g)=>{let m=g,v=p;if("offset"!==g)switch(m=n.normalizePropertyName(m,s),v){case uM:v=r.get(g);break;case $d:v=o.get(g);break;default:v=n.normalizeStyleValue(g,m,v,s)}f.set(m,v)}),h||a.push(f),c=f,l=d}),s.length)throw function YTe(t){return new et(3502,!1)}();return a}function hM(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&fM(e,"start",t)));break;case"done":t.onDone(()=>i(e&&fM(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&fM(e,"destroy",t)))}}function fM(t,n,e){const o=pM(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function pM(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fl(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function a9(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let gM=(t,n)=>!1,l9=(t,n,e)=>[],c9=null;function mM(t){const n=t.parentNode||t.host;return n===c9?null:n}(dM()||typeof Element<"u")&&(sDe()?(c9=(()=>document.documentElement)(),gM=(t,n)=>{for(;n;){if(n===t)return!0;n=mM(n)}return!1}):gM=(t,n)=>t.contains(n),l9=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let hp=null,u9=!1;const d9=gM,h9=l9;let f9=(()=>{class t{validateStyleProperty(e){return function lDe(t){hp||(hp=function cDe(){return typeof document<"u"?document.body:null}()||{},u9=!!hp.style&&"WebkitAppearance"in hp.style);let n=!0;return hp.style&&!function aDe(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in hp.style,!n&&u9&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in hp.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return d9(e,i)}getParentElement(e){return mM(e)}query(e,i,r){return h9(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new P1(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),vM=(()=>{class t{}return t.NOOP=new f9,t})();const uDe=1e3,yM="ng-enter",yx="ng-leave",_x="ng-trigger",bx=".ng-trigger",g9="ng-animating",_M=".ng-animating";function Bd(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:bM(parseFloat(n[1]),n[2])}function bM(t,n){return"s"===n?t*uDe:t}function wx(t,n,e){return t.hasOwnProperty("duration")?t:function hDe(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(o9()),{duration:0,delay:0,easing:""};r=bM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=bM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function TTe(){return new et(3100,!1)}()),a=!0),o<0&&(n.push(function DTe(){return new et(3101,!1)}()),a=!0),a&&n.splice(l,0,o9())}return{duration:r,delay:o,easing:s}}(t,n,e)}function R1(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function m9(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Nh(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function y9(t,n,e){return e?n+":"+e+";":""}function _9(t){let n="";for(let e=0;e{const o=xM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),dM()&&_9(t))}function fp(t,n){t.style&&(n.forEach((e,i)=>{const r=xM(i);t.style[r]=""}),dM()&&_9(t))}function L1(t){return Array.isArray(t)?1==t.length?t[0]:n9(t):t}const wM=new RegExp("{{\\s*(.+?)\\s*}}","g");function b9(t){let n=[];if("string"==typeof t){let e;for(;e=wM.exec(t);)n.push(e[1]);wM.lastIndex=0}return n}function F1(t,n,e){const i=t.toString(),r=i.replace(wM,(o,s)=>{let a=n[s];return null==a&&(e.push(function ETe(t){return new et(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function xx(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const gDe=/-+([a-z0-9])/g;function xM(t){return t.replace(gDe,(...n)=>n[1].toUpperCase())}function mDe(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pl(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function MTe(t){return new et(3004,!1)}()}}function w9(t,n){return window.getComputedStyle(t)[n]}const kx="*";function xDe(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function CDe(t,n,e){if(":"==t[0]){const l=function SDe(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function UTe(t){return new et(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(x9(r,s));"<"==o[0]&&!(r==kx&&s==kx)&&n.push(x9(s,r))}(i,e,n)):e.push(t),e}const Tx=new Set(["true","1"]),Dx=new Set(["false","0"]);function x9(t,n){const e=Tx.has(t)||Dx.has(t),i=Tx.has(n)||Dx.has(n);return(r,o)=>{let s=t==kx||t==r,a=n==kx||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Tx.has(t):Dx.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Tx.has(n):Dx.has(n)),s&&a}}const kDe=new RegExp("s*:selfs*,?","g");function CM(t,n,e,i){return new TDe(t).build(n,e,i)}class TDe{constructor(n){this._driver=n}build(n,e,i){const r=new EDe(e);return this._resetContextStyleTimingState(r),pl(this,L1(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function ITe(){return new et(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function NTe(){return new et(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{b9(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(xx(o.values()),e.errors.push(function jTe(t,n){return new et(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=pl(this,L1(n.animation),e);return{type:1,matchers:xDe(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:pp(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>pl(this,i,e)),options:pp(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=pl(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:pp(n.options)}}visitAnimate(n,e){const i=function ODe(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return SM(wx(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=SM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=wx(e,n);return SM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:Ai({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Ai(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===$d?i.push(a):e.errors.push(new et(3002,!1)):i.push(m9(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function RTe(t,n,e,i,r){return new et(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function pDe(t,n,e){const i=n.params||{},r=b9(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function ATe(t){return new et(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function LTe(){return new et(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let b=null!=y.offset?y.offset:function MDe(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=b&&(o++,C=y.offset=b),l=l||C<0||C>1,a=a||C0&&o{const b=h>0?y==f?1:h*y:s[y],C=b*m;e.currentTime=p+g.delay+C,g.duration=C,this._validateStyleAst(v,e),v.offset=b,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:pl(this,L1(n.animation),e),options:pp(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:pp(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:pp(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function DDe(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(kDe,"")),t=t.replace(/@\*/g,bx).replace(/@\w+/g,e=>bx+"-"+e.slice(1)).replace(/:animating/g,_M),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,fl(e.collectedStyles,e.currentQuerySelector,new Map);const a=pl(this,L1(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:pp(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function VTe(){return new et(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:wx(n.timings,e.errors,!0);return{type:12,animation:pl(this,L1(n.animation),e),timings:i,options:null}}}class EDe{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function pp(t){return t?(t=R1(t)).params&&(t.params=function ADe(t){return t?R1(t):null}(t.params)):t={},t}function SM(t,n,e){return{duration:t,delay:n,easing:e}}function kM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Ax{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const jDe=new RegExp(":enter","g"),RDe=new RegExp(":leave","g");function TM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new LDe).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class LDe{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Ax;const d=new DM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Bd(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),pl(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let g=f.length-1;g>=0;g--){const m=f[g];if(m.element===e){p=m;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[kM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Bd(F1(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Bd(i.duration):null,a=null!=i.delay?Bd(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),pl(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Ex);const s=Bd(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>pl(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Bd(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),pl(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return wx(e.params?F1(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Bd(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Ex);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),pl(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;pl(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Ex={};class DM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Ex,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mx(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Bd(i.duration)),null!=i.delay&&(r.delay=Bd(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=F1(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new DM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Ex,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new FDe(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(jDe,"."+this._enterClassName)).replace(RDe,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function HTe(t){return new et(3014,!1)}()),a}}class Mx{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Mx(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||$d),this._currentKeyframe.set(e,$d);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function $De(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,$d)}else Nh(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=F1(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??$d),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Nh(a,new Map,this._backFill);c.forEach((u,d)=>{u===uM?n.add(d):u===$d&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?xx(n.values()):[],s=e.size?xx(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return kM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class FDe extends Mx{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Nh(n[0]);l.set("offset",0),o.push(l);const c=Nh(n[0]);c.set("offset",k9(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Nh(n[d]);const f=h.get("offset");h.set("offset",k9((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return kM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function k9(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class AM{}const BDe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class VDe extends AM{normalizePropertyName(n,e){return xM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(BDe.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function OTe(t,n){return new et(3005,!1)}())}return s+o}}function T9(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const EM={};class D9{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function HDe(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||EM,p=this.buildStyles(i,a&&a.params||EM,d),g=l&&l.params||EM,m=this.buildStyles(r,g,d),v=new Set,y=new Map,b=new Map,C="void"===r,k={params:UDe(g,h),delay:this.ast.options?.delay},T=u?[]:TM(n,e,this.ast.animation,o,s,p,m,k,c,d);let j=0;if(T.forEach(N=>{j=Math.max(N.duration+N.delay,j)}),d.length)return T9(e,this._triggerName,i,r,C,p,m,[],[],y,b,j,d);T.forEach(N=>{const $=N.element,V=fl(y,$,new Set);N.preStyleProps.forEach(Y=>V.add(Y));const z=fl(b,$,new Set);N.postStyleProps.forEach(Y=>z.add(Y)),$!==e&&v.add($)});const B=xx(v.values());return T9(e,this._triggerName,i,r,C,p,m,T,B,y,b,j)}}function UDe(t,n){const e=R1(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class zDe{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=R1(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=F1(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class WDe{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new zDe(r.style,r.options&&r.options.params||{},i))}),A9(this.states,"true","1"),A9(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new D9(n,r,this.states))}),this.fallbackTransition=function qDe(t,n,e){return new D9(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function A9(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const YDe=new Ax;class JDe{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=CM(this._driver,e,i,r);if(i.length)throw function JTe(t){return new et(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=s9(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=TM(this._driver,e,o,yM,yx,new Map,new Map,i,YDe,r),s.forEach(u=>{const d=fl(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function KTe(){return new et(3300,!1)}()),s=[]),r.length)throw function XTe(t){return new et(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,$d))})});const c=Ih(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function QTe(t){return new et(3301,!1)}();return e}listen(n,e,i,r){const o=pM(e,"","","");return hM(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const E9="ng-animate-queued",MM="ng-animate-disabled",eAe=[],M9={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tAe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Gl="__ng_removed";class OM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function oAe(t){return t??null}(i?n.value:n),i){const o=R1(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const $1="void",IM=new OM($1);class nAe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Wl(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function ZTe(t,n){return new et(3302,!1)}();if(null==i||0==i.length)throw function eDe(t){return new et(3303,!1)}();if(!function sAe(t){return"start"==t||"done"==t}(i))throw function tDe(t,n){return new et(3400,!1)}();const o=fl(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=fl(this._engine.statesByElement,n,new Map);return a.has(e)||(Wl(n,_x),Wl(n,_x+"-"+e),a.set(e,IM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function nDe(t){return new et(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new NM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(Wl(n,_x),Wl(n,_x+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new OM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=IM),c.value!==$1&&l.value===c.value){if(!function cAe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{fp(n,m),Nu(n,v)})}return}const h=fl(this._engine.playersByElement,n,[]);h.forEach(g=>{g.namespaceId==this.id&&g.triggerName==e&&g.queued&&g.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Wl(n,E9),s.onStart(()=>{Dm(n,E9)})),s.onDone(()=>{let g=this.players.indexOf(s);g>=0&&this.players.splice(g,1);const m=this._engine.playersByElement.get(n);if(m){let v=m.indexOf(s);v>=0&&m.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,bx,!0);i.forEach(r=>{if(r[Gl])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,$1,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&Ih(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||IM,u=new OM($1),d=new NM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[Gl];(!o||o===M9)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Wl(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=pM(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,hM(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class iAe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new nAe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(Ox(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!Ox(e))return;const o=e[Gl];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Wl(n,MM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),Dm(n,MM))}removeNode(n,e,i,r){if(Ox(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[Gl]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return Ox(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,bx,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,_M,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return Ih(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[Gl];if(e&&e.setForRemoval){if(n[Gl]=M9,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(MM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ih(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function iDe(t){return new et(3402,!1)}()}_flushAnimations(n,e){const i=new Ax,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(G=>{u.add(G);const F=this.driver.query(G,".ng-animate-queued",!0);for(let Z=0;Z{const Z=yM+g++;p.set(F,Z),G.forEach(D=>Wl(D,Z))});const m=[],v=new Set,y=new Set;for(let G=0;Gv.add(D)):y.add(F))}const b=new Map,C=N9(h,Array.from(v));C.forEach((G,F)=>{const Z=yx+g++;b.set(F,Z),G.forEach(D=>Wl(D,Z))}),n.push(()=>{f.forEach((G,F)=>{const Z=p.get(F);G.forEach(D=>Dm(D,Z))}),C.forEach((G,F)=>{const Z=b.get(F);G.forEach(D=>Dm(D,Z))}),m.forEach(G=>{this.processLeaveNode(G)})});const k=[],T=[];for(let G=this._namespaceList.length-1;G>=0;G--)this._namespaceList[G].drainQueuedTransitions(e).forEach(Z=>{const D=Z.player,E=Z.element;if(k.push(D),this.collectedEnterElements.length){const ae=E[Gl];if(ae&&ae.setForMove){if(ae.previousTriggersValues&&ae.previousTriggersValues.has(Z.triggerName)){const De=ae.previousTriggersValues.get(Z.triggerName),be=this.statesByElement.get(Z.element);if(be&&be.has(Z.triggerName)){const Ie=be.get(Z.triggerName);Ie.value=De,be.set(Z.triggerName,Ie)}}return void D.destroy()}}const M=!d||!this.driver.containsElement(d,E),U=b.get(E),L=p.get(E),X=this._buildInstruction(Z,i,L,U,M);if(X.errors&&X.errors.length)return void T.push(X);if(M)return D.onStart(()=>fp(E,X.fromStyles)),D.onDestroy(()=>Nu(E,X.toStyles)),void r.push(D);if(Z.isFallbackTransition)return D.onStart(()=>fp(E,X.fromStyles)),D.onDestroy(()=>Nu(E,X.toStyles)),void r.push(D);const ne=[];X.timelines.forEach(ae=>{ae.stretchStartingKeyframe=!0,this.disabledNodes.has(ae.element)||ne.push(ae)}),X.timelines=ne,i.append(E,X.timelines),s.push({instruction:X,player:D,element:E}),X.queriedElements.forEach(ae=>fl(a,ae,[]).push(D)),X.preStyleProps.forEach((ae,De)=>{if(ae.size){let be=l.get(De);be||l.set(De,be=new Set),ae.forEach((Ie,R)=>be.add(R))}}),X.postStyleProps.forEach((ae,De)=>{let be=c.get(De);be||c.set(De,be=new Set),ae.forEach((Ie,R)=>be.add(R))})});if(T.length){const G=[];T.forEach(F=>{G.push(function rDe(t,n){return new et(3505,!1)}())}),k.forEach(F=>F.destroy()),this.reportError(G)}const j=new Map,B=new Map;s.forEach(G=>{const F=G.element;i.has(F)&&(B.set(F,F),this._beforeAnimationBuild(G.player.namespaceId,G.instruction,j))}),r.forEach(G=>{const F=G.element;this._getPreviousPlayers(F,!1,G.namespaceId,G.triggerName,null).forEach(D=>{fl(j,F,[]).push(D),D.destroy()})});const N=m.filter(G=>P9(G,l,c)),$=new Map;I9($,this.driver,y,c,$d).forEach(G=>{P9(G,l,c)&&N.push(G)});const z=new Map;f.forEach((G,F)=>{I9(z,this.driver,new Set(G),l,uM)}),N.forEach(G=>{const F=$.get(G),Z=z.get(G);$.set(G,new Map([...Array.from(F?.entries()??[]),...Array.from(Z?.entries()??[])]))});const Y=[],O=[],H={};s.forEach(G=>{const{element:F,player:Z,instruction:D}=G;if(i.has(F)){if(u.has(F))return Z.onDestroy(()=>Nu(F,D.toStyles)),Z.disabled=!0,Z.overrideTotalTime(D.totalTime),void r.push(Z);let E=H;if(B.size>1){let U=F;const L=[];for(;U=U.parentNode;){const X=B.get(U);if(X){E=X;break}L.push(U)}L.forEach(X=>B.set(X,E))}const M=this._buildAnimation(Z.namespaceId,D,j,o,z,$);if(Z.setRealPlayer(M),E===H)Y.push(Z);else{const U=this.playersByElement.get(E);U&&U.length&&(Z.parentPlayer=Ih(U)),r.push(Z)}}else fp(F,D.fromStyles),Z.onDestroy(()=>Nu(F,D.toStyles)),O.push(Z),u.has(F)&&r.push(Z)}),O.forEach(G=>{const F=o.get(G.element);if(F&&F.length){const Z=Ih(F);G.setRealPlayer(Z)}}),r.forEach(G=>{G.parentPlayer?G.syncPlayerEvents(G.parentPlayer):G.destroy()});for(let G=0;G!M.destroyed);E.length?aAe(this,F,E):this.processLeaveNode(F)}return m.length=0,Y.forEach(G=>{this.players.push(G),G.onDone(()=>{G.destroy();const F=this.players.indexOf(G);this.players.splice(F,1)}),G.play()}),Y}elementContainsData(n,e){let i=!1;const r=e[Gl];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==$1;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=fl(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}fp(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const g=p.element;u.add(g);const m=g[Gl];if(m&&m.removedBeforeQueried)return new P1(p.duration,p.delay);const v=g!==l,y=function lAe(t){const n=[];return j9(t,n),n}((i.get(g)||eAe).map(j=>j.getRealPlayer())).filter(j=>!!j.element&&j.element===g),b=o.get(g),C=s.get(g),k=s9(0,this._normalizer,0,p.keyframes,b,C),T=this._buildPlayer(p,k,y);if(p.subTimeline&&r&&d.add(g),v){const j=new NM(n,a,g);j.setRealPlayer(T),c.push(j)}return T});c.forEach(p=>{fl(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function rAe(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Wl(p,g9));const f=Ih(h);return f.onDestroy(()=>{u.forEach(p=>Dm(p,g9)),Nu(l,e.toStyles)}),d.forEach(p=>{fl(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new P1(n.duration,n.delay)}}class NM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new P1,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>hM(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){fl(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function Ox(t){return t&&1===t.nodeType}function O9(t,n){const e=t.style.display;return t.style.display=n??"none",e}function I9(t,n,e,i,r){const o=[];e.forEach(l=>o.push(O9(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Gl]=tAe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>O9(l,o[a++])),s}function N9(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function Wl(t,n){t.classList?.add(n)}function Dm(t,n){t.classList?.remove(n)}function aAe(t,n,e){Ih(e).onDone(()=>t.processLeaveNode(n))}function j9(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class Ix{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new iAe(n,e,i),this._timelineEngine=new JDe(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=CM(this._driver,o,l,c);if(l.length)throw function qTe(t,n){return new et(3404,!1)}();a=function GDe(t,n,e){return new WDe(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=a9(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=a9(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let dAe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Nu(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Nu(this._element,this._initialStyles),this._endStyles&&(Nu(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(fp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(fp(this._element,this._endStyles),this._endStyles=null),Nu(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function jM(t){let n=null;return t.forEach((e,i)=>{(function hAe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class R9{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:w9(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class fAe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return d9(n,e)}getParentElement(n){return mM(n)}query(n,e,i){return h9(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof R9);(function vDe(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,g)=>c.set(g,p))});let d=function fDe(t){return t.length?t[0]instanceof Map?t:t.map(n=>m9(n)):[]}(e).map(f=>Nh(f));d=function yDe(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,w9(t,a)))}}return n}(n,d,c);const h=function uAe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=jM(n[0]),n.length>1&&(i=jM(n[n.length-1]))):n instanceof Map&&(e=jM(n)),e||i?new dAe(t,e,i):null}(n,d);return new R9(n,d,l,h)}}let pAe=(()=>{class t extends t9{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:_c.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?n9(e):e;return L9(this._renderer,null,i,"register",[r]),new gAe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Ve(om),Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();class gAe extends kTe{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new mAe(this._id,n,e||{},this._renderer)}}class mAe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return L9(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function L9(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const F9="@.disabled";let vAe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new $9("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new yAe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Ve(om),Ve(Ix),Ve(si))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();class $9{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==F9?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class yAe extends $9{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==F9?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function _Ae(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function bAe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let wAe=(()=>{class t extends Ix{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr),Ve(vM),Ve(AM),Ve(Pd))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const B9=[{provide:t9,useClass:pAe},{provide:AM,useFactory:function xAe(){return new VDe}},{provide:Ix,useClass:wAe},{provide:om,useFactory:function CAe(t,n,e){return new vAe(t,n,e)},deps:[vx,Ix,si]}],PM=[{provide:vM,useFactory:()=>new fAe},{provide:CB,useValue:"BrowserAnimations"},...B9],RM=[{provide:vM,useClass:f9},{provide:CB,useValue:"NoopAnimations"},...B9];let SAe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?RM:PM}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:PM,imports:[lM]}),t})(),kAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:RM,imports:[lM]}),t})();function $t(...t){let n=t[t.length-1];return Jf(n)?(t.pop(),dD(t,n)):F0(t)}class Zo extends hr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Rg;return this._value}next(n){super.next(this._value=n)}}const jx=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class LM extends Ln{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class TAe extends Ln{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function FM(t,n,e,i,r=new TAe(t,e,i)){if(!r.closed)return n instanceof ar?n.subscribe(r):uD(n)(r)}const V9={};function Px(...t){let n,e;return Jf(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&nl(t[0])&&(t=t[0]),F0(t,e).lift(new DAe(n))}class DAe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new AAe(n,this.resultSelector))}}class AAe extends LM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(V9),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function Lx(t){return t?function MAe(t){return new ar(n=>t.schedule(()=>n.complete()))}(t):Vd}function H9(t){return new ar(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?Jo(e):Lx()).subscribe(n)})}function gp(t,n){return new ar(n?e=>n.schedule(OAe,0,{error:t,subscriber:e}):e=>e.error(t))}function OAe({error:t,subscriber:n}){n.error(t)}function gl(t,n){return"function"==typeof n?e=>e.pipe(gl((i,r)=>Jo(t(i,r)).pipe(xn((o,s)=>n(i,o,r,s))))):e=>e.lift(new IAe(t))}class IAe{constructor(n){this.project=n}call(n,e){return e.subscribe(new NAe(n,this.project))}}class NAe extends R0{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new P0(this),r=this.destination;r.add(i),this.innerSubscription=L0(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const U9=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function es(t){return n=>0===t?Lx():n.lift(new jAe(t))}class jAe{constructor(n){if(this.total=n,this.total<0)throw new U9}call(n,e){return e.subscribe(new PAe(n,this.total))}}class PAe extends Ln{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function Fx(...t){const n=t[t.length-1];return Jf(n)?(t.pop(),e=>Rx(t,e,n)):e=>Rx(t,e)}function co(t,n){return function(i){return i.lift(new RAe(t,n))}}class RAe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new LAe(n,this.predicate,this.thisArg))}}class LAe extends Ln{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function $x(t=null){return n=>n.lift(new FAe(t))}class FAe{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new $Ae(n,this.defaultValue))}}class $Ae extends Ln{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function z9(t=HAe){return n=>n.lift(new BAe(t))}class BAe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new VAe(n,this.errorFactory))}}class VAe extends Ln{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function HAe(){return new jx}function jh(t,n){const e=arguments.length>=2;return i=>i.pipe(t?co((r,o)=>t(r,o,i)):bh,es(1),e?$x(n):z9(()=>new jx))}function Ph(t,n){return _o(t,n,1)}function Hd(){}function xo(t,n,e){return function(r){return r.lift(new UAe(t,n,e))}}class UAe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new zAe(n,this.nextOrObserver,this.error,this.complete))}}class zAe extends Ln{constructor(n,e,i,r){super(n),this._tapNext=Hd,this._tapError=Hd,this._tapComplete=Hd,this._tapError=i||Hd,this._tapComplete=r||Hd,xu(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Hd,this._tapError=e.error||Hd,this._tapComplete=e.complete||Hd)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Va(t){return function(e){const i=new GAe(t),r=e.lift(i);return i.caught=r}}class GAe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new WAe(n,this.selector,this.caught))}}class WAe extends R0{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new P0(this);this.add(i);const r=L0(e,i);r!==i&&this.add(r)}}}function G9(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new qAe(t,n,e))}}class qAe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new YAe(n,this.accumulator,this.seed,this.hasSeed))}}class YAe extends Ln{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function $M(t){return function(e){return 0===t?Lx():e.lift(new JAe(t))}}class JAe{constructor(n){if(this.total=n,this.total<0)throw new U9}call(n,e){return e.subscribe(new KAe(n,this.total))}}class KAe extends Ln{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?co((r,o)=>t(r,o,i)):bh,$M(1),e?$x(n):z9(()=>new jx))}class QAe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new ZAe(n,this.predicate,this.inclusive))}}class ZAe extends Ln{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class tEe{constructor(n){this.value=n}call(n,e){return e.subscribe(new nEe(n,this.value))}}class nEe extends Ln{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function BM(t){return n=>n.lift(new iEe(t))}class iEe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new rEe(n,this.callback))}}class rEe extends Ln{constructor(n,e){super(n),this.add(new pn(e))}}const Jn="primary",B1=Symbol("RouteTitle");class oEe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Am(t){return new oEe(t)}function sEe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function Y9(t){return Array.prototype.concat.apply([],t)}function J9(t){return t.length>0?t[t.length-1]:null}function Is(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Rh(t){return YA(t)?t:g1(t)?Jo(Promise.resolve(t)):$t(t)}const Bx=!1,lEe={exact:function Q9(t,n,e){if(!mp(t.segments,n.segments)||!Vx(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!Q9(t.children[i],n.children[i],e))return!1;return!0},subset:Z9},K9={exact:function cEe(t,n){return ju(t,n)},subset:function uEe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>q9(t[e],n[e]))},ignored:()=>!0};function X9(t,n,e){return lEe[e.paths](t.root,n.root,e.matrixParams)&&K9[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function Z9(t,n,e){return eV(t,n,n.segments,e)}function eV(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!mp(r,e)||n.hasChildren()||!Vx(r,e,i))}if(t.segments.length===e.length){if(!mp(t.segments,e)||!Vx(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!Z9(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(mp(t.segments,r)&&Vx(t.segments,r,i)&&t.children[Jn])&&eV(t.children[Jn],n,o,i)}}function Vx(t,n,e){return n.every((i,r)=>K9[e](t[r].parameters,i.parameters))}class Lh{constructor(n=new di([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Am(this.queryParams)),this._queryParamMap}toString(){return fEe.serialize(this)}}class di{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Is(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Hx(this)}}class V1{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Am(this.parameters)),this._parameterMap}toString(){return iV(this)}}function mp(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let H1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return new VM},providedIn:"root"}),t})();class VM{parse(n){const e=new xEe(n);return new Lh(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${U1(n.root,!0)}`,i=function mEe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${Ux(e)}=${Ux(r)}`).join("&"):`${Ux(e)}=${Ux(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function pEe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const fEe=new VM;function Hx(t){return t.segments.map(n=>iV(n)).join("/")}function U1(t,n){if(!t.hasChildren())return Hx(t);if(n){const e=t.children[Jn]?U1(t.children[Jn],!1):"",i=[];return Is(t.children,(r,o)=>{o!==Jn&&i.push(`${o}:${U1(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function hEe(t,n){let e=[];return Is(t.children,(i,r)=>{r===Jn&&(e=e.concat(n(i,r)))}),Is(t.children,(i,r)=>{r!==Jn&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===Jn?[U1(t.children[Jn],!1)]:[`${r}:${U1(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[Jn]?`${Hx(t)}/${e[0]}`:`${Hx(t)}/(${e.join("//")})`}}function tV(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ux(t){return tV(t).replace(/%3B/gi,";")}function HM(t){return tV(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function zx(t){return decodeURIComponent(t)}function nV(t){return zx(t.replace(/\+/g,"%20"))}function iV(t){return`${HM(t.path)}${function gEe(t){return Object.keys(t).map(n=>`;${HM(n)}=${HM(t[n])}`).join("")}(t.parameters)}`}const vEe=/^[^\/()?;=#]+/;function Gx(t){const n=t.match(vEe);return n?n[0]:""}const yEe=/^[^=?&#]+/,bEe=/^[^&#]+/;class xEe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new di([],{}):new di([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[Jn]=new di(n,e)),i}parseSegment(){const n=Gx(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new et(4009,Bx);return this.capture(n),new V1(zx(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=Gx(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Gx(this.remaining);r&&(i=r,this.capture(i))}n[zx(e)]=zx(i)}parseQueryParam(n){const e=function _Ee(t){const n=t.match(yEe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function wEe(t){const n=t.match(bEe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=nV(e),o=nV(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Gx(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new et(4010,Bx);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=Jn);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[Jn]:new di([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new et(4011,Bx)}}function UM(t){return t.segments.length>0?new di([],{[Jn]:t}):t}function Wx(t){const n={};for(const i of Object.keys(t.children)){const o=Wx(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function CEe(t){if(1===t.numberOfChildren&&t.children[Jn]){const n=t.children[Jn];return new di(t.segments.concat(n.segments),n.children)}return t}(new di(t.segments,n))}function vp(t){return t instanceof Lh}const zM=!1;function SEe(t,n,e,i,r){if(0===e.length)return Em(n.root,n.root,n.root,i,r);const o=function lV(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new aV(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Is(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new aV(e,n,i)}(e);return o.toRoot()?Em(n.root,n.root,new di([],{}),i,r):function s(l){const c=function TEe(t,n,e,i){if(t.isAbsolute)return new Mm(n.root,!0,0);if(-1===i)return new Mm(e,e===n.root,0);return function cV(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new et(4005,zM&&"Invalid number of '../'");r=i.segments.length}return new Mm(i,!1,r-o)}(e,i+(z1(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?Om(c.segmentGroup,c.index,o.commands):GM(c.segmentGroup,c.index,o.commands);return Em(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function z1(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function G1(t){return"object"==typeof t&&null!=t&&t.outlets}function Em(t,n,e,i,r){let s,o={};i&&Is(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:sV(t,n,e);const a=UM(Wx(s));return new Lh(a,o,r)}function sV(t,n,e){const i={};return Is(t.children,(r,o)=>{i[o]=r===n?e:sV(r,n,e)}),new di(t.segments,i)}class aV{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&z1(i[0]))throw new et(4003,zM&&"Root segment cannot have matrix parameters");const r=i.find(G1);if(r&&r!==J9(i))throw new et(4004,zM&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Mm{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function GM(t,n,e){if(t||(t=new di([],{})),0===t.segments.length&&t.hasChildren())return Om(t,n,e);const i=function AEe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(G1(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!dV(l,c,s))return o;i+=2}else{if(!dV(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=GM(t.children[s],n,o))}),Is(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new di(t.segments,r)}}function WM(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=WM(new di([],{}),0,e))}),n}function uV(t){const n={};return Is(t,(e,i)=>n[i]=`${e}`),n}function dV(t,n,e){return t==e.path&&ju(n,e.parameters)}const W1="imperative";class Pu{constructor(n,e){this.id=n,this.url=e}}class qx extends Pu{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Ud extends Pu{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class q1 extends Pu{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Yx extends Pu{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class Jx extends Pu{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class MEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class OEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class IEe extends Pu{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class NEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class PEe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class REe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class LEe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class FEe{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $Ee{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BEe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class hV{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let UEe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return SEe(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),GEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(n){return UEe.\u0275fac(n)},providedIn:"root"}),t})();class fV{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=qM(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=qM(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=YM(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return YM(n,this._root).map(e=>e.value)}}function qM(t,n){if(t===n.value)return n;for(const e of n.children){const i=qM(t,e);if(i)return i}return null}function YM(t,n){if(t===n.value)return[n];for(const e of n.children){const i=YM(t,e);if(i.length)return i.unshift(n),i}return[]}class zd{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Im(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class pV extends fV{constructor(n,e){super(n),this.snapshot=e,JM(this,n)}toString(){return this.snapshot.toString()}}function gV(t,n){const e=function WEe(t,n){const s=new Kx([],{},{},"",{},Jn,n,null,t.root,-1,{});return new vV("",new zd(s,[]))}(t,n),i=new Zo([new V1("",{})]),r=new Zo({}),o=new Zo({}),s=new Zo({}),a=new Zo(""),l=new Li(i,r,s,a,o,Jn,n,e.root);return l.snapshot=e.root,new pV(new zd(l,[]),e)}class Li{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(xn(c=>c[B1]))??$t(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(xn(n=>Am(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(xn(n=>Am(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function mV(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function qEe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Kx{get title(){return this.data?.[B1]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Am(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Am(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class vV extends fV{constructor(n,e){super(e),this.url=n,JM(this,e)}toString(){return yV(this._root)}}function JM(t,n){n.value._routerState=t,n.children.forEach(e=>JM(t,e))}function yV(t){const n=t.children.length>0?` { ${t.children.map(yV).join(", ")} } `:"";return`${t.value}${n}`}function KM(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,ju(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),ju(n.params,e.params)||t.params.next(e.params),function aEe(t,n){if(t.length!==n.length)return!1;for(let e=0;eju(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||XM(t.parent,n.parent))}function Y1(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function JEe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return Y1(t,i,r);return Y1(t,i)})}(t,n,e);return new zd(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Y1(t,a)),s}}const i=function KEe(t){return new Li(new Zo(t.url),new Zo(t.params),new Zo(t.queryParams),new Zo(t.fragment),new Zo(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>Y1(t,o));return new zd(i,r)}}const QM="ngNavigationCancelingError";function _V(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=vp(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=bV(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function bV(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[QM]=!0,i.cancellationCode=n,e&&(i.url=e),i}function wV(t){return xV(t)&&vp(t.url)}function xV(t){return t&&t[QM]}class XEe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new J1,this.attachRef=null}}let J1=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new XEe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Xx=!1;let yp=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=Jn,this.activateEvents=new Oe,this.deactivateEvents=new Oe,this.attachEvents=new Oe,this.detachEvents=new Oe,this.parentContexts=$n(J1),this.location=$n($a),this.changeDetector=$n(jo),this.environmentInjector=$n(Vl)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new et(4012,Xx);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new et(4012,Xx);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new et(4012,Xx);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new et(4013,Xx);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new QEe(e,a,r.injector);if(i&&function ZEe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Kt]}),t})();class QEe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Li?this.route:n===J1?this.childContexts:this.parent.get(n,e)}}let ZM=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ng-component"]],standalone:!0,features:[No],decls:1,vars:0,template:function(e,i){1&e&&ie(0,"router-outlet")},dependencies:[yp],encapsulation:2}),t})();function CV(t,n){return t.providers&&!t._injector&&(t._injector=Gw(t.providers,n,`Route: ${t.path}`)),t._injector??n}function tO(t){const n=t.children&&t.children.map(tO),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==Jn&&(e.component=ZM),e}function ql(t){return t.outlet||Jn}function SV(t,n){const e=t.filter(i=>ql(i)===n);return e.push(...t.filter(i=>ql(i)!==n)),e}function K1(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class rMe{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),KM(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Im(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Is(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Im(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Im(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Im(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new BEe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new FEe(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(KM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),KM(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=K1(r.snapshot),l=a?.get(im)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class kV{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class Qx{constructor(n,e){this.component=n,this.route=e}}function oMe(t,n,e){const i=t._root;return X1(i,n?n._root:null,e,[i.value])}function Nm(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function a1e(t){return null!==qb(t)}(t)?n.get(t):t:i}function X1(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Im(n);return t.children.forEach(s=>{(function aMe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function lMe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!mp(t.url,n.url);case"pathParamsOrQueryParamsChange":return!mp(t.url,n.url)||!ju(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!XM(t,n)||!ju(t.queryParams,n.queryParams);default:return!XM(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new kV(i)):(o.data=s.data,o._resolvedData=s._resolvedData),X1(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Qx(a.outlet.component,s))}else s&&Q1(n,a,r),r.canActivateChecks.push(new kV(i)),X1(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Is(o,(s,a)=>Q1(s,e.getContext(a),r)),r}function Q1(t,n,e){const i=Im(t),r=t.value;Is(i,(o,s)=>{Q1(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new Qx(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function Z1(t){return"function"==typeof t}function nO(t){return t instanceof jx||"EmptyError"===t?.name}const Zx=Symbol("INITIAL_VALUE");function jm(){return gl(t=>Px(t.map(n=>n.pipe(es(1),Fx(Zx)))).pipe(xn(n=>{for(const e of n)if(!0!==e){if(e===Zx)return Zx;if(!1===e||e instanceof Lh)return e}return!0}),co(n=>n!==Zx),es(1)))}function TV(t){return function Yf(...t){return fF(t)}(xo(n=>{if(vp(n))throw _V(0,n)}),xn(n=>!0===n))}const iO={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function DV(t,n,e,i,r){const o=rO(t,n,e);return o.matched?function kMe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?$t(r.map(s=>{const a=Nm(s,t);return Rh(function pMe(t){return t&&Z1(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(jm(),TV()):$t(!0)}(i=CV(n,i),n,e).pipe(xn(s=>!0===s?o:{...iO})):$t(o)}function rO(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...iO}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||sEe)(e,t,n);if(!r)return{...iO};const o={};Is(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function eC(t,n,e,i){if(e.length>0&&function AMe(t,n,e){return e.some(i=>tC(t,n,i)&&ql(i)!==Jn)}(t,e,i)){const o=new di(n,function DMe(t,n,e,i){const r={};r[Jn]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&ql(o)!==Jn){const s=new di([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[ql(o)]=s}return r}(t,n,i,new di(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function EMe(t,n,e){return e.some(i=>tC(t,n,i))}(t,e,i)){const o=new di(t.segments,function TMe(t,n,e,i,r){const o={};for(const s of i)if(tC(t,e,s)&&!r[ql(s)]){const a=new di([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[ql(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new di(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function tC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function AV(t,n,e,i){return!!(ql(t)===i||i!==Jn&&tC(n,e,t))&&("**"===t.path||rO(n,t,e).matched)}function EV(t,n,e){return 0===n.length&&!t.children[e]}const nC=!1;class iC{constructor(n){this.segmentGroup=n||null}}class MV{constructor(n){this.urlTree=n}}function ey(t){return gp(new iC(t))}function OV(t){return gp(new MV(t))}function MMe(t){return gp(new et(4e3,nC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class NMe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=eC(this.urlTree.root,[],[],this.config).segmentGroup,e=new di(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,Jn).pipe(xn(o=>this.createUrlTree(Wx(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Va(o=>{if(o instanceof MV)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof iC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,Jn).pipe(xn(r=>this.createUrlTree(Wx(r),n.queryParams,n.fragment))).pipe(Va(r=>{throw r instanceof iC?this.noMatchError(r):r}))}noMatchError(n){return new et(4002,nC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=UM(n);return new Lh(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(xn(o=>new di([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return Jo(r).pipe(Ph(o=>{const s=i.children[o],a=SV(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(xn(l=>({segment:l,outlet:o})))}),G9((o,s)=>(o[s.outlet]=s.segment,o),{}),W9())}expandSegment(n,e,i,r,o,s){return Jo(i).pipe(Ph(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Va(c=>{if(c instanceof iC)return $t(null);throw c}))),jh(a=>!!a),Va((a,l)=>{if(nO(a))return EV(e,r,o)?$t(new di([],{})):ey(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return AV(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):ey(e):ey(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?OV(o):this.lineralizeSegments(i,o).pipe(_o(s=>{const a=new di(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=rO(e,r,o);if(!a)return ey(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?OV(d):this.lineralizeSegments(r,d).pipe(_o(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=CV(i,n),i.loadChildren?(i._loadedRoutes?$t({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(xn(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new di(r,{})))):$t(new di(r,{}))):DV(e,i,r,n).pipe(gl(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(_o(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=eC(e,a,l,h),g=new di(f.segments,f.children);if(0===p.length&&g.hasChildren())return this.expandChildren(d,h,g).pipe(xn(b=>new di(a,b)));if(0===h.length&&0===p.length)return $t(new di(a,{}));const m=ql(i)===o;return this.expandSegment(d,g,h,p,m?Jn:o,!0).pipe(xn(y=>new di(a.concat(y.segments),y.children)))})):ey(e)))}getChildConfig(n,e,i){return e.children?$t({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?$t({routes:e._loadedRoutes,injector:e._loadedInjector}):function SMe(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?$t(!0):$t(r.map(s=>{const a=Nm(s,t);return Rh(function uMe(t){return t&&Z1(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(jm(),TV())}(n,e,i).pipe(_o(r=>r?this.configLoader.loadChildren(n,e).pipe(xo(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function OMe(t){return gp(bV(nC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):$t({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return $t(i);if(r.numberOfChildren>1||!r.children[Jn])return MMe(n.redirectTo);r=r.children[Jn]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Lh(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Is(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Is(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new di(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new et(4001,nC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class PMe{}class FMe{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=eC(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,Jn).pipe(xn(e=>{if(null===e)return null;const i=new Kx([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Jn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new zd(i,e),o=new vV(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=mV(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return Jo(Object.keys(i.children)).pipe(Ph(r=>{const o=i.children[r],s=SV(e,r);return this.processSegmentGroup(n,s,o,r)}),G9((r,o)=>r&&o?(r.push(...o),r):null),function XAe(t,n=!1){return e=>e.lift(new QAe(t,n))}(r=>null!==r),$x(null),W9(),xn(r=>{if(null===r)return null;const o=NV(r);return function $Me(t){t.sort((n,e)=>n.value.outlet===Jn?-1:e.value.outlet===Jn?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return Jo(e).pipe(Ph(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),jh(s=>!!s),Va(s=>{if(nO(s))return EV(i,r,o)?$t([]):$t(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!AV(e,i,r,o))return $t(null);let s;if("**"===e.path){const a=r.length>0?J9(r).parameters:{},l=PV(i)+r.length;s=$t({snapshot:new Kx(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,RV(e),ql(e),e.component??e._loadedComponent??null,e,jV(i),l,LV(e)),consumedSegments:[],remainingSegments:[]})}else s=DV(i,e,r,n).pipe(xn(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=PV(i)+l.length;return{snapshot:new Kx(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,RV(e),ql(e),e.component??e._loadedComponent??null,e,jV(i),d,LV(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(gl(a=>{if(null===a)return $t(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function BMe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=eC(i,c,u,h.filter(m=>void 0===m.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(xn(m=>null===m?null:[new zd(l,m)]));if(0===h.length&&0===p.length)return $t([new zd(l,[])]);const g=ql(e)===o;return this.processSegment(d,h,f,p,g?Jn:o).pipe(xn(m=>null===m?null:[new zd(l,m)]))}))}}function VMe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function NV(t){const n=[],e=new Set;for(const i of t){if(!VMe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=NV(i.children);n.push(new zd(i.value,r))}return n.filter(i=>!e.has(i))}function jV(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function PV(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function RV(t){return t.data||{}}function LV(t){return t.resolve||{}}function FV(t){return"string"==typeof t.title||null===t.title}function oO(t){return gl(n=>{const e=t(n);return e?Jo(e).pipe(xn(()=>n)):$t(n)})}const Pm=new Ut("ROUTES");let sO=(()=>{class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=$n(SB)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return $t(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Rh(e.loadComponent()).pipe(xn(BV),xo(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),BM(()=>{this.componentLoaders.delete(e)})),r=new fD(i,()=>new hr).pipe(Ub());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return $t({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(xn(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=Y9(l.get(Pm,[],An.Self|An.Optional)));return{routes:c.map(tO),injector:l}}),BM(()=>{this.childrenLoaders.delete(i)})),s=new fD(o,()=>new hr).pipe(Ub());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return Rh(e()).pipe(xn(BV),_o(i=>i instanceof L8||Array.isArray(i)?$t(i):Jo(this.compiler.compileModuleAsync(i))))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function BV(t){return function JMe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let oC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new hr,this.configLoader=$n(sO),this.environmentInjector=$n(Vl),this.urlSerializer=$n(H1),this.rootContexts=$n(J1),this.navigationId=0,this.afterPreactivation=()=>$t(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new REe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new PEe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Zo({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:W1,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(co(i=>0!==i.id),xn(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),gl(i=>{let r=!1,o=!1;return $t(i).pipe(xo(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),gl(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new Yx(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vd}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return VV(s.source)&&(e.browserUrlTree=s.extractedUrl),$t(s).pipe(gl(u=>{const d=this.transitions?.getValue();return this.events.next(new qx(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Vd:Promise.resolve(u)}),function jMe(t,n,e,i){return gl(r=>function IMe(t,n,e,i,r){return new NMe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(xn(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),xo(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function UMe(t,n,e,i,r){return _o(o=>function LMe(t,n,e,i,r,o,s="emptyOnly"){return new FMe(t,n,e,i,r,s,o).recognize().pipe(gl(a=>null===a?function RMe(t){return new ar(n=>n.error(t))}(new PMe):$t(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(xn(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),xo(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new MEe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,g=new qx(u,this.urlSerializer.serialize(d),h,f);this.events.next(g);const m=gV(d,this.rootComponentType).snapshot;return $t(i={...s,targetSnapshot:m,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new Yx(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vd}}),xo(s=>{const a=new OEe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),xn(s=>i={...s,guards:oMe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function mMe(t,n){return _o(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?$t({...e,guardsResult:!0}):function vMe(t,n,e,i){return Jo(t).pipe(_o(r=>function CMe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?$t(o.map(a=>{const l=K1(n)??r,c=Nm(a,l);return Rh(function fMe(t){return t&&Z1(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(jh())})).pipe(jm()):$t(!0)}(r.component,r.route,e,n,i)),jh(r=>!0!==r,!0))}(s,i,r,t).pipe(_o(a=>a&&function cMe(t){return"boolean"==typeof t}(a)?function yMe(t,n,e,i){return Jo(n).pipe(Ph(r=>Rx(function bMe(t,n){return null!==t&&n&&n(new LEe(t)),$t(!0)}(r.route.parent,i),function _Me(t,n){return null!==t&&n&&n(new $Ee(t)),$t(!0)}(r.route,i),function xMe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function sMe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>H9(()=>$t(s.guards.map(l=>{const c=K1(s.node)??e,u=Nm(l,c);return Rh(function hMe(t){return t&&Z1(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(jh())})).pipe(jm())));return $t(o).pipe(jm())}(t,r.path,e),function wMe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return $t(!0);const r=i.map(o=>H9(()=>{const s=K1(n)??e,a=Nm(o,s);return Rh(function dMe(t){return t&&Z1(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(jh())}));return $t(r).pipe(jm())}(t,r.route,e))),jh(r=>!0!==r,!0))}(i,o,t,n):$t(a)),xn(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),xo(s=>{if(i.guardsResult=s.guardsResult,vp(s.guardsResult))throw _V(0,s.guardsResult);const a=new IEe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),co(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),oO(s=>{if(s.guards.canActivateChecks.length)return $t(s).pipe(xo(a=>{const l=new NEe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),gl(a=>{let l=!1;return $t(a).pipe(function zMe(t,n){return _o(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return $t(e);let o=0;return Jo(r).pipe(Ph(s=>function GMe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!FV(r)&&(o[B1]=r.title),function WMe(t,n,e,i){const r=function qMe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return $t({});const o={};return Jo(r).pipe(_o(s=>function YMe(t,n,e,i){const r=K1(n)??i,o=Nm(t,r);return Rh(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(jh(),xo(a=>{o[s]=a}))),$M(1),function eEe(t){return n=>n.lift(new tEe(t))}(o),Va(s=>nO(s)?Vd:gp(s)))}(o,t,n,i).pipe(xn(s=>(t._resolvedData=s,t.data=mV(t,e).resolve,r&&FV(r)&&(t.data[B1]=r.title),null)))}(s.route,i,t,n)),xo(()=>o++),$M(1),_o(s=>o===r.length?$t(e):Vd))})}(e.paramsInheritanceStrategy,this.environmentInjector),xo({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),xo(a=>{const l=new jEe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),oO(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(xo(u=>{l.component=u}),xn(()=>{})));for(const u of l.children)c.push(...a(u));return c};return Px(a(s.targetSnapshot.root)).pipe($x(),es(1))}),oO(()=>this.afterPreactivation()),xn(s=>{const a=function YEe(t,n,e){const i=Y1(t,n._root,e?e._root:void 0);return new pV(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),xo(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>xn(i=>(new rMe(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),es(1),xo({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ud(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),BM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Va(s=>{if(o=!0,xV(s)){wV(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new q1(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),wV(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||VV(i.source)};e.scheduleNavigation(l,W1,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new Jx(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Vd}))}))}cancelNavigationTransition(e,i,r){const o=new q1(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function VV(t){return t!==W1}let HV=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===Jn);return i}getResolvedTitleForRoute(e){return e.data[B1]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(KMe)},providedIn:"root"}),t})(),KMe=(()=>{class t extends HV{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(Ve(K7))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),XMe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(ZMe)},providedIn:"root"}),t})();class QMe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let ZMe=(()=>{class t extends QMe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const sC=new Ut("",{providedIn:"root",factory:()=>({})});let tOe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(nOe)},providedIn:"root"}),t})(),nOe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function iOe(t){throw t}function rOe(t,n,e){return n.parse("/")}const oOe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},sOe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let xi=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=$n(x2e),this.isNgZoneEnabled=!1,this.options=$n(sC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||iOe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||rOe,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=$n(tOe),this.routeReuseStrategy=$n(XMe),this.urlCreationStrategy=$n(GEe),this.titleStrategy=$n(HV),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=Y9($n(Pm,{optional:!0})??[]),this.navigationTransitions=$n(oC),this.urlSerializer=$n(H1),this.location=$n($E),this.isNgZoneEnabled=$n(si)instanceof si&&si.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Lh,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=gV(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId??0},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),W1,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(tO),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=vp(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,W1,null,i)}navigate(e,i={skipLocationChange:!1}){return function aOe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",o)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-(this.browserPageId??this.currentPageId);0!==o?this.location.historyGo(o):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Mc=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new hr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof Ud&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=Tm(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=Tm(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=Tm(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function h$(t,n,e){return function R_e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?d$:a1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(te(xi),te(Li),Sh("tabindex"),te(hs),te(En),te(up))},t.\u0275dir=pt({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&se("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&Re("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Kt]}),t})(),ty=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new Oe,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof Ud&&this.update()})}ngAfterContentInit(){$t(this.links.changes,$t(null)).pipe(Lg()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=Jo(e).pipe(Lg()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function lOe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(te(xi),te(En),te(hs),te(jo),te(Mc,8))},t.\u0275dir=pt({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&Cn(r,Mc,5),2&e){let o;kt(o=Tt())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Kt]}),t})();class UV{}let cOe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(co(e=>e instanceof Ud),Ph(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Gw(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return Jo(r).pipe(Lg())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):$t(null);const o=r.pipe(_o(s=>null===s?$t(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?Jo([o,this.loader.loadComponent(i)]).pipe(Lg()):o})}}return t.\u0275fac=function(e){return new(e||t)(Ve(xi),Ve(SB),Ve(Vl),Ve(UV),Ve(sO))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const lO=new Ut("");let zV=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof qx?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ud&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof hV&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new hV(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function U$(){throw new Error("invalid")}()},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();var ml=(()=>((ml=ml||{})[ml.COMPLETE=0]="COMPLETE",ml[ml.FAILED=1]="FAILED",ml[ml.REDIRECTING=2]="REDIRECTING",ml))();const Rm=!1;function Fh(t,n){return{\u0275kind:t,\u0275providers:n}}const cO=new Ut("",{providedIn:"root",factory:()=>!1});function WV(){const t=$n(fs);return n=>{const e=t.get(Pd);if(n!==e.components[0])return;const i=t.get(xi),r=t.get(qV);1===t.get(uO)&&i.initialNavigation(),t.get(YV,null,An.Optional)?.setUpPreloading(),t.get(lO,null,An.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const qV=new Ut(Rm?"bootstrap done indicator":"",{factory:()=>new hr}),uO=new Ut(Rm?"initial navigation":"",{providedIn:"root",factory:()=>1});function pOe(){let t=[];return t=Rm?[{provide:Tw,multi:!0,useFactory:()=>{const n=$n(xi);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function VEe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Fh(1,t)}const YV=new Ut(Rm?"router preloader":"");function gOe(t){return Fh(0,[{provide:YV,useExisting:cOe},{provide:UV,useExisting:t}])}const ny=!1,JV=new Ut(ny?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),mOe=[$E,{provide:H1,useClass:VM},xi,J1,{provide:Li,useFactory:function GV(t){return t.routerState.root},deps:[xi]},sO,ny?{provide:cO,useValue:!0}:[]];function vOe(){return new IB("Router",xi)}let KV=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[mOe,ny&&i?.enableTracing?pOe().\u0275providers:[],{provide:Pm,multi:!0,useValue:e},{provide:JV,useFactory:wOe,deps:[[xi,new Z0,new e1]]},{provide:sC,useValue:i||{}},i?.useHash?{provide:up,useClass:cSe}:{provide:up,useClass:t7},{provide:lO,useFactory:()=>{const t=$n(wke),n=$n(si),e=$n(sC),i=$n(oC),r=$n(H1);return e.scrollOffset&&t.setOffset(e.scrollOffset),new zV(r,i,t,n,e)}},i?.preloadingStrategy?gOe(i.preloadingStrategy).\u0275providers:[],{provide:IB,multi:!0,useFactory:vOe},i?.initialNavigation?xOe(i):[],[{provide:XV,useFactory:WV},{provide:OB,multi:!0,useExisting:XV}]]}}static forChild(e){return{ngModule:t,providers:[{provide:Pm,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(Ve(JV,8))},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[ZM]}),t})();function wOe(t){if(ny&&t)throw new et(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function xOe(t){return["disabled"===t.initialNavigation?Fh(3,[{provide:Jw,multi:!0,useFactory:()=>{const n=$n(xi);return()=>{n.setUpLocationChangeListener()}}},{provide:uO,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Fh(2,[{provide:uO,useValue:0},{provide:Jw,multi:!0,deps:[fs],useFactory:n=>{const e=n.get(aSe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(xi),o=n.get(qV);(function uOe(t,n){t.events.pipe(co(e=>e instanceof Ud||e instanceof q1||e instanceof Jx||e instanceof Yx),xn(e=>e instanceof Ud||e instanceof Yx?ml.COMPLETE:e instanceof q1&&(0===e.code||1===e.code)?ml.REDIRECTING:ml.FAILED),co(e=>e!==ml.REDIRECTING),es(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(oC).afterPreactivation=()=>(i(!0),o.closed?$t(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const XV=new Ut(ny?"Router Initializer":"");function aC(t,n){return new ar(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let QV=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(te(hs),te(En))},t.\u0275dir=pt({type:t}),t})(),_p=(()=>{class t extends QV{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,features:[yn]}),t})();const Ha=new Ut("NgValueAccessor"),kOe={provide:Ha,useExisting:Fn(()=>lC),multi:!0};let lC=(()=>{class t extends _p{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&se("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Qi([kOe]),yn]}),t})();const TOe={provide:Ha,useExisting:Fn(()=>ts),multi:!0},AOe=new Ut("CompositionEventMode");let ts=(()=>{class t extends QV{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function DOe(){const t=Rd()?Rd().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(te(hs),te(En),te(AOe,8))},t.\u0275dir=pt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&se("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Qi([TOe]),yn]}),t})();const EOe=!1;function $h(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function ZV(t){return null!=t&&"number"==typeof t.length}const Ns=new Ut("NgValidators"),Bh=new Ut("NgAsyncValidators"),MOe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Sr{static min(n){return eH(n)}static max(n){return function tH(t){return n=>{if($h(n.value)||$h(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return nH(n)}static requiredTrue(n){return function iH(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function rH(t){return $h(t.value)||MOe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function oH(t){return n=>$h(n.value)||!ZV(n.value)?null:n.value.lengthZV(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function aH(t){if(!t)return cC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if($h(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return fH(n)}static composeAsync(n){return pH(n)}}function eH(t){return n=>{if($h(n.value)||$h(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function dH(t,n){return n.map(e=>e(t))}function hH(t){return t.map(n=>function OOe(t){return!t.validate}(n)?n:e=>n.validate(e))}function fH(t){if(!t)return null;const n=t.filter(lH);return 0==n.length?null:function(e){return uH(dH(e,n))}}function dO(t){return null!=t?fH(hH(t)):null}function pH(t){if(!t)return null;const n=t.filter(lH);return 0==n.length?null:function(e){return function SOe(...t){if(1===t.length){const n=t[0];if(nl(n))return aC(n,null);if(Na(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return aC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return aC(t=1===t.length&&nl(t[0])?t[0]:t,null).pipe(xn(e=>n(...e)))}return aC(t,null)}(dH(e,n).map(cH)).pipe(xn(uH))}}function hO(t){return null!=t?pH(hH(t)):null}function gH(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function mH(t){return t._rawValidators}function vH(t){return t._rawAsyncValidators}function fO(t){return t?Array.isArray(t)?t:[t]:[]}function uC(t,n){return Array.isArray(t)?t.includes(n):t===n}function yH(t,n){const e=fO(n);return fO(t).forEach(r=>{uC(e,r)||e.push(r)}),e}function _H(t,n){return fO(n).filter(e=>!uC(t,e))}class bH{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=dO(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=hO(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class ya extends bH{get formDirective(){return null}get path(){return null}}class Vh extends bH{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class wH{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let ps=(()=>{class t extends wH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(te(Vh,2))},t.\u0275dir=pt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Ft("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[yn]}),t})(),gs=(()=>{class t extends wH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(te(ya,10))},t.\u0275dir=pt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Ft("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[yn]}),t})();function xH(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const mO=!1,iy="VALID",hC="INVALID",Lm="PENDING",ry="DISABLED";function vO(t){return(fC(t)?t.validators:t)||null}function yO(t,n){return(fC(n)?n.asyncValidators:t)||null}function fC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function CH(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new et(1e3,mO?function POe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new et(1001,mO?function ROe(t,n){return`Cannot find form control ${xH(t,n)}`}(n,e):"")}function SH(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new et(1002,mO?function LOe(t,n){return`Must supply a value for form control ${xH(t,n)}`}(n,r):"")})}class pC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===iy}get invalid(){return this.status===hC}get pending(){return this.status==Lm}get disabled(){return this.status===ry}get enabled(){return this.status!==ry}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(yH(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(yH(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(_H(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(_H(n,this._rawAsyncValidators))}hasValidator(n){return uC(this._rawValidators,n)}hasAsyncValidator(n){return uC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Lm,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=ry,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=iy,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===iy||this.status===Lm)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ry:iy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Lm,this._hasOwnPendingAsyncValidator=!0;const e=cH(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new Oe,this.statusChanges=new Oe}_calculateStatus(){return this._allControlsDisabled()?ry:this.errors?hC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Lm)?Lm:this._anyControlsHaveStatus(hC)?hC:iy}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){fC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function FOe(t){return Array.isArray(t)?dO(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function $Oe(t){return Array.isArray(t)?hO(t):t||null}(this._rawAsyncValidators)}}class oy extends pC{constructor(n,e,i){super(vO(e),yO(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){SH(this,!0,n),Object.keys(n).forEach(i=>{CH(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class kH extends oy{}const bp=new Ut("CallSetDisabledState",{providedIn:"root",factory:()=>sy}),sy="always";function ay(t,n,e=sy){_O(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function VOe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&TH(t,n)})}(t,n),function UOe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function HOe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&TH(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function BOe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function mC(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),yC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function vC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function _O(t,n){const e=mH(t);null!==n.validator?t.setValidators(gH(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=vH(t);null!==n.asyncValidator?t.setAsyncValidators(gH(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();vC(n._rawValidators,r),vC(n._rawAsyncValidators,r)}function yC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=mH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=vH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return vC(n._rawValidators,i),vC(n._rawAsyncValidators,i),e}function TH(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function EH(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function MH(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const cy=class extends pC{constructor(n=null,e,i){super(vO(e),yO(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),fC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=MH(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){EH(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){EH(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){MH(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let ms=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const QOe={provide:Ha,useExisting:Fn(()=>SO),multi:!0};let SO=(()=>{class t extends _p{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&se("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Qi([QOe]),yn]}),t})();const ZOe={provide:Ha,useExisting:Fn(()=>kO),multi:!0};let PH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})(),e3e=(()=>{class t{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e)return void this._accessors.splice(i,1)}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return!!e[0].control&&e[0]._parent===i._control._parent&&e[1].name===i.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:PH}),t})(),kO=(()=>{class t extends _p{constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=$n(bp,{optional:!0})??sy}ngOnInit(){this._control=this._injector.get(Vh),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(te(hs),te(En),te(e3e),te(fs))},t.\u0275dir=pt({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,i){1&e&&se("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Qi([ZOe]),yn]}),t})();const TO=new Ut("NgModelWithFormControlWarning"),i3e={provide:ya,useExisting:Fn(()=>Lo)};let Lo=(()=>{class t extends ya{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Oe,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(yC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return ay(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){mC(e.control||null,e,!1),function qOe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function AH(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(mC(i||null,e),(t=>t instanceof cy)(r)&&(ay(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function DH(t,n){_O(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function zOe(t,n){return yC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){_O(this.form,this),this._oldForm&&yC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(te(Ns,10),te(Bh,10),te(bp,8))},t.\u0275dir=pt({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&se("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Qi([i3e]),yn,Kt]}),t})();const s3e={provide:Vh,useExisting:Fn(()=>ns)};let ns=(()=>{class t extends Vh{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new Oe,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function xO(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===ts?e=o:function WOe(t){return Object.getPrototypeOf(t.constructor)===_p}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function wO(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function gC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(te(ya,13),te(Ns,10),te(Bh,10),te(Ha,10),te(TO,8))},t.\u0275dir=pt({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Qi([s3e]),yn,Kt]}),t})();const a3e={provide:Ha,useExisting:Fn(()=>Fm),multi:!0};function $H(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let Fm=(()=>{class t extends _p{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=$H(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function l3e(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&se("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Qi([a3e]),yn]}),t})(),_C=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue($H(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs),te(Fm,9))},t.\u0275dir=pt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const c3e={provide:Ha,useExisting:Fn(()=>EO),multi:!0};function BH(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let EO=(()=>{class t extends _p{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(BH(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(BH(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs),te(EO,9))},t.\u0275dir=pt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let wp=(()=>{class t{constructor(){this._validator=cC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):cC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,features:[Kt]}),t})();const h3e={provide:Ns,useExisting:Fn(()=>MO),multi:!0};let MO=(()=>{class t extends wp{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function HH(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>eH(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Re("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Qi([h3e]),yn]}),t})();const f3e={provide:Ns,useExisting:Fn(()=>Hh),multi:!0};let Hh=(()=>{class t extends wp{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Tm,this.createValidator=e=>nH}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&Re("required",i._enabled?"":null)},inputs:{required:"required"},features:[Qi([f3e]),yn]}),t})(),JH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[PH]}),t})();class KH extends pC{constructor(n,e,i){super(vO(e),yO(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){SH(this,!1,n),n.forEach((i,r)=>{CH(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function XH(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let _3e=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return XH(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new oy(r,o)}record(e,i=null){const r=this._reduceControls(e);return new kH(r,i)}control(e,i,r){let o={};return this.useNonNullable?(XH(i)?o=i:(o.validators=i,o.asyncValidators=r),new cy(e,{...o,nonNullable:!0})):new cy(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new KH(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof cy||e instanceof pC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),js=(()=>{class t extends _3e{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),b3e=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:bp,useValue:e.callSetDisabledState??sy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[JH]}),t})(),w3e=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:TO,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:bp,useValue:e.callSetDisabledState??sy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[JH]}),t})();const QH=new Ut("ngx-segment-analytics.config"),x3e={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js",plugins:[]};let ZH=(()=>{class t{analytics;static \u0275fac=function(i){return new(i||t)};static \u0275prov=Ke({token:t,factory:t.\u0275fac})}return t})(),wC=(()=>{class t{_w;_doc;_config;constructor(e,i,r){if(this._w=e,this._doc=i,this._config={...x3e,...r},this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");!0===this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics._writeKey=this._config.apiKey,this._w.analytics.SNIPPET_VERSION="4.15.3",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),!0===this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}setAnonymousId(e){this._w.analytics.setAnonymousId(e)}traits(){return this._w.analytics.user().traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}addDestinationMiddleware(e,...i){this._w.analytics.addDestinationMiddleware(e,...i)}register(...e){return this._w.analytics.register(...e)}get plugins(){return this._w.analytics.plugins}static \u0275fac=function(i){return new(i||t)(Ve(ZH),Ve(lr),Ve(QH))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function C3e(t){return T7(t)?window:{}}let S3e=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:QH,useValue:e},wC]}}constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static \u0275fac=function(i){return new(i||t)(Ve(t,12))};static \u0275mod=Mn({type:t});static \u0275inj=Dn({providers:[{provide:ZH,useFactory:C3e,deps:[A1]}],imports:[Mh]})}return t})();class xC{}class OO{}class Oc{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.entries(n).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){const o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Oc?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Oc;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Oc?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class k3e{encodeKey(n){return eU(n)}encodeValue(n){return eU(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const D3e=/%(\d[a-f0-9])/gi,A3e={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eU(t){return encodeURIComponent(t).replace(D3e,(n,e)=>A3e[e]??n)}function CC(t){return`${t}`}class Mt{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new k3e,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function T3e(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(CC):[CC(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new Mt({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(CC(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(CC(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class E3e{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tU(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function nU(t){return typeof Blob<"u"&&t instanceof Blob}function iU(t){return typeof FormData<"u"&&t instanceof FormData}class uy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function M3e(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Oc),this.context||(this.context=new E3e),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new uy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var Fo=(()=>((Fo=Fo||{})[Fo.Sent=0]="Sent",Fo[Fo.UploadProgress=1]="UploadProgress",Fo[Fo.ResponseHeader=2]="ResponseHeader",Fo[Fo.DownloadProgress=3]="DownloadProgress",Fo[Fo.Response=4]="Response",Fo[Fo.User=5]="User",Fo))();class IO{constructor(n,e=200,i="OK"){this.headers=n.headers||new Oc,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class NO extends IO{constructor(n={}){super(n),this.type=Fo.ResponseHeader}clone(n={}){return new NO({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class SC extends IO{constructor(n={}){super(n),this.type=Fo.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new SC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class rU extends IO{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function jO(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let kC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof uy)o=e;else{let l,c;l=r.headers instanceof Oc?r.headers:new Oc(r.headers),r.params&&(c=r.params instanceof Mt?r.params:new Mt({fromObject:r.params})),o=new uy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=$t(o).pipe(Ph(l=>this.handler.handle(l)));if(e instanceof uy||"events"===r.observe)return s;const a=s.pipe(co(l=>l instanceof SC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(xn(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(xn(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(xn(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(xn(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new Mt).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,jO(r,i))}post(e,i,r={}){return this.request("POST",e,jO(r,i))}put(e,i,r={}){return this.request("PUT",e,jO(r,i))}}return t.\u0275fac=function(e){return new(e||t)(Ve(xC))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();function oU(t,n){return n(t)}function I3e(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const PO=new Ut("HTTP_INTERCEPTORS"),dy=new Ut("HTTP_INTERCEPTOR_FNS");function j3e(){let t=null;return(n,e)=>(null===t&&(t=($n(PO,{optional:!0})??[]).reduceRight(I3e,oU)),t(n,e))}let sU=(()=>{class t extends xC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(dy)));this.chain=i.reduceRight((r,o)=>function N3e(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),oU)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(Ve(OO),Ve(Vl))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const F3e=/^\)\]\}',?\n/;let lU=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new ar(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Oc(r.getAllResponseHeaders()),g=function $3e(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new NO({headers:p,status:r.status,statusText:f,url:g}),s},l=()=>{let{headers:f,status:p,statusText:g,url:m}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const b=v;v=v.replace(F3e,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=b,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new SC({body:v,headers:f,status:p,statusText:g,url:m||void 0})),i.complete()):i.error(new rU({error:v,headers:f,status:p,statusText:g,url:m||void 0}))},c=f=>{const{url:p}=a(),g=new rU({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(g)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:Fo.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:Fo.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:Fo.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(Ve(A7))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const RO=new Ut("XSRF_ENABLED"),cU=new Ut("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),uU=new Ut("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dU{}let H3e=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=p7(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr),Ve(A1),Ve(cU))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();function U3e(t,n){const e=t.url.toLowerCase();if(!$n(RO)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=$n(dU).getToken(),r=$n(uU);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var Co=(()=>((Co=Co||{})[Co.Interceptors=0]="Interceptors",Co[Co.LegacyInterceptors=1]="LegacyInterceptors",Co[Co.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Co[Co.NoXsrfProtection=3]="NoXsrfProtection",Co[Co.JsonpSupport=4]="JsonpSupport",Co[Co.RequestsMadeViaParent=5]="RequestsMadeViaParent",Co))();function $m(t,n){return{\u0275kind:t,\u0275providers:n}}function z3e(...t){const n=[kC,lU,sU,{provide:xC,useExisting:sU},{provide:OO,useExisting:lU},{provide:dy,useValue:U3e,multi:!0},{provide:RO,useValue:!0},{provide:dU,useClass:H3e}];for(const e of t)n.push(...e.\u0275providers);return function L_e(t){return{\u0275providers:t}}(n)}const hU=new Ut("LEGACY_INTERCEPTOR_FN");let W3e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[z3e($m(Co.LegacyInterceptors,[{provide:hU,useFactory:j3e},{provide:dy,useExisting:hU,multi:!0}]))]}),t})();var nn=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(nn||(nn={})),nn))(),hy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY",t[t.FACEBOOK_INSTANT_STORE=3]="FACEBOOK_INSTANT_STORE"}(hy||(hy={})),hy))();class LO{host;timeoutMs}let kn=(()=>{class t{httpClient;config;constructor(e,i){this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new Mt({encoder:new Gt});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new Mt({encoder:new Gt});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new Mt({encoder:new Gt});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new Mt({encoder:new Gt});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getPurchase(e,i){const r=`/v2/console/iap/purchase/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getSubscription(e,i){const r=`/v2/console/iap/subscription/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new Mt({encoder:new Gt});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new Mt({encoder:new Gt});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new Mt({encoder:new Gt});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new Mt({encoder:new Gt});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new Mt({encoder:new Gt});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new Mt({encoder:new Gt});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new Mt({encoder:new Gt});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new Mt({encoder:new Gt});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new Mt({encoder:new Gt});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new Mt({encoder:new Gt});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Oc).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Oc).set("Authorization","Basic "+btoa(e+":"+i))}static \u0275fac=function(i){return new(i||t)(Ve(kC),Ve(LO,8))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class Gt{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const fU=new Ut("window"),J3e=[{provide:fU,useFactory:()=>window}],FO="currentSession";let zr=(()=>{class t{window;segment;http;consoleService;currentSessionSubject;currentSession;constructor(e,i,r,o){this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(FO));this.currentSessionSubject=new Zo(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return nn.USER_ROLE_ADMIN;case 2:return nn.USER_ROLE_DEVELOPER;case 3:return nn.USER_ROLE_MAINTAINER;case 4:return nn.USER_ROLE_READONLY;default:return nn.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(xo(r=>{localStorage.setItem(FO,JSON.stringify(r)),this.currentSessionSubject.next(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(xo(()=>{localStorage.removeItem(FO),this.currentSessionSubject.next(null)})):Vd}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}static \u0275fac=function(i){return new(i||t)(Ve(fU),Ve(wC),Ve(kC),Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function K3e(t,n){if(1&t&&(_(0,"div",27),A(1),w()),2&t){const e=P();x(1),wt(" ",e.error," ")}}const X3e=function(t){return{"was-validated":t}},pU=function(t){return{"is-invalid":t}};let Q3e=(()=>{class t{segment;formBuilder;route;router;authenticationService;error="";loginForm;submitted;returnUrl;constructor(e,i,r,o,s){this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.loginForm=this.formBuilder.group({username:["",Sr.compose([Sr.required])],password:["",Sr.compose([Sr.required,Sr.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}static \u0275fac=function(i){return new(i||t)(te(wC),te(js),te(Li),te(xi),te(zr))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:53,vars:14,consts:[[1,"d-flex","flex-column","flex-lg-row","h-100","relative"],["src","/static/svg/logo-white.svg","alt","Nakama Logo","width","175","height","43",1,"logo"],[1,"login-panel"],[1,"align-self-center","login-form"],[1,"px-4"],[1,"login-title","mb-4"],["class","alert alert-warning","role","alert",4,"ngIf"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],[1,"heroic-stack"],[1,""],["src","/static/svg/hiro-logo.svg","alt","Hiro Logo","width","110","height","50",1,"mb-3"],["href","https://www.youtube.com/playlist?list=PLOAExZcDNj9sWny_J8J5ARkxDTwAV0i6f&utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Reconstructing%20Fun%20Sign-In","target","_blank"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Sign-In","target","_blank",1,"login-link"],["src","/static/svg/satori-logo.svg","alt","Satori Logo","width","134","height","50",1,"mb-3"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Sign-In","target","_blank",1,"login-link"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/calendar.svg","alt","Calendar"],[1,"font-weight-bold","ml-2",2,"font-size","20px"],["href","https://heroiclabs.com/bookademo?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Book%20a%20Demo%20Sign-In","target","_blank",1,"login-link-pink"],["src","/static/svg/phone.svg","alt","Phone"],["role","alert",1,"alert","alert-warning"]],template:function(i,r){1&i&&(_(0,"div",0),ie(1,"img",1),_(2,"div",2)(3,"div",3)(4,"div",4)(5,"h3",5),A(6,"Sign in to continue to the Nakama Dashboard"),w(),q(7,K3e,2,1,"div",6),_(8,"form",7),se("ngSubmit",function(){return r.onSubmit()}),_(9,"div",8)(10,"label",9),A(11,"Username"),w(),ie(12,"input",10),_(13,"div",11),A(14,"Please enter a username."),w()(),_(15,"div",8)(16,"label",12),A(17,"Password"),w(),ie(18,"input",13),_(19,"div",11),A(20,"Password must be at least 8 characters."),w()(),_(21,"button",14),A(22,"Login"),w()()()()(),_(23,"div",2)(24,"div",15)(25,"div",16),ie(26,"img",17),_(27,"p"),A(28,"A metagame framework built on Nakama to add virtual store, rewards, event leaderboards and much more rapidly and flexibly to your game. "),_(29,"a",18),A(30,"RECONSTRUCTING FUN"),w(),A(31," on YouTube shows you how."),w(),_(32,"a",19),A(33,"Explore Hiro"),w()(),ie(34,"hr"),_(35,"div",16),ie(36,"img",20),_(37,"p"),A(38,"LiveOps for your live services game. Live events, Experiments, Feature Flags, Audience Segmentation and Analytics built to work independently but beautifully with Nakama."),w(),_(39,"a",21),A(40,"Explore Satori"),w()(),ie(41,"hr"),_(42,"div")(43,"div",22),ie(44,"img",23),_(45,"span",24),A(46,"Working at a Game Studio?"),w()(),_(47,"p"),A(48,"Ready to take your game development to the next level? Contact us for a free 45 minute demo call."),w(),_(49,"a",25),ie(50,"img",26),_(51,"span"),A(52,"Schedule a call with us"),w()()()()()()),2&i&&(x(7),S("ngIf",r.error),x(1),S("formGroup",r.loginForm)("ngClass",ui(8,X3e,r.submitted)),x(4),S("ngClass",ui(10,pU,r.f.username.dirty&&r.f.username.errors)),x(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),x(5),S("ngClass",ui(12,pU,r.f.password.dirty&&r.f.password.errors)),x(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),x(2),S("disabled",!r.loginForm.valid||r.submitted))},dependencies:[dp,Ct,ms,ts,ps,gs,Hh,Lo,ns],styles:[".logo[_ngcontent-%COMP%]{position:absolute;top:10px;left:15px}@media (min-width: 992px){.logo[_ngcontent-%COMP%]{top:40px;left:30px}}.login-form[_ngcontent-%COMP%]{margin:100px auto auto;max-width:600px}@media (min-width: 992px){.login-form[_ngcontent-%COMP%]{width:485px;margin:auto}}.login-title[_ngcontent-%COMP%]{font-size:28px;font-weight:300}.login-panel[_ngcontent-%COMP%]{flex:1 1 0;display:flex}.login-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:300;font-size:20px}.heroic-stack[_ngcontent-%COMP%]{padding:0 1.5rem;max-width:600px;margin:70px auto 40px}@media (min-width: 992px){.heroic-stack[_ngcontent-%COMP%]{max-width:660px;padding:0 15px;margin:auto}}.login-link[_ngcontent-%COMP%], .login-link-pink[_ngcontent-%COMP%]{display:inline-flex;padding:15px;font-size:15px;border:1px;border-radius:5px;border:1px solid}.login-link[_ngcontent-%COMP%]{color:#4739c5;border-color:#4739c51a}hr[_ngcontent-%COMP%]{border:2px solid rgba(217,217,217,.2);margin-top:20px;margin-bottom:40px}.login-link-pink[_ngcontent-%COMP%]{border-color:#b421b41a;background:#FFF6FF;color:#b421b4}.login-link-pink[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:15px}"]})}return t})(),Z3e=(()=>{class t{authService;router;constructor(e,i){this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}static \u0275fac=function(i){return new(i||t)(Ve(zr),Ve(xi))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),eIe=(()=>{class t{router;authenticationService;constructor(e,i){this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}static \u0275fac=function(i){return new(i||t)(Ve(xi),Ve(zr))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class tIe extends pn{constructor(n,e){super()}schedule(n,e=0){return this}}class $O extends tIe{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let gU=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Lu extends gU{constructor(n,e=gU.now){super(n,()=>Lu.delegate&&Lu.delegate!==this?Lu.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Lu.delegate&&Lu.delegate!==this?Lu.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const TC=new Lu($O);class iIe{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new oIe(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class rIe{constructor(){this.buffer=[]}}class oIe extends Ln{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(mU,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(vU,e,{subscriber:this,context:s})),this.add(o.schedule(sIe,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(mU,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new rIe;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function mU(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function sIe(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(vU,e,{subscriber:i,context:o})),this.schedule(t,n))}function vU(t){const{subscriber:n,context:e}=t;n.closeContext(e)}function DC(t,n){return e=>e.lift(new aIe(t,n))}class aIe{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new lIe(n,this.compare,this.keySelector))}}class lIe extends Ln{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Ps(t,n,e,i){return xu(e)&&(i=e,e=void 0),i?Ps(t,n,e).pipe(xn(r=>nl(r)?i(...r):i(r))):new ar(r=>{yU(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function yU(t,n,e,i,r){let o;if(function dIe(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function uIe(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function cIe(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function fy(t=0,n,e){let i=-1;return _U(n)?i=Number(n)<1?1:Number(n):Jf(n)&&(e=n),Jf(e)||(e=TC),new ar(r=>{const o=_U(t)?t:+t-e.now();return e.schedule(hIe,o,{index:0,period:i,subscriber:r})})}function hIe(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function bU(...t){if(1===t.length){if(!nl(t[0]))return t[0];t=t[0]}return F0(t,void 0).lift(new fIe)}class fIe{call(n,e){return e.subscribe(new pIe(n))}}class pIe extends LM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class _Ie extends R0{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[wh](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return L0(this.observable,new P0(this))}}function Xr(t){return n=>n.lift(new wIe(t))}class wIe{constructor(n){this.notifier=n}call(n,e){const i=new xIe(n),r=L0(this.notifier,new P0(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class xIe extends R0{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function BO(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new CIe(t,e))}}class CIe{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new SIe(n,this.observables,this.project))}}class SIe extends LM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Ic{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return $t(this.value);case"E":return gp(this.error);case"C":return Lx()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Ic("N",n):Ic.undefinedValueNotification}static createError(n){return new Ic("E",void 0,n)}static createComplete(){return Ic.completeNotification}}function VO(t,n=TC){const i=function kIe(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new TIe(i,n))}Ic.completeNotification=new Ic("C"),Ic.undefinedValueNotification=new Ic("N",void 0);class TIe{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new HO(n,this.delay,this.scheduler))}}class HO extends Ln{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(HO.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new DIe(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Ic.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Ic.createComplete()),this.unsubscribe()}}class DIe{constructor(n,e){this.time=n,this.notification=e}}class EIe{constructor(n){this.total=n}call(n,e){return e.subscribe(new MIe(n,this.total))}}class MIe extends Ln{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){++this.count>this.total&&this.destination.next(n)}}var OIe={left:"right",right:"left",bottom:"top",top:"bottom"};function EC(t){return t.replace(/left|right|bottom|top/g,function(n){return OIe[n]})}function Fu(t){return t.split("-")[0]}var IIe={start:"end",end:"start"};function xU(t){return t.replace(/start|end/g,function(n){return IIe[n]})}var vl="top",Nc="bottom",jc="right",yl="left",UO="auto",py=[vl,Nc,jc,yl],Bm="start",gy="end",NIe="clippingParents",CU="viewport",my="popper",jIe="reference",SU=py.reduce(function(t,n){return t.concat([n+"-"+Bm,n+"-"+gy])},[]),kU=[].concat(py,[UO]).reduce(function(t,n){return t.concat([n,n+"-"+Bm,n+"-"+gy])},[]),zIe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _l(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function xp(t){return t instanceof _l(t).Element||t instanceof Element}function Yl(t){return t instanceof _l(t).HTMLElement||t instanceof HTMLElement}function zO(t){return!(typeof ShadowRoot>"u")&&(t instanceof _l(t).ShadowRoot||t instanceof ShadowRoot)}function Uh(t){return((xp(t)?t.ownerDocument:t.document)||window.document).documentElement}var Cp=Math.max,MC=Math.min,Vm=Math.round;function GO(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function TU(){return!/^((?!chrome|android).)*safari/i.test(GO())}function Hm(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,o=1;n&&Yl(t)&&(r=t.offsetWidth>0&&Vm(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Vm(i.height)/t.offsetHeight||1);var a=(xp(t)?_l(t):window).visualViewport,l=!TU()&&e,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function WO(t){var n=_l(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function qO(t){return Hm(Uh(t)).left+WO(t).scrollLeft}function Gd(t){return _l(t).getComputedStyle(t)}function $u(t){return t?(t.nodeName||"").toLowerCase():null}function OC(t){return"html"===$u(t)?t:t.assignedSlot||t.parentNode||(zO(t)?t.host:null)||Uh(t)}function YO(t){var n=Gd(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function DU(t){return["html","body","#document"].indexOf($u(t))>=0?t.ownerDocument.body:Yl(t)&&YO(t)?t:DU(OC(t))}function vy(t,n){var e;void 0===n&&(n=[]);var i=DU(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=_l(i),s=r?[o].concat(o.visualViewport||[],YO(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(vy(OC(s)))}function qIe(t){return["table","td","th"].indexOf($u(t))>=0}function AU(t){return Yl(t)&&"fixed"!==Gd(t).position?t.offsetParent:null}function yy(t){for(var n=_l(t),e=AU(t);e&&qIe(e)&&"static"===Gd(e).position;)e=AU(e);return e&&("html"===$u(e)||"body"===$u(e)&&"static"===Gd(e).position)?n:e||function YIe(t){var n=/firefox/i.test(GO());if(/Trident/i.test(GO())&&Yl(t)&&"fixed"===Gd(t).position)return null;var r=OC(t);for(zO(r)&&(r=r.host);Yl(r)&&["html","body"].indexOf($u(r))<0;){var o=Gd(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||n&&"filter"===o.willChange||n&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(t)||n}function EU(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&zO(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function JO(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function MU(t,n,e){return n===CU?JO(function GIe(t,n){var e=_l(t),i=Uh(t),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=TU();(c||!c&&"fixed"===n)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+qO(t),y:l}}(t,e)):xp(n)?function JIe(t,n){var e=Hm(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):JO(function WIe(t){var n,e=Uh(t),i=WO(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=Cp(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Cp(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+qO(t),l=-i.scrollTop;return"rtl"===Gd(r||e).direction&&(a+=Cp(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Uh(t)))}function Um(t){return t.split("-")[1]}function KO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function OU(t){var l,n=t.reference,e=t.element,i=t.placement,r=i?Fu(i):null,o=i?Um(i):null,s=n.x+n.width/2-e.width/2,a=n.y+n.height/2-e.height/2;switch(r){case vl:l={x:s,y:n.y-e.height};break;case Nc:l={x:s,y:n.y+n.height};break;case jc:l={x:n.x+n.width,y:a};break;case yl:l={x:n.x-e.width,y:a};break;default:l={x:n.x,y:n.y}}var c=r?KO(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Bm:l[c]=l[c]-(n[u]/2-e[u]/2);break;case gy:l[c]=l[c]+(n[u]/2-e[u]/2)}}return l}function NU(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function jU(t,n){return n.reduce(function(e,i){return e[i]=t,e},{})}function XO(t,n){void 0===n&&(n={});var i=n.placement,r=void 0===i?t.placement:i,o=n.strategy,s=void 0===o?t.strategy:o,a=n.boundary,l=void 0===a?NIe:a,c=n.rootBoundary,u=void 0===c?CU:c,d=n.elementContext,h=void 0===d?my:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,v=NU("number"!=typeof m?m:jU(m,py)),b=t.rects.popper,C=t.elements[p?h===my?jIe:my:h],k=function XIe(t,n,e,i){var r="clippingParents"===n?function KIe(t){var n=vy(OC(t)),i=["absolute","fixed"].indexOf(Gd(t).position)>=0&&Yl(t)?yy(t):t;return xp(i)?n.filter(function(r){return xp(r)&&EU(r,i)&&"body"!==$u(r)}):[]}(t):[].concat(n),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=MU(t,c,i);return l.top=Cp(u.top,l.top),l.right=MC(u.right,l.right),l.bottom=MC(u.bottom,l.bottom),l.left=Cp(u.left,l.left),l},MU(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(xp(C)?C:C.contextElement||Uh(t.elements.popper),l,u,s),T=Hm(t.elements.reference),j=OU({reference:T,element:b,strategy:"absolute",placement:r}),B=JO(Object.assign({},b,j)),N=h===my?B:T,$={top:k.top-N.top+v.top,bottom:N.bottom-k.bottom+v.bottom,left:k.left-N.left+v.left,right:N.right-k.right+v.right},V=t.modifiersData.offset;if(h===my&&V){var z=V[r];Object.keys($).forEach(function(Y){var O=[jc,Nc].indexOf(Y)>=0?1:-1,H=[vl,Nc].indexOf(Y)>=0?"y":"x";$[Y]+=z[H]*O})}return $}const tNe={name:"flip",enabled:!0,phase:"main",fn:function eNe(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,f=e.flipVariations,p=void 0===f||f,g=e.allowedAutoPlacements,m=n.options.placement,v=Fu(m),b=l||(v!==m&&p?function ZIe(t){if(Fu(t)===UO)return[];var n=EC(t);return[xU(t),n,xU(n)]}(m):[EC(m)]),C=[m].concat(b).reduce(function(X,ne){return X.concat(Fu(ne)===UO?function QIe(t,n){void 0===n&&(n={});var r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?kU:l,u=Um(n.placement),d=u?a?SU:SU.filter(function(p){return Um(p)===u}):py,h=d.filter(function(p){return c.indexOf(p)>=0});0===h.length&&(h=d);var f=h.reduce(function(p,g){return p[g]=XO(t,{placement:g,boundary:r,rootBoundary:o,padding:s})[Fu(g)],p},{});return Object.keys(f).sort(function(p,g){return f[p]-f[g]})}(n,{placement:ne,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):ne)},[]),k=n.rects.reference,T=n.rects.popper,j=new Map,B=!0,N=C[0],$=0;$=0,H=O?"width":"height",G=XO(n,{placement:V,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),F=O?Y?jc:yl:Y?Nc:vl;k[H]>T[H]&&(F=EC(F));var Z=EC(F),D=[];if(o&&D.push(G[z]<=0),a&&D.push(G[F]<=0,G[Z]<=0),D.every(function(X){return X})){N=V,B=!1;break}j.set(V,D)}if(B)for(var M=function(ne){var ge=C.find(function(ae){var De=j.get(ae);if(De)return De.slice(0,ne).every(function(be){return be})});if(ge)return N=ge,"break"},U=p?3:1;U>0&&"break"!==M(U);U--);n.placement!==N&&(n.modifiersData[i]._skip=!0,n.placement=N,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _y(t,n,e){return Cp(t,MC(n,e))}function QO(t){var n=Hm(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}const oNe={name:"preventOverflow",enabled:!0,phase:"main",fn:function rNe(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,f=void 0===h||h,p=e.tetherOffset,g=void 0===p?0:p,m=XO(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),v=Fu(n.placement),y=Um(n.placement),b=!y,C=KO(v),k=function nNe(t){return"x"===t?"y":"x"}(C),T=n.modifiersData.popperOffsets,j=n.rects.reference,B=n.rects.popper,N="function"==typeof g?g(Object.assign({},n.rects,{placement:n.placement})):g,$="number"==typeof N?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),V=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,z={x:0,y:0};if(T){if(o){var Y,O="y"===C?vl:yl,H="y"===C?Nc:jc,G="y"===C?"height":"width",F=T[C],Z=F+m[O],D=F-m[H],E=f?-B[G]/2:0,M=y===Bm?j[G]:B[G],U=y===Bm?-B[G]:-j[G],L=n.elements.arrow,X=f&&L?QO(L):{width:0,height:0},ne=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ge=ne[O],ae=ne[H],De=_y(0,j[G],X[G]),be=b?j[G]/2-E-De-ge-$.mainAxis:M-De-ge-$.mainAxis,Ie=b?-j[G]/2+E+De+ae+$.mainAxis:U+De+ae+$.mainAxis,R=n.elements.arrow&&yy(n.elements.arrow),K=null!=(Y=V?.[C])?Y:0,Te=F+Ie-K,ye=_y(f?MC(Z,F+be-K-(R?"y"===C?R.clientTop||0:R.clientLeft||0:0)):Z,F,f?Cp(D,Te):D);T[C]=ye,z[C]=ye-F}if(a){var Ue,zt=T[k],ct="y"===k?"height":"width",Nn=zt+m["x"===C?vl:yl],mt=zt-m["x"===C?Nc:jc],pi=-1!==[vl,yl].indexOf(v),ki=null!=(Ue=V?.[k])?Ue:0,ci=pi?Nn:zt-j[ct]-B[ct]-ki+$.altAxis,yi=pi?zt+j[ct]+B[ct]-ki-$.altAxis:mt,bn=f&&pi?function iNe(t,n,e){var i=_y(t,n,e);return i>e?e:i}(ci,zt,yi):_y(f?ci:Nn,zt,f?yi:mt);T[k]=bn,z[k]=bn-zt}n.modifiersData[i]=z}},requiresIfExists:["offset"]};const cNe={name:"arrow",enabled:!0,phase:"main",fn:function aNe(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Fu(e.placement),l=KO(a),u=[yl,jc].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(n,e){return NU("number"!=typeof(n="function"==typeof n?n(Object.assign({},e.rects,{placement:e.placement})):n)?n:jU(n,py))}(r.padding,e),h=QO(o),f="y"===l?vl:yl,p="y"===l?Nc:jc,g=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],m=s[l]-e.rects.reference[l],v=yy(o),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,T=y/2-h[u]/2+(g/2-m/2),j=_y(d[f],T,y-h[u]-d[p]);e.modifiersData[i]=((n={})[l]=j,n.centerOffset=j-T,n)}},effect:function lNe(t){var n=t.state,i=t.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=n.elements.popper.querySelector(r))||EU(n.elements.popper,r)&&(n.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fNe(t,n,e){void 0===e&&(e=!1);var i=Yl(n),r=Yl(n)&&function hNe(t){var n=t.getBoundingClientRect(),e=Vm(n.width)/t.offsetWidth||1,i=Vm(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),o=Uh(n),s=Hm(t,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==$u(n)||YO(o))&&(a=function dNe(t){return t!==_l(t)&&Yl(t)?function uNe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}(t):WO(t)}(n)),Yl(n)?((l=Hm(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):o&&(l.x=qO(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function pNe(t){var n=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=n.get(a);l&&r(l)}}),i.push(o)}return t.forEach(function(o){n.set(o.name,o)}),t.forEach(function(o){e.has(o.name)||r(o)}),i}function mNe(t){var n;return function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(t())})})),n}}var PU={placement:"bottom",modifiers:[],strategy:"absolute"};function RU(){for(var t=arguments.length,n=new Array(t),e=0;e=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[yl,jc].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,n.rects,o),u},{}),a=s[n.placement],c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=a.x,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}};function jNe(t,n){}function PNe(t,n){if(1&t&&(_(0,"button",3),A(1),q(2,jNe,0,0,"ng-template",4),w()),2&t){const e=n.$implicit;S("ngbPanelToggle",e),x(1),wt(" ",e.title," "),x(1),S("ngTemplateOutlet",null==e.titleTpl?null:e.titleTpl.templateRef)}}function RNe(t,n){}function LNe(t,n){}function FNe(t,n){if(1&t){const e=He();_(0,"div",8),se("ngbRef",function(r){return we(e),xe(P().$implicit.panelDiv=r)}),_(1,"div",9),q(2,LNe,0,0,"ng-template",4),w()()}if(2&t){const e=P().$implicit;Nd("id",e.id),Re("aria-labelledby",e.id+"-header"),x(2),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)}}const $Ne=function(t,n){return{$implicit:t,opened:n}};function BNe(t,n){if(1&t&&(_(0,"div")(1,"div",5),q(2,RNe,0,0,"ng-template",6),w(),q(3,FNe,3,3,"div",7),w()),2&t){const e=n.$implicit,i=P(),r=As(1);Ou("accordion-item "+(e.cardClass||"")),x(1),Ou("accordion-header "+(e.type?"bg-"+e.type:i.type?"bg-"+i.type:"")),sp("id","",e.id,"-header"),x(1),S("ngTemplateOutlet",(null==e.headerTpl?null:e.headerTpl.templateRef)||r)("ngTemplateOutletContext",Ni(8,$Ne,e,e.isOpen)),x(1),S("ngIf",!i.destroyOnHide||e.isOpen||e.transitionRunning)}}function VNe(t,n){if(1&t){const e=He();_(0,"button",1),se("click",function(){return we(e),xe(P().close())}),w()}}const by=["*"];function HNe(t,n){if(1&t){const e=He();_(0,"button",6),se("click",function(){const o=we(e).$implicit,s=P();return s.focus(),xe(s.select(o.id,s.NgbSlideEventSource.INDICATOR))}),w()}if(2&t){const e=n.$implicit,i=P();Ft("active",e.id===i.activeId),Re("aria-labelledby","slide-"+e.id)("aria-controls","slide-"+e.id)("aria-selected",e.id===i.activeId)}}function UNe(t,n){}function zNe(t,n){if(1&t&&(_(0,"div",7)(1,"span",8),Es(2,9),w(),q(3,UNe,0,0,"ng-template",10),w()),2&t){const e=n.$implicit,i=n.index,r=n.count;S("id","slide-"+e.id),x(2),xm(i+1)(r),x1(2),x(1),S("ngTemplateOutlet",e.tplRef)}}function GNe(t,n){if(1&t){const e=He();_(0,"button",11),se("click",function(){return we(e),xe(P().arrowLeft())}),ie(1,"span",12),_(2,"span",8),Es(3,13),w()()}}function WNe(t,n){if(1&t){const e=He();_(0,"button",14),se("click",function(){return we(e),xe(P().arrowRight())}),ie(1,"span",15),_(2,"span",8),Es(3,16),w()()}}const qNe=["ngbDatepickerDayView",""],YNe=["month"],JNe=["year"];function KNe(t,n){if(1&t&&(_(0,"option",5),A(1),w()),2&t){const e=n.$implicit,i=P();S("value",e),Re("aria-label",i.i18n.getMonthFullName(e,i.date.year)),x(1),ze(i.i18n.getMonthShortName(e,i.date.year))}}function XNe(t,n){if(1&t&&(_(0,"option",5),A(1),w()),2&t){const e=n.$implicit,i=P();S("value",e),x(1),ze(i.i18n.getYearNumerals(e))}}function QNe(t,n){if(1&t){const e=He();_(0,"ngb-datepicker-navigation-select",7),se("select",function(r){return we(e),xe(P().select.emit(r))}),w()}if(2&t){const e=P();S("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function ZNe(t,n){1&t&&ie(0,"div",0)}function eje(t,n){1&t&&ie(0,"div",0)}function tje(t,n){if(1&t&&(q(0,ZNe,1,0,"div",9),_(1,"div",10),A(2),w(),q(3,eje,1,0,"div",9)),2&t){const e=n.$implicit,i=n.index,r=P(2);S("ngIf",i>0),x(2),wt(" ",r.i18n.getMonthLabel(e.firstDate)," "),x(1),S("ngIf",i!==r.months.length-1)}}function nje(t,n){1&t&&q(0,tje,4,3,"ng-template",8),2&t&&S("ngForOf",P().months)}function ije(t,n){if(1&t&&(_(0,"div",5),A(1),w()),2&t){const e=P(2);x(1),ze(e.i18n.getWeekLabel())}}function rje(t,n){if(1&t&&(_(0,"div",6),A(1),w()),2&t){const e=n.$implicit;x(1),ze(e)}}function oje(t,n){if(1&t&&(_(0,"div",2),q(1,ije,2,1,"div",3),q(2,rje,2,1,"div",4),w()),2&t){const e=P();x(1),S("ngIf",e.datepicker.showWeekNumbers),x(1),S("ngForOf",e.viewModel.weekdays)}}function sje(t,n){if(1&t&&(_(0,"div",11),A(1),w()),2&t){const e=P(2).$implicit,i=P();x(1),ze(i.i18n.getWeekNumerals(e.number))}}function aje(t,n){}function lje(t,n){if(1&t&&q(0,aje,0,0,"ng-template",14),2&t){const e=P().$implicit;S("ngTemplateOutlet",P(3).datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function cje(t,n){if(1&t){const e=He();_(0,"div",12),se("click",function(r){const s=we(e).$implicit;return P(3).doSelect(s),xe(r.preventDefault())}),q(1,lje,1,2,"ng-template",13),w()}if(2&t){const e=n.$implicit;Ft("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),S("tabindex",e.tabindex),Re("aria-label",e.ariaLabel),x(1),S("ngIf",!e.hidden)}}function uje(t,n){if(1&t&&(_(0,"div",8),q(1,sje,2,1,"div",9),q(2,cje,2,9,"div",10),w()),2&t){const e=P().$implicit,i=P();x(1),S("ngIf",i.datepicker.showWeekNumbers),x(1),S("ngForOf",e.days)}}function dje(t,n){1&t&&q(0,uje,3,2,"div",7),2&t&&S("ngIf",!n.$implicit.collapsed)}const hje=["defaultDayTemplate"],fje=["content"];function pje(t,n){if(1&t&&ie(0,"div",8),2&t){const i=n.currentMonth,r=n.selected,o=n.disabled,s=n.focused;S("date",n.date)("currentMonth",i)("selected",r)("disabled",o)("focused",s)}}function gje(t,n){if(1&t&&(_(0,"div",13),A(1),w()),2&t){const e=P().$implicit,i=P(2);x(1),wt(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function mje(t,n){if(1&t&&(_(0,"div",10),q(1,gje,2,1,"div",11),ie(2,"ngb-datepicker-month",12),w()),2&t){const e=n.$implicit,i=P(2);x(1),S("ngIf","none"===i.navigation||i.displayMonths>1&&"select"===i.navigation),x(1),S("month",e.firstDate)}}function vje(t,n){1&t&&q(0,mje,3,2,"div",9),2&t&&S("ngForOf",P().model.months)}function yje(t,n){if(1&t){const e=He();_(0,"ngb-datepicker-navigation",14),se("navigate",function(r){return we(e),xe(P().onNavigateEvent(r))})("select",function(r){return we(e),xe(P().onNavigateDateSelect(r))}),w()}if(2&t){const e=P();S("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect","select"===e.model.navigation)("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function _je(t,n){}function bje(t,n){}const FU=function(t){return{$implicit:t}},wje=["dialog"],xje=["ngbNavOutlet",""];function Cje(t,n){}function Sje(t,n){if(1&t&&(_(0,"div",2),q(1,Cje,0,0,"ng-template",3),w()),2&t){const e=P().$implicit,i=P();S("item",e)("nav",i.nav)("role",i.paneRole),x(1),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",ui(5,FU,e.active||i.isPanelTransitioning(e)))}}function kje(t,n){if(1&t&&q(0,Sje,2,7,"div",1),2&t){const e=n.$implicit,i=P();S("ngIf",e.isPanelInDom()||i.isPanelTransitioning(e))}}function Tje(t,n){1&t&&(_(0,"span",9),Es(1,10),w())}function Dje(t,n){1&t&&(_(0,"span",9),Es(1,11),w())}function Aje(t,n){1&t&&(_(0,"span",9),Es(1,12),w())}function Eje(t,n){1&t&&(_(0,"span",9),Es(1,13),w())}function Mje(t,n){1&t&&A(0,"...")}function Oje(t,n){1&t&&A(0),2&t&&ze(n.$implicit)}function Ije(t,n){}const Nje=function(t){return{disabled:!0,currentPage:t}};function jje(t,n){if(1&t&&(_(0,"a",18),q(1,Ije,0,0,"ng-template",8),w()),2&t){const e=P(2).$implicit,i=P(),r=As(9);x(1),S("ngTemplateOutlet",(null==i.tplEllipsis?null:i.tplEllipsis.templateRef)||r)("ngTemplateOutletContext",ui(2,Nje,e))}}function Pje(t,n){}const Rje=function(t,n,e){return{disabled:t,$implicit:n,currentPage:e}};function Lje(t,n){if(1&t){const e=He();_(0,"a",19),se("click",function(r){we(e);const o=P().$implicit;return P(2).selectPage(o),xe(r.preventDefault())}),q(1,Pje,0,0,"ng-template",8),w()}if(2&t){const e=P().$implicit,i=P(),r=i.disabled,o=i.$implicit,s=P(),a=As(11);Re("tabindex",r?"-1":null)("aria-disabled",r?"true":null),x(1),S("ngTemplateOutlet",(null==s.tplNumber?null:s.tplNumber.templateRef)||a)("ngTemplateOutletContext",C1(4,Rje,r,e,o))}}function Fje(t,n){if(1&t&&(_(0,"li",15),q(1,jje,2,4,"a",16),q(2,Lje,2,8,"a",17),w()),2&t){const e=n.$implicit,i=P(),r=i.$implicit,o=i.disabled,s=P();Ft("active",e===r)("disabled",s.isEllipsis(e)||o),Re("aria-current",e===r?"page":null),x(1),S("ngIf",s.isEllipsis(e)),x(1),S("ngIf",!s.isEllipsis(e))}}function $je(t,n){1&t&&q(0,Fje,3,7,"li",14),2&t&&S("ngForOf",n.pages)}function Bje(t,n){}const ZO=function(t,n){return{disabled:t,currentPage:n}};function Vje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",20),se("click",function(r){return we(e),P().selectPage(1),xe(r.preventDefault())}),q(2,Bje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(1);Ft("disabled",e.previousDisabled()),x(1),Re("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplFirst?null:e.tplFirst.templateRef)||i)("ngTemplateOutletContext",Ni(6,ZO,e.previousDisabled(),e.page))}}function Hje(t,n){}const Uje=function(t){return{disabled:t}};function zje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",21),se("click",function(r){we(e);const o=P();return o.selectPage(o.page-1),xe(r.preventDefault())}),q(2,Hje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(3);Ft("disabled",e.previousDisabled()),x(1),Re("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplPrevious?null:e.tplPrevious.templateRef)||i)("ngTemplateOutletContext",ui(6,Uje,e.previousDisabled()))}}function Gje(t,n){}function Wje(t,n){}function qje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",22),se("click",function(r){we(e);const o=P();return o.selectPage(o.page+1),xe(r.preventDefault())}),q(2,Wje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(5);Ft("disabled",e.nextDisabled()),x(1),Re("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplNext?null:e.tplNext.templateRef)||i)("ngTemplateOutletContext",Ni(6,ZO,e.nextDisabled(),e.page))}}function Yje(t,n){}function Jje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",23),se("click",function(r){we(e);const o=P();return o.selectPage(o.pageCount),xe(r.preventDefault())}),q(2,Yje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(7);Ft("disabled",e.nextDisabled()),x(1),Re("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplLast?null:e.tplLast.templateRef)||i)("ngTemplateOutletContext",Ni(6,ZO,e.nextDisabled(),e.page))}}const Kje=function(t,n,e){return{$implicit:t,pages:n,disabled:e}};function Zje(t,n){if(1&t&&(_(0,"span"),Es(1,1),aE(2,"percent"),w()),2&t){const e=P();x(2),xm(lE(2,1,e.getValue()/e.max)),x1(1)}}function ePe(t,n){1&t&&A(0),2&t&&ze(100===n.fill?"\u2605":"\u2606")}function tPe(t,n){}function nPe(t,n){if(1&t){const e=He();_(0,"span",2),A(1),w(),_(2,"span",3),se("mouseenter",function(){const o=we(e).index;return xe(P().enter(o+1))})("click",function(){const o=we(e).index;return xe(P().handleClick(o+1))}),q(3,tPe,0,0,"ng-template",4),w()}if(2&t){const e=n.index,i=P(),r=As(1);x(1),wt("(",e=12)("ngIfElse",e)}}function gPe(t,n){if(1&t&&(_(0,"strong",3),A(1),w()),2&t){const e=P();x(1),ze(e.header)}}function mPe(t,n){}function vPe(t,n){if(1&t){const e=He();_(0,"div",4),q(1,mPe,0,0,"ng-template",5),_(2,"button",6),se("click",function(){return we(e),xe(P().hide())}),w()()}if(2&t){const e=P(),i=As(1);x(1),S("ngTemplateOutlet",e.contentHeaderTpl||i)}}function yPe(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P().$implicit;Ou(P().highlightClass),x(1),ze(e)}}function _Pe(t,n){1&t&&A(0),2&t&&ze(P().$implicit)}function bPe(t,n){if(1&t&&(q(0,yPe,2,3,"span",1),q(1,_Pe,1,1,"ng-template",null,2,lo)),2&t){const e=n.odd,i=As(2);S("ngIf",e)("ngIfElse",i)}}function Rs(t){return parseInt(`${t}`,10)}function $U(t){return null!=t?`${t}`:""}function NC(t,n,e=0){return Math.max(Math.min(t,n),e)}function Sp(t){return"string"==typeof t}function uo(t){return!isNaN(Rs(t))}function Qr(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function kp(t){return null!=t}function zm(t){return uo(t)?`0${t}`.slice(-2):""}function VU(t,n){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(n)>=0}function Gm(t){return(t||document.body).getBoundingClientRect()}function HU(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const UU={animation:!0,transitionTimerDelayMs:5},DPe=()=>{},{transitionTimerDelayMs:APe}=UU,wy=new Map,is=(t,n,e,i)=>{let r=i.context||{};const o=wy.get(n);if(o)switch(i.runningTransition){case"continue":return Vd;case"stop":t.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),wy.delete(n)}const s=e(n,i.animation,r)||DPe;if(!i.animation||"none"===window.getComputedStyle(n).transitionProperty)return t.run(()=>s()),$t(void 0).pipe(function kPe(t){return n=>new ar(e=>n.subscribe({next:s=>t.run(()=>e.next(s)),error:s=>t.run(()=>e.error(s)),complete:()=>t.run(()=>e.complete())}))}(t));const a=new hr,l=new hr,c=a.pipe(function bIe(...t){return n=>Rx(n,$t(...t))}(!0));wy.set(n,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function TPe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(n);return t.runOutsideAngular(()=>{const d=Ps(n,"transitionend").pipe(Xr(c),co(({target:f})=>f===n));bU(fy(u+APe).pipe(Xr(c)),d,l).pipe(Xr(c)).subscribe(()=>{wy.delete(n),t.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()},e3=(t,n,e)=>{let{direction:i,maxSize:r,dimension:o}=e;const{classList:s}=t;function a(){s.add("collapse"),"show"===i?s.add("show"):s.remove("show")}if(n)return r||(r=function MPe(t,n){if(typeof navigator>"u")return"0px";const{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[n]="";const r=t.getBoundingClientRect()[n]+"px";return i||e.remove("show"),r}(t,o),e.maxSize=r,t.style[o]="show"!==i?r:"0px",s.remove("collapse"),s.remove("collapsing"),s.remove("show"),Gm(t),s.add("collapsing")),t.style[o]="show"===i?r:"0px",()=>{a(),s.remove("collapsing"),t.style[o]=""};a()};let zh=(()=>{class t{constructor(){this.animation=UU.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),zU=(()=>{class t{constructor(e){this._ngbConfig=e,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),OPe=0,t3=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPanelHeader",""]],standalone:!0}),t})(),GU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPanelTitle",""]],standalone:!0}),t})(),WU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPanelContent",""]],standalone:!0}),t})(),n3=(()=>{class t{constructor(){this.disabled=!1,this.id="ngb-panel-"+OPe++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new Oe,this.hidden=new Oe}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["ngb-panel"]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,GU,4),Cn(r,t3,4),Cn(r,WU,4)),2&e){let o;kt(o=Tt())&&(i.titleTpls=o),kt(o=Tt())&&(i.headerTpls=o),kt(o=Tt())&&(i.contentTpls=o)}},inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},standalone:!0}),t})(),IPe=(()=>{class t{constructor(e){this._El=e,this.ngbRef=new Oe}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbRef",""]],outputs:{ngbRef:"ngbRef"},standalone:!0}),t})(),qU=(()=>{class t{constructor(e,i){this.accordion=e,this.panel=i}set ngbPanelToggle(e){e&&(this.panel=e)}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>r3)),te(n3,9))},t.\u0275dir=pt({type:t,selectors:[["button","ngbPanelToggle",""]],hostAttrs:["type","button"],hostVars:5,hostBindings:function(e,i){1&e&&se("click",function(){return i.accordion.toggle(i.panel.id)}),2&e&&(Fa("disabled",i.panel.disabled),Re("aria-expanded",i.panel.isOpen)("aria-controls",i.panel.id),Ft("collapsed",!i.panel.isOpen))},inputs:{ngbPanelToggle:"ngbPanelToggle"},standalone:!0}),t})(),r3=(()=>{class t{constructor(e,i,r){this._ngZone=i,this._changeDetector=r,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new Oe,this.shown=new Oe,this.hidden=new Oe,this.animation=e.animation,this.type=e.type,this.closeOtherPanels=e.closeOthers}isExpanded(e){return this.activeIds.indexOf(e)>-1}expand(e){this._changeOpenState(this._findPanelById(e),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(e=>this._changeOpenState(e,!0))}collapse(e){this._changeOpenState(this._findPanelById(e),!1)}collapseAll(){this.panels.forEach(e=>{this._changeOpenState(e,!1)})}toggle(e){const i=this._findPanelById(e);i&&this._changeOpenState(i,!i.isOpen)}ngAfterContentChecked(){Sp(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(e=>{e.isOpen=!e.disabled&&this.activeIds.indexOf(e.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe(es(1)).subscribe(()=>{this.panels.forEach(e=>{const i=e.panelDiv;i?e.initClassDone||(e.initClassDone=!0,is(this._ngZone,i,e3,{animation:!1,runningTransition:"continue",context:{direction:e.isOpen?"show":"hide",dimension:"height"}})):e.initClassDone=!1})})}_changeOpenState(e,i){if(null!=e&&!e.disabled&&e.isOpen!==i){let r=!1;this.panelChange.emit({panelId:e.id,nextState:i,preventDefault:()=>{r=!0}}),r||(e.isOpen=i,e.transitionRunning=!0,i&&this.closeOtherPanels&&this._closeOthers(e.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(e,i=!0){this.panels.forEach(r=>{r.id!==e&&r.isOpen&&(r.isOpen=!1,r.transitionRunning=i)})}_findPanelById(e){return this.panels.find(i=>i.id===e)||null}_updateActiveIds(){this.activeIds=this.panels.filter(e=>e.isOpen&&!e.disabled).map(e=>e.id)}_runTransitions(e){this._changeDetector.detectChanges(),this.panels.forEach(i=>{i.transitionRunning&&is(this._ngZone,i.panelDiv,e3,{animation:e,runningTransition:"stop",context:{direction:i.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{i.transitionRunning=!1;const{id:o}=i;i.isOpen?(i.shown.emit(),this.shown.emit(o)):(i.hidden.emit(),this.hidden.emit(o))})})}}return t.\u0275fac=function(e){return new(e||t)(te(zU),te(si),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["ngb-accordion"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,n3,4),2&e){let o;kt(o=Tt())&&(i.panels=o)}},hostAttrs:["role","tablist",1,"accordion"],hostVars:1,hostBindings:function(e,i){2&e&&Re("aria-multiselectable",!i.closeOtherPanels)},inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0,features:[No],decls:3,vars:1,consts:[["ngbPanelHeader",""],["t",""],["ngFor","",3,"ngForOf"],[1,"accordion-button",3,"ngbPanelToggle"],[3,"ngTemplateOutlet"],["role","tab",3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","tabpanel",3,"id","ngbRef",4,"ngIf"],["role","tabpanel",3,"id","ngbRef"],[1,"accordion-body"]],template:function(e,i){1&e&&(q(0,PNe,3,3,"ng-template",0,1,lo),q(2,BNe,4,11,"ng-template",2)),2&e&&(x(2),S("ngForOf",i.panels))},dependencies:[Bt,Ac,qU,IPe,t3,Ct],encapsulation:2}),t})(),XU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[r3]}),t})();const FPe=({classList:t})=>{t.remove("show")};let $Pe=(()=>{class t{constructor(e){this._ngbConfig=e,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),pr=(()=>{class t{constructor(e,i,r,o){this._renderer=i,this._element=r,this._zone=o,this.closed=new Oe,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=is(this._zone,this._element.nativeElement,FPe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(te($Pe),te(hs),te(En),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&Ft("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],standalone:!0,features:[Kt,No],ngContentSelectors:by,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close:Close`,[["type","button","class","btn-close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kh(),Th(0),q(1,VNe,1,0,"button",0)),2&e&&(x(1),S("ngIf",i.dismissible))},dependencies:[Ct],styles:["ngb-alert{display:block}\n"],encapsulation:2,changeDetection:0}),t})(),QU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[pr]}),t})();var Gh=(()=>(function(t){t.START="start",t.END="end"}(Gh||(Gh={})),Gh))();const ZU=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),xy=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},jC=t=>{xy(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},BPe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(ZU(t)?xy(i):(i.add("carousel-item-"+(e===Gh.START?"next":"prev")),Gm(t),i.add("carousel-item-"+e)),()=>{jC(i),i.add("active")}):(xy(i),jC(i),void i.add("active"))},VPe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(ZU(t)?xy(i):i.add("carousel-item-"+e),()=>{jC(i),i.remove("active")}):(xy(i),jC(i),void i.remove("active"))};let HPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),UPe=0,zPe=(()=>{class t{constructor(e){this.tplRef=e,this.id="ngb-slide-"+UPe++,this.slid=new Oe}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbSlide",""]],inputs:{id:"id"},outputs:{slid:"slid"},standalone:!0}),t})(),GPe=(()=>{class t{constructor(e,i,r,o,s){this._platformId=i,this._ngZone=r,this._cd=o,this._container=s,this.NgbSlideEventSource=Dp,this._destroy$=new hr,this._interval$=new Zo(0),this._mouseHover$=new Zo(!1),this._focused$=new Zo(!1),this._pauseOnHover$=new Zo(!1),this._pauseOnFocus$=new Zo(!1),this._pause$=new Zo(!1),this._wrap$=new Zo(!1),this.slide=new Oe,this.slid=new Oe,this._transitionIds=null,this.animation=e.animation,this.interval=e.interval,this.wrap=e.wrap,this.keyboard=e.keyboard,this.pauseOnHover=e.pauseOnHover,this.pauseOnFocus=e.pauseOnFocus,this.showNavigationArrows=e.showNavigationArrows,this.showNavigationIndicators=e.showNavigationIndicators}set interval(e){this._interval$.next(e)}get interval(){return this._interval$.value}set wrap(e){this._wrap$.next(e)}get wrap(){return this._wrap$.value}set pauseOnHover(e){this._pauseOnHover$.next(e)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(e){this._pauseOnFocus$.next(e)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(e){this._mouseHover$.next(e)}get mouseHover(){return this._mouseHover$.value}set focused(e){this._focused$.next(e)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(Dp.ARROW_LEFT)}arrowRight(){this.focus(),this.next(Dp.ARROW_RIGHT)}ngAfterContentInit(){T7(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const e=Px([this.slide.pipe(xn(i=>i.current),Fx(this.activeId)),this._wrap$,this.slides.changes.pipe(Fx(null))]).pipe(xn(([i,r])=>{const o=this.slides.toArray(),s=this._getSlideIdxById(i);return r?o.length>1:si||r&&o||s&&a||!c?0:l),DC(),gl(i=>i>0?fy(i,i):wU),Xr(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(Dp.TIMER)))}),this.slides.changes.pipe(Xr(this._destroy$)).subscribe(()=>{this._transitionIds?.forEach(e=>(t=>{wy.get(t)?.complete()})(this._getSlideElement(e))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe(es(1)).subscribe(()=>{for(const{id:e}of this.slides){const i=this._getSlideElement(e);e===this.activeId?i.classList.add("active"):i.classList.remove("active")}})})}ngAfterContentChecked(){let e=this._getSlideById(this.activeId);this.activeId=e?e.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const e=this._getSlideElement(this.activeId);e&&e.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(e,i){this._cycleToSelected(e,this._getSlideEventDirection(this.activeId,e),i)}prev(e){this._cycleToSelected(this._getPrevSlide(this.activeId),Gh.END,e)}next(e){this._cycleToSelected(this._getNextSlide(this.activeId),Gh.START,e)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(e,i,r){const o=this._transitionIds;if(o&&(o[0]!==e||o[1]!==this.activeId))return;let s=this._getSlideById(e);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,e],this.slide.emit({prev:this.activeId,current:s.id,direction:i,paused:this._pause$.value,source:r});const a={animation:this.animation,runningTransition:"stop",context:{direction:i}},l=[],c=this._getSlideById(this.activeId);if(c){const f=is(this._ngZone,this._getSlideElement(c.id),VPe,a);f.subscribe(()=>{c.slid.emit({isShown:!1,direction:i,source:r})}),l.push(f)}const u=this.activeId;this.activeId=s.id;const d=this._getSlideById(this.activeId),h=is(this._ngZone,this._getSlideElement(s.id),BPe,a);h.subscribe(()=>{d?.slid.emit({isShown:!0,direction:i,source:r})}),l.push(h),AC(...l).pipe(es(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:u,current:s.id,direction:i,paused:this._pause$.value,source:r})})}this._cd.markForCheck()}_getSlideEventDirection(e,i){return this._getSlideIdxById(e)>this._getSlideIdxById(i)?Gh.END:Gh.START}_getSlideById(e){return this.slides.find(i=>i.id===e)||null}_getSlideIdxById(e){const i=this._getSlideById(e);return null!=i?this.slides.toArray().indexOf(i):-1}_getNextSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return r===i.length-1?this.wrap?i[0].id:i[i.length-1].id:i[r+1].id}_getPrevSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return 0===r?this.wrap?i[i.length-1].id:i[0].id:i[r-1].id}_getSlideElement(e){return this._container.nativeElement.querySelector(`#slide-${e}`)}}return t.\u0275fac=function(e){return new(e||t)(te(HPe),te(A1),te(si),te(jo),te(En))},t.\u0275cmp=nt({type:t,selectors:[["ngb-carousel"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,zPe,4),2&e){let o;kt(o=Tt())&&(i.slides=o)}},hostAttrs:["tabIndex","0",1,"carousel","slide"],hostVars:3,hostBindings:function(e,i){1&e&&se("keydown.arrowLeft",function(){return i.keyboard&&i.arrowLeft()})("keydown.arrowRight",function(){return i.keyboard&&i.arrowRight()})("mouseenter",function(){return i.mouseHover=!0})("mouseleave",function(){return i.mouseHover=!1})("focusin",function(){return i.focused=!0})("focusout",function(){return i.focused=!1}),2&e&&(Re("aria-activedescendant","slide-"+i.activeId),oi("display","block"))},inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},exportAs:["ngbCarousel"],standalone:!0,features:[No],decls:6,vars:6,consts:function(){let n,e,i;return n=$localize`:Currently selected slide number read by screen reader@@ngb.carousel.slide-number: Slide ${"\ufffd0\ufffd"}:INTERPOLATION: of ${"\ufffd1\ufffd"}:INTERPOLATION_1: `,e=$localize`:@@ngb.carousel.previous:Previous`,i=$localize`:@@ngb.carousel.next:Next`,[["role","tablist",1,"carousel-indicators"],["type","button","data-bs-target","","role","tab",3,"active","click",4,"ngFor","ngForOf"],[1,"carousel-inner"],["class","carousel-item","role","tabpanel",3,"id",4,"ngFor","ngForOf"],["class","carousel-control-prev","type","button",3,"click",4,"ngIf"],["class","carousel-control-next","type","button",3,"click",4,"ngIf"],["type","button","data-bs-target","","role","tab",3,"click"],["role","tabpanel",1,"carousel-item",3,"id"],[1,"visually-hidden"],n,[3,"ngTemplateOutlet"],["type","button",1,"carousel-control-prev",3,"click"],["aria-hidden","true",1,"carousel-control-prev-icon"],e,["type","button",1,"carousel-control-next",3,"click"],["aria-hidden","true",1,"carousel-control-next-icon"],i]},template:function(e,i){1&e&&(_(0,"div",0),q(1,HNe,1,5,"button",1),w(),_(2,"div",2),q(3,zNe,4,4,"div",3),w(),q(4,GNe,4,0,"button",4),q(5,WNe,4,0,"button",5)),2&e&&(Ft("visually-hidden",!i.showNavigationIndicators),x(1),S("ngForOf",i.slides),x(2),S("ngForOf",i.slides),x(1),S("ngIf",i.showNavigationArrows),x(1),S("ngIf",i.showNavigationArrows))},dependencies:[Bt,Ac,Ct],encapsulation:2,changeDetection:0}),t})();var Dp=(()=>(function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(Dp||(Dp={})),Dp))();let ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[GPe]}),t})(),tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();class rs{constructor(n,e,i){this.year=Qr(n)?n:null,this.month=Qr(e)?e:null,this.day=Qr(i)?i:null}static from(n){return n instanceof rs?n:n?new rs(n.year,n.month,n.day):null}equals(n){return null!=n&&this.year===n.year&&this.month===n.month&&this.day===n.day}before(n){return!!n&&(this.year===n.year?this.month===n.month?this.day!==n.day&&this.dayn.day:this.month>n.month:this.year>n.year)}}function Wm(t,n){return!function WPe(t,n){return!t&&!n||!!t&&!!n&&t.equals(n)}(t,n)}function nz(t,n){return!(!t&&!n||t&&n&&t.year===n.year&&t.month===n.month)}function PC(t,n,e){return t&&n&&t.before(n)?n:t&&e&&t.after(e)?e:t||null}function s3(t,n){const{minDate:e,maxDate:i,disabled:r,markDisabled:o}=n;return!(null==t||r||o&&o(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function iz(t){return new rs(t.getFullYear(),t.getMonth()+1,t.getDate())}function RC(t){const n=new Date(t.year,t.month-1,t.day,12);return isNaN(n.getTime())||n.setFullYear(t.year),n}let LC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function tRe(){return new nRe}()},providedIn:"root"}),t})(),nRe=(()=>{class t extends LC{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",r=1){let o=RC(e),s=!0,a=o.getMonth();switch(i){case"y":o.setFullYear(o.getFullYear()+r);break;case"m":a+=r,o.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":o.setDate(o.getDate()+r),s=!1;break;default:return e}return s&&o.getMonth()!==a&&o.setDate(0),iz(o)}getPrev(e,i="d",r=1){return this.getNext(e,i,-r)}getWeekday(e){let r=RC(e).getDay();return 0===r?7:r}getWeekNumber(e,i){7===i&&(i=0);const s=RC(e[(11-i)%7]);s.setDate(s.getDate()+4-(s.getDay()||7));const a=s.getTime();return s.setMonth(0),s.setDate(1),Math.floor(Math.round((a-s.getTime())/864e5)/7)+1}getToday(){return iz(new Date)}isValid(e){if(!(e&&Qr(e.year)&&Qr(e.month)&&Qr(e.day)&&0!==e.year))return!1;const i=RC(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),Ap=(()=>{class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function iRe(t){return new rRe(t)}(Ve(hl)),i},providedIn:"root"}),t})(),rRe=(()=>{class t extends Ap{constructor(e){super(),this._locale=e,this._monthsShort=BE(e,Lr.Standalone,Wn.Abbreviated),this._monthsFull=BE(e,Lr.Standalone,Wn.Wide)}getWeekdayLabel(e,i){const r=o7(this._locale,Lr.Standalone,void 0===i?Wn.Short:i);return r.map((s,a)=>r[(a+1)%7])[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){return a7(new Date(e.year,e.month-1,e.day),"fullDate",this._locale)}}return t.\u0275fac=function(e){return new(e||t)(Ve(hl))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),a3=(()=>{class t{constructor(e,i){this._calendar=e,this._i18n=i,this._VALIDATORS={dayTemplateData:r=>{if(this._state.dayTemplateData!==r)return{dayTemplateData:r}},displayMonths:r=>{if(Qr(r=Rs(r))&&r>0&&this._state.displayMonths!==r)return{displayMonths:r}},disabled:r=>{if(this._state.disabled!==r)return{disabled:r}},firstDayOfWeek:r=>{if(Qr(r=Rs(r))&&r>=0&&this._state.firstDayOfWeek!==r)return{firstDayOfWeek:r}},focusVisible:r=>{if(this._state.focusVisible!==r&&!this._state.disabled)return{focusVisible:r}},markDisabled:r=>{if(this._state.markDisabled!==r)return{markDisabled:r}},maxDate:r=>{const o=this.toValidDate(r,null);if(Wm(this._state.maxDate,o))return{maxDate:o}},minDate:r=>{const o=this.toValidDate(r,null);if(Wm(this._state.minDate,o))return{minDate:o}},navigation:r=>{if(this._state.navigation!==r)return{navigation:r}},outsideDays:r=>{if(this._state.outsideDays!==r)return{outsideDays:r}},weekdays:r=>{const o=!0===r||!1===r?Wn.Short:r,s=!0!==r&&!1!==r||r;if(this._state.weekdayWidth!==o||this._state.weekdaysVisible!==s)return{weekdayWidth:o,weekdaysVisible:s}}},this._model$=new hr,this._dateSelect$=new hr,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:Wn.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe(co(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(co(e=>null!==e))}set(e){let i=Object.keys(e).map(r=>this._VALIDATORS[r](e[r])).reduce((r,o)=>({...r,...o}),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){const i=this.toValidDate(e,null);null!=i&&!this._state.disabled&&Wm(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){s3(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){const i=this.toValidDate(e,this._calendar.getToday());null!=i&&!this._state.disabled&&(!this._state.firstDate||nz(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){const r=this.toValidDate(e,null);null!=r&&!this._state.disabled&&(Wm(this._state.selectedDate,r)&&this._nextState({selectedDate:r}),i.emitEvent&&s3(r,this._state)&&this._dateSelect$.next(r))}toValidDate(e,i){const r=rs.from(e);return void 0===i&&(i=this._calendar.getToday()),this._calendar.isValid(r)?r:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){const i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){const{months:i,displayMonths:r,selectedDate:o,focusDate:s,focusVisible:a,disabled:l,outsideDays:c}=e;e.months.forEach(u=>{u.weeks.forEach(d=>{d.days.forEach(h=>{s&&(h.context.focused=s.equals(h.date)&&a),h.tabindex=!l&&s&&h.date.equals(s)&&s.month===u.number?0:-1,!0===l&&(h.context.disabled=!0),void 0!==o&&(h.context.selected=null!==o&&o.equals(h.date)),u.number!==h.date.month&&(h.hidden="hidden"===c||"collapsed"===c||r>1&&h.date.after(i[0].firstDate)&&h.date.before(i[r-1].lastDate))})})})}_updateState(e){const i=Object.assign({},this._state,e);let r=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(function qPe(t,n){if(n&&t&&n.before(t))throw new Error(`'maxDate' ${n} should be greater than 'minDate' ${t}`)}(i.minDate,i.maxDate),i.focusDate=PC(i.focusDate,i.minDate,i.maxDate),i.firstDate=PC(i.firstDate,i.minDate,i.maxDate),r=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(r=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=PC(i.focusDate,i.minDate,i.maxDate),r=i.focusDate,0!==i.months.length&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=PC(i.firstDate,i.minDate,i.maxDate),r=i.firstDate),r){const s=function QPe(t,n,e,i,r){const{displayMonths:o,months:s}=e,a=s.splice(0,s.length);return Array.from({length:o},(c,u)=>{const d=Object.assign(t.getNext(n,"m",u),{day:1});if(s[u]=null,!r){const h=a.findIndex(f=>f.firstDate.equals(d));-1!==h&&(s[u]=a.splice(h,1)[0])}return d}).forEach((c,u)=>{null===s[u]&&(s[u]=function ZPe(t,n,e,i,r={}){const{dayTemplateData:o,minDate:s,maxDate:a,firstDayOfWeek:l,markDisabled:c,outsideDays:u,weekdayWidth:d,weekdaysVisible:h}=e,f=t.getToday();r.firstDate=null,r.lastDate=null,r.number=n.month,r.year=n.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],n=function eRe(t,n,e){const i=t.getDaysPerWeek(),r=new rs(n.year,n.month,1),o=t.getWeekday(r)%i;return t.getPrev(r,"d",(i+o-e)%i)}(t,n,l),h||(r.weekdays.length=0);for(let p=0;pv.date),l),g.collapsed="collapsed"===u&&m[0].date.month!==r.number&&m[m.length-1].date.month!==r.number}return r}(t,c,e,i,a.shift()||{}))}),s}(this._calendar,r,i,this._i18n,"dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e);i.months=s,i.firstDate=s[0].firstDate,i.lastDate=s[s.length-1].lastDate,"selectedDate"in e&&!s3(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=r);const a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;"select"===i.navigation?(("minDate"in e||"maxDate"in e||0===i.selectBoxes.years.length||a)&&(i.selectBoxes.years=function JPe(t,n,e){if(!t)return[];const i=n?Math.max(n.year,t.year-500):t.year-10,o=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,s=Array(o);for(let a=0;as===e.month);r=r.slice(o)}if(i&&n.year===i.year){const o=r.findIndex(s=>s===i.month);r=r.slice(0,o+1)}return r}(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},("arrows"===i.navigation||"select"===i.navigation)&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||function XPe(t,n,e){const i=Object.assign(t.getPrev(n,"m"),{day:1});return null!=e&&(i.year===e.year&&i.month(function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(qm||(qm={})),qm))();let oRe=(()=>{class t{constructor(e){this.i18n=e}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}return t.\u0275fac=function(e){return new(e||t)(te(Ap))},t.\u0275cmp=nt({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(e,i){2&e&&Ft("bg-primary",i.selected)("text-white",i.selected)("text-muted",i.isMuted())("outside",i.isMuted())("active",i.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},standalone:!0,features:[No],attrs:qNe,decls:1,vars:1,template:function(e,i){1&e&&A(0),2&e&&ze(i.i18n.getDayNumerals(i.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),sRe=(()=>{class t{constructor(e,i){this.i18n=e,this._renderer=i,this.select=new Oe,this._month=-1,this._year=-1}changeMonth(e){this.select.emit(new rs(this.date.year,Rs(e),1))}changeYear(e){this.select.emit(new rs(Rs(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}return t.\u0275fac=function(e){return new(e||t)(te(Ap),te(hs))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(e,i){if(1&e&&(xr(YNe,7,En),xr(JNe,7,En)),2&e){let r;kt(r=Tt())&&(i.monthSelect=r.first),kt(r=Tt())&&(i.yearSelect=r.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},standalone:!0,features:[No],decls:6,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.select-month:Select month`,e=$localize`:@@ngb.datepicker.select-month:Select month`,i=$localize`:@@ngb.datepicker.select-year:Select year`,r=$localize`:@@ngb.datepicker.select-year:Select year`,[["aria-label",n,"title",e,1,"form-select",3,"disabled","change"],["month",""],[3,"value",4,"ngFor","ngForOf"],["aria-label",i,"title",r,1,"form-select",3,"disabled","change"],["year",""],[3,"value"]]},template:function(e,i){1&e&&(_(0,"select",0,1),se("change",function(o){return i.changeMonth(o.target.value)}),q(2,KNe,2,3,"option",2),w(),_(3,"select",3,4),se("change",function(o){return i.changeYear(o.target.value)}),q(5,XNe,2,2,"option",2),w()),2&e&&(S("disabled",i.disabled),x(2),S("ngForOf",i.months),x(1),S("disabled",i.disabled),x(2),S("ngForOf",i.years))},dependencies:[Bt],styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],encapsulation:2,changeDetection:0}),t})(),aRe=(()=>{class t{constructor(e){this.i18n=e,this.navigation=qm,this.months=[],this.navigate=new Oe,this.select=new Oe}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}return t.\u0275fac=function(e){return new(e||t)(te(Ap))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},standalone:!0,features:[No],decls:8,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.previous-month:Previous month`,e=$localize`:@@ngb.datepicker.previous-month:Previous month`,i=$localize`:@@ngb.datepicker.next-month:Next month`,r=$localize`:@@ngb.datepicker.next-month:Next month`,[[1,"ngb-dp-arrow"],["type","button","aria-label",n,"title",e,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["type","button","aria-label",i,"title",r,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"button",1),se("click",function(o){return i.onClickPrev(o)}),ie(2,"span",2),w()(),q(3,QNe,1,4,"ngb-datepicker-navigation-select",3),q(4,nje,1,1,null,4),_(5,"div",5)(6,"button",6),se("click",function(o){return i.onClickNext(o)}),ie(7,"span",2),w()()),2&e&&(x(1),S("disabled",i.prevDisabled),x(2),S("ngIf",i.showSelect),x(1),S("ngIf",!i.showSelect),x(2),S("disabled",i.nextDisabled))},dependencies:[Ct,Bt,sRe],styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],encapsulation:2,changeDetection:0}),t})();var ji=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(ji||(ji={})),ji))();let lRe=(()=>{class t{processKey(e,i){const{state:r,calendar:o}=i;switch(e.which){case ji.PageUp:i.focusDate(o.getPrev(r.focusedDate,e.shiftKey?"y":"m",1));break;case ji.PageDown:i.focusDate(o.getNext(r.focusedDate,e.shiftKey?"y":"m",1));break;case ji.End:i.focusDate(e.shiftKey?r.maxDate:r.lastDate);break;case ji.Home:i.focusDate(e.shiftKey?r.minDate:r.firstDate);break;case ji.ArrowLeft:i.focusDate(o.getPrev(r.focusedDate,"d",1));break;case ji.ArrowUp:i.focusDate(o.getPrev(r.focusedDate,"d",o.getDaysPerWeek()));break;case ji.ArrowRight:i.focusDate(o.getNext(r.focusedDate,"d",1));break;case ji.ArrowDown:i.focusDate(o.getNext(r.focusedDate,"d",o.getDaysPerWeek()));break;case ji.Enter:case ji.Space:i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),l3=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=Wn.Short}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),c3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function cRe(){return new uRe}()},providedIn:"root"}),t})(),uRe=(()=>{class t extends c3{fromModel(e){return e&&Qr(e.year)&&Qr(e.month)&&Qr(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&Qr(e.year)&&Qr(e.month)&&Qr(e.day)?{year:e.year,month:e.month,day:e.day}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),rz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbDatepickerContent",""]],standalone:!0}),t})(),u3=(()=>{class t{constructor(e,i,r,o){this.i18n=e,this.datepicker=i,this._keyboardService=r,this._service=o}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){!e.context.disabled&&!e.hidden&&this.datepicker.onDateSelect(e.date)}}return t.\u0275fac=function(e){return new(e||t)(te(Ap),te(Fn(()=>FC)),te(lRe),te(a3))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(e,i){1&e&&se("keydown",function(o){return i.onKeyDown(o)})},inputs:{month:"month"},standalone:!0,features:[No],decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek small",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(q(0,oje,3,2,"div",0),q(1,dje,1,1,"ng-template",1)),2&e&&(S("ngIf",i.viewModel.weekdays.length>0),x(1),S("ngForOf",i.viewModel.weeks))},dependencies:[Ct,Bt,Ac],styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],encapsulation:2}),t})(),FC=(()=>{class t{constructor(e,i,r,o,s,a,l,c){this._service=e,this._calendar=i,this._i18n=r,this._elementRef=a,this._ngbDateAdapter=l,this._ngZone=c,this.injector=$n(fs),this._controlValue=null,this._destroyed$=new hr,this._publicState={},this.navigate=new Oe,this.dateSelect=new Oe,this.onChange=u=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(u=>this[u]=o[u]),e.dateSelect$.pipe(Xr(this._destroyed$)).subscribe(u=>{this.dateSelect.emit(u)}),e.model$.pipe(Xr(this._destroyed$)).subscribe(u=>{const d=u.firstDate,h=this.model?this.model.firstDate:null;this._publicState={maxDate:u.maxDate,minDate:u.minDate,firstDate:u.firstDate,lastDate:u.lastDate,focusedDate:u.focusDate,months:u.months.map(v=>v.firstDate)};let f=!1;if(!d.equals(h)&&(this.navigate.emit({current:h?{year:h.year,month:h.month}:null,next:{year:d.year,month:d.month},preventDefault:()=>f=!0}),f&&null!==h))return void this._service.open(h);const p=u.selectedDate,g=u.focusDate,m=this.model?this.model.focusDate:null;this.model=u,Wm(p,this._controlValue)&&(this._controlValue=p,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(p))),Wm(g,m)&&m&&u.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(e){this._service.focus(rs.from(e))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(es(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()})}navigateTo(e){this._service.open(rs.from(e?e.day?e:{...e,day:1}:null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const e=Ps(this._contentEl.nativeElement,"focusin"),i=Ps(this._contentEl.nativeElement,"focusout"),{nativeElement:r}=this._elementRef;hD(e,i).pipe(co(({target:o,relatedTarget:s})=>!(VU(o,"ngb-dp-day")&&VU(s,"ngb-dp-day")&&r.contains(o)&&r.contains(s))),Xr(this._destroyed$)).subscribe(({type:o})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===o})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(i=>e[i]=this[i]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(e){const i={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(r=>r in e).forEach(r=>i[r]=this[r]),this._service.set(i),"startDate"in e){const{currentValue:r,previousValue:o}=e.startDate;nz(o,r)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case qm.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case qm.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=rs.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}}return t.\u0275fac=function(e){return new(e||t)(te(a3),te(LC),te(Ap),te(l3),te(jo),te(En),te(c3),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,rz,7),2&e){let o;kt(o=Tt())&&(i.contentTemplateFromContent=o.first)}},viewQuery:function(e,i){if(1&e&&(xr(hje,7),xr(fje,7)),2&e){let r;kt(r=Tt())&&(i._defaultDayTemplate=r.first),kt(r=Tt())&&(i._contentEl=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("disabled",i.model.disabled)},inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},exportAs:["ngbDatepicker"],standalone:!0,features:[Qi([{provide:Ha,useExisting:Fn(()=>t),multi:!0},a3]),Kt,No],decls:10,vars:9,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(e,i){if(1&e&&(q(0,pje,1,5,"ng-template",null,0,lo),q(2,vje,1,1,"ng-template",null,1,lo),_(4,"div",2),q(5,yje,1,7,"ngb-datepicker-navigation",3),w(),_(6,"div",4,5),q(8,_je,0,0,"ng-template",6),w(),q(9,bje,0,0,"ng-template",7)),2&e){const r=As(3);x(5),S("ngIf","none"!==i.navigation),x(1),Ft("ngb-dp-months",!i.contentTemplate),x(2),S("ngTemplateOutlet",i.contentTemplate||(null==i.contentTemplateFromContent?null:i.contentTemplateFromContent.templateRef)||r)("ngTemplateOutletContext",ui(7,FU,i))("ngTemplateOutletInjector",i.injector),x(1),S("ngTemplateOutlet",i.footerTemplate)}},dependencies:[Ct,Bt,Ac,oRe,u3,aRe],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],encapsulation:2,changeDetection:0}),t})();const $C=(t,n)=>!!n&&n.some(e=>e.contains(t)),oz=(t,n)=>!n||null!=function SPe(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),dRe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),hRe=t=>dRe?()=>setTimeout(()=>t(),100):t;function d3(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(hRe(()=>{const c=Ps(n,"keydown").pipe(Xr(r),co(h=>h.which===ji.Escape),xo(h=>h.preventDefault())),u=Ps(n,"mousedown").pipe(xn(h=>{const f=h.target;return 2!==h.button&&!$C(f,s)&&("inside"===e?$C(f,o)&&oz(f,a):"outside"===e?!$C(f,o):oz(f,a)||!$C(f,o))}),Xr(r)),d=Ps(n,"mouseup").pipe(BO(u),co(([h,f])=>f),VO(0),Xr(r));bU([c.pipe(xn(h=>0)),d.pipe(xn(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const sz=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function az(t){const n=Array.from(t.querySelectorAll(sz)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}let fRe=(()=>{class t{constructor(e){this._element=e.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const pRe=/\s+/,gRe=/ +/gi,mRe={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},yRe=/^left/,_Re=/^right/,bRe=/^start/,wRe=/^end/;function cz({placement:t,baseClass:n},e){let i=Array.isArray(t)?t:t.split(pRe),o=i.findIndex(c=>"auto"===c);o>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(c){null==i.find(u=>-1!==u.search("^"+c))&&i.splice(o++,1,c)});const s=i.map(c=>function vRe(t,n){const[e,i]=mRe[t];return n&&i||e}(c,e.isRTL()));return{placement:s.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!n,phase:"write",fn({state:c}){const u=new RegExp(n+"(-[a-z]+)*","gi"),d=c.elements.popper,h=c.placement;let f=d.className;f=f.replace(u,""),f+=` ${function xRe(t,n){let[e,i]=n.split("-");const r=e.replace(yRe,"start").replace(_Re,"end");let o=[r];if(i){let s=i;("left"===e||"right"===e)&&(s=s.replace(bRe,"top").replace(wRe,"bottom")),o.push(`${r}-${s}`)}return t&&(o=o.map(s=>`${t}-${s}`)),o.join(" ")}(n,h)}`,f=f.trim().replace(gRe," "),d.className=f}},tNe,oNe,cNe,{enabled:!0,name:"flip",options:{fallbackPlacements:s}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function uz(t){return t}function h3(){const t=$n(fRe);let n=null;return{createPopper(e){if(!n){let r=(e.updatePopperOptions||uz)(cz(e,t));n=MNe(e.hostElement,e.targetElement,r)}},update(){n&&n.update()},setOptions(e){if(n){let r=(e.updatePopperOptions||uz)(cz(e,t));n.setOptions(r)}},destroy(){n&&(n.destroy(),n=null)}}}new Date(1882,10,12),new Date(2174,10,25);let _z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[FC,u3]}),t})(),NRe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Wh=(()=>{class t{constructor(e,i){this.elementRef=e,this._renderer=i,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(e,i){2&e&&(Fa("tabIndex",i.disabled?-1:0),Ft("disabled",i.disabled))},inputs:{disabled:"disabled"},standalone:!0}),t})(),qh=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Rc)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&Cn(r,Wh,4),2&e){let o;kt(o=Tt())&&(i.menuItems=o)}},hostVars:4,hostBindings:function(e,i){1&e&&se("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&Ft("dropdown-menu",!0)("show",i.dropdown.isOpen())},standalone:!0}),t})(),UC=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Rc)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&Re("aria-expanded",i.dropdown.isOpen())},standalone:!0}),t})(),Op=(()=>{class t extends UC{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Rc)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&se("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&Re("aria-expanded",i.dropdown.isOpen())},standalone:!0,features:[Qi([{provide:UC,useExisting:Fn(()=>t)}]),yn]}),t})(),Rc=(()=>{class t{constructor(e,i,r,o,s,a){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._destroyCloseHandlers$=new hr,this._bodyContainer=null,this._open=!1,this.openChange=new Oe,this.placement=i.placement,this.popperOptions=i.popperOptions,this.container=i.container,this.autoClose=i.autoClose,this._positioning=h3(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe(es(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),e.dropdownClass){const{currentValue:i,previousValue:r}=e.dropdownClass;this._applyCustomDropdownClass(i,r)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:e=>this.popperOptions(function hz(t){return n=>(n.modifiers.push(NNe,{name:"offset",options:{offset:()=>t}}),n)}([0,2])(e))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),d3(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==ji.Space&&i!==ji.Enter){if(i!==ji.Tab){if(a||s){if(this.open(),r.length){switch(i){case ji.ArrowDown:o=Math.min(o+1,r.length-1);break;case ji.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case ji.Home:o=0;break;case ji.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(sz);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Ps(e.target,"focusout").pipe(es(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Ps(s,"click").pipe(es(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;this._menu&&e.appendChild(this._elementRef.nativeElement,this._menu.nativeElement),this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1055"),i.appendChild(o,r),i.appendChild(this._document.body,o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,i){const r="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;r&&(i&&this._renderer.removeClass(r,i),e&&this._renderer.addClass(r,e))}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown");const{nativeElement:s}=i;"static"===this.display?(i.placement=null,r.setAttribute(s,"data-bs-popper","static")):(i.placement=e,r.removeAttribute(s,"data-bs-popper"));const a=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,a);const l=this._bodyContainer;l&&(r.removeClass(l,"dropup"),r.removeClass(l,"dropdown"),r.addClass(l,a))}}}return t.\u0275fac=function(e){return new(e||t)(te(jo),te(NRe),te(lr),te(si),te(En),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,qh,5),Cn(r,UC,5)),2&e){let o;kt(o=Tt())&&(i._menu=o.first),kt(o=Tt())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("show",i.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],standalone:!0,features:[Kt]}),t})(),bz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();class Ip{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class jRe{constructor(n,e,i,r,o,s){this._componentType=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:r}=this._windowRef.location,o=this._ngZone.onStable.pipe(es(1),_o(()=>is(this._ngZone,r,({classList:s})=>s.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:o}}close(n=!1){return this._windowRef?is(this._ngZone,this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(xo(()=>{this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),this._contentRef?.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):$t(void 0)}_getContentRef(n,e){if(n){if(n instanceof ir){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new Ip([i.rootNodes],i)}return new Ip([[this._renderer.createText(`${n}`)]])}return new Ip([])}}let PRe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(es(1)).subscribe(()=>{is(this._zone,this._el.nativeElement,(e,i)=>{i&&Gm(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return is(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(e,i){2&e&&(Ou("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),Ft("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[No],decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class wz{update(n){}close(n){}dismiss(n){}}const RRe=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],LRe=["animation","backdropClass"];class FRe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new hr,this._dismissed=new hr,this._hidden=new hr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}_applyWindowOptions(n,e){RRe.forEach(i=>{kp(e[i])&&(n[i]=e[i])})}_applyBackdropOptions(n,e){LRe.forEach(i=>{kp(e[i])&&(n[i]=e[i])})}update(n){this._applyWindowOptions(this._windowCmptRef.instance,n),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,n)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Xr(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Xr(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();!function BU(t){return t&&t.then}(e)?!1!==e&&this._dismiss(n):e.then(i=>{!1!==i&&this._dismiss(n)},()=>{})}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():$t(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),AC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var ky=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(ky||(ky={})),ky))();let $Re=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new hr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Oe,this.shown=new hr,this.hidden=new hr}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":Sp(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(es(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=AC(is(this._zone,e,()=>e.classList.remove("show"),i),is(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const e={animation:this.animation,runningTransition:"continue"};AC(is(this._zone,this._elRef.nativeElement,(o,s)=>{s&&Gm(o),o.classList.add("show")},e),is(this._zone,this._dialogEl.nativeElement,()=>{},e)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Ps(e,"keydown").pipe(Xr(this._closed$),co(r=>r.which===ji.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(ky.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Ps(this._dialogEl.nativeElement,"mousedown").pipe(Xr(this._closed$),xo(()=>i=!1),gl(()=>Ps(e,"mouseup").pipe(Xr(this._closed$),es(1))),co(({target:r})=>e===r)).subscribe(()=>{i=!0}),Ps(e,"click").pipe(Xr(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(ky.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=az(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&is(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(te(lr),te(En),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&xr(wje,7),2&e){let r;kt(r=Tt())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(Re("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Ou("modal d-block"+(i.windowClass?" "+i.windowClass:"")),Ft("fade",i.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[No],ngContentSelectors:by,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(kh(),_(0,"div",0,1)(2,"div",2),Th(3),w()()),2&e&&Ou("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+i.fullscreenClass+(i.scrollable?" modal-dialog-scrollable":"")+(i.modalDialogClass?" "+i.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:2}),t})(),BRe=(()=>{class t{constructor(e){this._document=e}hide(){const e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:o,paddingRight:s}=r;if(e>0){const a=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${a+e}px`}return r.overflow="hidden",()=>{e>0&&(r.paddingRight=s),r.overflow=o}}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),VRe=(()=>{class t{constructor(e,i,r,o,s,a,l){this._applicationRef=e,this._injector=i,this._environmentInjector=r,this._document=o,this._scrollBar=s,this._rendererFactory=a,this._ngZone=l,this._activeWindowCmptHasChanged=new hr,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new Oe,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const c=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Ps(n,"focusin").pipe(Xr(e),xn(o=>o.target));Ps(n,"keydown").pipe(Xr(e),co(o=>o.which===ji.Tab),BO(r)).subscribe(([o,s])=>{const[a,l]=az(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Ps(n,"click").pipe(Xr(e),BO(r),xn(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,c.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(c.location.nativeElement)}})}_restoreScrollBar(){const e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,r){const o=r.container instanceof HTMLElement?r.container:kp(r.container)?this._document.querySelector(r.container):this._document.body,s=this._rendererFactory.createRenderer(null,null);if(!o)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const a=new wz,l=(e=r.injector||e).get(Vl,null)||this._environmentInjector,c=this._getContentRef(e,l,i,a,r);let u=!1!==r.backdrop?this._attachBackdrop(o):void 0,d=this._attachWindowComponent(o,c.nodes),h=new FRe(d,c,u,r.beforeDismiss);return this._registerModalRef(h),this._registerWindowCmpt(d),h.hidden.pipe(es(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=f=>{h.close(f)},a.dismiss=f=>{h.dismiss(f)},a.update=f=>{h.update(f)},h.update(r),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&u.changeDetectorRef.detectChanges(),d.changeDetectorRef.detectChanges(),h}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let i=PE(PRe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let r=PE($Re,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_getContentRef(e,i,r,o,s){return r?r instanceof ir?this._createFromTemplateRef(r,o):Sp(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new Ip([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new Ip([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new Ip([[i]])}_createFromComponent(e,i,r,o,s){const l=PE(r,{environmentInjector:i,elementInjector:fs.create({providers:[{provide:wz,useValue:o}],parent:e})}),c=l.location.nativeElement;return s.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new Ip([[c]],l.hostView,l)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(Ve(Pd),Ve(fs),Ve(Vl),Ve(lr),Ve(BRe),Ve(om),Ve(si))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),HRe=(()=>{class t{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),zC=(()=>{class t{constructor(e,i,r){this._injector=e,this._modalStack=i,this._config=r}open(e,i={}){const r={...this._config,animation:this._config.animation,...i};return this._modalStack.open(this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(Ve(fs),Ve(VRe),Ve(HRe))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),xz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[zC]}),t})(),URe=(()=>{class t{constructor(e){this._ngbConfig=e,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Cz=t=>kp(t)&&""!==t;let zRe=0,Sz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbNavContent",""]],standalone:!0}),t})(),Wd=(()=>{class t{constructor(e,i){this._nav=e,this.elementRef=i,this.disabled=!1,this.shown=new Oe,this.hidden=new Oe}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){kp(this.domId)||(this.domId="ngb-nav-"+zRe++)}get active(){return this._nav.activeId===this.id}get id(){return Cz(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(kp(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Bu)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&Cn(r,Sz,4),2&e){let o;kt(o=Tt())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("nav-item",!0)},inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"],standalone:!0}),t})(),Bu=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new Oe,this.shown=new Oe,this.hidden=new Oe,this.destroy$=new hr,this.navItemChange$=new hr,this.navChange=new Oe,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case ji.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case ji.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case ji.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case ji.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case ji.Home:s=0;break;case ji.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!kp(this.activeId)){const e=this.items.first?this.items.first.id:null;Cz(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(Xr(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Sh("role"),te(URe),te(jo),te(lr))},t.\u0275dir=pt({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,Wd,4),Cn(r,Yh,5)),2&e){let o;kt(o=Tt())&&(i.items=o),kt(o=Tt())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&se("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(Re("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),Ft("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],standalone:!0,features:[Kt]}),t})(),Yh=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Sh("role"),te(Wd),te(Bu),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbNavLink",""]],hostVars:14,hostBindings:function(e,i){2&e&&(Fa("id",i.navItem.domId),Re("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),Ft("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))},standalone:!0}),t})(),Ty=(()=>{class t{constructor(e,i){this.navItem=e,this.nav=i}}return t.\u0275fac=function(e){return new(e||t)(te(Wd),te(Bu))},t.\u0275dir=pt({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostBindings:function(e,i){1&e&&se("click",function(o){return i.nav.click(i.navItem),o.preventDefault()})},standalone:!0,features:[f1([Yh])]}),t})();const qRe=({classList:t})=>(t.remove("show"),()=>t.remove("active")),YRe=(t,n)=>{n&&Gm(t),t.classList.add("show")};let m3=(()=>{class t{constructor(e){this.elRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(e,i){2&e&&(Fa("id",i.item.panelDomId),Re("role",i.role?i.role:i.nav.roles?"tabpanel":void 0)("aria-labelledby",i.item.domId),Ft("fade",i.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"},standalone:!0}),t})(),kz=(()=>{class t{constructor(e,i){this._cd=e,this._ngZone=i,this._activePane=null}isPanelTransitioning(e){return this._activePane?.item===e}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(Xr(this.nav.destroy$),Fx(this._activePane?.item||null),DC(),function AIe(t){return n=>n.lift(new EIe(t))}(1)).subscribe(e=>{const i={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?is(this._ngZone,this._activePane.elRef.nativeElement,qRe,i).subscribe(()=>{const r=this._activePane?.item;this._activePane=this._getPaneForItem(e),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),is(this._ngZone,this._activePane.elRef.nativeElement,YRe,i).subscribe(()=>{e&&(e.shown.emit(),this.nav.shown.emit(e.id))})),r&&(r.hidden.emit(),this.nav.hidden.emit(r.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.elRef.nativeElement.classList.add("show"),this._activePane?.elRef.nativeElement.classList.add("active")}_getPaneForItem(e){return this._panes&&this._panes.find(i=>i.item===e)||null}_getActivePane(){return this._panes&&this._panes.find(e=>e.item.active)||null}}return t.\u0275fac=function(e){return new(e||t)(te(jo),te(si))},t.\u0275cmp=nt({type:t,selectors:[["","ngbNavOutlet",""]],viewQuery:function(e,i){if(1&e&&xr(m3,5),2&e){let r;kt(r=Tt())&&(i._panes=r)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},standalone:!0,features:[No],attrs:xje,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["ngbNavPane","",3,"item","nav","role",4,"ngIf"],["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&q(0,kje,1,1,"ng-template",0),2&e&&S("ngForOf",i.nav.items)},dependencies:[m3,Bt,Ct,Ac],encapsulation:2,changeDetection:0}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[kz]}),t})(),JRe=(()=>{class t{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Dz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationEllipsis",""]],standalone:!0}),t})(),Az=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationFirst",""]],standalone:!0}),t})(),Ez=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationLast",""]],standalone:!0}),t})(),Mz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationNext",""]],standalone:!0}),t})(),Oz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationNumber",""]],standalone:!0}),t})(),Iz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationPrevious",""]],standalone:!0}),t})(),Nz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationPages",""]],standalone:!0}),t})(),jz=(()=>{class t{constructor(e){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new Oe(!0),this.disabled=e.disabled,this.boundaryLinks=e.boundaryLinks,this.directionLinks=e.directionLinks,this.ellipses=e.ellipses,this.maxSize=e.maxSize,this.pageSize=e.pageSize,this.rotate=e.rotate,this.size=e.size}hasPrevious(){return this.page>1}hasNext(){return this.page0&&(e>2?this.pages.unshift(-1):2===e&&this.pages.unshift(2),this.pages.unshift(1)),i0&&this.pageCount>this.maxSize){let i=0,r=this.pageCount;[i,r]=this.rotate?this._applyRotation():this._applyPagination(),this.pages=this.pages.slice(i,r),this._applyEllipses(i,r)}}}return t.\u0275fac=function(e){return new(e||t)(te(JRe))},t.\u0275cmp=nt({type:t,selectors:[["ngb-pagination"]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,Dz,5),Cn(r,Az,5),Cn(r,Ez,5),Cn(r,Mz,5),Cn(r,Oz,5),Cn(r,Iz,5),Cn(r,Nz,5)),2&e){let o;kt(o=Tt())&&(i.tplEllipsis=o.first),kt(o=Tt())&&(i.tplFirst=o.first),kt(o=Tt())&&(i.tplLast=o.first),kt(o=Tt())&&(i.tplNext=o.first),kt(o=Tt())&&(i.tplNumber=o.first),kt(o=Tt())&&(i.tplPrevious=o.first),kt(o=Tt())&&(i.tplPages=o.first)}},hostAttrs:["role","navigation"],inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},standalone:!0,features:[Kt,No],decls:20,vars:12,consts:function(){let n,e,i,r,o,s,a,l;return n=$localize`:@@ngb.pagination.first:««`,e=$localize`:@@ngb.pagination.previous:«`,i=$localize`:@@ngb.pagination.next:»`,r=$localize`:@@ngb.pagination.last:»»`,o=$localize`:@@ngb.pagination.first-aria:First`,s=$localize`:@@ngb.pagination.previous-aria:Previous`,a=$localize`:@@ngb.pagination.next-aria:Next`,l=$localize`:@@ngb.pagination.last-aria:Last`,[["first",""],["previous",""],["next",""],["last",""],["ellipsis",""],["defaultNumber",""],["defaultPages",""],["class","page-item",3,"disabled",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true"],n,e,i,r,["class","page-item",3,"active","disabled",4,"ngFor","ngForOf"],[1,"page-item"],["class","page-link","tabindex","-1","aria-disabled","true",4,"ngIf"],["class","page-link","href","",3,"click",4,"ngIf"],["tabindex","-1","aria-disabled","true",1,"page-link"],["href","",1,"page-link",3,"click"],["aria-label",o,"href","",1,"page-link",3,"click"],["aria-label",s,"href","",1,"page-link",3,"click"],["aria-label",a,"href","",1,"page-link",3,"click"],["aria-label",l,"href","",1,"page-link",3,"click"]]},template:function(e,i){if(1&e&&(q(0,Tje,2,0,"ng-template",null,0,lo),q(2,Dje,2,0,"ng-template",null,1,lo),q(4,Aje,2,0,"ng-template",null,2,lo),q(6,Eje,2,0,"ng-template",null,3,lo),q(8,Mje,1,0,"ng-template",null,4,lo),q(10,Oje,1,1,"ng-template",null,5,lo),q(12,$je,1,1,"ng-template",null,6,lo),_(14,"ul"),q(15,Vje,3,9,"li",7),q(16,zje,3,8,"li",7),q(17,Gje,0,0,"ng-template",8),q(18,qje,3,9,"li",7),q(19,Jje,3,9,"li",7),w()),2&e){const r=As(13);x(14),Ou("pagination"+(i.size?" pagination-"+i.size:"")),x(1),S("ngIf",i.boundaryLinks),x(1),S("ngIf",i.directionLinks),x(1),S("ngTemplateOutlet",(null==i.tplPages?null:i.tplPages.templateRef)||r)("ngTemplateOutletContext",C1(8,Kje,i.page,i.pages,i.disabled)),x(1),S("ngIf",i.directionLinks),x(1),S("ngIf",i.boundaryLinks)}},dependencies:[Ct,Bt,Ac],encapsulation:2,changeDetection:0}),t})(),Pz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[jz]}),t})();class KRe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const XRe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},Rz=t=>t>0?VO(t):n=>n;let Lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})(),nLe=(()=>{class t{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),iLe=(()=>{class t{constructor(e){this.value=0,this.max=e.max,this.animated=e.animated,this.ariaLabel=e.ariaLabel,this.striped=e.striped,this.textType=e.textType,this.type=e.type,this.showValue=e.showValue,this.height=e.height}set max(e){this._max=!uo(e)||e<=0?100:e}get max(){return this._max}getValue(){return NC(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}return t.\u0275fac=function(e){return new(e||t)(te(nLe))},t.\u0275cmp=nt({type:t,selectors:[["ngb-progressbar"]],hostAttrs:["role","progressbar","aria-valuemin","0",1,"progress"],hostVars:5,hostBindings:function(e,i){2&e&&(Re("aria-valuenow",i.getValue())("aria-valuemax",i.max)("aria-label",i.ariaLabel),oi("height",i.height))},inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},standalone:!0,features:[No],ngContentSelectors:by,decls:3,vars:11,consts:function(){let n;return n=$localize`:@@ngb.progressbar.value:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[4,"ngIf"],n]},template:function(e,i){1&e&&(kh(),_(0,"div"),q(1,Zje,3,3,"span",0),Th(2),w()),2&e&&(function Z6(t,n,e,i,r){kc(al,Iu,hm(st(),t,n,e,i,r),!0)}("progress-bar",i.type?i.textType?" bg-"+i.type:" text-bg-"+i.type:"","",i.textType?" text-"+i.textType:"",""),oi("width",i.getPercentValue(),"%"),Ft("progress-bar-animated",i.animated)("progress-bar-striped",i.striped),x(1),S("ngIf",i.showValue))},dependencies:[Ct,S7],encapsulation:2,changeDetection:0}),t})(),Fz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[iLe]}),t})(),rLe=(()=>{class t{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),oLe=(()=>{class t{constructor(e,i){this._changeDetectorRef=i,this.contexts=[],this.disabled=!1,this.hover=new Oe,this.leave=new Oe,this.rateChange=new Oe(!0),this.onChange=r=>{},this.onTouched=()=>{},this.max=e.max,this.readonly=e.readonly,this.tabindex=e.tabindex}ariaValueText(e,i){return`${e} out of ${i}`}isInteractive(){return!this.readonly&&!this.disabled}enter(e){this.isInteractive()&&this._updateState(e),this.hover.emit(e)}handleBlur(){this.onTouched()}handleClick(e){this.isInteractive()&&this.update(this.resettable&&this.rate===e?0:e)}handleKeyDown(e){switch(e.which){case ji.ArrowDown:case ji.ArrowLeft:this.update(this.rate-1);break;case ji.ArrowUp:case ji.ArrowRight:this.update(this.rate+1);break;case ji.Home:this.update(0);break;case ji.End:this.update(this.max);break;default:return}e.preventDefault()}ngOnChanges(e){e.rate&&this.update(this.rate),e.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(e){this.disabled=e}update(e,i=!0){const r=NC(e,this.max,0);this.isInteractive()&&this.rate!==r&&(this.rate=r,this.rateChange.emit(this.rate)),i&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(e){this.update(e,!1),this._changeDetectorRef.markForCheck()}_updateState(e){this.nextRate=e,this.contexts.forEach((i,r)=>i.fill=Math.round(100*NC(e-r,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(e,i)=>({fill:0,index:i}))}}return t.\u0275fac=function(e){return new(e||t)(te(rLe),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["ngb-rating"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,ir,5),2&e){let o;kt(o=Tt())&&(i.starTemplateFromContent=o.first)}},hostAttrs:["role","slider","aria-valuemin","0",1,"d-inline-flex"],hostVars:5,hostBindings:function(e,i){1&e&&se("blur",function(){return i.handleBlur()})("keydown",function(o){return i.handleKeyDown(o)})("mouseleave",function(){return i.reset()}),2&e&&(Fa("tabindex",i.disabled?-1:i.tabindex),Re("aria-valuemax",i.max)("aria-valuenow",i.nextRate)("aria-valuetext",i.ariaValueText(i.nextRate,i.max))("aria-disabled",!!i.readonly||null))},inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},standalone:!0,features:[Qi([{provide:Ha,useExisting:Fn(()=>t),multi:!0}]),Kt,No],decls:3,vars:1,consts:[["t",""],["ngFor","",3,"ngForOf"],[1,"visually-hidden"],[3,"mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(q(0,ePe,1,1,"ng-template",null,0,lo),q(2,nPe,4,5,"ng-template",1)),2&e&&(x(2),S("ngForOf",i.contexts))},dependencies:[Bt,Ac],encapsulation:2,changeDetection:0}),t})(),$z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[oLe]}),t})();class Bz{constructor(n,e,i){this.hour=Rs(n),this.minute=Rs(e),this.second=Rs(i)}changeHour(n=1){this.updateHour((isNaN(this.hour)?0:this.hour)+n)}updateHour(n){this.hour=uo(n)?(n<0?24+n:n)%24:NaN}changeMinute(n=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+n)}updateMinute(n){uo(n)?(this.minute=n%60<0?60+n%60:n%60,this.changeHour(Math.floor(n/60))):this.minute=NaN}changeSecond(n=1){this.updateSecond((isNaN(this.second)?0:this.second)+n)}updateSecond(n){uo(n)?(this.second=n<0?60+n%60:n%60,this.changeMinute(Math.floor(n/60))):this.second=NaN}isValid(n=!0){return uo(this.hour)&&uo(this.minute)&&(!n||uo(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let sLe=(()=>{class t{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Vz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function aLe(){return new lLe}()},providedIn:"root"}),t})(),lLe=(()=>{class t extends Vz{fromModel(e){return e&&Qr(e.hour)&&Qr(e.minute)?{hour:e.hour,minute:e.minute,second:Qr(e.second)?e.second:null}:null}toModel(e){return e&&Qr(e.hour)&&Qr(e.minute)?{hour:e.hour,minute:e.minute,second:Qr(e.second)?e.second:null}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),Hz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function cLe(t){return new uLe(t)}(Ve(hl)),i},providedIn:"root"}),t})(),uLe=(()=>{class t extends Hz{constructor(e){super(),this._periods=r7(e,Lr.Standalone,Wn.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}return t.\u0275fac=function(e){return new(e||t)(Ve(hl))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const dLe=/[^0-9]/g;let hLe=(()=>{class t{constructor(e,i,r,o){this._config=e,this._ngbTimeAdapter=i,this._cd=r,this.i18n=o,this.onChange=s=>{},this.onTouched=()=>{},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}set hourStep(e){this._hourStep=Qr(e)?e:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(e){this._minuteStep=Qr(e)?e:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(e){this._secondStep=Qr(e)?e:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(e){const i=this._ngbTimeAdapter.fromModel(e);this.model=i?new Bz(i.hour,i.minute,i.second):new Bz,!this.seconds&&(!i||!uo(i.second))&&(this.model.second=0),this._cd.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}changeHour(e){this.model?.changeHour(e),this.propagateModelChange()}changeMinute(e){this.model?.changeMinute(e),this.propagateModelChange()}changeSecond(e){this.model?.changeSecond(e),this.propagateModelChange()}updateHour(e){const i=!!this.model&&this.model.hour>=12,r=Rs(e);this.model?.updateHour(this.meridian&&(i&&r<12||!i&&12===r)?r+12:r),this.propagateModelChange()}updateMinute(e){this.model?.updateMinute(Rs(e)),this.propagateModelChange()}updateSecond(e){this.model?.updateSecond(Rs(e)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(e){e.value=e.value.replace(dLe,"")}formatHour(e){return uo(e)?zm(this.meridian?e%12==0?12:e%12:e%24):zm(NaN)}formatMinSec(e){return zm(uo(e)?e:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(e){e.seconds&&!this.seconds&&this.model&&!uo(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(e=!0){e&&this.onTouched(),this.model?.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}return t.\u0275fac=function(e){return new(e||t)(te(sLe),te(Vz),te(jo),te(Hz))},t.\u0275cmp=nt({type:t,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},exportAs:["ngbTimepicker"],standalone:!0,features:[Qi([{provide:Ha,useExisting:Fn(()=>t),multi:!0}]),Kt,No],decls:16,vars:25,consts:function(){let n,e,i,r,o,s,a,l,c,u,d,h,f,p;return n=$localize`:@@ngb.timepicker.HH:HH`,e=$localize`:@@ngb.timepicker.hours:Hours`,i=$localize`:@@ngb.timepicker.MM:MM`,r=$localize`:@@ngb.timepicker.minutes:Minutes`,o=$localize`:@@ngb.timepicker.increment-hours:Increment hours`,s=$localize`:@@ngb.timepicker.decrement-hours:Decrement hours`,a=$localize`:@@ngb.timepicker.increment-minutes:Increment minutes`,l=$localize`:@@ngb.timepicker.decrement-minutes:Decrement minutes`,c=$localize`:@@ngb.timepicker.SS:SS`,u=$localize`:@@ngb.timepicker.seconds:Seconds`,d=$localize`:@@ngb.timepicker.increment-seconds:Increment seconds`,h=$localize`:@@ngb.timepicker.decrement-seconds:Decrement seconds`,f=$localize`:@@ngb.timepicker.PM:${"\ufffd0\ufffd"}:INTERPOLATION:`,p=$localize`:@@ngb.timepicker.AM:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric","placeholder",n,"aria-label",e,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["type","text","maxlength","2","inputmode","numeric","placeholder",i,"aria-label",r,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"visually-hidden"],o,[1,"chevron","ngb-tp-chevron","bottom"],s,a,l,[1,"ngb-tp-input-container","ngb-tp-second"],["type","text","maxlength","2","inputmode","numeric","placeholder",c,"aria-label",u,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],d,h,[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],f,p]},template:function(e,i){1&e&&(_(0,"fieldset",0)(1,"div",1)(2,"div",2),q(3,iPe,4,7,"button",3),_(4,"input",4),se("change",function(o){return i.updateHour(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeHour(i.hourStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeHour(-i.hourStep),o.preventDefault()}),w(),q(5,rPe,4,7,"button",3),w(),_(6,"div",5),A(7,":"),w(),_(8,"div",6),q(9,oPe,4,7,"button",3),_(10,"input",7),se("change",function(o){return i.updateMinute(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeMinute(i.minuteStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeMinute(-i.minuteStep),o.preventDefault()}),w(),q(11,sPe,4,7,"button",3),w(),q(12,aPe,2,0,"div",8),q(13,uPe,4,9,"div",9),q(14,dPe,1,0,"div",8),q(15,pPe,5,9,"div",10),w()()),2&e&&(Ft("disabled",i.disabled),S("disabled",i.disabled),x(3),S("ngIf",i.spinners),x(1),Ft("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatHour(null==i.model?null:i.model.hour))("readOnly",i.readonlyInputs)("disabled",i.disabled),x(1),S("ngIf",i.spinners),x(4),S("ngIf",i.spinners),x(1),Ft("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatMinSec(null==i.model?null:i.model.minute))("readOnly",i.readonlyInputs)("disabled",i.disabled),x(1),S("ngIf",i.spinners),x(1),S("ngIf",i.seconds),x(1),S("ngIf",i.seconds),x(1),S("ngIf",i.meridian),x(1),S("ngIf",i.meridian))},dependencies:[Ct],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],encapsulation:2}),t})(),Uz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[hLe]}),t})();const fLe=(t,n)=>{const{classList:e}=t;if(n)return e.add("fade"),Gm(t),e.add("show","showing"),()=>{e.remove("showing")};e.add("show")},pLe=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});let gLe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),mLe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["","ngbToastHeader",""]],standalone:!0}),t})(),vLe=(()=>{class t{constructor(e,i,r,o){this.ariaLive=e,this._zone=r,this._element=o,this.contentHeaderTpl=null,this.shown=new Oe,this.hidden=new Oe,null==this.ariaLive&&(this.ariaLive=i.ariaLive),this.delay=i.delay,this.autohide=i.autohide,this.animation=i.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe(es(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(e){"autohide"in e&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const e=is(this._zone,this._element.nativeElement,pLe,{animation:this.animation,runningTransition:"stop"});return e.subscribe(()=>{this.hidden.emit()}),e}show(){const e=is(this._zone,this._element.nativeElement,fLe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>{this.shown.emit()}),e}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}return t.\u0275fac=function(e){return new(e||t)(Sh("aria-live"),te(gLe),te(si),te(En))},t.\u0275cmp=nt({type:t,selectors:[["ngb-toast"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,mLe,7,ir),2&e){let o;kt(o=Tt())&&(i.contentHeaderTpl=o.first)}},hostAttrs:["role","alert","aria-atomic","true",1,"toast"],hostVars:3,hostBindings:function(e,i){2&e&&(Re("aria-live",i.ariaLive),Ft("fade",i.animation))},inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbToast"],standalone:!0,features:[Kt,No],ngContentSelectors:by,decls:5,vars:1,consts:function(){let n;return n=$localize`:@@ngb.toast.close-aria:Close`,[["headerTpl",""],[3,"ngIf"],[1,"toast-body"],[1,"me-auto"],[1,"toast-header"],[3,"ngTemplateOutlet"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kh(),q(0,gPe,2,1,"ng-template",null,0,lo),q(2,vPe,3,1,"ng-template",1),_(3,"div",2),Th(4),w()),2&e&&(x(2),S("ngIf",i.contentHeaderTpl||i.header))},dependencies:[Ct,Ac],styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],encapsulation:2}),t})(),zz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[vLe]}),t})(),yLe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_Le=0,bLe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip",2,"position","absolute"],hostVars:5,hostBindings:function(e,i){2&e&&(Fa("id",i.id),Ou("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),Ft("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},standalone:!0,features:[No],ngContentSelectors:by,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(kh(),ie(0,"div",0),_(1,"div",1),Th(2),w())},encapsulation:2,changeDetection:0}),t})(),wLe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u){this._elementRef=e,this._renderer=i,this._ngZone=a,this._document=l,this._changeDetector=c,this.shown=new Oe,this.hidden=new Oe,this._ngbTooltipWindowId="ngb-tooltip-"+_Le++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disableTooltip=s.disableTooltip,this.tooltipClass=s.tooltipClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._popupService=new jRe(bLe,r,o,i,this._ngZone,u),this._positioning=h3()}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:o=>this.popperOptions(o)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),d3(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(e=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(e).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function tLe(t,n,e,i,r,o,s=0,a=0){const l=function QRe(t,n=XRe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new KRe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function ZRe(t,n,e,i){return new ar(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function eLe(t,n,e){return i=>{let r=null;const o=i.pipe(xn(l=>({open:l})),co(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),bF());return hD(o.pipe(co(l=>l.open),Rz(t)),o.pipe(co(l=>!l.open),Rz(n))).pipe(co(l=>l===r&&(r=null,l.open!==e())),xn(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(Sp(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs),te(fs),te($a),te(yLe),te(si),te(lr),te(jo),te(Pd))},t.\u0275dir=pt({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],standalone:!0,features:[Kt]}),t})(),Gz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})(),xLe=(()=>{class t{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const i=$U(this.result),r=Array.isArray(this.term)?this.term:[this.term],o=c=>this.accentSensitive?c:HU(c),s=r.map(c=>function CPe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(o($U(c)))).filter(c=>c),a=this.accentSensitive?i:HU(i),l=s.length?a.split(new RegExp(`(${s.join("|")})`,"gmi")):[i];if(this.accentSensitive)this.parts=l;else{let c=0;this.parts=l.map(u=>i.substring(c,c+=u.length))}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[Kt,No],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(e,i){1&e&&q(0,bPe,3,2,"ng-template",0),2&e&&S("ngForOf",i.parts)},dependencies:[Ct,Bt],styles:[".ngb-highlight{font-weight:700}\n"],encapsulation:2,changeDetection:0}),t})();new Ut("live announcer delay",{providedIn:"root",factory:function CLe(){return 100}});let Wz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[xLe]}),t})(),qz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();const SLe=[XU,QU,ez,tz,_z,bz,xz,Tz,qz,Pz,Lz,Fz,$z,Uz,zz,Gz,Wz];let kLe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[SLe,XU,QU,ez,tz,_z,bz,xz,Tz,qz,Pz,Lz,Fz,$z,Uz,zz,Gz,Wz]}),t})(),Yz=(()=>{class t{restrictedPages=new Map([["users",nn.USER_ROLE_ADMIN],["config",nn.USER_ROLE_DEVELOPER],["modules",nn.USER_ROLE_DEVELOPER],["apiexplorer",nn.USER_ROLE_DEVELOPER]]);static \u0275fac=function(i){return new(i||t)};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function TLe(t,n){if(1&t&&(ul(0,5),_(1,"a",31),ie(2,"img",32),_(3,"span",12),A(4),w()(),dl()),2&t){const e=P().$implicit;S("ngbNavItem",e.navItem),x(1),S("routerLink",e.routerLink),x(1),sp("src","/static/svg/",e.icon,".svg",a1),x(2),ze(e.label)}}function DLe(t,n){1&t&&ie(0,"hr")}function ALe(t,n){if(1&t&&(q(0,TLe,5,4,"ng-container",30),q(1,DLe,1,0,"hr",29)),2&t){const e=n.$implicit;S("ngIf",P().getSessionRole()<=e.minRole),x(1),S("ngIf",e.separator)}}function ELe(t,n){if(1&t&&(_(0,"div",33)(1,"h2",34),ie(2,"img",35),A(3,"An error has occurred!"),w(),_(4,"h6",36),A(5),w(),_(6,"p"),A(7,"Please refresh the page to try again."),w()()),2&t){const e=P();x(5),ze(e.error)}}function MLe(t,n){1&t&&(_(0,"div",37),ie(1,"img",38),w())}function OLe(t,n){1&t&&ie(0,"router-outlet")}const ILe=function(){return["/"]},NLe=function(){return["/login"]};let jLe=(()=>{class t{route;router;segment;consoleService;authService;routerSub;segmentRouterSub;loading=!0;error="";routes=[{navItem:"status",routerLink:["/status"],label:"Status",minRole:nn.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:nn.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:nn.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:nn.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:nn.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:nn.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:nn.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:nn.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:nn.USER_ROLE_READONLY,icon:"chat"},{navItem:"purchases",routerLink:["/purchases"],label:"Purchases",minRole:nn.USER_ROLE_READONLY,icon:"purchases"},{navItem:"subscriptions",routerLink:["/subscriptions"],label:"Subscriptions",minRole:nn.USER_ROLE_READONLY,icon:"subscriptions"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:nn.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:nn.USER_ROLE_DEVELOPER,icon:"api-explorer"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function nIe(t){let n=arguments.length,e=TC;Jf(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new iIe(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof qx&&(this.loading=!0),l instanceof Ud&&(this.loading=!1),l instanceof q1&&(this.loading=!1),l instanceof Jx&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(DC((a,l)=>!(l instanceof Ud)||a.url===l.url)).subscribe(a=>{})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(wC),te(kn),te(zr))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:49,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","http://heroiclabs.com/cloud?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Heroic%20Cloud%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/hiro.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/satori.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/docs/nakama/getting-started/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Documentation%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Blog%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"nav",2,3),se("navChange",function(s){return r.onSidebarNavChange(s)}),_(4,"div",4),ul(5,5),_(6,"a",6),ie(7,"img",7)(8,"img",8),w(),dl(),ie(9,"hr"),q(10,ALe,2,2,"ng-template",9),ie(11,"hr"),_(12,"a",10),ie(13,"img",11),_(14,"span",12),A(15,"Heroic Cloud"),w()(),_(16,"a",13),ie(17,"img",14),_(18,"span",12),A(19,"Hiro"),w()(),_(20,"a",15),ie(21,"img",16),_(22,"span",12),A(23,"Satori"),w()(),ie(24,"hr"),_(25,"a",17),ie(26,"img",18),_(27,"span",12),A(28,"Documentation"),w()(),_(29,"a",19),ie(30,"img",20),_(31,"span",12),A(32,"Forum"),w()(),_(33,"a",21),ie(34,"img",22),_(35,"span",12),A(36,"Heroic Labs Blog"),w()(),ie(37,"hr"),_(38,"div",23),A(39),w(),ul(40,5),_(41,"a",24),se("click",function(){return r.logout()}),ie(42,"img",25),_(43,"span",12),A(44,"Logout"),w()(),dl(),w()(),_(45,"main",26),q(46,ELe,8,1,"div",27),q(47,MLe,2,0,"div",28),q(48,OLe,1,0,"router-outlet",29),w()()()),2&i&&(x(5),S("ngbNavItem","logo"),x(1),S("routerLink",ma(9,ILe)),x(4),S("ngForOf",r.routes),x(29),wt("Logged in as: ",r.getUsername(),""),x(1),S("ngbNavItem","logout"),x(1),S("routerLink",ma(10,NLe)),x(5),S("ngIf",r.error),x(1),S("ngIf",!r.error&&r.loading),x(1),S("ngIf",!r.error&&!r.loading))},dependencies:[yp,Mc,ty,Bt,Ct,Bu,Wd,Ty,Yh],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px;color:#fff}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})}return t})(),PLe=(()=>{class t{authService;router;globals;constructor(e,i,r){this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||fs.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class BLe extends $Le{}"function"==typeof SuppressedError&&SuppressedError;class d4e{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new h4e(n,this.dueTime,this.scheduler))}}class h4e extends Ln{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(f4e,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function f4e(t){t.debouncedNext()}function p4e(){}function x3(t){return null==t?p4e:function(){return this.querySelector(t)}}function m4e(){return[]}function Qz(t){return null==t?m4e:function(){return this.querySelectorAll(t)}}function Zz(t){return function(){return this.matches(t)}}function eG(t){return new Array(t.length)}function GC(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}GC.prototype={constructor:GC,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var tG="$";function w4e(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var C3="http://www.w3.org/1999/xhtml";const nG={svg:"http://www.w3.org/2000/svg",xhtml:C3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function WC(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),nG.hasOwnProperty(n)?{space:nG[n],local:t}:t}function R4e(t){return function(){this.removeAttribute(t)}}function L4e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function F4e(t,n){return function(){this.setAttribute(t,n)}}function $4e(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function B4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function V4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function iG(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U4e(t){return function(){this.style.removeProperty(t)}}function z4e(t,n,e){return function(){this.style.setProperty(t,n,e)}}function G4e(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function Jm(t,n){return t.style.getPropertyValue(n)||iG(t).getComputedStyle(t,null).getPropertyValue(n)}function q4e(t){return function(){delete this[t]}}function Y4e(t,n){return function(){this[t]=n}}function J4e(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function rG(t){return t.trim().split(/^|\s+/)}function S3(t){return t.classList||new oG(t)}function oG(t){this._node=t,this._names=rG(t.getAttribute("class")||"")}function sG(t,n){for(var e=S3(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var cG={},$i=null;function kFe(t,n,e){return t=uG(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function uG(t,n,e){return function(i){var r=$i;$i=i;try{t.call(this,this.__data__,n,e)}finally{$i=r}}}function DFe(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=b&&(b=y+1);!(k=m[b])&&++b=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function A4e(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=E4e);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?U4e:"function"==typeof n?G4e:z4e)(t,n,e??"")):Jm(this.node(),t)},property:function K4e(t,n){return arguments.length>1?this.each((null==n?q4e:"function"==typeof n?J4e:Y4e)(t,n)):this.node()[t]},classed:function eFe(t,n){var e=rG(t+"");if(arguments.length<2){for(var i=S3(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?AFe:DFe,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?JC(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?JC(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=BFe.exec(t))?new wl(n[1],n[2],n[3],1):(n=VFe.exec(t))?new wl(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=HFe.exec(t))?JC(n[1],n[2],n[3],n[4]):(n=UFe.exec(t))?JC(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=zFe.exec(t))?SG(n[1],n[2]/100,n[3]/100,1):(n=GFe.exec(t))?SG(n[1],n[2]/100,n[3]/100,n[4]):yG.hasOwnProperty(t)?wG(yG[t]):"transparent"===t?new wl(NaN,NaN,NaN,0):null}function wG(t){return new wl(t>>16&255,t>>8&255,255&t,1)}function JC(t,n,e,i){return i<=0&&(t=n=e=NaN),new wl(t,n,e,i)}function Iy(t,n,e,i){return 1===arguments.length?function qFe(t){return t instanceof Ey||(t=Np(t)),t?new wl((t=t.rgb()).r,t.g,t.b,t.opacity):new wl}(t):new wl(t,n,e,i??1)}function wl(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function xG(){return"#"+D3(this.r)+D3(this.g)+D3(this.b)}function CG(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function D3(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function SG(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Hu(t,n,e,i)}function kG(t){if(t instanceof Hu)return new Hu(t.h,t.s,t.l,t.opacity);if(t instanceof Ey||(t=Np(t)),!t)return new Hu;if(t instanceof Hu)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Hu(s,a,l,t.opacity)}function Hu(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function A3(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function TG(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function E3(t){return function(){return t}}function AG(t,n){var e=n-t;return e?function DG(t,n){return function(e){return t+e*n}}(t,e):E3(isNaN(t)?n:t)}T3(Ey,Np,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:_G,formatHex:_G,formatHsl:function WFe(){return kG(this).formatHsl()},formatRgb:bG,toString:bG}),T3(wl,Iy,vG(Ey,{brighter:function(t){return t=null==t?YC:Math.pow(YC,t),new wl(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wl(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xG,formatHex:xG,formatRgb:CG,toString:CG})),T3(Hu,function YFe(t,n,e,i){return 1===arguments.length?kG(t):new Hu(t,n,e,i??1)},vG(Ey,{brighter:function(t){return t=null==t?YC:Math.pow(YC,t),new Hu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hu(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new wl(A3(t>=240?t-240:t+120,r,i),A3(t,r,i),A3(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const KC=function t(n){var e=function QFe(t){return 1==(t=+t)?AG:function(n,e){return e-n?function XFe(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):E3(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=Iy(r)).r,(o=Iy(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=AG(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function EG(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return TG((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lc(i,r)})),e=O3.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--Xm}()}finally{Xm=0,function u5e(){for(var t,e,n=XC,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:XC=e);Py=t,I3(i)}(),Pp=0}}function c5e(){var t=Ry.now(),n=t-QC;n>jG&&(ZC-=n,QC=t)}function I3(t){Xm||(Ny&&(Ny=clearTimeout(Ny)),t-Pp>24?(t<1/0&&(Ny=setTimeout(LG,t-Ry.now()-ZC)),jy&&(jy=clearInterval(jy))):(jy||(QC=Ry.now(),jy=setInterval(c5e,jG)),Xm=1,PG(LG)))}function FG(t,n,e){var i=new t2;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}t2.prototype=RG.prototype={constructor:t2,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?e2():+e)+(null==n?0:+n),!this._next&&Py!==this&&(Py?Py._next=this:XC=this,Py=this),this._call=t,this._time=e,I3()},stop:function(){this._call&&(this._call=null,this._time=1/0,I3())}};var d5e=mG("start","end","cancel","interrupt"),h5e=[],$G=0,BG=1,N3=2,n2=3,VG=4,j3=5,i2=6;function r2(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function f5e(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==BG)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===n2)return FG(s);f.state===VG?(f.state=i2,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u$G)throw new Error("too late; already scheduled");return e}function qd(t,n){var e=Fc(t,n);if(e.state>n2)throw new Error("too late; already running");return e}function Fc(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function R3(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>N3&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lc(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lc(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(r(f)+"scale(",null,",",null,")");p.push({i:g-4,x:Lc(c,d)},{i:g-2,x:Lc(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var m,p=-1,g=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?P3:qd;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function A5e(t,n){var e=WC(t),i="transform"===e?y5e:WG;return this.attrTween(t,"function"==typeof n?(e.local?D5e:T5e)(e,i,$3(this,"attr."+t,n)):null==n?(e.local?C5e:x5e)(e):(e.local?k5e:S5e)(e,i,n))},attrTween:function N5e(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=WC(t);return this.tween(e,(i.local?O5e:I5e)(i,n))},style:function i$e(t,n,e){var i="transform"==(t+="")?v5e:WG;return null==n?this.styleTween(t,function Z5e(t,n){var e,i,r;return function(){var o=Jm(this,t),s=(this.style.removeProperty(t),Jm(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,qG(t)):"function"==typeof n?this.styleTween(t,function t$e(t,n,e){var i,r,o;return function(){var s=Jm(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=Jm(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,$3(this,"style."+t,n))).each(function n$e(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=qd(this,t),c=l.on,u=null==l.value[o]?a||(a=qG(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function e$e(t,n,e){var i,o,r=e+"";return function(){var s=Jm(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function s$e(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function o$e(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function r$e(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function c$e(t){return this.tween("text","function"==typeof t?function l$e(t){return function(){var n=t(this);this.textContent=n??""}}($3(this,"text",t)):function a$e(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function h$e(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function d$e(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function u$e(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function Y5e(){return this.on("end.remove",function q5e(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function w5e(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=Fc(this.node(),e).tween,r=0,o=i.length;r0&&(N=$-E),C<0?Z=D-M:C>0&&(z=Y-M),y=U3,R.attr("cursor",Jd.selection),pe());break;default:return}H3()},!0).on("keyup.brush",function Ue(){switch($i.keyCode){case 16:L&&(X=ne=L=!1,pe());break;case 18:y===ev&&(b<0?H=G:b>0&&(N=$),C<0?Z=D:C>0&&(z=Y),y=Zm,pe());break;case 32:y===U3&&($i.altKey?(b&&(H=G-E*b,N=$+E*b),C&&(Z=D-M*C,z=Y+M*C),y=ev):(b<0?H=G:b>0&&(N=$),C<0?Z=D:C>0&&(z=Y),y=Zm),R.attr("cursor",Jd[v]),pe());break;default:return}H3()},!0),function LFe(t){var n=t.document.documentElement,e=vs(t).on("dragstart.drag",k3,!0);"onselectstart"in n?e.on("selectstart.drag",k3,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}($i.view)}JG(),R3(m),c.call(m),be.start()}function K(){var Je=ge(m);L&&!X&&!ne&&(Math.abs(Je[0]-De[0])>Math.abs(Je[1]-De[1])?ne=!0:X=!0),De=Je,U=!0,H3(),pe()}function pe(){var Je;switch(E=De[0]-ae[0],M=De[1]-ae[1],y){case U3:case KG:b&&(E=Math.max(B-N,Math.min(O-H,E)),$=N+E,G=H+E),C&&(M=Math.max(V-z,Math.min(F-Z,M)),Y=z+M,D=Z+M);break;case Zm:b<0?(E=Math.max(B-N,Math.min(O-N,E)),$=N+E,G=H):b>0&&(E=Math.max(B-H,Math.min(O-H,E)),$=N,G=H+E),C<0?(M=Math.max(V-z,Math.min(F-z,M)),Y=z+M,D=Z):C>0&&(M=Math.max(V-Z,Math.min(F-Z,M)),Y=z,D=Z+M);break;case ev:b&&($=Math.max(B,Math.min(O,N-E*b)),G=Math.max(B,Math.min(O,H+E*b))),C&&(Y=Math.max(V,Math.min(F,z-M*C)),D=Math.max(V,Math.min(F,Z+M*C)))}G<$&&(b*=-1,Je=N,N=H,H=Je,Je=$,$=G,G=Je,v in QG&&R.attr("cursor",Jd[v=QG[v]])),Dn?1:t>=n?0:NaN}function Y3(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function O$e(t){return(n,e)=>q3(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var J3=Math.sqrt(50),K3=Math.sqrt(10),X3=Math.sqrt(2);function eW(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=J3?10:o>=K3?5:o>=X3?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=J3?10:o>=K3?5:o>=X3?2:1)}function Q3(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=J3?r*=10:o>=K3?r*=5:o>=X3&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return tI.setTime(+o),nI.setTime(+s),t(tI),t(nI),Math.floor(e(tI,nI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var l2=ys(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});l2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ys(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):l2:null};const N$e=l2;var nW=ys(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+n*Kd)},function(t,n){return(n-t)/Kd},function(t){return t.getUTCSeconds()});const $y=nW;var iW=ys(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kd)},function(t,n){t.setTime(+t+n*Jl)},function(t,n){return(n-t)/Jl},function(t){return t.getMinutes()});const rW=iW;var oW=ys(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kd-t.getMinutes()*Jl)},function(t,n){t.setTime(+t+n*Xd)},function(t,n){return(n-t)/Xd},function(t){return t.getHours()});const sW=oW;var aW=ys(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Jl)/Rp,t=>t.getDate()-1);const lW=aW;function Lp(t){return ys(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*Jl)/Z3})}var iI=Lp(0),cW=(Lp(1),Lp(2),Lp(3),Lp(4),Lp(5),Lp(6),ys(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}));const uW=cW;var rI=ys(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});rI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ys(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const dW=rI;var hW=ys(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Jl)},function(t,n){return(n-t)/Jl},function(t){return t.getUTCMinutes()});const B$e=hW;var fW=ys(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Xd)},function(t,n){return(n-t)/Xd},function(t){return t.getUTCHours()});const V$e=fW;var pW=ys(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Rp},function(t){return t.getUTCDate()-1});const H$e=pW;function Fp(t){return ys(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/Z3})}var gW=Fp(0),mW=(Fp(1),Fp(2),Fp(3),Fp(4),Fp(5),Fp(6),ys(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}));const J$e=mW;var oI=ys(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});oI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ys(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const K$e=oI;function vW(t,n,e,i,r,o){const s=[[$y,1,Kd],[$y,5,5*Kd],[$y,15,15*Kd],[$y,30,30*Kd],[o,1,Jl],[o,5,5*Jl],[o,15,15*Jl],[o,30,30*Jl],[r,1,Xd],[r,3,3*Xd],[r,6,6*Xd],[r,12,12*Xd],[i,1,Rp],[i,2,2*Rp],[e,1,Z3],[n,1,tW],[n,3,3*tW],[t,1,eI]];function l(c,u,d){const h=Math.abs(u-c)/d,f=Y3(([,,m])=>m).right(s,h);if(f===s.length)return t.every(Q3(c/eI,u/eI,d));if(0===f)return N$e.every(Math.max(Q3(c,u,d),1));const[p,g]=s[h/s[f-1][2]0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return sI.setTime(+o),aI.setTime(+s),t(sI),t(aI),Math.floor(e(sI,aI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var yW=6e4,bW=6048e5;function $p(t){return Qd(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/bW})}var wW=$p(0),c2=$p(1),tv=($p(2),$p(3),$p(4)),xW=($p(5),$p(6),Qd(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const CW=xW;function Bp(t){return Qd(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*yW)/bW})}var SW=Bp(0),u2=Bp(1),nv=(Bp(2),Bp(3),Bp(4)),kW=(Bp(5),Bp(6),Qd(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*yW)/864e5},function(t){return t.getDate()-1}));const TW=kW;var lI=Qd(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});lI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Qd(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const By=lI;var cI=Qd(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});cI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Qd(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const Vy=cI;function uI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function dI(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Hy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var iv,VW,DW={"-":"",_:" ",0:"0"},_s=/^\s*\d+/,l6e=/^%/,c6e=/[\\^$*+?|[\]().{}]/g;function Vi(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function m6e(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function v6e(t,n,e){var i=_s.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function y6e(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function MW(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function _6e(t,n,e){var i=_s.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function OW(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function b6e(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function w6e(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function x6e(t,n,e){var i=_s.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function C6e(t,n,e){var i=_s.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function S6e(t,n,e){var i=l6e.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function k6e(t,n,e){var i=_s.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function T6e(t,n,e){var i=_s.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function IW(t,n){return Vi(t.getDate(),n,2)}function D6e(t,n){return Vi(t.getHours(),n,2)}function A6e(t,n){return Vi(t.getHours()%12||12,n,2)}function E6e(t,n){return Vi(1+TW.count(By(t),t),n,3)}function NW(t,n){return Vi(t.getMilliseconds(),n,3)}function M6e(t,n){return NW(t,n)+"000"}function O6e(t,n){return Vi(t.getMonth()+1,n,2)}function I6e(t,n){return Vi(t.getMinutes(),n,2)}function N6e(t,n){return Vi(t.getSeconds(),n,2)}function j6e(t){var n=t.getDay();return 0===n?7:n}function P6e(t,n){return Vi(SW.count(By(t)-1,t),n,2)}function jW(t){var n=t.getDay();return n>=4||0===n?nv(t):nv.ceil(t)}function R6e(t,n){return t=jW(t),Vi(nv.count(By(t),t)+(4===By(t).getDay()),n,2)}function L6e(t){return t.getDay()}function F6e(t,n){return Vi(u2.count(By(t)-1,t),n,2)}function $6e(t,n){return Vi(t.getFullYear()%100,n,2)}function B6e(t,n){return Vi((t=jW(t)).getFullYear()%100,n,2)}function V6e(t,n){return Vi(t.getFullYear()%1e4,n,4)}function H6e(t,n){var e=t.getDay();return Vi((t=e>=4||0===e?nv(t):nv.ceil(t)).getFullYear()%1e4,n,4)}function U6e(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Vi(n/60|0,"0",2)+Vi(n%60,"0",2)}function PW(t,n){return Vi(t.getUTCDate(),n,2)}function z6e(t,n){return Vi(t.getUTCHours(),n,2)}function G6e(t,n){return Vi(t.getUTCHours()%12||12,n,2)}function W6e(t,n){return Vi(1+CW.count(Vy(t),t),n,3)}function RW(t,n){return Vi(t.getUTCMilliseconds(),n,3)}function q6e(t,n){return RW(t,n)+"000"}function Y6e(t,n){return Vi(t.getUTCMonth()+1,n,2)}function J6e(t,n){return Vi(t.getUTCMinutes(),n,2)}function K6e(t,n){return Vi(t.getUTCSeconds(),n,2)}function X6e(t){var n=t.getUTCDay();return 0===n?7:n}function Q6e(t,n){return Vi(wW.count(Vy(t)-1,t),n,2)}function LW(t){var n=t.getUTCDay();return n>=4||0===n?tv(t):tv.ceil(t)}function Z6e(t,n){return t=LW(t),Vi(tv.count(Vy(t),t)+(4===Vy(t).getUTCDay()),n,2)}function e8e(t){return t.getUTCDay()}function t8e(t,n){return Vi(c2.count(Vy(t)-1,t),n,2)}function n8e(t,n){return Vi(t.getUTCFullYear()%100,n,2)}function i8e(t,n){return Vi((t=LW(t)).getUTCFullYear()%100,n,2)}function r8e(t,n){return Vi(t.getUTCFullYear()%1e4,n,4)}function o8e(t,n){var e=t.getUTCDay();return Vi((t=e>=4||0===e?tv(t):tv.ceil(t)).getUTCFullYear()%1e4,n,4)}function s8e(){return"+0000"}function FW(){return"%"}function $W(t){return+t}function BW(t){return Math.floor(+t/1e3)}function HW(t){return null===t?NaN:+t}!function u8e(t){iv=function a6e(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Uy(r),u=zy(r),d=Uy(o),h=zy(o),f=Uy(s),p=zy(s),g=Uy(a),m=zy(a),v=Uy(l),y=zy(l),b={a:function F(be){return s[be.getDay()]},A:function Z(be){return o[be.getDay()]},b:function D(be){return l[be.getMonth()]},B:function E(be){return a[be.getMonth()]},c:null,d:IW,e:IW,f:M6e,g:B6e,G:H6e,H:D6e,I:A6e,j:E6e,L:NW,m:O6e,M:I6e,p:function M(be){return r[+(be.getHours()>=12)]},q:function U(be){return 1+~~(be.getMonth()/3)},Q:$W,s:BW,S:N6e,u:j6e,U:P6e,V:R6e,w:L6e,W:F6e,x:null,X:null,y:$6e,Y:V6e,Z:U6e,"%":FW},C={a:function L(be){return s[be.getUTCDay()]},A:function X(be){return o[be.getUTCDay()]},b:function ne(be){return l[be.getUTCMonth()]},B:function ge(be){return a[be.getUTCMonth()]},c:null,d:PW,e:PW,f:q6e,g:i8e,G:o8e,H:z6e,I:G6e,j:W6e,L:RW,m:Y6e,M:J6e,p:function ae(be){return r[+(be.getUTCHours()>=12)]},q:function De(be){return 1+~~(be.getUTCMonth()/3)},Q:$W,s:BW,S:K6e,u:X6e,U:Q6e,V:Z6e,w:e8e,W:t8e,x:null,X:null,y:n8e,Y:r8e,Z:s8e,"%":FW},k={a:function $(be,Ie,R){var J=f.exec(Ie.slice(R));return J?(be.w=p[J[0].toLowerCase()],R+J[0].length):-1},A:function V(be,Ie,R){var J=d.exec(Ie.slice(R));return J?(be.w=h[J[0].toLowerCase()],R+J[0].length):-1},b:function z(be,Ie,R){var J=v.exec(Ie.slice(R));return J?(be.m=y[J[0].toLowerCase()],R+J[0].length):-1},B:function Y(be,Ie,R){var J=g.exec(Ie.slice(R));return J?(be.m=m[J[0].toLowerCase()],R+J[0].length):-1},c:function O(be,Ie,R){return B(be,n,Ie,R)},d:MW,e:MW,f:C6e,g:EW,G:AW,H:OW,I:OW,j:_6e,L:x6e,m:y6e,M:b6e,p:function N(be,Ie,R){var J=c.exec(Ie.slice(R));return J?(be.p=u[J[0].toLowerCase()],R+J[0].length):-1},q:v6e,Q:k6e,s:T6e,S:w6e,u:h6e,U:f6e,V:p6e,w:d6e,W:g6e,x:function H(be,Ie,R){return B(be,e,Ie,R)},X:function G(be,Ie,R){return B(be,i,Ie,R)},y:EW,Y:AW,Z:m6e,"%":S6e};function T(be,Ie){return function(R){var ye,Ue,Je,J=[],K=-1,pe=0,Te=be.length;for(R instanceof Date||(R=new Date(+R));++K53)return null;"w"in J||(J.w=1),"Z"in J?(Te=(pe=dI(Hy(J.y,0,1))).getUTCDay(),pe=Te>4||0===Te?c2.ceil(pe):c2(pe),pe=CW.offset(pe,7*(J.V-1)),J.y=pe.getUTCFullYear(),J.m=pe.getUTCMonth(),J.d=pe.getUTCDate()+(J.w+6)%7):(Te=(pe=uI(Hy(J.y,0,1))).getDay(),pe=Te>4||0===Te?u2.ceil(pe):u2(pe),pe=TW.offset(pe,7*(J.V-1)),J.y=pe.getFullYear(),J.m=pe.getMonth(),J.d=pe.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),Te="Z"in J?dI(Hy(J.y,0,1)).getUTCDay():uI(Hy(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+7*J.W-(Te+5)%7:J.w+7*J.U-(Te+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,dI(J)):uI(J)}}function B(be,Ie,R,J){for(var ye,Ue,K=0,pe=Ie.length,Te=R.length;K=Te)return-1;if(37===(ye=Ie.charCodeAt(K++))){if(ye=Ie.charAt(K++),!(Ue=k[ye in DW?Ie.charAt(K++):ye])||(J=Ue(be,R,J))<0)return-1}else if(ye!=R.charCodeAt(J++))return-1}return J}return b.x=T(e,b),b.X=T(i,b),b.c=T(n,b),C.x=T(e,C),C.X=T(i,C),C.c=T(n,C),{format:function(be){var Ie=T(be+="",b);return Ie.toString=function(){return be},Ie},parse:function(be){var Ie=j(be+="",!1);return Ie.toString=function(){return be},Ie},utcFormat:function(be){var Ie=T(be+="",C);return Ie.toString=function(){return be},Ie},utcParse:function(be){var Ie=j(be+="",!0);return Ie.toString=function(){return be},Ie}}}(t),VW=iv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const d8e=Y3(q3).right,zW=(Y3(HW),d8e);function h8e(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function p8e(t){return+t}var GW=[0,1];function rv(t){return t}function hI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function f8e(t){return function(){return t}}(isNaN(n)?NaN:.5)}function m8e(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?v8e:m8e,l=c=null,d}function d(h){return null==h||isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lc)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,p8e),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=h8e,u()},d.clamp=function(h){return arguments.length?(s=!!h||rv,u()):s!==rv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(rv,rv)}function Gy(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function b8e(t){return new Date(t)}function w8e(t){return t instanceof Date?+t:+new Date(+t)}function YW(t,n,e,i,r,o,s,a,l,c){var u=qW(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),C=c("%Y");function k(T){return(l(T)=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function d2(t){if(!(n=x8e.exec(t)))throw new Error("invalid format: "+t);var n;return new fI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function fI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function h2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function ov(t){return(t=h2(Math.abs(t)))?t[1]:NaN}function KW(t,n){var e=h2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}d2.prototype=fI.prototype,fI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const XW={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function C8e(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return KW(100*t,n)},r:KW,s:function A8e(t,n){var e=h2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(JW=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+h2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function QW(t){return t}var f2,pI,tq,ZW=Array.prototype.map,eq=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function j8e(t){var n=t.domain;return t.ticks=function(e){var i=n();return function I$e(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0){let l=Math.round(t/a),c=Math.round(n/a);for(l*an&&--c,s=new Array(o=c-l+1);++rn&&--c,s=new Array(o=c-l+1);++r0;){if((c=eW(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function gr(){var t=qW();return t.copy=function(){return WW(t,gr())},Gy.apply(t,arguments),j8e(t)}function nq(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(ZW.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?QW:function T8e(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(ZW.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=d2(d)).fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,y=d.comma,b=d.precision,C=d.trim,k=d.type;"n"===k?(y=!0,k="g"):XW[k]||(void 0===b&&(b=12),C=!0,k="g"),(m||"0"===h&&"="===f)&&(m=!0,h="0",f="=");var T="$"===g?e:"#"===g&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",j="$"===g?i:/[%p]/.test(k)?s:"",B=XW[k],N=/[defgprs%]/.test(k);function $(V){var O,H,G,z=T,Y=j;if("c"===k)Y=B(V)+Y,V="";else{var F=(V=+V)<0||1/V<0;if(V=isNaN(V)?l:B(Math.abs(V),b),C&&(V=function D8e(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(V)),F&&0==+V&&"+"!==p&&(F=!1),z=(F?"("===p?p:a:"-"===p||"("===p?"":p)+z,Y=("s"===k?eq[8+JW/3]:"")+Y+(F&&"("===p?")":""),N)for(O=-1,H=V.length;++O(G=V.charCodeAt(O))||G>57){Y=(46===G?r+V.slice(O+1):V.slice(O))+Y,V=V.slice(0,O);break}}y&&!m&&(V=n(V,1/0));var Z=z.length+V.length+Y.length,D=Z>1)+z+V+Y+D.slice(Z);break;default:V=D+z+V+Y}return o(V)}return b=void 0===b?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),$.toString=function(){return d+""},$}return{format:c,formatPrefix:function u(d,h){var f=c(((d=d2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(ov(h)/3))),g=Math.pow(10,-p),m=eq[8+p/3];return function(v){return f(g*v)+m}}}}(t),pI=f2.format,tq=f2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const iq=Symbol("implicit");function gI(){var t=new Map,n=[],e=[],i=iq;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==iq)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return gI(n,e).unknown(i)},Gy.apply(r,arguments),r}function Ls(){var o,s,t=gI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function oq(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],azp)if(Math.abs(u*a-l*c)>zp&&r){var h=e-o,f=i-s,p=a*a+l*l,g=h*h+f*f,m=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((mI-Math.acos((p+d-g)/(2*m*v)))/2),b=y/v,C=y/m;Math.abs(b-1)>zp&&(this._+="L"+(t+b*c)+","+(n+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>zp||Math.abs(this._y1-c)>zp)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%vI+vI),d>R8e?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>zp&&(this._+="A"+e+","+e+",0,"+ +(d>=mI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const _I=aq;function cr(t){return function(){return t}}function lq(t){return t[0]}function cq(t){return t[1]}function p2(){var t=lq,n=cq,e=cr(!0),i=null,r=Up,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=_I())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],b[f]);a.lineEnd(),a.areaEnd()}m&&(y[d]=+t(g,d,u),b[d]=+e(g,d,u),a.point(n?+n(g,d,u):y[d],i?+i(g,d,u):b[d]))}if(v)return a=null,v+""||null}function c(){return p2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:cr(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:cr(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:cr(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:cr(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:cr(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:cr(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:cr(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function uq(){}function bI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function dq(t,n){this._context=t,this._k=(1-n)/6}function hq(t,n){this._context=t,this._k=(1-n)/6}function fq(t){this._curve=t}function eBe(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function yq(t,n){var r,s,a,l,c,e=new Jy(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=bBe);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new Jy(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(_q)}function bBe(t){return t.children}function wBe(t){t.data=t.data.data}function _q(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Jy(t){this.data=t,this.depth=this.height=0,this.parent=null}dq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:bI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:bI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new dq(i,n)}return e.tension=function(i){return t(+i)},e}(0),hq.prototype={areaStart:uq,areaEnd:uq,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:bI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new hq(i,n)}return e.tension=function(i){return t(+i)},e}(0),function pq(t){function n(e){return new fq(t(e))}return n._curve=t,n}(Up),fq.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function iBe(t,n,e,i,r,o){for(var l,c,f,p,m,v,y,b,C,k,T,s=[],a=n.children,u=0,d=0,h=a.length,g=n.value;uy&&(y=c),T=m*m*k,(b=Math.max(y/T,T/v))>C){m-=c;break}C=b}s.push(l={value:m,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),Jy.prototype=yq.prototype={constructor:Jy,count:function aBe(){return this.eachAfter(sBe)},each:function lBe(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function dBe(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function hBe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function fBe(t){for(var n=this,e=function pBe(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function gBe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function mBe(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function vBe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function yBe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function _Be(){return yq(this).eachBefore(wBe)}};const TBe=["caretElm"];function DBe(t,n){}const ABe=function(t){return{model:t}};function EBe(t,n){if(1&t&&(_(0,"span"),q(1,DBe,0,0,"ng-template",5),w()),2&t){const e=P();x(1),S("ngTemplateOutlet",e.template)("ngTemplateOutletContext",ui(2,ABe,e.context))}}function MBe(t,n){1&t&&ie(0,"span",6),2&t&&S("innerHTML",P().title,kw)}function OBe(t,n){if(1&t&&(Ne(),Zf(),ie(0,"ngx-charts-scale-legend",4)),2&t){const e=P();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function IBe(t,n){if(1&t){const e=He();Ne(),Zf(),_(0,"ngx-charts-legend",5),se("labelClick",function(r){return we(e),xe(P().legendLabelClick.emit(r))})("labelActivate",function(r){return we(e),xe(P().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return we(e),xe(P().legendLabelDeactivate.emit(r))}),w()}if(2&t){const e=P();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const xq=["*"],NBe=["ngx-charts-axis-label",""],Cq=["ticksel"],jBe=["ngx-charts-x-axis-ticks",""];function PBe(t,n){if(1&t&&(Ne(),_(0,"g",3)(1,"title"),A(2),w(),_(3,"text",4),A(4),w()()),2&t){const e=n.$implicit,i=P();Re("transform",i.tickTransform(e)),x(2),ze(i.tickFormat(e)),x(1),oi("font-size","12px"),Re("text-anchor",i.textAnchor)("transform",i.textTransform),x(1),wt(" ",i.tickTrim(i.tickFormat(e))," ")}}function RBe(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"line",6),w()),2&t){const e=P(2);Re("transform",e.gridLineTransform()),x(1),Re("y1",-e.gridLineHeight)}}function LBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,RBe,2,2,"g",5),w()),2&t){const e=n.$implicit,i=P();Re("transform",i.tickTransform(e)),x(1),S("ngIf",i.showGridLines)}}const FBe=["ngx-charts-x-axis",""];function $Be(t,n){if(1&t){const e=He();Ne(),_(0,"g",2),se("dimensionsChanged",function(r){return we(e),xe(P().emitTicksHeight(r))}),w()}if(2&t){const e=P();S("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function BBe(t,n){if(1&t&&(Ne(),ie(0,"g",3)),2&t){const e=P();S("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const VBe=["ngx-charts-y-axis-ticks",""];function HBe(t,n){if(1&t&&(Ne(),_(0,"g",4)(1,"title"),A(2),w(),_(3,"text",5),A(4),w()()),2&t){const e=n.$implicit,i=P();Re("transform",i.transform(e)),x(2),ze(i.tickFormat(e)),x(1),oi("font-size","12px"),Re("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),x(1),wt(" ",i.tickTrim(i.tickFormat(e))," ")}}function UBe(t,n){if(1&t&&(Ne(),ie(0,"path",6)),2&t){const e=P();Re("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function zBe(t,n){1&t&&(Ne(),ie(0,"line",9)),2&t&&Re("x2",P(3).gridLineWidth)}function GBe(t,n){1&t&&(Ne(),ie(0,"line",9)),2&t&&Re("x2",-P(3).gridLineWidth)}function WBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,zBe,1,1,"line",8),q(2,GBe,1,1,"line",8),w()),2&t){const e=P(2);Re("transform",e.gridLineTransform()),x(1),S("ngIf","left"===e.orient),x(1),S("ngIf","right"===e.orient)}}function qBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,WBe,3,3,"g",7),w()),2&t){const e=n.$implicit,i=P();Re("transform",i.transform(e)),x(1),S("ngIf",i.showGridLines)}}function YBe(t,n){if(1&t&&(Ne(),_(0,"g")(1,"title"),A(2),w(),_(3,"text",11),A(4),w()()),2&t){const e=P(2).$implicit,i=P();x(2),ze(i.tickTrim(i.tickFormat(e.value))),x(1),Re("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),x(1),wt(" ",e.name," ")}}function JBe(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"line",10),q(2,YBe,5,6,"g",7),w()),2&t){const e=P().$implicit,i=P();Re("transform",i.transform(e.value)),x(1),Re("x2",i.gridLineWidth)("transform",i.gridLineTransform()),x(1),S("ngIf",i.showRefLabels)}}function KBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,JBe,3,4,"g",7),w()),2&t){const e=P();x(1),S("ngIf",e.showRefLines)}}const XBe=["ngx-charts-y-axis",""];function QBe(t,n){if(1&t){const e=He();Ne(),_(0,"g",2),se("dimensionsChanged",function(r){return we(e),xe(P().emitTicksWidth(r))}),w()}if(2&t){const e=P();S("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function ZBe(t,n){if(1&t&&(Ne(),ie(0,"g",3)),2&t){const e=P();S("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const e7e=["ngx-charts-circle-series",""];function t7e(t,n){if(1&t&&(Ne(),ie(0,"rect",4)),2&t){const e=P(2);S("@animationState","active"),Re("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const n7e=function(t){return{name:t}};function i7e(t,n){if(1&t){const e=He();Ne(),_(0,"g")(1,"defs"),ie(2,"g",1),w(),q(3,t7e,1,6,"rect",2),_(4,"g",3),se("select",function(){we(e);const r=P();return xe(r.onClick(r.circle.data))})("activate",function(){return we(e),xe(P().activateCircle())})("deactivate",function(){return we(e),xe(P().deactivateCircle())}),w()()}if(2&t){const e=P();x(2),S("name",e.gradientId)("stops",e.circle.gradientStops),x(1),S("ngIf",e.barVisible&&"standard"===e.type),x(1),Ft("active",e.isActive(ui(18,n7e,e.circle.seriesName))),S("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const r7e=["ngx-charts-circle",""],l7e=["ngx-charts-svg-linear-gradient",""];function c7e(t,n){if(1&t&&(Ne(),ie(0,"stop")),2&t){const e=n.$implicit;oi("stop-color",e.color)("stop-opacity",e.opacity),Re("offset",e.offset+"%")}}const h7e=["ngx-charts-area",""];function f7e(t,n){if(1&t&&(Ne(),_(0,"defs"),ie(1,"g",2),w()),2&t){const e=P();x(1),S("name",e.gradientId)("stops",e.gradientStops)}}const g7e=["tooltipAnchor"],m7e=["ngx-charts-tooltip-area",""];function v7e(t,n){if(1&t&&(_(0,"div",6),ie(1,"span",7),A(2),w()),2&t){const e=n.$implicit,i=P(2);x(1),oi("background-color",e.color),x(1),wt(" ",i.getToolTipText(e)," ")}}function y7e(t,n){if(1&t&&(Ne(),Zf(),_(0,"div",4),q(1,v7e,3,3,"div",5),w()),2&t){const e=n.model;x(1),S("ngForOf",e)}}const _7e=["ngx-charts-timeline",""];function b7e(t,n){if(1&t&&(_(0,"header",4)(1,"span",5),A(2),w()()),2&t){const e=P();x(2),ze(e.title)}}function w7e(t,n){if(1&t){const e=He();_(0,"li",6)(1,"ngx-charts-legend-entry",7),se("select",function(r){return we(e),xe(P().labelClick.emit(r))})("activate",function(r){return we(e),xe(P().activate(r))})("deactivate",function(r){return we(e),xe(P().deactivate(r))}),w()()}if(2&t){const e=n.$implicit,i=P();x(1),S("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const $o=["tooltipTemplate"],_2=["seriesTooltipTemplate"],kr=function(t,n){return[t,n]},U9e=["ngx-charts-line",""];function z9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",7),se("dimensionsChanged",function(r){return we(e),xe(P().updateXAxisHeight(r))}),w()}if(2&t){const e=P();S("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function G9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",8),se("dimensionsChanged",function(r){return we(e),xe(P().updateYAxisWidth(r))}),w()}if(2&t){const e=P();S("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function W9e(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"g",9),w()),2&t){const e=n.$implicit,i=P();S("@animationState","active"),x(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function q9e(t,n){if(1&t){const e=He();Ne(),_(0,"g")(1,"g",13),se("select",function(r){return we(e),xe(P(2).onClick(r))})("activate",function(r){return we(e),xe(P(2).onActivate(r))})("deactivate",function(r){return we(e),xe(P(2).onDeactivate(r))}),w()()}if(2&t){const e=n.$implicit,i=P(2);x(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function Y9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",10),se("mouseleave",function(){return we(e),xe(P().hideCircles())}),_(1,"g",11),se("hover",function(r){return we(e),xe(P().updateHoveredVertical(r))}),w(),q(2,q9e,2,9,"g",12),w()}if(2&t){const e=P();x(1),S("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),x(1),S("ngForOf",e.results)}}function J9e(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"g",15),w()),2&t){const e=n.$implicit,i=P(2);x(1),S("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function K9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",14),se("onDomainChange",function(r){return we(e),xe(P().updateDomain(r))}),q(1,J9e,2,8,"g",4),w()}if(2&t){const e=P();S("results",e.results)("view",Ni(10,kr,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),Re("transform",e.timelineTransform),x(1),S("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const X9e=["ngx-charts-line-series",""];function Q9e(t,n){if(1&t&&(Ne(),ie(0,"g",4)),2&t){const e=P();S("name",e.gradientId)("stops",e.gradientStops)}}function Z9e(t,n){if(1&t&&(Ne(),ie(0,"g",5)),2&t){const e=P();Ft("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),S("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let Dq=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function YVe(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new BLe(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Jz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(Ve(Pd),Ve(im),Ve(fs))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function JVe(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function KVe(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:JVe(o.value,t,n)}),this[r]}}}}var Bo=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(Bo||(Bo={})),Bo))();const Jh=7;function Aq(t,n,e){return"top"===e?t.top-Jh:"bottom"===e?t.top+t.height-n.height+Jh:"center"===e?t.top+t.height/2-n.height/2:void 0}function Eq(t,n,e){return"left"===e?t.left-Jh:"right"===e?t.left+t.width-n.width+Jh:"center"===e?t.left+t.width/2-n.width/2:void 0}class xl{static calculateVerticalAlignment(n,e,i){let r=Aq(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Jh),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Jh),"center"===r&&(o=e.height/2-i.height/2);const s=Aq(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=Eq(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Jh),"right"===r&&(o=e.width-n.width/2-i.width/2-Jh),"center"===r&&(o=e.width/2-i.width/2);const s=Eq(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===Bo.right?(a=-7,s=xl.calculateVerticalCaret(i,e,r,o)):n===Bo.left?(a=e.width,s=xl.calculateVerticalCaret(i,e,r,o)):n===Bo.top?(s=e.height,a=xl.calculateHorizontalCaret(i,e,r,o)):n===Bo.bottom&&(s=-7,a=xl.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===Bo.right?(a=i.left+i.width+r,s=xl.calculateVerticalAlignment(i,e,o)):n===Bo.left?(a=i.left-e.width-r,s=xl.calculateVerticalAlignment(i,e,o)):n===Bo.top?(s=i.top-e.height-r,a=xl.calculateHorizontalAlignment(i,e,o)):n===Bo.bottom&&(s=i.top+i.height+r,a=xl.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(xl.shouldFlip(i,e,n,r)){if(n===Bo.right)return Bo.left;if(n===Bo.left)return Bo.right;if(n===Bo.top)return Bo.bottom;if(n===Bo.bottom)return Bo.top}return n}}let XVe=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=xl.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=xl.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=xl.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs))},t.\u0275cmp=nt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&xr(TBe,5),2&e){let r;kt(r=Tt())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&se("resize",function(){return i.onWindowResize()},0,S$),2&e&&Ou(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(_(0,"div"),ie(1,"span",0,1),_(3,"div",2),q(4,EBe,2,4,"span",3),q(5,MBe,1,1,"span",4),w()()),2&e&&(x(1),function Q6(t,n,e){kc(al,Iu,dm(st(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),S("hidden",!i.showCaret),x(3),S("ngIf",!i.title),x(1),S("ngIf",i.title))},dependencies:[Ct,Ac],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function Kz(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o}([KVe(100)],t.prototype,"onWindowResize",null),t})();class QVe{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let CI=(()=>{class t extends QVe{constructor(e){super(e),this.type=XVe}}return t.\u0275fac=function(e){return new(e||t)(Ve(Dq))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),Zr=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Oe,this.legendLabelActivate=new Oe,this.legendLabelDeactivate=new Oe}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Qi([CI]),Kt],ngContentSelectors:xq,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(kh(),_(0,"div",0),Ne(),_(1,"svg",1),Th(2),w(),q(3,OBe,1,5,"ngx-charts-scale-legend",2),q(4,IBe,1,7,"ngx-charts-legend",3),w()),2&e&&(oi("width",i.view[0],"px"),S("@animationState","active")("@.disabled",!i.animations),x(1),Re("width",i.chartWidth)("height",i.view[1]),x(2),S("ngIf",i.showLegend&&"scaleLegend"===i.legendType),x(1),S("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[Ct,Vq,Uq]},encapsulation:2,data:{animation:[ta("animationState",[Os(":enter",[Ai({opacity:0}),Ms("500ms 100ms",Ai({opacity:1}))])])]},changeDetection:0}),t})(),ZVe=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new Oe,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(si))},t.\u0275dir=pt({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),eo=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Oe}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new ZVe(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new d4e(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(si),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Kt],decls:1,vars:0,template:function(e,i){1&e&&ie(0,"div")},encapsulation:2}),t})(),SI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Kt],attrs:NBe,decls:2,vars:6,template:function(e,i){1&e&&(Ne(),_(0,"text"),A(1),w()),2&e&&(Re("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),x(1),wt(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Kh(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function Mq(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Oe,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=Mq(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Kh(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xr(Cq,5),2&e){let r;kt(r=Tt())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:jBe,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(Ne(),_(0,"g",null,0),q(2,PBe,5,7,"g",1),w(),q(3,LBe,2,2,"g",2)),2&e&&(x(2),S("ngForOf",i.ticks),x(1),S("ngForOf",i.ticks))},dependencies:[Bt,Ct],encapsulation:2,changeDetection:0}),t})(),za=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Oe,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&xr(Oq,5),2&e){let r;kt(r=Tt())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:FBe,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(Ne(),_(0,"g"),q(1,$Be,1,12,"g",0),q(2,BBe,1,5,"g",1),w()),2&e&&(Re("class",i.xAxisClassName)("transform",i.transform),x(1),S("ngIf",i.xScale),x(1),S("ngIf",i.showLabel))},dependencies:[Ct,SI,Oq],encapsulation:2,changeDetection:0}),t})();let Iq=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Oe,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function Zd(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=Mq(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Kh(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xr(Cq,5),2&e){let r;kt(r=Tt())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:VBe,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(Ne(),_(0,"g",null,0),q(2,HBe,5,9,"g",1),w(),q(3,UBe,1,2,"path",2),q(4,qBe,2,2,"g",3),q(5,KBe,2,1,"g",3)),2&e&&(x(2),S("ngForOf",i.ticks),x(1),S("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),x(1),S("ngForOf",i.ticks),x(1),S("ngForOf",i.referenceLines))},dependencies:[Bt,Ct],encapsulation:2,changeDetection:0}),t})(),_a=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Oe,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&xr(Iq,5),2&e){let r;kt(r=Tt())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:XBe,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(Ne(),_(0,"g"),q(1,QBe,1,14,"g",0),q(2,ZBe,1,5,"g",1),w()),2&e&&(Re("class",i.yAxisClassName)("transform",i.transform),x(1),S("ngIf",i.yScale),x(1),S("ngIf",i.showLabel))},dependencies:[Ct,SI,Iq],encapsulation:2,changeDetection:0}),t})(),Nq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Mh]}),t})();var b2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(b2||(b2={})),b2))(),w2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(w2||(w2={})),w2))(),Xh=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}(Xh||(Xh={})),Xh))();let $c=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=Bo.top,this.tooltipAlignment=w2.center,this.tooltipType=b2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=Xh.all,this.tooltipImmediateExit=!1,this.show=new Oe,this.hide=new Oe}get listensForFocus(){return this.tooltipShowEvent===Xh.all||this.tooltipShowEvent===Xh.focus}get listensForHover(){return this.tooltipShowEvent===Xh.all||this.tooltipShowEvent===Xh.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(te(CI),te($a),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&se("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),jq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[Dq,CI],imports:[Mh]}),t})();function Fs(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function os(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const Pq={};function ba(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,Pq[t]?ba():(Pq[t]=!0,t)}let AI,Ky=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Oe,this.activate=new Oe,this.deactivate=new Oe,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+ba().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Fs(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${os(r)} \u2022 ${os(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Kt],attrs:e7e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&q(0,i7e,5,20,"g",0),2&e&&S("ngIf",i.circle)},dependencies:function(){return[Ct,$c,x2,Wp]},encapsulation:2,data:{animation:[ta("animationState",[Os(":enter",[Ai({opacity:0}),Ms(250,Ai({opacity:1}))])])]},changeDetection:0}),t})(),x2=(()=>{class t{constructor(){this.select=new Oe,this.activate=new Oe,this.deactivate=new Oe}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&se("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Kt],attrs:r7e,decls:1,vars:8,template:function(e,i){1&e&&(Ne(),ie(0,"circle")),2&e&&Re("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),Wp=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Kt],attrs:l7e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(Ne(),_(0,"linearGradient",0),q(1,c7e,1,5,"stop",1),w()),2&e&&(S("id",i.name),Re("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),x(1),S("ngForOf",i.stops))},dependencies:[Bt],encapsulation:2,changeDetection:0}),t})(),DI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Oe,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+ba().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=vs(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Kt],attrs:h7e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(q(0,f7e,2,2,"defs",0),Ne(),ie(1,"path",1)),2&e&&(S("ngIf",i.gradient),x(1),oi("opacity",i.opacity),Re("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[Ct,Wp],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?AI=window:typeof global<"u"&&(AI=global);const Bq=AI.MouseEvent;function EI(t,n=!1,e=!0){if("function"==typeof Bq)return new Bq(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let Xy=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Oe}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=EI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=EI("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=EI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&xr(g7e,5),2&e){let r;kt(r=Tt())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:m7e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","'auto'",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(Ne(),_(0,"g")(1,"rect",0),se("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),w(),q(2,y7e,2,1,"ng-template",null,1,lo),ie(4,"rect",2,3),w()),2&e){const r=As(3);x(1),Re("x",0)("width",i.dims.width)("height",i.dims.height),x(3),oi("opacity",i.anchorOpacity)("pointer-events","none"),S("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),Re("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[Bt,$c],encapsulation:2,data:{animation:[ta("animationState",[Os("inactive => active",[Ai({opacity:0}),Ms(250,Ai({opacity:.7}))]),Os("active => inactive",[Ai({opacity:.7}),Ms(250,Ai({opacity:0}))])])]},changeDetection:0}),t})(),Qy=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new Oe,this.onDomainChange=new Oe,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+ba().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=Vp().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=gr().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=Hp().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function M$e(){return W3(s2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=($i.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),vs(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),vs(this.element).select(".brush").call(this.brush),vs(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Kt],attrs:_7e,ngContentSelectors:xq,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(kh(),Ne(),_(0,"g",0)(1,"filter"),ie(2,"feColorMatrix",1),w(),_(3,"g",2),Th(4),w(),ie(5,"rect",3)(6,"g",4),w()),2&e&&(Re("transform",i.transform),x(1),Re("id",i.filterId),x(4),Re("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),Vq=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new Oe,this.labelActivate=new Oe,this.labelDeactivate=new Oe,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Fs(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(te(jo))},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Kt],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(_(0,"div"),q(1,b7e,3,1,"header",0),_(2,"div",1)(3,"ul",2),q(4,w7e,2,4,"li",3),w()()()),2&e&&(oi("width",i.width,"px"),x(1),S("ngIf",(null==i.title?null:i.title.length)>0),x(2),oi("max-height",i.height-45,"px"),Ft("horizontal-legend",i.horizontal),x(1),S("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[Bt,Ct,Hq]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),Hq=(()=>{class t{constructor(){this.isActive=!1,this.select=new Oe,this.activate=new Oe,this.deactivate=new Oe,this.toggle=new Oe}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&se("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(_(0,"span",0),se("click",function(){return i.select.emit(i.formattedLabel)}),_(1,"span",1),se("click",function(){return i.toggle.emit(i.formattedLabel)}),w(),_(2,"span",2),A(3),w()()),2&e&&(Ft("active",i.isActive),S("title",i.formattedLabel),x(1),oi("background-color",i.color),x(2),wt(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),Uq=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(te(Z7))},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Kt],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1)(2,"span"),A(3),w()(),ie(4,"div",2),_(5,"div",1)(6,"span"),A(7),w()()()),2&e&&(oi("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),Ft("horizontal-legend",i.horizontal),x(3),ze(i.valueRange[1].toLocaleString()),x(1),oi("background",i.gradient),x(3),ze(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Bc=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Mh,Nq,jq,Mh,Nq,jq]}),t})();let Gq=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class fo{constructor(n,e,i,r){"string"==typeof n&&(n=Gq.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=Gq.find(o=>o.name===n)),"quantile"===e)r=oq().range(n.domain).domain(i);else if("ordinal"===e)r=gI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=nq(0,1,1/o.length);r=gr().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=gr().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=gr().domain(this.domain).range([0,1]),r=Ls().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let eHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),qq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),nHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),oHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),Kq=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new Oe,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=vs(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Kt],attrs:U9e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(Ne(),ie(0,"path",0)),2&e&&(S("@animationState","active"),Re("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[ta("animationState",[Os(":enter",[Ai({strokeDasharray:2e3,strokeDashoffset:2e3}),Ms(1e3,Ai({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),sHe=(()=>{class t extends eo{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=Up,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Oe,this.deactivate=new Oe,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function ho({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,g=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(g-=5,g-=o,a&&(g-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),g=Math.max(0,g),{width:Math.floor(p),height:Math.floor(g),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+ba().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function S2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Qh(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=Vp().range([0,i]).domain(e):"linear"===this.scaleType?(r=gr().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=Hp().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=gr().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new fo(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,$o,5),Cn(r,_2,5)),2&e){let o;kt(o=Tt())&&(i.tooltipTemplate=o.first),kt(o=Tt())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&se("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[yn],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(_(0,"ngx-charts-chart",0),se("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),Ne(),_(1,"defs")(2,"clipPath"),ie(3,"rect"),w()(),_(4,"g",1),q(5,z9e,1,10,"g",2),q(6,G9e,1,12,"g",3),_(7,"g"),q(8,W9e,2,11,"g",4),q(9,Y9e,3,9,"g",5),w()(),q(10,K9e,2,13,"g",6),w()),2&e&&(S("view",Ni(17,kr,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),x(2),Re("id",i.clipPathId),x(1),Re("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),x(1),Re("transform",i.transform),x(1),S("ngIf",i.xAxis),x(1),S("ngIf",i.yAxis),x(1),Re("clip-path",i.clipPath),x(1),S("ngForOf",i.results)("ngForTrackBy",i.trackBy),x(1),S("ngIf",!i.tooltipDisabled),x(1),S("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[Bt,Ct,za,_a,Xy,Zr,Ky,Qy,aHe]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[ta("animationState",[Os(":leave",[Ai({opacity:1}),Ms(500,Ai({opacity:0}))])])]},changeDetection:0}),t})(),aHe=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return p2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return sv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return sv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function MI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function II(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function OI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+ba().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Kt],attrs:X9e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(Ne(),_(0,"g")(1,"defs"),q(2,Q9e,1,2,"g",0),w(),ie(3,"g",1)(4,"g",2),q(5,Z9e,1,9,"g",3),w()),2&e&&(x(2),S("ngIf",i.hasGradient),x(1),Ft("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),x(1),Ft("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),x(1),S("ngIf",i.hasRange))},dependencies:[Ct,DI,Wp,Kq],encapsulation:2,changeDetection:0}),t})(),Xq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})();Math;let RI=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),hHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc,RI,Xq]}),t})(),mHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),_He=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),xHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc,RI,qq]}),t})(),SHe=(()=>{class t{constructor(){!function CHe(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc,eHe,qq,nHe,oHe,Xq,hHe,mHe,RI,_He,xHe]}),t})();function kHe(t,n){if(1&t&&(_(0,"ngb-alert",19),ie(1,"img",20),_(2,"h6",21),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function THe(t,n){1&t&&ie(0,"img",31)}function DHe(t,n){1&t&&ie(0,"img",32)}function AHe(t,n){1&t&&ie(0,"img",33)}function EHe(t,n){1&t&&ie(0,"img",34)}function MHe(t,n){if(1&t&&(_(0,"tr",24)(1,"td"),ul(2,25),q(3,THe,1,0,"img",26),q(4,DHe,1,0,"img",27),q(5,AHe,1,0,"img",28),q(6,EHe,1,0,"img",29),dl(),_(7,"span"),A(8),w()(),_(9,"td"),A(10),_(11,"span",30),A(12),w()(),_(13,"td"),A(14),_(15,"span",30),A(16),w()(),_(17,"td"),A(18),_(19,"span",30),A(20),w()(),_(21,"td"),A(22),_(23,"span",30),A(24),w()()()),2&t){const e=n.$implicit,i=P(2);x(2),S("ngSwitch",e.health),x(1),S("ngSwitchCase",0),x(1),S("ngSwitchCase",1),x(1),S("ngSwitchCase",2),x(1),S("ngSwitchCase",3),x(2),ze(e.name),x(2),wt("",e.session_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxSessionCount()-e.session_count," delta)"),x(2),wt("",e.presence_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxPresenceCount()-e.presence_count," delta)"),x(2),wt("",e.match_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxMatchCount()-e.match_count," delta)"),x(2),wt("",e.goroutine_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function OHe(t,n){if(1&t&&(_(0,"tbody"),q(1,MHe,25,18,"tr",22),_(2,"tr",3),ie(3,"td",23),_(4,"th",3),A(5),w(),_(6,"th",3),A(7),w(),_(8,"th",3),A(9),w(),_(10,"th",3),A(11),w()()()),2&t){const e=P();x(1),S("ngForOf",e.statusData.nodes),x(4),ze(e.getTotalSessionCount()),x(2),ze(e.getMaxPresenceCount()),x(2),ze(e.getTotalMatchCount()),x(2),ze(e.getTotalGorountineCount())}}function IHe(t,n){if(1&t&&(_(0,"option",35),A(1),w()),2&t){const e=n.$implicit,i=P();Nd("value",e),x(1),ze(i.ranges[e])}}const D2=function(t){return{"background-color":t}};function NHe(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function jHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,NHe,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function PHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",37),q(2,jHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function RHe(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function LHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,RHe,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function FHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",43),q(2,LHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function $He(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function BHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,$He,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function VHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",44),q(2,BHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function HHe(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function UHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,HHe,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function zHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",45),q(2,UHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let GHe=(()=>{class t{route;consoleService;formBuilder;error="";showDelta=!1;statusData;rateGraphData=[];latencyGraphData=[];inputGraphData=[];outputGraphData=[];rangeForm;ranges={1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"};rangesKeys=Object.keys(this.ranges).map(e=>+e);colorScheme={domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]};samples=60;refreshTimer;$refreshTimer;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=fy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(g=>g.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=fy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn),te(js))};static \u0275cmp=nt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Status"),w(),q(2,kHe,4,2,"ngb-alert",1),_(3,"table",2),se("mouseover",function(){return r.showDelta=!0})("mouseout",function(){return r.showDelta=!1}),_(4,"thead",3)(5,"tr")(6,"th",4),A(7,"Node name"),w(),_(8,"th",4),A(9,"Sessions"),w(),_(10,"th",4),A(11,"Presences"),w(),_(12,"th",4),A(13,"Authoritative Matches"),w(),_(14,"th",4),A(15,"Goroutines"),w()()(),q(16,OHe,12,5,"tbody",5),w(),_(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),A(21,"View:"),w(),_(22,"div",9)(23,"select",10),se("change",function(s){return r.setRange(s)}),q(24,IHe,2,2,"option",11),aE(25,"sortNumbers"),w()()()()(),_(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),A(30,"Processing Latency"),w(),_(31,"small"),A(32," (ms)"),w()()(),_(33,"div",13)(34,"div",14)(35,"h5",15),A(36,"Rate"),w(),_(37,"small"),A(38," (rpc/s)"),w()()()(),_(39,"div",12)(40,"div",16),q(41,PHe,4,12,"div",17),w(),_(42,"div",16),q(43,FHe,4,12,"div",17),w()(),_(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),A(48,"Input"),w(),_(49,"small"),A(50," (kb/s)"),w()()(),_(51,"div",13)(52,"div",14)(53,"h5",15),A(54,"Output"),w(),_(55,"small"),A(56," (kb/s)"),w()()()(),_(57,"div",12)(58,"div",16),q(59,VHe,4,12,"div",17),w(),_(60,"div",16),q(61,zHe,4,12,"div",17),w()()),2&i&&(x(2),S("ngIf",r.error),x(14),S("ngIf",r.statusData),x(1),S("formGroup",r.rangeForm),x(7),S("ngForOf",lE(25,8,r.rangesKeys)),x(17),S("ngIf",r.latencyGraphData.length>0),x(2),S("ngIf",r.rateGraphData.length>0),x(16),S("ngIf",r.inputGraphData.length>0),x(2),S("ngIf",r.outputGraphData.length>0))},dependencies:function(){return[Bt,Ct,x7,dx,b7,pr,Rc,wLe,sHe,ms,_C,bC,Fm,ps,gs,Lo,ns,qHe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})}return t})(),WHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(_o(r=>$t(r.nodes.map(o=>o.name)))).pipe(Va(r=>(e.data={...e.data,error:r},$t([]))))}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),qHe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}static \u0275fac=function(i){return new(i||t)};static \u0275pipe=da({name:"sortNumbers",type:t,pure:!1})}return t})();var ss_isNegativeZero=function QHe(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t};function oY(t,n){var e="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(e+='in "'+t.mark.name+'" '),e+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(e+="\n\n"+t.mark.snippet),i+" "+e):i}function Zy(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=oY(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Zy.prototype=Object.create(Error.prototype)).constructor=Zy,Zy.prototype.toString=function(n){return this.name+": "+oY(this,n)};var wa=Zy,aUe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],lUe=["scalar","sequence","mapping"],$s=function uUe(t,n){if(n=n||{},Object.keys(n).forEach(function(e){if(-1===aUe.indexOf(e))throw new wa('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(e){return e},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=function cUe(t){var n={};return null!==t&&Object.keys(t).forEach(function(e){t[e].forEach(function(i){n[String(i)]=e})}),n}(n.styleAliases||null),-1===lUe.indexOf(this.kind))throw new wa('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function sY(t,n){var e=[];return t[n].forEach(function(i){var r=e.length;e.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(r=s)}),e[r]=i}),e}function $I(t){return this.extend(t)}$I.prototype.extend=function(n){var e=[],i=[];if(n instanceof $s)i.push(n);else if(Array.isArray(n))i=i.concat(n);else{if(!n||!Array.isArray(n.implicit)&&!Array.isArray(n.explicit))throw new wa("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.implicit&&(e=e.concat(n.implicit)),n.explicit&&(i=i.concat(n.explicit))}e.forEach(function(o){if(!(o instanceof $s))throw new wa("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&"scalar"!==o.loadKind)throw new wa("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new wa("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof $s))throw new wa("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create($I.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=sY(r,"implicit"),r.compiledExplicit=sY(r,"explicit"),r.compiledTypeMap=function dUe(){var n,e,t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(r){r.multi?(t.multi[r.kind].push(r),t.multi.fallback.push(r)):t[r.kind][r.tag]=t.fallback[r.tag]=r}for(n=0,e=arguments.length;n=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),SUe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),DUe=/^[-+]?[0-9]+e/,gY=new $s("tag:yaml.org,2002:float",{kind:"scalar",resolve:function kUe(t){return!(null===t||!SUe.test(t)||"_"===t[t.length-1])},construct:function TUe(t){var n,e;return e="-"===(n=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),".inf"===n?1===e?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:e*parseFloat(n,10)},predicate:function EUe(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ss_isNegativeZero(t))},represent:function AUe(t,n){var e;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ss_isNegativeZero(t))return"-0.0";return e=t.toString(10),DUe.test(e)?e.replace("e",".e"):e},defaultStyle:"lowercase"}),vY=dY.extend({implicit:[hY,fY,pY,gY]}),yY=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_Y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),bY=new $s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function MUe(t){return null!==t&&(null!==yY.exec(t)||null!==_Y.exec(t))},construct:function OUe(t){var n,e,i,r,o,s,a,h,l=0,c=null;if(null===(n=yY.exec(t))&&(n=_Y.exec(t)),null===n)throw new Error("Date resolve error");if(e=+n[1],i=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(e,i,r));if(o=+n[4],s=+n[5],a=+n[6],n[7]){for(l=n[7].slice(0,3);l.length<3;)l+="0";l=+l}return n[9]&&(c=6e4*(60*+n[10]+ +(n[11]||0)),"-"===n[9]&&(c=-c)),h=new Date(Date.UTC(e,i,r,o,s,a,l)),c&&h.setTime(h.getTime()-c),h},instanceOf:Date,represent:function IUe(t){return t.toISOString()}}),wY=new $s("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function NUe(t){return"<<"===t||null===t}}),BI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",xY=new $s("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function jUe(t){if(null===t)return!1;var n,e,i=0,r=t.length,o=BI;for(e=0;e64)){if(n<0)return!1;i+=6}return i%8==0},construct:function PUe(t){var n,e,i=t.replace(/[\r\n=]/g,""),r=i.length,o=BI,s=0,a=[];for(n=0;n>16&255),a.push(s>>8&255),a.push(255&s)),s=s<<6|o.indexOf(i.charAt(n));return 0==(e=r%4*6)?(a.push(s>>16&255),a.push(s>>8&255),a.push(255&s)):18===e?(a.push(s>>10&255),a.push(s>>2&255)):12===e&&a.push(s>>4&255),new Uint8Array(a)},predicate:function LUe(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function RUe(t){var i,r,n="",e=0,o=t.length,s=BI;for(i=0;i>18&63],n+=s[e>>12&63],n+=s[e>>6&63],n+=s[63&e]),e=(e<<8)+t[i];return 0==(r=o%3)?(n+=s[e>>18&63],n+=s[e>>12&63],n+=s[e>>6&63],n+=s[63&e]):2===r?(n+=s[e>>10&63],n+=s[e>>4&63],n+=s[e<<2&63],n+=s[64]):1===r&&(n+=s[e>>2&63],n+=s[e<<4&63],n+=s[64],n+=s[64]),n}}),FUe=Object.prototype.hasOwnProperty,$Ue=Object.prototype.toString,CY=new $s("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function BUe(t){if(null===t)return!0;var e,i,r,o,s,n=[],a=t;for(e=0,i=a.length;e{class t{confirmed=new Oe;canceled=new Oe;title="Delete Confirmation";message="Are you sure you want to delete this item?";confirmDeleteForm;closeModal(){this.canceled.emit()}cancel(){this.canceled.emit()}confirm(){(!this.confirmDeleteForm||this.confirmDeleteForm.valid)&&this.confirmed.emit()}get f(){return this.confirmDeleteForm.controls}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=nt({type:t,selectors:[["app-delete-confirm-dialog"]],inputs:{confirmDeleteForm:"confirmDeleteForm"},outputs:{confirmed:"confirmed",canceled:"canceled"},decls:14,vars:3,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","Close","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["class","d-flex flex-column justify-content-center",4,"ngIf"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"click"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],["class","mt-2",4,"ngIf"],["type","text","class","form-control","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",3,"ngClass",4,"ngIf"],[1,"mt-2"],["type","number","value","30","min","0",2,"width","80px",3,"formControlName"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h4",1),A(2),w(),_(3,"button",2),se("click",function(){return r.closeModal()}),_(4,"span",3),A(5,"\xd7"),w()()(),_(6,"div",4),A(7),q(8,gGe,4,3,"div",5),w(),_(9,"div",6)(10,"button",7),se("click",function(){return r.cancel()}),A(11,"Cancel"),w(),_(12,"button",8),se("click",function(){return r.confirm()}),A(13,"Delete"),w()()),2&i&&(x(2),ze(r.title),x(5),wt(" ",r.message," "),x(1),S("ngIf",r.confirmDeleteForm))},dependencies:[dp,Ct,ms,ts,SO,ps,gs,MO,Lo,ns]})}return t})(),Wa=(()=>{class t{modalService;constructor(e){this.modalService=e}openDeleteConfirmModal(e,i=null,r="",o=""){const a=this.modalService.open(mGe,{backdrop:!1,centered:!0});i&&(a.componentInstance.confirmDeleteForm=i),r&&(a.componentInstance.title=r),o&&(a.componentInstance.message=o),a.componentInstance.confirmed.subscribe(()=>{e(i?.value),a.close()}),a.componentInstance.canceled.subscribe(()=>{a.close()})}static \u0275fac=function(i){return new(i||t)(Ve(zC))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const vGe=["fileSelector"];function yGe(t,n){if(1&t&&(_(0,"div",8),A(1),w()),2&t){const e=P(2);x(1),ze(e.dropZoneLabel)}}function _Ge(t,n){if(1&t){const e=He();_(0,"div")(1,"input",9),se("click",function(r){return we(e),xe(P(2).openFileSelector(r))}),w()()}if(2&t){const e=P(2);x(1),Nd("value",e.browseBtnLabel),S("className",e.browseBtnClassName)}}function bGe(t,n){if(1&t&&(q(0,yGe,2,1,"div",6),q(1,_Ge,2,2,"div",7)),2&t){const e=P();S("ngIf",e.dropZoneLabel),x(1),S("ngIf",e.showBrowseBtn)}}function wGe(t,n){}const xGe=function(t){return{openFileSelector:t}};class j2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let aJ=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),lJ=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Oe,this.onFileOver=new Oe,this.onFileLeave=new Oe,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new j2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=fy(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new j2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new j2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(te(si),te(hs))},t.\u0275cmp=nt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,aJ,5,ir),2&e){let o;kt(o=Tt())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&xr(vGe,7),2&e){let r;kt(r=Tt())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(_(0,"div",0),se("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),_(1,"div",1)(2,"input",2,3),se("change",function(o){return i.uploadFiles(o)}),w(),q(4,bGe,2,2,"ng-template",null,4,lo),q(6,wGe,0,0,"ng-template",5),w()()),2&e){const r=As(5);Ft("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),S("className",i.dropZoneClassName),x(1),S("className",i.contentClassName),x(1),S("accept",i.accept)("multiple",i.multiple),Re("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),x(4),S("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",ui(13,xGe,i.openFileSelector))}},dependencies:[Ct,Ac],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),CGe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t,bootstrap:function(){return[lJ]}}),t.\u0275inj=Dn({imports:[Mh]}),t})();function SGe(t,n){1&t&&(_(0,"ngb-alert",21),ie(1,"img",22),_(2,"h6",23),A(3,"Failed to retrieve configuration."),w()()),2&t&&S("dismissible",!1)}function kGe(t,n){if(1&t&&(_(0,"span",32),A(1),w()),2&t){const e=P(2).$implicit;S("id",e.name),x(1),ze(e.value)}}function TGe(t,n){1&t&&(_(0,"span",33),A(1,"(empty)"),w()),2&t&&S("id",P(2).$implicit.name)}function DGe(t,n){if(1&t&&(_(0,"div",34)(1,"b"),A(2),w(),_(3,"label",26)(4,"a",27),ie(5,"img",10),w()()()),2&t){const e=P(2).index,i=P();x(2),ze(i.flatConfig[e+1].name),x(1),S("for",i.flatConfig[e+1].name),x(1),sp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",i.flatConfig[e+1].name,"",a1)}}function AGe(t,n){if(1&t&&(_(0,"span",32),A(1),w()),2&t){const e=P(3).index,i=P();S("id",i.flatConfig[e+1].name),x(1),ze(i.flatConfig[e+1].value)}}function EGe(t,n){if(1&t&&(_(0,"span",33),A(1,"(empty)"),w()),2&t){const e=P(3).index;S("id",P().flatConfig[e+1].name)}}function MGe(t,n){if(1&t&&(_(0,"div",35),q(1,AGe,2,2,"span",28),q(2,EGe,2,1,"span",29),w()),2&t){const e=P(2).index,i=P();x(1),S("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),x(1),S("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function OGe(t,n){if(1&t&&(_(0,"div",25)(1,"div",7)(2,"b"),A(3),w(),_(4,"label",26)(5,"a",27),ie(6,"img",10),w()()(),_(7,"div",7),q(8,kGe,2,2,"span",28),q(9,TGe,2,1,"span",29),w(),q(10,DGe,6,3,"div",30),q(11,MGe,3,2,"div",31),w()),2&t){const e=P(),i=e.index,r=e.$implicit,o=P();Ft("border-top-0",i>0),x(3),ze(r.name),x(1),S("for",r.name),x(1),sp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",r.value.name,"",a1),x(3),S("ngIf",!o.isEmpty(r.value)),x(1),S("ngIf",o.isEmpty(r.value)),x(1),S("ngIf",i{class t{config;route;httpClient;modalService;consoleService;formBuilder;deleteConfirmService;configError="";uploadError="";deleteError="";jsonConfig;flatConfig;nakamaVersion;file;uploading=!1;uploadSuccess=!1;deleteSuccess=!1;deleting=!1;confirmDeleteForm;apiConfig;constructor(e,i,r,o,s,a,l){this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.deleteConfirmService=l,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Sr.compose([Sr.required,Sr.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([sJ(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});XI.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(()=>{this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(VO(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})},this.confirmDeleteForm,"Delete All Data","Are you sure you want to delete all the database data?")}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(te(LO),te(Li),te(kC),te(zC),te(kn),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:41,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height","16"],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(q(0,SGe,4,1,"ngb-alert",0),_(1,"h2",1),A(2,"Server Configuration"),w(),_(3,"div",2)(4,"h5")(5,"b"),A(6,"Server version:"),w(),A(7),w(),_(8,"button",3),se("click",function(){return r.exportYaml()}),A(9,"Export Configuration"),w()(),_(10,"div",4),q(11,IGe,2,1,"ng-container",5),_(12,"div",6)(13,"div",7)(14,"b"),A(15,"runtime.env"),w(),_(16,"label",8)(17,"a",9),ie(18,"img",10),w()()(),_(19,"div",11),q(20,jGe,2,1,"div",12),q(21,PGe,3,0,"div",12),w()()(),_(22,"h5",13),A(23,"Import storage data"),w(),_(24,"p"),A(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),w(),q(26,RGe,6,2,"ngb-alert",0),q(27,LGe,4,1,"ngb-alert",14),_(28,"ngx-file-drop",15),se("onFileDrop",function(s){return r.dropped(s)}),q(29,FGe,2,0,"ng-template",16),w(),_(30,"h5",13),A(31,"Delete all data"),w(),q(32,$Ge,6,2,"ngb-alert",0),q(33,BGe,4,1,"ngb-alert",14),_(34,"div",17)(35,"div"),ie(36,"img",18),_(37,"small",19),A(38,"Warning - this operation is not reversible!"),w()(),_(39,"button",20),se("click",function(){return r.deleteData()}),A(40,"Delete all"),w()()),2&i&&(S("ngIf",r.configError),x(7),wt(" ",r.nakamaVersion,""),x(4),S("ngForOf",r.flatConfig),x(9),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&r.jsonConfig.runtime.env.length>0),x(1),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&0===r.jsonConfig.runtime.env.length),x(5),S("ngIf",r.uploadError),x(1),S("ngIf",r.uploadSuccess),x(1),S("disabled",r.uploading),x(4),S("ngIf",r.deleteError),x(1),S("ngIf",r.deleteSuccess),x(6),S("disabled",r.deleting))},dependencies:[lJ,aJ,Bt,Ct,pr],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})}return t})(),HGe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function UGe(t,n){if(1&t&&(_(0,"ngb-alert",48),ie(1,"img",49),_(2,"h6",50),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function zGe(t,n){1&t&&(_(0,"tr")(1,"td",51),A(2,"No additional users are setup. Create a new user below."),w()()),2&t&&(x(1),S("colSpan",4))}function GGe(t,n){if(1&t){const e=He();_(0,"tr")(1,"td"),A(2),w(),_(3,"td"),A(4),w(),_(5,"td")(6,"span",36),A(7,"Administrator"),w(),_(8,"span",36),A(9,"Developer"),w(),_(10,"span",36),A(11,"Maintainer"),w(),_(12,"span",36),A(13,"View Only"),w()(),_(14,"td")(15,"button",52),se("click",function(){const o=we(e).$implicit;return xe(P().deleteUser(o.username))}),A(16,"Delete"),w()()()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.username),x(2),ze(e.email),x(2),S("hidden",e.role!==i.adminRole),x(2),S("hidden",e.role!==i.developerRole),x(2),S("hidden",e.role!==i.maintainerRole),x(2),S("hidden",e.role!==i.readonlyRole)}}function WGe(t,n){if(1&t&&(_(0,"ngb-alert",48),ie(1,"img",49),_(2,"h6",50),A(3,"An error occurred:"),w(),_(4,"p",53),A(5),w()()),2&t){const e=P();S("dismissible",!1),x(5),ze(e.userCreateError)}}const QI=function(t){return{"is-invalid":t}};let qGe=(()=>{class t{route;consoleService;formBuilder;error="";userCreateError="";users=[];createUserForm;adminRole=nn.USER_ROLE_ADMIN;developerRole=nn.USER_ROLE_DEVELOPER;maintainerRole=nn.USER_ROLE_MAINTAINER;readonlyRole=nn.USER_ROLE_READONLY;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Sr.required],email:["",[Sr.required,Sr.email]],password:["",Sr.compose([Sr.required,Sr.minLength(8)])],role:[+this.readonlyRole,Sr.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(_o(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=nn.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=nn.USER_ROLE_ADMIN;break;case 2:e=nn.USER_ROLE_DEVELOPER;break;case 3:e=nn.USER_ROLE_MAINTAINER;break;case 4:e=nn.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(_o(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn),te(js))};static \u0275cmp=nt({type:t,selectors:[["app-users"]],decls:121,vars:25,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type","dismissible"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Management"),w(),q(2,UGe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),A(7,"Username"),w(),_(8,"th"),A(9,"Email"),w(),_(10,"th",5),A(11,"Role"),w(),_(12,"th",6),A(13,"Action"),w()()(),_(14,"tbody"),q(15,zGe,3,1,"tr",7),q(16,GGe,17,6,"tr",8),w()(),_(17,"h5",9),A(18,"Add new user"),w(),_(19,"ngb-alert",10)(20,"h6",11),A(21,"User roles"),w(),_(22,"div",12)(23,"div",13)(24,"div",14),ie(25,"img",15),_(26,"h6",16),A(27,"Administrator"),w()(),_(28,"small"),A(29," Owners have complete control over the server, its users and resources. "),w()(),_(30,"div",13)(31,"div",14),ie(32,"img",17),_(33,"h6",16),A(34,"Developer"),w()(),_(35,"small"),A(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),w()(),_(37,"div",13)(38,"div",14),ie(39,"img",18),_(40,"h6",16),A(41,"Maintainer"),w()(),_(42,"small"),A(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),w()(),_(44,"div",13)(45,"div",14),ie(46,"img",19),_(47,"h6",16),A(48,"View Only"),w()(),_(49,"small"),A(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),w()()()(),q(51,WGe,6,2,"ngb-alert",1),_(52,"div",20)(53,"form",21),se("ngSubmit",function(){return r.addUser()}),_(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),A(58,"Email"),w()(),_(59,"div",26),ie(60,"input",27),_(61,"div",28),A(62,"Email is required"),w()()()(),_(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),A(67,"Username"),w()(),_(68,"div",26),ie(69,"input",30),_(70,"div",28),A(71,"Username is required"),w()()()(),_(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),A(76,"Password"),w()(),_(77,"div",26),ie(78,"input",32),_(79,"div",28),A(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),w()()()(),_(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),A(85,"Role"),w()(),_(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),A(90,"Administrator"),w(),_(91,"span",36),A(92,"Developer"),w(),_(93,"span",36),A(94,"Maintainer"),w(),_(95,"span",36),A(96,"View Only"),w()(),_(97,"div",37),ie(98,"button",38),_(99,"div",39)(100,"button",40),se("click",function(){return r.f.role.setValue(+r.adminRole)}),A(101,"Administrator"),w(),_(102,"button",40),se("click",function(){return r.f.role.setValue(+r.developerRole)}),A(103,"Developer"),w(),_(104,"button",40),se("click",function(){return r.f.role.setValue(+r.maintainerRole)}),A(105,"Maintainer"),w(),_(106,"button",40),se("click",function(){return r.f.role.setValue(+r.readonlyRole)}),A(107,"View Only"),w()()()(),_(108,"div",28),A(109,"Role is required"),w()()()(),_(110,"div",41)(111,"div",42),ie(112,"div",24),_(113,"div",26)(114,"div",43),ie(115,"input",44),_(116,"label",45),A(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),w()()()()(),_(118,"div",46)(119,"button",47),A(120,"Save"),w()()()()),2&i&&(x(2),S("ngIf",r.error),x(13),S("ngIf",0===r.users.length),x(1),S("ngForOf",r.users),x(3),S("type","secondary")("dismissible",!1),x(32),S("ngIf",r.userCreateError),x(2),S("formGroup",r.createUserForm),x(7),S("ngClass",ui(19,QI,r.f.email.dirty&&r.f.email.errors)),x(1),S("hidden",r.f.email.disabled||r.f.email.valid||r.f.email.pristine),x(8),S("ngClass",ui(21,QI,r.f.username.dirty&&r.f.username.errors)),x(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),x(8),S("ngClass",ui(23,QI,r.f.password.dirty&&r.f.password.errors)),x(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),x(10),S("hidden",r.f.role.value!==+r.adminRole),x(2),S("hidden",r.f.role.value!==+r.developerRole),x(2),S("hidden",r.f.role.value!==+r.maintainerRole),x(2),S("hidden",r.f.role.value!==+r.readonlyRole),x(13),S("hidden",r.f.role.disabled||r.f.role.valid||r.f.role.pristine),x(11),S("disabled",r.createUserForm.invalid))},dependencies:[dp,Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,lC,ps,gs,Hh,Lo,ns],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})}return t})(),YGe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function JGe(t,n){if(1&t&&(_(0,"ngb-alert",10),ie(1,"img",11),_(2,"h6",12),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Failed to retrieve runtime information: ",e.error,"")}}function KGe(t,n){if(1&t&&(_(0,"tr")(1,"td"),A(2),w(),_(3,"td",13),A(4),w()()),2&t){const e=n.$implicit;x(2),ze(e.path),x(2),ze(e.mod_time)}}function XGe(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No Go modules were found."),w(),ie(3,"td"),w())}function QGe(t,n){if(1&t&&(_(0,"tr")(1,"td"),A(2),w(),_(3,"td",13),A(4),w()()),2&t){const e=n.$implicit;x(2),ze(e.path),x(2),ze(e.mod_time)}}function ZGe(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No Lua modules were found."),w(),ie(3,"td"),w())}function eWe(t,n){if(1&t&&(_(0,"tr")(1,"td"),A(2),w(),_(3,"td",13),A(4),w()()),2&t){const e=n.$implicit;x(2),ze(e.path),x(2),ze(e.mod_time)}}function tWe(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No JavaScript modules were found."),w(),ie(3,"td"),w())}const ZI=function(){return["/apiexplorer"]},eN=function(t){return{endpoint:t}};function nWe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),A(3),w()(),_(4,"td",15)(5,"a",16),A(6,"API Explorer"),w()()()),2&t){const e=n.$implicit;x(3),ze(e),x(2),S("routerLink",ma(3,ZI))("queryParams",ui(4,eN,e))}}function iWe(t,n){1&t&&(_(0,"tr")(1,"td",17),A(2,"No Go RPC functions were found."),w()())}function rWe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),A(3),w()(),_(4,"td",15)(5,"a",16),A(6,"API Explorer"),w()()()),2&t){const e=n.$implicit;x(3),ze(e),x(2),S("routerLink",ma(3,ZI))("queryParams",ui(4,eN,e))}}function oWe(t,n){1&t&&(_(0,"tr")(1,"td",17),A(2,"No Lua RPC functions were found."),w()())}function sWe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),A(3),w()(),_(4,"td",15)(5,"a",16),A(6,"API Explorer"),w()()()),2&t){const e=n.$implicit;x(3),ze(e),x(2),S("routerLink",ma(3,ZI))("queryParams",ui(4,eN,e))}}function aWe(t,n){1&t&&(_(0,"tr")(1,"td",17),A(2,"No JavaScript RPC functions were found."),w()())}let lWe=(()=>{class t{route;consoleService;error="";runtimeInfo;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Runtime Modules"),w(),q(2,JGe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),A(7,"Go Modules"),w(),_(8,"th",4),A(9,"Last Modified"),w()()(),_(10,"tbody"),q(11,KGe,5,2,"tr",5),q(12,XGe,4,0,"tr",6),w(),_(13,"thead",3)(14,"tr")(15,"th",7),A(16,"Lua Modules"),w()()(),_(17,"tbody"),q(18,QGe,5,2,"tr",5),q(19,ZGe,4,0,"tr",6),w(),_(20,"thead",3)(21,"tr")(22,"th",7),A(23,"JavaScript Modules"),w()()(),_(24,"tbody"),q(25,eWe,5,2,"tr",5),q(26,tWe,4,0,"tr",6),w()(),_(27,"h4",8),A(28,"Registered RPC Functions"),w(),_(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),A(33,"Go RPC Functions"),w()()(),_(34,"tbody"),q(35,nWe,7,6,"tr",5),q(36,iWe,3,0,"tr",6),w(),_(37,"thead",3)(38,"tr")(39,"th",7),A(40,"Lua RPC Functions"),w()()(),_(41,"tbody"),q(42,rWe,7,6,"tr",5),q(43,oWe,3,0,"tr",6),w(),_(44,"thead",3)(45,"tr")(46,"th",7),A(47,"JavaScript RPC Functions"),w()()(),_(48,"tbody"),q(49,sWe,7,6,"tr",5),q(50,aWe,3,0,"tr",6),w()()),2&i&&(x(2),S("ngIf",r.error),x(9),S("ngForOf",r.runtimeInfo.go_modules),x(1),S("ngIf",0===r.runtimeInfo.go_modules.length),x(6),S("ngForOf",r.runtimeInfo.lua_modules),x(1),S("ngIf",0===r.runtimeInfo.lua_modules.length),x(6),S("ngForOf",r.runtimeInfo.js_modules),x(1),S("ngIf",0===r.runtimeInfo.js_modules.length),x(9),S("ngForOf",r.runtimeInfo.go_rpc_functions),x(1),S("ngIf",0===r.runtimeInfo.go_rpc_functions.length),x(6),S("ngForOf",r.runtimeInfo.lua_rpc_functions),x(1),S("ngIf",0===r.runtimeInfo.lua_rpc_functions.length),x(6),S("ngForOf",r.runtimeInfo.js_rpc_functions),x(1),S("ngIf",0===r.runtimeInfo.js_rpc_functions.length))},dependencies:[Mc,Bt,Ct,pr],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})}return t})(),cWe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function uWe(t,n){1&t&&(_(0,"span"),A(1,"Filter by collection"),w())}function dWe(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.f.collection.value)}}function hWe(t,n){if(1&t){const e=He();_(0,"button",34),se("click",function(){const o=we(e).$implicit;return xe(P().f.collection.setValue(o))}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function fWe(t,n){if(1&t&&(_(0,"ngb-alert",35),ie(1,"img",36),_(2,"h6",37),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying storage objects: ",e.error,"")}}function pWe(t,n){1&t&&(_(0,"th",38),A(1,"Remove"),w())}function gWe(t,n){1&t&&(_(0,"tr")(1,"td",39),A(2,"No storage objects found - change the filter criteria or add new objects."),w()())}function mWe(t,n){if(1&t){const e=He();_(0,"td",42)(1,"button",43),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteObject(r,s,a))}),A(2,"Delete"),w()()}}function vWe(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(2),w(),_(3,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(4),w(),_(5,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(6),w(),_(7,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(8),w(),q(9,mWe,3,0,"td",41),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.collection),x(2),ze(e.key),x(2),ze(e.user_id),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed())}}let yWe=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";collections=[];objects=[];objectCount=0;nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Storage Objects"),w(),_(2,"h6",1),A(3),w(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),se("ngSubmit",function(){return r.search(0)}),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),q(12,uWe,2,0,"span",10),q(13,dWe,2,1,"span",10),w(),_(14,"div",11)(15,"button",12),se("click",function(){return r.f.collection.reset()}),A(16,"\u2718 Deselect collection"),w(),ie(17,"div",13),q(18,hWe,2,1,"button",14),w()()(),ie(19,"input",15)(20,"input",16),_(21,"div",17)(22,"span",18),se("click",function(){return r.f.user_id.setValue(r.systemUserId)}),ie(23,"img",19),w()(),_(24,"div",17)(25,"button",20),se("click",function(){return r.search(0)}),A(26,"Search"),w()()()()(),_(27,"div",21)(28,"div",22)(29,"button",23),se("click",function(){return r.search(0)}),ie(30,"img",24),w(),_(31,"button",23),se("click",function(){return r.search(1)}),ie(32,"img",25),w()()()()(),q(33,fWe,4,2,"ngb-alert",26),_(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),A(39,"Collection Name"),w(),_(40,"th"),A(41,"Key Name"),w(),_(42,"th",30),A(43,"User ID"),w(),_(44,"th",31),A(45,"Last Update"),w(),q(46,pWe,2,0,"th",32),w()(),_(47,"tbody"),q(48,gWe,3,0,"tr",10),q(49,vWe,10,5,"tr",33),w()()()),2&i&&(x(3),wt("",r.objectCount," objects found."),x(4),S("formGroup",r.searchForm),x(4),S("disabled",0===r.collections.length),x(1),S("ngIf",!r.f.collection.value||""===r.f.collection.value),x(1),S("ngIf",r.f.collection.value&&""!==r.f.collection.value),x(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),x(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),x(1),S("ngForOf",r.collections),x(7),S("disabled",r.disableSearch()),x(4),S("disabled",0===r.objects.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.objects.length),x(1),S("ngForOf",r.objects))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),_We=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bWe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var tN,cJ,uJ,dJ,hJ,fJ,pJ,gJ,mJ,vJ,yJ,_J,bJ,wJ,xJ,CJ,SJ,kJ,TJ,DJ,AJ,EJ,MJ,OJ,IJ,NJ,jJ,PJ,RJ,LJ,FJ,$J,BJ,VJ,HJ,UJ,zJ,GJ,WJ,qJ,YJ,JJ,KJ,XJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,gK,mK,vK,yK,_K,bK,wK,xK,CK,SK,kK,TK,DK,AK,EK,MK,OK,IK,NK,jK,PK,RK,LK,FK,$K,BK,VK,HK,UK,zK,GK,WK,qK,YK,JK,KK,XK,QK,ZK,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,gX,mX,vX,yX,_X,bX,wX,xX,CX,SX,kX,TX,DX,AX,EX,MX,OX,IX,NX,jX,PX,RX,LX,FX,$X,BX,VX,HX,UX,zX,GX,WX,qX,YX,JX,KX,XX,QX,ZX,eQ,tQ,nQ,iQ,rQ,oQ,sQ,aQ,lQ,cQ,uQ,dQ,hQ,fQ,pQ,gQ,mQ,vQ,yQ,_Q,bQ,wQ,xQ,CQ,SQ,kQ,TQ,DQ,AQ,EQ,MQ,OQ,IQ,NQ,jQ,PQ,RQ,LQ,FQ,$Q,BQ,VQ,HQ,UQ,zQ,GQ,WQ,qQ,YQ,JQ,KQ,XQ,QQ,ZQ,eZ,tZ,nZ,iZ,rZ,oZ,sZ,aZ,lZ,cZ,uZ,dZ,hZ,fZ,pZ,gZ,mZ,vZ,yZ,_Z,bZ,wZ,xZ,CZ,SZ,kZ,TZ,DZ,AZ,EZ,MZ,OZ,IZ,NZ,jZ,PZ,RZ,LZ,FZ,$Z,BZ,VZ,HZ,UZ,zZ,GZ,WZ,qZ,YZ,JZ,KZ,XZ,QZ,ZZ,eee,tee,nee,iee,ree,oee,see,aee,lee,cee,uee,dee,hee,fee,pee,gee,mee,vee,yee,_ee,bee,wWe=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],xWe=["mainAxis","crossAxis","limiter"];function r_(t){var n="function"==typeof Map?new Map:void 0;return r_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return nN(e,arguments,Xn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o_(r,e)},r_(t)}function nN(t,n,e){return(nN=Tee()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&o_(a,o.prototype),a}).apply(null,arguments)}function fe(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function wee(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function _e(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=P2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function bt(){bt=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(z,Y,O){z[Y]=O.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(z,Y,O){return Object.defineProperty(z,Y,{value:O,enumerable:!0,configurable:!0,writable:!0}),z[Y]}try{l({},"")}catch{l=function(Y,O,H){return Y[O]=H}}function c(z,Y,O,H){var F=Object.create((Y&&Y.prototype instanceof h?Y:h).prototype),Z=new N(H||[]);return i(F,"_invoke",{value:k(z,O,Z)}),F}function u(z,Y,O){try{return{type:"normal",arg:z.call(Y,O)}}catch(H){return{type:"throw",arg:H}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var g={};l(g,o,function(){return this});var m=Object.getPrototypeOf,v=m&&m(m($([])));v&&v!==n&&e.call(v,o)&&(g=v);var y=p.prototype=h.prototype=Object.create(g);function b(z){["next","throw","return"].forEach(function(Y){l(z,Y,function(O){return this._invoke(Y,O)})})}function C(z,Y){function O(G,F,Z,D){var E=u(z[G],z,F);if("throw"!==E.type){var M=E.arg,U=M.value;return U&&"object"==xt(U)&&e.call(U,"__await")?Y.resolve(U.__await).then(function(L){O("next",L,Z,D)},function(L){O("throw",L,Z,D)}):Y.resolve(U).then(function(L){M.value=L,Z(M)},function(L){return O("throw",L,Z,D)})}D(E.arg)}var H;i(this,"_invoke",{value:function(G,F){function Z(){return new Y(function(D,E){O(G,F,D,E)})}return H=H?H.then(Z,Z):Z()}})}function k(z,Y,O){var H="suspendedStart";return function(G,F){if("executing"===H)throw new Error("Generator is already running");if("completed"===H){if("throw"===G)throw F;return{value:void 0,done:!0}}for(O.method=G,O.arg=F;;){var Z=O.delegate;if(Z){var D=T(Z,O);if(D){if(D===d)continue;return D}}if("next"===O.method)O.sent=O._sent=O.arg;else if("throw"===O.method){if("suspendedStart"===H)throw H="completed",O.arg;O.dispatchException(O.arg)}else"return"===O.method&&O.abrupt("return",O.arg);H="executing";var E=u(z,Y,O);if("normal"===E.type){if(H=O.done?"completed":"suspendedYield",E.arg===d)continue;return{value:E.arg,done:O.done}}"throw"===E.type&&(H="completed",O.method="throw",O.arg=E.arg)}}}function T(z,Y){var O=Y.method,H=z.iterator[O];if(void 0===H)return Y.delegate=null,"throw"===O&&z.iterator.return&&(Y.method="return",Y.arg=void 0,T(z,Y),"throw"===Y.method)||"return"!==O&&(Y.method="throw",Y.arg=new TypeError("The iterator does not provide a '"+O+"' method")),d;var G=u(H,z.iterator,Y.arg);if("throw"===G.type)return Y.method="throw",Y.arg=G.arg,Y.delegate=null,d;var F=G.arg;return F?F.done?(Y[z.resultName]=F.value,Y.next=z.nextLoc,"return"!==Y.method&&(Y.method="next",Y.arg=void 0),Y.delegate=null,d):F:(Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,d)}function j(z){var Y={tryLoc:z[0]};1 in z&&(Y.catchLoc=z[1]),2 in z&&(Y.finallyLoc=z[2],Y.afterLoc=z[3]),this.tryEntries.push(Y)}function B(z){var Y=z.completion||{};Y.type="normal",delete Y.arg,z.completion=Y}function N(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(j,this),this.reset(!0)}function $(z){if(z){var Y=z[o];if(Y)return Y.call(z);if("function"==typeof z.next)return z;if(!isNaN(z.length)){var O=-1,H=function G(){for(;++O=0;--H){var G=this.tryEntries[H],F=G.completion;if("root"===G.tryLoc)return O("end");if(G.tryLoc<=this.prev){var Z=e.call(G,"catchLoc"),D=e.call(G,"finallyLoc");if(Z&&D){if(this.prev=0;--O){var H=this.tryEntries[O];if(H.tryLoc<=this.prev&&e.call(H,"finallyLoc")&&this.prev=0;--Y){var O=this.tryEntries[Y];if(O.finallyLoc===z)return this.complete(O.completion,O.afterLoc),B(O),d}},catch:function(z){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var O=this.tryEntries[Y];if(O.tryLoc===z){var H=O.completion;if("throw"===H.type){var G=H.arg;B(O)}return G}}throw new Error("illegal catch attempt")},delegateYield:function(z,Y,O){return this.delegate={iterator:$(z),resultName:Y,nextLoc:O},"next"===this.method&&(this.arg=void 0),d}},t}function xee(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function ni(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){xee(o,i,r,s,a,"next",l)}function a(l){xee(o,i,r,s,a,"throw",l)}s(void 0)})}}function Wt(t,n){return See(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||P2(t,n)||Cee()}function Cee(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function See(t){if(Array.isArray(t))return t}function kee(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Ee(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xn(t){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function ue(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Dee(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function Wu(t,n){return new t(n)}var a_,L2=new Map,sN=0;function Bee(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function AWe(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=oN(t),g=L2.get(p)||function EWe(t,n){var e={stylesheet:TWe(n),rules:{}};return L2.set(t,e),e}(p,t),m=g.stylesheet,v=g.rules;v[f]||(v[f]=!0,m.insertRule("@keyframes ".concat(f," ").concat(h),m.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),sN+=1,f}function l_(t){a_=t}function fv(){if(!a_)throw new Error("Function called outside component initialization");return a_}function Kl(t){fv().$$.on_mount.push(t)}function Vc(t){fv().$$.on_destroy.push(t)}function Vee(){var t=fv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=$ee(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function Hee(t,n){return fv().$$.context.set(t,n),n}function xs(t){return fv().$$.context.get(t)}function F2(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var pv=[],qn=[],$2=[],aN=[],Uee=Promise.resolve(),lN=!1;function zee(){lN||(lN=!0,Uee.then(Gee))}function Ya(){return zee(),Uee}function Yp(t){$2.push(t)}function Hc(t){aN.push(t)}var B2,cN=new Set,gv=0;function Gee(){if(0===gv){var t=a_;do{try{for(;gvl.start&&(a=d(l,b),l=null,uN(t,a.b,"start"),B&&(u(),c=Bee(t,s,a.b,a.duration,0,k,o.css))),a&&($>=a.end?(j(s=a.b,1-s),uN(t,a.b,"end"),l||(a.b?u():--a.group.r||rr(a.group.c)),a=null):$>=a.start&&(s=a.a+a.d*k(($-a.start)/a.duration),j(s,1-s))),!(!a&&!l)},0===s_.size&&rN(Pee),new Promise(function($){s_.add({c:p,f:$})}))}return{run:function(f){bs(o)?(B2||(B2=Promise.resolve()).then(function(){B2=null}),B2).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var dN=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function NWe(t,n){t.d(1),n.delete(t.key)}function hN(t,n){Q(t,1,1,function(){n.delete(t.key)})}function U2(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,g={};p--;)g[t[p].key]=p;var m=[],v=new Map,y=new Map;for(p=f;p--;){var b=d(r,o,p),C=e(b),k=s.get(C);k?i&&k.p(b,n):(k=c(C,b)).c(),v.set(C,m[p]=k),C in g&&y.set(C,Math.abs(p-g[C]))}var T=new Set,j=new Set;function B(O){W(O,1),O.m(a,u),s.set(O.key,O),u=O.first,f--}for(;h&&f;){var N=m[f-1],$=t[h-1],V=N.key,z=$.key;N===$?(u=N.first,h--,f--):v.has(z)?!s.has(V)||T.has(V)?B(N):j.has(z)?h--:y.get(V)>y.get(z)?(j.add(V),B(N)):(T.add(z),h--):(l($,s),h--)}for(;h--;){var Y=t[h];v.has(Y.key)||l(Y,s)}for(;f;)B(m[f-1]);return m}function Jp(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function z2(t){return"object"===xt(t)&&null!==t?t:{}}function Uc(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function $e(t){t&&t.c()}function Le(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||Yp(function(){var a,l=t.$$.on_mount.map(Oee).filter(bs);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,sn(l)):rr(l),t.$$.on_mount=[]}),s.forEach(Yp)}function Fe(t,n){var e=t.$$;null!==e.fragment&&(rr(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Pt(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=a_;l_(t);var c=t.$$={fragment:null,ctx:[],props:o,update:tt,not_equal:r,bound:Iee(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:Iee(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function jWe(t,n){-1===t.$$.dirty[0]&&(pv.push(t),zee(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function LWe(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function FWe(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?Mee:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var BWe=dN.window;function VWe(t){gn(t,"svelte-n7cvum",".svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}")}function qee(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=t[1].closeButton&&Yee(t),C=t[2];return C&&(s=Wu(C,{})),{c:function(){n=oe("div"),e=oe("div"),i=oe("div"),b&&b.c(),r=Me(),o=oe("div"),s&&$e(s.$$.fragment),I(o,"class",a=Tr(t[1].classContent)+" svelte-n7cvum"),I(o,"style",t[9]),Xe(o,"content",!t[0]),I(i,"class",l=Tr(t[1].classWindow)+" svelte-n7cvum"),I(i,"role","dialog"),I(i,"aria-modal","true"),I(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),I(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),I(i,"style",t[8]),Xe(i,"window",!t[0]),I(e,"class",h=Tr(t[1].classWindowWrap)+" svelte-n7cvum"),I(e,"style",t[7]),Xe(e,"wrap",!t[0]),I(n,"id",f=t[1].id),I(n,"class",p=Tr(t[1].classBg)+" svelte-n7cvum"),I(n,"style",t[6]),Xe(n,"bg",!t[0])},m:function(k,T){ve(k,n,T),ee(n,e),ee(e,i),b&&b.m(i,null),ee(i,r),ee(i,o),s&&Le(s,o,null),t[50](i),t[51](e),t[52](n),m=!0,v||(y=[Ze(i,"introstart",function(){bs(t[13])&&t[13].apply(this,arguments)}),Ze(i,"outrostart",function(){bs(t[14])&&t[14].apply(this,arguments)}),Ze(i,"introend",function(){bs(t[15])&&t[15].apply(this,arguments)}),Ze(i,"outroend",function(){bs(t[16])&&t[16].apply(this,arguments)}),Ze(n,"mousedown",t[20]),Ze(n,"mouseup",t[21])],v=!0)},p:function(k,T){if((t=k)[1].closeButton?b?(b.p(t,T),2&T[0]&&W(b,1)):((b=Yee(t)).c(),W(b,1),b.m(i,r)):b&&(it(),Q(b,1,1,function(){b=null}),rt()),C!==(C=t[2])){if(s){it();var j=s;Q(j.$$.fragment,1,0,function(){Fe(j,1)}),rt()}C?($e((s=Wu(C,{})).$$.fragment),W(s.$$.fragment,1),Le(s,o,null)):s=null}(!m||2&T[0]&&a!==(a=Tr(t[1].classContent)+" svelte-n7cvum"))&&I(o,"class",a),(!m||512&T[0])&&I(o,"style",t[9]),(!m||3&T[0])&&Xe(o,"content",!t[0]),(!m||2&T[0]&&l!==(l=Tr(t[1].classWindow)+" svelte-n7cvum"))&&I(i,"class",l),(!m||2&T[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&I(i,"aria-label",c),(!m||2&T[0]&&u!==(u=t[1].ariaLabelledBy||null))&&I(i,"aria-labelledby",u),(!m||256&T[0])&&I(i,"style",t[8]),(!m||3&T[0])&&Xe(i,"window",!t[0]),(!m||2&T[0]&&h!==(h=Tr(t[1].classWindowWrap)+" svelte-n7cvum"))&&I(e,"class",h),(!m||128&T[0])&&I(e,"style",t[7]),(!m||3&T[0])&&Xe(e,"wrap",!t[0]),(!m||2&T[0]&&f!==(f=t[1].id))&&I(n,"id",f),(!m||2&T[0]&&p!==(p=Tr(t[1].classBg)+" svelte-n7cvum"))&&I(n,"class",p),(!m||64&T[0])&&I(n,"style",t[6]),(!m||3&T[0])&&Xe(n,"bg",!t[0])},i:function(k){m||(W(b),s&&W(s.$$.fragment,k),Yp(function(){d||(d=H2(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),Yp(function(){g||(g=H2(n,t[11],t[1].transitionBgProps,!0)),g.run(1)}),m=!0)},o:function(k){Q(b),s&&Q(s.$$.fragment,k),d||(d=H2(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),g||(g=H2(n,t[11],t[1].transitionBgProps,!1)),g.run(0),m=!1},d:function(k){k&&me(n),b&&b.d(),s&&Fe(s),t[50](null),k&&d&&d.end(),t[51](null),t[52](null),k&&g&&g.end(),v=!1,rr(y)}}}function Yee(t){var n,e,i,r,o,s=[UWe,HWe],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=Ci()},m:function(c,u){a[e].m(c,u),ve(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(it(),Q(a[d],1,1,function(){a[d]=null}),rt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),W(i,1),i.m(r.parentNode,r))},i:function(c){o||(W(i),o=!0)},o:function(c){Q(i),o=!1},d:function(c){a[e].d(c),c&&me(r)}}}function HWe(t){var n,e,i,r;return{c:function(){I(n=oe("button"),"class",e=Tr(t[1].classCloseButton)+" svelte-n7cvum"),I(n,"aria-label","Close modal"),I(n,"style",t[10]),I(n,"type","button"),Xe(n,"close",!t[0])},m:function(o,s){ve(o,n,s),i||(r=Ze(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=Tr(o[1].classCloseButton)+" svelte-n7cvum")&&I(n,"class",e),1024&s[0]&&I(n,"style",o[10]),3&s[0]&&Xe(n,"close",!o[0])},i:tt,o:tt,d:function(o){o&&me(n),i=!1,r()}}}function UWe(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=Wu(r,o(t))),{c:function(){n&&$e(n.$$.fragment),e=Ci()},m:function(s,a){n&&Le(n,s,a),ve(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){it();var l=n;Q(l.$$.fragment,1,0,function(){Fe(l,1)}),rt()}r?($e((n=Wu(r,o(s))).$$.fragment),W(n.$$.fragment,1),Le(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&W(n.$$.fragment,s),i=!0)},o:function(s){n&&Q(n.$$.fragment,s),i=!1},d:function(s){s&&me(e),n&&Fe(n,s)}}}function zWe(t){var n,e,i,r,o=t[2]&&qee(t),s=t[49].default,a=ko(s,t,t[48],null);return{c:function(){o&&o.c(),n=Me(),a&&a.c()},m:function(l,c){o&&o.m(l,c),ve(l,n,c),a&&a.m(l,c),e=!0,i||(r=Ze(BWe,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&W(o,1)):((o=qee(l)).c(),W(o,1),o.m(n.parentNode,n)):o&&(it(),Q(o,1,1,function(){o=null}),rt()),a&&a.p&&(!e||131072&c[1])&&Do(a,s,l,l[48],e?To(s,l[48],c,null):Ao(l[48]),null)},i:function(l){e||(W(o),W(a,l),e=!0)},o:function(l){Q(o),Q(a,l),e=!1},d:function(l){o&&o.d(l),l&&me(n),a&&a.d(l),i=!1,r()}}}function Jee(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Ee(Ee({},e),{},{props:Ee(Ee({},n),e.props)}))}}function GWe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y=n.$$slots,b=void 0===y?{}:y,C=n.$$scope,k=Vee(),j=n.isTabbable,B=void 0===j?function(Se){return Se.tabIndex>=0&&!Se.hidden&&!Se.disabled&&"none"!==Se.style.display&&"hidden"!==Se.type&&Boolean(Se.offsetWidth||Se.offsetHeight||Se.getClientRects().length)}:j,N=n.show,$=void 0===N?null:N,V=n.id,z=void 0===V?null:V,Y=n.key,O=void 0===Y?"simple-modal":Y,H=n.ariaLabel,G=void 0===H?null:H,F=n.ariaLabelledBy,Z=void 0===F?null:F,D=n.closeButton,E=void 0===D||D,M=n.closeOnEsc,U=void 0===M||M,L=n.closeOnOuterClick,X=void 0===L||L,ne=n.styleBg,ge=void 0===ne?{}:ne,ae=n.styleWindowWrap,De=void 0===ae?{}:ae,be=n.styleWindow,Ie=void 0===be?{}:be,R=n.styleContent,J=void 0===R?{}:R,K=n.styleCloseButton,pe=void 0===K?{}:K,Te=n.classBg,ye=void 0===Te?null:Te,Ue=n.classWindowWrap,Je=void 0===Ue?null:Ue,_t=n.classWindow,zt=void 0===_t?null:_t,ct=n.classContent,Nn=void 0===ct?null:ct,mt=n.classCloseButton,pi=void 0===mt?null:mt,ki=n.unstyled,ci=void 0!==ki&&ki,yi=n.setContext,bn=void 0===yi?Hee:yi,Hi=n.transitionBg,Ir=void 0===Hi?$We:Hi,Nt=n.transitionBgProps,Ge=void 0===Nt?{duration:250}:Nt,cn=n.transitionWindow,Pn=void 0===cn?Ir:cn,Ti=n.transitionWindowProps,vr=void 0===Ti?Ge:Ti,qr=n.disableFocusTrap,Be=void 0!==qr&&qr,jt={id:z,ariaLabel:G,ariaLabelledBy:Z,closeButton:E,closeOnEsc:U,closeOnOuterClick:X,styleBg:ge,styleWindowWrap:De,styleWindow:Ie,styleContent:J,styleCloseButton:pe,classBg:ye,classWindowWrap:Je,classWindow:zt,classContent:Nn,classCloseButton:pi,transitionBg:Ir,transitionBgProps:Ge,transitionWindow:Pn,transitionWindowProps:vr,disableFocusTrap:Be,isTabbable:B,unstyled:ci},an=Ee({},jt),wn=null,Mi=function(Se){return Se?Object.keys(Se).reduce(function(At,rn){return"".concat(At,"; ").concat((hn=rn,hn.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Se[rn]);var hn},""):""},Ui=function(Se){return!!(Se&&Se.constructor&&Se.call&&Se.apply)},nr=function(){e(6,a=Mi(Object.assign({},{width:window.innerWidth,height:window.innerHeight},an.styleBg))),e(7,l=Mi(an.styleWindowWrap)),e(8,c=Mi(an.styleWindow)),e(9,u=Mi(an.styleContent)),e(10,d=Mi(an.styleCloseButton)),e(11,h=an.transitionBg),e(12,f=an.transitionWindow)},Go=function(){},_i=Go,Wo=Go,Ys=Go,Js=Go,Pl=function(Se){var rn=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hn=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,wn=Jee(Se,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,an=Ee(Ee({},jt),rn)),nr(),Ce(),e(13,_i=function(dn){hn.onOpen&&hn.onOpen(dn),k("open"),k("opening")}),e(14,Wo=function(dn){hn.onClose&&hn.onClose(dn),k("close"),k("closing")}),e(15,Ys=function(dn){hn.onOpened&&hn.onOpened(dn),k("opened")}),e(16,Js=function(dn){hn.onClosed&&hn.onClosed(dn),k("closed")})},le=function(){var Se=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};wn&&(e(14,Wo=Se.onClose||Wo),e(16,Js=Se.onClosed||Js),e(2,wn=null),ke())},Ce=function(){s=window.scrollY,p=document.body.style.position,g=document.body.style.overflow,m=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},ke=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=g||"",document.body.style.width=m||"",window.scrollTo({top:s,left:0,behavior:"instant"})};bn(O,{open:Pl,close:le});var Pe=!1;return Vc(function(){Pe&&le()}),Kl(function(){e(47,Pe=!0)}),t.$$set=function(Se){"isTabbable"in Se&&e(22,B=Se.isTabbable),"show"in Se&&e(23,$=Se.show),"id"in Se&&e(24,z=Se.id),"key"in Se&&e(25,O=Se.key),"ariaLabel"in Se&&e(26,G=Se.ariaLabel),"ariaLabelledBy"in Se&&e(27,Z=Se.ariaLabelledBy),"closeButton"in Se&&e(28,E=Se.closeButton),"closeOnEsc"in Se&&e(29,U=Se.closeOnEsc),"closeOnOuterClick"in Se&&e(30,X=Se.closeOnOuterClick),"styleBg"in Se&&e(31,ge=Se.styleBg),"styleWindowWrap"in Se&&e(32,De=Se.styleWindowWrap),"styleWindow"in Se&&e(33,Ie=Se.styleWindow),"styleContent"in Se&&e(34,J=Se.styleContent),"styleCloseButton"in Se&&e(35,pe=Se.styleCloseButton),"classBg"in Se&&e(36,ye=Se.classBg),"classWindowWrap"in Se&&e(37,Je=Se.classWindowWrap),"classWindow"in Se&&e(38,zt=Se.classWindow),"classContent"in Se&&e(39,Nn=Se.classContent),"classCloseButton"in Se&&e(40,pi=Se.classCloseButton),"unstyled"in Se&&e(0,ci=Se.unstyled),"setContext"in Se&&e(41,bn=Se.setContext),"transitionBg"in Se&&e(42,Ir=Se.transitionBg),"transitionBgProps"in Se&&e(43,Ge=Se.transitionBgProps),"transitionWindow"in Se&&e(44,Pn=Se.transitionWindow),"transitionWindowProps"in Se&&e(45,vr=Se.transitionWindowProps),"disableFocusTrap"in Se&&e(46,Be=Se.disableFocusTrap),"$$scope"in Se&&e(48,C=Se.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&&Pe&&(Ui($)?Pl($):le())},[ci,an,wn,i,r,o,a,l,c,u,d,h,f,_i,Wo,Ys,Js,Ui,le,function(Se){if(an.closeOnEsc&&wn&&"Escape"===Se.key&&(Se.preventDefault(),le()),wn&&"Tab"===Se.key&&!an.disableFocusTrap){var At=o.querySelectorAll("*"),rn=Array.from(At).filter(an.isTabbable).sort(function(dn,Di){return dn.tabIndex-Di.tabIndex}),hn=rn.indexOf(document.activeElement);-1===hn&&Se.shiftKey&&(hn=0),hn+=rn.length+(Se.shiftKey?-1:1),rn[hn%=rn.length].focus(),Se.preventDefault()}},function(Se){!an.closeOnOuterClick||Se.target!==i&&Se.target!==r||(v=Se.target)},function(Se){an.closeOnOuterClick&&Se.target===v&&(Se.preventDefault(),le())},B,$,z,O,G,Z,E,U,X,ge,De,Ie,J,pe,ye,Je,zt,Nn,pi,bn,Ir,Ge,Pn,vr,Be,Pe,C,b,function(Se){qn[Se?"unshift":"push"](function(){e(5,o=Se)})},function(Se){qn[Se?"unshift":"push"](function(){e(4,r=Se)})},function(Se){qn[Se?"unshift":"push"](function(){e(3,i=Se)})}]}var Fr,Zi,zc,qu,Gc,Xl,Kee=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,GWe,zWe,po,{isTabbable:22,show:23,id:24,key:25,ariaLabel:26,ariaLabelledBy:27,closeButton:28,closeOnEsc:29,closeOnOuterClick:30,styleBg:31,styleWindowWrap:32,styleWindow:33,styleContent:34,styleCloseButton:35,classBg:36,classWindowWrap:37,classWindow:38,classContent:39,classCloseButton:40,unstyled:0,setContext:41,transitionBg:42,transitionBgProps:43,transitionWindow:44,transitionWindowProps:45,disableFocusTrap:46},VWe,[-1,-1,-1]),r}return de(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Fr||(Fr={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(Zi||(Zi={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(zc||(zc={})),function(t){t.info="info",t.warning="warning",t.error="error"}(qu||(qu={})),function(t){t.key="key",t.value="value"}(Gc||(Gc={})),function(t){t.asc="asc",t.desc="desc"}(Xl||(Xl={}));var Kp=[{start:0,end:100}],Xp={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},WWe=Ee(Ee({},Xp),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),qWe=Ee(Ee({},Xp),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),Xee=Ee(Ee({},Xp),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),fN="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",pN="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",YWe="NO",gN="SELF",mN="NEXT_INSIDE",JWe=(qa(tN={},Xl.asc,"ascending"),qa(tN,Xl.desc,"descending"),tN),KWe=0;function c_(){return++KWe}function sf(t){return(sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function er(t){return Array.isArray(t)}function Dr(t){return null!==t&&"object"===sf(t)&&t.constructor===Object}function Qee(t){return!(!t||"object"!==sf(t))&&"add"===t.op}function Zee(t){return!(!t||"object"!==sf(t))&&"remove"===t.op}function vN(t){return!(!t||"object"!==sf(t))&&"replace"===t.op}function yN(t){return!(!t||"object"!==sf(t))&&"copy"===t.op}function mv(t){return!(!t||"object"!==sf(t))&&"move"===t.op}function _N(t){return(_N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function XWe(t,n){return t===n}function ete(t){return t.slice(0,t.length-1)}function tte(t){return"object"===_N(t)&&null!==t}function u_(t){return(u_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function nte(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function QWe(t,n,e){return r=function(o,s){if("object"!==u_(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==u_(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===u_(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function bN(t){if(er(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Dr(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=Wc(t?t[r]:void 0,n.slice(1),e,i);if(Dr(t)||er(t))return wN(t,r,o);if(i){var s=ZWe.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var ZWe=/^\d+$/;function ite(t,n,e){if(0===n.length)return e(t);if(!tte(t))throw new Error("Path doesn't exist");var i=n[0];return wN(t,i,ite(t[i],n.slice(1),e))}function xN(t,n){if(0===n.length)return t;if(!tte(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=bN(t);return er(i)&&i.splice(parseInt(e),1),Dr(i)&&delete i[e],i}return t}var r=n[0];return wN(t,r,xN(t[r],n.slice(1)))}function CN(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return ite(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=bN(o);return s.splice(parseInt(r),0,e),s})}function Ql(t,n){return void 0!==t&&(0===n.length||null!==t&&Ql(t[n[0]],n.slice(1)))}function qc(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function gt(t){return t.map(rte).join("")}function rte(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function SN(t,n){return t+rte(n)}function vv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Yc(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:XWe;if(p.length=0?B=function(){var $="",V=!0;"-"==t[s]&&($+=h()),$+="0"==t[s]?h():g(),"."==t[s]&&($+=h()+g(),V=!1),"e"!=t[s]&&"E"!=t[s]||($+=h(),"+"!=t[s]&&"-"!=t[s]||($+=h()),$+=g(),V=!1);var z=+$;return a&&V&&(z>Number.MAX_SAFE_INTEGER||z="a"&&B<="f"?j+=B.charCodeAt()-cqe+10:B>="0"&&B<="9"?j+=+B:C()}return String.fromCharCode(j)}function g(){for(var T="";t[s]>="0"&&t[s]<="9";)T+=h();if(T.length)return T;k(),b()}function m(T,j){v(T,j,y())}function v(T,j,B){i[T]=i[T]||{},i[T][j]=B}function y(){return{line:r,column:o,pos:s}}function b(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),b()}function k(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},G2.stringify=function(t,n,e){if(W2(t)){var i,r,o=0,s="object"==xt(e)?e.space:e;switch(xt(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var dqe=/"|\\/g,hqe=/[\b]/g,fqe=/\f/g,pqe=/\n/g,gqe=/\r/g,mqe=/\t/g;function q2(t){return'"'+(t=t.replace(dqe,"\\$&").replace(fqe,"\\f").replace(hqe,"\\b").replace(pqe,"\\n").replace(gqe,"\\r").replace(mqe,"\\t"))+'"'}var vqe=/~/g,yqe=/\//g;function DN(t){return t.replace(vqe,"~0").replace(yqe,"~1")}function AN(t){return(AN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function EN(t){var n="function"==typeof Map?new Map:void 0;return EN=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return MN(e,arguments,f_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h_(r,e)},EN(t)}function MN(t,n,e){return(MN=dte()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&h_(a,o.prototype),a}).apply(null,arguments)}function dte(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h_(t,n){return(h_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function f_(t){return(f_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var af=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&h_(l,c)}(a,EN(Error));var n,e,i,s=(n=a,e=dte(),function(){var l,c=f_(n);if(e){var u=f_(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function _qe(t,n){if(n&&("object"===AN(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function Y2(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function J2(t){return t>=48&&t<=57}function bqe(t){return t>=32&&t<=1114111}var wqe=/^[,:[\]{}()\n]$/;function hte(t){return xqe.test(t)||t&&X2(t.charCodeAt(0))}var xqe=/^[[{\w-]$/;function Cqe(t){return 10===t||13===t||9===t||8===t||12===t}function K2(t){return 32===t||10===t||9===t||13===t}function Sqe(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function X2(t){return fte(t)||ON(t)}function fte(t){return 34===t||8220===t||8221===t}function ON(t){return 39===t||8216===t||8217===t||96===t||180===t}function p_(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function Qp(t,n){var e=t.length;if(!K2(t.charCodeAt(e-1)))return t+n;for(;K2(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function kqe(t,n,e){return t.substring(0,n)+t.substring(n+e)}var Tqe={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Dqe={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Yu(t){var n=0,e="";r()||function(){throw new af("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),hte(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=Qp(e,",")),function(){for(var b=!0,C=!0;C;)b?b=!1:l(44)||(e=Qp(e,",")),C=r();C||(e=p_(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=p_(e,",")),n>=t.length)return e;function r(){o();var b=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&k<=57)for(n++;J2(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);J2(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);J2(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),b}function o(){var b=n,C=s();do{(C=a())&&(C=s())}while(C);return n>b}function s(){for(var b,C="";(b=K2(t.charCodeAt(n)))||Sqe(t.charCodeAt(n));)C+=b?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;K2(t.charCodeAt(n-1))&&n>0;)n--;var k=t.slice(C,n);return e+=JSON.stringify(k),!0}}function f(b){if(!J2(t.charCodeAt(n))){var C=t.slice(b,n);throw new af("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(b){throw new af("Invalid character "+JSON.stringify(b),n)}function g(){throw new af("Object key expected",n)}function m(){throw new af("Object value expected",n)}function v(){throw new af("Colon expected",n)}function y(b){for(var C=b+2;/\w/.test(t[C]);)C++;var k=t.slice(b,C);throw new af('Invalid unicode character "'.concat(k,'"'),n)}!function(){throw new af("Unexpected character "+JSON.stringify(t[n]),n)}()}function Aqe(t,n){return"*"===t[n]&&"/"===t[n+1]}function Ho(t){return parseInt(t,10)}function IN(t){return Eqe.test(t)}var Eqe=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ar(t){return"object"===xt(t)&&null!==t&&t.constructor===Object}function $r(t){return"object"===xt(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function NN(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return NN(Number(t));try{var n=t&&t.valueOf();if(n!==t)return NN(n)}catch{return!1}return!1}function pte(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function jN(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return xt(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(Ar(t))return"object";var e=n.stringify(t);return e&&IN(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var Mqe=/^https?:\/\/\S+$/;function Q2(t){return"string"==typeof t&&Mqe.test(t)}function yv(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&(IN(e)?n.parse(e):t)}var Oqe=/^-?[0-9]+$/,mte="object"==(typeof global>"u"?"undefined":xt(global))&&global&&global.Object===Object&&global,Iqe="object"==(typeof self>"u"?"undefined":xt(self))&&self&&self.Object===Object&&self,Ss=mte||Iqe||Function("return this")(),ra=Ss.Symbol,vte=Object.prototype,Nqe=vte.hasOwnProperty,jqe=vte.toString,g_=ra?ra.toStringTag:void 0,Pqe=Object.prototype.toString,yte=ra?ra.toStringTag:void 0;function xa(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":yte&&yte in Object(t)?function(n){var e=Nqe.call(n,g_),i=n[g_];try{n[g_]=void 0;var r=!0}catch{}var o=jqe.call(n);return r&&(e?n[g_]=i:delete n[g_]),o}(t):Pqe.call(t)}function no(t){return null!=t&&"object"==xt(t)}function Ja(t){return"symbol"==xt(t)||no(t)&&"[object Symbol]"==xa(t)}function _te(t){return"number"==typeof t?t:Ja(t)?NaN:+t}function Wr(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var Pte=jte(Ete),rYe=/\{\n\/\* \[wrapped with (.+)\] \*/,oYe=/,? & /,sYe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function rS(t){return function(){return t}}var aYe=function(){try{var t=eg(Object,"defineProperty");return t({},"",{}),t}catch{}}(),oS=aYe,lYe=oS?function(t,n){return oS(t,"toString",{configurable:!0,enumerable:!1,value:rS(n),writable:!0})}:oa,LN=jte(lYe);function ec(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var cYe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function Lte(t,n,e){var o,i=n+"";return LN(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(sYe,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return ec(cYe,function(s){var a="_."+s[0];o&s[1]&&!aS(r,a)&&r.push(a)}),r.sort()}((o=i.match(rYe))?o[1].split(oYe):[],e)))}function Fte(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return RN(t)&&Pte(h,d),h.placeholder=i,Lte(h,t,n)}function xv(t){return t.placeholder}var uYe=/^(?:0|[1-9]\d*)$/;function rh(t,n){var e=xt(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&uYe.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function Ca(t){return null!=t&&__(t.length)&&!Ku(t)}function Sa(t,n,e){if(!Br(e))return!1;var i=xt(n);return!!("number"==i?Ca(e)&&rh(n,e.length):"string"==i&&n in e)&&tc(e[n],t)}function Cv(t){return hi(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&Sa(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":xt(exports))&&exports&&!exports.nodeType&&exports,Gte=zte&&"object"==(typeof module>"u"?"undefined":xt(module))&&module&&!module.nodeType&&module,Wte=Gte&&Gte.exports===zte?Ss.Buffer:void 0,ah=(Wte?Wte.isBuffer:void 0)||cS,Vr={};function Dl(t){return function(n){return t(n)}}Vr["[object Float32Array]"]=Vr["[object Float64Array]"]=Vr["[object Int8Array]"]=Vr["[object Int16Array]"]=Vr["[object Int32Array]"]=Vr["[object Uint8Array]"]=Vr["[object Uint8ClampedArray]"]=Vr["[object Uint16Array]"]=Vr["[object Uint32Array]"]=!0,Vr["[object Arguments]"]=Vr["[object Array]"]=Vr["[object ArrayBuffer]"]=Vr["[object Boolean]"]=Vr["[object DataView]"]=Vr["[object Date]"]=Vr["[object Error]"]=Vr["[object Function]"]=Vr["[object Map]"]=Vr["[object Number]"]=Vr["[object Object]"]=Vr["[object RegExp]"]=Vr["[object Set]"]=Vr["[object String]"]=Vr["[object WeakMap]"]=!1;var qte="object"==(typeof exports>"u"?"undefined":xt(exports))&&exports&&!exports.nodeType&&exports,w_=qte&&"object"==(typeof module>"u"?"undefined":xt(module))&&module&&!module.nodeType&&module,BN=w_&&w_.exports===qte&&mte.process,nc=function(){try{return w_&&w_.require&&w_.require("util").types||BN&&BN.binding&&BN.binding("util")}catch{}}(),Yte=nc&&nc.isTypedArray,tg=Yte?Dl(Yte):function(t){return no(t)&&__(t.length)&&!!Vr[xa(t)]},_Ye=Object.prototype.hasOwnProperty;function Jte(t,n){var e=Vn(t),i=!e&&cf(t),r=!e&&!i&&ah(t),o=!e&&!i&&!r&&tg(t),s=e||i||r||o,a=s?$N(t.length,String):[],l=a.length;for(var c in t)!n&&!_Ye.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rh(c,l))||a.push(c);return a}function Kte(t,n){return function(e){return t(n(e))}}var bYe=Kte(Object.keys,Object),wYe=Object.prototype.hasOwnProperty;function VN(t){if(!b_(t))return bYe(t);var n=[];for(var e in Object(t))wYe.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Uo(t){return Ca(t)?Jte(t):VN(t)}var xYe=Object.prototype.hasOwnProperty,CYe=Cv(function(t,n){if(b_(n)||Ca(n))Xu(n,Uo(n),t);else for(var e in n)xYe.call(n,e)&&y_(t,e,n[e])}),Xte=CYe,SYe=Object.prototype.hasOwnProperty;function ka(t){return Ca(t)?Jte(t,!0):function kYe(t){if(!Br(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=b_(t),e=[];for(var i in t)("constructor"!=i||!n&&SYe.call(t,i))&&e.push(i);return e}(t)}var TYe=Cv(function(t,n){Xu(n,ka(n),t)}),uS=TYe,DYe=Cv(function(t,n,e,i){Xu(n,ka(n),t,i)}),Sv=DYe,AYe=Cv(function(t,n,e,i){Xu(n,Uo(n),t,i)}),Qte=AYe,EYe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MYe=/^\w*$/;function HN(t,n){if(Vn(t))return!1;var e=xt(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Ja(t))||MYe.test(t)||!EYe.test(t)||null!=n&&t in Object(n)}var x_=eg(Object,"create"),OYe=Object.prototype.hasOwnProperty,IYe=Object.prototype.hasOwnProperty;function ng(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},lh.prototype.set=function(t,n){var e=this.__data__,i=dS(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var C_=eg(Ss,"Map");function hS(t,n){var i,r,e=t.__data__;return("string"==(r=xt(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function ch(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?Bs(a,n-1,e,i,r):df(r,a):i||(r[r.length]=a)}return r}function zN(t){return null!=t&&t.length?Bs(t,1):[]}function uh(t){return LN(Vte(t,void 0,zN),t+"")}var tne=uh(UN),pS=Kte(Object.getPrototypeOf,Object),nne=Function.prototype.toString,BYe=Object.prototype.hasOwnProperty,VYe=nne.call(Object);function Tv(t){if(!no(t)||"[object Object]"!=xa(t))return!1;var n=pS(t);if(null===n)return!0;var e=BYe.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&nne.call(e)==VYe}function gS(t){if(!no(t))return!1;var n=xa(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Tv(t)}var HYe=hi(function(t,n){try{return Tl(t,void 0,n)}catch(e){return gS(e)?e:new Error(e)}}),GN=HYe;function WN(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Kn(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var qN=hi(function(t,n,e){var i=1;if(e.length){var r=lf(e,xv(qN));i|=32}return oh(t,i,n,e,r)});qN.placeholder={};var YN=qN,UYe=uh(function(t,n){return ec(n,function(e){e=Qu(e),sh(t,e,YN(t[e],t))}),t}),ine=UYe,JN=hi(function(t,n,e){var i=3;if(e.length){var r=lf(e,xv(JN));i|=32}return oh(n,i,t,e,r)});JN.placeholder={};var rne=JN;function ic(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:ic(t,n,e)}var zYe=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Dv(t){return zYe.test(t)}var KN="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",XN="\\ud83c[\\udffb-\\udfff]",one="[^\\ud800-\\udfff]",sne="(?:\\ud83c[\\udde6-\\uddff]){2}",ane="[\\ud800-\\udbff][\\udc00-\\udfff]",lne="(?:"+KN+"|"+XN+")?",WYe="[\\ufe0e\\ufe0f]?"+lne+"(?:\\u200d(?:"+[one,sne,ane].join("|")+")[\\ufe0e\\ufe0f]?"+lne+")*",qYe="(?:"+[one+KN+"?",KN,sne,ane,"[\\ud800-\\udfff]"].join("|")+")",YYe=RegExp(XN+"(?="+XN+")|"+qYe+WYe,"g");function Kc(t){return Dv(t)?function(n){return n.match(YYe)||[]}(t):function(n){return n.split("")}(t)}function cne(t){return function(n){var e=Dv(n=Wi(n))?Kc(n):void 0,i=e?e[0]:n.charAt(0),r=e?hf(e,1).join(""):n.slice(1);return i[t]()+r}}var mS=cne("toUpperCase");function QN(t){return mS(Wi(t).toLowerCase())}function ZN(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function Cne(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=kl(e))==e?e:0),void 0!==n&&(n=(n=kl(n))==n?n:0),rg(kl(t),n,e)}function Xc(t){var n=this.__data__=new lh(t);this.size=n.size}function Sne(t,n){return t&&Xu(n,Uo(n),t)}Xc.prototype.clear=function(){this.__data__=new lh,this.size=0},Xc.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Xc.prototype.get=function(t){return this.__data__.get(t)},Xc.prototype.has=function(t){return this.__data__.has(t)},Xc.prototype.set=function(t,n){var e=this.__data__;if(e instanceof lh){var i=e.__data__;if(!C_||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new ch(i)}return e.set(t,n),this.size=e.size,this};var kne="object"==(typeof exports>"u"?"undefined":xt(exports))&&exports&&!exports.nodeType&&exports,Tne=kne&&"object"==(typeof module>"u"?"undefined":xt(module))&&module&&!module.nodeType&&module,Dne=Tne&&Tne.exports===kne?Ss.Buffer:void 0,Ane=Dne?Dne.allocUnsafe:void 0;function Ene(t,n){if(n)return t.slice();var e=t.length,i=Ane?Ane(e):new t.constructor(e);return t.copy(i),i}function ff(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new sg:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&b-c>=o}function m(){var C,k,b=T_();if(g(b))return v(b);a=setTimeout(m,(k=n-((C=b)-l),d?MJe(k,o-(C-c)):k))}function v(b){return a=void 0,h&&i?f(b):(i=r=void 0,s)}function y(){var b=T_(),C=g(b);if(i=arguments,r=this,l=b,C){if(void 0===a)return function p(b){return c=b,a=setTimeout(m,n),u?f(b):s}(l);if(d)return clearTimeout(a),a=setTimeout(m,n),f(l)}return void 0===a&&(a=setTimeout(m,n)),s}return n=kl(n)||0,Br(e)&&(u=!!e.leading,o=(d="maxWait"in e)?EJe(kl(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(T_())},y}function sie(t,n){return null==t||t!=t?n:t}var aie=Object.prototype,OJe=aie.hasOwnProperty,IJe=hi(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&Sa(n[0],n[1],r)&&(i=1);++e=200&&(o=S_,s=!1,n=new sg(n));e:for(;++r=0&&t.slice(e,r)==n}function kie(t){return function(n){var i,r,o,e=Zu(n);return"[object Map]"==e?mj(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Wr(r,function(o){return[o,i[o]]})}(n,t(n))}}var AS=kie(Uo),ES=kie(ka),BJe=ej({"&":"&","<":"<",">":">",'"':""","'":"'"}),Tie=/[&<>"']/g,VJe=RegExp(Tie.source);function Ej(t){return(t=Wi(t))&&VJe.test(t)?t.replace(Tie,BJe):t}var Die=/[\\^$.*+?()[\]{}|]/g,HJe=RegExp(Die.source);function Aie(t){return(t=Wi(t))&&HJe.test(t)?t.replace(Die,"\\$&"):t}function Eie(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Kn(l))<0&&(l+=c),l=a>l?0:Mj(l);a-1?r[o?n[s]:s]:void 0}}var zJe=Math.max;function Oj(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Kn(e);return r<0&&(r=zJe(i+r,0)),sS(t,Hn(n),r)}var Pie=jie(Oj);function Rie(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function Lie(t,n){return Rie(t,Hn(n),ed)}var GJe=Math.max,WJe=Math.min;function Ij(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Kn(e),r=e<0?GJe(i+r,0):WJe(r,i-1)),sS(t,Hn(n),r,!0)}var Fie=jie(Ij);function $ie(t,n){return Rie(t,Hn(n),Aj)}function as(t){return t&&t.length?t[0]:void 0}function Bie(t,n){var e=-1,i=Ca(t)?Array(t.length):[];return pf(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function Iv(t,n){return(Vn(t)?Wr:Bie)(t,Hn(n))}function Vie(t,n){return Bs(Iv(t,n),1)}function Hie(t,n){return Bs(Iv(t,n),1/0)}function Uie(t,n,e){return e=void 0===e?1:Kn(e),Bs(Iv(t,n),e)}function zie(t){return null!=t&&t.length?Bs(t,1/0):[]}function Gie(t,n){return null!=t&&t.length?Bs(t,n=void 0===n?1:Kn(n)):[]}function Wie(t){return oh(t,512)}var qie=ij("floor");function Yie(t){return uh(function(n){var e=n.length,i=e,r=Zl.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==iS(o))var s=new Zl([],!0)}for(i=s?i:e;++in}function OS(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=kl(n),e=kl(e)),t(n,e)}}var rre=OS(Nj),ore=OS(function(t,n){return t>=n}),JJe=Object.prototype.hasOwnProperty;function KJe(t,n){return null!=t&&JJe.call(t,n)}function sre(t,n){return null!=t&&Kne(t,n,KJe)}var XJe=Math.max,QJe=Math.min;function are(t,n,e){return n=Ju(n),void 0===e?(e=n,n=0):e=Ju(e),(i=t=kl(t))>=QJe(r=n,o=e)&&i-1:!!r&&wv(t,n,e)>-1}var eKe=Math.max;function cre(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Kn(e);return r<0&&(r=eKe(i+r,0)),wv(t,n,r)}function Qn(t){return null!=t&&t.length?ic(t,0,-1):[]}var tKe=Math.min;function Pj(t,n,e){for(var i=e?Dj:aS,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Wr(u,Dl(n))),l=tKe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new sg(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function Rre(t){return void 0===t}function Lre(t){return no(t)&&"[object WeakMap]"==Zu(t)}function Fre(t){return no(t)&&"[object WeakSet]"==xa(t)}function $re(t){return Hn("function"==typeof t?t:rc(t,1))}var hKe=Array.prototype.join;function Bre(t,n){return null==t?"":hKe.call(t,n)}var fKe=Ev(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Vre=fKe,pKe=xS(function(t,n,e){sh(t,e,n)}),Hre=pKe,gKe=Math.max,mKe=Math.min;function Ure(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Kn(e))<0?gKe(i+r,0):mKe(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):sS(t,Rte,r,!0)}var vKe=Ev(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),zre=vKe,Gre=cne("toLowerCase");function $j(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function aoe(t,n){var e=t.length;if(e)return rh(n+=n<0?e:0,e)?t[n]:void 0}function loe(t,n){return t&&t.length?aoe(t,Kn(n)):void 0}function coe(t){return t=Kn(t),hi(function(n){return aoe(n,t)})}function Wj(t,n){return null==(t=vre(t,n=uf(n,t)))||delete t[Qu(Rt(n))]}function wKe(t){return Tv(t)?void 0:t}var xKe=uh(function(t,n){var e={};if(null==t)return e;var i=!1;n=Wr(n,function(o){return o=uf(o,t),i||(i=o.length>1),o}),Xu(t,aj(t),e),i&&(e=rc(e,7,wKe));for(var r=n.length;r--;)Wj(e,n[r]);return e}),uoe=xKe;function O_(t,n,e,i){if(!Br(t))return t;for(var r=-1,o=(n=uf(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?g:g*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(Bie(t,function(o,s,a){return{criteria:Wr(n,function(c){return c(o)}),index:++i,value:o}}))}function moe(t,n,e,i){return null==t?[]:(Vn(n)||(n=null==n?[]:[n]),Vn(e=i?void 0:e)||(e=null==e?[]:[e]),goe(t,n,e))}function Yj(t){return uh(function(n){return n=Wr(n,Dl(Hn)),hi(function(e){var i=this;return t(n,function(r){return Tl(r,i,e)})})})}var voe=Yj(Wr),SKe=Math.min,kKe=hi(function(t,n){var e=(n=1==n.length&&Vn(n[0])?Wr(n[0],Dl(Hn)):Wr(Bs(n,1),Dl(Hn))).length;return hi(function(i){for(var r=-1,o=SKe(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=TKe(n/2))&&(t+=t)}while(n);return e}var DKe=bj("length"),Kj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xj="\\ud83c[\\udffb-\\udfff]",woe="[^\\ud800-\\udfff]",xoe="(?:\\ud83c[\\udde6-\\uddff]){2}",Coe="[\\ud800-\\udbff][\\udc00-\\udfff]",Soe="(?:"+Kj+"|"+Xj+")?",EKe="[\\ufe0e\\ufe0f]?"+Soe+"(?:\\u200d(?:"+[woe,xoe,Coe].join("|")+")[\\ufe0e\\ufe0f]?"+Soe+")*",MKe="(?:"+[woe+Kj+"?",Kj,xoe,Coe,"[\\ud800-\\udfff]"].join("|")+")",koe=RegExp(Xj+"(?="+Xj+")|"+MKe+EKe,"g");function Rv(t){return Dv(t)?function(n){for(var e=koe.lastIndex=0;koe.test(n);)++e;return e}(t):DKe(t)}var OKe=Math.ceil;function jS(t,n){var e=(n=void 0===n?" ":Sl(n)).length;if(e<2)return e?Jj(n,t):n;var i=Jj(n,OKe(t/Rv(n)));return Dv(n)?hf(Kc(i),0,t).join(""):i.slice(0,t)}var IKe=Math.ceil,NKe=Math.floor;function Toe(t,n,e){t=Wi(t);var i=(n=Kn(n))?Rv(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return jS(NKe(r),e)+t+jS(IKe(r),e)}function Doe(t,n,e){t=Wi(t);var i=(n=Kn(n))?Rv(t):0;return n&&i-1;)a!==t&&Noe.call(a,l,1),Noe.call(t,l,1);return t}function rP(t,n){return t&&t.length&&n&&n.length?iP(t,n):t}var joe=hi(rP);function Poe(t,n,e){return t&&t.length&&n&&n.length?iP(t,n,Hn(e)):t}function Roe(t,n,e){return t&&t.length&&n&&n.length?iP(t,n,void 0,e):t}var $Ke=Array.prototype.splice;function Loe(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;rh(r)?$Ke.call(t,r,1):Wj(t,r)}}return t}var BKe=uh(function(t,n){var e=null==t?0:t.length,i=UN(t,n);return Loe(t,Wr(n,function(r){return rh(r,e)?+r:r}).sort(poe)),i}),Foe=BKe,VKe=Math.floor,HKe=Math.random;function oP(t,n){return t+VKe(HKe()*(n-t+1))}var UKe=parseFloat,zKe=Math.min,GKe=Math.random;function $oe(t,n,e){if(e&&"boolean"!=typeof e&&Sa(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Ju(t),void 0===n?(n=t,t=0):n=Ju(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=GKe();return zKe(t+r*(n-t+UKe("1e-"+((r+"").length-1))),n)}return oP(t,n)}var WKe=Math.ceil,qKe=Math.max;function Boe(t){return function(n,e,i){return i&&"number"!=typeof i&&Sa(n,e,i)&&(e=i=void 0),n=Ju(n),void 0===e?(e=n,n=0):e=Ju(e),function(r,o,s,a){for(var l=-1,c=qKe(WKe((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&Sa(t,n[0],n[1])?n=[]:e>2&&Sa(n[0],n[1],n[2])&&(n=[n[0]]),goe(t,Bs(n,1),[])}),aP=rXe,oXe=Math.floor,sXe=Math.min;function lP(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Ja(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Ja(s)&&(e?s<=n:s>>0)?(t=Wi(t))&&("string"==typeof n||null!=n&&!IS(n))&&!(n=Sl(n))&&Dv(t)?hf(Kc(t),0,e):t.split(n,e):[]}var aXe=Math.max;function _se(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:aXe(Kn(n),0),hi(function(e){var i=e[n],r=hf(e,0,n);return i&&df(r,i),Tl(t,this,r)})}var lXe=Ev(function(t,n,e){return t+(e?" ":"")+mS(n)}),bse=lXe;function wse(t,n,e){return t=Wi(t),e=null==e?0:rg(Kn(e),0,t.length),n=Sl(n),t.slice(e,e+n.length)==n}function xse(){return{}}function Cse(){return""}function Sse(){return!0}var kse=Z2(function(t,n){return t-n},0);function Tse(t){return t&&t.length?Vj(t,oa):0}function Dse(t,n){return t&&t.length?Vj(t,Hn(n)):0}function Ase(t){var n=null==t?0:t.length;return n?ic(t,1,n):[]}function Ese(t,n,e){return t&&t.length?ic(t,0,(n=e||void 0===n?1:Kn(n))<0?0:n):[]}function Mse(t,n,e){var i=null==t?0:t.length;return i?ic(t,(n=i-(n=e||void 0===n?1:Kn(n)))<0?0:n,i):[]}function Ose(t,n){return t&&t.length?TS(t,Hn(n),!1,!0):[]}function Ise(t,n){return t&&t.length?TS(t,Hn(n)):[]}function Nse(t,n){return n(t),t}var jse=Object.prototype,cXe=jse.hasOwnProperty;function Pse(t,n,e,i){return void 0===t||tc(t,jse[e])&&!cXe.call(i,e)?n:t}var uXe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function dXe(t){return"\\"+uXe[t]}var Rse=/<%=([\s\S]+?)%>/g,FS={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Rse,variable:"",imports:{_:{escape:Ej}}},hXe=/\b__p \+= '';/g,fXe=/\b(__p \+=) '' \+/g,pXe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gXe=/[()=,{}\[\]\/\s]/,mXe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$S=/($^)/,vXe=/['\n\r\u2028\u2029\\]/g,Lse=Object.prototype.hasOwnProperty;function Fse(t,n,e){var i=FS.imports._.templateSettings||FS;e&&Sa(t,n,e)&&(n=void 0),t=Wi(t),n=Sv({},n,i,Pse);var r,o,s=Sv({},n.imports,i.imports,Pse),a=Uo(s),l=jj(s,a),c=0,u=n.interpolate||$S,d="__p += '",h=RegExp((n.escape||$S).source+"|"+u.source+"|"+(u===Rse?mXe:$S).source+"|"+(n.evaluate||$S).source+"|$","g"),f=Lse.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(m,v,y,b,C,k){return y||(y=b),d+=t.slice(c,k).replace(vXe,dXe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=k+m.length,m}),d+="';\n";var p=Lse.call(n,"variable")&&n.variable;if(p){if(gXe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(hXe,""):d).replace(fXe,"$1").replace(pXe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=GN(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(g.source=d,gS(g))throw g;return g}function cP(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Br(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),Ov(t,n,{leading:i,maxWait:n,trailing:r})}function Lv(t,n){return n(t)}var yXe=Math.min;function uP(t,n){if((t=Kn(t))<1||t>9007199254740991)return[];var e=4294967295,i=yXe(t,4294967295);t-=4294967295;for(var r=$N(i,n=td(n));++e-1;);return e}function Wse(t,n){for(var e=-1,i=t.length;++e-1;);return e}function qse(t,n,e){if((t=Wi(t))&&(e||void 0===n))return Ste(t);if(!t||!(n=Sl(n)))return t;var i=Kc(t),r=Kc(n);return hf(i,Wse(i,r),Gse(i,r)+1).join("")}function Yse(t,n,e){if((t=Wi(t))&&(e||void 0===n))return t.slice(0,Cte(t)+1);if(!t||!(n=Sl(n)))return t;var i=Kc(t);return hf(i,0,Gse(i,Kc(n))+1).join("")}var _Xe=/^\s+/;function Jse(t,n,e){if((t=Wi(t))&&(e||void 0===n))return t.replace(_Xe,"");if(!t||!(n=Sl(n)))return t;var i=Kc(t);return hf(i,Wse(i,Kc(n))).join("")}var bXe=/\w*$/;function Kse(t,n){var e=30,i="...";if(Br(n)){var r="separator"in n?n.separator:r;e="length"in n?Kn(n.length):e,i="omission"in n?Sl(n.omission):i}var o=(t=Wi(t)).length;if(Dv(t)){var s=Kc(t);o=s.length}if(e>=o)return t;var a=e-Rv(i);if(a<1)return i;var l=s?hf(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),IS(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Wi(bXe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(Sl(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function Xse(t){return FN(t,1)}var wXe=ej({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Qse=/&(?:amp|lt|gt|quot|#39);/g,xXe=RegExp(Qse.source);function Zse(t){return(t=Wi(t))&&xXe.test(t)?t.replace(Qse,wXe):t}var CXe=Mv&&1/_S(new Mv([,-0]))[1]==1/0?function(t){return new Mv(t)}:ur,SXe=CXe;function gf(t,n,e){var i=-1,r=aS,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=Dj;else if(o>=200){var c=n?null:SXe(t);if(c)return _S(c);s=!1,r=S_,l=new sg}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Ei&&rh(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:Lv,args:[r],thisArg:void 0}),new Zl(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),pae=MXe;function gae(){return rj(this)}function mae(){var t=this.__wrapped__;if(t instanceof Ei){var n=t;return this.__actions__.length&&(n=new Ei(this)),(n=n.reverse()).__actions__.push({func:Lv,args:[PS],thisArg:void 0}),new Zl(n,this.__chain__)}return this.thru(PS)}function fP(t,n,e){var i=t.length;if(i<2)return i?gf(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,hP(t,e)}),Sae=IXe,qt={chunk:xne,compact:Hne,concat:Une,difference:pie,differenceBy:gie,differenceWith:mie,drop:yie,dropRight:_ie,dropRightWhile:bie,dropWhile:wie,fill:Oie,findIndex:Oj,findLastIndex:Ij,first:as,flatten:zN,flattenDeep:zie,flattenDepth:Gie,fromPairs:tre,head:as,indexOf:cre,initial:Qn,intersection:ure,intersectionBy:dre,intersectionWith:hre,join:Bre,last:Rt,lastIndexOf:Ure,nth:loe,pull:joe,pullAll:rP,pullAllBy:Poe,pullAllWith:Roe,pullAt:Foe,remove:qoe,reverse:PS,slice:sse,sortedIndex:cse,sortedIndexBy:use,sortedIndexOf:dse,sortedLastIndex:hse,sortedLastIndexBy:fse,sortedLastIndexOf:pse,sortedUniq:mse,sortedUniqBy:vse,tail:Ase,take:Ese,takeRight:Mse,takeRightWhile:Ose,takeWhile:Ise,union:eae,unionBy:tae,unionWith:nae,uniq:iae,uniqBy:rae,uniqWith:oae,unzip:BS,unzipWith:hP,without:hae,xor:vae,xorBy:yae,xorWith:_ae,zip:bae,zipObject:xae,zipObjectDeep:Cae,zipWith:Sae},dr={countBy:rie,each:DS,eachRight:A_,every:Mie,filter:Nie,find:Pie,findLast:Fie,flatMap:Vie,flatMapDeep:Hie,flatMapDepth:Uie,forEach:DS,forEachRight:A_,groupBy:Nv,includes:lre,invokeMap:_re,keyBy:Hre,map:Iv,orderBy:moe,partition:tP,reduce:zoe,reduceRight:Goe,reject:Woe,sample:ese,sampleSize:tse,shuffle:rse,size:ose,some:lse,sortBy:aP},NXe={now:T_},mo={after:kte,ary:FN,before:WN,bind:YN,bindKey:rne,curry:CS,curryRight:SS,debounce:Ov,defer:hie,delay:fie,flip:Wie,memoize:kv,negate:Pv,once:foe,overArgs:yoe,partial:Zj,partialRight:Moe,rearg:Hoe,rest:Koe,spread:_se,throttle:cP,unary:Xse,wrap:fae},mn={castArray:bne,clone:$ne,cloneDeep:Bne,cloneDeepWith:fj,cloneWith:Vne,conformsTo:tie,eq:tc,gt:rre,gte:ore,isArguments:cf,isArray:Vn,isArrayBuffer:wre,isArrayLike:Ca,isArrayLikeObject:go,isBoolean:xre,isBuffer:ah,isDate:Sre,isElement:kre,isEmpty:Yn,isEqual:ai,isEqualWith:Tre,isError:gS,isFinite:Dre,isFunction:Ku,isInteger:Lj,isLength:__,isMap:dj,isMatch:Are,isMatchWith:Ere,isNaN:Mre,isNative:Ore,isNil:Ire,isNull:Nre,isNumber:Fj,isObject:Br,isObjectLike:no,isPlainObject:Tv,isRegExp:IS,isSafeInteger:Pre,isSet:hj,isString:E_,isSymbol:Ja,isTypedArray:tg,isUndefined:Rre,isWeakMap:Lre,isWeakSet:Fre,lt:Wre,lte:qre,toArray:zj,toFinite:Ju,toInteger:Kn,toLength:Mj,toNumber:kl,toPlainObject:kj,toSafeInteger:Hse,toString:Wi},Ta={add:xte,ceil:wne,divide:vie,floor:qie,max:Xre,maxBy:Qre,mean:eoe,meanBy:toe,min:ooe,minBy:jv,multiply:soe,round:Qoe,subtract:kse,sum:Tse,sumBy:Dse},jXe=Cne,PXe=are,RXe=$oe,jn={assign:Xte,assignIn:uS,assignInWith:Sv,assignWith:Qte,at:tne,create:oie,defaults:lie,defaultsDeep:uie,entries:AS,entriesIn:ES,extend:uS,extendWith:Sv,findKey:Lie,findLastKey:$ie,forIn:Xie,forInRight:Qie,forOwn:Zie,forOwnRight:ere,functions:nre,functionsIn:ire,get:fS,has:sre,hasIn:wS,invert:pre,invertBy:mre,invoke:yre,keys:Uo,keysIn:ka,mapKeys:Yre,mapValues:Bj,merge:noe,mergeWith:Tj,omit:uoe,omitBy:hoe,pick:Ooe,pickBy:qj,result:Xoe,set:nse,setWith:ise,toPairs:AS,toPairsIn:ES,transform:zse,unset:sae,update:lae,updateWith:cae,values:ag,valuesIn:dae},nd={at:pae,chain:rj,commit:pj,lodash:re,next:Gj,plant:nP,reverse:mae,tap:Nse,thru:Lv,toIterator:dP,toJSON:lg,value:lg,valueOf:lg,wrapperChain:gae},qi={camelCase:_ne,capitalize:QN,deburr:tj,endsWith:Sie,escape:Ej,escapeRegExp:Aie,kebabCase:Vre,lowerCase:zre,lowerFirst:Gre,pad:Toe,padEnd:Doe,padStart:Aoe,parseInt:Eoe,repeat:Yoe,replace:Joe,snakeCase:ase,split:yse,startCase:bse,startsWith:wse,template:Fse,templateSettings:FS,toLower:Bse,toUpper:Use,trim:qse,trimEnd:Yse,trimStart:Jse,truncate:Kse,unescape:Zse,upperCase:uae,upperFirst:mS,words:nj},tr={attempt:GN,bindAll:ine,cond:Qne,conforms:eie,constant:rS,defaultTo:sie,flow:Jie,flowRight:Kie,identity:oa,iteratee:$re,matches:Jre,matchesProperty:Kre,method:ioe,methodOf:roe,mixin:Hj,noop:ur,nthArg:coe,over:voe,overEvery:_oe,overSome:boe,property:wj,propertyOf:Ioe,range:sP,rangeRight:Voe,stubArray:vS,stubFalse:cS,stubObject:xse,stubString:Cse,stubTrue:Sse,times:uP,toPath:Vse,uniqueId:mf},LXe=Math.max,FXe=Math.min,$Xe=Math.min,BXe=Array.prototype,kae=Object.prototype.hasOwnProperty,Tae=ra?ra.iterator:void 0,VXe=Math.max,Dae=Math.min,gP=function(t){return function(n,e,i){if(null==i){var r=Br(e),o=r&&Uo(e),s=o&&o.length&&MS(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(Hj);re.after=mo.after,re.ary=mo.ary,re.assign=jn.assign,re.assignIn=jn.assignIn,re.assignInWith=jn.assignInWith,re.assignWith=jn.assignWith,re.at=jn.at,re.before=mo.before,re.bind=mo.bind,re.bindAll=tr.bindAll,re.bindKey=mo.bindKey,re.castArray=mn.castArray,re.chain=nd.chain,re.chunk=qt.chunk,re.compact=qt.compact,re.concat=qt.concat,re.cond=tr.cond,re.conforms=tr.conforms,re.constant=tr.constant,re.countBy=dr.countBy,re.create=jn.create,re.curry=mo.curry,re.curryRight=mo.curryRight,re.debounce=mo.debounce,re.defaults=jn.defaults,re.defaultsDeep=jn.defaultsDeep,re.defer=mo.defer,re.delay=mo.delay,re.difference=qt.difference,re.differenceBy=qt.differenceBy,re.differenceWith=qt.differenceWith,re.drop=qt.drop,re.dropRight=qt.dropRight,re.dropRightWhile=qt.dropRightWhile,re.dropWhile=qt.dropWhile,re.fill=qt.fill,re.filter=dr.filter,re.flatMap=dr.flatMap,re.flatMapDeep=dr.flatMapDeep,re.flatMapDepth=dr.flatMapDepth,re.flatten=qt.flatten,re.flattenDeep=qt.flattenDeep,re.flattenDepth=qt.flattenDepth,re.flip=mo.flip,re.flow=tr.flow,re.flowRight=tr.flowRight,re.fromPairs=qt.fromPairs,re.functions=jn.functions,re.functionsIn=jn.functionsIn,re.groupBy=dr.groupBy,re.initial=qt.initial,re.intersection=qt.intersection,re.intersectionBy=qt.intersectionBy,re.intersectionWith=qt.intersectionWith,re.invert=jn.invert,re.invertBy=jn.invertBy,re.invokeMap=dr.invokeMap,re.iteratee=tr.iteratee,re.keyBy=dr.keyBy,re.keys=Uo,re.keysIn=jn.keysIn,re.map=dr.map,re.mapKeys=jn.mapKeys,re.mapValues=jn.mapValues,re.matches=tr.matches,re.matchesProperty=tr.matchesProperty,re.memoize=mo.memoize,re.merge=jn.merge,re.mergeWith=jn.mergeWith,re.method=tr.method,re.methodOf=tr.methodOf,re.mixin=gP,re.negate=Pv,re.nthArg=tr.nthArg,re.omit=jn.omit,re.omitBy=jn.omitBy,re.once=mo.once,re.orderBy=dr.orderBy,re.over=tr.over,re.overArgs=mo.overArgs,re.overEvery=tr.overEvery,re.overSome=tr.overSome,re.partial=mo.partial,re.partialRight=mo.partialRight,re.partition=dr.partition,re.pick=jn.pick,re.pickBy=jn.pickBy,re.property=tr.property,re.propertyOf=tr.propertyOf,re.pull=qt.pull,re.pullAll=qt.pullAll,re.pullAllBy=qt.pullAllBy,re.pullAllWith=qt.pullAllWith,re.pullAt=qt.pullAt,re.range=tr.range,re.rangeRight=tr.rangeRight,re.rearg=mo.rearg,re.reject=dr.reject,re.remove=qt.remove,re.rest=mo.rest,re.reverse=qt.reverse,re.sampleSize=dr.sampleSize,re.set=jn.set,re.setWith=jn.setWith,re.shuffle=dr.shuffle,re.slice=qt.slice,re.sortBy=dr.sortBy,re.sortedUniq=qt.sortedUniq,re.sortedUniqBy=qt.sortedUniqBy,re.split=qi.split,re.spread=mo.spread,re.tail=qt.tail,re.take=qt.take,re.takeRight=qt.takeRight,re.takeRightWhile=qt.takeRightWhile,re.takeWhile=qt.takeWhile,re.tap=nd.tap,re.throttle=mo.throttle,re.thru=Lv,re.toArray=mn.toArray,re.toPairs=jn.toPairs,re.toPairsIn=jn.toPairsIn,re.toPath=tr.toPath,re.toPlainObject=mn.toPlainObject,re.transform=jn.transform,re.unary=mo.unary,re.union=qt.union,re.unionBy=qt.unionBy,re.unionWith=qt.unionWith,re.uniq=qt.uniq,re.uniqBy=qt.uniqBy,re.uniqWith=qt.uniqWith,re.unset=jn.unset,re.unzip=qt.unzip,re.unzipWith=qt.unzipWith,re.update=jn.update,re.updateWith=jn.updateWith,re.values=jn.values,re.valuesIn=jn.valuesIn,re.without=qt.without,re.words=qi.words,re.wrap=mo.wrap,re.xor=qt.xor,re.xorBy=qt.xorBy,re.xorWith=qt.xorWith,re.zip=qt.zip,re.zipObject=qt.zipObject,re.zipObjectDeep=qt.zipObjectDeep,re.zipWith=qt.zipWith,re.entries=jn.toPairs,re.entriesIn=jn.toPairsIn,re.extend=jn.assignIn,re.extendWith=jn.assignInWith,gP(re,re),re.add=Ta.add,re.attempt=tr.attempt,re.camelCase=qi.camelCase,re.capitalize=qi.capitalize,re.ceil=Ta.ceil,re.clamp=jXe,re.clone=mn.clone,re.cloneDeep=mn.cloneDeep,re.cloneDeepWith=mn.cloneDeepWith,re.cloneWith=mn.cloneWith,re.conformsTo=mn.conformsTo,re.deburr=qi.deburr,re.defaultTo=tr.defaultTo,re.divide=Ta.divide,re.endsWith=qi.endsWith,re.eq=mn.eq,re.escape=qi.escape,re.escapeRegExp=qi.escapeRegExp,re.every=dr.every,re.find=dr.find,re.findIndex=qt.findIndex,re.findKey=jn.findKey,re.findLast=dr.findLast,re.findLastIndex=qt.findLastIndex,re.findLastKey=jn.findLastKey,re.floor=Ta.floor,re.forEach=dr.forEach,re.forEachRight=dr.forEachRight,re.forIn=jn.forIn,re.forInRight=jn.forInRight,re.forOwn=jn.forOwn,re.forOwnRight=jn.forOwnRight,re.get=jn.get,re.gt=mn.gt,re.gte=mn.gte,re.has=jn.has,re.hasIn=jn.hasIn,re.head=qt.head,re.identity=oa,re.includes=dr.includes,re.indexOf=qt.indexOf,re.inRange=PXe,re.invoke=jn.invoke,re.isArguments=mn.isArguments,re.isArray=Vn,re.isArrayBuffer=mn.isArrayBuffer,re.isArrayLike=mn.isArrayLike,re.isArrayLikeObject=mn.isArrayLikeObject,re.isBoolean=mn.isBoolean,re.isBuffer=mn.isBuffer,re.isDate=mn.isDate,re.isElement=mn.isElement,re.isEmpty=mn.isEmpty,re.isEqual=mn.isEqual,re.isEqualWith=mn.isEqualWith,re.isError=mn.isError,re.isFinite=mn.isFinite,re.isFunction=mn.isFunction,re.isInteger=mn.isInteger,re.isLength=mn.isLength,re.isMap=mn.isMap,re.isMatch=mn.isMatch,re.isMatchWith=mn.isMatchWith,re.isNaN=mn.isNaN,re.isNative=mn.isNative,re.isNil=mn.isNil,re.isNull=mn.isNull,re.isNumber=mn.isNumber,re.isObject=Br,re.isObjectLike=mn.isObjectLike,re.isPlainObject=mn.isPlainObject,re.isRegExp=mn.isRegExp,re.isSafeInteger=mn.isSafeInteger,re.isSet=mn.isSet,re.isString=mn.isString,re.isSymbol=mn.isSymbol,re.isTypedArray=mn.isTypedArray,re.isUndefined=mn.isUndefined,re.isWeakMap=mn.isWeakMap,re.isWeakSet=mn.isWeakSet,re.join=qt.join,re.kebabCase=qi.kebabCase,re.last=Rt,re.lastIndexOf=qt.lastIndexOf,re.lowerCase=qi.lowerCase,re.lowerFirst=qi.lowerFirst,re.lt=mn.lt,re.lte=mn.lte,re.max=Ta.max,re.maxBy=Ta.maxBy,re.mean=Ta.mean,re.meanBy=Ta.meanBy,re.min=Ta.min,re.minBy=Ta.minBy,re.stubArray=tr.stubArray,re.stubFalse=tr.stubFalse,re.stubObject=tr.stubObject,re.stubString=tr.stubString,re.stubTrue=tr.stubTrue,re.multiply=Ta.multiply,re.nth=qt.nth,re.noop=tr.noop,re.now=NXe.now,re.pad=qi.pad,re.padEnd=qi.padEnd,re.padStart=qi.padStart,re.parseInt=qi.parseInt,re.random=RXe,re.reduce=dr.reduce,re.reduceRight=dr.reduceRight,re.repeat=qi.repeat,re.replace=qi.replace,re.result=jn.result,re.round=Ta.round,re.sample=dr.sample,re.size=dr.size,re.snakeCase=qi.snakeCase,re.some=dr.some,re.sortedIndex=qt.sortedIndex,re.sortedIndexBy=qt.sortedIndexBy,re.sortedIndexOf=qt.sortedIndexOf,re.sortedLastIndex=qt.sortedLastIndex,re.sortedLastIndexBy=qt.sortedLastIndexBy,re.sortedLastIndexOf=qt.sortedLastIndexOf,re.startCase=qi.startCase,re.startsWith=qi.startsWith,re.subtract=Ta.subtract,re.sum=Ta.sum,re.sumBy=Ta.sumBy,re.template=qi.template,re.times=tr.times,re.toFinite=mn.toFinite,re.toInteger=Kn,re.toLength=mn.toLength,re.toLower=qi.toLower,re.toNumber=mn.toNumber,re.toSafeInteger=mn.toSafeInteger,re.toString=mn.toString,re.toUpper=qi.toUpper,re.trim=qi.trim,re.trimEnd=qi.trimEnd,re.trimStart=qi.trimStart,re.truncate=qi.truncate,re.unescape=qi.unescape,re.uniqueId=tr.uniqueId,re.upperCase=qi.upperCase,re.upperFirst=qi.upperFirst,re.each=dr.forEach,re.eachRight=dr.forEachRight,re.first=qt.head,gP(re,(pP={},ed(re,function(t,n){kae.call(re.prototype,n)||(pP[n]=t)}),pP),{chain:!1}),re.VERSION="4.17.21",(re.templateSettings=qi.templateSettings).imports._=re,ec(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){re[t].placeholder=re}),ec(["drop","take"],function(t,n){Ei.prototype[t]=function(e){e=void 0===e?1:VXe(Kn(e),0);var i=this.__filtered__&&!n?new Ei(this):this.clone();return i.__filtered__?i.__takeCount__=Dae(e,i.__takeCount__):i.__views__.push({size:Dae(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Ei.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ec(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Ei.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Hn(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),ec(["head","last"],function(t,n){var e="take"+(n?"Right":"");Ei.prototype[t]=function(){return this[e](1).value()[0]}}),ec(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Ei.prototype[t]=function(){return this.__filtered__?new Ei(this):this[e](1)}}),Ei.prototype.compact=function(){return this.filter(oa)},Ei.prototype.find=function(t){return this.filter(t).head()},Ei.prototype.findLast=function(t){return this.reverse().find(t)},Ei.prototype.invokeMap=hi(function(t,n){return"function"==typeof t?new Ei(this):this.map(function(e){return M_(e,t,n)})}),Ei.prototype.reject=function(t){return this.filter(Pv(Hn(t)))},Ei.prototype.slice=function(t,n){t=Kn(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Ei(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Kn(n))<0?e.dropRight(-n):e.take(n-t)),e)},Ei.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ei.prototype.toArray=function(){return this.take(4294967295)},ed(Ei.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=re[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(re.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Ei,c=a[0],u=l||Vn(s),d=function(v){var y=r.apply(re,df([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,g=l&&!this.__actions__.length;if(!o&&u){s=g?s:new Ei(this);var m=t.apply(s,a);return m.__actions__.push({func:Lv,args:[d],thisArg:void 0}),new Zl(m,h)}return p&&g?t.apply(this,a):(m=this.thru(d),p?i?m.value()[0]:m.value():m)})}),ec(["pop","push","shift","sort","splice","unshift"],function(t){var n=BXe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);re.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(Vn(o)?o:[],r)}return this[e](function(s){return n.apply(Vn(s)?s:[],r)})}}),ed(Ei.prototype,function(t,n){var e=re[n];if(e){var i=e.name+"";kae.call(bv,i)||(bv[i]=[]),bv[i].push({name:n,func:e})}}),bv[lS(void 0,2).name]=[{name:"wrapper",func:void 0}],Ei.prototype.clone=function(){var t=new Ei(this.__wrapped__);return t.__actions__=Ka(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ka(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ka(this.__views__),t},Ei.prototype.reverse=function(){if(this.__filtered__){var t=new Ei(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ei.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Vn(t),i=n<0,r=e?t.length:0,o=function(k,T,j){for(var B=-1,N=j.length;++B1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!Ar(l)||n&&c.length>0)&&(e[gt(c)]=!0),Ar(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function Eae(t){return Ee({},t)}function Mae(t){return Object.values(t)}function Oae(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(sn(o))),r}function vP(t,n){try{return n.parse(t)}catch{return n.parse(Yu(t))}}function Iae(t,n){try{return vP(t,n)}catch{return}}function HS(t,n){t=t.replace(jae,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function Nae(t){t=t.replace(jae,"");try{return Yu(t)}catch{}try{var n=Yu("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Yu("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var jae=/,\s*$/;function US(t,n){var e=Lae.exec(n);if(e){var i=Ho(e[2]),r=function(f,p){for(var m=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return Fv(t)?t:{text:e.stringify(t.json,null,n)}}function Pae(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return _P(t)?t:{json:n.parse(t.text)}}function zS(t,n,e){return cg(t,n,e).text}function Rae(t,n){return function GXe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(Fv(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(Ar(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var Lae=/(position|char) (\d+)/,WXe=/line (\d+)/,qXe=/column (\d+)/;function $ae(t){return YXe.test(t)&&t.length>2}var YXe=/^[[{]\S/;function bP(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?JXe:KXe:e?XXe:QXe}var JXe={escapeValue:function(t){return Bae(Uae(String(t)))},unescapeValue:function(t){return zae(Vae(t))}},KXe={escapeValue:function(t){return Uae(String(t))},unescapeValue:function(t){return zae(t)}},XXe={escapeValue:function(t){return Bae(String(t))},unescapeValue:function(t){return Vae(t)}},QXe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function Bae(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function Vae(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return Hae[e]||e}catch{return n}})}var Hae={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},ZXe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function Uae(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return Hae[n]||n})}function zae(t){return t.replace(/\\["bfnrt\\]/g,function(n){return ZXe[n]||n})}function ug(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function Gae(t,n){return I_(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function dg(t,n,e){return I_(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function I_(t,n){return!!wP(t,n)}function wP(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function Wae(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function GS(t,n,e){var i=$v(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,Wae(r))}}function $v(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function WS(t){var e=$v(t)?.document.activeElement;return!!e&&I_(e,function(i){return i===t})}function qae(t,n){return wP(t,function(e){return e.nodeName===n})}function xP(t){return dg(t,"data-type","selectable-key")?Zi.key:dg(t,"data-type","selectable-value")?Zi.value:dg(t,"data-type","insert-selection-area-inside")?Zi.inside:dg(t,"data-type","insert-selection-area-after")?Zi.after:Zi.multi}function Bv(t){return encodeURIComponent(gt(t))}function Yae(t){var e=wP(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?qc(decodeURIComponent(e)):null}function vf(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in tQe||e.push(i),e.join(n)}var tQe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},CP=dN.window;function nQe(t){gn(t,"svelte-1r8q3m8",".jse-absolute-popup.svelte-1r8q3m8.svelte-1r8q3m8{position:relative;left:0;top:0;width:0;height:0;z-index:1001}.jse-absolute-popup.svelte-1r8q3m8 .jse-hidden-input.svelte-1r8q3m8{position:fixed;left:0;top:0;width:0;height:0;padding:0;margin:0;border:none;outline:none;overflow:hidden}.jse-absolute-popup.svelte-1r8q3m8 .jse-absolute-popup-content.svelte-1r8q3m8{position:absolute}")}function Jae(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,B="left"===v||b+u>window.innerWidth&&b>u;return{left:B?y.right-m:b+m,top:j?C-p:y.bottom+p,positionAbove:j,positionLeft:B}}if("number"==typeof n.left&&"number"==typeof n.top){var N=n.left,$=n.top,V=n.width,z=void 0===V?0:V,Y=n.height,O=void 0===Y?0:Y;return{left:N,top:$,positionAbove:$+O>window.innerHeight&&$>O,positionLeft:N+z>window.innerWidth&&N>z}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function oQe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!I_(l.target,function(c){return c===i})&&s(o.id)}return Kl(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===vf(l)&&s(o.id)},function(l){a(l)},s,function(l){qn[l?"unshift":"push"](function(){e(2,r=l)})},function(l){qn[l?"unshift":"push"](function(){e(1,i=l)})}]}var sQe=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,oQe,iQe,po,{popup:0,closeAbsolutePopup:6},nQe),r}return de(e)}();function Xae(t,n,e){var i=t.slice();return i[6]=n[e],i}function Qae(t){var n,e;return n=new sQe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function aQe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(uQe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var uQe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function N_(t){return{value:t,label:Yn(t)?"(whole item)":oc(Xa(t))}}function id(t){return t.map(function(n){return kP.test(n)?"?.[".concat(n,"]"):SP.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var SP=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,kP=/^\d+$/;function j_(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function rd(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var dQe={id:"javascript",name:"JavaScript",description:"\n

    \n Enter a JavaScript function to filter, sort, or transform the data.\n

    \n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(id(e.path)),a=function TP(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function gte(t){return Oqe.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(id(i.path),"\n")+" const valueB = b".concat(id(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(id(i.path),"\n")+" const valueB = b".concat(id(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(id(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(id(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')()(t);return void 0!==e?e:null}},hQe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7l0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5H93c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8l0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4l0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5H210.4c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8l0 0 0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM176 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80V416H256v16c0 44.2-35.8 80-80 80z"]},P_={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},R_={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},fQe={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};function pQe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var VQe=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,BQe,$Qe,In,{path:4,value:0,readOnly:1,onPatch:5,focus:6},FQe),r}return de(e)}();function cle(t){for(var n=aP(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=JS(n,u);AP(l,d,function(m){o[c]=String(m),a(l[m])}),o.pop()}}}else if(Ar(l)&&i(o)){r[gt(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=_e(h);try{for(p.s();!(f=p.n()).done;){var g=f.value;o[c]=g,a(l[g])}}catch(m){p.e(m)}finally{p.f()}o.pop()}}}(s),Ee(Ee({},n),{},{expandedMap:r})}function ule(t,n){var e=Vv(t.expandedMap,n),i=Vv(t.enforceStringMap,n),r=Vv(t.visibleSectionsMap,n);return Ee(Ee({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function dle(t,n,e){if(e){var i=Ee({},t.enforceStringMap);return i[n]=e,Ee(Ee({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Ee({},t.enforceStringMap);return delete r[n],Ee(Ee({},t),{},{enforceStringMap:r})}return t}function hle(t,n,e){var i=Yc(t,e),r=e.reduce(function(o,s){return Qee(s)?fle(i,o,s):Zee(s)?ple(i,o,s):vN(s)?(u=(c=s).path,d=NP(a=i,(l=o).expandedMap),h=NP(a,l.enforceStringMap),f=NP(a,l.visibleSectionsMap),Dr(c.value)||er(c.value)||delete d[u],er(c.value)||delete f[u],(Dr(c.value)||er(c.value))&&delete h[u],Ee(Ee({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):yN(s)||mv(s)?function(a,l,c){if(mv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=IP(MP(l.expandedMap,c.from),u),h=IP(MP(l.enforceStringMap,c.from),u),f=IP(MP(l.visibleSectionsMap,c.from),u),p=l;mv(c)&&(p=ple(a,p,{op:"remove",path:c.from}));var g=OP((p=fle(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),m=OP(p.enforceStringMap,h),v=OP(p.visibleSectionsMap,f);return Ee(Ee({},l),{},{expandedMap:g,enforceStringMap:m,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function fle(t,n,e){var i=Jc(t,e.path),r=Qn(i),o=gt(r);if(er(Dt(t,r))){var s=Ho(Rt(i)),a=Hv(n.expandedMap,r,s,1),l=Hv(n.enforceStringMap,r,s,1),c=Hv(n.visibleSectionsMap,r,s,1);return c=gle(c,o,function(u){return mle(u,s,1)}),Ee(Ee({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function ple(t,n,e){var i=Jc(t,e.path),r=Qn(i),o=gt(r),s=Dt(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=Vv(a,i),l=Vv(l,i),c=Vv(c,i),er(s)){var u=Ho(Rt(i));a=Hv(a,r,u,-1),l=Hv(l,r,u,-1),c=gle(c=Hv(c,r,u,-1),o,function(d){return mle(d,u,-1)})}return Ee(Ee({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function Vv(t,n){var e={},i=gt(n);return Object.keys(t).forEach(function(r){vv(r,i)||(e[r]=t[r])}),e}function MP(t,n){var e={};return Object.keys(t).forEach(function(i){vv(i,n)&&(e[i]=t[i])}),e}function OP(t,n){return Ee(Ee({},t),n)}function IP(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function Hv(t,n,e,i){for(var r=n.length,o=gt(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:gt(u),value:t[c]}))}}if(0===s.length)return t;var h=Ee({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function NP(t,n){var e={};return Object.keys(n).filter(function(i){return Ql(t,Jc(t,i))}).forEach(function(i){e[i]=n[i]}),e}function gle(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!ai(i,r)){var o=Ee({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function mle(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function dh(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof yv(o,i)}function L_(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function jP(t,n){var e=[];return function i(r,o){e.push(o);var s=gt(o);if(r&&!0===n.expandedMap[s]){if(er(r)){var a=JS(n,s);AP(r,a,function(l){i(r[l],o.concat(String(l)))})}Dr(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function vle(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:zc.value});var a=gt(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:zc.inside}),er(o)){var l=JS(n,a);AP(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:zc.after})})}Dr(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:zc.key}),r(o[c],u),e&&i.push({path:u,type:zc.after})})}}(t,[]),i}function PP(t,n,e){var i=jP(t,n),r=i.map(gt).indexOf(gt(e));return-1!==r&&r0;){if(!0===t.pointersMap[gt(i)])return!0;i.pop()}return vo(t)?e===Zi.key&&ai(t.focusPath,n):!(!Zn(t)||!(e===Zi.value&&ai(t.focusPath,n)||Wv(n,t.focusPath)&&n.length>t.focusPath.length&&(e===Zi.key||e===Zi.value||e===Zi.multi)))}function ble(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Pi(r)?r.focusPath:as(r.paths),s=function zQe(t,n,e){var i=jP(t,n),r=i.map(gt),o=gt(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Qc(r)||zo(r)?Eo(t,r.anchorPath,r.anchorPath):Eo(t,r.anchorPath,l);if(vo(r)){var u=Dt(t,Qn(s));return Array.isArray(u)||Yn(s)?mi(s,!1):ac(s,!1)}return Zn(r)?mi(s,!1):Qc(r)||zo(r)?Eo(t,o,o):Eo(t,a,l)}function wle(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=vle(t,n,e),o=r.findIndex(function(s){return ai(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Dt(t,Qn(r)))?mi(r,!1):ac(r,!1)}function Gv(t,n){if(1===n.length){var e=as(n);if("replace"===e.op||"move"===e.op)return mi(Jc(t,e.path),!1)}if(!Yn(n)&&n.every(function(s){return"move"===s.op})){var i=as(n),r=n.slice(1);if((yN(i)||mv(i))&&i.from!==i.path&&r.every(function(s){return(yN(s)||mv(s))&&s.from===s.path}))return ac(Jc(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Jc(t,s.path)});if(!Yn(o))return{type:Zi.multi,paths:o,anchorPath:as(o),focusPath:Rt(o),pointersMap:xle(o)}}function xle(t){var n={};return t.forEach(function(e){n[gt(e)]=!0}),n}function XS(t){return qa({},gt(t),!0)}function $_(t){return void 0!==t&&(vo(t)||Zn(t)||Pi(t)&&1===t.paths.length)}function Cle(t,n){return $_(n)&&$r(Dt(t,n.focusPath))?n.focusPath:Qn(n.focusPath)}function Wv(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Ee(Ee({},r),{},{active:o===n})});return Ee(Ee({},t),{},{items:i,itemsMap:Nv(i,function(r){return gt(r.path)}),activeItem:e,activeIndex:n})}function ZQe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Ee(Ee({},r),{},{active:o===n})});return Ee(Ee({},t),{},{items:i,itemsMap:Nv(i,function(r){return gt(r.path)}),activeItem:e,activeIndex:n})}function jle(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Dr(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,g=h;p=e)return}r.pop()}else Ple(String(c),l,r,Gc.value,o)}(t.toLowerCase(),n),i}function Ple(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function $P(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function Rle(t,n,e){var i=t;return A_(e,function(r){i=$P(i,n,r.start,r.end)}),i}function eZe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Gc.key){var c=Qn(s),u=Dt(t,c),d=Rt(s),h=V_(c,Object.keys(u),d,$P(d,e,a,l));return{newSelection:Gv(t,h),operations:h}}if(o===Gc.value){var f=Dt(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(gt(s)));var p="string"==typeof f?f:String(f),g=gt(s),m=dh(f,n.enforceStringMap,g,r),v=$P(p,e,a,l),y=[{op:"replace",path:gt(s),value:m?v:yv(v,r)}];return{newSelection:Gv(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function tZe(t,n,e,i,r){for(var o=jle(e,t,1/0),s=[],a=0;an.floating[o]&&(s=ok(s)),{main:s,cross:ok(s)}}var VZe={start:"end",end:"start"};function qP(t){return t.replace(/start|end/g,function(n){return VZe[n]})}var HZe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return ni(bt().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y,O,H,Z,D,E,M,U,L,X;return bt().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,g=u.fallbackPlacements,v=void 0===(m=u.fallbackStrategy)?"bestFit":m,b=void 0===(y=u.fallbackAxisSideDirection)?"none":y,k=void 0===(C=u.flipAlignment)||C,T=wee(u,wWe),j=gg(r),B=gg(a)===a,ne.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return N=ne.sent,$=g||(B||!k?[ok(a)]:(void 0,ae=ok(ge=a),[qP(ge),ae,qP(ae)])),g||"none"===b||$.push.apply($,sn(function(ge,ae,De,be){var Ie=ik(ge),R=function(J,K,pe){var Te=["left","right"],ye=["right","left"];switch(J){case"top":case"bottom":return pe?K?ye:Te:K?Te:ye;case"left":case"right":return K?["top","bottom"]:["bottom","top"];default:return[]}}(gg(ge),"start"===De,be);return Ie&&(R=R.map(function(J){return J+"-"+Ie}),ae&&(R=R.concat(R.map(qP)))),R}(a,k,b,N))),V=[a].concat(sn($)),ne.next=29,Qle(n,T);case 29:if(z=ne.sent,Y=[],O=(null==(i=o.flip)?void 0:i.overflows)||[],h&&Y.push(z[j]),p&&(H=BZe(r,s,N),Y.push(z[H.main],z[H.cross])),O=[].concat(sn(O),[{placement:r,overflows:Y}]),Y.every(function(ge){return ge<=0})){ne.next=48;break}if(E=((null==(Z=o.flip)?void 0:Z.index)||0)+1,!(M=V[E])){ne.next=37;break}return ne.abrupt("return",{data:{index:E,overflows:O},reset:{placement:M}});case 37:if(U=null==(D=O.filter(function(ge){return ge.overflows[0]<=0}).sort(function(ge,ae){return ge.overflows[1]-ae.overflows[1]})[0])?void 0:D.placement,U){ne.next=46;break}ne.t0=v,ne.next="bestFit"===ne.t0?42:"initialPlacement"===ne.t0?45:46;break;case 42:return X=null==(L=O.map(function(ge){return[ge.placement,ge.overflows.filter(function(ae){return ae>0}).reduce(function(ae,De){return ae+De},0)]}).sort(function(ge,ae){return ge[1]-ae[1]})[0])?void 0:L[0],X&&(U=X),ne.abrupt("break",46);case 45:U=a;case 46:if(r===U){ne.next=48;break}return ne.abrupt("return",{reset:{placement:U}});case 48:return ne.abrupt("return",{});case 49:case"end":return ne.stop()}var ge,ae},e)}))()}}},UZe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return ni(bt().mark(function e(){var i,r,o;return bt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=ni(bt().mark(function l(c,u){var d,h,f,p,g,m,v,y,b,C,k,T,j,B;return bt().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return d=c.placement,h=c.platform,f=c.elements,N.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=N.sent,g=gg(d),m=ik(d),v="x"===rk(d),y=["left","top"].includes(g)?-1:1,b=p&&v?-1:1,C="function"==typeof u?u(c):u,k="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Ee({mainAxis:0,crossAxis:0,alignmentAxis:null},C),T=k.mainAxis,j=k.crossAxis,B=k.alignmentAxis,N.abrupt("return",(m&&"number"==typeof B&&(j="end"===m?-1*B:B),v?{x:j*b,y:T*y}:{x:T*y,y:j*b}));case 14:case"end":return N.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function zZe(t){return"x"===t?"y":"x"}var GZe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return ni(bt().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,j;return bt().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(N){return{x:N.x,y:N.y}}}:h,p=wee(a,xWe),g={x:r,y:o},B.next=14,Qle(n,p);case 14:return m=B.sent,v=rk(gg(s)),y=zZe(v),b=g[v],C=g[y],c&&(b=Zle(b+m["y"===v?"top":"left"],b,b-m["y"===v?"bottom":"right"])),d&&(C=Zle(C+m["y"===y?"top":"left"],C,C-m["y"===y?"bottom":"right"])),j=f.fn(Ee(Ee({},n),{},(qa(i={},v,b),qa(i,y,C),i))),B.abrupt("return",Ee(Ee({},j),{},{data:{x:j.x-r,y:j.y-o}}));case 22:case"end":return B.stop()}},e)}))()}}};function Al(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function ad(t){return Al(t).getComputedStyle(t)}var YP,ece=Math.min,U_=Math.max,sk=Math.round;function tce(t){var n=ad(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=sk(e)!==r||sk(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function Cf(t){return ice(t)?(t.nodeName||"").toLowerCase():""}function nce(){if(YP)return YP;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?YP=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function ld(t){return t instanceof Al(t).HTMLElement}function eu(t){return t instanceof Al(t).Element}function ice(t){return t instanceof Al(t).Node}function rce(t){return typeof ShadowRoot<"u"&&(t instanceof Al(t).ShadowRoot||t instanceof ShadowRoot)}function ak(t){var n=ad(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function WZe(t){return["table","td","th"].includes(Cf(t))}function JP(t){var n=/firefox/i.test(nce()),e=ad(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function KP(){return/^((?!chrome|android).)*safari/i.test(nce())}function XP(t){return["html","body","#document"].includes(Cf(t))}function oce(t){return eu(t)?t:t.contextElement}var sce={x:1,y:1};function Zv(t){var n=oce(t);if(!ld(n))return sce;var e=n.getBoundingClientRect(),i=tce(n),r=i.width,o=i.height,s=i.fallback,a=(s?sk(e.width):e.width)/r,l=(s?sk(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function mg(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=oce(t),l=sce;n&&(i?eu(i)&&(l=Zv(i)):l=Zv(t));var c=a?Al(a):window,u=KP()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var g=Al(a),m=i&&eu(i)?Al(i):i,v=g.frameElement;v&&i&&m!==g;){var y=Zv(v),b=v.getBoundingClientRect(),C=getComputedStyle(v);b.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,b.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=b.x,h+=b.y,v=Al(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function Sf(t){return((ice(t)?t.ownerDocument:t.document)||window.document).documentElement}function lk(t){return eu(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ace(t){return mg(Sf(t)).left+lk(t).scrollLeft}function z_(t){if("html"===Cf(t))return t;var n=t.assignedSlot||t.parentNode||rce(t)&&t.host||Sf(t);return rce(n)?n.host:n}function lce(t){var n=z_(t);return XP(n)?n.ownerDocument.body:ld(n)&&ak(n)?n:lce(n)}function G_(t,n){var e;void 0===n&&(n=[]);var i=lce(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Al(i);return r?n.concat(o,o.visualViewport||[],ak(i)?i:[]):n.concat(i,G_(i))}function cce(t,n,e){var i,l,c,u,d,h,f,p,g;if("viewport"===n)i=function(l,c){var u=Al(l),d=Sf(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,g=0,m=0;if(h){f=h.width,p=h.height;var v=KP();(!v||v&&"fixed"===c)&&(g=h.offsetLeft,m=h.offsetTop)}return{width:f,height:p,x:g,y:m}}(t,e);else if("document"===n)l=Sf(t),c=Sf(l),u=lk(l),h=U_(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=U_(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+ace(l),g=-u.scrollTop,"rtl"===ad(d).direction&&(p+=U_(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:g};else if(eu(n))i=function(l,c){var u=mg(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=ld(l)?Zv(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Ee({},n);if(KP()){var o,s,a=Al(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return GP(i)}function uce(t,n){return ld(t)&&"fixed"!==ad(t).position?n?n(t):t.offsetParent:null}function dce(t,n){for(var e=Al(t),i=uce(t,n);i&&WZe(i)&&"static"===ad(i).position;)i=uce(i,n);return i&&("html"===Cf(i)||"body"===Cf(i)&&"static"===ad(i).position&&!JP(i))?e:i||function(r){for(var o=z_(r);ld(o)&&!XP(o);){if(JP(o))return o;o=z_(o)}return null}(t)||e}function qZe(t,n,e){var i=ld(n),r=Sf(n),o=mg(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==Cf(n)||ak(r))&&(s=lk(n)),ld(n)){var l=mg(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=ace(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var YZe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=G_(c).filter(function(y){return eu(y)&&"body"!==Cf(y)}),f=null,p="fixed"===ad(c).position,g=p?z_(c):c;eu(g)&&!XP(g);){var m=ad(g),v=JP(g);"fixed"===m.position?f=null:(p?v||f:v||"static"!==m.position||!f||!["absolute","fixed"].includes(f.position))?f=m:h=h.filter(function(y){return y!==g}),g=z_(g)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(sn(o),[i]),l=s.reduce(function(c,u){var d=cce(n,u,r);return c.top=U_(d.top,c.top),c.right=ece(d.right,c.right),c.bottom=ece(d.bottom,c.bottom),c.left=U_(d.left,c.left),c},cce(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=ld(e),o=Sf(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==Cf(e)||ak(o))&&(s=lk(e)),ld(e))){var c=mg(e);a=Zv(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:eu,getDimensions:function(t){return ld(t)?tce(t):t.getBoundingClientRect()},getOffsetParent:dce,getDocumentElement:Sf,getScale:Zv,getElementRects:function(t){var n=this;return ni(bt().mark(function e(){var i,r,o,s,a;return bt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||dce,a=n.getDimensions,l.t0=qZe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Ee,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===ad(t).direction}};function XZe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==xt(i[0])&&(i=u(i));var f=i.filter(function(p){var g=c(p[h],e,p);return g&&r&&null!=o&&o.length&&(g=!o.some(function(m){return!!l&&m[s]===p[s]})),g});return a&&(f=d(f)),f}function QZe(t){return QP.apply(this,arguments)}function QP(){return QP=ni(bt().mark(function t(n){var e,i,r,o,s;return bt().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==xt(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),QP.apply(this,arguments)}function ZZe(t){gn(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function eet(t){var n,e;return{c:function(){n=Gu("svg"),I(e=Gu("path"),"fill","currentColor"),I(e,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),I(n,"width","100%"),I(n,"height","100%"),I(n,"viewBox","0 0 20 20"),I(n,"focusable","false"),I(n,"aria-hidden","true"),I(n,"class","svelte-qbd276")},m:function(i,r){ve(i,n,r),ee(n,e)},p:tt,i:tt,o:tt,d:function(i){i&&me(n)}}}var tet=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,null,eet,po,{},ZZe),r}return de(e)}();function net(t){gn(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function iet(t){var n,e;return{c:function(){n=Gu("svg"),I(e=Gu("path"),"fill","currentColor"),I(e,"d","M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),I(n,"width","100%"),I(n,"height","100%"),I(n,"viewBox","-2 -2 50 50"),I(n,"focusable","false"),I(n,"aria-hidden","true"),I(n,"role","presentation"),I(n,"class","svelte-whdbu1")},m:function(i,r){ve(i,n,r),ee(n,e)},p:tt,i:tt,o:tt,d:function(i){i&&me(n)}}}var ck=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,null,iet,po,{},net),r}return de(e)}();function ret(t){gn(t,"svelte-1p3nqvd",".loading.svelte-1p3nqvd{width:var(--spinner-width, 20px);height:var(--spinner-height, 20px);color:var(--spinner-color, var(--icons-color));animation:svelte-1p3nqvd-rotate 0.75s linear infinite;transform-origin:center center;transform:none}.circle_path.svelte-1p3nqvd{stroke-dasharray:90;stroke-linecap:round}@keyframes svelte-1p3nqvd-rotate{100%{transform:rotate(360deg)}}")}function oet(t){var n,e;return{c:function(){n=Gu("svg"),I(e=Gu("circle"),"class","circle_path svelte-1p3nqvd"),I(e,"cx","50"),I(e,"cy","50"),I(e,"r","20"),I(e,"fill","none"),I(e,"stroke","currentColor"),I(e,"stroke-width","5"),I(e,"stroke-miterlimit","10"),I(n,"class","loading svelte-1p3nqvd"),I(n,"viewBox","25 25 50 50")},m:function(i,r){ve(i,n,r),ee(n,e)},p:tt,i:tt,o:tt,d:function(i){i&&me(n)}}}var set=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,null,oet,po,{},ret),r}return de(e)}();function aet(t){gn(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:absolute;cursor:default;border:none;color:var(--input-color, var(--item-color));padding:var(--input-padding, 0);letter-spacing:var(--input-letter-spacing, inherit);margin:var(--input-margin, 0);min-width:10px;top:0;right:0;bottom:0;left:0;background:transparent;font-size:var(--font-size, 16px)}.svelte-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:relative;overflow:var(--selected-item-overflow, hidden);padding:var(--selected-item-padding, 0 20px 0 0);text-overflow:ellipsis;white-space:nowrap;color:var(--selected-item-color, inherit);font-size:var(--font-size, 16px)}.multi.svelte-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{all:unset;display:flex;align-items:center;justify-content:center;width:var(--clear-select-width, 40px);height:var(--clear-select-height, 100%);color:var(--clear-select-color, var(--icons-color));margin:var(--clear-select-margin, 0);pointer-events:all;flex-shrink:0}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--loading-width, 40px);height:var(--loading-height);color:var(--loading-color, var(--icons-color));margin:var(--loading--margin, 0);flex-shrink:0}.chevron.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--chevron-width, 40px);height:var(--chevron-height, 40px);background:var(--chevron-background, transparent);pointer-events:var(--chevron-pointer-events, none);color:var(--chevron-color, var(--icons-color));border:var(--chevron-border, 0 0 0 1px solid #d8dbdf);flex-shrink:0}.multi.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-input-padding, 0);position:relative;margin:var(--multi-select-input-margin, 5px 0);flex:1 1 40px}.svelte-select.error.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{z-index:9999;border:0px;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0px;white-space:nowrap}.multi-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--multi-item-bg, #ebedef);margin:var(--multi-item-margin, 0);outline:var(--multi-item-outline, 1px solid #ddd);border-radius:var(--multi-item-border-radius, 4px);height:var(--multi-item-height, 25px);line-height:var(--multi-item-height, 25px);display:flex;cursor:default;padding:var(--multi-item-padding, 0 5px);overflow:hidden;gap:var(--multi-item-gap, 4px);outline-offset:-1px;max-width:var(--multi-max-width, none);color:var(--multi-item-color, var(--item-color))}.multi-item.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-shadow:var(--list-shadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--list-border-radius, 4px);max-height:var(--list-max-height, 252px);overflow-y:auto;background:var(--list-background, #fff);position:var(--list-position, absolute);z-index:var(--list-z-index, 2);border:var(--list-border)}.prefloat.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{cursor:default;height:var(--item-height, var(--height, 42px));line-height:var(--item-line-height, var(--height, 42px));padding:var(--item-padding, 0 20px);color:var(--item-color, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:var(--item-transition, all 0.2s);align-items:center;width:100%}.item.group-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var cet=function(t){return{value:8&t[0]}},hce=function(t){return{value:t[3]}},uet=function(t){return{listOpen:64&t[0]}},fce=function(t){return{listOpen:t[6]}},det=function(t){return{}},pce=function(t){return{}},het=function(t){return{}},gce=function(t){return{}},fet=function(t){return{selection:8&t[0]}},mce=function(t){return{selection:t[3]}};function vce(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var pet=function(t){return{}},yce=function(t){return{}},get=function(t){return{selection:8&t[0]}},_ce=function(t){return{selection:t[127],index:t[129]}},met=function(t){return{}},bce=function(t){return{}},vet=function(t){return{}},wce=function(t){return{}};function xce(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var yet=function(t){return{item:16777216&t[0]}},Cce=function(t){return{item:t[127],index:t[129]}},_et=function(t){return{filteredItems:16777216&t[0]}},Sce=function(t){return{filteredItems:t[24]}};function kce(t){var n,e,i,r,o,s,a=[xet,wet,bet],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=oe("div"),i&&i.c(),I(n,"class","svelte-select-list svelte-tyxmms"),Xe(n,"prefloat",t[28])},m:function(u,d){ve(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[ws(t[49].call(null,n)),Ze(n,"scroll",t[41]),Ze(n,"pointerdown",th(t[50])),Ze(n,"pointerup",nh(th(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&(it(),Q(l[h],1,1,function(){l[h]=null}),rt()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),W(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&Xe(n,"prefloat",u[28])},i:function(u){r||(W(i),r=!0)},o:function(u){Q(i),r=!1},d:function(u){u&&me(n),~e&&l[e].d(),t[91](null),o=!1,rr(s)}}}function bet(t){var n,e,i=t[83].empty,r=ko(i,t,t[82],wce),o=r||{c:function(){(e=oe("div")).textContent="No options",I(e,"class","empty svelte-tyxmms")},m:function(s,a){ve(s,e,a)},p:tt,d:function(s){s&&me(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Do(r,i,s,s[82],n?To(i,s[82],a,vet):Ao(s[82]),wce)},i:function(s){n||(W(o,s),n=!0)},o:function(s){Q(o,s),n=!1},d:function(s){o&&o.d(s)}}}function wet(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Ae,Qt)}:At,hn=n.debounceWait,dn=void 0===hn?300:hn,Di=n.hideEmptyState,Yi=void 0!==Di&&Di,vn=n.inputAttributes,bi=void 0===vn?{}:vn,he=n.listAutoWidth,Ye=void 0===he||he,ot=n.showChevron,ht=void 0!==ot&&ot,vt=n.listOffset,on=void 0===vt?5:vt,Rn=n.hoverItemIndex,Vt=void 0===Rn?0:Rn,tn=n.floatingConfig,Xt=void 0===tn?{}:tn,wi=n.class,Oi=void 0===wi?"":wi;function Nr(Ae){var Qt=[],ii={};Ae.forEach(function(wu){var Fi=ki(wu);Qt.includes(Fi)||(Qt.push(Fi),ii[Fi]=[],Fi&&ii[Fi].push(Object.assign(Go(Fi,wu),{id:Fi,groupHeader:!0,selectable:Hi}))),ii[Fi].push(Object.assign({groupItem:!!Fi},wu))});var qo=[];return yi(Qt).forEach(function(wu){ii[wu]&&qo.push.apply(qo,sn(ii[wu]))}),qo}function us(){var Ae=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Qt=arguments.length>1?arguments[1]:void 0;e(7,Vt=Ae<0?0:Ae),!Qt&&ki&&c[Vt]&&!c[Vt].selectable&&yr(1)}function pu(){var Ae=!0;if(R){var Qt=[],ii=[];R.forEach(function(qo){Qt.includes(qo[Nt])?Ae=!1:(Qt.push(qo[Nt]),ii.push(qo))}),Ae||e(3,R=ii)}return Ae}function mc(Ae){var Qt=Ae?Ae[Nt]:R[Nt];return _t.find(function(ii){return ii[Nt]===Qt})}function ds(Ae){return Ma.apply(this,arguments)}function Ma(){return(Ma=ni(bt().mark(function Ae(Qt){var ii;return bt().wrap(function(qo){for(;;)switch(qo.prev=qo.next){case 0:ii=R[Qt],e(3,R=1===R.length?void 0:R.filter(function(wu){return wu!==ii})),j("clear",ii);case 3:case"end":return qo.stop()}},Ae)}))).apply(this,arguments)}function gu(Ae){var Qt;be&&M===(null===(Qt=document)||void 0===Qt?void 0:Qt.activeElement)||(Ae&&j("focus",Ae),M.focus(),e(2,be=!0))}function Oo(Ae){return mu.apply(this,arguments)}function mu(){return(mu=ni(bt().mark(function Ae(Qt){return bt().wrap(function(ii){for(;;)switch(ii.prev=ii.next){case 0:if(!fn&&!$b){ii.next=2;break}return ii.abrupt("return");case 2:(Se||be)&&(j("blur",Qt),vu(),e(2,be=!1),e(26,f=void 0),M.blur());case 3:case"end":return ii.stop()}},Ae)}))).apply(this,arguments)}function vu(){e(4,K=""),e(6,Se=!1)}y=ni(bt().mark(function Ae(){return bt().wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:e(78,p=R),e(79,g=K),e(80,m=L);case 3:case"end":return Qt.stop()}},Ae)})),fv().$$.before_update.push(y),Kl(function(){Se&&e(2,be=!0),be&&M&&M.focus()});var ft,lD=n.ariaValues,ce=void 0===lD?function(Ae){return"Option ".concat(Ae,", selected.")}:lD,je=n.ariaListOpen,Qe=void 0===je?function(Ae,Qt){return"You are currently focused on option ".concat(Ae,". There are ").concat(Qt," results available.")}:je,at=n.ariaFocused,dt=void 0===at?function(){return"Select is focused, type to refine list, press down to open the menu."}:at,Ht=null;function ln(){clearTimeout(ft),ft=setTimeout(function(){fn=!1},100)}Vc(function(){var Ae;null===(Ae=Ht)||void 0===Ae||Ae.remove()});var fn=!1;function jr(Ae){Ae&&!1!==Ae.selectable&&function(Qt){if(Qt){e(4,K="");var ii=Object.assign({},Qt);if(ii.groupHeader&&!ii.selectable)return;e(3,R=L?R?R.concat([ii]):[ii]:e(3,R=ii)),setTimeout(function(){Ui&&vu(),e(26,f=void 0),j("change",R),j("select",Qt)})}}(Ae)}function Io(Ae){fn||e(7,Vt=Ae)}function Yr(Ae){var qo,Qt=Ae.item,ii=Ae.i;if(!1!==Qt?.selectable){if(R&&!L&&R[Nt]===Qt[Nt])return vu();((qo=Qt).groupHeader&&qo.selectable||qo.selectable||!qo.hasOwnProperty("selectable"))&&(e(7,Vt=ii),jr(Qt)),$b=!1}}function yr(Ae){if(0===c.filter(function(ii){return!Object.hasOwn(ii,"selectable")||!0===ii.selectable}).length)return e(7,Vt=0);e(7,Ae>0&&Vt===c.length-1?Vt=0:Ae<0&&0===Vt?Vt=c.length-1:Vt+=Ae);var Qt=c[Vt];Qt&&!1===Qt.selectable&&(1!==Ae&&-1!==Ae||yr(Ae))}var Oa=yu,wd=yu;function yu(Ae){return{update:function(Qt){Qt.scroll&&(ln(),Ae.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Ii={strategy:"absolute",placement:"bottom-start",middleware:[UZe(on),HZe(),GZe()],autoUpdate:!1},tl=Wt(function KZe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Ee(Ee(Ee({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Ee({platform:YZe},d),p=Ee(Ee({},f.platform),{},{_c:h}),PZe(c,u,Ee(Ee({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Vc(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function JZe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(sn(eu(t)?G_(t):t.contextElement?G_(t.contextElement):[]),sn(G_(n))):[];p.forEach(function(b){f&&b.addEventListener("scroll",e,{passive:!0}),l&&b.addEventListener("resize",e)});var g,m=null;if(u){var v=!0;m=new ResizeObserver(function(){v||e(),v=!1}),eu(t)&&!h&&m.observe(t),eu(t)||!t.contextElement||h||m.observe(t.contextElement),m.observe(n)}var y=h?mg(t):null;return h&&function b(){var C=mg(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,g=requestAnimationFrame(b)}(),e(),function(){var b;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(b=m)||b.disconnect(),m=null,h&&cancelAnimationFrame(g)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Ii),3),vc=tl[0],_u=tl[1],xd=tl[2],bu=!0,$b=!1;return t.$$set=function(Ae){"justValue"in Ae&&e(53,N=Ae.justValue),"filter"in Ae&&e(54,V=Ae.filter),"getItems"in Ae&&e(55,Y=Ae.getItems),"id"in Ae&&e(56,H=Ae.id),"name"in Ae&&e(8,F=Ae.name),"container"in Ae&&e(0,D=Ae.container),"input"in Ae&&e(1,M=Ae.input),"multiple"in Ae&&e(9,L=Ae.multiple),"multiFullItemClearable"in Ae&&e(10,ne=Ae.multiFullItemClearable),"disabled"in Ae&&e(11,ae=Ae.disabled),"focused"in Ae&&e(2,be=Ae.focused),"value"in Ae&&e(3,R=Ae.value),"filterText"in Ae&&e(4,K=Ae.filterText),"placeholder"in Ae&&e(57,Te=Ae.placeholder),"placeholderAlwaysShow"in Ae&&e(58,Ue=Ae.placeholderAlwaysShow),"items"in Ae&&e(52,_t=Ae.items),"label"in Ae&&e(12,ct=Ae.label),"itemFilter"in Ae&&e(59,mt=Ae.itemFilter),"groupBy"in Ae&&e(60,ki=Ae.groupBy),"groupFilter"in Ae&&e(61,yi=Ae.groupFilter),"groupHeaderSelectable"in Ae&&e(62,Hi=Ae.groupHeaderSelectable),"itemId"in Ae&&e(13,Nt=Ae.itemId),"loadOptions"in Ae&&e(63,cn=Ae.loadOptions),"containerStyles"in Ae&&e(14,Ti=Ae.containerStyles),"hasError"in Ae&&e(15,qr=Ae.hasError),"filterSelectedItems"in Ae&&e(64,jt=Ae.filterSelectedItems),"required"in Ae&&e(16,wn=Ae.required),"closeListOnChange"in Ae&&e(65,Ui=Ae.closeListOnChange),"createGroupHeaderItem"in Ae&&e(66,Go=Ae.createGroupHeaderItem),"searchable"in Ae&&e(17,Wo=Ae.searchable),"inputStyles"in Ae&&e(18,Js=Ae.inputStyles),"clearable"in Ae&&e(68,le=Ae.clearable),"loading"in Ae&&e(5,ke=Ae.loading),"listOpen"in Ae&&e(6,Se=Ae.listOpen),"debounce"in Ae&&e(69,rn=Ae.debounce),"debounceWait"in Ae&&e(70,dn=Ae.debounceWait),"hideEmptyState"in Ae&&e(19,Yi=Ae.hideEmptyState),"inputAttributes"in Ae&&e(71,bi=Ae.inputAttributes),"listAutoWidth"in Ae&&e(72,Ye=Ae.listAutoWidth),"showChevron"in Ae&&e(20,ht=Ae.showChevron),"listOffset"in Ae&&e(73,on=Ae.listOffset),"hoverItemIndex"in Ae&&e(7,Vt=Ae.hoverItemIndex),"floatingConfig"in Ae&&e(74,Xt=Ae.floatingConfig),"class"in Ae&&e(21,Oi=Ae.class),"ariaValues"in Ae&&e(75,ce=Ae.ariaValues),"ariaListOpen"in Ae&&e(76,Qe=Ae.ariaListOpen),"ariaFocused"in Ae&&e(77,dt=Ae.ariaFocused),"$$scope"in Ae&&e(82,k=Ae.$$scope)},t.$$.update=function(){var Ae,Qt,ii,qo,wu,Fi;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&R&&function(){if("string"==typeof R){var Fi,Yo=(_t||[]).find(function(yc){return yc[Nt]===R});e(3,R=Yo||(qa(Fi={},Nt,R),qa(Fi,"label",R),Fi))}else L&&Array.isArray(R)&&R.length>0&&e(3,R=R.map(function(yc){return"string"==typeof yc?{value:yc,label:yc}:yc}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!bi&&Wo||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},bi)),H&&e(27,v.id=H,v),Wo||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&L&&R&&(Array.isArray(R)?e(3,R=sn(R)):e(3,R=[R])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&m&&!L&&R&&e(3,R=null),520&t.$$.dirty[0]&&L&&R&&R.length>1&&pu(),8&t.$$.dirty[0]&&R&&(L?JSON.stringify(R)!==JSON.stringify(p)&&pu()&&j("input",R):p&&JSON.stringify(R[Nt])===JSON.stringify(p[Nt])||j("input",R)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!R&&L&&p&&j("input",R),6&t.$$.dirty[0]&&!be&&M&&vu(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&K!==g&&(cn||0!==K.length)&&(cn?rn(ni(bt().mark(function Fi(){var Yo;return bt().wrap(function(yc){for(;;)switch(yc.prev=yc.next){case 0:return e(5,ke=!0),yc.next=3,Y({dispatch:j,loadOptions:cn,convertStringItemsToObjects:Pce,filterText:K});case 3:(Yo=yc.sent)?(e(5,ke=Yo.loading),e(6,Se=Se?Yo.listOpen:K.length>0),e(2,be=Se&&Yo.focused),e(52,_t=ki?Nr(Yo.filteredItems):Yo.filteredItems)):(e(5,ke=!1),e(2,be=!0),e(6,Se=!0));case 5:case"end":return yc.stop()}},Fi)})),dn):(e(6,Se=!0),L&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=V({loadOptions:cn,filterText:K,items:_t,multiple:L,value:R,itemId:Nt,groupBy:ki,label:ct,filterSelectedItems:jt,itemFilter:mt,convertStringItemsToObjects:Pce,filterGroupedItems:Nr})),16777800&t.$$.dirty[0]&&!L&&Se&&R&&c&&(Ae=c.findIndex(function(Fi){return Fi[Nt]===R[Nt]}),us(Ae,!0)),576&t.$$.dirty[0]&&Se&&L&&e(7,Vt=0),16&t.$$.dirty[0]&&K&&e(7,Vt=0),128&t.$$.dirty[0]&&j("hoverItem",Vt),520&t.$$.dirty[0]&&e(25,i=L?R&&R.length>0:R),33554448&t.$$.dirty[0]&&e(35,r=i&&K.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&le&&!ae&&!ke),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=Ue&&L||L&&0===(null===(Qt=R)||void 0===Qt?void 0:Qt.length)?Te:R?"":Te),520&t.$$.dirty[0]&&e(32,a=R?(ii=L&&R.length>0?R.map(function(Fi){return Fi[ct]}).join(", "):R[ct],ce(ii)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var Fi=c[Vt];return Se&&Fi?Qe(Fi[ct],c?c.length:0):dt()}()),2097152&t.$$.dirty[1]&&(Fi=_t)&&0!==Fi.length&&!Fi.some(function(Yo){return"object"!==xt(Yo)})&&R&&(L?!R.some(function(Yo){return!Yo||!Yo[Nt]}):R[Nt])&&(Array.isArray(R)?e(3,R=R.map(function(Yo){return mc(Yo)||Yo})):e(3,R=mc()||R)),8712&t.$$.dirty[0]&&e(53,N=L?R?R.map(function(Fi){return Fi[Nt]}):null:R&&R[Nt]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(L||!p||R||j("input",R)),16777800&t.$$.dirty[0]&&Se&&c&&!L&&!R&&us(),16777216&t.$$.dirty[0]&&function(Fi){Se&&j("filter",Fi)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&D&&void 0===(null===(qo=Xt)||void 0===qo?void 0:qo.autoUpdate)&&e(81,Ii.autoUpdate=!0,Ii),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&D&&Xt&&xd(Object.assign(Ii,Xt)),8388608&t.$$.dirty[0]&&e(30,u=!!Ht),8388672&t.$$.dirty[0]&&function(Fi,Yo){if(!Fi||!Yo)return e(28,bu=!0);setTimeout(function(){e(28,bu=!1)},0)}(Ht,Se),8388673&t.$$.dirty[0]&&Se&&D&&Ht&&(wu=D.getBoundingClientRect().width,e(23,Ht.style.width=Ye?wu+"px":"auto",Ht)),128&t.$$.dirty[0]&&e(29,d=Vt),70&t.$$.dirty[0]&&M&&Se&&!be&&gu()},[D,M,be,R,K,ke,Se,Vt,F,L,ne,ae,ct,Nt,Ti,qr,wn,Wo,Js,Yi,ht,Oi,function(){j("clear",R),e(3,R=void 0),vu(),gu()},Ht,c,i,f,v,bu,d,u,l,a,s,o,r,ds,function(Ae){if(be)switch(Ae.stopPropagation(),Ae.key){case"Escape":Ae.preventDefault(),vu();break;case"Enter":if(Ae.preventDefault(),Se){if(0===c.length)break;if(R&&!L&&R[Nt]===c[Vt][Nt]){vu();break}jr(c[Vt])}break;case"ArrowDown":Ae.preventDefault(),Se?yr(1):(e(6,Se=!0),e(26,f=void 0));break;case"ArrowUp":Ae.preventDefault(),Se?yr(-1):(e(6,Se=!0),e(26,f=void 0));break;case"Tab":if(Se&&be){if(0===c.length||R&&R[Nt]===c[Vt][Nt])return vu();Ae.preventDefault(),jr(c[Vt]),vu()}break;case"Backspace":if(!L||K.length>0)return;if(L&&R&&R.length>0){if(ds(void 0!==f?f:R.length-1),0===f||void 0===f)break;e(26,f=R.length>f?f-1:void 0)}break;case"ArrowLeft":if(!R||!L||K.length>0)return;void 0===f?e(26,f=R.length-1):R.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!R||!L||K.length>0||void 0===f)return;f===R.length-1?e(26,f=void 0):f",">="].map(function(H){return{value:H,label:H}}),N=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],$=null!==(i=T)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?N_(T.filter.path):null,V=null!==(o=T)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?B.find(function(H){var G;return H.value===(null===(G=T.filter)||void 0===G?void 0:G.relation)}):null,z=(null===(a=T)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",Y=null!==(c=T)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?N_(T.sort.path):null,O=null!==(d=T)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?N.find(function(H){var G;return H.value===(null===(G=T.sort)||void 0===G?void 0:G.direction)}):null;return t.$$set=function(H){"json"in H&&e(11,C=H.json),"queryOptions"in H&&e(10,T=H.queryOptions),"onChange"in H&&e(12,j=H.onChange)},t.$$.update=function(){var H,G,F,Z,D,E,M,U,L,X,ne,ge,ae,De,be,Ie,R,J,K,pe,Te;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?mP(C):[]),34816&t.$$.dirty&&e(13,g=f?mP(C,!0):[]),16384&t.$$.dirty&&e(7,m=p.map(N_)),8192&t.$$.dirty&&e(6,v=g?g.map(N_):[]),1088&t.$$.dirty&&e(5,y=null!==(H=T)&&void 0!==H&&null!==(G=H.projection)&&void 0!==G&&G.paths&&v?T.projection.paths.map(function(K){return v.find(function(pe){return ai(pe.value,K)})}).filter(function(K){return!!K}):null),1&t.$$.dirty&&(Z=(null===(F=$)||void 0===F?void 0:F.value)||null,ai(null===(D=T)||void 0===D||null===(E=D.filter)||void 0===E?void 0:E.path,Z)||(b("changeFilterPath",Z),e(10,T=Wc(T,["filter","path"],Z,!0)),j(T))),2&t.$$.dirty&&(U=(null===(M=V)||void 0===M?void 0:M.value)||null,ai(null===(L=T)||void 0===L||null===(X=L.filter)||void 0===X?void 0:X.relation,U)||(b("changeFilterRelation",U),e(10,T=Wc(T,["filter","relation"],U,!0)),j(T))),4&t.$$.dirty&&(ai(null===(ge=T)||void 0===ge||null===(ae=ge.filter)||void 0===ae?void 0:ae.value,ne=z||null)||(b("changeFilterValue",ne),e(10,T=Wc(T,["filter","value"],ne,!0)),j(T))),8&t.$$.dirty&&(K=(null===(De=Y)||void 0===De?void 0:De.value)||null,ai(null===(pe=T)||void 0===pe||null===(Te=pe.sort)||void 0===Te?void 0:Te.path,K)||(b("changeSortPath",K),e(10,T=Wc(T,["sort","path"],K,!0)),j(T))),16&t.$$.dirty&&(Ie=(null===(be=O)||void 0===be?void 0:be.value)||null,ai(null===(R=T)||void 0===R||null===(J=R.sort)||void 0===J?void 0:J.direction,Ie)||(b("changeSortDirection",Ie),e(10,T=Wc(T,["sort","direction"],Ie,!0)),j(T))),32&t.$$.dirty&&function(K){var pe,Te;ai(null===(pe=T)||void 0===pe||null===(Te=pe.projection)||void 0===Te?void 0:Te.paths,K)||(b("changeProjectionPaths",K),e(10,T=Wc(T,["projection","paths"],K,!0)),j(T))}(y?y.map(function(K){return K.value}):null)},[$,V,z,Y,O,y,v,m,B,N,T,C,j,g,p,f,function(H){e(0,$=H)},function(H){e(1,V=H)},function(){e(2,z=this.value)},function(H){e(3,Y=H)},function(H){e(4,O=H)},function(H){e(5,y=H),e(10,T),e(6,v),e(13,g),e(15,f),e(11,C)}]}var Oet=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Met,Eet,In,{json:11,queryOptions:10,onChange:12},Aet),r}return de(e)}();function Iet(t){gn(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function Rce(t,n,e){var i=t.slice();return i[5]=n[e],i}function Net(t){var n,e;return n=new li({props:{data:R_}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function jet(t){var n,e;return n=new li({props:{data:P_}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Lce(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[jet,Net],f=[];function p(m,v){return m[5].id===m[0]?0:1}function g(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=oe("button"),i.c(),r=Me(),o=ut(d),s=Me(),I(n,"type","button"),I(n,"class","jse-query-language svelte-19cxesy"),I(n,"title",a="Select ".concat(t[5].name," as query language")),Xe(n,"selected",t[5].id===t[0])},m:function(m,v){ve(m,n,v),f[e].m(n,null),ee(n,r),ee(n,o),ee(n,s),l=!0,c||(u=Ze(n,"click",g),c=!0)},p:function(m,v){var y=e;(e=p(t=m))===y?f[e].p(t,v):(it(),Q(f[y],1,1,function(){f[y]=null}),rt(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),W(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&Jt(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&I(n,"title",a),(!l||3&v)&&Xe(n,"selected",t[5].id===t[0])},i:function(m){l||(W(i),l=!0)},o:function(m){Q(i),l=!1},d:function(m){m&&me(n),f[e].d(),c=!1,u()}}}function Pet(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&Fce(t);return s=new li({props:{data:Qv}}),{c:function(){n=oe("div"),(e=oe("div")).textContent="Transform",i=Me(),u&&u.c(),r=Me(),o=oe("button"),$e(s.$$.fragment),I(e,"class","jse-title svelte-d01h2s"),I(o,"type","button"),I(o,"class","jse-close svelte-d01h2s"),I(n,"class","jse-header svelte-d01h2s")},m:function(d,h){ve(d,n,h),ee(n,e),ee(n,i),u&&u.m(n,null),ee(n,r),ee(n,o),Le(s,o,null),a=!0,l||(c=Ze(o,"click",t[2]),l=!0)},p:function(d,h){var f=Wt(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&W(u,1)):((u=Fce(d)).c(),W(u,1),u.m(n,r)):u&&(it(),Q(u,1,1,function(){u=null}),rt())},i:function(d){a||(W(u),W(s.$$.fragment,d),a=!0)},o:function(d){Q(u),Q(s.$$.fragment,d),a=!1},d:function(d){d&&me(n),u&&u.d(),Fe(s),l=!1,c()}}}function Bet(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=xs("simple-modal").close,c=xs("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(Let,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){qn[h?"unshift":"push"](function(){e(1,i=h)})}]}var Vet=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Bet,$et,In,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},Fet),r}return de(e)}(),ZP=Cs("jsoneditor:AutoScrollHandler"),Het=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},$ce=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function g(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function m(v){c||(c=v),g(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||Het,s=y.a11y||!1,xt(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),xt(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,xt(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(m)}},uk=Cs("jsoneditor:History");function Bce(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){uk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){uk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,uk("undo",h),a(),h}},redo:function d(){if(o())return uk("redo",e[i-=1]),a(),e[i]}}}function e0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var t0=Cs("validation");function Vce(t,n,e,i){return t0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function Uet(t,n,e,i){if(t0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:qu.info}]};if(0===t.length)return null;try{var r=e0(function(){return e.parse(t)},function(l){return t0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:e0(function(){return i.parse(t)},function(l){return t0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=e0(function(){return n(o)},function(l){return t0("validate: validated json in ".concat(l," ms"))});return Yn(s)?null:{validationErrors:s}}catch(l){var a=e0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Yu(c)),!0}catch{return!1}}(t,e)},function(c){return t0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:US(t,l.message||l.toString()),isRepairable:a}}}var dk=Cs("jsoneditor:FocusTracker");function eR(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(dk("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){dk("blur"),l=!1,a()}))}(0,t.onMount)(function(){dk("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){dk("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function zet(t){gn(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function Hce(t,n,e){var i=t.slice();return i[8]=n[e],i}function Uce(t){var n,e;return n=new li({props:{data:t[1]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function zce(t){var n,e;return n=new li({props:{data:t[8].icon}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Gce(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&zce(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=oe("button"),d&&d.c(),e=Me(),i=ut(u),r=Me(),I(n,"type","button"),I(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),I(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,g){ve(p,n,g),d&&d.m(n,null),ee(n,e),ee(n,i),ee(n,r),a=!0,l||(c=[Ze(n,"click",h),Ze(n,"mousedown",f)],l=!0)},p:function(p,g){(t=p)[8].icon?d?(d.p(t,g),8&g&&W(d,1)):((d=zce(t)).c(),W(d,1),d.m(n,e)):d&&(it(),Q(d,1,1,function(){d=null}),rt()),(!a||8&g)&&u!==(u=t[8].text+"")&&Jt(i,u),(!a||8&g&&o!==(o=t[8].title))&&I(n,"title",o),(!a||8&g&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(W(d),a=!0)},o:function(p){Q(d),a=!1},d:function(p){p&&me(n),d&&d.d(),l=!1,rr(c)}}}function Get(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&Uce(t),f=t[3],p=[],g=0;g100&&Kce(t);return{c:function(){n=oe("table"),e=oe("tbody");for(var u=0;u100?c?c.p(u,d):((c=Kce(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&Yce(t);function y(){return t[6](t[7])}return{c:function(){n=oe("tr"),e=oe("td"),$e(i.$$.fragment),r=Me(),o=oe("td"),s=ut(g),a=Me(),l=oe("td"),c=ut(m),u=Me(),d=oe("td"),v&&v.c(),I(e,"class","jse-validation-error-icon svelte-1oe8e8r"),I(o,"class","svelte-1oe8e8r"),I(l,"class","svelte-1oe8e8r"),I(d,"class","jse-validation-error-action svelte-1oe8e8r"),I(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(b,C){ve(b,n,C),ee(n,e),Le(i,e,null),ee(n,r),ee(n,o),ee(o,s),ee(n,a),ee(n,l),ee(l,c),ee(n,u),ee(n,d),v&&v.m(d,null),h=!0,f||(p=Ze(n,"click",y),f=!0)},p:function(b,C){t=b,(!h||1&C)&&g!==(g=oc(Xa(t[7].path))+"")&&Jt(s,g),(!h||1&C)&&m!==(m=t[7].message+"")&&Jt(c,m),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&W(v,1)):((v=Yce(t)).c(),W(v,1),v.m(d,null)):v&&(it(),Q(v,1,1,function(){v=null}),rt())},i:function(b){h||(W(i.$$.fragment,b),W(v),h=!0)},o:function(b){Q(i.$$.fragment,b),Q(v),h=!1},d:function(b){b&&me(n),Fe(i),v&&v.d(),f=!1,p()}}}function Kce(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=oe("tr"),e=oe("td"),i=Me(),r=oe("td"),o=Me(),s=oe("td"),a=ut("(and "),l=ut(h),c=ut(" more errors)"),u=Me(),d=oe("td"),I(e,"class","svelte-1oe8e8r"),I(r,"class","svelte-1oe8e8r"),I(s,"class","svelte-1oe8e8r"),I(d,"class","svelte-1oe8e8r"),I(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){ve(f,n,p),ee(n,e),ee(n,i),ee(n,r),ee(n,o),ee(n,s),ee(s,a),ee(s,l),ee(s,c),ee(n,u),ee(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&Jt(l,h)},d:function(f){f&&me(n)}}}function Ket(t){var n,e,i=!Yn(t[0]),r=i&&qce(t);return{c:function(){r&&r.c(),n=Ci()},m:function(o,s){r&&r.m(o,s),ve(o,n,s),e=!0},p:function(o,s){var a=Wt(s,1)[0];1&a&&(i=!Yn(o[0])),i?r?(r.p(o,a),1&a&&W(r,1)):((r=qce(o)).c(),W(r,1),r.m(n.parentNode,n)):r&&(it(),Q(r,1,1,function(){r=null}),rt())},i:function(o){e||(W(r),e=!0)},o:function(o){Q(r),e=!1},d:function(o){r&&r.d(o),o&&me(n)}}}function Xet(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var tR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Xet,Ket,In,{validationErrors:0,selectError:1},qet),r}return de(e)}(),Qet=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Zet(t){gn(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function ett(t){var n,e,i,r,o,s,a,l,c;return s=new li({props:{data:Qv}}),{c:function(){n=oe("div"),e=oe("div"),i=ut(t[0]),r=Me(),o=oe("button"),$e(s.$$.fragment),I(e,"class","jse-title svelte-d01h2s"),I(o,"type","button"),I(o,"class","jse-close svelte-d01h2s"),I(n,"class","jse-header svelte-d01h2s")},m:function(u,d){ve(u,n,d),ee(n,e),ee(e,i),ee(n,r),ee(n,o),Le(s,o,null),a=!0,l||(c=Ze(o,"click",t[3]),l=!0)},p:function(u,d){var h=Wt(d,1)[0];(!a||1&h)&&Jt(i,u[0])},i:function(u){a||(W(s.$$.fragment,u),a=!0)},o:function(u){Q(s.$$.fragment,u),a=!1},d:function(u){u&&me(n),Fe(s),l=!1,c()}}}function ttt(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=xs("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var nR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ttt,ett,In,{title:0,onClose:1},Zet),r}return de(e)}();function ntt(t){gn(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function itt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B;return e=new nR({props:{title:"Copying and pasting"}}),{c:function(){n=oe("div"),$e(e.$$.fragment),i=Me(),r=oe("div"),(o=oe("div")).textContent="These actions are unavailable via the menu. Please use:",s=Me(),a=oe("div"),l=oe("div"),(c=oe("div")).textContent="".concat(t[1],"+C"),u=ut("\n for copy"),d=Me(),h=oe("div"),(f=oe("div")).textContent="".concat(t[1],"+X"),p=ut("\n for cut"),g=Me(),m=oe("div"),(v=oe("div")).textContent="".concat(t[1],"+V"),y=ut("\n for paste"),b=Me(),C=oe("div"),(k=oe("button")).textContent="Close",I(c,"class","jse-key svelte-1olothd"),I(l,"class","jse-shortcut"),I(f,"class","jse-key svelte-1olothd"),I(h,"class","jse-shortcut"),I(v,"class","jse-key svelte-1olothd"),I(m,"class","jse-shortcut"),I(a,"class","jse-shortcuts svelte-1olothd"),I(k,"type","button"),I(k,"class","jse-primary svelte-1olothd"),I(C,"class","jse-actions svelte-1olothd"),I(r,"class","jse-modal-contents svelte-1olothd"),I(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(N,$){ve(N,n,$),Le(e,n,null),ee(n,i),ee(n,r),ee(r,o),ee(r,s),ee(r,a),ee(a,l),ee(l,c),ee(l,u),ee(a,d),ee(a,h),ee(h,f),ee(h,p),ee(a,g),ee(a,m),ee(m,v),ee(m,y),ee(r,b),ee(r,C),ee(C,k),T=!0,j||(B=Ze(k,"click",t[0]),j=!0)},p:tt,i:function(N){T||(W(e.$$.fragment,N),T=!0)},o:function(N){Q(e.$$.fragment,N),T=!1},d:function(N){N&&me(n),Fe(e),j=!1,B()}}}function rtt(t){return[xs("simple-modal").close,Qet?"\u2318":"Ctrl"]}var Xce=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,rtt,itt,In,{},ntt),r}return de(e)}();function Qce(t){return!!t&&("space"===t.type||!0===t.space)}function hk(t){return!!t&&("separator"===t.type||!0===t.separator)}function W_(t){return!!t&&"function"==typeof t.onClick}function iR(t){return!!t&&"dropdown-button"===t.type&&W_(t.main)&&Array.isArray(t.items)}function Zce(t){return Ar(t)&&Ar(t.parseError)}function stt(t){gn(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var att=function(t){return{}},eue=function(t){return{}};function tue(t,n,e){var i=t.slice();return i[3]=n[e],i}var ltt=function(t){return{}},nue=function(t){return{}};function ctt(t){var n,e=sue(t[3])+"";return{c:function(){n=ut(e)},m:function(i,r){ve(i,n,r)},p:function(i,r){1&r&&e!==(e=sue(i[3])+"")&&Jt(n,e)},i:tt,o:tt,d:function(i){i&&me(n)}}}function utt(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&iue(t),u=t[3].text&&rue(t);return{c:function(){n=oe("button"),c&&c.c(),e=Me(),u&&u.c(),I(n,"type","button"),I(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),I(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){ve(d,n,h),c&&c.m(n,null),ee(n,e),u&&u.m(n,null),s=!0,a||(l=Ze(n,"click",function(){bs(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&W(c,1)):((c=iue(t)).c(),W(c,1),c.m(n,e)):c&&(it(),Q(c,1,1,function(){c=null}),rt()),t[3].text?u?u.p(t,h):((u=rue(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&I(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&I(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(W(c),s=!0)},o:function(d){Q(c),s=!1},d:function(d){d&&me(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function dtt(t){var n;return{c:function(){I(n=oe("div"),"class","jse-space svelte-497ud4")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function htt(t){var n;return{c:function(){I(n=oe("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function iue(t){var n,e;return n=new li({props:{data:t[3].icon}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function rue(t){var n,e=t[3].text+"";return{c:function(){n=ut(e)},m:function(i,r){ve(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&Jt(n,e)},d:function(i){i&&me(n)}}}function oue(t){var n,e,i,r,o,s,a,l=[htt,dtt,utt,ctt],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!hk(d[3])),n?0:(null==e&&(e=!!Qce(d[3])),e?1:(null==i&&(i=!!W_(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=Ci()},m:function(d,h){c[r].m(d,h),ve(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):(it(),Q(c[f],1,1,function(){c[f]=null}),rt(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),W(o,1),o.m(s.parentNode,s))},i:function(d){a||(W(o),a=!0)},o:function(d){Q(o),a=!1},d:function(d){c[r].d(d),d&&me(s)}}}function ftt(t){for(var n,e,i,r,o=t[2].left,s=ko(o,t,t[1],nue),a=t[0],l=[],c=0;c0&&b.height>0}),u),c=u(e);function u(y){var b=y.getBoundingClientRect();return{x:b.left+b.width/2,y:b.top+b.height/2,rect:b,element:y}}function d(y,b){var k=y.x-b.x,T=(y.y-b.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(k*k+T*T)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(jv(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(jv(m.filter(function(y){return o(y.element)}),h)||jv(m,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){qn[a?"unshift":"push"](function(){e(2,i=a)})}]}var Cue=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ent,Ztt,In,{items:0,tip:1},Ltt),r}return de(e)}();function tnt(t){var n,e;return n=new Cue({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function nnt(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j=n.json,B=n.documentState,N=n.parser,$=n.showTip,V=n.onCloseContextMenu,z=n.onEditKey,Y=n.onEditValue,O=n.onToggleEnforceString,H=n.onCut,G=n.onCopy,F=n.onPaste,Z=n.onRemove,D=n.onDuplicate,E=n.onExtract,M=n.onInsertBefore,U=n.onInsert,L=n.onConvert,X=n.onInsertAfter,ne=n.onSort,ge=n.onTransform;function ae(){V(),z()}function De(){V(),Y()}function be(){V(),O()}function Ie(){V(),H(!0)}function R(){V(),H(!1)}function J(){V(),G(!0)}function K(){V(),G(!1)}function pe(){V(),F()}function Te(){V(),Z()}function ye(){V(),D()}function Ue(){V(),E()}function Je(mt){V(),c?L(mt):U(mt)}function _t(){V(),ne()}function zt(){V(),ge()}function ct(){V(),M()}function Nn(){V(),X()}return t.$$set=function(mt){"json"in mt&&e(2,j=mt.json),"documentState"in mt&&e(3,B=mt.documentState),"parser"in mt&&e(4,N=mt.parser),"showTip"in mt&&e(0,$=mt.showTip),"onCloseContextMenu"in mt&&e(5,V=mt.onCloseContextMenu),"onEditKey"in mt&&e(6,z=mt.onEditKey),"onEditValue"in mt&&e(7,Y=mt.onEditValue),"onToggleEnforceString"in mt&&e(8,O=mt.onToggleEnforceString),"onCut"in mt&&e(9,H=mt.onCut),"onCopy"in mt&&e(10,G=mt.onCopy),"onPaste"in mt&&e(11,F=mt.onPaste),"onRemove"in mt&&e(12,Z=mt.onRemove),"onDuplicate"in mt&&e(13,D=mt.onDuplicate),"onExtract"in mt&&e(14,E=mt.onExtract),"onInsertBefore"in mt&&e(15,M=mt.onInsertBefore),"onInsert"in mt&&e(16,U=mt.onInsert),"onConvert"in mt&&e(17,L=mt.onConvert),"onInsertAfter"in mt&&e(18,X=mt.onInsertAfter),"onSort"in mt&&e(19,ne=mt.onSort),"onTransform"in mt&&e(20,ge=mt.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=B.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==j),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Yn(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Dt(j,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":Ar(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Pi(i)||vo(i)||Zn(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Pi(i)||Zn(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&$_(i)&&!s&&!Array.isArray(Dt(j,Qn(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&$_(i)),136&t.$$.dirty[1]&&e(32,p=f&&!$r(a)),4194304&t.$$.dirty[0]&&e(25,g=c),33554432&t.$$.dirty[0]&&e(24,m=g?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!g&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=g?hg(i)&&!Ar(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,b=g?hg(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=g?hg(i)&&$r(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,k=null!=i&&dh(a,B.enforceStringMap,gt(i.focusPath),N)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,T=[{type:"row",items:[{type:"button",onClick:ae,icon:Kv,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:De,icon:Kv,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:Kv,text:l,title:"Edit the value (Double-click on the value)",onClick:De,disabled:!f},{type:"button",icon:k?P_:R_,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:be,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:Ie,icon:Jv,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:Jv,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:Ie,disabled:!c},{type:"button",icon:Jv,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:R,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:J,icon:xf,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:xf,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:J,disabled:!c},{type:"button",icon:xf,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:K,disabled:!c}]},{type:"button",onClick:pe,icon:Hle,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:ye,icon:Jle,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:Ue,icon:EZe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:_t,icon:nk,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:zt,icon:ZS,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Te,icon:VP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:m},{type:"button",onClick:function(){return Je("structure")},icon:g?tk:Xv,text:"Structure",title:m+" structure",disabled:!v},{type:"button",onClick:function(){return Je("object")},icon:g?tk:Xv,text:"Object",title:m+" structure",disabled:!y},{type:"button",onClick:function(){return Je("array")},icon:g?tk:Xv,text:"Array",title:m+" array",disabled:!b},{type:"button",onClick:function(){return Je("value")},icon:g?tk:Xv,text:"Value",title:m+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:ct,icon:DZe,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Nn,icon:SZe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[$,T,j,B,N,V,z,Y,O,H,G,F,Z,D,E,M,U,L,X,ne,ge,s,c,C,m,g,b,y,v,d,u,o,p,k,f,l,h,i,a,r]}var int=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,nnt,tnt,In,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return de(e)}();function rnt(t){gn(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function Sue(t,n,e){var i=t.slice();return i[13]=n[e],i}function kue(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=oe("button"),e=ut("show "),i=ut(c),r=ut("-"),o=ut(u),s=Me(),I(n,"type","button"),I(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){ve(h,n,f),ee(n,e),ee(n,i),ee(n,r),ee(n,o),ee(n,s),a||(l=Ze(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&Jt(i,c),16&f&&u!==(u=t[13].end+"")&&Jt(o,u)},d:function(h){h&&me(n),a=!1,l()}}}function ont(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&b.end<=T.start)&&j.push(b),T.start>=(B?b.end:v.end)&&j.push(T),a=j))},[d,p,o,r,a,s,l,c,u,h,f,i,function(g){return p(d,g)}]}var lnt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ant,ont,In,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},rnt),r}return de(e)}();function cnt(t){gn(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function unt(t){var n,e,i,r,o;return e=new li({props:{data:lc}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-context-menu-pointer svelte-1yzl4st"),I(n,"title",pN),Xe(n,"jse-selected",t[0])},m:function(s,a){ve(s,n,a),Le(e,n,null),i=!0,r||(o=Ze(n,"click",t[1]),r=!0)},p:function(s,a){var l=Wt(a,1)[0];(!i||1&l)&&Xe(n,"jse-selected",s[0])},i:function(s){i||(W(e.$$.fragment,s),i=!0)},o:function(s){Q(e.$$.fragment,s),i=!1},d:function(s){s&&me(n),Fe(e),r=!1,o()}}}function dnt(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var kf=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,dnt,unt,In,{selected:0,onContextMenu:2},cnt),r}return de(e)}();function hnt(t){gn(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function fnt(t){var n,e,i,r,o,s,a,l=[mnt,gnt],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=oe("div"),i.c(),I(n,"data-type","selectable-key"),I(n,"class",r=Tr(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){ve(d,n,h),c[e].m(n,null),o=!0,s||(a=Ze(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):(it(),Q(c[f],1,1,function(){c[f]=null}),rt(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),W(i,1),i.m(n,null)),(!o||1&h&&r!==(r=Tr(d[6](d[0]))+" svelte-24a1b2"))&&I(n,"class",r)},i:function(d){o||(W(i),o=!0)},o:function(d){Q(i),o=!1},d:function(d){d&&me(n),c[e].d(),s=!1,a()}}}function pnt(t){var n,e;return n=new Ale({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function gnt(t){var n,e=ug(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=ut(e)},m:function(i,r){ve(i,n,r)},p:function(i,r){5&r&&e!==(e=ug(i[2].normalization.escapeValue(i[0]))+"")&&Jt(n,e)},i:tt,o:tt,d:function(i){i&&me(n)}}}function mnt(t){var n,e;return n=new Vle({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Due(t){var n,e;return n=new kf({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function vnt(t){var n,e,i,r,o,s=[pnt,fnt],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&Due(t);return{c:function(){e.c(),i=Me(),c&&c.c(),r=Ci()},m:function(u,d){a[n].m(u,d),ve(u,i,d),c&&c.m(u,d),ve(u,r,d),o=!0},p:function(u,d){var h=Wt(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):(it(),Q(a[f],1,1,function(){a[f]=null}),rt(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),W(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&(it(),Q(c,1,1,function(){c=null}),rt()):c?(c.p(u,h),28&h&&W(c,1)):((c=Due(u)).c(),W(c,1),c.m(r.parentNode,r))},i:function(u){o||(W(e),W(c),o=!0)},o:function(u){Q(e),Q(c),o=!1},d:function(u){a[n].d(u),u&&me(i),c&&c.d(u),u&&me(r)}}}function ynt(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&vo(l):void 0),2056&t.$$.dirty&&e(4,r=i&&_f(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(ac(o,!0)))},function(h){return sd("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),g=Qn(o).concat(p);d.onSelect(f===mN?mi(g,!1):ac(g,!1)),f!==gN&&d.focus()},function(){d.onSelect(ac(o,!1)),d.focus()},o,s,l,u]}var _nt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ynt,vnt,In,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},hnt),r}return de(e)}();function Aue(t,n,e){var i=t.slice();return i[8]=n[e],i}function Eue(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+m()/2;)y+=m(),v-=1;return v!==g&&void 0!==d[v]?{beforePath:d[v].path,offset:v-g}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,g=u.deltaY,m=KS(u.selection),v=f.findIndex(function($){return ai($.path,m)}),y=0,b=v,C=function(){var $;return null===($=f[b+1])||void 0===$?void 0:$.height};void 0!==C()&&Math.abs(g)>y+C()/2;)y+=C(),b+=1;var T=Dt(h,Qn(m)),j=Array.isArray(T),B=null===(d=f[j?b:b+1])||void 0===d?void 0:d.path,N=b-v;return B?{beforePath:B,offset:N}:{append:!0,offset:N}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,g,m,v,y,b,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,g=Qn(d.focusPath),m=Dt(u,g);if(!(p||f&&Wv(f,g)&&f.length>g.length))return[];var v=Uv(d),y=KS(d),b=Rt(v),C=Rt(y),k=f?f[g.length]:void 0;if(!Dr(m)){if(er(m)){var T=Ho(b),j=Ho(C),B=void 0!==k?Ho(k):m.length;return uP(j-T+1,B$?[].concat(sn(N.slice($,V+1)),sn(N.slice(z,N.length))).map(function(Y){return fg(g,Y)}):[].concat(sn(N.slice(z,$)),sn(N.slice(V+1,N.length))).map(function(Y){return fg(g,Y)}):[]}(n,o,s),l=Dt(n,Qn(Uv(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,m=u.offset,v=Uv(g=u.selection),y=KS(g),b=f.findIndex(function(j){return ai(j.path,v)}),C=f.findIndex(function(j){return ai(j.path,y)}),Eo(p,null===(d=f[b+m])||void 0===d?void 0:d.path,null===(h=f[C+m])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function cd(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return vv(e,n)})}function Snt(t){gn(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function knt(t){var n,e,i,r,o,s;return e=new li({props:{data:pg}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){ve(a,n,l),Le(e,n,null),r=!0,o||(s=[Ze(n,"click",function(){bs(t[0])&&t[0].apply(this,arguments)}),ws(i=BP.call(null,n,Ee({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=Wt(l,1)[0];t=a,i&&bs(i.update)&&2&c&&i.update.call(null,Ee({text:t[1]},t[2]))},i:function(a){r||(W(e.$$.fragment,a),r=!0)},o:function(a){Q(e.$$.fragment,a),r=!1},d:function(a){a&&me(n),Fe(e),o=!1,rr(s)}}}function Tnt(t,n,e){var i,r=xs("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var o0=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Tnt,knt,po,{validationError:3,onExpand:0},Snt),r}return de(e)}();function Dnt(t){gn(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var Ant=function(t){return{}},Mue=function(t){return{}};function Oue(t,n,e){var i=t.slice();return i[53]=n[e],i}var Ent=function(t){return{}},Iue=function(t){return{}};function Nue(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function jue(t,n,e){var i=t.slice();return i[50]=n[e],i}var Mnt=function(t){return{}},Pue=function(t){return{}};function Ont(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Zn(t[7])||Pi(t[7]))&&!t[7].edit&&ai(t[7].focusPath,t[1]),d=t[34].identifier,h=ko(d,t,t[35],Mue),f=!t[17]&&Rue();o=new Cnt({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:Fle(t[6],t[9]),context:t[8]}});var p=u&&Lue(t),g=t[15]&&Fue(t),m=!t[17]&&$ue(t);return{c:function(){n=oe("div"),e=oe("div"),h&&h.c(),i=Me(),f&&f.c(),r=Me(),$e(o.$$.fragment),s=Me(),p&&p.c(),a=Me(),g&&g.c(),l=Me(),m&&m.c(),I(e,"class","jse-contents svelte-1wlxti1"),I(n,"class","jse-contents-outer svelte-1wlxti1"),I(n,"style",t[18])},m:function(v,y){ve(v,n,y),ee(n,e),h&&h.m(e,null),ee(e,i),f&&f.m(e,null),ee(e,r),Le(o,e,null),ee(e,s),p&&p.m(e,null),ee(n,a),g&&g.m(n,null),ee(n,l),m&&m.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Do(h,d,v,v[35],c?To(d,v[35],y,Ant):Ao(v[35]),Mue),v[17]?f&&(f.d(1),f=null):f||((f=Rue()).c(),f.m(e,r));var b={};2&y[0]&&(b.path=v[1]),1&y[0]&&(b.value=v[0]),8192&y[0]&&(b.enforceString=v[13]),65664&y[0]&&(b.selection=v[16]?v[7]:void 0),576&y[0]&&(b.searchResultItems=Fle(v[6],v[9])),256&y[0]&&(b.context=v[8]),o.$set(b),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Zn(v[7])||Pi(v[7]))&&!v[7].edit&&ai(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&W(p,1)):((p=Lue(v)).c(),W(p,1),p.m(e,null)):p&&(it(),Q(p,1,1,function(){p=null}),rt()),v[15]?g?(g.p(v,y),32768&y[0]&&W(g,1)):((g=Fue(v)).c(),W(g,1),g.m(n,l)):g&&(it(),Q(g,1,1,function(){g=null}),rt()),v[17]?m&&(m.d(1),m=null):m?m.p(v,y):((m=$ue(v)).c(),m.m(n,null)),(!c||262144&y[0])&&I(n,"style",v[18])},i:function(v){c||(W(h,v),W(o.$$.fragment,v),W(p),W(g),c=!0)},o:function(v){Q(h,v),Q(o.$$.fragment,v),Q(p),Q(g),c=!1},d:function(v){v&&me(n),h&&h.d(v),f&&f.d(),Fe(o),p&&p.d(),g&&g.d(),m&&m.d()}}}function Int(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Zn(t[7])||Pi(t[7]))&&!t[7].edit&&ai(t[7].focusPath,t[1]),C=[Pnt,jnt],k=[];function T(D,E){return D[12]?0:1}r=T(t),o=k[r]=C[r](t);var j=t[34].identifier,B=ko(j,t,t[35],Iue),N=!t[17]&&Bue();function $(D,E){return D[12]?Lnt:Rnt}var V=$(t),z=V(t),Y=b&&Vue(t),O=t[15]&&(!t[12]||!t[15].isChildError)&&Hue(t);function H(D,E){return D[12]?$nt:D[17]?void 0:Fnt}var G=H(t),F=G&&G(t),Z=t[12]&&Uue(t);return{c:function(){n=oe("div"),e=oe("div"),i=oe("button"),o.c(),s=Me(),B&&B.c(),a=Me(),N&&N.c(),l=Me(),c=oe("div"),u=oe("div"),z.c(),d=Me(),Y&&Y.c(),h=Me(),O&&O.c(),f=Me(),F&&F.c(),p=Me(),Z&&Z.c(),g=Ci(),I(i,"type","button"),I(i,"class","jse-expand svelte-1wlxti1"),I(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),I(u,"class","jse-meta-inner svelte-1wlxti1"),I(c,"class","jse-meta svelte-1wlxti1"),I(c,"data-type","selectable-value"),I(e,"class","jse-header svelte-1wlxti1"),I(n,"class","jse-header-outer svelte-1wlxti1"),I(n,"style",t[18])},m:function(D,E){ve(D,n,E),ee(n,e),ee(e,i),k[r].m(i,null),ee(e,s),B&&B.m(e,null),ee(e,a),N&&N.m(e,null),ee(e,l),ee(e,c),ee(c,u),z.m(u,null),ee(e,d),Y&&Y.m(e,null),ee(n,h),O&&O.m(n,null),ee(n,f),F&&F.m(n,null),ve(D,p,E),Z&&Z.m(D,E),ve(D,g,E),m=!0,v||(y=Ze(i,"click",t[21]),v=!0)},p:function(D,E){var M=r;(r=T(D))===M?k[r].p(D,E):(it(),Q(k[M],1,1,function(){k[M]=null}),rt(),(o=k[r])?o.p(D,E):(o=k[r]=C[r](D)).c(),W(o,1),o.m(i,null)),B&&B.p&&(!m||16&E[1])&&Do(B,j,D,D[35],m?To(j,D[35],E,Ent):Ao(D[35]),Iue),D[17]?N&&(N.d(1),N=null):N||((N=Bue()).c(),N.m(e,l)),V===(V=$(D))&&z?z.p(D,E):(z.d(1),(z=V(D))&&(z.c(),z.m(u,null))),65922&E[0]&&(b=!D[8].readOnly&&D[16]&&D[7]&&(Zn(D[7])||Pi(D[7]))&&!D[7].edit&&ai(D[7].focusPath,D[1])),b?Y?(Y.p(D,E),65922&E[0]&&W(Y,1)):((Y=Vue(D)).c(),W(Y,1),Y.m(e,null)):Y&&(it(),Q(Y,1,1,function(){Y=null}),rt()),!D[15]||D[12]&&D[15].isChildError?O&&(it(),Q(O,1,1,function(){O=null}),rt()):O?(O.p(D,E),36864&E[0]&&W(O,1)):((O=Hue(D)).c(),W(O,1),O.m(n,f)),G===(G=H(D))&&F?F.p(D,E):(F&&F.d(1),(F=G&&G(D))&&(F.c(),F.m(n,null))),(!m||262144&E[0])&&I(n,"style",D[18]),D[12]?Z?(Z.p(D,E),4096&E[0]&&W(Z,1)):((Z=Uue(D)).c(),W(Z,1),Z.m(g.parentNode,g)):Z&&(it(),Q(Z,1,1,function(){Z=null}),rt())},i:function(D){m||(W(o),W(B,D),W(Y),W(O),W(Z),m=!0)},o:function(D){Q(o),Q(B,D),Q(Y),Q(O),Q(Z),m=!1},d:function(D){D&&me(n),k[r].d(),B&&B.d(D),N&&N.d(),z.d(),Y&&Y.d(),O&&O.d(),F&&F.d(),D&&me(p),Z&&Z.d(D),D&&me(g),v=!1,y()}}}function Nnt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Zn(t[7])||Pi(t[7]))&&!t[7].edit&&ai(t[7].focusPath,t[1]),C=[Hnt,Vnt],k=[];function T(D,E){return D[12]?0:1}r=T(t),o=k[r]=C[r](t);var j=t[34].identifier,B=ko(j,t,t[35],Pue),N=!t[17]&&que();function $(D,E){return D[12]?znt:Unt}var V=$(t),z=V(t),Y=b&&Yue(t),O=t[15]&&(!t[12]||!t[15].isChildError)&&Jue(t);function H(D,E){return D[12]?Wnt:Gnt}var G=H(t),F=G(t),Z=t[12]&&Kue(t);return{c:function(){n=oe("div"),e=oe("div"),i=oe("button"),o.c(),s=Me(),B&&B.c(),a=Me(),N&&N.c(),l=Me(),c=oe("div"),u=oe("div"),z.c(),d=Me(),Y&&Y.c(),h=Me(),O&&O.c(),f=Me(),F.c(),p=Me(),Z&&Z.c(),g=Ci(),I(i,"type","button"),I(i,"class","jse-expand svelte-1wlxti1"),I(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),I(u,"class","jse-meta-inner svelte-1wlxti1"),I(u,"data-type","selectable-value"),I(c,"class","jse-meta svelte-1wlxti1"),I(e,"class","jse-header svelte-1wlxti1"),I(n,"class","jse-header-outer svelte-1wlxti1"),I(n,"style",t[18])},m:function(D,E){ve(D,n,E),ee(n,e),ee(e,i),k[r].m(i,null),ee(e,s),B&&B.m(e,null),ee(e,a),N&&N.m(e,null),ee(e,l),ee(e,c),ee(c,u),z.m(u,null),ee(e,d),Y&&Y.m(e,null),ee(n,h),O&&O.m(n,null),ee(n,f),F.m(n,null),ve(D,p,E),Z&&Z.m(D,E),ve(D,g,E),m=!0,v||(y=Ze(i,"click",t[21]),v=!0)},p:function(D,E){var M=r;(r=T(D))===M?k[r].p(D,E):(it(),Q(k[M],1,1,function(){k[M]=null}),rt(),(o=k[r])?o.p(D,E):(o=k[r]=C[r](D)).c(),W(o,1),o.m(i,null)),B&&B.p&&(!m||16&E[1])&&Do(B,j,D,D[35],m?To(j,D[35],E,Mnt):Ao(D[35]),Pue),D[17]?N&&(N.d(1),N=null):N||((N=que()).c(),N.m(e,l)),V===(V=$(D))&&z?z.p(D,E):(z.d(1),(z=V(D))&&(z.c(),z.m(u,null))),65922&E[0]&&(b=!D[8].readOnly&&D[16]&&D[7]&&(Zn(D[7])||Pi(D[7]))&&!D[7].edit&&ai(D[7].focusPath,D[1])),b?Y?(Y.p(D,E),65922&E[0]&&W(Y,1)):((Y=Yue(D)).c(),W(Y,1),Y.m(e,null)):Y&&(it(),Q(Y,1,1,function(){Y=null}),rt()),!D[15]||D[12]&&D[15].isChildError?O&&(it(),Q(O,1,1,function(){O=null}),rt()):O?(O.p(D,E),36864&E[0]&&W(O,1)):((O=Jue(D)).c(),W(O,1),O.m(n,f)),G===(G=H(D))&&F?F.p(D,E):(F.d(1),(F=G(D))&&(F.c(),F.m(n,null))),(!m||262144&E[0])&&I(n,"style",D[18]),D[12]?Z?(Z.p(D,E),4096&E[0]&&W(Z,1)):((Z=Kue(D)).c(),W(Z,1),Z.m(g.parentNode,g)):Z&&(it(),Q(Z,1,1,function(){Z=null}),rt())},i:function(D){m||(W(o),W(B,D),W(Y),W(O),W(Z),m=!0)},o:function(D){Q(o),Q(B,D),Q(Y),Q(O),Q(Z),m=!1},d:function(D){D&&me(n),k[r].d(),B&&B.d(D),N&&N.d(),z.d(),Y&&Y.d(),O&&O.d(),F.d(),D&&me(p),Z&&Z.d(D),D&&me(g),v=!1,y()}}}function Rue(t){var n;return{c:function(){(n=oe("div")).textContent=":",I(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){ve(e,n,i)},d:function(e){e&&me(n)}}}function Lue(t){var n,e,i;return e=new kf({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=oe("div"),$e(e.$$.fragment),I(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){ve(r,n,o),Le(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(W(e.$$.fragment,r),i=!0)},o:function(r){Q(e.$$.fragment,r),i=!1},d:function(r){r&&me(n),Fe(e)}}}function Fue(t){var n,e;return n=new o0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function $ue(t){var n,e,i;return{c:function(){I(n=oe("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),I(n,"data-type","insert-selection-area-after")},m:function(r,o){ve(r,n,o),e||(i=Ze(n,"click",t[30]),e=!0)},p:tt,d:function(r){r&&me(n),e=!1,i()}}}function jnt(t){var n,e;return n=new li({props:{data:bf}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Pnt(t){var n,e;return n=new li({props:{data:lc}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Bue(t){var n;return{c:function(){(n=oe("div")).textContent=":",I(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){ve(e,n,i)},d:function(e){e&&me(n)}}}function Rnt(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=oe("div")).textContent="{",e=Me(),i=oe("button"),r=ut(d),o=Me(),s=ut(h),a=Me(),(l=oe("div")).textContent="}",I(n,"class","jse-bracket svelte-1wlxti1"),I(i,"type","button"),I(i,"class","jse-tag svelte-1wlxti1"),I(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){ve(f,n,p),ve(f,e,p),ve(f,i,p),ee(i,r),ee(i,o),ee(i,s),ve(f,a,p),ve(f,l,p),c||(u=Ze(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&Jt(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&Jt(s,h)},d:function(f){f&&me(n),f&&me(e),f&&me(i),f&&me(a),f&&me(l),c=!1,u()}}}function Lnt(t){var n;return{c:function(){(n=oe("div")).textContent="{",I(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){ve(e,n,i)},p:tt,d:function(e){e&&me(n)}}}function Vue(t){var n,e,i;return e=new kf({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=oe("div"),$e(e.$$.fragment),I(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){ve(r,n,o),Le(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(W(e.$$.fragment,r),i=!0)},o:function(r){Q(e.$$.fragment,r),i=!1},d:function(r){r&&me(n),Fe(e)}}}function Hue(t){var n,e;return n=new o0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Fnt(t){var n,e,i;return{c:function(){I(n=oe("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),I(n,"data-type","insert-selection-area-after")},m:function(r,o){ve(r,n,o),e||(i=Ze(n,"click",t[30]),e=!0)},p:tt,d:function(r){r&&me(n),e=!1,i()}}}function $nt(t){var n,e,i;return{c:function(){I(n=oe("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),I(n,"data-type","insert-selection-area-inside")},m:function(r,o){ve(r,n,o),e||(i=Ze(n,"click",t[29]),e=!0)},p:tt,d:function(r){r&&me(n),e=!1,i()}}}function Uue(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&zo(t[7])),c=l&&zue(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=Me(),p&&p.c(),I(n,"class","jse-props svelte-1wlxti1"),I(o,"data-type","selectable-value"),I(o,"class","jse-footer svelte-1wlxti1"),I(r,"class","jse-footer-outer svelte-1wlxti1"),I(r,"style",t[18])},m:function(g,m){ve(g,n,m),c&&c.m(n,null),ee(n,e);for(var v=0;v]',s=Me(),v&&v.c(),I(n,"class","jse-items svelte-1wlxti1"),I(o,"data-type","selectable-value"),I(o,"class","jse-footer svelte-1wlxti1"),I(r,"class","jse-footer-outer svelte-1wlxti1"),I(r,"style",t[18])},m:function(y,b){ve(y,n,b),d&&d.m(n,null),ee(n,e);for(var C=0;C=ye.start&&J<=ye.end});if(!K)return null;Aae(K.start,Math.min(p.length,K.end),function(ye){return De(String(ye))})}else Object.keys(p).forEach(De);return ae}(k,l||Kp);if(B("dragSelectionStart",{selection:k,items:M}),M){var U=Uv(k),L=M.findIndex(function(ne){return ai(ne.path,U)}),X=sR({json:T.getJson(),documentState:T.getDocumentState(),deltaY:0,items:M}).offset;e(11,V={initialTarget:D.target,initialClientY:D.clientY,initialContentTop:H(),selectionStartIndex:L,selectionItemsCount:kle(k).length,items:M,offset:X,didMoveItems:!1}),ls.dragging=!0,document.addEventListener("mousemove",F,!0),document.addEventListener("mouseup",Z)}else B("Cannot drag the current selection (probably spread over multiple sections)")}else j(D)}},function(D){ls.selecting||ls.dragging||(D.stopPropagation(),dg(D.target,"data-type","selectable-value")?e(10,N="hover-collection"):dg(D.target,"data-type","insert-selection-area-inside")?e(10,N="hover-insert-inside"):dg(D.target,"data-type","insert-selection-area-after")&&e(10,N="hover-insert-after"),clearTimeout($))},function(D){D.stopPropagation(),$=setTimeout(function(){return e(10,N=void 0)})},function(D){D.shiftKey||(D.stopPropagation(),D.preventDefault(),T.onSelect(hh(g)))},function(D){D.shiftKey||(D.stopPropagation(),D.preventDefault(),T.onSelect(fh(g)))},function(D){T.onSelect(hh(g)),T.onContextMenu(D)},function(D){T.onSelect(fh(g)),T.onContextMenu(D)},j,h,f]}var aR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Jnt,Ynt,In,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},Dnt,[-1,-1]),r}return de(e)}(),Knt=aR,Xnt={prefix:"fas",iconName:"jsoneditor-expand",icon:[512,512,[],"","M 0,448 V 512 h 512 v -64 z M 0,0 V 64 H 512 V 0 Z M 256,96 128,224 h 256 z M 256,416 384,288 H 128 Z"]},Qnt={prefix:"fas",iconName:"jsoneditor-collapse",icon:[512,512,[],"","m 0,224 v 64 h 512 v -64 z M 256,192 384,64 H 128 Z M 256,320 128,448 h 256 z"]},lR={prefix:"fas",iconName:"jsoneditor-format",icon:[512,512,[],"","M 0,32 v 64 h 416 v -64 z M 160,160 v 64 h 352 v -64 z M 160,288 v 64 h 288 v -64 z M 0,416 v 64 h 320 v -64 z"]},Znt={prefix:"fas",iconName:"jsoneditor-compact",icon:[512,512,[],"","M 0,32 v 64 h 512 v -64 z M 0,160 v 64 h 512 v -64 z M 0,288 v 64 h 352 v -64 z"]};function eit(t){var n,e;return n=new fk({props:{items:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&Wt(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function tit(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,g=n.historyState,m=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,b=n.onRedo,C=n.onSort,k=n.onTransform,T=n.onContextMenu,j=n.onCopy,B=n.onRenderMenu;function N(){e(1,p=!p)}return t.$$set=function($){"json"in $&&e(2,u=$.json),"selection"in $&&e(3,d=$.selection),"readOnly"in $&&e(4,h=$.readOnly),"showSearch"in $&&e(1,p=$.showSearch),"historyState"in $&&e(5,g=$.historyState),"onExpandAll"in $&&e(6,m=$.onExpandAll),"onCollapseAll"in $&&e(7,v=$.onCollapseAll),"onUndo"in $&&e(8,y=$.onUndo),"onRedo"in $&&e(9,b=$.onRedo),"onSort"in $&&e(10,C=$.onSort),"onTransform"in $&&e(11,k=$.onTransform),"onContextMenu"in $&&e(12,T=$.onContextMenu),"onCopy"in $&&e(13,j=$.onCopy),"onRenderMenu"in $&&e(14,B=$.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Pi(d)||vo(d)||Zn(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:Xnt,title:"Expand all",className:"jse-expand-all",onClick:m,disabled:!$r(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:Qnt,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!$r(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:zP,title:"Search (Ctrl+F)",className:"jse-search",onClick:N,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:xf,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:j,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:nk,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:ZS,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:k,disabled:h||void 0===u},l,{type:"button",icon:Wle,title:pN,className:"jse-contextmenu",onClick:T},{type:"separator"},{type:"button",icon:UP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!g.canUndo},{type:"button",icon:HP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:b,disabled:!g.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=B(c)||c)},[o,p,u,d,h,g,m,v,y,b,C,k,T,j,B,s,a,l,c,r,i]}var nit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,tit,eit,In,{json:2,selection:3,readOnly:4,showSearch:1,historyState:5,onExpandAll:6,onCollapseAll:7,onUndo:8,onRedo:9,onSort:10,onTransform:11,onContextMenu:12,onCopy:13,onRenderMenu:14}),r}return de(e)}();function iit(t){gn(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function ide(t){var n;return{c:function(){(n=oe("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',I(n,"class","svelte-1q2qkk2")},m:function(e,i){ve(e,n,i)},d:function(e){e&&me(n)}}}function rit(t){var n,e,i,r,o,s,a,l=!t[0]&&ide();return{c:function(){n=oe("div"),e=oe("div"),i=Me(),r=oe("div"),o=ut("Empty document\n "),l&&l.c(),s=Me(),a=oe("div"),I(e,"class","jse-space jse-before svelte-1q2qkk2"),I(r,"class","jse-contents svelte-1q2qkk2"),I(a,"class","jse-space jse-after svelte-1q2qkk2"),I(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){ve(c,n,u),ee(n,e),ee(n,i),ee(n,r),ee(r,o),l&&l.m(r,null),ee(n,s),ee(n,a)},p:function(c,u){Wt(u,1),c[0]?l&&(l.d(1),l=null):l||((l=ide()).c(),l.m(r,null))},i:tt,o:tt,d:function(c){c&&me(n),l&&l.d()}}}function oit(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var sit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,oit,rit,In,{readOnly:0},iit),r}return de(e)}(),cR={},ait={get exports(){return cR},set exports(t){cR=t}},rde=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(er(Dt(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function cit(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function uit(t,n){return function(e,i){var r=Dt(e,t),o=Dt(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Dt(t,n);return[{op:"replace",path:gt(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(Ar(t))return function lit(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Dt(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*uR(u,d)});for(var s=[],a=0;aY_&&lde();return{c:function(){n=oe("div");for(var d=0;dY_?u?u.p(d,f):((u=lde()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:tt,o:tt,d:function(d){d&&me(n);for(var h=0;h0&&(a("scrollTo ",m),o.scrollTo({left:m,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(m){a("get items for path",m);var v=Dt(l,m);if(Array.isArray(v))return sP(0,v.length).map(String);if(Ar(v)){var y=Object.keys(v).slice(0);return y.sort(uR),y}return[]},function(m){return Ql(l,m)},p,function(){e(6,f=!f)},g,function(m){g(),p(m)},c,u,function(m){qn[m?"unshift":"push"](function(){e(5,s=m)})},function(m){qn[m?"unshift":"push"](function(){e(4,o=m)})}]}var Dit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Tit,kit,In,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},xit),r}return de(e)}();function Ait(t){gn(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function vde(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",O=!t[4]&&yde(t),H=[Mit,Eit],G=[];function F(D,E){return D[2]?0:1}a=F(t),l=G[a]=H[a](t),y=new li({props:{data:NZe}}),k=new li({props:{data:TZe}}),B=new li({props:{data:Qv}});var Z=t[0]&&!t[4]&&_de(t);return{c:function(){n=oe("div"),e=oe("form"),O&&O.c(),i=Me(),r=oe("div"),o=oe("div"),s=oe("div"),l.c(),c=Me(),u=oe("label"),d=oe("input"),h=Me(),f=oe("div"),p=ut(Y),g=ut(t[10]),m=Me(),v=oe("button"),$e(y.$$.fragment),b=Me(),C=oe("button"),$e(k.$$.fragment),T=Me(),j=oe("button"),$e(B.$$.fragment),N=Me(),Z&&Z.c(),I(s,"class","jse-search-icon svelte-3lbrbf"),I(d,"class","jse-search-input svelte-3lbrbf"),I(d,"title","Enter text to search"),I(d,"type","text"),I(d,"placeholder","Find"),I(u,"class","jse-search-input-label svelte-3lbrbf"),I(u,"about","jse-search input"),I(f,"class","jse-search-count svelte-3lbrbf"),Xe(f,"jse-visible",""!==t[8]),I(v,"type","button"),I(v,"class","jse-search-next svelte-3lbrbf"),I(v,"title","Go to next search result (Enter)"),I(C,"type","button"),I(C,"class","jse-search-previous svelte-3lbrbf"),I(C,"title","Go to previous search result (Shift+Enter)"),I(j,"type","button"),I(j,"class","jse-search-clear svelte-3lbrbf"),I(j,"title","Close search box (Esc)"),I(o,"class","jse-search-section svelte-3lbrbf"),I(r,"class","jse-search-contents svelte-3lbrbf"),I(e,"class","jse-search-form svelte-3lbrbf"),I(n,"class","jse-search-box svelte-3lbrbf")},m:function(D,E){ve(D,n,E),ee(n,e),O&&O.m(e,null),ee(e,i),ee(e,r),ee(r,o),ee(o,s),G[a].m(s,null),ee(o,c),ee(o,u),ee(u,d),nf(d,t[8]),ee(o,h),ee(o,f),ee(f,p),ee(f,g),ee(o,m),ee(o,v),Le(y,v,null),ee(o,b),ee(o,C),Le(k,C,null),ee(o,T),ee(o,j),Le(B,j,null),ee(r,N),Z&&Z.m(r,null),$=!0,V||(z=[Ze(d,"input",t[21]),ws(Iit.call(null,d)),Ze(v,"click",t[22]),Ze(C,"click",t[23]),Ze(j,"click",t[24]),Ze(e,"submit",t[12]),Ze(e,"keydown",t[13])],V=!0)},p:function(D,E){D[4]?O&&(it(),Q(O,1,1,function(){O=null}),rt()):O?(O.p(D,E),16&E&&W(O,1)):((O=yde(D)).c(),W(O,1),O.m(e,i));var M=a;(a=F(D))===M?G[a].p(D,E):(it(),Q(G[M],1,1,function(){G[M]=null}),rt(),(l=G[a])?l.p(D,E):(l=G[a]=H[a](D)).c(),W(l,1),l.m(s,null)),256&E&&d.value!==D[8]&&nf(d,D[8]),(!$||8&E)&&Y!==(Y=(-1!==D[3]?"".concat(D[3]+1,"/"):"")+"")&&Jt(p,Y),(!$||1024&E)&&Jt(g,D[10]),(!$||256&E)&&Xe(f,"jse-visible",""!==D[8]),D[0]&&!D[4]?Z?Z.p(D,E):((Z=_de(D)).c(),Z.m(r,null)):Z&&(Z.d(1),Z=null)},i:function(D){$||(W(O),W(l),W(y.$$.fragment,D),W(k.$$.fragment,D),W(B.$$.fragment,D),$=!0)},o:function(D){Q(O),Q(l),Q(y.$$.fragment,D),Q(k.$$.fragment,D),Q(B.$$.fragment,D),$=!1},d:function(D){D&&me(n),O&&O.d(),G[a].d(),Fe(y),Fe(k),Fe(B),Z&&Z.d(),V=!1,rr(z)}}}function yde(t){var n,e,i,r,o;return e=new li({props:{data:t[0]?lc:bf}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-replace-toggle svelte-3lbrbf"),I(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){ve(s,n,a),Le(e,n,null),i=!0,r||(o=Ze(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?lc:bf),e.$set(l)},i:function(s){i||(W(e.$$.fragment,s),i=!0)},o:function(s){Q(e.$$.fragment,s),i=!1},d:function(s){s&&me(n),Fe(e),r=!1,o()}}}function Eit(t){var n,e;return n=new li({props:{data:zP}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Mit(t){var n,e;return n=new li({props:{data:CZe,spin:!0}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function _de(t){var n,e,i,r,o,s,a,l;return{c:function(){n=oe("div"),e=oe("input"),i=Me(),(r=oe("button")).textContent="Replace",o=Me(),(s=oe("button")).textContent="All",I(e,"class","jse-replace-input svelte-3lbrbf"),I(e,"title","Enter replacement text"),I(e,"type","text"),I(e,"placeholder","Replace"),I(r,"type","button"),I(r,"title","Replace current occurrence (Ctrl+Enter)"),I(r,"class","svelte-3lbrbf"),I(s,"type","button"),I(s,"title","Replace all occurrences"),I(s,"class","svelte-3lbrbf"),I(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){ve(c,n,u),ee(n,e),nf(e,t[9]),ee(n,i),ee(n,r),ee(n,o),ee(n,s),a||(l=[Ze(e,"input",t[25]),Ze(r,"click",t[14]),Ze(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&nf(e,c[9])},d:function(c){c&&me(n),a=!1,rr(l)}}}function Oit(t){var n,e,i=t[1]&&vde(t);return{c:function(){i&&i.c(),n=Ci()},m:function(r,o){i&&i.m(r,o),ve(r,n,o),e=!0},p:function(r,o){var s=Wt(o,1)[0];r[1]?i?(i.p(r,s),2&s&&W(i,1)):((i=vde(r)).c(),W(i,1),i.m(n.parentNode,n)):i&&(it(),Q(i,1,1,function(){i=null}),rt())},i:function(r){e||(W(i),e=!0)},o:function(r){Q(i),e=!1},d:function(r){i&&i.d(r),r&&me(n)}}}function Iit(t){t.select()}function Nit(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,g=void 0!==p&&p,m=n.onChange,v=void 0===m?ur:m,y=n.onPrevious,b=void 0===y?ur:y,C=n.onNext,k=void 0===C?ur:C,T=n.onReplace,j=void 0===T?ur:T,B=n.onReplaceAll,N=void 0===B?ur:B,$=n.onClose,V=void 0===$?ur:$,z="",Y="",O="";function H(){e(0,f=!f&&!g)}function G(){g||j(z,O)}return t.$$set=function(F){"show"in F&&e(1,s=F.show),"searching"in F&&e(2,a=F.searching),"resultCount"in F&&e(16,c=F.resultCount),"activeIndex"in F&&e(3,d=F.activeIndex),"showReplace"in F&&e(0,f=F.showReplace),"readOnly"in F&&e(4,g=F.readOnly),"onChange"in F&&e(17,v=F.onChange),"onPrevious"in F&&e(5,b=F.onPrevious),"onNext"in F&&e(6,k=F.onNext),"onReplace"in F&&e(18,j=F.onReplace),"onReplaceAll"in F&&e(19,N=F.onReplaceAll),"onClose"in F&&e(7,V=F.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=Ov(v,300)),1048832&t.$$.dirty&&r(z),2&t.$$.dirty&&s&&""!==z&&v(z)},[f,s,a,d,g,b,k,V,z,O,i,H,function(F){F.preventDefault(),z!==Y?(Y=z,r.cancel(),v(z)):k()},function(F){F.stopPropagation();var Z=vf(F);"Enter"===Z&&(F.preventDefault(),k()),"Shift+Enter"===Z&&(F.preventDefault(),b()),"Ctrl+Enter"===Z&&(F.preventDefault(),f?G():k()),"Ctrl+H"===Z&&(F.preventDefault(),H()),"Escape"===Z&&(F.preventDefault(),V())},G,function(){g||N(z,O)},c,v,j,N,r,function(){e(8,z=this.value)},function(){return k()},function(){return b()},function(){return V()},function(){e(9,O=this.value)}]}var jit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Nit,Oit,In,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},Ait),r}return de(e)}(),bde=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function Pit(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',I(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function Xit(t){var n,e,i,r,o,s,a,l,c,u=[Zit,Qit],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=oe("label"),e=oe("input"),i=Me(),o.c(),s=Ci(),I(e,"type","text"),e.readOnly="readonly",I(e,"tabindex","-1"),I(e,"class","jse-hidden-input svelte-qojdc1"),I(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){ve(f,n,p),ee(n,e),t[76](e),ve(f,i,p),d[r].m(f,p),ve(f,s,p),a=!0,l||(c=Ze(e,"paste",t[34]),l=!0)},p:function(f,p){var g=r;(r=h(f))===g?d[r].p(f,p):(it(),Q(d[g],1,1,function(){d[g]=null}),rt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),W(o,1),o.m(s.parentNode,s))},i:function(f){a||(W(o),a=!0)},o:function(f){Q(o),a=!1},d:function(f){f&&me(n),t[76](null),f&&me(i),d[r].d(f),f&&me(s),l=!1,c()}}}function Qit(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new jit({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new Knt({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:ur}});var g=t[18]&&Ode(t),m=t[23]&&Ide(t);return f=new tR({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=oe("div"),$e(s.$$.fragment),a=Me(),l=oe("div"),$e(c.$$.fragment),u=Me(),g&&g.c(),d=Me(),m&&m.c(),h=Me(),$e(f.$$.fragment),I(o,"class","jse-search-box-container svelte-qojdc1"),I(l,"class","jse-contents svelte-qojdc1"),I(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){ve(v,o,y),Le(s,o,null),ve(v,a,y),ve(v,l,y),Le(c,l,null),t[77](l),ve(v,u,y),g&&g.m(v,y),ve(v,d,y),m&&m.m(v,y),ve(v,h,y),Le(f,v,y),p=!0},p:function(v,y){var b,C,k,T,j={};524288&y[0]&&(j.show=v[19]),131072&y[0]&&(j.resultCount=(null===(b=v[17])||void 0===b||null===(C=b.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&(j.activeIndex=(null===(k=v[17])||void 0===k?void 0:k.activeIndex)||0),1048576&y[0]&&(j.showReplace=v[20]),2097152&y[0]&&(j.searching=v[21]),1&y[0]&&(j.readOnly=v[0]),s.$set(j);var B={};1024&y[0]&&(B.value=v[10]),65536&y[0]&&(B.expandedMap=v[16].expandedMap),65536&y[0]&&(B.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(B.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(B.validationErrorsMap=v[24]),131072&y[0]&&(B.searchResultItemsMap=null===(T=v[17])||void 0===T?void 0:T.itemsMap),65536&y[0]&&(B.selection=v[16].selection),8192&y[0]&&(B.context=v[13]),c.$set(B),v[18]?g?(g.p(v,y),262144&y[0]&&W(g,1)):((g=Ode(v)).c(),W(g,1),g.m(d.parentNode,d)):g&&(it(),Q(g,1,1,function(){g=null}),rt()),v[23]?m?(m.p(v,y),8388608&y[0]&&W(m,1)):((m=Ide(v)).c(),W(m,1),m.m(h.parentNode,h)):m&&(it(),Q(m,1,1,function(){m=null}),rt());var N={};4096&y[0]&&(N.validationErrors=v[12]),f.$set(N)},i:function(v){p||(W(s.$$.fragment,v),W(c.$$.fragment,v),W(g),W(m),W(f.$$.fragment,v),p=!0)},o:function(v){Q(s.$$.fragment,v),Q(c.$$.fragment,v),Q(g),Q(m),Q(f.$$.fragment,v),p=!1},d:function(v){v&&me(o),Fe(s),v&&me(a),v&&me(l),Fe(c),t[77](null),v&&me(u),g&&g.d(v),v&&me(d),m&&m.d(v),v&&me(h),Fe(f,v)}}}function Zit(t){var n,e,i,r,o=[trt,ert],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=Ci()},m:function(l,c){s[n].m(l,c),ve(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):(it(),Q(s[u],1,1,function(){s[u]=null}),rt(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),W(e,1),e.m(i.parentNode,i))},i:function(l){r||(W(e),r=!0)},o:function(l){Q(e),r=!1},d:function(l){s[n].d(l),l&&me(i)}}}function Ode(t){var n,e;return n=new tu({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:ek,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Ide(t){var n,e;return n=new tu({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:H_,text:"Ok",onClick:t[8]},{icon:wf,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:H_,text:"Ok",onClick:i[8]},{icon:wf,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function ert(t){var n,e,i,r;return n=new tu({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:wf,text:"Repair manually",onClick:t[47]}]}}),i=new Ade({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){$e(n.$$.fragment),e=Me(),$e(i.$$.fragment)},m:function(o,s){Le(n,o,s),ve(o,e,s),Le(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:wf,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(W(n.$$.fragment,o),W(i.$$.fragment,o),r=!0)},o:function(o){Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!1},d:function(o){Fe(n,o),o&&me(e),Fe(i,o)}}}function trt(t){var n,e;return n=new sit({props:{readOnly:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function nrt(t){var n,e,i,r,o,s,a,l,c=t[1]&&Ede(t),u=t[2]&&Mde(t),h=[];return o=h[r=t[25]?1:0]=[Xit,Kit][r](t),{c:function(){n=oe("div"),c&&c.c(),e=Me(),u&&u.c(),i=Me(),o.c(),I(n,"class","jse-tree-mode svelte-qojdc1"),Xe(n,"no-main-menu",!t[1])},m:function(f,p){ve(f,n,p),c&&c.m(n,null),ee(n,e),u&&u.m(n,null),ee(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[Ze(Yit,"mousedown",t[49]),Ze(n,"keydown",t[41]),Ze(n,"mousedown",t[42]),Ze(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&W(c,1)):((c=Ede(f)).c(),W(c,1),c.m(n,e)):c&&(it(),Q(c,1,1,function(){c=null}),rt()),f[2]?u?(u.p(f,p),4&p[0]&&W(u,1)):((u=Mde(f)).c(),W(u,1),u.m(n,i)):u&&(it(),Q(u,1,1,function(){u=null}),rt()),o.p(f,p),(!s||2&p[0])&&Xe(n,"no-main-menu",!f[1])},i:function(f){s||(W(c),W(u),W(o),s=!0)},o:function(f){Q(c),Q(u),Q(o),s=!1},d:function(f){f&&me(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,rr(l)}}}function irt(t,n,e){var i,r=Cs("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=xs("simple-modal").open,h=mf(),f=mf(),p=xs("absolute-popup"),g=p.openAbsolutePopup,m=p.closeAbsolutePopup,v=!1,y=$ce(),b=n.readOnly,C=n.externalContent,k=n.mainMenuBar,T=n.navigationBar,j=n.escapeControlCharacters,B=n.escapeUnicodeCharacters,N=n.parser,$=n.parseMemoizeOne,V=n.validator,z=n.validationParser,Y=n.pathParser,O=n.indentation,H=n.onError,G=n.onChange,F=n.onChangeMode,Z=n.onRenderValue,D=n.onRenderMenu,E=n.onClassName,M=n.onFocus,U=n.onBlur,L=n.onSortModal,X=n.onTransformModal,ne=n.onJSONEditorModal,ge=!1;eR({onMount:Kl,onDestroy:Vc,getWindow:function(){return $v(l)},hasFocus:function(){return ge&&document.hasFocus()||WS(l)},onFocus:function(){v=!0,M&&M()},onBlur:function(){v=!1,U&&U()}});var ae=void 0;function De(ce){r("updateSelection",ce);var je="function"==typeof ce?ce(K.selection):ce;ai(je,K.selection)||e(16,K=Ee(Ee({},K),{},{selection:je}))}var be,Ie,R,J=!1,K=YS(),pe=!1,Te=!1,ye=!1,Ue="";function Je(ce){return _t.apply(this,arguments)}function _t(){return(_t=ni(bt().mark(function ce(je){return bt().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return r("search text updated",je),e(74,Ue=je),Qe.next=4,Ya();case 4:return Qe.next=6,pi();case 6:case"end":return Qe.stop()}},ce)}))).apply(this,arguments)}function zt(){return(zt=ni(bt().mark(function ce(){return bt().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return e(17,be=be?QQe(be):void 0),je.next=3,pi();case 3:case"end":return je.stop()}},ce)}))).apply(this,arguments)}function ct(){return(ct=ni(bt().mark(function ce(){return bt().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return e(17,be=be?ZQe(be):void 0),je.next=3,pi();case 3:case"end":return je.stop()}},ce)}))).apply(this,arguments)}function Nn(){return(Nn=ni(bt().mark(function ce(je,Qe){var at,dt,ft,ln;return bt().wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:if(dt=null===(at=be)||void 0===at?void 0:at.activeItem,r("handleReplace",{replacementText:Qe,activeItem:dt}),dt){fn.next=4;break}return fn.abrupt("return");case 4:return ft=eZe(c,K,Qe,dt,N),ln=ft.newSelection,Xt(ft.operations,function(jr,Io){return{state:Ee(Ee({},Io),{},{selection:ln})}}),fn.next=8,Ya();case 8:return fn.next=10,pi();case 10:case"end":return fn.stop()}},ce)}))).apply(this,arguments)}function mt(){return(mt=ni(bt().mark(function ce(je,Qe){var at,ft;return bt().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return r("handleReplaceAll",{text:je,replacementText:Qe}),at=tZe(c,K,je,Qe,N),ft=at.newSelection,Xt(at.operations,function(ln,fn){return{state:Ee(Ee({},fn),{},{selection:ft})}}),Ht.next=5,Ya();case 5:return Ht.next=7,pi();case 7:case"end":return Ht.stop()}},ce)}))).apply(this,arguments)}function pi(){return ki.apply(this,arguments)}function ki(){return(ki=ni(bt().mark(function ce(){var je,Qe,at;return bt().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(Qe=null===(je=be)||void 0===je?void 0:je.activeItem,r("focusActiveSearchResult",be),!Qe){dt.next=9;break}return e(16,K=Ee(Ee({},EP(c,K,at=Qe.path)),{},{selection:void 0})),dt.next=7,Ya();case 7:return dt.next=9,vt(at);case 9:case"end":return dt.stop()}},ce)}))).apply(this,arguments)}var bn,Hi,ci=Bce({onChange:function(ce){e(22,yi=ce)}}),yi=ci.getState(),Ir=cP(function(ce,je){if(""===ce)return r("clearing search result"),void(void 0!==be&&e(17,be=void 0));e(21,ye=!0),setTimeout(function(){r("searching...",ce);var dt,ft,Ht,ln,fn,jr,Io,Qe=jle(ce,je,1e3);e(17,(dt=Qe,Ht=null!=(ft=be)&&ft.activeItem?Lle(ft.activeItem):void 0,ln=dt.findIndex(function(Yr){return ai(Ht,Lle(Yr))}),fn=-1!==ln?ln:void 0!==ft?.activeIndex&&ft?.activeIndex0?0:-1,Io=(jr=dt.map(function(Yr,yr){return Ee(Ee({},Yr),{},{active:yr===fn})}))[fn],be={items:jr,itemsMap:Nv(jr,function(Yr){return gt(Yr.path)}),activeItem:Io,activeIndex:fn})),e(21,ye=!1)})},300),Nt=!1,Ge=[],cn=J_(Vce);function Pn(ce,je,Qe,at){e0(function(){var dt;try{dt=cn(ce,je,Qe,at)}catch(ft){dt=[{path:[],message:"Failed to validate: "+ft.message,severity:qu.warning}]}ai(dt,Ge)||(r("validationErrors changed:",dt),e(12,Ge=dt))},function(dt){return r("validationErrors updated in ".concat(dt," ms"))})}function Ti(){return r("validate"),ae?{parseError:ae,isRepairable:!1}:(Pn(c,V,N,z),Yn(Ge)?null:{validationErrors:Ge})}function vr(){return c}function qr(){return K}function jt(ce){J||(J=!0,e(16,K=sc(ce,K,[],Rae({json:ce},10240)?od:F_)))}function an(ce){void 0!==K.selection&&(K.selection&&Ql(ce,K.selection.anchorPath)&&Ql(ce,K.selection.focusPath)||(r("clearing selection: path does not exist anymore",K.selection),e(16,K=Ee(Ee({},K),{},{selection:zv(ce,K)}))))}function wn(ce){var je=ce.previousJson,Qe=ce.previousState,at=ce.previousText,dt=ce.previousTextIsRepaired;void 0===je&&void 0===at||(void 0!==c?ci.add(void 0!==je?{undo:{patch:[{op:"replace",path:"",value:je}],state:sa(Qe),json:void 0,text:at,textIsRepaired:dt},redo:{patch:[{op:"replace",path:"",value:c}],state:sa(K),json:void 0,text:u,textIsRepaired:Nt}}:{undo:{patch:void 0,json:void 0,text:at,state:sa(Qe),textIsRepaired:dt},redo:{patch:void 0,json:c,state:sa(K),text:u,textIsRepaired:Nt}}):void 0!==je&&ci.add({undo:{patch:void 0,json:je,state:sa(Qe),text:at,textIsRepaired:dt},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:Nt,state:sa(K)}}))}function Mi(ce,je){if(r("patch",ce,je),void 0===c)throw new Error("Cannot apply patch: no JSON");var Qe={json:c,text:u},at=c,dt=K,ft=u,Ht=Nt,ln=Ile(c,ce),fn=hle(c,K,ce),jr=Gv(c,ce),Io=function(wd,yu){return void 0!==yu||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ee(Ee({},wd),{},{selection:yu}):wd}(fn.documentState,jr,!1);r("patch updatedSelection",jr);var Yr="function"==typeof je?je(fn.json,Io):void 0;e(10,c=Yr&&void 0!==Yr.json?Yr.json:fn.json);var yr=Yr&&void 0!==Yr.state?Yr.state:Io;e(16,K=yr),e(11,u=void 0),e(23,Nt=!1),e(18,R=void 0),an(c),ci.add({undo:{patch:ln,json:void 0,text:ft,state:sa(dt),textIsRepaired:Ht},redo:{patch:ce,json:void 0,state:sa(yr),text:u,textIsRepaired:Nt}});var Oa={json:c,previousJson:at,undo:ln,redo:ce};return tn(Qe,Oa),Oa}function Ui(){!b&&K.selection&&De(ac(K.selection.focusPath,!0))}function nr(){if(!b&&K.selection){var ce=K.selection.focusPath,je=Dt(c,ce);$r(je)?(r("openJSONEditorModal",{path:Qe=ce,value:at=je}),ge=!0,ne({content:{json:at},path:Qe,onPatch:Hi.onPatch,onClose:function(){ge=!1,Oo()}})):De(mi(ce,!0))}var Qe,at}function Go(){if(!b&&Zn(K.selection)){var ce=K.selection.focusPath,je=gt(ce),Qe=Dt(c,ce),at=!dh(Qe,K.enforceStringMap,je,N),dt=at?String(Qe):yv(String(Qe),N);r("handleToggleEnforceString",{enforceString:at,value:Qe,updatedValue:dt}),Xt([{op:"replace",path:je,value:dt}],function(ft,Ht){return{state:dle(Ht,je,at)}})}}function _i(){return Wo.apply(this,arguments)}function Wo(){return Wo=ni(bt().mark(function ce(){var je,Qe=arguments;return bt().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return je=!(Qe.length>0&&void 0!==Qe[0])||Qe[0],at.next=3,Cde({json:c,documentState:K,indentation:je?O:void 0,readOnly:b,parser:N,onPatch:Xt});case 3:case"end":return at.stop()}},ce)})),Wo.apply(this,arguments)}function Ys(){return Js.apply(this,arguments)}function Js(){return Js=ni(bt().mark(function ce(){var je,Qe=arguments;return bt().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(je=!(Qe.length>0&&void 0!==Qe[0])||Qe[0],void 0!==c){at.next=3;break}return at.abrupt("return");case 3:return at.next=5,Sde({json:c,documentState:K,indentation:je?O:void 0,parser:N});case 5:case"end":return at.stop()}},ce)})),Js.apply(this,arguments)}function Pl(){d(Xce,{},Ee(Ee({},Xp),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Oo()}})}function le(ce,je){d(lue,{text:ce,onParse:HS,onRepair:Nae,onApply:je},Ee(Ee({},Xp),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Oo()}})}function Ce(){Tde({json:c,text:u,documentState:K,keepSelection:!1,readOnly:b,onChange:G,onPatch:Xt})}function ke(){!b&&void 0!==c&&K.selection&&qv(K.selection)&&!Yn(K.selection.focusPath)&&(r("duplicate",{selection:K.selection}),Xt(Ele(c,kle(K.selection))))}function Pe(){b||!K.selection||!Pi(K.selection)&&!Zn(K.selection)||Yn(K.selection.focusPath)||(r("extract",{selection:K.selection}),Xt(function(je,Qe){if(Zn(Qe))return[{op:"move",from:gt(Qe.focusPath),path:""}];if(!Pi(Qe))throw new Error("Cannot create extract operations: parent must be an Object or Array");var at=Dt(je,Qn(Qe.focusPath));if(er(at))return[{op:"replace",path:"",value:Qe.paths.map(function(ft){var Ht=Ho(Rt(ft));return at[Ht]})}];if(Dr(at)){var dt={};return Qe.paths.forEach(function(ft){var Ht=String(Rt(ft));dt[Ht]=at[Ht]}),[{op:"replace",path:"",value:dt}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(Qe))}(c,K.selection),function(je,Qe){if($r(je))return{state:yf(je,Qe,[])}}))}function Se(ce){void 0!==c&&gk({insertType:ce,selectInside:!0,refJsonEditor:l,json:c,documentState:K,readOnly:b,parser:N,onPatch:Xt,onReplaceJson:wi})}function At(ce){vo(K.selection)&&De(mi(K.selection.focusPath,!1)),Se(ce)}function rn(ce){if(!b&&K.selection)if(hg(K.selection))try{var je=K.selection.anchorPath,Qe=Dt(c,je),at=function(ft,Ht,ln){if("array"===Ht){if(Array.isArray(ft))return ft;if(Ar(ft))return Mae(ft);if("string"==typeof ft)try{var fn=ln.parse(ft);if(Array.isArray(fn))return fn;if(Ar(fn))return Mae(fn)}catch{return[ft]}return[ft]}if("object"===Ht){if(Array.isArray(ft))return Eae(ft);if(Ar(ft))return ft;if("string"==typeof ft)try{var jr=ln.parse(ft);if(Ar(jr))return jr;if(Array.isArray(jr))return Eae(jr)}catch{return{value:ft}}return{value:ft}}if("value"===Ht)return $r(ft)?ln.stringify(ft):ft;throw new Error("Cannot convert ".concat(jN(ft,ln)," to ").concat(Ht))}(Qe,ce,N);if(at===Qe)return;var dt=[{op:"replace",path:gt(je),value:at}];r("handleConvert",{selection:K.selection,path:je,type:ce,operations:dt}),Xt(dt,function(ft,Ht){return{state:yf(ft,Ht,K.selection.focusPath)}})}catch(ft){H(ft)}else H(new Error("Cannot convert current selection to ".concat(ce)))}function hn(){var ce=ble(c,K,!1),je=Qn(K.selection.focusPath);!Yn(ce.focusPath)&&ai(je,Qn(ce.focusPath))?De(fh(ce.focusPath)):De(hh(je)),r("insert before",{selection:K.selection,selectionBefore:ce,parentPath:je}),Ya().then(Ma)}function dn(){var ce=Pi(K.selection)?Rt(K.selection.paths):K.selection.focusPath;r("insert after",ce),De(fh(ce)),Ya().then(Ma)}function Di(ce){return Yi.apply(this,arguments)}function Yi(){return(Yi=ni(bt().mark(function ce(je){return bt().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Dde({char:je,selectInside:!0,refJsonEditor:l,json:c,documentState:K,readOnly:b,parser:N,onPatch:Xt,onReplaceJson:wi,onSelect:De});case 2:case"end":return Qe.stop()}},ce)}))).apply(this,arguments)}function vn(){if(!b&&ci.getState().canUndo){var ce=ci.undo();if(ce){var je={json:c,text:u};e(10,c=ce.undo.patch?Yc(c,ce.undo.patch):ce.undo.json),e(16,K=ce.undo.state),e(11,u=ce.undo.text),e(23,Nt=ce.undo.textIsRepaired),r("undo",{item:ce,json:c,documentState:K}),tn(je,{json:c,previousJson:je.json,redo:ce.undo.patch,undo:ce.redo.patch}),Oo(),K.selection&&vt(K.selection.focusPath,!1)}}}function bi(){if(!b&&ci.getState().canRedo){var ce=ci.redo();if(ce){var je={json:c,text:u};e(10,c=ce.redo.patch?Yc(c,ce.redo.patch):ce.redo.json),e(16,K=ce.redo.state),e(11,u=ce.redo.text),e(23,Nt=ce.redo.textIsRepaired),r("redo",{item:ce,json:c,documentState:K}),tn(je,{json:c,previousJson:je.json,redo:ce.redo.patch,undo:ce.undo.patch}),Oo(),K.selection&&vt(K.selection.focusPath,!1)}}}function he(ce){var je;b||void 0===c||(ge=!0,L({id:h,json:c,rootPath:ce,onSort:(je=ni(bt().mark(function Qe(at){var dt;return bt().wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:r("onSort",ce,dt=at.operations),Xt(dt,function(Ht,ln){return{state:Ee(Ee({},yf(Ht,ln,ce)),{},{selection:mi(ce,!1)})}});case 3:case"end":return ft.stop()}},Qe)})),function(Qe){return je.apply(this,arguments)}),onClose:function(){ge=!1,Oo()}}))}function Ye(){K.selection&&he(Cle(c,K.selection))}function ot(ce){var Qe=ce.rootPath,at=ce.onTransform,dt=ce.onClose;void 0!==c&&Qe&&(ge=!0,X({id:ce.id||f,json:c,rootPath:Qe,onTransform:at?function(ft){at({operations:ft,json:c,transformedJson:Yc(c,ft)})}:function(ft){r("onTransform",Qe,ft),Xt(ft,function(Ht,ln){return{state:Ee(Ee({},yf(Ht,ln,Qe)),{},{selection:mi(Qe,!1)})}})},onClose:function(){ge=!1,Oo(),dt&&dt()}}))}function ht(){K.selection&&ot({rootPath:Cle(c,K.selection)})}function vt(ce){return on.apply(this,arguments)}function on(){return on=ni(bt().mark(function ce(je){var Qe,at,dt,ft,ln=arguments;return bt().wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return Qe=!(ln.length>1&&void 0!==ln[1])||ln[1],e(16,K=EP(c,K,Qn(je))),fn.next=4,Ya();case 4:if(!(at=Rn(je))){fn.next=14;break}if(r("scrollTo",{path:je,elem:at,refContents:s}),dt=s.getBoundingClientRect(),ft=at.getBoundingClientRect(),Qe){fn.next=12;break}if(!(ft.bottom>dt.top&&ft.topQe.bottom-20&&y(je,{container:s,offset:-(Qe.height-dt-20),duration:0})}}function tn(ce,je){(void 0!==ce.json||void 0!==ce?.text)&&(void 0!==u?G({text:u,json:void 0},ce,{contentErrors:Ti(),patchResult:je}):void 0!==c&&G({text:void 0,json:c},ce,{contentErrors:Ti(),patchResult:je}))}function Xt(ce,je){if(!b)return r("handlePatch",ce,je),Mi(ce,je)}function wi(ce,je){var Qe=K,at=c,dt=u,ft={json:c,text:u},Ht=Nt,ln=sc(c,K,[],od),fn="function"==typeof je?je(ce,ln):void 0;e(10,c=fn&&void 0!==fn.json?fn.json:ce),e(16,K=fn&&void 0!==fn.state?fn.state:ln),e(11,u=void 0),e(23,Nt=!1),an(c),wn({previousJson:at,previousState:Qe,previousText:dt,previousTextIsRepaired:Ht}),tn(ft,null)}function Oi(ce,je){r("handleChangeText");var Qe=K,at=c,dt=u,ft={json:c,text:u},Ht=Nt;try{e(10,c=$(ce)),e(16,K=sc(c,K,[],od)),e(11,u=void 0),e(23,Nt=!1)}catch{try{e(10,c=$(Yu(ce))),e(16,K=sc(c,K,[],od)),e(11,u=ce),e(23,Nt=!0)}catch{e(10,c=void 0),e(16,K=YS({json:c,expand:od})),e(11,u=ce),e(23,Nt=!1)}}if("function"==typeof je){var ln=je(c,K);e(10,c=ln&&ln.json?ln.json:c),e(16,K=ln&&ln.state?ln.state:K)}an(c),wn({previousJson:at,previousState:Qe,previousText:dt,previousTextIsRepaired:Ht}),tn(ft,null)}function Nr(ce,je){var Qe=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:ce,expanded:je,recursive:Qe}),e(16,K=je?Qe?sc(c,K,ce,F_):function UQe(t,n){return Ee(Ee({},t),{},{expandedMap:Ee(Ee({},t.expandedMap),{},qa({},gt(n),!0))})}(K,ce):ule(K,ce)),K.selection&&!je&&function GQe(t,n){return Wv(t.focusPath,n)&&(t.focusPath.length>n.length||zo(t))}(K.selection,ce)&&De(void 0),setTimeout(function(){WS(l)||Oo()})}function us(ce){r("openFind",{findAndReplace:ce}),e(19,pe=!1),e(20,Te=!1),Ya().then(function(){e(19,pe=!0),e(20,Te=ce)})}function pu(ce,je){r("handleExpandSection",ce,je);var dt,ft,Ht,Qe=gt(ce);e(16,(ft=Qe,Ht=je,K=Ee(Ee({},dt=K),{},{visibleSectionsMap:Ee(Ee({},dt.visibleSectionsMap),{},qa({},ft,cle(JS(dt,ft).concat(Ht))))})))}function mc(ce){r("pasted json as text",ce),e(18,R=ce)}function ds(ce){ge=!0;var jr=g(int,{json:c,documentState:K,parser:N,showTip:ce.showTip,onEditKey:Ui,onEditValue:nr,onToggleEnforceString:Go,onCut:_i,onCopy:Ys,onPaste:Pl,onRemove:Ce,onDuplicate:ke,onExtract:Pe,onInsertBefore:hn,onInsert:At,onConvert:rn,onInsertAfter:dn,onSort:Ye,onTransform:ht,onCloseContextMenu:function(){m(jr),Oo()}},{left:ce.left,top:ce.top,offsetTop:ce.offsetTop,offsetLeft:ce.offsetLeft,width:ce.width,height:ce.height,anchor:ce.anchor,closeOnOuterClick:!0,onClose:function(){ge=!1,Oo()}})}function Ma(ce){if(!b&&!_f(K.selection)){if(ce&&(ce.stopPropagation(),ce.preventDefault()),ce&&"contextmenu"===ce.type&&ce.target!==a)ds({left:ce.clientX,top:ce.clientY,width:260,height:336,showTip:!1});else{var je,Qe=null===(je=s)||void 0===je?void 0:je.querySelector(".jse-context-menu-pointer.jse-selected");if(Qe)ds({anchor:Qe,offsetTop:2,width:260,height:336,showTip:!1});else{var at,dt=null===(at=s)||void 0===at?void 0:at.getBoundingClientRect();dt&&ds({top:dt.top+2,left:dt.left+2,width:260,height:336,showTip:!1})}}return!1}}function gu(){return(gu=ni(bt().mark(function ce(){var je,Qe,at;return bt().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return r("apply pasted json",R),Qe=(je=R).path,at=je.contents,De(mi(Qe,!1)),dt.next=5,Ya();case 5:Xt([{op:"replace",path:gt(Qe),value:at}],function(ft,Ht){return{state:yf(ft,Ht,Qe)}});case 7:case"end":return dt.stop()}},ce)}))).apply(this,arguments)}function Oo(){r("focus"),a&&(a.focus(),a.select())}function mu(ce){return je=c,Qe=K,dt=Qn(at=ce),ft=[Rt(at)],(ln=(Ht=Dt(je,dt))?PP(Ht,Qe,ft):void 0)?mi(dt.concat(ln),!1):fh(at);var je,Qe,at,dt,ft,Ht,ln}function vu(ce){i&&i.onDrag(ce)}function lD(){i&&i.onDragEnd()}return t.$$set=function(ce){"readOnly"in ce&&e(0,b=ce.readOnly),"externalContent"in ce&&e(50,C=ce.externalContent),"mainMenuBar"in ce&&e(1,k=ce.mainMenuBar),"navigationBar"in ce&&e(2,T=ce.navigationBar),"escapeControlCharacters"in ce&&e(51,j=ce.escapeControlCharacters),"escapeUnicodeCharacters"in ce&&e(52,B=ce.escapeUnicodeCharacters),"parser"in ce&&e(3,N=ce.parser),"parseMemoizeOne"in ce&&e(53,$=ce.parseMemoizeOne),"validator"in ce&&e(54,V=ce.validator),"validationParser"in ce&&e(55,z=ce.validationParser),"pathParser"in ce&&e(4,Y=ce.pathParser),"indentation"in ce&&e(5,O=ce.indentation),"onError"in ce&&e(6,H=ce.onError),"onChange"in ce&&e(56,G=ce.onChange),"onChangeMode"in ce&&e(57,F=ce.onChangeMode),"onRenderValue"in ce&&e(58,Z=ce.onRenderValue),"onRenderMenu"in ce&&e(7,D=ce.onRenderMenu),"onClassName"in ce&&e(59,E=ce.onClassName),"onFocus"in ce&&e(60,M=ce.onFocus),"onBlur"in ce&&e(61,U=ce.onBlur),"onSortModal"in ce&&e(62,L=ce.onSortModal),"onTransformModal"in ce&&e(63,X=ce.onTransformModal),"onJSONEditorModal"in ce&&e(64,ne=ce.onJSONEditorModal)},t.$$.update=function(){var ce,je;3145728&t.$$.dirty[1]&&e(73,Ie=bP({escapeControlCharacters:j,escapeUnicodeCharacters:B})),524288&t.$$.dirty[1]&&function Be(ce){void 0!==ce.json&&function(je){if(void 0!==je){var Qe=!ai(c,je);if(r("update external json",{isChanged:Qe,currentlyText:void 0===c}),Qe){var at={json:c,text:u},dt=K,ft=c,Ht=u,ln=Nt;e(10,c=je),jt(c),e(11,u=void 0),e(23,Nt=!1),an(c),wn({previousJson:ft,previousState:dt,previousText:Ht,previousTextIsRepaired:ln}),tn(at,null)}}}(ce.json),void 0!==ce.text&&function(je){if(void 0!==je&&void 0===C.json){var Qe=je!==u;if(r("update external text",{isChanged:Qe}),Qe){var at={json:c,text:u},dt=c,ft=K,Ht=u,ln=Nt;try{e(10,c=$(je)),jt(c),e(11,u=je),e(23,Nt=!1),ae=void 0}catch(fn){try{e(10,c=$(Yu(je))),jt(c),e(11,u=je),e(23,Nt=!0),ae=void 0,an(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,Nt=!1),ae=US(u,fn.message||fn.toString())}}an(c),wn({previousJson:dt,previousState:ft,previousText:Ht,previousTextIsRepaired:ln}),tn(at,null)}}}(ce.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&Ir(Ue,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Pn(c,V,N,z),4096&t.$$.dirty[0]&&e(24,(je={},(ce=Ge).forEach(function(Qe){je[gt(Qe.path)]=Qe}),ce.forEach(function(Qe){for(var at=Qe.path;at.length>0;){var dt=gt(at=Qn(at));dt in je||(je[dt]={isChildError:!0,path:at,message:"Contains invalid data",severity:qu.warning})}}),bn=je)),512&t.$$.dirty[0]&&(i=s?function(ce){var je,Qe;function at(ln){return ln<20?200:ln<50?400:1200}function dt(){ce&&(ce.scrollTop+=.05*(je||0))}function ft(ln){Qe&&ln===je||(Ht(),ZP("startAutoScroll",ln),je=ln,Qe=setInterval(dt,50))}function Ht(){Qe&&(ZP("stopAutoScroll"),clearInterval(Qe),Qe=void 0,je=void 0)}return ZP("createAutoScrollHandler",ce),{onDrag:function(ln){if(ce){var fn=ln.clientY,jr=ce.getBoundingClientRect(),Io=jr.top,Yr=jr.bottom;fnYr?ft(at(fn-Yr)):Ht()}},onDragEnd:function(){Ht()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Hi={readOnly:b,parser:N,normalization:Ie,getJson:vr,getDocumentState:qr,findElement:Rn,findNextInside:mu,focus:Oo,onPatch:Xt,onInsert:Se,onExpand:Nr,onSelect:De,onFind:us,onExpandSection:pu,onPasteJson:mc,onRenderValue:Z,onContextMenu:ds,onClassName:E||function(){},onDrag:vu,onDragEnd:lD}),8192&t.$$.dirty[0]&&r("context changed",Hi)},[b,k,T,N,Y,O,H,D,function(){return Nt&&void 0!==c&&wi(c),{json:c,text:u}},s,c,u,Ge,Hi,a,l,K,be,R,pe,Te,ye,yi,Nt,bn,o,Je,function(){return zt.apply(this,arguments)},function(){return ct.apply(this,arguments)},function(ce,je){return Nn.apply(this,arguments)},function(ce,je){return mt.apply(this,arguments)},function(){e(19,pe=!1),e(20,Te=!1),Je(""),Oo()},function(ce){r("select validation error",ce),De(mi(ce.path,!1)),vt(ce.path)},Ys,function(ce){ce.preventDefault(),kde({clipboardText:ce.clipboardData.getData("text/plain"),json:c,documentState:K,readOnly:b,parser:N,onPatch:Xt,onChangeText:Oi,openRepairModal:le})},vn,bi,function(){he([])},function(){ot({rootPath:[]})},function(){Nr([],!0,!0)},function(){Nr([],!1,!0)},function(ce){var je=vf(ce),Qe=ce.shiftKey;if(r("keydown",{combo:je,key:ce.key}),"Ctrl+X"===je&&(ce.preventDefault(),_i(!0)),"Ctrl+Shift+X"===je&&(ce.preventDefault(),_i(!1)),"Ctrl+C"===je&&(ce.preventDefault(),Ys(!0)),"Ctrl+Shift+C"===je&&(ce.preventDefault(),Ys(!1)),"Ctrl+D"===je&&(ce.preventDefault(),ke()),"Delete"!==je&&"Backspace"!==je||(ce.preventDefault(),Ce()),"Insert"===je&&(ce.preventDefault(),Se("structure")),"Ctrl+A"===je&&(ce.preventDefault(),De(mi([],!1))),"Ctrl+Q"===je&&Ma(ce),"ArrowUp"===je||"Shift+ArrowUp"===je){ce.preventDefault();var at=K.selection?ble(c,K,Qe,!0)||K.selection:zv(c,K);De(at),Vt(at.focusPath)}if("ArrowDown"===je||"Shift+ArrowDown"===je){ce.preventDefault();var dt=K.selection?function(yr,Oa){var wd=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ii=Oa.selection;if(!Ii)return null;var tl=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Pi(Ii)?Ii.focusPath:Rt(Ii.paths),vc=PP(yr,Oa,tl),_u=vc,xd=vc;if(null===vc||null==_u||null==xd)return null;if(wd){var bu=PP(yr,$r(Dt(yr,tl))?ule(Oa,tl):Oa,tl);return null===bu?null:Qc(Ii)?Eo(yr,bu,bu):zo(Ii)?Eo(yr,_u,xd):Eo(yr,Ii.anchorPath,bu)}if(vo(Ii)){var $b=Dt(yr,Qn(vc));return Array.isArray($b)?mi(xd,!1):ac(xd,!1)}return Zn(Ii)?mi(xd,!1):zo(Ii)?Eo(yr,_u,xd):Eo(yr,vc,vc)}(c,K,Qe,!0)||K.selection:zv(c,K);De(dt),Vt(dt.focusPath)}if("ArrowLeft"===je||"Shift+ArrowLeft"===je){ce.preventDefault();var ft=K.selection?function(yr,Oa){var wd=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ii=Oa.selection;if(!Ii)return null;var tl=wle(yr,Oa,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),vc=tl.caret,_u=tl.previous;if(wd)return Pi(Ii)?null:Eo(yr,Ii.anchorPath,Ii.focusPath);if(vc&&_u)return RP(_u);var bu=Dt(yr,Qn(Ii.focusPath));return Zn(Ii)&&Array.isArray(bu)?Eo(yr,Ii.focusPath,Ii.focusPath):Pi(Ii)&&!Array.isArray(bu)?ac(Ii.focusPath,!1):null}(c,K,Qe,!b)||K.selection:zv(c,K);De(ft),Vt(ft.focusPath)}if("ArrowRight"===je||"Shift+ArrowRight"===je){ce.preventDefault();var Ht=K.selection&&void 0!==c?function(yr,Oa){var wd=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ii=Oa.selection;if(!Ii)return null;var tl=wle(yr,Oa,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),vc=tl.caret,_u=tl.next;return wd?Pi(Ii)?null:Eo(yr,Ii.anchorPath,Ii.focusPath):vc&&_u?RP(_u):Pi(Ii)?mi(Ii.focusPath,!1):null}(c,K,Qe,!b)||K.selection:zv(c,K);De(Ht),Vt(Ht.focusPath)}if("Enter"===je&&K.selection){if(!b&&Pi(K.selection)&&1===K.selection.paths.length){var ln=K.selection.focusPath,fn=Dt(c,Qn(ln));Array.isArray(fn)&&De(mi(ln,!1))}!b&&vo(K.selection)&&(ce.preventDefault(),De(Ee(Ee({},K.selection),{},{edit:!0}))),Zn(K.selection)&&(ce.preventDefault(),$r(Dt(c,K.selection.focusPath))?Nr(K.selection.focusPath,!0):b||De(Ee(Ee({},K.selection),{},{edit:!0})))}if(1===je.replace(/^Shift\+/,"").length&&K.selection)return ce.preventDefault(),void Di(ce.key);if("Enter"===je&&(Qc(K.selection)||zo(K.selection)))return ce.preventDefault(),void Di("");if("Ctrl+Enter"===je&&Zn(K.selection)){var jr=Dt(c,K.selection.focusPath);Q2(jr)&&window.open(String(jr),"_blank")}if("Escape"===je&&K.selection&&(ce.preventDefault(),De(void 0)),"Ctrl+F"===je&&(ce.preventDefault(),us(!1)),"Ctrl+H"===je&&(ce.preventDefault(),us(!0)),"Ctrl+Z"===je){ce.preventDefault();var Io=document.activeElement;Io&&Io.blur&&Io.focus?(Io.blur(),setTimeout(function(){vn(),setTimeout(function(){return Io.select()})})):vn()}if("Ctrl+Shift+Z"===je){ce.preventDefault();var Yr=document.activeElement;Yr&&Yr.blur&&Yr.focus?(Yr.blur(),setTimeout(function(){bi(),setTimeout(function(){return Yr.select()})})):bi()}},function(ce){r("handleMouseDown",ce),setTimeout(function(){setTimeout(function(){v||Gae(ce.target,"BUTTON")||(Oo(),K.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,K=Ee(Ee({},K),{},{selection:Eo(c||{},[],[])}))))})})},Ma,function(ce){b||ds({anchor:qae(ce.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gu.apply(this,arguments)},function(){r("clear pasted json"),e(18,R=void 0)},function(){F(Fr.text)},function(ce){De(ce),Oo(),vt(ce.focusPath)},function(ce){!I_(ce.target,function(Qe){return Qe===l})&&_f(K.selection)&&(r("click outside the editor, stop edit mode"),De(function(Qe){return vo(Qe)||Zn(Qe)?Ee(Ee({},Qe),{},{edit:!1}):Qe}),v&&a&&(a.focus(),a.blur()),Ya().then(function(){setTimeout(function(){a&&a.blur()})}))},C,j,B,$,V,z,G,F,Z,E,M,U,L,X,ne,function(){var ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F_;r("expand");var je=Ee(Ee({},K),{},{expandedMap:{},visibleSectionsMap:{}});e(16,K=sc(c,je,[],ce))},Ti,vr,Mi,ot,vt,Rn,Oo,Ie,Ue,function(ce){e(19,pe=ce)},function(ce){qn[ce?"unshift":"push"](function(){e(14,a=ce)})},function(ce){qn[ce?"unshift":"push"](function(){e(9,s=ce)})},function(ce){qn[ce?"unshift":"push"](function(){e(15,l=ce)})}]}var vR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,irt,nrt,In,{readOnly:0,externalContent:50,mainMenuBar:1,navigationBar:2,escapeControlCharacters:51,escapeUnicodeCharacters:52,parser:3,parseMemoizeOne:53,validator:54,validationParser:55,pathParser:4,indentation:5,onError:6,onChange:56,onChangeMode:57,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},Jit,[-1,-1,-1,-1,-1]),r}return de(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function rrt(t){gn(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function Nde(t){var n,e,i,r,o,s=[srt,ort],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=Ci()},m:function(c,u){a[e].m(c,u),ve(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(it(),Q(a[d],1,1,function(){a[d]=null}),rt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),W(i,1),i.m(r.parentNode,r))},i:function(c){o||(W(i),o=!0)},o:function(c){Q(i),o=!1},d:function(c){a[e].d(c),c&&me(r)}}}function ort(t){var n;return{c:function(){n=ut("(Only available for arrays, not for objects)")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function srt(t){var n,e;return n=new Oet({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function jde(t){var n,e;return n=new vR({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ur,onError:console.error,onChange:ur,onChangeMode:ur,onFocus:ur,onBlur:ur,onSortModal:ur,onTransformModal:ur,onJSONEditorModal:ur,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function art(t){var n,e;return{c:function(){n=oe("div"),e=ut(t[17]),I(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){ve(i,n,r),ee(n,e)},p:function(i,r){131072&r[0]&&Jt(e,i[17])},i:tt,o:tt,d:function(i){i&&me(n)}}}function lrt(t){var n,e;return n=new vR({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ur,onError:console.error,onChange:ur,onChangeMode:ur,onFocus:ur,onBlur:ur,onSortModal:ur,onTransformModal:ur,onJSONEditorModal:ur,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function crt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y,O,H,G,F,Z,D,E,M,U,L,X,ne,ge,ae,De,be,Ie,R,J=t[21](t[0]).description+"";n=new Vet({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new li({props:{data:t[15]?lc:bf}});var K=t[15]&&Nde(t);H=new li({props:{data:t[16]?lc:bf}});var pe=t[16]&&jde(t),Te=[lrt,art],ye=[];function Ue(Je,_t){return Je[17]?1:0}return U=Ue(t),L=ye[U]=Te[U](t),{c:function(){$e(n.$$.fragment),e=Me(),i=oe("div"),r=oe("div"),o=oe("div"),(s=oe("div")).innerHTML='
    Language
    ',a=Me(),l=oe("div"),c=Me(),(u=oe("div")).innerHTML='
    Path
    ',d=Me(),h=oe("input"),p=Me(),g=oe("div"),m=oe("div"),v=oe("button"),$e(y.$$.fragment),b=ut("\n Wizard"),C=Me(),K&&K.c(),k=Me(),(T=oe("div")).innerHTML='
    Query
    ',j=Me(),B=oe("textarea"),N=Me(),$=oe("div"),V=oe("div"),z=oe("div"),Y=oe("div"),O=oe("button"),$e(H.$$.fragment),G=ut("\n Original"),F=Me(),pe&&pe.c(),Z=Me(),D=oe("div"),(E=oe("div")).innerHTML='
    Preview
    ',M=Me(),L.c(),X=Me(),ne=oe("div"),ge=oe("button"),ae=ut("Transform"),I(s,"class","jse-label svelte-107mggt"),I(l,"class","jse-description svelte-107mggt"),I(u,"class","jse-label svelte-107mggt"),I(h,"class","jse-path svelte-107mggt"),I(h,"type","text"),h.readOnly=!0,I(h,"title","Selected path"),h.value=f=Yn(t[1])?"(whole document)":oc(Xa(t[1])),I(v,"type","button"),I(v,"class","svelte-107mggt"),I(m,"class","jse-label-inner svelte-107mggt"),I(g,"class","jse-label svelte-107mggt"),I(T,"class","jse-label svelte-107mggt"),I(B,"class","jse-query svelte-107mggt"),I(B,"spellcheck","false"),B.value=t[13],I(o,"class","jse-query-contents svelte-107mggt"),I(O,"type","button"),I(O,"class","svelte-107mggt"),I(Y,"class","jse-label-inner svelte-107mggt"),I(z,"class","jse-label svelte-107mggt"),I(V,"class","jse-original-data svelte-107mggt"),Xe(V,"jse-hide",!t[16]),I(E,"class","jse-label svelte-107mggt"),I(D,"class","jse-preview-data svelte-107mggt"),I($,"class","jse-data-contents svelte-107mggt"),Xe($,"jse-hide-original-data",!t[16]),I(r,"class","jse-main-contents svelte-107mggt"),I(ge,"type","button"),I(ge,"class","jse-primary svelte-107mggt"),ge.disabled=De=!!t[17],I(ne,"class","jse-actions svelte-107mggt"),I(i,"class","jse-modal-contents svelte-107mggt")},m:function(Je,_t){Le(n,Je,_t),ve(Je,e,_t),ve(Je,i,_t),ee(i,r),ee(r,o),ee(o,s),ee(o,a),ee(o,l),l.innerHTML=J,ee(o,c),ee(o,u),ee(o,d),ee(o,h),ee(o,p),ee(o,g),ee(g,m),ee(m,v),Le(y,v,null),ee(v,b),ee(o,C),K&&K.m(o,null),ee(o,k),ee(o,T),ee(o,j),ee(o,B),ee(r,N),ee(r,$),ee($,V),ee(V,z),ee(z,Y),ee(Y,O),Le(H,O,null),ee(O,G),ee(V,F),pe&&pe.m(V,null),ee($,Z),ee($,D),ee(D,E),ee(D,M),ye[U].m(D,null),ee(i,X),ee(i,ne),ee(ne,ge),ee(ge,ae),be=!0,Ie||(R=[Ze(v,"click",t[25]),Ze(B,"input",t[23]),Ze(O,"click",t[26]),Ze(ge,"click",t[24]),ws(drt.call(null,ge))],Ie=!0)},p:function(Je,_t){var zt={};512&_t[0]&&(zt.queryLanguages=Je[9]),1&_t[0]&&(zt.queryLanguageId=Je[0]),n.$set(zt),(!be||1&_t[0])&&J!==(J=Je[21](Je[0]).description+"")&&(l.innerHTML=J),(!be||2&_t[0]&&f!==(f=Yn(Je[1])?"(whole document)":oc(Xa(Je[1])))&&h.value!==f)&&(h.value=f);var ct={};32768&_t[0]&&(ct.data=Je[15]?lc:bf),y.$set(ct),Je[15]?K?(K.p(Je,_t),32768&_t[0]&&W(K,1)):((K=Nde(Je)).c(),W(K,1),K.m(o,k)):K&&(it(),Q(K,1,1,function(){K=null}),rt()),(!be||8192&_t[0])&&(B.value=Je[13]);var Nn={};65536&_t[0]&&(Nn.data=Je[16]?lc:bf),H.$set(Nn),Je[16]?pe?(pe.p(Je,_t),65536&_t[0]&&W(pe,1)):((pe=jde(Je)).c(),W(pe,1),pe.m(V,null)):pe&&(it(),Q(pe,1,1,function(){pe=null}),rt()),(!be||65536&_t[0])&&Xe(V,"jse-hide",!Je[16]);var mt=U;(U=Ue(Je))===mt?ye[U].p(Je,_t):(it(),Q(ye[mt],1,1,function(){ye[mt]=null}),rt(),(L=ye[U])?L.p(Je,_t):(L=ye[U]=Te[U](Je)).c(),W(L,1),L.m(D,null)),(!be||65536&_t[0])&&Xe($,"jse-hide-original-data",!Je[16]),(!be||131072&_t[0]&&De!==(De=!!Je[17]))&&(ge.disabled=De)},i:function(Je){be||(W(n.$$.fragment,Je),W(y.$$.fragment,Je),W(K),W(H.$$.fragment,Je),W(pe),W(L),be=!0)},o:function(Je){Q(n.$$.fragment,Je),Q(y.$$.fragment,Je),Q(K),Q(H.$$.fragment,Je),Q(pe),Q(L),be=!1},d:function(Je){Fe(n,Je),Je&&me(e),Je&&me(i),Fe(y),K&&K.d(),Fe(H),pe&&pe.d(),ye[U].d(),Ie=!1,rr(R)}}}function urt(t){var n,e,i,r,o;return e=new Zae({props:{$$slots:{default:[crt]},$$scope:{ctx:t}}}),{c:function(){n=oe("div"),$e(e.$$.fragment),I(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){ve(s,n,a),Le(e,n,null),i=!0,r||(o=ws(pk.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(W(e.$$.fragment,s),i=!0)},o:function(s){Q(e.$$.fragment,s),i=!1},d:function(s){s&&me(n),Fe(e),r=!1,o()}}}function drt(t){t.focus()}function hrt(t,n,e){var i,r,o=Cs("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+c_():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,g=n.parseMemoizeOne,m=n.validationParser,v=n.pathParser,y=n.queryLanguages,b=n.queryLanguageId,C=n.onChangeQueryLanguage,k=n.onRenderValue,T=n.onClassName,j=n.onTransform,B=xs("simple-modal").close,N="".concat(a,":").concat(gt(u)),$=Zc[N]||{},V=!1!==Zc.showWizard,z=!1!==Zc.showOriginal,Y=$.queryOptions||{},O=b===$.queryLanguageId&&$.query?$.query:Z(b).createQuery(l,$.queryOptions||{}),H=$.isManual||!1,G=void 0,F={text:""};function Z(E){return y.find(function(M){return M.id===E})||y[0]}var D=Ov(function(E,M){try{o("previewTransform",{query:M});var U=Z(b).executeQuery(E,M,p);e(18,F={json:U}),e(17,G=void 0)}catch(L){e(18,F={text:""}),e(17,G=L.toString())}},300);return t.$$set=function(E){"id"in E&&e(28,a=E.id),"json"in E&&e(29,l=E.json),"rootPath"in E&&e(1,u=E.rootPath),"indentation"in E&&e(2,d=E.indentation),"escapeControlCharacters"in E&&e(3,h=E.escapeControlCharacters),"escapeUnicodeCharacters"in E&&e(4,f=E.escapeUnicodeCharacters),"parser"in E&&e(5,p=E.parser),"parseMemoizeOne"in E&&e(6,g=E.parseMemoizeOne),"validationParser"in E&&e(7,m=E.validationParser),"pathParser"in E&&e(8,v=E.pathParser),"queryLanguages"in E&&e(9,y=E.queryLanguages),"queryLanguageId"in E&&e(0,b=E.queryLanguageId),"onChangeQueryLanguage"in E&&e(30,C=E.onChangeQueryLanguage),"onRenderValue"in E&&e(10,k=E.onRenderValue),"onClassName"in E&&e(11,T=E.onClassName),"onTransform"in E&&e(31,j=E.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Dt(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&D(i,O),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,Zc[N]={queryOptions:Y,query:O,queryLanguageId:b,isManual:H},Zc),o("store state in memory",N,Zc[N]))},[b,u,d,h,f,p,g,m,v,y,k,T,Y,O,i,V,z,G,F,r,B,Z,function(E){e(12,Y=E),e(13,O=Z(b).createQuery(l,E)),e(33,H=!1),o("updateQueryByWizard",{queryOptions:Y,query:O,isManual:H})},function(E){e(13,O=E.target.value),e(33,H=!0),o("handleChangeQuery",{query:O,isManual:H})},function(){try{o("handleTransform",{query:O});var E=Z(b).executeQuery(i,O,p);j([{op:"replace",path:gt(u),value:E}]),B()}catch(M){console.error(M),e(18,F={text:""}),e(17,G=M.toString())}},function(){e(15,V=!V),e(32,Zc.showWizard=V,Zc)},function(){e(16,z=!z),e(32,Zc.showOriginal=z,Zc)},function(E){o("handleChangeQueryLanguage",E),e(0,b=E),C(E);var M=Z(b);e(13,O=M.createQuery(l,Y)),e(33,H=!1)},a,l,C,j,Zc,H]}var frt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,hrt,urt,In,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},rrt,[-1,-1]),r}return de(e)}(),Tf={};function prt(t){gn(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function Pde(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new vg({props:c}),qn.push(function(){return Uc(o,"value",l)}),{c:function(){n=oe("tr"),(e=oe("th")).textContent="Property",i=Me(),r=oe("td"),$e(o.$$.fragment),I(e,"class","svelte-1y818v2"),I(r,"class","svelte-1y818v2")},m:function(u,d){ve(u,n,d),ee(n,e),ee(n,i),ee(n,r),Le(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],Hc(function(){return s=!1})),o.$set(h)},i:function(u){a||(W(o.$$.fragment,u),a=!0)},o:function(u){Q(o.$$.fragment,u),a=!1},d:function(u){u&&me(n),Fe(o)}}}function Rde(t){var n,e;return{c:function(){n=oe("div"),e=ut(t[5]),I(n,"class","jse-error svelte-1y818v2")},m:function(i,r){ve(i,n,r),ee(n,e)},p:function(i,r){32&r&&Jt(e,i[5])},d:function(i){i&&me(n)}}}function grt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y,O,H,G;e=new nR({props:{title:t[4]?"Sort array items":"Sort object keys"}});var F=t[4]&&(t[3].length>1||void 0===t[1])&&Pde(t);function Z(M){t[15](M)}var D={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(D.value=t[2]),k=new vg({props:D}),qn.push(function(){return Uc(k,"value",Z)});var E=t[5]&&Rde(t);return{c:function(){n=oe("div"),$e(e.$$.fragment),i=Me(),r=oe("div"),o=oe("table"),(s=oe("colgroup")).innerHTML=' \n ',a=Me(),l=oe("tbody"),c=oe("tr"),(u=oe("th")).textContent="Path",d=Me(),h=oe("td"),f=oe("input"),g=Me(),F&&F.c(),m=Me(),v=oe("tr"),(y=oe("th")).textContent="Direction",b=Me(),C=oe("td"),$e(k.$$.fragment),j=Me(),B=oe("div"),E&&E.c(),N=Me(),$=oe("div"),V=oe("button"),z=ut("Sort"),I(u,"class","svelte-1y818v2"),I(f,"class","jse-path svelte-1y818v2"),I(f,"type","text"),f.readOnly=!0,I(f,"title","Selected path"),f.value=p=Yn(t[0])?"(whole document)":oc(Xa(t[0])),I(h,"class","svelte-1y818v2"),I(y,"class","svelte-1y818v2"),I(C,"class","svelte-1y818v2"),I(o,"class","svelte-1y818v2"),I(B,"class","jse-space svelte-1y818v2"),I(V,"type","button"),I(V,"class","jse-primary svelte-1y818v2"),V.disabled=Y=!!t[4]&&!t[1],I($,"class","jse-actions svelte-1y818v2"),I(r,"class","jse-modal-contents svelte-1y818v2"),I(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(M,U){ve(M,n,U),Le(e,n,null),ee(n,i),ee(n,r),ee(r,o),ee(o,s),ee(o,a),ee(o,l),ee(l,c),ee(c,u),ee(c,d),ee(c,h),ee(h,f),ee(l,g),F&&F.m(l,null),ee(l,m),ee(l,v),ee(v,y),ee(v,b),ee(v,C),Le(k,C,null),ee(r,j),ee(r,B),E&&E.m(B,null),ee(r,N),ee(r,$),ee($,V),ee(V,z),O=!0,H||(G=[Ze(V,"click",t[8]),ws(mrt.call(null,V)),ws(pk.call(null,n,t[6]))],H=!0)},p:function(M,U){var L=Wt(U,1)[0],X={};16&L&&(X.title=M[4]?"Sort array items":"Sort object keys"),e.$set(X),(!O||1&L&&p!==(p=Yn(M[0])?"(whole document)":oc(Xa(M[0])))&&f.value!==p)&&(f.value=p),M[4]&&(M[3].length>1||void 0===M[1])?F?(F.p(M,L),26&L&&W(F,1)):((F=Pde(M)).c(),W(F,1),F.m(l,m)):F&&(it(),Q(F,1,1,function(){F=null}),rt());var ne={};!T&&4&L&&(T=!0,ne.value=M[2],Hc(function(){return T=!1})),k.$set(ne),M[5]?E?E.p(M,L):((E=Rde(M)).c(),E.m(B,null)):E&&(E.d(1),E=null),(!O||18&L&&Y!==(Y=!!M[4]&&!M[1]))&&(V.disabled=Y)},i:function(M){O||(W(e.$$.fragment,M),W(F),W(k.$$.fragment,M),O=!0)},o:function(M){Q(e.$$.fragment,M),Q(F),Q(k.$$.fragment,M),O=!1},d:function(M){M&&me(n),Fe(e),F&&F.d(),Fe(k),E&&E.d(),H=!1,rr(G)}}}function mrt(t){t.focus()}function vrt(t,n,e){var i,r,o,s=Cs("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=xs("simple-modal").close,h="".concat(a,":").concat(gt(c)),f=Dt(l,c),p={value:1,label:"ascending"},g=[p,{value:-1,label:"descending"}],m=Tf[h]&&Tf[h].selectedProperty||void 0,v=Tf[h]&&Tf[h].selectedDirection||p,y=void 0;return t.$$set=function(b){"id"in b&&e(9,a=b.id),"json"in b&&e(10,l=b.json),"rootPath"in b&&e(0,c=b.rootPath),"onSort"in b&&e(11,u=b.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?mP(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(N_):void 0),10&t.$$.dirty&&void 0===m&&o&&1===o.length&&e(1,m=o[0]),4102&t.$$.dirty&&(e(12,Tf[h]={selectedProperty:m,selectedDirection:v},Tf),s("store state in memory",h,Tf[h]))},e(4,i=Array.isArray(f)),[c,m,v,o,i,y,d,g,function(){try{var b,C;e(5,y=void 0);var k=null===(b=m)||void 0===b?void 0:b.value,T=null===(C=v)||void 0===C?void 0:C.value,j=ode(l,c,k,T);u({operations:j,rootPath:c,itemPath:k,direction:T}),d()}catch(B){e(5,y=B.toString())}},a,l,u,Tf,r,function(b){e(1,m=b),e(3,o),e(13,r),e(4,i)},function(b){e(2,v=b)}]}var yrt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,vrt,grt,In,{id:9,json:10,rootPath:0,onSort:11},prt),r}return de(e)}();function ud(){}function vk(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function _rt(t){var n,e;return n=new fk({props:{items:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&Wt(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function brt(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,g=n.canRedo,m=n.canFormat,v=n.canCompact,y=n.canSort,b=n.canTransform,C=n.onRenderMenu;return t.$$set=function(k){"readOnly"in k&&e(1,s=k.readOnly),"onFormat"in k&&e(2,a=k.onFormat),"onCompact"in k&&e(3,l=k.onCompact),"onSort"in k&&e(4,c=k.onSort),"onTransform"in k&&e(5,u=k.onTransform),"onToggleSearch"in k&&e(6,d=k.onToggleSearch),"onUndo"in k&&e(7,h=k.onUndo),"onRedo"in k&&e(8,f=k.onRedo),"canUndo"in k&&e(9,p=k.canUndo),"canRedo"in k&&e(10,g=k.canRedo),"canFormat"in k&&e(11,m=k.canFormat),"canCompact"in k&&e(12,v=k.canCompact),"canSort"in k&&e(13,y=k.canSort),"canTransform"in k&&e(14,b=k.canTransform),"onRenderMenu"in k&&e(15,C=k.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:lR,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!m},{type:"button",icon:Znt,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:nk,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:ZS,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!b},{type:"button",icon:zP,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:UP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:HP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!g},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,r]}var wrt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,brt,_rt,In,{readOnly:1,onFormat:2,onCompact:3,onSort:4,onTransform:5,onToggleSearch:6,onUndo:7,onRedo:8,canUndo:9,canRedo:10,canFormat:11,canCompact:12,canSort:13,canTransform:14,onRenderMenu:15}),r}return de(e)}(),or=function(){function t(){ue(this,t)}return de(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),yk.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),yk.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new X_(this),o=new X_(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new X_(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new Fde(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new $de(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new nu(n):yk.from(nu.split(n,[])):t.empty}}]),t}(),nu=function(t){We(e,or);var n=qe(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function xrt(t){var n,e=-1,i=_e(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return ue(this,e),(r=n.call(this)).text=i,r.length=o,r}return de(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new Crt(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(Lde(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=_k(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return gi(Xn(e.prototype),"replace",this).call(this,i,r,o);var s=_k(this.text,_k(o.text,Lde(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):yk.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=_e(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=_e(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),yk=function(t){We(e,or);var n=qe(e);function e(i,r){var o;ue(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=_e(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return de(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return gi(Xn(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return gi(Xn(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=_e(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=Wt(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(N,$){return N+$.length+1},-1),s=0,a=_e(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(N){a.e(N)}finally{a.f()}if(s<32){var c,u=[],d=_e(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(N){d.e(N)}finally{d.f()}return new nu(u,o)}var f=Math.max(32,s>>5),p=f<<1,g=f>>1,m=[],v=0,y=-1,b=[];function C(N){var $;if(N.lines>p&&N instanceof e){var V,z=_e(N.children);try{for(z.s();!(V=z.n()).done;)C(V.value)}catch(Y){z.e(Y)}finally{z.f()}}else N.lines>g&&(v>g||!v)?(k(),m.push(N)):N instanceof nu&&v&&($=b[b.length-1])instanceof nu&&N.lines+$.lines<=32?(v+=N.lines,y+=N.length+1,b[b.length-1]=new nu($.text.concat(N.text),$.length+1+N.length)):(v+N.lines>f&&k(),v+=N.lines,y+=N.length+1,b.push(N))}function k(){0!=v&&(m.push(1==b.length?b[0]:e.from(b,y)),y=-1,v=b.length=0)}var T,j=_e(i);try{for(j.s();!(T=j.n()).done;)C(T.value)}catch(N){j.e(N)}finally{j.f()}return k(),1==m.length?m[0]:new e(m,o)}}]),e}();function _k(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;ue(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof nu?n.text.length:n.children.length)<<1]}return de(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof nu?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof nu){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof nu?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),Fde=function(){function t(n,e,i){ue(this,t),this.value="",this.done=!1,this.cursor=new X_(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return de(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),$de=function(){function t(n){ue(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return de(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),t}();typeof Symbol<"u"&&(or.prototype[Symbol.iterator]=function(){return this.iter()},X_.prototype[Symbol.iterator]=Fde.prototype[Symbol.iterator]=$de.prototype[Symbol.iterator]=function(){return this});for(var Crt=function(){function t(n,e,i,r){ue(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return de(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),a0="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(function(t){return t?parseInt(t,36):1}),bk=1;bkt)return a0[n-1]<=t;return!1}function Bde(t){return t>=127462&&t<=127487}function Aa(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?krt:Vde)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function Vde(t,n,e){if(n==t.length)return n;n&&Hde(t.charCodeAt(n))&&Ude(t.charCodeAt(n-1))&&n--;var i=Vs(t,n);for(n+=El(i);n=0&&Bde(Vs(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function krt(t,n,e){for(;n>0;){var i=Vde(t,n-2,e);if(i=56320&&t<57344}function Ude(t){return t>=55296&&t<56320}function Vs(t,n){var e=t.charCodeAt(n);if(!Ude(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return Hde(i)?i-56320+(e-55296<<10)+65536:e}function yR(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function El(t){return t<65536?1:2}var _R=/\r\n?|\n/,Ea=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Ea||(Ea={})),l0=function(){function t(n){ue(this,t),this.sections=n}return de(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ea.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Ea.Simple&&c>=n&&(i==Ea.TrackDel&&rn||i==Ea.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),iu=function(t){We(e,l0);var n=qe(e);function e(i,r){var o;return ue(this,e),(o=n.call(this,i)).inserted=r,o}return de(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return bR(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return wR(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){bR(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return l0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new Q_(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&Df(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||g<0||v>r)throw new RangeError("Invalid change range ".concat(g," to ").concat(v," (in doc of length ").concat(r,")"));var b=y?"string"==typeof y?or.of(y.split(o||_R)):y:or.empty,C=b.length;if(g==v&&0==C)return;gl&&aa(s,g-l,-1),aa(s,v-g,C),Df(a,s,b),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function Df(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function wR(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new Q_(t),a=new Q_(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);aa(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?iu.createSet(r,o):l0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new Q_(t),s=new Q_(n),a=!1;;){if(o.done&&s.done)return r?iu.createSet(i,r):l0.create(i);if(0==o.ins)aa(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;aa(i,l,u,a),r&&u&&Df(r,i,s.text)}else-1==s.ins?(aa(i,o.off?0:o.len,l,a),r&&Df(r,i,o.textBit(l))):(aa(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&Df(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else aa(i,0,s.ins,a),r&&Df(r,i,s.text),s.next()}}var Q_=function(){function t(n){ue(this,t),this.set=n,this.i=0,this.next()}return de(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?or.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?or.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),wk=function(){function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.flags=i}return de(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return lt.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return lt.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return lt.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),lt=function(){function t(n,e){ue(this,t),this.ranges=n,this.mainIndex=e}return de(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return wk.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return wk.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function Gde(t,n){var e,i=_e(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var xR=0,Zt=function(){function t(n,e,i,r,o){ue(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=xR++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return de(t,[{key:"of",value:function(n){return new xk([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new xk(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new xk(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:CR),!!n.static,n.enables)}}]),t}();function CR(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var xk=function(){function t(n,e,i,r){ue(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=xR++}return de(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=_e(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(g){f.e(g)}finally{f.f()}return{create:function(g){return g.values[l]=o(g),1},update:function(g,m){if(u&&m.docChanged||d&&(m.docChanged||m.selection)||SR(g,h)){var v=o(g);if(c?!Wde(v,g.values[l],s):!s(v,g.values[l]))return g.values[l]=v,1}return 0},reconfigure:function(g,m){var v,y=m.config.address[a];if(null!=y){var b=Ck(m,y);if(r.dependencies.every(function(C){return C instanceof Zt?m.facet(C)===g.facet(C):!(C instanceof Hs)||m.field(C,!1)==g.field(C,!1)})||(c?Wde(v=o(g),b,s):s(v=o(g),b)))return g.values[l]=b,0}else v=o(g);return g.values[l]=v,1}}}}]),t}();function Wde(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,qde.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(xR++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function Z_(t){return function(n){return new Yde(n,t)}}var c0={highest:Z_(0),high:Z_(1),default:Z_(2),low:Z_(3),lowest:Z_(4)},Yde=de(function t(n,e){ue(this,t),this.inner=n,this.prec=e}),Af=function(){function t(){ue(this,t)}return de(t,[{key:"of",value:function(n){return new TR(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),TR=de(function t(n,e){ue(this,t),this.compartment=n,this.inner=e}),Jde=function(){function t(n,e,i,r,o,s){for(ue(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,k,T,j,B,o=[],s=Object.create(null),a=new Map,l=_e((C=n,k=e,T=a,j=[[],[],[],[],[]],B=new Map,function N($,V){var z=B.get($);if(null!=z){if(z<=V)return;var Y=j[z].indexOf($);Y>-1&&j[z].splice(Y,1),$ instanceof TR&&T.delete($.compartment)}if(B.set($,V),Array.isArray($)){var O,H=_e($);try{for(H.s();!(O=H.n()).done;)N(O.value,V)}catch(Z){H.e(Z)}finally{H.f()}}else if($ instanceof TR){if(T.has($.compartment))throw new RangeError("Duplicate use of compartment in extensions");var G=k.get($.compartment)||$.inner;T.set($.compartment,G),N(G,V)}else if($ instanceof Yde)N($.inner,$.prec);else if($ instanceof Hs)j[V].push($),$.provides&&N($.provides,V);else if($ instanceof xk)j[V].push($),$.facet.extensions&&N($.facet.extensions,2);else{var F=$.extension;if(!F)throw new Error("Unrecognized extension value in extension set (".concat($,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));N(F,V)}}(C,2),j.reduce(function($,V){return $.concat(V)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Hs?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=g[p];u[C.id]=h.length<<1,h.push(function(k){return C.slot(k)})},p=0,g=o;p>1;function E(M){for(var U=[],L=0;L>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function Ck(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Kde=Zt.define(),Xde=Zt.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Qde=Zt.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Zde=Zt.define(),ehe=Zt.define(),the=Zt.define(),nhe=Zt.define({combine:function(t){return!!t.length&&t[0]}}),Ef=function(){function t(n,e){ue(this,t),this.type=n,this.value=e}return de(t,null,[{key:"define",value:function(){return new Ert}}]),t}(),Ert=function(){function t(){ue(this,t)}return de(t,[{key:"of",value:function(n){return new Ef(this,n)}}]),t}(),Mrt=function(){function t(n){ue(this,t),this.map=n}return de(t,[{key:"of",value:function(n){return new fi(this,n)}}]),t}(),fi=function(){function t(n,e){ue(this,t),this.type=n,this.value=e}return de(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new Mrt((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=_e(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();fi.reconfigure=fi.define(),fi.appendConfig=fi.define();var Qa=function(){function t(n,e,i,r,o,s){ue(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&Gde(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return de(t,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(n){var e,i=_e(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function Ort(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=ihe(u,DR(l,h,a.changes.newLength),!0))}return u==a?a:Qa.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=_e(c.facet(Zde));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:Ort(u,h))}}catch(b){d.e(b)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=iu.empty(c.doc.length);else{var g=a.changes.filter(u);f=g.changes,p=g.filtered.mapDesc(g.changes).invertedDesc}a=Qa.create(c,f,a.selection&&a.selection.map(p),fi.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var m=c.facet(ehe),v=m.length-1;v>=0;v--){var y=m[v](a);a=y instanceof Qa?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Qa?y[0]:rhe(c,u0(y),!1)}return a}(s):s)}Qa.time=Ef.define(),Qa.userEvent=Ef.define(),Qa.addToHistory=Ef.define(),Qa.remote=Ef.define();var Irt=[];function u0(t){return null==t?Irt:Array.isArray(t)?t:[t]}var AR,io=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(io||(io={})),Nrt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{AR=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var Mr=function(){function t(n,e,i,r,o,s){ue(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return eb(this,i),Ck(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof iu?n:iu.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return or.of(n.split(this.facet(t.lineSeparator)||_R))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(eb(this,e),Ck(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Hs&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(nhe)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=_e(this.facet(Kde));try{for(s.s();!(i=s.n()).done;){var a,c=_e((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function jrt(t){return function(n){if(!/\S/.test(n))return io.Space;if(function(i){if(AR)return AR.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||Nrt.test(o)))return!0}return!1}(n))return io.Word;for(var e=0;e-1)return io.Word;return io.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Aa(i,a,!1);if(s(i.slice(c,a))!=io.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:lt.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Jde.resolve(n.extensions||[],new Map),i=n.doc instanceof or?n.doc:or.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||_R)),r=n.selection?n.selection instanceof lt?n.selection:lt.single(n.selection.anchor,n.selection.head):lt.single(0);return Gde(r,i.length),e.staticFacet(Xde)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function uc(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=_e(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();_g.prototype.startSide=_g.prototype.endSide=0,_g.prototype.point=!1,_g.prototype.mapMode=Ea.TrackDel;var ER=function(){function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.value=i}return de(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function MR(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var Prt=function(){function t(n,e,i,r){ue(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return de(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Hr=function(){function t(n,e,i,r){ue(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return de(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=_e(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(MR)),this.isEmpty)return i.length?t.of(i):this;for(var d=new she(this,null,-1).goto(0),h=0,f=[],p=new bg;d.value||h=0){var g=i[h++];p.addInner(g.from,g.to,g.value)||f.push(g)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return OR.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return OR.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=ohe(s,a,i),c=new tb(s,l,o),u=new tb(a,l,o);i.iterGaps(function(d,h,f){return ahe(c,d,u,h,f,r)}),i.empty&&0==i.length&&ahe(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=ohe(o,s),l=new tb(o,a,0).goto(i),c=new tb(s,a,0).goto(i);;){if(l.to!=c.to||!NR(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new tb(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new bg,o=_e(n instanceof ER?[n]:i?function Rrt(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(MR);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Hr.empty=new Hr([],[],null,-1),Hr.empty.nextLayer=Hr.empty;var bg=function(){function t(){ue(this,t),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return de(t,[{key:"finishChunk",value:function(n){this.chunks.push(new Prt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Hr.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Hr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function ohe(t,n,e){var i,r=new Map,o=_e(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;ue(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return de(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=_e(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)IR(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=_e(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)IR(this.heap,o);(this.to-n||this.value.endSide-e)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),IR(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new she(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function IR(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var tb=function(){function t(n,e,i){ue(this,t),this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=OR.from(n,e,i)}return de(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){Sk(this.active,n),Sk(this.activeTo,n),Sk(this.activeRank,n),this.minActive=lhe(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Sk(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function ahe(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&NR(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!NR(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function NR(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function lhe(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Aa(t,r)}return!0===i?-1:t.length}for(var che=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),PR=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),uhe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},Mf=function(){function t(n,e){ue(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var g=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(m){return a.map(function(v){return m.replace(/&/,v)})}).reduce(function(m,v){return m.concat(v)}),g,c);else if(g&&"object"==xt(g)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),g,d,f)}else null!=g&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(m){return"-"+m.toLowerCase()})+": "+g+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return de(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=uhe[che]||1;return uhe[che]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[PR]||new Lrt(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),Tk=null,Lrt=function(){function t(n){if(ue(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Tk)return n.adoptedStyleSheets=[Tk.sheet].concat(n.adoptedStyleSheets),n[PR]=Tk;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),Tk=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[PR]=this}return de(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},dhe=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),Frt=typeof navigator<"u"&&/Mac/.test(navigator.platform),$rt=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Brt=Frt||dhe&&+dhe[1]<57,Us=0;Us<10;Us++)Of[48+Us]=Of[96+Us]=String(Us);for(Us=1;Us<=24;Us++)Of[Us+111]="F"+Us;for(Us=65;Us<=90;Us++)Of[Us]=String.fromCharCode(Us+32),ib[Us]=String.fromCharCode(Us);for(var RR in Of)ib.hasOwnProperty(RR)||(ib[RR]=Of[RR]);function Dk(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function d0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function Ak(t,n){if(!n.anchorNode)return!1;try{return d0(t,n.anchorNode)}catch{return!1}}function rb(t){return 3==t.nodeType?f0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Ek(t,n,e,i){return!!e&&(hhe(t,n,e,i,-1)||hhe(t,n,e,i,1))}function Mk(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function hhe(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:ob(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=Mk(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?ob(t):0}}}function ob(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var fhe={left:0,right:0,top:0,bottom:0};function LR(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function Vrt(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var phe,Hrt=function(){function t(){ue(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return de(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),h0=null;function ghe(t){if(t.setActive)return t.setActive();if(h0)return t.focus(h0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==h0?{get preventScroll(){return h0={preventScroll:!0},!0}}:void 0),!h0){h0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=phe||(phe=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function p0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function mhe(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Ml=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ue(this,t),this.node=n,this.offset=e,this.precise=i}return de(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,Mk(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,Mk(n)+1,e)}}]),t}(),FR=[],yo=function(){function t(){ue(this,t),this.parent=null,this.dom=null,this.dirty=2}return de(t,[{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(n){var e,i=this.posAtStart,r=_e(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=_e(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=vhe(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=vhe(i)}else if(1&this.dirty){var u,d=_e(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==ob(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:FR;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function vhe(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}yo.prototype.breakAfter=0;var yhe=function(){function t(n,e,i){ue(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return de(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function _he(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),en={mac:khe||/Mac/.test(Ol.platform),windows:/Win/.test(Ol.platform),linux:/Linux|X11/.test(Ol.platform),ie:Ok,ie_version:whe?$R.documentMode||6:VR?+VR[1]:BR?+BR[1]:0,gecko:xhe,gecko_version:xhe?+(/Firefox\/(\d+)/.exec(Ol.userAgent)||[0,0])[1]:0,chrome:!!HR,chrome_version:HR?+HR[1]:0,ios:khe,android:/Android\b/.test(Ol.userAgent),webkit:Che,safari:She,webkit_version:Che?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=$R.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},sb=function(t){We(e,yo);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).text=i,r}return de(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Ml(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return UR(this.dom,i,r)}}]),e}(),wg=function(t){We(e,yo);var n=qe(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;ue(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=_e(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(Ot(r))}catch(u){l.e(u)}finally{l.f()}return r}return de(e,[{key:"setAttrs",value:function(i){if(mhe(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),gi(Xn(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return Ahe(this,i)}},{key:"coordsAt",value:function(i,r){return Mhe(this,i,r)}}]),e}();function UR(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?en.chrome||en.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return en.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?LR(l,s<0):l||null}var zR=function(t){We(e,yo);var n=qe(e);function e(i,r,o){var s;return ue(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return de(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:LR(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){gi(Xn(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),The=function(t){We(e,zR);var n=qe(e);function e(){return ue(this,e),n.apply(this,arguments)}return de(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?GR(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Ml(s,Math.min(a,s.nodeValue.length))}):new Ml(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?Dhe(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?GR(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return UR(a,l,c)}):UR(a,i,r)}},{key:"destroy",value:function(){var i;gi(Xn(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function GR(t,n,e,i,r,o){if(e instanceof wg){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=yo.get(s);if(!a)return o(t,n);var l=d0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return or.empty}}]),e}();function Ahe(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof wg&&r.length&&(i=r[r.length-1])instanceof wg&&i.mark.eq(n.mark)?Ehe(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function Mhe(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new Ohe(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new ab(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=Ihe(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new ab(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new KR(i)}},{key:"set",value:function(i){return Hr.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();_n.none=Hr.empty;var Ohe=function(t){We(e,_n);var n=qe(e);function e(i){var r;ue(this,e);var o=Ihe(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return de(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&YR(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return gi(Xn(e.prototype),"range",this).call(this,i,r)}}]),e}();Ohe.prototype.point=!1;var KR=function(t){We(e,_n);var n=qe(e);function e(i){return ue(this,e),n.call(this,-2e8,-2e8,null,i)}return de(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&YR(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return gi(Xn(e.prototype),"range",this).call(this,i,r)}}]),e}();KR.prototype.mapMode=Ea.TrackBefore,KR.prototype.point=!0;var ab=function(t){We(e,_n);var n=qe(e);function e(i,r,o,s,a,l){var c;return ue(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Ea.TrackBefore:Ea.TrackAfter:Ea.TrackDel,c}return de(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return gi(Xn(e.prototype),"range",this).call(this,i,r)}}]),e}();function Ihe(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function XR(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}ab.prototype.point=!0;var ru=function(t){We(e,yo);var n=qe(e);function e(){var i;return ue(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return de(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),bhe(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){YR(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){Ehe(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=qR(r,this.attrs||{})),o&&(this.attrs=qR({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return Ahe(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(mhe(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(JR(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),gi(Xn(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&yo.get(s)instanceof wg;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=yo.get(s))||void 0===o?void 0:o.isEditable)||en.ios&&this.children.some(function(l){return l instanceof sb})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=_e(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof sb)||/[^ -~]/.test(s.text))return null;var a=rb(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return Mhe(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return mr.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),QR=function(t){We(e,yo);var n=qe(e);function e(i,r,o){var s;return ue(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return de(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(Ik(new WR(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(Ik(new sb(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof ab){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof ab)if(i.block){var l=i.type;l!=mr.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new QR(i.widget||new Nhe("div"),a,l))}else{var c=zR.create(i.widget||new Nhe("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(Ik(new WR(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(Ik(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Hr.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function Ik(t,n){var e,i=_e(n);try{for(i.s();!(e=i.n()).done;)t=new wg(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var Nhe=function(t){We(e,If);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).tag=i,r}return de(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),jhe=Zt.define(),Phe=Zt.define(),Rhe=Zt.define(),Lhe=Zt.define(),ZR=Zt.define(),Fhe=Zt.define(),$he=Zt.define(),Bhe=Zt.define({combine:function(t){return t.some(function(n){return n})}}),Vhe=Zt.define({combine:function(t){return t.some(function(n){return n})}}),Hhe=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;ue(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return de(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),Uhe=fi.define({map:function(t,n){return t.map(n)}});function Il(t,n,e){var i=t.facet(Lhe);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var Nk=Zt.define({combine:function(t){return!t.length||t[0]}}),Grt=0,lb=Zt.define(),ks=function(){function t(n,e,i,r){ue(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return de(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(Grt++,n,i.eventHandlers,function(a){var l=[lb.of(a)];return s&&l.push(cb.of(function(c){var u=c.plugin(a);return u?s(u):_n.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),eL=function(){function t(n){ue(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return de(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Il(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Il(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Il(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),zhe=Zt.define(),tL=Zt.define(),cb=Zt.define(),Ghe=Zt.define(),Whe=Zt.define(),ub=Zt.define(),g0=function(){function t(n,e,i,r){ue(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return de(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),qhe=function(){function t(n,e,i){ue(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=iu.empty(this.startState.doc.length);var r,o=_e(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new g0(l,c,u,d))}),this.changedRanges=a}return de(t,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some(function(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),ro=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(ro||(ro={})),nL=ro.LTR,Wrt=ro.RTL;function Yhe(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),oo=[];function Zhe(t){return[new m0(0,t,0)]}var efe="";function Xrt(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=m0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Aa(t.text,s,u);if(efe=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return lt.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=_e(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=yo.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=_e(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=_e(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function nfe(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var ife=de(function t(n,e){ue(this,t),this.node=n,this.offset=e,this.pos=-1}),rfe=function(t){We(e,yo);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).view=i,r.compositionDeco=_n.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new ru],r.children[0].setParent(Ot(r)),r.updateDeco(),r.updateInner([new g0(0,0,0,i.state.doc.length)],0),r}return de(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=_n.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=sfe(a);if(!c)return _n.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),g=Math.max(p,l.mapPos(d,-1)),m=a.state,v=3==h.nodeType?h.nodeValue:new tfe([],m).readRange(h.firstChild,null).text;if(g-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=zrt.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,g=h.openStart,m=h.openEnd,v=o.findPos(c,1),y=v.i,b=v.off,C=o.findPos(l,-1);_he(this,C.i,C.off,y,b,f,p,g,m)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(en.gecko&&a.empty&&function Qrt(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Ml(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&Ek(l.node,l.offset,d.anchorNode,d.anchorOffset)&&Ek(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){en.android&&en.chrome&&i.dom.contains(d.focusNode)&&function not(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=Dk(i.view.root);if(h)if(a.empty){if(en.gecko){var f=function eot(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var m=[c,l];l=m[0],c=m[1]}g.setEnd(c.node,c.offset),g.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(g)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Ml(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Ml(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=Dk(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=ru.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||Ak(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=yo.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=mr.WidgetBefore&&a.type!=mr.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==mr.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==ro.LTR,d=0,h=0;hs)break;if(d>=o){var g=f.dom.getBoundingClientRect();if(r.push(g.height),l){var m=f.dom.lastChild,v=m?rb(m):[];if(v.length){var y=v[v.length-1],b=u?y.right-g.left:g.right-y.left;b>c&&(c=b,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?ro.RTL:ro.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=_e(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof ru){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=rb(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new yhe(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(_n.replace({widget:new ofe(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return _n.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(cb).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=_e(this.view.state.facet(Whe).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var g=p.left,m=p.right,v=p.top,y=p.bottom;null!=g&&(c=Math.max(c,g)),null!=m&&(u=Math.max(u,m)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,k,T,j,B,N,$,V){for(var z=C.ownerDocument,Y=z.defaultView||window,O=C;O;)if(1==O.nodeType){var H=void 0,G=O==z.body;if(G)H=Vrt(Y);else{if(O.scrollHeight<=O.clientHeight&&O.scrollWidth<=O.clientWidth){O=O.assignedSlot||O.parentNode;continue}var F=O.getBoundingClientRect();H={left:F.left,right:F.left+O.clientWidth,top:F.top,bottom:F.top+O.clientHeight}}var Z=0,D=0;if("nearest"==B)k.top0&&k.bottom>H.bottom+D&&(D=k.bottom-H.bottom+D+$)):k.bottom>H.bottom&&(D=k.bottom-H.bottom+$,T<0&&k.top-D0&&k.right>H.right+Z&&(Z=k.right-H.right+Z+N)):k.right>H.right&&(Z=k.right-H.right+N,T<0&&k.left0&&e<=0)n=ob(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var tot=function(){function t(){ue(this,t),this.changes=[]}return de(t,[{key:"compareRange",value:function(n,e){XR(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){XR(n,e,this.changes)}}]),t}();function iot(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function rot(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function oL(t,n){return t.topn.top+1}function lfe(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function sL(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=rb(h),p=0;pv||s==v&&o>m){i=h,r=g,o=m,s=v;var y=v?e0?p0)}0==m?e>g.bottom&&(!c||c.bottomg.top)&&(l=h,u=g):c&&oL(c,g)?c=cfe(c,g.bottom):u&&oL(u,g)&&(u=lfe(u,g.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var b=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?ufe(i,b,e):d&&"false"!=i.contentEditable?sL(i,b,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function ufe(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((en.chrome||en.gecko)&&f0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function dfe(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=mr.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:hfe(t,s,r,c,u);var g=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:g,v=m.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=m.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,b=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(g.caretPositionFromPoint){var C=g.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,b=C.offset)}else if(g.caretRangeFromPoint){var k=g.caretRangeFromPoint(c,u);k&&(b=k.startOffset,(!t.contentDOM.contains(y=k.startContainer)||en.safari&&function oot(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return f0(t,i-1,i).getBoundingClientRect().left>e}(y,b,c)||en.chrome&&function sot(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():f0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,b,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var T=ru.find(t.docView,p);if(!T)return d>r.top+r.height/2?r.to:r.from;var j=sL(T.dom,c,u);y=j.node,b=j.offset}var B=t.docView.nearest(y);if(!B)return null;if(B.isWidget){var N=B.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+jR(s,o,t.state.tabSize)}function ffe(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=Xrt(r,o,s,a,e),u=efe;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=lt.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function aL(t,n,e){for(var i=t.state.facet(Ghe).map(function(a){return a(t)});;){var r,o=!1,s=_e(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?lt.cursor(a,1):lt.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var lot=function(){function t(n){var e=this;ue(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=cs[s];n.contentDOM.addEventListener(s,function(l){mfe(n,l)&&i(a,l)},lL[s]),e.registeredEvents.push(s)};for(var o in cs)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(cs.mousedown,s)}),en.chrome&&102==en.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,en.safari&&n.contentDOM.addEventListener("input",function(){return null})}return de(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=_e(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){mfe(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=_e(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Il(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=_e(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Il(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,p0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(en.safari&&!en.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),pfe=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],cot="dthko",gfe=[16,17,18,20,91,92,224,225];function jk(t){return.7*t+8}var uot=function(){function t(n,e,i,r){ue(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Mr.allowMultipleSelections)&&(a=e,(l=n.state.facet(jhe)).length?l[0](a):en.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(Phe);return l.length?l[0](a):en.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=Dk(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=Tfe(e))&&null}return de(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-jk(o.left-n.clientX):n.clientX>=o.right&&(i=jk(n.clientX-o.right)),n.clientY<=o.top?r=-jk(o.top-n.clientY):n.clientY>=o.bottom&&(r=jk(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.scroll()},50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}},{key:"scroll",value:function(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}},{key:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function mfe(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=yo.get(i))&&e.ignoreEvent(n))return!1;return!0}var cs=Object.create(null),lL=Object.create(null),vfe=en.ie&&en.ie_version<15||en.ios&&en.webkit_version<604;function yfe(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=cL&&i.selection.ranges.every(function(c){return c.empty})&&cL==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:lt.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:lt.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function _fe(t,n,e,i){if(1==i)return lt.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return lt.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,g=f;u<0?p=Aa(h.text,f,!1):g=Aa(h.text,f);for(var m=d(h.text.slice(p,g));p>0;){var v=Aa(h.text,p,!1);if(d(h.text.slice(v,p))!=m)break;p=v}for(;gDate.now()-2e3)){var e,i=null,r=_e(t.state.facet(Rhe));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=xfe(s=t,a=n),c=Tfe(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=xfe(s,d),g=_fe(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var m=_fe(s,l.pos,l.bias,c),v=Math.min(m.from,g.from),y=Math.max(m.to,g.to);g=v1&&u.ranges.some(function(b){return b.eq(g)})?function(b,C){for(var k=0;;k++)if(b.ranges[k].eq(C))return lt.create(b.ranges.slice(0,k).concat(b.ranges.slice(k+1)),b.mainIndex==k?0:b.mainIndex-(b.mainIndex>k?1:0))}(u,g):f?u.addRange(g):lt.create([g])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new uot(t,n,i,o)),o&&t.observer.ignore(function(){return ghe(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var bfe=function(t,n){return t>=n.top&&t<=n.bottom},wfe=function(t,n,e){return bfe(n,e)&&t>=e.left&&t<=e.right};function dot(t,n,e,i){var r=ru.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&wfe(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&wfe(e,i,a)?1:s&&bfe(i,s)?-1:1}function xfe(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:dot(t,e,n.clientX,n.clientY)}}var hot=en.ie&&en.ie_version<=11,Cfe=null,Sfe=0,kfe=0;function Tfe(t){if(!hot)return t.detail;var n=Cfe,e=kfe;return Cfe=t,kfe=Date.now(),Sfe=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(Sfe+1)%3:1}function Dfe(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}cs.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},cs.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&Dfe(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;ag&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),g=y.number}}catch(b){m.e(b)}finally{m.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){cL=o?i:null;var s=vfe?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var Afe=Ef.define();function Efe(t,n){var e,i=[],r=_e(t.facet($he));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:Afe.of(!0)}):null}function Mfe(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=Efe(t.state,n);e?t.dispatch(e):t.update([])}},10)}cs.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Mfe(t)},cs.blur=function(t){t.observer.clearSelectionRange(),Mfe(t)},cs.compositionstart=cs.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},cs.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,en.chrome&&en.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},cs.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},cs.beforeinput=function(t,n){var e,i;if(en.chrome&&en.android&&(i=pfe.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var Ofe=["pre-wrap","normal","pre-line","break-spaces"],fot=function(){function t(n){ue(this,t),this.lineWrapping=n,this.doc=or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return de(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return Ofe.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;ue(this,t),this.length=n,this.height=e,this.flags=i}return de(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Ur.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Ur.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),hd=function(t){We(e,Ife);var n=qe(e);function e(i,r){var o;return ue(this,e),(o=n.call(this,i,r,mr.Text)).collapsed=0,o.widgetHeight=0,o}return de(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof v0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof v0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):ou.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),v0=function(t){We(e,ou);var n=qe(e);function e(i){return ue(this,e),n.call(this,i,0)}return de(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,g=Math.max(o,i-p/2);return new xg(f.from,f.length,g,p,mr.Text)}var m=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+m);return new xg(v.from,v.length,o+u*m,u,mr.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Ur.ByHeight)return this.blockAt(i,o,s,a);if(r==Ur.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new xg(c,l.to-c,0,0,mr.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,g=o.doc.lineAt(i),m=f+g.length*p,v=g.number-h;return new xg(g.from,g.length,Math.max(s,Math.min(s+f*v+p*(g.from-a-v),s+this.height-m)),m,mr.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var g=o.doc.lineAt(f);if(f==i){var m=g.number-u;p+=d*m+h*(i-a-m)}var v=d+h*g.length;l(new xg(g.from,g.length,p,v,mr.Text)),p+=v,f=g.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return ou.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new hd(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=ou.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),got=function(t){We(e,ou);var n=qe(e);function e(i,r,o){var s;return ue(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return de(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Ur.ByPosNoHeight?Ur.ByPosNoHeight:Ur.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Ur.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=_e(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&Nfe(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?ou.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function Nfe(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof v0&&(i=t[n+1])instanceof v0&&t.splice(n-1,3,new v0(e.length+1+i.length))}var mot=function(){function t(n,e){ue(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return de(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof hd?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new hd(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new hd(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new v0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof hd)return n;var e=new hd(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=mr.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=mr.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof hd||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function bot(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var uL=function(){function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.size=i}return de(t,[{key:"draw",value:function(n){return _n.replace({widget:new wot(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new Pk(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?Pfe:new Cot(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:db(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(cb).filter(function(c){return"function"!=typeof c});var o=g0.extendWithRanges(n.changedRanges,function vot(t,n,e){var i=new yot;return Hr.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:iu.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(Vhe)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?ro.RTL:ro.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?bot:_ot)(e,this.paddingTop),p=f.top-this.pixelViewport.top,g=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var b=n.docView.measureTextSize(),C=b.lineHeight,k=b.charWidth;(s=C>0&&r.refresh(o,C,k,v/k,y))&&(n.docView.minWidth=0,c|=8)}p>0&&g>0?u=Math.max(p,g):p<0&&g<0&&(u=Math.min(p,g)),r.heightChanged=!1;var T,j=_e(this.viewports);try{for(j.s();!(T=j.n()).done;){var B=T.value,N=B.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(B);this.heightMap=(s?ou.empty().applyChanges(this.stateDeco,or.empty,this.heightOracle,[new g0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new pot(B.from,N))}}catch(V){j.e(V)}finally{j.f()}r.heightChanged&&(c|=2)}var $=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return $&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||$)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),c}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new Pk(r.lineAt(this.visibleTop-1e3*i,Ur.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Ur.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Ur.ByPos,o,0,0);l=new Pk(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Ur.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Ur.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=ro.LTR&&!r)return[];var l,c=[],u=function z(Y,O,H,G){if(!(O-YY&&M=H.from&&X.to<=H.to&&Math.abs(X.from-Y)ne})});if(!U){if(O=O})){var L=e.moveToLineBoundary(lt.cursor(O),!1,!0).head;L>Y&&(O=L)}U=new uL(Y,O,i.gapSize(H,Y,O,G))}c.push(U)}},d=_e(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,g,h,f),m=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||db(this.heightMap.lineAt(n,Ur.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return db(this.heightMap.lineAt(this.scaler.fromDOM(n),Ur.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return db(this.heightMap.blockAt(this.scaler.fromDOM(n),this.heightOracle,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),t}(),Pk=de(function t(n,e){ue(this,t),this.from=n,this.to=e});function xot(t,n,e){var i=[],r=t,o=0;return Hr.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function Lk(t,n){var e,i=0,r=_e(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var Pfe={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},Cot=function(){function t(n,e,i){ue(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Ur.ByPos,n,0,0).top,p=e.lineAt(h,Ur.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=_e(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return de(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),hL=Mf.newName(),Rfe=Mf.newName(),Lfe=Mf.newName(),Ffe={"&light":"."+Rfe,"&dark":"."+Lfe};function fL(t,n,e){return new Mf(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var Sot=fL("."+hL,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Ffe),kot=de(function t(n,e,i,r){ue(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var g=f.observer.selectionRange,m=g.anchorNode,v=g.anchorOffset,y=g.focusNode,b=g.focusOffset;return m&&(p.push(new ife(m,v)),y==m&&b==v||p.push(new ife(y,b))),p}(n),c=new tfe(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var g=f[0].pos,m=2==f.length?f[1].pos:g;return g>-1&&m>-1?lt.single(g+p,m+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!d0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!d0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=lt.single(h,d)}});function $fe(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||en.android&&n.text.length0&&G>0&&N.charCodeAt(H-1)==$.charCodeAt(G-1);)H--,G--;return"end"==z&&(V-=H+Math.max(0,O-Math.min(H,G))-O),H=H?O-V:0)+(G-H),H=O):G=G?O-V:0)+(H-G),G=O),{from:O,toA:H,toB:G}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(en.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:or.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(Nk)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(en.mac||en.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=lt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:or.of([" "])}):en.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=lt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:or.of([" "])}),e){var d=t.state;if(en.ios&&t.inputState.flushIOSKey(t)||en.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&p0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&p0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&p0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(Fhe).some(function(N){return N(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+g))}else{var m=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=m.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),b=sfe(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,k=r.to-r.from;h=d.changeByRange(function(N){if(N.from==r.from&&N.to==r.to)return{changes:m,range:v||N.map(m)};var $=N.to-C,V=$-y.length;if(N.to-N.from!=k||t.state.sliceDoc(V,$)!=y||b&&N.to>=b.from&&N.from<=b.to)return{range:N};var z=d.changes({from:V,to:$,insert:e.insert}),Y=N.to-r.to;return{changes:z,range:v?lt.range(Math.max(0,v.anchor+Y),Math.max(0,v.head+Y)):N.map(z)}})}else h={changes:m,selection:v&&d.selection.replaceRange(v)}}var T="input.type";return t.composing&&(T+=".compose",t.inputState.compositionFirstChange&&(T+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:T}),!0}if(i&&!i.main.eq(r)){var j=!1,B="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(j=!0),B=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:j,userEvent:B}),!0}return!1}var Tot={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},pL=en.ie&&en.ie_version<=11,Dot=function(){function t(n){var e=this;ue(this,t),this.view=n,this.active=!1,this.selectionRange=new Hrt,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=_e(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(en.ie&&en.ie_version<=11||en.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),pL&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(function(){var i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return de(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=_e(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(Nk)?i.root.activeElement==this.dom:Ak(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(en.ie&&en.ie_version<=11||en.android&&en.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Ek(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=en.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(Ek(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||Dk(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=Ak(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=_e(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=_e(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&Ak(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new kot(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=$fe(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=Bfe(e,n.previousSibling||n.target.previousSibling,-1),r=Bfe(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=_e(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function Bfe(t,n,e){for(;n;){var i=yo.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Yt=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ue(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function Urt(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new jfe(e.state||Mr.create(e)),this.plugins=this.state.facet(lb).map(function(s){return new eL(s)});var i,r=_e(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new Dot(this),this.inputState=new lot(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new rfe(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return de(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Qa?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=_e(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(N){l.e(N)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(N){return N.annotation(Afe)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=Efe(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(Mr.phrases)!=this.state.facet(Mr.phrases))return this.setState(a);(i=qhe.create(this,a,n)).flags|=d;var g=this.viewState.scrollTarget;try{this.updateState=2;var m,v=_e(n);try{for(v.s();!(m=v.n()).done;){var y=m.value;if(g&&(g=g.map(y.changes)),y.scrollIntoView){var b=y.state.selection.main;g=new Hhe(b.empty?b:lt.cursor(b.head,b.head>b.anchor?-1:1))}var C,k=_e(y.effects);try{for(k.s();!(C=k.n()).done;){var T=C.value;T.is(Uhe)&&(g=T.value)}}catch(N){k.e(N)}finally{k.f()}}}catch(N){v.e(N)}finally{v.f()}this.viewState.update(i,g),this.bidiCache=Hfe.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(ub)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(N){return N.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(Fk)!=i.state.facet(Fk)&&(this.viewState.mustMeasureContent=!0),(o||s||g||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var j,B=_e(this.state.facet(ZR));try{for(B.s();!(j=B.n()).done;)(0,j.value)(i)}catch(N){B.e(N)}finally{B.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!$fe(e,p)&&f.force&&p0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=_e(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new jfe(n),this.plugins=n.facet(lb).map(function(a){return new eL(a)}),this.pluginMap.clear();var o,s=_e(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new rfe(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(lb),i=n.state.facet(lb);if(e!=i){var r,o=[],s=_e(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new eL(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(m){s.e(m)}finally{s.f()}var u,d=_e(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(m){d.e(m)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=_e(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(m){p.e(m)}finally{p.f()}}for(var g=0;g0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var f=[];if(!(4&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var g=f.map(function(N){try{return N.read(n)}catch($){return Il(n.state,$),Vfe}}),m=qhe.create(this,this.state,[]),v=!1,y=!1;m.flags|=h,i?i.flags|=h:i=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),v=this.docView.update(m));for(var b=0;b1||k<-1)&&(this.scrollDOM.scrollTop+=k,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var T,j=_e(this.state.facet(ZR));try{for(j.s();!(T=j.n()).done;)(0,T.value)(i)}catch(N){j.e(N)}finally{j.f()}}}}},{key:"themeClasses",get:function(){return hL+" "+(this.state.facet(dL)?Lfe:Rfe)+" "+this.state.facet(Fk)}},{key:"updateAttrs",value:function(){var n=this,e=Ufe(this,zhe,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Nk)?"true":"false",class:"cm-content",style:"".concat(en.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),Ufe(this,tL,i);var r=this.observer.ignore(function(){var o=JR(n.contentDOM,n.contentAttrs,i),s=JR(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=_e(n);try{for(r.s();!(e=r.n()).done;){var o,s=_e(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(ub),Mf.mount(this.root,this.styleModules.concat(Sot).reverse())}},{key:"readMeasured",value:function(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}},{key:"requestMeasure",value:function(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==ro.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return lt.cursor(l,e?-1:1)}var c=ru.find(t.docView,n.head);return lt.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return aL(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return lt.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var g=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-g.from))),u=(c<0?g.top:g.bottom)+p}for(var m=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var b=u+(v+y)*c,C=dfe(r,{x:m,y:b},!1,c);if(bh.bottom||(c<0?Cl))return lt.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),dfe(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return LR(i,o[m0.find(o,n-r.from,-1,e)].dir==ro.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(Bhe)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>Aot)return Zhe(n.length);var e,i=this.textDirectionAt(n.from),r=_e(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==nL?1:2,d=l==nL?2:1;if(!a||1==u&&!Krt.test(a))return Zhe(c);for(var h=0,f=u,p=u;h=0;Y-=3)if(dd[Y+1]==-B){var O=dd[Y+2],H=2&O?u:4&O?1&O?d:u:0;H&&(oo[$]=oo[dd[Y]]=H),V=Y;break}}else{if(189==dd.length)break;dd[V++]=$,dd[V++]=j,dd[V++]=z}else if(2==(N=oo[$])||1==N){var G=N==u;z=G?0:1;for(var F=V-3;F>=0;F-=3){var Z=dd[F+2];if(2&Z)break;if(G)dd[F+2]|=2;else{if(4&Z)break;dd[F+2]|=4}}}for(var D=0;Dge;){for(var be=De,Ie=2!=oo[--De];De>ge&&Ie==(2!=oo[De-1]);)De--;X.push(new m0(De,be,Ie?2:1))}else X.push(new m0(ge,ne,0))}else for(var R=0;RDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){ghe(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=_e(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Uhe.of(new Hhe("number"==typeof n?lt.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return ks.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=Mf.newName(),r=[Fk.of(i),ub.of(fL(".".concat(i),n))];return e&&e.dark&&r.push(dL.of(!0)),r}},{key:"baseTheme",value:function(n){return c0.lowest(ub.of(fL("."+hL,n,Ffe)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&yo.get(i)||yo.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Yt.styleModule=ub,Yt.inputHandler=Fhe,Yt.focusChangeEffect=$he,Yt.perLineTextDirection=Bhe,Yt.exceptionSink=Lhe,Yt.updateListener=ZR,Yt.editable=Nk,Yt.mouseSelectionStyle=Rhe,Yt.dragMovesSelection=Phe,Yt.clickAddsSelectionRange=jhe,Yt.decorations=cb,Yt.atomicRanges=Ghe,Yt.scrollMargins=Whe,Yt.darkTheme=dL,Yt.contentAttributes=tL,Yt.editorAttributes=zhe,Yt.lineWrapping=Yt.contentAttributes.of({class:"cm-lineWrapping"}),Yt.announce=fi.define();var Aot=4096,Vfe={},Hfe=function(){function t(n,e,i,r){ue(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return de(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:ro.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&qR(s,e)}return e}var Eot=en.mac?"mac":en.windows?"win":en.linux?"linux":"key";function $k(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var Oot=c0.default(Yt.domEventHandlers({keydown:function(t,n){return Wfe(Gfe(n.state),t,n,"editor")}})),Bk=Zt.define({enables:Oot}),zfe=new WeakMap;function Gfe(t){var n=t.facet(Bk),e=zfe.get(n);return e||zfe.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Eot,s=Object.create(null),a=Object.create(null),l=function(T,j){var B=a[T];if(null==B)a[T]=j;else if(B!=j)throw new Error("Key binding "+T+" is used both as a regular binding and as a multi-stroke prefix")},c=function(T,j,B,N){for(var $,V,z=s[T]||(s[T]=Object.create(null)),Y=j.split(/ (?!$)/).map(function(Z){return function Mot(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==ro.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=qfe(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=Jfe(t,i),f=Jfe(t,r),p=h.type==mr.Text?h:null,g=f.type==mr.Text?f:null;if(t.lineWrapping&&(p&&(p=Yfe(t,i,p)),g&&(g=Yfe(t,r,g))),p&&g&&p.from==g.from)return C(k(e.from,e.to,p));var m=p?k(e.from,null,p):T(h,!1),v=g?k(null,e.to,g):T(f,!0),y=[];return(p||h).to<(g||f).from-1?y.push(b(u,m.bottom,d,v.top)):m.bottomH&&Z.from=E)break;ge>D&&Y(Math.max(ne,D),null==j&&ne<=H,Math.min(ge,E),null==B&&ge>=G,X.dir)}}catch(ae){L.e(ae)}finally{L.f()}if((D=U.to+1)>=E)break}}}catch(ae){F.e(ae)}finally{F.f()}return 0==z.length&&Y(H,null==j,G,null==B,t.textDirection),{top:$,bottom:V,horizontal:z}}function T(j,B){var N=a.top+(B?j.top:j.bottom);return{top:N,bottom:N,horizontal:[]}}}(n,e,i)}}]),t}();function qfe(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ro.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function Yfe(t,n,e){var i=lt.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:mr.Text}}function Jfe(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=_e(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==mr.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var Not=function(){function t(n,e){ue(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return de(t,[{key:"update",value:function(n){n.startState.facet(Vk)!=n.state.facet(Vk)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(Vk);e0&&void 0!==arguments[0]?arguments[0]:{}),Pot,Rot,Lot,Vhe.of(!0)]}function Qfe(t){return t.startState.facet(hb)!=t.state.facet(hb)}var Pot=Kfe({above:!0,markers:function(t){var n,e=t.state,i=e.facet(hb),r=[],o=_e(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||Xfe:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:lt.cursor(s.head,s.head>s.anchor?-1:1),d=_e(gL.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Qfe(t);return e&&Zfe(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Zfe(n.state,t)},class:"cm-cursorLayer"});function Zfe(t,n){n.style.animationDuration=t.facet(hb).cursorBlinkRate+"ms"}var Rot=Kfe({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:gL.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Qfe(t)},class:"cm-selectionLayer"}),epe={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Xfe&&(epe[".cm-line"].caretColor="transparent !important");var Lot=c0.highest(Yt.theme(epe)),tpe=fi.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),fb=Hs.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(tpe)?i.value:e},t)}}),Fot=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return de(t,[{key:"update",value:function(n){var e,i=n.state.field(fb);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(fb)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(fb),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(fb)!=n&&this.view.dispatch({effects:tpe.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function npe(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var $ot=function(){function t(n){ue(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return de(t,[{key:"createDeco",value:function(n){var e,i=this,r=new bg,o=r.add.bind(r),s=_e(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],g=_e(h);try{for(g.s();!(f=g.n()).done;){var m=f.value,v=m.from,y=m.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(b){g.e(b)}finally{g.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;npe(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=_e(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:g})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),mL=null!=/x/.unicode?"gu":"g",Bot=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",mL),Vot={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},vL=null,Hk=Zt.define({combine:function(t){var n=uc(t,{render:null,specialChars:Bot,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==vL&&typeof document<"u"&&document.body){var i=document.body.style;vL=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return vL||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,mL)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,mL)),n}});function Hot(){return[Hk.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ipe||(ipe=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.decorations=_n.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Hk)),this.decorations=this.decorator.createDeco(n)}return de(t,[{key:"makeDecorator",value:function(n){var e=this;return new $ot({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=Vs(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=nb(l.text,c,o-l.from);return _n.replace({widget:new Got((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=_n.replace({widget:new zot(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(Hk);n.startState.facet(Hk)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var ipe=null,zot=function(t){We(e,If);var n=qe(e);function e(i,r){var o;return ue(this,e),(o=n.call(this)).options=i,o.code=r,o}return de(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+(Vot[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),Got=function(t){We(e,If);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).width=i,r}return de(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),Wot=_n.line({class:"cm-activeLine"}),qot=ks.fromClass(function(){function t(n){ue(this,t),this.decorations=this.getDeco(n)}return de(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=_e(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(Wot.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return _n.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function rpe(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):nb(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function Jot(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Yt.mouseSelectionStyle.of(function(e,i){return n(i)?function Yot(t,n){var e=rpe(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=rpe(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var g=Math.min(u.off,d.off),m=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=m&&p.push(lt.range(y.from+g,y.to+m))}else for(var b=Math.min(u.col,d.col),C=Math.max(u.col,d.col),k=h;k<=f;k++){var T=c.doc.line(k),j=jR(T.text,b,c.tabSize,!0);if(j<0)p.push(lt.cursor(T.to));else{var B=jR(T.text,C,c.tabSize);p.push(lt.range(T.from+j,T.from+B))}}return p}(t.state,e,a);return l.length?lt.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var Kot={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},Xot={style:"cursor: crosshair"};function Qot(){var n=Wt(Kot[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=ks.fromClass(function(){function o(s){ue(this,o),this.view=s,this.isDown=!1}return de(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Yt.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?Xot:null})]}var ope=function(){function t(n,e,i){ue(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return de(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=_e(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return de(t,[{key:"createContainer",value:function(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var n,e=_e(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(yL);if(r.position!=this.position){this.position=r.position;var o,s=_e(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=_e(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=_e(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(yL).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,g=null!==(e=spe.get(l))&&void 0!==e?e:d.bottom-d.top,m=l.offset||tst,v=this.view.textDirection==ro.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+m.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-m.x),b=!!a.above;!a.strictSide&&(b?u.top-(d.bottom-d.top)-m.yr.bottom)&&b==r.bottom-u.bottom>u.top-r.top&&(b=!b);var C=(b?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&N.topk&&(k=b?N.top-g-2-f:N.bottom+f+2)}}catch($){B.e($)}finally{B.f()}}"absolute"==this.position?(c.style.top=k-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=k+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?m.x:-m.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:k,right:T,bottom:k+g}),c.classList.toggle("cm-tooltip-above",b),c.classList.toggle("cm-tooltip-below",!b),l.positioned&&l.positioned(n.space)}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var n,e=_e(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),est=Yt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),tst={x:0,y:0},Uk=Zt.define({enables:[ape,est]}),zk=Zt.define(),nst=function(){function t(n){var e=this;ue(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ope(n,zk,function(i){return e.createHostedView(i)})}return de(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=_e(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=_e(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),ist=Uk.compute([zk],function(t){var n=t.facet(zk).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,sn(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,sn(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:nst.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),rst=function(){function t(n,e,i,r,o){ue(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return de(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==ro.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=fi.define(),i=Hs.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Ea.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=_e(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(ast)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return zk.from(r)}});return[i,ks.define(function(r){return new rst(r,t,i,e,n.hoverTime||300)}),ist]}var ast=fi.define(),cpe=Zt.define({combine:function(t){var n,e,i,r=_e(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function pb(t,n){var e=t.plugin(upe),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var upe=ks.fromClass(function(){function t(n){ue(this,t),this.input=n.state.facet(gb),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(cpe);this.top=new Gk(n,!0,e.topContainer),this.bottom=new Gk(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=_e(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return de(t,[{key:"update",value:function(n){var e=n.state.facet(cpe);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Gk(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Gk(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(gb);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=_e(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,g=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),mpe=function(){function t(n,e){var i=this;ue(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=ppe(e.markers(n)),e.initialSpacer&&(this.spacer=new vpe(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return de(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=ppe(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Hr.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=_e(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),vpe=function(){function t(n,e,i,r){ue(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return de(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),fpe(),hst]}function ype(t){for(var n=9;ni&&(i=s,e.push(pst.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Hr.of(e)}),mst=0,xL=de(function t(n,e){ue(this,t),this.from=n,this.to=e}),vi=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ue(this,t),this.id=mst++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return de(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=dc.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();vi.closedBy=new vi({deserialize:function(t){return t.split(" ")}}),vi.openedBy=new vi({deserialize:function(t){return t.split(" ")}}),vi.group=new vi({deserialize:function(t){return t.split(" ")}}),vi.contextHash=new vi({perNode:!0}),vi.lookAhead=new vi({perNode:!0}),vi.mounted=new vi({perNode:!0});var vst=Object.create(null),dc=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;ue(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return de(t,[{key:"prop",value:function(n){return this.props[n.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(vi.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):vst,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=_e(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=_e(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(vi.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();dc.none=new dc("",Object.create(null),0,8);var zs,yst=function(){function t(n){ue(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=qk.get(this)||this.topNode,r=new Kk(i);return r.moveTo(n,e),qk.set(this,r._tree),r}},{key:"topNode",get:function(){return new yb(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=_0(qk.get(this)||this.topNode,n,e,!1);return qk.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=_0(_pe.get(this)||this.topNode,n,e,!0);return _pe.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|zs.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:kL(dc.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(dc.none,i,r,o)})}}],[{key:"build",value:function(n){return function wst(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new _st(e,e.length):e,d=i.types,h=0,f=0;function p(k,T,j,B,N){for(var $=u.id,V=u.start,z=u.end,Y=u.size,O=f;Y<0;){if(u.next(),-1==Y)return j.push(a[$]),void B.push(V-k);if(-3==Y)return void(h=$);if(-4==Y)return void(f=$);throw new RangeError("Unrecognized record size: ".concat(Y))}var G,F,Ie,Z=d[$],D=V-k;if(z-V<=o&&(F=function(Ie,R){var J=u.fork(),K=0,pe=0,Te=0,ye=J.end-o,Ue={size:0,start:0,skip:0};e:for(var Je=J.pos-Ie;J.pos>Je;){var _t=J.size;if(J.id==R&&_t>=0)Ue.size=K,Ue.start=pe,Ue.skip=Te,Te+=4,K+=4,J.next();else{var zt=J.pos-_t;if(_t<0||zt=c?4:0,Nn=J.start;for(J.next();J.pos>zt;){if(J.size<0){if(-3!=J.size)break e;ct+=4}else J.id>=c&&(ct+=4);J.next()}pe=Nn,K+=_t,Te+=ct}}return(R<0||K==Ie)&&(Ue.size=K,Ue.start=pe,Ue.skip=Te),Ue.size>4?Ue:void 0}(u.pos-T,N))){for(var E=new Uint16Array(F.size-F.skip),M=u.pos-F.size,U=E.length;u.pos>M;)U=v(F.start,E,U);G=new vb(E,z-F.start,i),D=F.start-k}else{var L=u.pos-Y;u.next();for(var X=[],ne=[],ge=$>=c?$:-1,ae=0,De=z;u.pos>L;)ge>=0&&u.id==ge&&u.size>=0?(u.end<=De-o&&(g(X,ne,V,ae,u.end,De,ge,O),ae=X.length,De=u.end),u.next()):p(V,L,X,ne,ge);if(ge>=0&&ae>0&&ae-1&&ae>0){var be=(Ie=Z,function(R,J,K){var pe,Te,ye=0,Ue=R.length-1;if(Ue>=0&&(pe=R[Ue])instanceof Gs){if(!Ue&&pe.type==Ie&&pe.length==K)return pe;(Te=pe.prop(vi.lookAhead))&&(ye=J[Ue]+pe.length+Te)}return m(Ie,R,J,K,ye)});G=kL(Z,X,ne,0,X.length,0,z-V,be,be)}else G=m(Z,X,ne,z-V,O-z)}j.push(G),B.push(D)}function g(k,T,j,B,N,$,V,z){for(var Y=[],O=[];k.length>B;)Y.push(k.pop()),O.push(T.pop()+j-N);k.push(m(i.types[V],Y,O,$-N,z-$)),T.push(N-j)}function m(k,T,j,B){var N=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,$=arguments.length>5?arguments[5]:void 0;if(h){var V=[vi.contextHash,h];$=$?[V].concat($):[V]}if(N>25){var z=[vi.lookAhead,N];$=$?[z].concat($):[z]}return new Gs(k,T,j,B,$)}function v(k,T,j){var B=u.id,N=u.start,$=u.end,V=u.size;if(u.next(),V>=0&&B4)for(var Y=u.pos-(V-4);u.pos>Y;)j=v(k,T,j);T[--j]=z,T[--j]=$-k,T[--j]=N-k,T[--j]=B}else-3==V?h=B:-4==V&&(f=B);return j}for(var y=[],b=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,b,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?b[0]+y[0].length:0;return new Gs(d[t.topID],y.reverse(),b.reverse(),C)}(n)}}]),t}();Gs.empty=new Gs(dc.none,[],[],0);var _st=function(){function t(n,e){ue(this,t),this.buffer=n,this.index=e}return de(t,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new t(this.buffer,this.index)}}]),t}(),vb=function(){function t(n,e,i){ue(this,t),this.buffer=n,this.length=e,this.set=i}return de(t,[{key:"type",get:function(){return dc.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function wpe(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function _0(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(bpe(r,i,h,h+d.length))if(d instanceof vb){if(o&zs.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new CL(new bst(s,d,n,h),null,f)}else if(o&zs.IncludeAnonymous||!d.type.isAnonymous||SL(d)){var p=void 0;if(!(o&zs.IgnoreMounts)&&d.props&&(p=d.prop(vi.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var g=new t(d,h,n,s);return o&zs.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&zs.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._parent)))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this._tree.children.length-1,-1,0,4)}},{key:"childAfter",value:function(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&zs.IgnoreOverlays)&&(i=this._tree.prop(vi.mounted))&&i.overlay){var o,s=n-this.from,a=_e(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new Kk(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return wpe(this,n)}},{key:"getChild",value:function(n){var r=Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return Jk(this,n)}}]),t}();function Yk(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function Jk(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var bst=de(function t(n,e,i,r){ue(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),CL=function(){function t(n,e,i){ue(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return de(t,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&zs.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);return o<0?null:new t(this.context,this,o)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new Kk(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Gs(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return wpe(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return Jk(this,n)}}]),t}(),Kk=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ue(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof yb)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return de(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof yb?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&zs.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&zs.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&zs.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&zs.IncludeAnonymous||u instanceof vb||!u.type.isAnonymous||SL(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return Jk(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function SL(t){return t.children.some(function(n){return n instanceof vb||!n.type.isAnonymous||SL(n)})}var xpe=new WeakMap;function Xk(t,n){if(!t.isAnonymous||n instanceof vb||n.type!=t)return 1;var e=xpe.get(n);if(null==e){e=1;var i,r=_e(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Gs)){e=1;break}e+=Xk(t,o)}}catch(s){r.e(s)}finally{r.f()}xpe.set(n,e)}return e}function kL(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;j+=B}if(C==k+1){if(j>d){var N=g[k];p(N.children,N.positions,0,N.children.length,m[k]+b);continue}h.push(g[k])}else h.push(kL(t,g,m,k,C,T,m[C-1]+g[C-1].length-T,null,l));f.push(T+b-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var Qk=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];ue(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return de(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=_e(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:Spe.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),Sst=0,Spe=function(){function t(){ue(this,t),this.instances=[],this.id=Sst++}return de(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(g){return g.base==n&&(m=e).length==(v=g.modified).length&&m.every(function(y,b){return y==v[b]});var m,v});if(i)return i;var r,o=[],s=new jf(o,n,e),a=_e(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(g){a.e(g)}finally{a.f()}var l,c=kpe(e),u=_e(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=_e(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(g){f.e(g)}finally{f.f()}}}catch(g){u.e(g)}finally{u.f()}return s}}]),t}();function kpe(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var g=new kst(i,l,f>0?a.slice(0,f):null);n[p]=g.sort(n[p])}}}catch(m){o.e(m)}finally{o.f()}}return Dpe.add(n)}var Dpe=new vi,kst=function(){function t(n,e,i,r){ue(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return de(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new Ast(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var TL,Ast=function(){function t(n,e,i){ue(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return de(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function(j){return!j.scope||j.scope(s)}));for(var c=r,u=s.prop(Dpe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=Tst(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(vi.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),g=this.highlighters.filter(function(j){return!j.scope||j.scope(f.tree.type)}),m=n.firstChild(),v=0,y=a;;v++){var b=v=C)&&n.nextSibling()););if(!b||C>i)break;(y=b.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,b.from+a),Math.min(i,y),r,g),this.startSpan(y,c))}m&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),St=jf.define,Zk=St(),Pf=St(),Epe=St(Pf),Mpe=St(Pf),Rf=St(),eT=St(Rf),DL=St(Rf),pd=St(),Cg=St(pd),gd=St(),md=St(),AL=St(),_b=St(AL),tT=St(),yt={comment:Zk,lineComment:St(Zk),blockComment:St(Zk),docComment:St(Zk),name:Pf,variableName:St(Pf),typeName:Epe,tagName:St(Epe),propertyName:Mpe,attributeName:St(Mpe),className:St(Pf),labelName:St(Pf),namespace:St(Pf),macroName:St(Pf),literal:Rf,string:eT,docString:St(eT),character:St(eT),attributeValue:St(eT),number:DL,integer:St(DL),float:St(DL),bool:St(Rf),regexp:St(Rf),escape:St(Rf),color:St(Rf),url:St(Rf),keyword:gd,self:St(gd),null:St(gd),atom:St(gd),unit:St(gd),modifier:St(gd),operatorKeyword:St(gd),controlKeyword:St(gd),definitionKeyword:St(gd),moduleKeyword:St(gd),operator:md,derefOperator:St(md),arithmeticOperator:St(md),logicOperator:St(md),bitwiseOperator:St(md),compareOperator:St(md),updateOperator:St(md),definitionOperator:St(md),typeOperator:St(md),controlOperator:St(md),punctuation:AL,separator:St(AL),bracket:_b,angleBracket:St(_b),squareBracket:St(_b),paren:St(_b),brace:St(_b),content:pd,heading:Cg,heading1:St(Cg),heading2:St(Cg),heading3:St(Cg),heading4:St(Cg),heading5:St(Cg),heading6:St(Cg),contentSeparator:St(pd),list:St(pd),quote:St(pd),emphasis:St(pd),strong:St(pd),link:St(pd),monospace:St(pd),strikethrough:St(pd),inserted:St(),deleted:St(),changed:St(),invalid:St(),meta:tT,documentMeta:St(tT),annotation:St(tT),processingInstruction:St(tT),definition:jf.defineModifier(),constant:jf.defineModifier(),function:jf.defineModifier(),standard:jf.defineModifier(),local:jf.defineModifier(),special:jf.defineModifier()};Ape([{tag:yt.link,class:"tok-link"},{tag:yt.heading,class:"tok-heading"},{tag:yt.emphasis,class:"tok-emphasis"},{tag:yt.strong,class:"tok-strong"},{tag:yt.keyword,class:"tok-keyword"},{tag:yt.atom,class:"tok-atom"},{tag:yt.bool,class:"tok-bool"},{tag:yt.url,class:"tok-url"},{tag:yt.labelName,class:"tok-labelName"},{tag:yt.inserted,class:"tok-inserted"},{tag:yt.deleted,class:"tok-deleted"},{tag:yt.literal,class:"tok-literal"},{tag:yt.string,class:"tok-string"},{tag:yt.number,class:"tok-number"},{tag:[yt.regexp,yt.escape,yt.special(yt.string)],class:"tok-string2"},{tag:yt.variableName,class:"tok-variableName"},{tag:yt.local(yt.variableName),class:"tok-variableName tok-local"},{tag:yt.definition(yt.variableName),class:"tok-variableName tok-definition"},{tag:yt.special(yt.variableName),class:"tok-variableName2"},{tag:yt.definition(yt.propertyName),class:"tok-propertyName tok-definition"},{tag:yt.typeName,class:"tok-typeName"},{tag:yt.namespace,class:"tok-namespace"},{tag:yt.className,class:"tok-className"},{tag:yt.macroName,class:"tok-macroName"},{tag:yt.propertyName,class:"tok-propertyName"},{tag:yt.operator,class:"tok-operator"},{tag:yt.comment,class:"tok-comment"},{tag:yt.meta,class:"tok-meta"},{tag:yt.invalid,class:"tok-invalid"},{tag:yt.punctuation,class:"tok-punctuation"}]);var b0=new vi,Est=new vi,su=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";ue(this,t),this.data=n,this.name=r,Mr.prototype.hasOwnProperty("tree")||Object.defineProperty(Mr.prototype,"tree",{get:function(){return la(this)}}),this.parser=e,this.extension=[Lf.of(this),Mr.languageData.of(function(o,s,a){var l=Ope(o,s,a),c=l.type.prop(b0);if(!c)return[];var u=o.facet(c),d=l.type.prop(Est);if(d){var h,f=l.resolve(s-l.from,a),p=_e(d);try{for(p.s();!(h=p.n()).done;){var g=h.value;if(g.test(f,o)){var m=o.facet(g.facet);return"replace"==g.type?m:m.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return de(t,[{key:"isActiveAt",value:function(n,e){return Ope(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(b0)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(Lf);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(b0)!=e.data){var l=s.prop(vi.mounted);if(l){if(l.tree.prop(b0)==e.data){if(l.overlay){var c,u=_e(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(g){u.e(g)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),bb=null,Ist=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;ue(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return de(t,[{key:"startParse",value:function(){return this.parser.startParse(new Ost(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Gs.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(Qk.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=bb;bb=this;try{return n()}finally{bb=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=Ipe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,g,m,v){return l.push({fromA:p,toA:g,fromB:m,toB:v})}),i=Qk.applyChanges(i,l),r=Gs.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=_e(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=Ipe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Gs.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){We(r,Cpe);var i=qe(r);function r(){return ue(this,r),i.apply(this,arguments)}return de(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=bb;if(u){var d,h=_e(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Gs(dc.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return bb}}]),t}();function Ipe(t,n,e){return Qk.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var EL=function(){function t(n){ue(this,t),this.context=n,this.tree=n.tree}return de(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=Ist.create(n.facet(Lf).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();su.state=Hs.define({create:EL.init,update:function(t,n){var e,i=_e(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(su.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(Lf)!=n.state.facet(Lf)?EL.init(n.state):t.apply(n)}});var Npe=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(Npe=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var ML=typeof navigator<"u"&&null!==(TL=navigator.scheduling)&&void 0!==TL&&TL.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,Nst=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return de(t,[{key:"update",value:function(n){var e=this.view.state.field(su.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(su.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=Npe(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return ML&&ML()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:su.setState.of(new EL(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Il(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),Lf=Zt.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[su.state,Nst,Yt.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),jst=de(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ue(this,t),this.language=n,this.support=e,this.extension=[n,e]}),Pst=Zt.define(),nT=Zt.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function w0(t){var n=t.facet(nT);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function wb(t,n){var e="",i=t.tabSize,r=t.facet(nT)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};ue(this,t),this.state=n,this.options=e,this.unit=w0(n)}return de(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return nb(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),jpe=new vi;function Rst(t){var n=t.type.prop(jpe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(vi.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,g=function(m){var v=m.node,y=v.childAfter(v.from),b=v.lastChild;if(!y)return null;for(var C=m.options.simulateBreak,k=m.state.doc.lineAt(y.from),T=null==C||C<=k.from?k.to:Math.min(k.to,C),j=y.to;;){var B=v.childAfter(j);if(!B||B==b)return null;if(!B.type.isSkipped)return B.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var Bst=Zt.define(),Lpe=new vi;function rT(t,n,e){var i,r=_e(t.facet(Bst));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=la(s);if(c.lengthl)){if(h&&f.from=a&&g.to>l&&(h=g)}}return h}(t,n,e)}function Fpe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var oT=fi.define({map:Fpe}),xb=fi.define({map:Fpe});function $pe(t){var n,e=[],i=_e(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var Sg=Hs.define({create:function(){return _n.none},update:function(t,n){t=t.map(n.changes);var e,i=_e(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(oT)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[zpe.range(a.value.from,a.value.to)]}):a.is(xb)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Yt.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function Bpe(t,n){return t.field(Sg,!1)?n:n.concat(fi.appendConfig.of(Upe()))}function Vpe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Yt.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var Vst=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=_e($pe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=rT(t.state,i.from,i.to);if(r)return t.dispatch({effects:Bpe(t.state,[oT.of(r),Vpe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(Sg,!1))return!1;var n,e=[],i=_e($pe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=sT(t.state,r.from,r.to);o&&e.push(xb.of(o),Vpe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},Ust),t),e=new IL(n,!0),i=new IL(n,!1),r=ks.fromClass(function(){function s(a){ue(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return de(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(Lf)!=a.state.facet(Lf)||a.startState.field(Sg,!1)!=a.state.field(Sg,!1)||la(a.startState)!=la(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new bg,u=_e(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=sT(a.state,d.from,d.to)?i:rT(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,hpe({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Hr.empty},initialSpacer:function(){return new IL(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=sT(s.state,a.from,a.to);if(c)return s.dispatch({effects:xb.of(c)}),!0;var u=rT(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:oT.of(u)}),!0)}})}),Upe()]}var Gst=Yt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),NL=function(){function t(n,e){var i;function r(a){var l=Mf.newName();return(i||(i=Object.create(null)))["."+l]=a,l}ue(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof su?function(a){return a.prop(b0)==s.data}:s?function(a){return a==s}:void 0,this.style=Ape(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new Mf(i):null,this.themeType=e.themeType}return de(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),jL=Zt.define(),Gpe=Zt.define({combine:function(t){return t.length?[t[0]]:null}});function PL(t){var n=t.facet(jL);return n.length?n:t.facet(Gpe)}function Wpe(t,n){var e,i=[qst];return t instanceof NL&&(t.module&&i.push(Yt.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?Gpe.of(t):e?jL.computeN([Yt.darkTheme],function(r){return r.facet(Yt.darkTheme)==("dark"==e)?[t]:[]}):jL.of(t)),i}var Wst=function(){function t(n){ue(this,t),this.markCache=Object.create(null),this.tree=la(n.state),this.decorations=this.buildDeco(n,PL(n.state))}return de(t,[{key:"update",value:function(n){var e=la(n.state),i=PL(n.state),r=i!=PL(n.startState);e.length0&&vd(n.state,s.head-1,1,r)||r.afterCursor&&(vd(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),eat]}var nat=new vi;function RL(t,n,e){var i=t.prop(n<0?vi.openedBy:vi.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function LL(t){var n=t.type.prop(nat);return n?n(t.node):t}function vd(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=la(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=RL(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return iat(0,0,e,l,u,c,o)}}return function rat(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,g=e>0?0:f.length-1,m=e>0?f.length:-1;g!=m;g+=e){var v=s.indexOf(f[g]);if(!(v<0||i.resolveInner(p+g,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+g,to:p+g+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function iat(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(Jpe.push(t),console.warn(n))}function cat(t,n){var e,i=null,r=_e(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||yt[o];s?"function"==typeof s?i?i=s(i):$L(o,"Modifier ".concat(o," used at start of tag")):i?$L(o,"Tag ".concat(o," used as modifier")):i=s:$L(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=dc.define({id:Ype.length,name:a,props:[Tpe(qa({},a,i))]});return Ype.push(l),l.id}function BL(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var uat=BL(function pat(t,n){var e,r=[],o=-1,s=_e(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=VL(n,f.from).line;if(!p)continue;var g=/^\s*/.exec(f.text)[0].length,m=g==f.length,v=f.text.slice(g,g+p.length)==p?g:-1;g=0})){var Y,O=[],H=_e(r);try{for(H.s();!(Y=H.n()).done;){var G=Y.value,F=G.line,Z=G.comment;if(Z>=0){var E=F.from+Z,M=E+G.token.length;" "==F.text[M-F.from]&&M++,O.push({from:E,to:M})}}}catch(U){H.e(U)}finally{H.f()}return{changes:O}}return null},0),dat=BL(Qpe,0),hat=BL(function(t,n){return Qpe(t,n,function(e){var i,r=[],o=_e(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function VL(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function Qpe(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return VL(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function fat(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,g=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(g,g+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(g-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Yt.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?zL:"historyRedo"==n.inputType?lT:null;return!!i&&(n.preventDefault(),i(e))}})]}function aT(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field(UL,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var zL=aT(0,!1),lT=aT(1,!1),yat=aT(0,!0),_at=aT(1,!0);function ege(t){return function(n){var e=n.field(UL,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var bat=ege(0),wat=ege(1),ph=function(){function t(n,e,i,r,o){ue(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return de(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&iu.fromJSON(n.changes),[],n.mapped&&l0.fromJSON(n.mapped),n.startSelection&<.fromJSON(n.startSelection),n.selectionsAfter.map(lt.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=hc,o=_e(n.startState.facet(mat));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,hc)}},{key:"selection",value:function(n){return new t(void 0,hc,void 0,void 0,n)}}]),t}();function cT(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function tge(t,n){return t.length?n.length?t.concat(n):t:n}var hc=[];function nge(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),cT(t,t.length-1,1e9,e.setSelAfter(i)))}return[ph.selection([n])]}function xat(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function GL(t,n){if(!t.length)return t;for(var e=t.length,i=hc;e;){var r=Cat(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[ph.selection(i)]:hc}function Cat(t,n,e){var i=tge(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):hc,e);if(!t.changes)return ph.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new ph(r,fi.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var Sat=/^(input\.type|delete)($|\.)/,Cb=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;ue(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return de(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||Sat.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?cT(s,s.length-1,r.minDepth,new ph(n.changes.compose(a.changes),tge(n.effects,a.effects),a.mapped,a.startSelection,hc)):cT(s,s.length,r.minDepth,n),hc,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:hc;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function dT(t,n,e){for(var i=la(t).resolveInner(n.head),r=e?vi.closedBy:vi.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;Tat(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?vd(t,i.from,1):vd(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,lt.cursor(l,e?-1:1)}function age(t,n){return au(t,function(e){if(!e.empty)return uT(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var lge=function(t){return age(t,!1)},cge=function(t){return age(t,!0)};function uge(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=fT(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=fT(t,s,!1),a=fT(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:lt.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Yt.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function fT(t,n,e){if(t instanceof Yt){var i,r=_e(t.state.facet(Yt.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var Dge=function(t,n){return hT(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function Ige(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=_e(pT(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=_e(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(lt.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(m){d.e(m)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=_e(a.ranges);try{for(p.s();!(f=p.n()).done;){var g=f.value;o.push(lt.range(g.anchor-c,g.head-c))}}catch(m){p.e(m)}finally{p.f()}}}}}catch(m){s.e(m)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:lt.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Nge(t,n,e){if(t.readOnly)return!1;var i,r=[],o=_e(pT(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var Dat=jge(!1),Aat=jge(!0);function jge(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var g,m=la(f).resolveInner(p),v=m.childBefore(p),y=m.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(g=v.type.prop(vi.closedBy))&&g.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new iT(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=OL(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:lt.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var Pge=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(YL(n,function(i,r){r.push({from:i.from,insert:n.facet(nT)})}),{userEvent:"input.indent"})),!0)},Rge=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(YL(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=nb(o,n.tabSize),a=0,l=wb(n,Math.max(0,s-w0(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:Oge}].concat(Eat.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Oat=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return au(t,function(n){return dT(t.state,n,!ca(t))})},shift:function(t){return fc(t,function(n){return dT(t.state,n,!ca(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return au(t,function(n){return dT(t.state,n,ca(t))})},shift:function(t){return fc(t,function(n){return dT(t.state,n,ca(t))})}},{key:"Alt-ArrowUp",run:function(t){return Ige(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return Nge(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return Ige(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return Nge(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=lt.create([i.main]):i.main.empty||(r=lt.create([lt.cursor(i.main.head)])),!!r&&(e(yd(n,r)),!0)}},{key:"Mod-Enter",run:Aat},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=pT(n).map(function(r){return lt.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:lt.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=x0(n.selection,function(r){for(var o,s=la(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return lt.range(s.to,s.from)});return e(yd(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:Rge},{key:"Mod-]",run:Pge},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new iT(n,{overrideIndentation:function(s){return i[s]??-1}}),o=YL(n,function(s,a,l){var c=OL(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=wb(n,c);(u!=d||l.from0?o--:s0&&vd(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;ue(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(Fge(a))}:Fge,this.query=this.normalize(e)}return de(t,[{key:"peek",value:function(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Vs(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=yR(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=El(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(ue(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=$ge,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Hge(n,e,i,r,o);this.re=new RegExp(e,JL+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=gT(n,r),this.getLine(this.curLineStart)}return de(t,[{key:"getLine",value:function(n){this.iter.next(n),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=gT(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return KL.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=gT(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Vge.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function gT(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function XL(t){var n=Or("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=Wt(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:mT.of(!1),selection:lt.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Or("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:mT.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Or("label",t.state.phrase("Go to line"),": ",n)," ",Or("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(Bge.prototype[Symbol.iterator]=Hge.prototype[Symbol.iterator]=function(){return this});var mT=fi.define(),Uge=Hs.define({create:function(){return!0},update:function(t,n){var e,i=_e(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(mT)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return gb.from(t,function(n){return n?XL:null})}}),Nat=Yt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),jat={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zge=Zt.define({combine:function(t){return uc(t,jat,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Pat=_n.mark({class:"cm-selectionMatch"}),Rat=_n.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Gge(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==io.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==io.Word)}var Lat=ks.fromClass(function(){function t(n){ue(this,t),this.decorations=this.getDeco(n)}return de(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(zge),i=n.state,r=i.selection;if(r.ranges.length>1)return _n.none;var o,y,b,C,k,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return _n.none;var l=i.wordAt(s.head);if(!l)return _n.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return _n.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!Gge(a=i.charCategorizer(s.head),i,s.from,s.to)||(k=s.to,(y=a)((b=i).sliceDoc(C=s.from,C+1))!=io.Word||y(b.sliceDoc(k-1,k))!=io.Word))return _n.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return _n.none}var u,d=[],h=_e(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new C0(i.doc,o,f.from,f.to);!p.next().done;){var g=p.value,m=g.from,v=g.to;if((!a||Gge(a,i,m,v))&&(s.empty&&m<=s.from&&v>=s.to?d.push(Rat.range(m,v)):(m>=s.to||v<=s.from)&&d.push(Pat.range(m,v)),d.length>e.maxMatches))return _n.none}}catch(y){h.e(y)}finally{h.f()}return _n.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),Fat=Yt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),vT=Zt.define({combine:function(t){return uc(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Yat(n)}})}});function $at(t){return t?[vT.of(t),o4]:o4}var Wge=function(){function t(n){ue(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,JL),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return de(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new Vat(this):new Bat(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:Mr.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?k0(this,r,e,i):S0(this,r,e,i)}}]),t}(),qge=de(function t(n){ue(this,t),this.spec=n});function S0(t,n,e,i){return new C0(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=S0(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function k0(t,n,e,i){return new Bge(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(yT(a.input,a.index))!=io.Word||r(_T(a.input,a.index))!=io.Word)&&(r(_T(a.input,a.index+a[0].length))!=io.Word||r(yT(a.input,a.index+a[0].length))!=io.Word)}):void 0},e,i);var r}function yT(t,n){return t.slice(Aa(t,n,!1),n)}function _T(t,n){return t.slice(n,Aa(t,n))}var Vat=function(t){We(e,qge);var n=qe(e);function e(){return ue(this,e),n.apply(this,arguments)}return de(e,[{key:"nextMatch",value:function(i,r,o){var s=k0(this.spec,i,o,i.doc.length).next();return s.done&&(s=k0(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=k0(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=k0(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),Sb=fi.define(),QL=fi.define(),$f=Hs.define({create:function(t){return new ZL(t4(t).create(),null)},update:function(t,n){var e,i=_e(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(Sb)?t=new ZL(r.value.create(),t.panel):r.is(QL)&&(t=new ZL(t.query,r.value?e4:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return gb.from(t,function(n){return n.panel})}}),ZL=de(function t(n,e){ue(this,t),this.query=n,this.panel=e}),Hat=_n.mark({class:"cm-searchMatch"}),Uat=_n.mark({class:"cm-searchMatch cm-searchMatch-selected"}),zat=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.decorations=this.highlight(n.state.field($f))}return de(t,[{key:"update",value:function(n){var e=n.state.field($f);(e!=n.startState.field($f)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return _n.none;for(var i=this.view,r=new bg,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Uat:Hat)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function kb(t){return function(n){var e=n.state.field($f,!1);return e&&e.query.spec.valid?t(n,e):n4(n)}}var bT=kb(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:r4(t,r),userEvent:"select.search"}),!0)}),wT=kb(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:r4(t,o),userEvent:"select.search"}),!0)}),Gat=kb(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:lt.create(e.map(function(i){return lt.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),Yge=kb(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Yt.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(r4(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),Wat=kb(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Yt.announce.of(r),userEvent:"input.replace.all"}),!0});function e4(t){return t.state.facet(vT).createPanel(t)}function t4(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(vT);return new Wge({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var n4=function(t){var n=t.state.field($f,!1);if(n&&n.panel){var e=pb(t,e4);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=t4(t.state,n.query.spec);r.valid&&t.dispatch({effects:Sb.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[QL.of(!0),n?Sb.of(t4(t.state,n.query.spec)):fi.appendConfig.of(o4)]});return!0},i4=function(t){var n=t.state.field($f,!1);if(!n||!n.panel)return!1;var e=pb(t,e4);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:QL.of(!1)}),!0},qat=[{key:"Mod-f",run:n4,scope:"editor search-panel"},{key:"F3",run:bT,shift:wT,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:bT,shift:wT,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:i4,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new C0(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(lt.range(c.value.from,c.value.to))}return e(n.update({selection:lt.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=pb(t,XL);if(!n){var e=[mT.of(!0)];null==t.state.field(Uge,!1)&&e.push(fi.appendConfig.of([Uge,Nat])),t.dispatch({effects:e}),n=pb(t,XL)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=lt.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||lt.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return g=y,p=v,"continue";if(h){var b=s.wordAt(y.value.from);if(!b||b.from!=y.value.from||b.to!=y.value.to)return g=y,p=v,"continue"}return p=v,g=y,{v:y.value}}if(v)return g=y,p=v,{v:null};y=new C0(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,g=y},p=!1,g=new C0(s.doc,a,u[u.length-1].to);;){var m=f(p,g);if("continue"!==m&&"object"===xt(m))return m.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(lt.range(o.from,o.to),!1),effects:Yt.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Yat=function(){function t(n){var e=this;ue(this,t),this.view=n;var i=this.query=n.state.field($f).query.spec;function r(o,s,a){return Or("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Or("input",{value:i.search,placeholder:Nl(n,"Find"),"aria-label":Nl(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Or("input",{value:i.replace,placeholder:Nl(n,"Replace"),"aria-label":Nl(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Or("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Or("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Or("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Or("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return bT(n)},[Nl(n,"next")]),r("prev",function(){return wT(n)},[Nl(n,"previous")]),r("select",function(){return Gat(n)},[Nl(n,"all")]),Or("label",null,[this.caseField,Nl(n,"match case")]),Or("label",null,[this.reField,Nl(n,"regexp")]),Or("label",null,[this.wordField,Nl(n,"by word")])].concat(sn(n.state.readOnly?[]:[Or("br"),this.replaceField,r("replace",function(){return Yge(n)},[Nl(n,"replace")]),r("replaceAll",function(){return Wat(n)},[Nl(n,"replace all")])]),[Or("button",{name:"close",onclick:function(){return i4(n)},"aria-label":Nl(n,"close"),type:"button"},["\xd7"])]))}return de(t,[{key:"commit",value:function(){var n=new Wge({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:Sb.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return Wfe(Gfe(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?wT:bT)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),Yge(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=_e(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=_e(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(Sb)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(vT).top}}]),t}();function Nl(t,n){return t.state.phrase(n)}var xT=/[\s\.,:;?!]/;function r4(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!xT.test(l[c+1])&&xT.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!xT.test(l[u-1])&&xT.test(l[u])){l=l.slice(0,u);break}return Yt.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var Jat=Yt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),o4=[$f,c0.lowest(zat),Jat],Jge=function(){function t(n,e,i){ue(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return de(t,[{key:"tokenBefore",value:function(n){for(var e=la(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Qge(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Kge(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var Xge=de(function t(n,e,i){ue(this,t),this.completion=n,this.source=e,this.match=i});function Bf(t){return t.selection.main.head}function Qge(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Zge(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:lt.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:lt.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var eme=new WeakMap;function Xat(t){if(!Array.isArray(t))return t;var n=eme.get(t);return n||eme.set(t,n=function Kat(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=Wt(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=_e(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&N<=57||N>=97&&N<=122?2:N>=65&&N<=90?1:0:($=yR(N))!=$.toLowerCase()?1:$!=$.toUpperCase()?2:0;(!T||1==V&&C||0==B&&0!=V)&&(e[g]==N||i[g]==N&&(m=!0)?s[g++]=T:s.length&&(k=!1)),B=V,T+=El(N)}return g==c&&0==s[0]&&k?this.result((m?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,b]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,b]:g==c?this.result((m?-200:0)-100-700+(k?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=_e(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?El(Vs(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),_d=Zt.define({combine:function(t){return uc(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function tme(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Zat=function(){function t(n,e){var i=this;ue(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(_d);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,sn(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var g=d.label,m=0,v=1;vm&&p.appendChild(document.createTextNode(g.slice(m,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(g.slice(y,b))),C.className="cm-completionMatchedText",m=b}return m=this.range.to)&&(this.range=tme(i.options.length,i.selected,this.view.state.facet(_d).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Il(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,ime(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],g=0,m=_e(d);try{for(m.s();!(f=m.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,b=v.result.getMatch,C=_e(v.result.options);try{for(C.s();!(y=C.n()).done;){var k=y.value,T=[1e9-g++];if(b){var j,B=_e(b(k));try{for(B.s();!(j=B.n()).done;)T.push(j.value)}catch(M){B.e(M)}finally{B.f()}}p.push(new Xge(k,v,T))}}catch(M){C.e(M)}finally{C.f()}}else{var $,V=new Qat(h.sliceDoc(v.from,v.to)),z=void 0,Y=_e(v.result.options);try{for(Y.s();!($=Y.n()).done;){var O=$.value;(z=V.match(O.label))&&(null!=O.boost&&(z[0]+=O.boost),p.push(new Xge(O,v,z)))}}catch(M){Y.e(M)}finally{Y.f()}}}}catch(M){m.e(M)}finally{m.f()}var H,G=[],F=null,Z=h.facet(_d).compareCompletions,D=_e(p.sort(function(M,U){return U.match[0]-M.match[0]||Z(M.completion,U.completion)}));try{for(D.s();!(H=D.n()).done;){var E=H.value;!F||F.label!=E.completion.label||F.detail!=E.completion.detail||null!=F.type&&null!=E.completion.type&&F.type!=E.completion.type||F.apply!=E.completion.apply?G.push(E):nme(E.completion)>nme(F)&&(G[G.length-1]=E),F=E.completion}}catch(M){D.e(M)}finally{D.f()}return G}(n,e);if(!s.length)return null;var a,l=e.facet(_d).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var ilt=[];function s4(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var kg=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ue(this,t),this.source=n,this.state=e,this.explicitPos=i}return de(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=s4(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=_e(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(a4))r=new t(r.source,1,a.value?Bf(n.state):-1);else if(a.is(CT))r=new t(r.source,0);else if(a.is(rme)){var l,c=_e(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(Bf(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),rlt=function(t){We(e,kg);var n=qe(e);function e(i,r,o,s,a){var l;return ue(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return de(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=Bf(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&Bf(i.startState)==this.from)return new kg(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,g){if(!h)return!1;var m=f.sliceDoc(p,g);return"function"==typeof h?h(m,p,g,f):Qge(h,!0).test(m)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new Jge(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:Bf(i.state)):new kg(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new kg(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),a4=fi.define(),CT=fi.define(),rme=fi.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),ome=fi.define(),pc=Hs.define({create:function(){return tlt.start()},update:function(t,n){return t.update(n)},provide:function(t){return[Uk.from(t,function(n){return n.tooltip}),Yt.contentAttributes.from(t,function(n){return n.attrs})]}});function ST(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(pc,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function sst(t,n){var e=t.plugin(ape);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:ome.of(a)}),!0}}var olt=de(function t(n,e){ue(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),slt=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=_e(n.state.field(pc).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return de(t,[{key:"update",value:function(n){var e=this,i=n.state.field(pc);if(n.selectionSet||n.docChanged||n.startState.field(pc)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!s4(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=_e(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Il(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,sn(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(g){return g.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=_e(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==s4(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=_e(this.view.state.field(pc).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=Bf(i),o=new Jge(i,r,n.explicitPos==r),s=new olt(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:CT.of(null)}),Il(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(_d),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new rlt(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:Bf(l.updates.length?l.updates[0].startState:e.view.state)),d=_e(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(pc).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,g=new kg(l.active.source,0),m=_e(l.updates);try{for(m.s();!(p=m.n()).done;)g=g.update(p.value,r)}catch(y){m.e(y)}finally{m.f()}1!=g.state&&i.push(g)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),kT={brackets:["(","[","{","'",'"'],before:")]}:;>"},Tg=fi.define({map:function(t,n){return n.mapPos(t,-1,Ea.TrackAfter)??void 0}}),l4=fi.define({map:function(t,n){return n.mapPos(t)}}),c4=new(function(t){We(e,_g);var n=qe(e);function e(){return ue(this,e),n.apply(this,arguments)}return de(e)}());c4.startSide=1,c4.endSide=-1;var sme=Hs.define({create:function(){return Hr.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Hr.empty)}t=t.map(n.changes);var r,o=_e(n.effects);try{var s=function(){var a=r.value;a.is(Tg)?t=t.update({add:[c4.range(a.value,a.value+1)]}):a.is(l4)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function ame(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return yR(t<128?t:t+1)}function lme(t,n){return t.languageDataAt("closeBrackets",n)[0]||kT}var llt="object"==(typeof navigator>"u"?"undefined":xt(navigator))&&/Android\b/.test(navigator.userAgent),clt=Yt.inputHandler.of(function(t,n,e,i){if((llt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==El(Vs(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=lme(s,s.selection.main.head),u=c.brackets||kT.brackets,d=_e(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=ame(Vs(h,0));if(a==h)return f==h?flt(s,h,u.indexOf(h+h+h)>-1):dlt(s,h,f,c.before||kT.before);if(a==f&&cme(s,s.selection.main.from))return hlt(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),ult=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=lme(n,n.selection.main.head).brackets||kT.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=El(Vs(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=_e(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&TT(n.doc,s.head)==ame(Vs(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:lt.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function cme(t,n){var e=!1;return t.field(sme).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function TT(t,n){var e=t.sliceString(n,n+2);return e.slice(0,El(Vs(e,0)))}function dlt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:Tg.of(s.to+n.length),range:lt.range(s.anchor+n.length,s.head+n.length)};var a=TT(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:Tg.of(s.head+n.length),range:lt.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function hlt(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&TT(t.doc,o.head)==e?lt.cursor(o.head+e.length):i=o});return i?null:t.update({selection:lt.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return l4.of(o.from)})})}function flt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:Tg.of(o.to+n.length),range:lt.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=TT(t.doc,s);if(a==n){if(ume(t,s))return{changes:{insert:n+n,from:s},effects:Tg.of(s+n.length),range:lt.cursor(s+n.length)};if(cme(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:lt.cursor(s+n.length*(l?3:1)),effects:l4.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&ume(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:Tg.of(s+n.length),range:lt.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=io.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=io.Word&&!function(u,d,h){for(var f=la(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var g=f.firstChild;g&&g.from==f.from&&g.to-g.from>h.length;){if(u.sliceDoc(g.to-h.length,g.to)==h)return!1;g=g.firstChild}return!0}var m=f.to==d&&f.parent;if(!m)break;f=m}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:Tg.of(s+n.length),range:lt.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function ume(t,n){var e=la(t).resolveInner(n+1);return e.parent&&e.from==n}function plt(){return[pc,_d.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),slt,glt,alt]}var dme=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(pc,!1)&&(t.dispatch({effects:a4.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(pc,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:CT.of(null)}),0))}},{key:"ArrowDown",run:ST(!0)},{key:"ArrowUp",run:ST(!1)},{key:"PageDown",run:ST(!0,"page")},{key:"PageUp",run:ST(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(pc,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Zge(t,n.open.options[n.open.selected]),0))}}],glt=c0.highest(Bk.computeN([_d],function(t){return t.facet(_d).defaultKeymap?[dme]:[]})),mlt=de(function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.diagnostic=i}),Tb=function(){function t(n,e,i){ue(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return de(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(Dg).markerFilter;o&&(r=o(r));var s=_n.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?_n.widget({widget:new wlt(a),diagnostic:a}).range(a.from):_n.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,T0(s))}}]),t}();function T0(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new mlt(r,o,a.diagnostic),!1}),i}function hme(t,n){return!(!t.effects.some(function(e){return e.is(DT)})&&!t.changes.touchesRange(n.pos))}function fme(t,n){return t.field(jl,!1)?n:n.concat(fi.appendConfig.of([jl,Yt.decorations.compute([jl],function(e){var i=e.field(jl),r=i.selected;return r&&i.panel&&r.from!=r.to?_n.set([vlt.range(r.from,r.to)]):_n.none}),ost(ylt,{hideOn:hme}),xlt]))}var DT=fi.define(),u4=fi.define(),pme=fi.define(),jl=Hs.define({create:function(){return new Tb(_n.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=T0(e,t.selected.diagnostic,r)||T0(e,null,r)}t=new Tb(e,t.panel,i)}var o,s=_e(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(DT)?t=Tb.init(a.value,t.panel,n.state):a.is(u4)?t=new Tb(t.diagnostics,a.value?bme.open:null,t.selected):a.is(pme)&&(t=new Tb(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[gb.from(t,function(n){return n.panel}),Yt.decorations.from(t,function(n){return n.diagnostics})]}}),vlt=_n.mark({class:"cm-lintRange cm-lintRange-active"});function ylt(t,n,e){var i=t.state.field(jl).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=vme(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=_e(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=T0(this.view.state.field(jl).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:pme.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function AT(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function d4(t){return AT(''),'width="6" height="3"')}var xlt=Yt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:d4("#d11")},".cm-lintRange-warning":{backgroundImage:d4("orange")},".cm-lintRange-info":{backgroundImage:d4("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Clt=function(t){We(e,fd);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return de(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(ET).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,g,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:h4.of({pos:f.from,above:!1,create:function(){return{dom:gme(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,g=l,window.addEventListener("mousemove",function v(y){var b=g.getBoundingClientRect();if(!(y.clientX>b.left-10&&y.clientXb.top-10&&y.clientY')},".cm-lint-marker-warning":{content:AT('')},".cm-lint-marker-error":{content:AT('')}}),ET=Zt.define({combine:function(t){return uc(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function Dlt(){return[ET.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),wme,klt,Tlt,xme]}var Cme,Alt=function(){return[fst(),gst,Hot(),vat(),zst(),jot(),[fb,Fot],Mr.allowMultipleSelections.of(!0),Mr.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=_e(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var g=OL(c,p.from);if(null!=g){var m=/^\s*/.exec(p.text)[0],v=wb(c,g);m!=v&&d.push({from:p.from,to:p.from+m.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),Wpe(Yst,{fallback:!0}),tat(),[clt,sme],plt(),Jot(),Qot(),qot,(n=[Fat,Lat],n),Bk.of([].concat(ult,sn(Oat),qat,kat,Vst,dme,_lt))];var n}(),Elt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;ue(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return de(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%3==0}).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Mlt(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new Sme(r,r.start):null,0,null)}}]),t}(),Sme=de(function t(n,e){ue(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Cme||(Cme={}));var Mlt=function(){function t(n){ue(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return de(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),Olt=function(){function t(n,e,i){ue(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return de(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),MT=de(function t(){ue(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),kme=new MT,Ilt=function(){function t(n,e){ue(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=kme,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return de(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=kme,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=_e(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),OT=function(){function t(n,e){ue(this,t),this.data=n,this.id=e}return de(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,g=0,m=i[a+2];if(!(r.next<0&&m>g&&65535==i[d+3*m-3])){for(;g>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}g=v+1}}break}a=i[d+3*m-1]}}(this.data,n,e,this.id)}}]),t}();function IT(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}OT.prototype.contextual=OT.prototype.fallback=OT.prototype.extend=!1;var Tme,lu=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),f4=null;function Dme(t,n,e){var i=t.cursor(zs.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Tme||(Tme={}));var Ame,Nlt=function(){function t(n,e){ue(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return de(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?Dme(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?Dme(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Gs){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),jlt=function(){function t(n,e){ue(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new MT})}return de(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new MT).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new MT,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Nlt(i,n.nodeSet):null}return de(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,b=null,C=_e(v);try{for(C.s();!(y=C.n()).done;){var k=y.value,T=k.p.stoppedAt;(k.pos==k.p.stream.end||null!=T&&k.pos>T)&&k.p.parser.stateFlag(k.state,2)&&(!b||b.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&g.buffer.length>500){if(!((f.score-g.score||f.buffer.length-g.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var m=1;m ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(vi.contextHash)||0)==l))return n.useNode(c,u),lu&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Gs)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Gs&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),lu&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(b):i.push(b)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return Eme(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),lu&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(lu&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)lu&&(h=this.stackID(d)+" -> ");var p,g=_e(a.recoverByInsert(l));try{for(g.s();!(p=g.n()).done;){var m=p.value;lu&&console.log(u+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,i)}}catch(v){g.e(v)}finally{g.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),lu&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),Eme(a,i)):(!r||r.score=0)d(v,g,p[m++]);else{for(var y=p[m+-v],b=-v;b>0;b--)d(p[m++],g,y);m++}}}}catch(T){f.e(T)}finally{f.f()}}o.nodeSet=new yst(s.map(function(T,j){return dc.define({name:j>=o.minRepeatTerm?void 0:T,id:j,props:c[j],top:l.indexOf(j)>-1,error:0==j,skipped:i.skippedNodes&&i.skippedNodes.indexOf(j)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,sn(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=IT(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var k=0;k2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=gh(this.data,o+2)}if(r==gh(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=gh(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=Mme(this.data,this.tokenPrecTable,r);return o<0||Mme(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=_e(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&jme(t);return{c:function(){n=oe("div"),r&&r.c(),e=Me(),o&&o.c(),i=Me(),s&&s.c(),I(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){ve(a,n,l),r&&r.m(n,null),ee(n,e),o&&o.m(n,null),ee(n,i),s&&s.m(n,null)},p:function(a,l){var c=Wt(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=Ime(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=Nme(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=jme(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:tt,o:tt,d:function(a){a&&me(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Ult(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,g,m;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(g=p.selection)||void 0===g||null===(m=g.ranges)||void 0===m?void 0:m.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var zlt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Ult,Hlt,po,{editorState:3},Vlt),r}return de(e)}(),p4=NL.define([{tag:yt.propertyName,color:"var(--jse-key-color)"},{tag:yt.number,color:"var(--jse-value-color-number)"},{tag:yt.bool,color:"var(--jse-value-color-boolean)"},{tag:yt.string,color:"var(--jse-value-color-string)"},{tag:yt.keyword,color:"var(--jse-value-color-null)"}]),Glt=Wpe(p4),Wlt=p4.style;function g4(t){return t.doc.lineAt(t.selection.main.head)}function Pme(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=Pme(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=Pme(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=g4(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,g=_e(d.visibleRanges);try{for(g.s();!(h=g.n()).done;)for(var m=h.value,y=m.to,b=m.from;b<=y;){var C=f.doc.lineAt(b);p.has(C)||p.add(C),b=C.to+1}}catch(k){g.e(k)}finally{g.f()}return p}(this.view,n),o=new qlt(r,n,this.unitWidth),s=n.facet(NT).hideFirstIndent,a=_e(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=Jlt(c,this.unitWidth,s);i.add(l.from,l.from,_n.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Xlt(){return[NT.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ylt,ks.fromClass(Klt,{decorations:function(n){return n.decorations}})]}function Qlt(t){gn(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function m4(t){var n=t.slice();return n[93]=0===n[10].length,n}function Rme(t){var n,e;return n=new wrt({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Zlt(t){var n;return{c:function(){(n=oe("div")).innerHTML='
    \n
    loading...
    ',I(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function ect(t){var n,e,i,r,o,s=t[92]&&Lme(t),a=!t[92]&&Fme(t);return{c:function(){n=oe("div"),e=Me(),s&&s.c(),i=Me(),a&&a.c(),r=Ci(),I(n,"class","jse-contents svelte-1yqirn0"),Xe(n,"jse-hidden",t[92])},m:function(l,c){ve(l,n,c),t[50](n),ve(l,e,c),s&&s.m(l,c),ve(l,i,c),a&&a.m(l,c),ve(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&Xe(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&W(s,1)):((s=Lme(l)).c(),W(s,1),s.m(i.parentNode,i)):s&&(it(),Q(s,1,1,function(){s=null}),rt()),l[92]?a&&(it(),Q(a,1,1,function(){a=null}),rt()):a?(a.p(l,c),1152&c[0]&&W(a,1)):((a=Fme(l)).c(),W(a,1),a.m(r.parentNode,r))},i:function(l){o||(W(s),W(a),o=!0)},o:function(l){Q(s),Q(a),o=!1},d:function(l){l&&me(n),t[50](null),l&&me(e),s&&s.d(l),l&&me(i),a&&a.d(l),l&&me(r)}}}function Lme(t){var n,e,i,r,o,s=rd(t[10]||"",2e4)+"";return n=new tu({props:{icon:pg,type:"error",message:"The JSON document is larger than ".concat(vk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(vk(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){$e(n.$$.fragment),e=Me(),i=oe("div"),r=ut(s),I(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){Le(n,a,l),ve(a,e,l),ve(a,i,l),ee(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(vk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(vk(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=rd(a[10]||"",2e4)+"")&&Jt(r,s)},i:function(a){o||(W(n.$$.fragment,a),o=!0)},o:function(a){Q(n.$$.fragment,a),o=!1},d:function(a){Fe(n,a),a&&me(e),a&&me(i)}}}function Fme(t){var n,e,i,r,o,s=!t[13]&&t[8]&&$ae(t[10]),a=t[2]&&$me(t),l=t[13]&&Bme(t),c=s&&Vme(t);return r=new tR({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=Me(),l&&l.c(),e=Me(),c&&c.c(),i=Me(),$e(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),ve(u,n,d),l&&l.m(u,d),ve(u,e,d),c&&c.m(u,d),ve(u,i,d),Le(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&W(a,1)):((a=$me(u)).c(),W(a,1),a.m(n.parentNode,n)):a&&(it(),Q(a,1,1,function(){a=null}),rt()),u[13]?l?(l.p(u,d),8192&d[0]&&W(l,1)):((l=Bme(u)).c(),W(l,1),l.m(e.parentNode,e)):l&&(it(),Q(l,1,1,function(){l=null}),rt()),9472&d[0]&&(s=!u[13]&&u[8]&&$ae(u[10])),s?c?(c.p(u,d),9472&d[0]&&W(c,1)):((c=Vme(u)).c(),W(c,1),c.m(i.parentNode,i)):c&&(it(),Q(c,1,1,function(){c=null}),rt());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(W(a),W(l),W(c),W(r.$$.fragment,u),o=!0)},o:function(u){Q(a),Q(l),Q(c),Q(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&me(n),l&&l.d(u),u&&me(e),c&&c.d(u),u&&me(i),Fe(r,u)}}}function $me(t){var n,e;return n=new zlt({props:{editorState:t[6]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Bme(t){var n,e;return n=new tu({props:{type:"error",icon:pg,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Vme(t){var n,e;return n=new tu({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:lR,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:Qv,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:lR,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:Qv,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function tct(t){var n,e,i,r,o,s=t[1]&&Rme(m4(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[ect,Zlt][i](c(t,i)),{c:function(){n=oe("div"),s&&s.c(),e=Me(),r.c(),I(n,"class","jse-text-mode svelte-1yqirn0"),Xe(n,"no-main-menu",!t[1])},m:function(u,d){ve(u,n,d),s&&s.m(n,null),ee(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(m4(u),d),2&d[0]&&W(s,1)):((s=Rme(m4(u))).c(),W(s,1),s.m(n,e)):s&&(it(),Q(s,1,1,function(){s=null}),rt()),r.p(c(u,i),d),(!o||2&d[0])&&Xe(n,"no-main-menu",!u[1])},i:function(u){o||(W(s),W(r),o=!0)},o:function(u){Q(s),Q(r),o=!1},d:function(u){u&&me(n),s&&s.d(),l[i].d(),t[52](null)}}}function Hme(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function nct(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,g=n.escapeUnicodeCharacters,m=n.parser,v=n.validator,y=n.validationParser,b=n.onChange,C=n.onChangeMode,k=n.onError,T=n.onFocus,j=n.onBlur,B=n.onRenderMenu,N=n.onSortModal,$=n.onTransformModal,V=Cs("jsoneditor:TextMode"),z={key:"Mod-i",run:K,shift:pe,preventDefault:!0},Y=typeof window>"u";V("isSSR:",Y);var O=!1,H=!0,G=[],F=new Af,Z=new Af,D=new Af,E=new Af,M=new Af,U=new Af,L=h,X=zS(L,f,m),ne=g;Kl(ni(bt().mark(function Be(){return bt().wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(!Y){jt.next=2;break}return jt.abrupt("return");case 2:try{s=zt({target:o,initialText:Ir(X,O)?"":i.escapeValue(X),readOnly:c,indentation:f})}catch(an){console.error(an)}case 3:case"end":return jt.stop()}},Be)}))),Vc(function(){s&&(V("Destroy CodeMirror editor"),s.destroy())});var ge=!1,ae=!1,De=mf(),be=mf();function Ie(){s&&(V("focus"),s.focus())}var R=!1;function J(Be){V("patch",Be);var jt=m.parse(X),an=Yc(jt,Be),wn=ote(jt,Be);return pi({text:m.stringify(an,null,f)}),{json:an,previousJson:jt,undo:wn,redo:Be}}function K(){if(V("format"),c)return!1;try{var Be=m.parse(X);return pi({text:m.stringify(Be,null,f)}),e(8,H=!0),!0}catch(jt){k(jt)}return!1}function pe(){if(V("compact"),c)return!1;try{var Be=m.parse(X);return pi({text:m.stringify(Be)}),e(8,H=!1),!0}catch(jt){k(jt)}return!1}function Te(){if(V("repair"),!c)try{pi({text:Yu(X)}),e(49,Nt="valid"),e(13,Ge=null)}catch(Be){k(Be)}}function ye(Be){var jt=Be.id,an=Be.rootPath,wn=Be.onTransform,Mi=Be.onClose;try{var Ui=m.parse(X);R=!0,$({id:jt||be,json:Ui,rootPath:an||[],onTransform:function(nr){wn?wn({operations:nr,json:Ui,transformedJson:Yc(Ui,nr)}):(V("onTransform",nr),J(nr))},onClose:function(){R=!1,Ie(),Mi&&Mi()}})}catch(nr){k(nr)}}function Ue(Be,jt){V("setSelection",{anchor:Be,head:jt}),s&&s.dispatch(s.state.update({selection:{anchor:Be,head:jt},scrollIntoView:!0}))}function Je(Be,jt){if(1===jt.state.selection.ranges.length){var an=jt.state.selection.ranges[0],wn=X.slice(an.from,an.to);if("{"===wn||"["===wn){var Mi=G2.parse(X),Ui=Object.keys(Mi.pointers).find(function(Go){var _i;return(null===(_i=Mi.pointers[Go].value)||void 0===_i?void 0:_i.pos)===an.from}),nr=Mi.pointers[Ui];Ui&&nr&&nr.value&&nr.valueEnd&&(V("pointer found, selecting inner contents of path:",Ui,nr),Ue(nr.value.pos+1,nr.valueEnd.pos-1))}}}function _t(){return function(Be){return Dg.of({source:Be,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(cn,{delay:300})}function zt(Be){var jt=Be.target,an=Be.initialText,wn=Be.readOnly,Mi=Be.indentation;V("Create CodeMirror editor",{readOnly:wn,indentation:Mi});var Ui=Mr.create({doc:an,extensions:[Bk.of([Iat,z]),F.of(_t()),Dlt(),Alt,Glt,Xlt({hideFirstIndent:!0}),Yt.domEventHandlers({dblclick:Je}),Yt.updateListener.of(function(nr){e(6,l=nr.state),nr.docChanged&&bn()}),new jst(Blt),$at({top:!0}),D.of(Mr.readOnly.of(wn)),Z.of(Yt.editable.of(!wn)),M.of(Mr.tabSize.of(p)),E.of(ci(Mi)),U.of(Yt.theme({},{dark:ct()})),Yt.lineWrapping]});return s=new Yt({state:Ui,parent:jt})}function ct(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Nn(Be){var jt=Be.path,an=Be.message,wn=function(Mi,Ui){try{var nr=G2.parse(Mi),Go=gt(Ui),_i=nr.pointers[Go];if(_i)return{path:Ui,line:_i.key?_i.key.line:_i.value?_i.value.line:0,column:_i.key?_i.key.column:_i.value?_i.value.column:0,from:_i.key?_i.key.pos:_i.value?_i.value.pos:0,to:_i.keyEnd?_i.keyEnd.pos:_i.valueEnd?_i.valueEnd.pos:0}}catch(Wo){console.error(Wo)}return null}(i.escapeValue(X),jt);return{path:jt,line:wn.line,column:wn.column,from:wn.from,to:wn.to,message:an,severity:qu.warning,actions:[]}}function mt(Be,jt){var Mi=Be.position;return{path:[],line:Be.line,column:Be.column,from:Mi,to:Mi,severity:qu.error,message:Be.message,actions:jt&&!c?[{name:"Auto repair",apply:function(){return Te()}}]:null}}function pi(Be){var jt=arguments.length>1&&void 0!==arguments[1]&&arguments[1],an=zS(Be,f,m),wn=!ai(Be,L),Mi=L;L=Be,e(10,X=an),V("setCodeMirrorContent",{isChanged:wn,forceUpdate:jt}),s&&(wn||jt)&&(Ir(X,O)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(X)}}),yi(),wn&&Hi(L,Mi))}function ki(){if(s){var Be=s?i.unescapeValue(s.state.doc.toString()):"",jt=Be!==X;if(V("onChangeCodeMirrorValue",{isChanged:jt}),jt){var an=L;e(10,X=Be),L={text:X},yi(),Hi(L,an)}}}function ci(Be){return nT.of("number"==typeof Be?" ".repeat(Be):Be)}function yi(){e(11,ge=bat(s.state)>0),e(12,ae=wat(s.state)>0),V({canUndo:ge,canRedo:ae})}eR({onMount:Kl,onDestroy:Vc,getWindow:function(){return $v(a)},hasFocus:function(){return R&&document.hasFocus()||WS(a)},onFocus:T,onBlur:j});var bn=Ov(ki,300);function Hi(Be,jt){b&&b(Be,jt,{contentErrors:Pn(),patchResult:null})}function Ir(Be,jt){return!!Be&&Be.length>10485760&&!jt}var Nt="valid",Ge=null;function cn(){if(Ir(X,O))return[];var Be=Pn();return Zce(Be)?[Hme(mt(Be.parseError,Be.isRepairable))]:function ott(t){return Ar(t)&&Array.isArray(t.validationErrors)}(Be)?Be.validationErrors.map(Nn).map(Hme):[]}function Pn(){V("validate:start"),bn.flush();var Be=Ti(i.escapeValue(X),v,m,y);return Zce(Be)?(e(49,Nt=Be.isRepairable?"repairable":"invalid"),e(13,Ge=Be.parseError),e(9,G=[])):(e(49,Nt="valid"),e(13,Ge=null),e(9,G=Be?.validationErrors||[])),V("validate:end"),Be}var Ti=J_(Uet);function vr(){Ge&&function(Be){V("select parse error",Be);var jt=mt(Be,!1);Ue(jt.from,jt.to),Ie()}(Ge)}var qr={icon:AZe,text:"Show me",title:"Move to the parse error location",onClick:vr};return t.$$set=function(Be){"readOnly"in Be&&e(0,c=Be.readOnly),"mainMenuBar"in Be&&e(1,u=Be.mainMenuBar),"statusBar"in Be&&e(2,d=Be.statusBar),"externalContent"in Be&&e(29,h=Be.externalContent),"indentation"in Be&&e(30,f=Be.indentation),"tabSize"in Be&&e(31,p=Be.tabSize),"escapeUnicodeCharacters"in Be&&e(32,g=Be.escapeUnicodeCharacters),"parser"in Be&&e(33,m=Be.parser),"validator"in Be&&e(34,v=Be.validator),"validationParser"in Be&&e(35,y=Be.validationParser),"onChange"in Be&&e(36,b=Be.onChange),"onChangeMode"in Be&&e(37,C=Be.onChangeMode),"onError"in Be&&e(38,k=Be.onError),"onFocus"in Be&&e(39,T=Be.onFocus),"onBlur"in Be&&e(40,j=Be.onBlur),"onRenderMenu"in Be&&e(3,B=Be.onRenderMenu),"onSortModal"in Be&&e(41,N=Be.onSortModal),"onTransformModal"in Be&&e(42,$=Be.onTransformModal)},t.$$.update=function(){var Be;2&t.$$.dirty[1]&&(i=bP({escapeControlCharacters:!1,escapeUnicodeCharacters:g})),536870912&t.$$.dirty[0]&&pi(h),8&t.$$.dirty[1]&&(V("updateLinter",v),s&&s.dispatch({effects:F.reconfigure(_t())})),1073741824&t.$$.dirty[0]&&(Be=f,s&&(V("updateIndentation",Be),s.dispatch({effects:E.reconfigure(ci(Be))}))),1&t.$$.dirty[1]&&function(Be){s&&(V("updateTabSize",Be),s.dispatch({effects:M.reconfigure(Mr.tabSize.of(Be))}))}(p),1&t.$$.dirty[0]&&function(Be){s&&(V("updateReadOnly",Be),s.dispatch({effects:[D.reconfigure(Mr.readOnly.of(Be)),Z.reconfigure(Yt.editable.of(!Be))]}))}(c),131074&t.$$.dirty[1]&&ne!==g&&(e(48,ne=g),V("forceUpdateText",{escapeUnicodeCharacters:g}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(X)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==Nt||c?[qr]:[{icon:ek,text:"Auto repair",title:"Automatically repair JSON",onClick:Te},qr])},[c,u,d,B,o,a,l,O,H,G,X,ge,ae,Ge,r,Y,K,pe,function(){var Be;if(!c)try{var jt=m.parse(X);R=!0,N({id:De,json:jt,rootPath:[],onSort:(Be=ni(bt().mark(function an(wn){var Mi;return bt().wrap(function(Ui){for(;;)switch(Ui.prev=Ui.next){case 0:V("onSort",Mi=wn.operations),J(Mi);case 3:case"end":return Ui.stop()}},an)})),function(an){return Be.apply(this,arguments)}),onClose:function(){R=!1,Ie()}})}catch(an){k(an)}},function(){c||ye({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?i4(s):n4(s))},function(){c||s&&(zL(s),Ie())},function(){c||s&&(lT(s),Ie())},function(){e(7,O=!0),pi(h,!0)},function(){C(Fr.tree)},function(){ki()},function(Be){V("select validation error",Be);var jt=Nn(Be);Ue(jt.from,jt.to),Ie()},Ir,vr,h,f,p,g,m,v,y,b,C,k,T,j,N,$,Ie,J,ye,function(){V("refresh"),Ya().then(function(){if(s){var Be=ct();V("updateTheme",{dark:Be}),s.dispatch({effects:[U.reconfigure(Yt.theme({},{dark:Be}))]})}})},Pn,ne,Nt,function(Be){qn[Be?"unshift":"push"](function(){e(4,o=Be)})},function(){return e(8,H=!1)},function(Be){qn[Be?"unshift":"push"](function(){e(5,a=Be)})}]}var ict=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,nct,tct,In,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Qlt,[-1,-1,-1,-1]),r}return de(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function rct(t){var n,e;return n=new fk({props:{items:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&Wt(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function oct(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:nk,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:ZS,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:Wle,title:pN,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:UP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:HP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var sct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,oct,rct,In,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return de(e)}();function Ume(t,n,e){var i=t.slice();return i[9]=n[e],i}function zme(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[m],b=Qn(v);b.length>0&&!Ql(g,b);)y.unshift({op:"add",path:gt(b),value:{}}),b=Qn(b);return y}}return m})),f);var p,g}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Zn(c)&&_f(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var cct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,lct,act,In,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return de(e)}();function uct(t){gn(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function dct(t){var n,e,i,r,o=rd(t[2].stringify(t[1]),50)+"";return{c:function(){n=oe("button"),e=ut(o),I(n,"type","button"),I(n,"class","jse-inline-value svelte-l28mqd"),Xe(n,"jse-selected",t[3])},m:function(s,a){ve(s,n,a),ee(n,e),i||(r=Ze(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=Wt(a,1)[0];6&l&&o!==(o=rd(s[2].stringify(s[1]),50)+"")&&Jt(e,o),8&l&&Xe(n,"jse-selected",s[3])},i:tt,o:tt,d:function(s){s&&me(n),i=!1,r()}}}function hct(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=er(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var fct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,hct,dct,In,{path:0,value:1,parser:2,isSelected:3,onEdit:4},uct),r}return de(e)}();function pct(t){gn(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function Gme(t){var n,e,i,r;return e=new li({props:{data:t[1]===Xl.asc?lc:Gle}}),{c:function(){n=oe("span"),$e(e.$$.fragment),I(n,"class","jse-column-sort-icon svelte-h4fort"),I(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){ve(o,n,s),Le(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===Xl.asc?lc:Gle),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&I(n,"title",i)},i:function(o){r||(W(e.$$.fragment,o),r=!0)},o:function(o){Q(e.$$.fragment,o),r=!1},d:function(o){o&&me(n),Fe(e)}}}function gct(t){var n,e,i,r,o,s,a,l,c=rd(t[3],50)+"",u=void 0!==t[1]&&Gme(t);return{c:function(){n=oe("button"),e=oe("span"),i=ut(c),r=Me(),u&&u.c(),I(e,"class","jse-column-name"),I(n,"type","button"),I(n,"class","jse-column-header svelte-h4fort"),I(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),Xe(n,"jse-readonly",t[0])},m:function(d,h){ve(d,n,h),ee(n,e),ee(e,i),ee(n,r),u&&u.m(n,null),s=!0,a||(l=Ze(n,"click",t[4]),a=!0)},p:function(d,h){var f=Wt(h,1)[0];(!s||8&f)&&c!==(c=rd(d[3],50)+"")&&Jt(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&W(u,1)):((u=Gme(d)).c(),W(u,1),u.m(n,null)):u&&(it(),Q(u,1,1,function(){u=null}),rt()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&I(n,"title",o),(!s||1&f)&&Xe(n,"jse-readonly",d[0])},i:function(d){s||(W(u),s=!0)},o:function(d){Q(u),s=!1},d:function(d){d&&me(n),u&&u.d(),a=!1,l()}}}function mct(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Yn(s)?"values":oc(Xa(s))),96&t.$$.dirty&&e(1,r=ai(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=JWe[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===Xl.asc?Xl.desc:Xl.asc})},s,a,c]}var jT,PT,vct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,mct,gct,In,{path:5,sortedColumn:6,readOnly:0,onSort:7},pct),r}return de(e)}();function Wme(t,n){return jT||(PT=new WeakMap,jT=new ResizeObserver(function(e){var i,r=_e(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=PT.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),PT.set(t,n),jT.observe(t),{destroy:function(){PT.delete(t),jT.unobserve(t)}}}function yct(t){var n,e;return n=new Cue({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function _ct(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,g=n.documentState,m=n.parser,v=n.showTip,y=n.onCloseContextMenu,b=n.onEditValue,C=n.onEditRow,k=n.onToggleEnforceString,T=n.onCut,j=n.onCopy,B=n.onPaste,N=n.onRemove,$=n.onDuplicateRow,V=n.onInsertBeforeRow,z=n.onInsertAfterRow,Y=n.onRemoveRow;function O(){y(),b()}function H(){y(),C()}function G(){y(),k()}function F(){y(),T(!0)}function Z(){y(),T(!1)}function D(){y(),j(!0)}function E(){y(),j(!1)}function M(){y(),B()}function U(){y(),N()}function L(){y(),$()}function X(){y(),V()}function ne(){y(),z()}function ge(){y(),Y()}return t.$$set=function(ae){"json"in ae&&e(2,p=ae.json),"documentState"in ae&&e(3,g=ae.documentState),"parser"in ae&&e(4,m=ae.parser),"showTip"in ae&&e(0,v=ae.showTip),"onCloseContextMenu"in ae&&e(5,y=ae.onCloseContextMenu),"onEditValue"in ae&&e(6,b=ae.onEditValue),"onEditRow"in ae&&e(7,C=ae.onEditRow),"onToggleEnforceString"in ae&&e(8,k=ae.onToggleEnforceString),"onCut"in ae&&e(9,T=ae.onCut),"onCopy"in ae&&e(10,j=ae.onCopy),"onPaste"in ae&&e(11,B=ae.onPaste),"onRemove"in ae&&e(12,N=ae.onRemove),"onDuplicateRow"in ae&&e(13,$=ae.onDuplicateRow),"onInsertBeforeRow"in ae&&e(14,V=ae.onInsertBeforeRow),"onInsertAfterRow"in ae&&e(15,z=ae.onInsertAfterRow),"onRemoveRow"in ae&&e(16,Y=ae.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=g.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Yn(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Dt(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Pi(i)||vo(i)||Zn(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Pi(i)||Zn(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&$_(i)&&!s&&Array.isArray(Dt(p,Qn(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&$_(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!$r(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&hg(i)&&Ar(a),29491200&t.$$.dirty[0]&&d&&hg(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&hg(i)&&$r(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&dh(a,g.enforceStringMap,gt(i.focusPath),m)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:O,icon:Kv,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:Kv,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:O,disabled:!c},{type:"button",icon:h?P_:R_,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:G,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:F,icon:Jv,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:Jv,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:F,disabled:!l},{type:"button",icon:Jv,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:Z,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:D,icon:xf,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:xf,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:D,disabled:!l},{type:"button",icon:xf,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:E,disabled:!l}]},{type:"button",onClick:M,icon:Hle,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:U,icon:VP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:H,icon:Kv,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:L,icon:Jle,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:X,icon:Xv,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:ne,icon:Xv,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:ge,icon:VP,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,g,m,y,b,C,k,T,j,B,N,$,V,z,Y,o,l,u,h,c,i,a,d,r,s]}var bct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,_ct,yct,In,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return de(e)}();function wct(t){gn(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function qme(t,n,e){var i=t.slice();i[12]=n[e];var r=Dt(i[0],i[12]).length;return i[13]=r,i}function xct(t){var n,e;return{c:function(){n=ut(t[5]),e=ut(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){ve(i,n,r),ve(i,e,r)},p:function(i,r){32&r&&Jt(n,i[5])},d:function(i){i&&me(n),i&&me(e)}}}function Cct(t){var n;return{c:function(){n=ut("An object cannot be opened in table mode. You can open a nested array instead, or open the\n document in tree mode.")},m:function(e,i){ve(e,n,i)},p:tt,d:function(e){e&&me(n)}}}function Yme(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=oc(Xa(t[12]))+"",g=t[13]+"",m=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=oe("button"),e=ut(t[6]),i=ut(' "'),r=ut(p),o=ut('"\n '),s=oe("span"),a=ut("("),l=ut(g),c=Me(),u=ut(m),d=ut(")"),I(s,"class","jse-nested-array-count svelte-1te5h1h"),I(n,"type","button"),I(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,b){ve(y,n,b),ee(n,e),ee(n,i),ee(n,r),ee(n,o),ee(n,s),ee(s,a),ee(s,l),ee(s,c),ee(s,u),ee(s,d),h||(f=Ze(n,"click",v),h=!0)},p:function(y,b){t=y,64&b&&Jt(e,t[6]),8&b&&p!==(p=oc(Xa(t[12]))+"")&&Jt(r,p),9&b&&g!==(g=t[13]+"")&&Jt(l,g),9&b&&m!==(m=1!==t[13]?"items":"item")&&Jt(u,m)},d:function(y){y&&me(n),h=!1,f()}}}function Sct(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v;function y(B,N){return B[4]?Cct:xct}for(var b=y(t),C=b(t),k=t[3],T=[],j=0;j1&&void 0!==arguments[1]?arguments[1]:2,g=[];return function m(v,y){Dr(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Yn(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Dr(l)?"An object":er(l)?"An empty array":"A ".concat(jN(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Fr.tree)}]}var Tct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,kct,Sct,In,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},wct),r}return de(e)}();function Dct(t){gn(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function Act(t){var n,e,i,r,o,s;return e=new li({props:{data:jZe}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-column-header svelte-h4fort"),I(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){ve(a,n,l),Le(e,n,null),r=!0,o||(s=Ze(n,"click",t[3]),o=!0)},p:function(a,l){var c=Wt(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&I(n,"title",i)},i:function(a){r||(W(e.$$.fragment,a),r=!0)},o:function(a){Q(e.$$.fragment,a),r=!1},d:function(a){a&&me(n),Fe(e),o=!1,s()}}}function Ect(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Mct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Ect,Act,In,{count:0,maxSampleCount:1,onRefresh:2},Dct),r}return de(e)}();function Oct(t){gn(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function Jme(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Kme(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Dt(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function Xme(t,n,e){var i=t.slice();return i[125]=n[e],i}function Qme(t){var n,e;return n=new sct({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Ict(t){var n;return{c:function(){(n=oe("div")).innerHTML='
    \n
    loading...
    ',I(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function Nct(t){var n,e,i,r,o,s,a,l,c,u=[Rct,Pct,jct],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=oe("label"),e=oe("input"),i=Me(),o.c(),s=Ci(),I(e,"type","text"),e.readOnly="readonly",I(e,"tabindex","-1"),I(e,"class","jse-hidden-input svelte-hs49xj"),I(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){ve(f,n,p),ee(n,e),t[71](e),ve(f,i,p),d[r].m(f,p),ve(f,s,p),a=!0,l||(c=Ze(e,"paste",t[37]),l=!0)},p:function(f,p){var g=r;(r=h(f))===g?d[r].p(f,p):(it(),Q(d[g],1,1,function(){d[g]=null}),rt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),W(o,1),o.m(s.parentNode,s))},i:function(f){a||(W(o),a=!0)},o:function(f){Q(o),a=!1},d:function(f){f&&me(n),t[71](null),f&&me(i),d[r].d(f),f&&me(s),l=!1,c()}}}function jct(t){var n,e;return n=new Tct({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Pct(t){var n,e,i,r;return n=new tu({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:wf,text:"Repair manually",onClick:t[35]}]}}),i=new Ade({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){$e(n.$$.fragment),e=Me(),$e(i.$$.fragment)},m:function(o,s){Le(n,o,s),ve(o,e,s),Le(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:wf,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(W(n.$$.fragment,o),W(i.$$.fragment,o),r=!0)},o:function(o){Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!1},d:function(o){Fe(n,o),o&&me(e),Fe(i,o)}}}function Rct(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N=!Yn(null===(n=t[21])||void 0===n?void 0:n.root),$=N&&Zme(t),V=t[9],z=[],Y=0;Y"u";a("isSSR:",g);var m,v,y,b,C,k,T=n.readOnly,j=n.externalContent,B=n.mainMenuBar,N=n.escapeControlCharacters,$=n.escapeUnicodeCharacters,V=n.flattenColumns,z=n.parser,Y=n.parseMemoizeOne,O=n.validator,H=n.validationParser,G=n.indentation,F=n.onChange,Z=n.onChangeMode,D=n.onRenderValue,E=n.onRenderMenu,M=n.onFocus,U=n.onBlur,L=n.onSortModal,X=n.onTransformModal,ne=n.onJSONEditorModal;eR({onMount:Kl,onDestroy:Vc,getWindow:function(){return $v(v)},hasFocus:function(){return Ie&&document.hasFocus()||WS(v)},onFocus:function(){M&&M()},onBlur:function(){U&&U()}});var ge,ae=void 0,De=1e4,be=[],Ie=!1,R={},J=600,K=0;function pe(he){a("updateSelection",he);var Ye="function"==typeof he?he(ye.selection):he;ai(Ye,ye.selection)||e(10,ye=Ee(Ee({},ye),{},{selection:Ye}))}function Te(he){void 0!==ye.selection&&void 0!==he&&(ye.selection&&Ql(he,ye.selection.anchorPath)&&Ql(he,ye.selection.focusPath)||(a("clearing selection: path does not exist anymore",ye.selection),e(10,ye=Ee(Ee({},ye),{},{selection:zv(he,ye)}))))}var Je,ye=YS(),Ue=!1,_t=Bce({onChange:function(he){e(19,zt=he)}}),zt=_t.getState();function Nn(he){var Ye=he.previousJson,ot=he.previousState,ht=he.previousText,vt=he.previousTextIsRepaired;void 0===Ye&&void 0===ht||(void 0!==C?_t.add(void 0!==Ye?{undo:{patch:[{op:"replace",path:"",value:Ye}],state:sa(ot),json:void 0,text:ht,textIsRepaired:vt},redo:{patch:[{op:"replace",path:"",value:C}],state:sa(ye),json:void 0,text:k,textIsRepaired:Ue}}:{undo:{patch:void 0,json:void 0,text:ht,state:sa(ot),textIsRepaired:vt},redo:{patch:void 0,json:C,state:sa(ye),text:k,textIsRepaired:Ue}}):void 0!==Ye&&_t.add({undo:{patch:void 0,json:Ye,state:sa(ot),text:ht,textIsRepaired:vt},redo:{patch:void 0,json:void 0,text:k,textIsRepaired:Ue,state:sa(ye)}}))}var mt=[],pi=J_(Vce);function ki(he,Ye,ot,ht){e0(function(){var vt;try{vt=pi(he,Ye,ot,ht)}catch(on){vt=[{path:[],message:"Failed to validate: "+on.message,severity:qu.warning}]}ai(vt,mt)||(a("validationErrors changed:",vt),e(11,mt=vt))},function(vt){return a("validationErrors updated in ".concat(vt," ms"))})}function ci(){return a("validate"),ae?{parseError:ae,isRepairable:!1}:(ki(C,O,z,H),Yn(mt)?null:{validationErrors:mt})}function yi(he,Ye){if(a("patch",he,Ye),void 0===C)throw new Error("Cannot apply patch: no JSON");var ot={json:C},ht=C,vt=ye,on=Ue,Rn=Ile(C,he),Vt=hle(C,ye,he).json,tn=function $it(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=cc(qc(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return ai(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Ee(Ee({},t),{},{sortedColumn:void 0}):t}(ye,he,be),Xt="function"==typeof Ye?Ye(Vt,tn):void 0;e(7,C=Xt&&void 0!==Xt.json?Xt.json:Vt);var wi=Xt&&void 0!==Xt.state?Xt.state:tn;e(10,ye=wi),e(15,k=void 0),e(18,Ue=!1),e(17,ge=void 0),_t.add({undo:{patch:Rn,json:void 0,text:void 0,state:sa(vt),textIsRepaired:on},redo:{patch:he,json:void 0,state:sa(wi),text:void 0,textIsRepaired:Ue}});var Oi={json:C,previousJson:ht,undo:Rn,redo:he};return Hi(ot,Oi),Oi}function bn(he,Ye){if(!T)return yi(he,Ye)}function Hi(he,Ye){(void 0!==he.json||void 0!==he?.text)&&(void 0!==k?F({text:k,json:void 0},he,{contentErrors:ci(),patchResult:Ye}):void 0!==C&&F({text:void 0,json:C},he,{contentErrors:ci(),patchResult:Ye}))}function Ir(he){a("handleFind",he)}function Nt(he){a("pasted json as text",he),e(17,ge=he)}function Ge(he){var Ye=parseInt(he[0]),ot=[String(Ye+1)].concat(sn(he.slice(1)));return Ql(C,ot)?mi(ot,!1):mi(he,!1)}function cn(){b&&(b.focus(),b.select())}function Pn(){ye.selection||pe(function(){if(er(C)&&!Yn(C)&&!Yn(be))return mi(["0"].concat(sn(be[0])),!1)}())}function Ti(he){var Ye=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ot=hR(he,be,R,18),ht=ot-K,vt=Be(he);a("scrollTo",{path:he,top:ot,scrollTop:K,elem:vt});var on=y.getBoundingClientRect();if(vt&&!Ye){var Rn=vt.getBoundingClientRect();if(Rn.bottom>on.top&&Rn.topot.right&&e(13,y.scrollLeft+=ht.right-ot.right,y),ht.left(Vt=K+on.height-18)&&e(13,y.scrollTop+=vt-Vt,y),ht0&&void 0!==ot[0])||ot[0],void 0!==C){ht.next=3;break}return ht.abrupt("return");case 3:return ht.next=5,Sde({json:C,documentState:ye,indentation:Ye?G:void 0,parser:z});case 5:case"end":return ht.stop()}},he)})),Js.apply(this,arguments)}function Pl(){Tde({json:C,text:k,documentState:ye,keepSelection:!0,readOnly:T,onChange:F,onPatch:bn})}function le(){!function Bit(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&qv(e.selection)){var s=cc(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;Da("duplicate row",{rowIndex:a});var c=[String(a)];o(Ele(n,[c]),function(u,d){var h=mi(yg({rowIndex:a0?a-1:void 0,h=void 0!==d?mi(yg({rowIndex:d,columnIndex:l},i),!1):void 0;return Da("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Ee(Ee({},u),{},{selection:h})}})}}({json:C,documentState:ye,columns:be,readOnly:T,onPatch:bn})}function Se(){return(Se=ni(bt().mark(function he(Ye){return bt().wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,Dde({char:Ye,selectInside:!1,refJsonEditor:v,json:C,documentState:ye,readOnly:T,parser:z,onPatch:bn,onReplaceJson:At,onSelect:pe});case 2:case"end":return ot.stop()}},he)}))).apply(this,arguments)}function At(he,Ye){var ot=ye,ht=C,vt=k,on={json:C,text:k},Rn=Ue,Vt=sc(C,ye,[],od),tn="function"==typeof Ye?Ye(he,Vt):void 0;e(7,C=tn&&void 0!==tn.json?tn.json:he),e(10,ye=tn&&void 0!==tn.state?tn.state:Vt),e(15,k=void 0),e(18,Ue=!1),Te(C),Nn({previousJson:ht,previousState:ot,previousText:vt,previousTextIsRepaired:Rn}),Hi(on,null)}function rn(he,Ye){a("handleChangeText");var ot=ye,ht=C,vt=k,on={json:C,text:k},Rn=Ue;try{e(7,C=Y(he)),e(10,ye=sc(C,ye,[],od)),e(15,k=void 0),e(18,Ue=!1)}catch{try{e(7,C=Y(Yu(he))),e(10,ye=sc(C,ye,[],od)),e(15,k=he),e(18,Ue=!0)}catch{e(7,C=void 0),e(10,ye=YS({json:C,expand:od})),e(15,k=he),e(18,Ue=!1)}}if("function"==typeof Ye){var Vt=Ye(C,ye);e(7,C=Vt&&Vt.json?Vt.json:C),e(10,ye=Vt&&Vt.state?Vt.state:ye)}Te(C),Nn({previousJson:ht,previousState:ot,previousText:vt,previousTextIsRepaired:Rn}),Hi(on,null)}function hn(he){var ot=he.rootPath,ht=he.onTransform,vt=he.onClose;T||void 0===C||(Ie=!0,X({id:he.id||p,json:C,rootPath:ot||[],onTransform:ht?function(on){ht({operations:on,json:C,transformedJson:Yc(C,on)})}:function(on){a("onTransform",ot,on),bn(on)},onClose:function(){Ie=!1,cn(),vt&&vt()}}))}function dn(he){a("openJSONEditorModal",{path:he}),Ie=!0,ne({content:{json:Dt(C,he)},path:he,onPatch:Je.onPatch,onClose:function(){Ie=!1,cn()}})}function Di(he,Ye){l(lue,{text:he,onParse:HS,onRepair:Nae,onApply:Ye},Ee(Ee({},Xp),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return cn()}})}function Yi(){if(!T&&_t.getState().canUndo){var he=_t.undo();if(he){var Ye={json:C,text:k};e(7,C=he.undo.patch?Yc(C,he.undo.patch):he.undo.json),e(10,ye=he.undo.state),e(15,k=he.undo.text),e(18,Ue=he.undo.textIsRepaired),a("undo",{item:he,json:C}),Hi(Ye,{json:C,previousJson:Ye.json,redo:he.undo.patch,undo:he.redo.patch}),cn(),ye.selection&&Ti(ye.selection.focusPath,!1)}}}function vn(){if(!T&&_t.getState().canRedo){var he=_t.redo();if(he){var Ye={json:C,text:k};e(7,C=he.redo.patch?Yc(C,he.redo.patch):he.redo.json),e(10,ye=he.redo.state),e(15,k=he.redo.text),e(18,Ue=he.redo.textIsRepaired),a("redo",{item:he,json:C}),Hi(Ye,{json:C,previousJson:Ye.json,redo:he.redo.patch,undo:he.undo.patch}),cn(),ye.selection&&Ti(ye.selection.focusPath,!1)}}}function bi(he,Ye){e(68,R[Ye]=he.getBoundingClientRect().height,R)}return t.$$set=function(he){"readOnly"in he&&e(0,T=he.readOnly),"externalContent"in he&&e(47,j=he.externalContent),"mainMenuBar"in he&&e(1,B=he.mainMenuBar),"escapeControlCharacters"in he&&e(48,N=he.escapeControlCharacters),"escapeUnicodeCharacters"in he&&e(49,$=he.escapeUnicodeCharacters),"flattenColumns"in he&&e(50,V=he.flattenColumns),"parser"in he&&e(2,z=he.parser),"parseMemoizeOne"in he&&e(51,Y=he.parseMemoizeOne),"validator"in he&&e(52,O=he.validator),"validationParser"in he&&e(53,H=he.validationParser),"indentation"in he&&e(3,G=he.indentation),"onChange"in he&&e(54,F=he.onChange),"onChangeMode"in he&&e(4,Z=he.onChangeMode),"onRenderValue"in he&&e(55,D=he.onRenderValue),"onRenderMenu"in he&&e(5,E=he.onRenderMenu),"onFocus"in he&&e(56,M=he.onFocus),"onBlur"in he&&e(57,U=he.onBlur),"onSortModal"in he&&e(58,L=he.onSortModal),"onTransformModal"in he&&e(59,X=he.onTransformModal),"onJSONEditorModal"in he&&e(60,ne=he.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,m=bP({escapeControlCharacters:N,escapeUnicodeCharacters:$})),65536&t.$$.dirty[1]&&function ct(he){var Ye=C,ot=Fv(he)?he.text!==k:!ai(Ye,he.json);if(a("update external content",{isChanged:ot}),ot){var ht={json:C,text:k},vt=C,on=ye,Rn=k,Vt=Ue;if(Fv(he))try{e(7,C=Y(he.text)),e(15,k=he.text),e(18,Ue=!1),e(16,ae=void 0)}catch(tn){try{e(7,C=Y(Yu(he.text))),e(15,k=he.text),e(18,Ue=!0),e(16,ae=void 0)}catch{e(7,C=void 0),e(15,k=j.text),e(18,Ue=!1),e(16,ae=US(k,tn.message||tn.toString()))}}else e(7,C=he.json),e(15,k=void 0),e(18,Ue=!1),e(16,ae=void 0);Te(C),ye.sortedColumn&&e(10,ye=Ee(Ee({},ye),{},{sortedColumn:void 0})),Nn({previousJson:vt,previousState:on,previousText:Rn,previousTextIsRepaired:Vt}),Hi(ht,null)}}(j),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,be=er(C)?function(he,Ye){var ot,ht=new Set(Ye.map(gt)),vt=new Set(he.map(gt)),on=_e(ht);try{for(on.s();!(ot=on.n()).done;){var Rn=ot.value;vt.has(Rn)||ht.delete(Rn)}}catch(wi){on.e(wi)}finally{on.f()}var Vt,tn=_e(vt);try{for(tn.s();!(Vt=tn.n()).done;){var Xt=Vt.value;ht.has(Xt)||ht.add(Xt)}}catch(wi){tn.e(wi)}finally{tn.f()}return sn(ht).map(qc)}(function(he,Ye){var ot=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,ht={};Array.isArray(he)&&function zXe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rDe),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(he,Ye,ot,ht,vt){for(var on=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Rn=er(ot)?ot.length:0,Vt=function Rit(t,n){var e=Object.values(t);return Yn(e)?n:e.reduce(function(r,o){return r+o})/e.length}(ht,vt),tn=he-on,Xt=Ye+2*on,wi=function(gu){return ht[gu]||vt},Oi=0,Nr=0;Nr0&&(Nr-=wi(--Oi));for(var us=Oi,pu=0;pu0?mi(yg({rowIndex:wi.rowIndex,columnIndex:Nr-1},tn),!1):Xt;pe(ot),qr(ot.focusPath)}if("ArrowRight"===Ye&&(he.preventDefault(),Pn(),ye.selection)){var ht=function(tn,Xt){var wi=cc(Xt.focusPath,tn),Nr=wi.columnIndex;return Nr0?mi(yg({rowIndex:Oi-1,columnIndex:wi.columnIndex},tn),!1):Xt}(be,ye.selection);pe(vt),qr(vt.focusPath)}if("ArrowDown"===Ye&&(he.preventDefault(),Pn(),ye.selection)){var on=function(tn,Xt,wi){var Oi=cc(wi.focusPath,Xt),Nr=Oi.rowIndex;return Nr1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new dve({props:{mode:Rt(t[18]).mode,content:Rt(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:ud,onBlur:ud,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&hve(t),k=t[18].length>1&&fve(t);function T(N,$){return N[0]?Yct:Jct}var j=T(t),B=j(t);return{c:function(){n=oe("div"),$e(e.$$.fragment),i=Me(),r=oe("div"),(o=oe("div")).innerHTML='
    Path
    ',s=Me(),a=oe("input"),l=Me(),(c=oe("div")).innerHTML='
    Contents
    ',u=Me(),d=oe("div"),$e(h.$$.fragment),f=Me(),p=oe("div"),C&&C.c(),g=Me(),k&&k.c(),m=Me(),B.c(),I(o,"class","jse-label svelte-1hibiw3"),I(a,"class","jse-path svelte-1hibiw3"),I(a,"type","text"),a.readOnly=!0,I(a,"title","Selected path"),a.value=t[21],I(c,"class","jse-label svelte-1hibiw3"),I(d,"class","jse-modal-inline-editor svelte-1hibiw3"),I(p,"class","jse-actions svelte-1hibiw3"),I(r,"class","jse-modal-contents svelte-1hibiw3"),I(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(N,$){ve(N,n,$),Le(e,n,null),ee(n,i),ee(n,r),ee(r,o),ee(r,s),ee(r,a),ee(r,l),ee(r,c),ee(r,u),ee(r,d),Le(h,d,null),ee(r,f),ee(r,p),C&&C.m(p,null),ee(p,g),k&&k.m(p,null),ee(p,m),B.m(p,null),v=!0,y||(b=ws(pk.call(null,n,t[23])),y=!0)},p:function(N,$){var V={};262144&$[0]&&(V.title="Edit nested content "+(N[18].length>1?" (".concat(N[18].length,")"):"")),e.$set(V),(!v||2097152&$[0]&&a.value!==N[21])&&(a.value=N[21]);var z={};262144&$[0]&&(z.mode=Rt(N[18]).mode),262144&$[0]&&(z.content=Rt(N[18]).content),1&$[0]&&(z.readOnly=N[0]),2&$[0]&&(z.indentation=N[1]),4&$[0]&&(z.tabSize=N[2]),32&$[0]&&(z.statusBar=N[5]),8&$[0]&&(z.mainMenuBar=N[3]),16&$[0]&&(z.navigationBar=N[4]),64&$[0]&&(z.escapeControlCharacters=N[6]),128&$[0]&&(z.escapeUnicodeCharacters=N[7]),256&$[0]&&(z.flattenColumns=N[8]),512&$[0]&&(z.parser=N[9]),1048576&$[0]&&(z.parseMemoizeOne=N[20]),1024&$[0]&&(z.validator=N[10]),2048&$[0]&&(z.validationParser=N[11]),4096&$[0]&&(z.pathParser=N[12]),8192&$[0]&&(z.onRenderValue=N[13]),16384&$[0]&&(z.onClassName=N[14]),32768&$[0]&&(z.onRenderMenu=N[15]),65536&$[0]&&(z.onSortModal=N[16]),131072&$[0]&&(z.onTransformModal=N[17]),h.$set(z),N[19]?C?C.p(N,$):((C=hve(N)).c(),C.m(p,g)):C&&(C.d(1),C=null),N[18].length>1?k?(k.p(N,$),262144&$[0]&&W(k,1)):((k=fve(N)).c(),W(k,1),k.m(p,m)):k&&(it(),Q(k,1,1,function(){k=null}),rt()),j===(j=T(N))&&B?B.p(N,$):(B.d(1),(B=j(N))&&(B.c(),B.m(p,null)))},i:function(N){v||(W(e.$$.fragment,N),W(h.$$.fragment,N),W(k),v=!0)},o:function(N){Q(e.$$.fragment,N),Q(h.$$.fragment,N),Q(k),v=!1},d:function(N){N&&me(n),Fe(e),Fe(h),C&&C.d(),k&&k.d(),B.d(),y=!1,b()}}}function pve(t){t.focus()}function Xct(t,n,e){var i,r,o,s=Cs("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,g=n.statusBar,m=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,b=n.parser,C=n.validator,k=n.validationParser,T=n.pathParser,j=n.onRenderValue,B=n.onClassName,N=n.onRenderMenu,$=n.onSortModal,V=n.onTransformModal,z=xs("simple-modal").close,Y=[{mode:H(a),content:a,relativePath:l}],O=void 0;function H(F){return _P(F)&&er(F.json)?Fr.table:Fr.tree}function G(F){s("handleChange",F);var Z=Ee(Ee({},Rt(Y)),{},{content:F});e(18,Y=[].concat(sn(Qn(Y)),[Z]))}return t.$$set=function(F){"content"in F&&e(28,a=F.content),"path"in F&&e(29,l=F.path),"onPatch"in F&&e(30,c=F.onPatch),"readOnly"in F&&e(0,u=F.readOnly),"indentation"in F&&e(1,d=F.indentation),"tabSize"in F&&e(2,h=F.tabSize),"mainMenuBar"in F&&e(3,f=F.mainMenuBar),"navigationBar"in F&&e(4,p=F.navigationBar),"statusBar"in F&&e(5,g=F.statusBar),"escapeControlCharacters"in F&&e(6,m=F.escapeControlCharacters),"escapeUnicodeCharacters"in F&&e(7,v=F.escapeUnicodeCharacters),"flattenColumns"in F&&e(8,y=F.flattenColumns),"parser"in F&&e(9,b=F.parser),"validator"in F&&e(10,C=F.validator),"validationParser"in F&&e(11,k=F.validationParser),"pathParser"in F&&e(12,T=F.pathParser),"onRenderValue"in F&&e(13,j=F.onRenderValue),"onClassName"in F&&e(14,B=F.onClassName),"onRenderMenu"in F&&e(15,N=F.onRenderMenu),"onSortModal"in F&&e(16,$=F.onSortModal),"onTransformModal"in F&&e(17,V=F.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=Y.flatMap(function(F){return F.relativePath})),1&t.$$.dirty[1]&&e(21,r=Yn(i)?"(whole document)":oc(Xa(i))),512&t.$$.dirty[0]&&e(20,o=J_(b.parse))},[u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,Y,O,o,r,function(){if(s("handleApply"),!u)try{e(19,O=void 0);var F=[{op:"replace",path:gt(Rt(Y).relativePath),value:Pae(Rt(Y).content,b).json}];if(Y.length>1){var Z={json:Yc(Pae(Y[Y.length-2].content,b).json,F)};e(18,Y=Qn(Y)),G(Z)}else c(F),z()}catch(D){e(19,O=D.toString())}},function(){s("handleClose"),Y.length>1?(e(18,Y=Qn(Y)),e(19,O=void 0)):z()},G,function(F){s("handleChangeMode",F);var Z=Ee(Ee({},Rt(Y)),{},{mode:F});e(18,Y=[].concat(sn(Qn(Y)),[Z]))},function(F){e(19,O=F.toString()),console.error(F)},function(F){var Z=F.content,D=F.path;s("handleJSONEditorModal",{content:Z,path:D});var E={mode:H(Z),content:Z,relativePath:D};e(18,Y=[].concat(sn(Y),[E]))},a,l,c,i]}var Qct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Xct,Kct,In,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},qct,[-1,-1]),r}return de(e)}();function Zct(t,n,e){var i=xs("simple-modal");return[i.open,i.close]}var eut=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Zct,null,In,{open:0,close:1}),r}return de(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function tut(t){gn(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function gve(t){var n,e;return n=new dve({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){$e(n.$$.fragment)},m:function(r,o){Le(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(W(n.$$.fragment,r),e=!0)},o:function(r){Q(n.$$.fragment,r),e=!1},d:function(r){t[56](null),Fe(n,r)}}}function nut(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new eut({props:l}),qn.push(function(){return Uc(n,"open",a)});var c=gve(t);return{c:function(){$e(n.$$.fragment),i=Me(),r=oe("div"),c.c(),I(r,"class","jse-main svelte-sxaskb"),Xe(r,"jse-focus",t[20])},m:function(u,d){Le(n,u,d),ve(u,i,d),ve(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],Hc(function(){return e=!1})),n.$set(h),524288&d[0]&&In(s,s=u[19])?(it(),Q(c,1,1,tt),rt(),(c=gve(u)).c(),W(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&Xe(r,"jse-focus",u[20])},i:function(u){o||(W(n.$$.fragment,u),W(c),o=!0)},o:function(u){Q(n.$$.fragment,u),Q(c),o=!1},d:function(u){Fe(n,u),u&&me(i),u&&me(r),c.d(u)}}}function iut(t){var n,e;return n=new Kee({props:{closeOnEsc:!1,$$slots:{default:[nut]},$$scope:{ctx:t}}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function rut(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},Xee,{closeOnEsc:!1}],o={$$slots:{default:[iut]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(g,m){return"".concat(g).concat(m)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(g,m){return m instanceof e&&(g[m.str]=(g[m.str]||0)+1),g},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,g=new Array(p>1?p-1:0),m=1;m1?p-1:0),m=1;m0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;ue(this,l),this._names={},this._prefixes=u,this._parent=d}return de(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){We(u,l);var c=qe(u);function u(d,h){var f;return ue(this,u),(f=c.call(this,h)).prefix=d,f}return de(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(dJ||(dJ=fe([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)(hJ||(hJ=fe(["\n"],["\\n"]))),a=function(l){We(u,l);var c=qe(u);function u(d){var h;return ue(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Ee(Ee({},d),{},{_n:d.lines?s:e.nil}),h}return de(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),g=p.prefix,m=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[g];if(v){var y=v.get(m);if(y)return y}else v=this._values[g]=new Map;v.set(m,p);var b=this._scope[g]||(this._scope[g]=[]),C=b.length;return b[C]=h.ref,p.setValue(h,{property:g,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(fJ||(fJ=fe(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=arguments.length>3?arguments[3]:void 0,m=e.nil,v=function(b){var C=d[b];if(!C)return"continue";var k=p[b]=p[b]||new Map;C.forEach(function(T){if(!k.has(T)){k.set(T,n.Started);var j=h(T);if(j){var B=f.opts.es5?t.varKinds.var:t.varKinds.const;m=(0,e._)(pJ||(pJ=fe(["",""," "," = ",";",""])),m,B,T,j,f.opts._n)}else{if(!(j=g?.(T)))throw new i(T);m=(0,e._)(gJ||(gJ=fe(["","","",""])),m,j,f.opts._n)}k.set(T,n.Completed)}})};for(var y in d)v(y);return m}}]),u}(r);t.ValueScope=a}(Dve)),Dve}function Si(){return Tve||(Tve=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=LT(),e=Ave(),i=LT();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=Ave();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function M(){ue(this,M)}return de(M,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(U,L){return this}}]),M}(),s=function(M){We(L,M);var U=qe(L);function L(X,ne,ge){var ae;return ue(this,L),(ae=U.call(this)).varKind=X,ae.name=ne,ae.rhs=ge,ae}return de(L,[{key:"render",value:function(X){var ge=X._n,ae=X.es5?e.varKinds.var:this.varKind,De=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(ae," ").concat(this.name).concat(De,";")+ge}},{key:"optimizeNames",value:function(X,ne){if(X[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,X,ne)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),L}(o),a=function(M){We(L,M);var U=qe(L);function L(X,ne,ge){var ae;return ue(this,L),(ae=U.call(this)).lhs=X,ae.rhs=ne,ae.sideEffects=ge,ae}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+ne}},{key:"optimizeNames",value:function(X,ne){if(!(this.lhs instanceof n.Name)||X[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,X,ne),this}},{key:"names",get:function(){return Y(this.lhs instanceof n.Name?{}:Ee({},this.lhs.names),this.rhs)}}]),L}(o),l=function(M){We(L,M);var U=qe(L);function L(X,ne,ge,ae){var De;return ue(this,L),(De=U.call(this,X,ge,ae)).op=ne,De}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+ne}}]),L}(a),c=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).label=X,ne.names={},ne}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.label,":")+ne}}]),L}(o),u=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).label=X,ne.names={},ne}return de(L,[{key:"render",value:function(X){var ne=X._n,ge=this.label?" ".concat(this.label):"";return"break".concat(ge,";")+ne}}]),L}(o),d=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).error=X,ne}return de(L,[{key:"render",value:function(X){var ne=X._n;return"throw ".concat(this.error,";")+ne}},{key:"names",get:function(){return this.error.names}}]),L}(o),h=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).code=X,ne}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.code,";")+ne}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(X,ne){return this.code=O(this.code,X,ne),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),L}(o),f=function(M){We(L,M);var U=qe(L);function L(){var X,ne=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ue(this,L),(X=U.call(this)).nodes=ne,X}return de(L,[{key:"render",value:function(X){return this.nodes.reduce(function(ne,ge){return ne+ge.render(X)},"")}},{key:"optimizeNodes",value:function(){for(var X=this.nodes,ne=X.length;ne--;){var ge=X[ne].optimizeNodes();Array.isArray(ge)?X.splice.apply(X,[ne,1].concat(sn(ge))):ge?X[ne]=ge:X.splice(ne,1)}return X.length>0?this:void 0}},{key:"optimizeNames",value:function(X,ne){for(var ge=this.nodes,ae=ge.length;ae--;){var De=ge[ae];De.optimizeNames(X,ne)||(H(X,De.names),ge.splice(ae,1))}return ge.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(X,ne){return z(X,ne.names)},{})}}]),L}(o),p=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){return"{"+X._n+gi(Xn(L.prototype),"render",this).call(this,X)+"}"+X._n}}]),L}(f),g=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L)}(f),m=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L)}(p);m.kind="else";var v=function(M){We(L,M);var U=qe(L);function L(X,ne){var ge;return ue(this,L),(ge=U.call(this,ne)).condition=X,ge}return de(L,[{key:"render",value:function(X){var ne="if(".concat(this.condition,")")+gi(Xn(L.prototype),"render",this).call(this,X);return this.else&&(ne+="else "+this.else.render(X)),ne}},{key:"optimizeNodes",value:function(){gi(Xn(L.prototype),"optimizeNodes",this).call(this);var X=this.condition;if(!0===X)return this.nodes;var ne=this.else;if(ne){var ge=ne.optimizeNodes();ne=this.else=Array.isArray(ge)?new m(ge):ge}return ne?!1===X?ne instanceof L?ne:ne.nodes:this.nodes.length?this:new L(G(X),ne instanceof L?[ne]:ne.nodes):!1!==X&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(X,ne){var ge;if(this.else=null===(ge=this.else)||void 0===ge?void 0:ge.optimizeNames(X,ne),gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne)||this.else)return this.condition=O(this.condition,X,ne),this}},{key:"names",get:function(){var X=gi(Xn(L.prototype),"names",this);return Y(X,this.condition),this.else&&z(X,this.else.names),X}}]),L}(p);v.kind="if";var y=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L)}(p);y.kind="for";var b=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).iteration=X,ne}return de(L,[{key:"render",value:function(X){return"for(".concat(this.iteration,")")+gi(Xn(L.prototype),"render",this).call(this,X)}},{key:"optimizeNames",value:function(X,ne){if(gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne))return this.iteration=O(this.iteration,X,ne),this}},{key:"names",get:function(){return z(gi(Xn(L.prototype),"names",this),this.iteration.names)}}]),L}(y),C=function(M){We(L,M);var U=qe(L);function L(X,ne,ge,ae){var De;return ue(this,L),(De=U.call(this)).varKind=X,De.name=ne,De.from=ge,De.to=ae,De}return de(L,[{key:"render",value:function(X){var ge=this.name,ae=this.from,De=this.to;return"for(".concat(X.es5?e.varKinds.var:this.varKind," ").concat(ge,"=").concat(ae,"; ").concat(ge,"<").concat(De,"; ").concat(ge,"++)")+gi(Xn(L.prototype),"render",this).call(this,X)}},{key:"names",get:function(){var X=Y(gi(Xn(L.prototype),"names",this),this.from);return Y(X,this.to)}}]),L}(y),k=function(M){We(L,M);var U=qe(L);function L(X,ne,ge,ae){var De;return ue(this,L),(De=U.call(this)).loop=X,De.varKind=ne,De.name=ge,De.iterable=ae,De}return de(L,[{key:"render",value:function(X){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+gi(Xn(L.prototype),"render",this).call(this,X)}},{key:"optimizeNames",value:function(X,ne){if(gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne))return this.iterable=O(this.iterable,X,ne),this}},{key:"names",get:function(){return z(gi(Xn(L.prototype),"names",this),this.iterable.names)}}]),L}(y),T=function(M){We(L,M);var U=qe(L);function L(X,ne,ge){var ae;return ue(this,L),(ae=U.call(this)).name=X,ae.args=ne,ae.async=ge,ae}return de(L,[{key:"render",value:function(X){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(p);T.kind="func";var j=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){return"return "+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(f);j.kind="return";var B=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){var ne="try"+gi(Xn(L.prototype),"render",this).call(this,X);return this.catch&&(ne+=this.catch.render(X)),this.finally&&(ne+=this.finally.render(X)),ne}},{key:"optimizeNodes",value:function(){var X,ne;return gi(Xn(L.prototype),"optimizeNodes",this).call(this),null===(X=this.catch)||void 0===X||X.optimizeNodes(),null===(ne=this.finally)||void 0===ne||ne.optimizeNodes(),this}},{key:"optimizeNames",value:function(X,ne){var ge,ae;return gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne),null===(ge=this.catch)||void 0===ge||ge.optimizeNames(X,ne),null===(ae=this.finally)||void 0===ae||ae.optimizeNames(X,ne),this}},{key:"names",get:function(){var X=gi(Xn(L.prototype),"names",this);return this.catch&&z(X,this.catch.names),this.finally&&z(X,this.finally.names),X}}]),L}(p),N=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).error=X,ne}return de(L,[{key:"render",value:function(X){return"catch(".concat(this.error,")")+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(p);N.kind="catch";var $=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){return"finally"+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(p);$.kind="finally";var V=function(){function M(U){var L=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ue(this,M),this._values={},this._blockStarts=[],this._constants={},this.opts=Ee(Ee({},L),{},{_n:L.lines?"\n":""}),this._extScope=U,this._scope=new e.Scope({parent:U}),this._nodes=[new g]}return de(M,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(U){return this._scope.name(U)}},{key:"scopeName",value:function(U){return this._extScope.name(U)}},{key:"scopeValue",value:function(U,L){var X=this._extScope.value(U,L);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}},{key:"getScopeValue",value:function(U,L){return this._extScope.getValue(U,L)}},{key:"scopeRefs",value:function(U){return this._extScope.scopeRefs(U,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(U,L,X,ne){var ge=this._scope.toName(L);return void 0!==X&&ne&&(this._constants[ge.str]=X),this._leafNode(new s(U,ge,X)),ge}},{key:"const",value:function(U,L,X){return this._def(e.varKinds.const,U,L,X)}},{key:"let",value:function(U,L,X){return this._def(e.varKinds.let,U,L,X)}},{key:"var",value:function(U,L,X){return this._def(e.varKinds.var,U,L,X)}},{key:"assign",value:function(U,L,X){return this._leafNode(new a(U,L,X))}},{key:"add",value:function(U,L){return this._leafNode(new l(U,t.operators.ADD,L))}},{key:"code",value:function(U){return"function"==typeof U?U():U!==n.nil&&this._leafNode(new h(U)),this}},{key:"object",value:function(){for(var U=["{"],L=arguments.length,X=new Array(L),ne=0;ne1&&U.push(","),U.push(be),(be!==Ie||this.opts.es5)&&(U.push(":"),(0,n.addCodeArg)(U,Ie))}return U.push("}"),new n._Code(U)}},{key:"if",value:function(U,L,X){if(this._blockNode(new v(U)),L&&X)this.code(L).else().code(X).endIf();else if(L)this.code(L).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(U){return this._elseNode(new v(U))}},{key:"else",value:function(){return this._elseNode(new m)}},{key:"endIf",value:function(){return this._endBlockNode(v,m)}},{key:"_for",value:function(U,L){return this._blockNode(U),L&&this.code(L).endFor(),this}},{key:"for",value:function(U,L){return this._for(new b(U),L)}},{key:"forRange",value:function(U,L,X,ne){var ge=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,ae=this._scope.toName(U);return this._for(new C(ge,ae,L,X),function(){return ne(ae)})}},{key:"forOf",value:function(U,L,X){var ne=this,ge=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,ae=this._scope.toName(U);if(this.opts.es5){var De=L instanceof n.Name?L:this.var("_arr",L);return this.forRange("_i",0,(0,n._)(mJ||(mJ=fe(["",".length"])),De),function(be){ne.var(ae,(0,n._)(vJ||(vJ=fe(["","[","]"])),De,be)),X(ae)})}return this._for(new k("of",ge,ae,L),function(){return X(ae)})}},{key:"forIn",value:function(U,L,X){var ne=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(U,(0,n._)(yJ||(yJ=fe(["Object.keys(",")"])),L),X);var ge=this._scope.toName(U);return this._for(new k("in",ne,ge,L),function(){return X(ge)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(U){return this._leafNode(new c(U))}},{key:"break",value:function(U){return this._leafNode(new u(U))}},{key:"return",value:function(U){var L=new j;if(this._blockNode(L),this.code(U),1!==L.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(j)}},{key:"try",value:function(U,L,X){if(!L&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');var ne=new B;if(this._blockNode(ne),this.code(U),L){var ge=this.name("e");this._currNode=ne.catch=new N(ge),L(ge)}return X&&(this._currNode=ne.finally=new $,this.code(X)),this._endBlockNode(N,$)}},{key:"throw",value:function(U){return this._leafNode(new d(U))}},{key:"block",value:function(U,L){return this._blockStarts.push(this._nodes.length),U&&this.code(U).endBlock(L),this}},{key:"endBlock",value:function(U){var L=this._blockStarts.pop();if(void 0===L)throw new Error("CodeGen: not in self-balancing block");var X=this._nodes.length-L;if(X<0||void 0!==U&&X!==U)throw new Error("CodeGen: wrong number of nodes: ".concat(X," vs ").concat(U," expected"));return this._nodes.length=L,this}},{key:"func",value:function(U){var ne=arguments.length>3?arguments[3]:void 0;return this._blockNode(new T(U,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),ne&&this.code(ne).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(T)}},{key:"optimize",value:function(){for(var U=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;U-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(U){return this._currNode.nodes.push(U),this}},{key:"_blockNode",value:function(U){this._currNode.nodes.push(U),this._nodes.push(U)}},{key:"_endBlockNode",value:function(U,L){var X=this._currNode;if(X instanceof U||L&&X instanceof L)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(L?"".concat(U.kind,"/").concat(L.kind):U.kind,'"'))}},{key:"_elseNode",value:function(U){var L=this._currNode;if(!(L instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=L.else=U,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var U=this._nodes;return U[U.length-1]},set:function(U){var L=this._nodes;L[L.length-1]=U}}]),M}();function z(M,U){for(var L in U)M[L]=(M[L]||0)+(U[L]||0);return M}function Y(M,U){return U instanceof n._CodeOrName?z(M,U.names):M}function O(M,U,L){return M instanceof n.Name?X(M):(ne=M)instanceof n._Code&&ne._items.some(function(ge){return ge instanceof n.Name&&1===U[ge.str]&&void 0!==L[ge.str]})?new n._Code(M._items.reduce(function(ne,ge){return ge instanceof n.Name&&(ge=X(ge)),ge instanceof n._Code?ne.push.apply(ne,sn(ge._items)):ne.push(ge),ne},[])):M;var ne;function X(ne){var ge=L[ne.str];return void 0===ge||1!==U[ne.str]?ne:(delete U[ne.str],ge)}}function H(M,U){for(var L in U)M[L]=(M[L]||0)-(U[L]||0)}function G(M){return"boolean"==typeof M||"number"==typeof M||null===M?!M:(0,n._)(_J||(_J=fe(["!",""])),E(M))}t.CodeGen=V,t.not=G;var F=D(t.operators.AND);t.and=function(){for(var M=arguments.length,U=new Array(M),L=0;L1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var g in f)if(p[g])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,g=f.mergeToName,m=f.mergeValues,v=f.resultToName;return function(y,b,C,k){var T=void 0===C?b:C instanceof n.Name?(b instanceof n.Name?p(y,b,C):g(y,b,C),C):b instanceof n.Name?(g(y,C,b),b):m(b,C);return k!==n.Name||T instanceof n.Name?T:v(y,T)}}function l(f,p){if(!0===p)return f.var("props",!0);var g=f.var("props",(0,n._)(jJ||(jJ=fe(["{}"]))));return void 0!==p&&c(f,g,p),g}function c(f,p,g){Object.keys(g).forEach(function(m){return f.assign((0,n._)(PJ||(PJ=fe(["","",""])),p,(0,n.getProperty)(m)),!0)})}t.toHash=function(f){var p,g={},m=_e(f);try{for(m.s();!(p=m.n()).done;)g[p.value]=!0}catch(v){m.e(v)}finally{m.f()}return g},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var g in f)if("$ref"!==g&&p.all[g])return!0;return!1},t.schemaRefOrVal=function(f,p,g,m){var v=f.topSchemaRef,y=f.schemaPath;if(!m){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(xJ||(xJ=fe(["",""])),p)}return(0,n._)(CJ||(CJ=fe(["","","",""])),v,y,(0,n.getProperty)(g))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var g,m=_e(f);try{for(m.s();!(g=m.n()).done;)p(g.value)}catch(v){m.e(v)}finally{m.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,g){return f.if((0,n._)(SJ||(SJ=fe([""," !== true && "," !== undefined"])),g,p),function(){f.if((0,n._)(kJ||(kJ=fe([""," === true"])),p),function(){return f.assign(g,!0)},function(){return f.assign(g,(0,n._)(TJ||(TJ=fe([""," || {}"])),g)).code((0,n._)(DJ||(DJ=fe(["Object.assign(",", ",")"])),g,p))})})},mergeToName:function(f,p,g){return f.if((0,n._)(AJ||(AJ=fe([""," !== true"])),g),function(){!0===p?f.assign(g,!0):(f.assign(g,(0,n._)(EJ||(EJ=fe([""," || {}"])),g)),c(f,g,p))})},mergeValues:function(f,p){return!0===f||Ee(Ee({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,g){return f.if((0,n._)(MJ||(MJ=fe([""," !== true && "," !== undefined"])),g,p),function(){return f.assign(g,(0,n._)(OJ||(OJ=fe([""," === true ? true : "," > "," ? "," : ",""])),p,g,p,g,p))})},mergeToName:function(f,p,g){return f.if((0,n._)(IJ||(IJ=fe([""," !== true"])),g),function(){return f.assign(g,!0===p||(0,n._)(NJ||(NJ=fe([""," > "," ? "," : ",""])),g,p,g,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(g){if(p="strict mode: ".concat(p),!0===g)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,g){if(f instanceof n.Name){var m=p===u.Num;return(0,n._)(g?m?RJ||(RJ=fe(['"[" + ',' + "]"'])):LJ||(LJ=fe(['"[\'" + ',' + "\']"'])):m?FJ||(FJ=fe(['"/" + ',""])):$J||($J=fe(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return g?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Bi);var Eve,Mve,Ove,FT={};function Hf(){if(Eve)return FT;Eve=1,Object.defineProperty(FT,"__esModule",{value:!0});var t=Si(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return FT.default=n,FT}function $T(){return Mve||(Mve=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=Si(),e=Bi,i=Hf();function r(d,h){var f=d.const("err",h);d.if((0,n._)(ZJ||(ZJ=fe([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)(eK||(eK=fe(["[","]"])),f))},(0,n._)(tK||(tK=fe(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(nK||(nK=fe(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(iK||(iK=fe(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(rK||(rK=fe(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(BJ||(BJ=fe(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(VJ||(VJ=fe(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(HJ||(HJ=fe(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,g=d.it,m=g.gen,v=g.compositeRule,y=g.allErrors,b=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(m,b):o(g,(0,n._)(UJ||(UJ=fe(["[","]"])),b))},t.reportExtraError=function(d){var p=d.it,m=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),m||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(zJ||(zJ=fe([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(GJ||(GJ=fe(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,g=d.data,m=d.errsCount,v=d.it;if(void 0===m)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",m,i.default.errors,function(b){h.const(y,(0,n._)(WJ||(WJ=fe(["","[","]"])),i.default.vErrors,b)),h.if((0,n._)(qJ||(qJ=fe(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(YJ||(YJ=fe(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(JJ||(JJ=fe(["",".schemaPath"])),y),(0,n.str)(KJ||(KJ=fe(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(XJ||(XJ=fe(["",".schema"])),y),p),h.assign((0,n._)(QJ||(QJ=fe(["",".data"])),y),g))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(oK||(oK=fe(["{}"]))):function(p,g){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,m),c(p,m)];return function u(d,h,f){var p=h.params,g=h.message,v=d.data,y=d.schemaValue,b=d.it,C=b.opts,k=b.propertyName,T=b.topSchemaRef,j=b.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(cK||(cK=fe(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof g?g(d):g]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(uK||(uK=fe(["","",""])),T,j)],[i.default.data,v]),k&&f.push([s.propertyName,k])}(p,g,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,g=p?(0,n.str)(sK||(sK=fe(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,g)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,g=h.schemaPath,m=h.parentSchema?p:(0,n.str)(aK||(aK=fe(["","/",""])),p,f);return g&&(m=(0,n.str)(lK||(lK=fe(["","",""])),m,(0,e.getErrorPath)(g,e.Type.Str))),[s.schemaPath,m]}}(xve)),xve}var Db={},Eg={};Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.getRules=Eg.isJSONType=void 0;var put=new Set(["string","number","integer","boolean","null","object","array"]);Eg.isJSONType=function(t){return"string"==typeof t&&put.has(t)},Eg.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ee(Ee({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var Ive,vh={};function Nve(){if(Ive)return vh;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return Ive=1,Object.defineProperty(vh,"__esModule",{value:!0}),vh.shouldUseRule=vh.shouldUseGroup=vh.schemaHasRulesForType=void 0,vh.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},vh.shouldUseGroup=t,vh.shouldUseRule=n,vh}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=Eg,i=Nve(),r=$T(),o=Si(),s=Bi;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var T,g=f.gen,m=f.data,v=f.opts,y=(T=v.coerceTypes)?p.filter(function(j){return l.has(j)||"array"===T&&"array"===j}):[],b=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(b){var C=u(p,m,v.strictNumbers,n.Wrong);g.if(C,function(){y.length?function(k,T,j){var B=k.gen,N=k.data,$=k.opts,V=B.let("dataType",(0,o._)(hK||(hK=fe(["typeof ",""])),N)),z=B.let("coerced",(0,o._)(fK||(fK=fe(["undefined"]))));"array"===$.coerceTypes&&B.if((0,o._)(pK||(pK=fe([""," == 'object' && Array.isArray(",") && ",".length == 1"])),V,N,N),function(){return B.assign(N,(0,o._)(gK||(gK=fe(["","[0]"])),N)).assign(V,(0,o._)(mK||(mK=fe(["typeof ",""])),N)).if(u(T,N,$.strictNumbers),function(){return B.assign(z,N)})}),B.if((0,o._)(vK||(vK=fe([""," !== undefined"])),z));var Y,O=_e(j);try{for(O.s();!(Y=O.n()).done;){var H=Y.value;(l.has(H)||"array"===H&&"array"===$.coerceTypes)&&G(H)}}catch(F){O.e(F)}finally{O.f()}function G(F){switch(F){case"string":return void B.elseIf((0,o._)(_K||(_K=fe(["",' == "number" || ',' == "boolean"'])),V,V)).assign(z,(0,o._)(bK||(bK=fe(['"" + ',""])),N)).elseIf((0,o._)(wK||(wK=fe([""," === null"])),N)).assign(z,(0,o._)(xK||(xK=fe(['""']))));case"number":return void B.elseIf((0,o._)(CK||(CK=fe(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),V,N,V,N,N,N)).assign(z,(0,o._)(SK||(SK=fe(["+",""])),N));case"integer":return void B.elseIf((0,o._)(kK||(kK=fe(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),V,N,V,N,N,N,N)).assign(z,(0,o._)(TK||(TK=fe(["+",""])),N));case"boolean":return void B.elseIf((0,o._)(DK||(DK=fe(["",' === "false" || '," === 0 || "," === null"])),N,N,N)).assign(z,!1).elseIf((0,o._)(AK||(AK=fe(["",' === "true" || '," === 1"])),N,N)).assign(z,!0);case"null":return B.elseIf((0,o._)(EK||(EK=fe(["",' === "" || '," === 0 || "," === false"])),N,N,N)),void B.assign(z,null);case"array":B.elseIf((0,o._)(MK||(MK=fe(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),V,V,V,N)).assign(z,(0,o._)(OK||(OK=fe(["[","]"])),N))}}B.else(),h(k),B.endIf(),B.if((0,o._)(yK||(yK=fe([""," !== undefined"])),z),function(){var F,Z,D,E,M;B.assign(N,z),Z=z,E=(F=k).parentData,M=F.parentDataProperty,(D=F.gen).if((0,o._)(IK||(IK=fe([""," !== undefined"])),E),function(){return D.assign((0,o._)(NK||(NK=fe(["","[","]"])),E,M),Z)})})}(f,p,y):h(f)})}return b};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,g){var m,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(jK||(jK=fe([""," "," null"])),p,y);case"array":m=(0,o._)(PK||(PK=fe(["Array.isArray(",")"])),p);break;case"object":m=(0,o._)(RK||(RK=fe([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":m=b((0,o._)(LK||(LK=fe(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":m=b();break;default:return(0,o._)(FK||(FK=fe(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?m:(0,o.not)(m);function b(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)($K||($K=fe(["typeof ",' == "number"'])),p),C,g?(0,o._)(BK||(BK=fe(["isFinite(",")"])),p):o.nil)}}function u(f,p,g,m){if(1===f.length)return c(f[0],p,g,m);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var b=(0,o._)(VK||(VK=fe(["typeof ",' != "object"'])),p);v=y.null?b:(0,o._)(HK||(HK=fe(["!"," || ",""])),p,b),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,g,m));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,g=f.schemaValue;return"string"==typeof p?(0,o._)(UK||(UK=fe(["{type: ","}"])),p):(0,o._)(zK||(zK=fe(["{type: ","}"])),g)}};function h(f){var g,m,v,y,b,p=(m=(g=f).gen,v=g.data,b=(0,s.schemaRefOrVal)(g,y=g.schema,"type"),{gen:m,keyword:"type",data:v,schema:y.type,schemaCode:b,schemaValue:b,parentSchema:y,params:{},it:g});(0,r.reportError)(p,d)}t.reportTypeError=h}(Db);var jve,Pve,Rve,Ab={},cu={},sr={};function uu(){if(Pve)return sr;Pve=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.validateUnion=sr.validateArray=sr.usePattern=sr.callValidateCode=sr.schemaProperties=sr.allSchemaProperties=sr.noPropertyInData=sr.propertyInData=sr.isOwnProperty=sr.hasPropFunc=sr.reportMissingProp=sr.checkMissingProp=sr.checkReportMissingProp=void 0;var t=Si(),n=Bi,e=Hf(),i=Bi;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(XK||(XK=fe(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(QK||(QK=fe(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(tX||(tX=fe(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}sr.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(JK||(JK=fe(["",""])),u)},!0),c.error()})},sr.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,sn(u.map(function(g){return(0,t.and)(s(h,f,g,p.ownProperties),(0,t._)(KK||(KK=fe([""," = ",""])),d,g))})))},sr.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},sr.hasPropFunc=r,sr.isOwnProperty=o,sr.propertyInData=function(c,u,d,h){var f=(0,t._)(ZK||(ZK=fe(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)(eX||(eX=fe([""," && ",""])),f,o(c,u,d)):f},sr.noPropertyInData=s,sr.allSchemaProperties=a,sr.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},sr.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,g=c.it,m=g.gen,v=g.topSchemaRef,y=g.schemaPath,b=g.errorPath,C=c.it,k=h?(0,t._)(nX||(nX=fe(["",", ",", ","",""])),f,p,v,y):p,T=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,b)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&T.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var j=(0,t._)(iX||(iX=fe(["",", ",""])),k,m.object.apply(m,T));return d!==t.nil?(0,t._)(rX||(rX=fe(["",".call(",", ",")"])),u,d,j):(0,t._)(oX||(oX=fe(["","(",")"])),u,j)};var l=(0,t._)(sX||(sX=fe(["new RegExp"])));return sr.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,g=p(u,f);return d.scopeValue("pattern",{key:g.toString(),ref:g,code:(0,t._)(aX||(aX=fe(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},sr.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var g=u.let("valid",!0);return m(function(){return u.assign(g,!1)}),g}return u.var(p,!0),m(function(){return u.break()}),p;function m(v){var y=u.const("len",(0,t._)(lX||(lX=fe(["",".length"])),d));u.forRange("i",0,y,function(b){c.subschema({keyword:h,dataProp:b,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},sr.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(m){return(0,n.alwaysValidSchema)(f,m)})||f.opts.unevaluated){var p=u.let("valid",!1),g=u.name("_valid");u.block(function(){return d.forEach(function(m,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},g);u.assign(p,(0,t._)(cX||(cX=fe([""," || ",""])),p,g)),c.mergeValidEvaluated(y,g)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},sr}var Lve,yh={},Ws={},Fve=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==xt(n)&&"object"==xt(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},v4={},mut={get exports(){return v4},set exports(t){v4=t}},Uf=mut.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),BT(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function BT(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==xt(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in Uf.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!y4(t):!!n&&$ve(t)<=n)};var wut=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function y4(t){for(var n in t){if(wut.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(y4)||"object"==xt(e)&&y4(e))return!0}return!1}function $ve(t){var n=0;for(var e in t)if("$ref"===e||(n++,!but.has(e)&&("object"==xt(t[e])&&(0,vut.eachItem)(t[e],function(i){return n+=$ve(i)}),n===1/0)))return 1/0;return n}function Bve(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=A0(n));var i=t.parse(n);return Vve(t,i)}function Vve(t,n){return t.serialize(n).split("#")[0]+"#"}Ws.getFullPath=Bve,Ws._getFullPath=Vve;var xut=/#\/?$/;function A0(t){return t?t.replace(xut,""):""}Ws.normalizeId=A0,Ws.resolveUrl=function(t,n,e){return e=A0(e),t.resolve(n,e)};var Hve,Cut=/^[a-z_][-a-z0-9._]*$/i;function VT(){if(Hve)return mh;Hve=1,Object.defineProperty(mh,"__esModule",{value:!0}),mh.getData=mh.KeywordCxt=mh.validateFunctionCode=void 0;var t=function(){if(Ove)return Ag;Ove=1,Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.boolOrEmptySchema=Ag.topBoolOrEmptySchema=void 0;var O=$T(),H=Si(),G=Hf(),F={message:"boolean schema is false"};function Z(D,E){(0,O.reportError)({gen:D.gen,keyword:"false schema",data:D.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:D},F,void 0,E)}return Ag.topBoolOrEmptySchema=function(D){var E=D.gen,M=D.schema,U=D.validateName;!1===M?Z(D,!1):"object"==xt(M)&&!0===M.$async?E.return(G.default.data):(E.assign((0,H._)(dK||(dK=fe(["",".errors"])),U),null),E.return(!0))},Ag.boolOrEmptySchema=function(D,E){var M=D.gen;!1===D.schema?(M.var(E,!1),Z(D)):M.var(E,!0)},Ag}(),n=Db,e=Nve(),i=Db,r=function(){if(jve)return Ab;jve=1,Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.assignDefaults=void 0;var O=Si(),H=Bi;function G(F,Z,D){var E=F.gen,M=F.compositeRule,U=F.data,L=F.opts;if(void 0!==D){var X=(0,O._)(GK||(GK=fe(["","",""])),U,(0,O.getProperty)(Z));if(M)(0,H.checkStrictMode)(F,"default is ignored for: ".concat(X));else{var ne=(0,O._)(WK||(WK=fe([""," === undefined"])),X);"empty"===L.useDefaults&&(ne=(0,O._)(qK||(qK=fe([""," || "," === null || ",' === ""'])),ne,X,X)),E.if(ne,(0,O._)(YK||(YK=fe([""," = ",""])),X,(0,O.stringify)(D)))}}}return Ab.assignDefaults=function(F,Z){var D=F.schema,E=D.properties,M=D.items;if("object"===Z&&E)for(var U in E)G(F,U,E[U].default);else"array"===Z&&Array.isArray(M)&&M.forEach(function(L,X){return G(F,X,L.default)})},Ab}(),o=function gut(){if(Rve)return cu;Rve=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.validateKeywordUsage=cu.validSchemaType=cu.funcKeywordCode=cu.macroKeywordCode=void 0;var t=Si(),n=Hf(),e=uu(),i=$T();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(mX||(mX=fe(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return cu.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var g=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},g),s.pass(g,function(){return s.error(!0)})},cu.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,k){if(k.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var g=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,m=o(c,u,g),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(pX||(pX=fe(["await "]))):t.nil,k=p.opts.passContext?n.default.this:n.default.self,T=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(gX||(gX=fe(["","",""])),C,(0,e.callValidateCode)(s,m,k,T)),a.modifying)}function b(C){var k;c.if((0,t.not)(null!==(k=a.valid)&&void 0!==k?k:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),b(function(){return s.error()});else{var C=a.async?(T=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(uX||(uX=fe(["await "]))))},function(j){return c.assign(v,!1).if((0,t._)(dX||(dX=fe([""," instanceof ",""])),j,p.ValidationError),function(){return c.assign(T,(0,t._)(hX||(hX=fe(["",".errors"])),j))},function(){return c.throw(j)})}),T):(k=(0,t._)(fX||(fX=fe(["",".errors"])),m),c.assign(k,null),y(t.nil),k);a.modifying&&r(s),b(function(){return function(T,j){var B=T.gen;B.if((0,t._)(vX||(vX=fe(["Array.isArray(",")"])),j),function(){B.assign(n.default.vErrors,(0,t._)(yX||(yX=fe([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,j,n.default.vErrors,j)).assign(n.default.errors,(0,t._)(_X||(_X=fe(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(T)},function(){return T.error()})}(s,C)})}var T,k}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},cu.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==xt(s)&&!Array.isArray(s):xt(s)==c||l&&void 0===s})},cu.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(g){return!Object.prototype.hasOwnProperty.call(c,g)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},cu}(),s=function(){if(Lve)return yh;Lve=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.extendSubschemaMode=yh.extendSubschemaData=yh.getSubschema=void 0;var O=Si(),H=Bi;return yh.getSubschema=function(G,F){var Z=F.keyword,D=F.schemaProp,E=F.schema,M=F.schemaPath,U=F.errSchemaPath,L=F.topSchemaRef;if(void 0!==Z&&void 0!==E)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==Z){var X=G.schema[Z];return void 0===D?{schema:X,schemaPath:(0,O._)(bX||(bX=fe(["","",""])),G.schemaPath,(0,O.getProperty)(Z)),errSchemaPath:"".concat(G.errSchemaPath,"/").concat(Z)}:{schema:X[D],schemaPath:(0,O._)(wX||(wX=fe(["","","",""])),G.schemaPath,(0,O.getProperty)(Z),(0,O.getProperty)(D)),errSchemaPath:"".concat(G.errSchemaPath,"/").concat(Z,"/").concat((0,H.escapeFragment)(D))}}if(void 0!==E){if(void 0===M||void 0===U||void 0===L)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:E,schemaPath:M,topSchemaRef:L,errSchemaPath:U}}throw new Error('either "keyword" or "schema" must be passed')},yh.extendSubschemaData=function(G,F,Z){var D=Z.dataProp,E=Z.dataPropType,M=Z.data,U=Z.dataTypes,L=Z.propertyName;if(void 0!==M&&void 0!==D)throw new Error('both "data" and "dataProp" passed, only one allowed');var X=F.gen;if(void 0!==D){var ne=F.errorPath,ge=F.dataPathArr,ae=F.opts;De(X.let("data",(0,O._)(xX||(xX=fe(["","",""])),F.data,(0,O.getProperty)(D)),!0)),G.errorPath=(0,O.str)(CX||(CX=fe(["","",""])),ne,(0,H.getErrorPath)(D,E,ae.jsPropertySyntax)),G.parentDataProperty=(0,O._)(SX||(SX=fe(["",""])),D),G.dataPathArr=[].concat(sn(ge),[G.parentDataProperty])}function De(be){G.data=be,G.dataLevel=F.dataLevel+1,G.dataTypes=[],F.definedProperties=new Set,G.parentData=F.data,G.dataNames=[].concat(sn(F.dataNames),[be])}void 0!==M&&(De(M instanceof O.Name?M:X.let("data",M,!0)),void 0!==L&&(G.propertyName=L)),U&&(G.dataTypes=U)},yh.extendSubschemaMode=function(G,F){var Z=F.jtdDiscriminator,D=F.jtdMetadata,E=F.compositeRule,M=F.createErrors,U=F.allErrors;void 0!==E&&(G.compositeRule=E),void 0!==M&&(G.createErrors=M),void 0!==U&&(G.allErrors=U),G.jtdDiscriminator=Z,G.jtdMetadata=D},yh}(),a=Si(),l=Hf(),c=Ws,u=Bi,d=$T();function h(O,H){var M,G=O.gen,F=O.validateName,Z=O.schema,D=O.schemaEnv,E=O.opts;E.code.es5?G.func(F,(0,a._)(kX||(kX=fe(["",", ",""])),l.default.data,l.default.valCxt),D.$async,function(){var M,U;G.code((0,a._)(TX||(TX=fe(['"use strict"; ',""])),f(Z,E))),U=E,(M=G).if(l.default.valCxt,function(){M.var(l.default.instancePath,(0,a._)(MX||(MX=fe(["",".",""])),l.default.valCxt,l.default.instancePath)),M.var(l.default.parentData,(0,a._)(OX||(OX=fe(["",".",""])),l.default.valCxt,l.default.parentData)),M.var(l.default.parentDataProperty,(0,a._)(IX||(IX=fe(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),M.var(l.default.rootData,(0,a._)(NX||(NX=fe(["",".",""])),l.default.valCxt,l.default.rootData)),U.dynamicRef&&M.var(l.default.dynamicAnchors,(0,a._)(jX||(jX=fe(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){M.var(l.default.instancePath,(0,a._)(PX||(PX=fe(['""'])))),M.var(l.default.parentData,(0,a._)(RX||(RX=fe(["undefined"])))),M.var(l.default.parentDataProperty,(0,a._)(LX||(LX=fe(["undefined"])))),M.var(l.default.rootData,l.default.data),U.dynamicRef&&M.var(l.default.dynamicAnchors,(0,a._)(FX||(FX=fe(["{}"]))))}),G.code(H)}):G.func(F,(0,a._)(DX||(DX=fe(["",", ",""])),l.default.data,(M=E,(0,a._)(AX||(AX=fe(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,M.dynamicRef?(0,a._)(EX||(EX=fe([", ","={}"])),l.default.dynamicAnchors):a.nil))),D.$async,function(){return G.code(f(Z,E)).code(H)})}function f(O,H){var G="object"==xt(O)&&O[H.schemaId];return G&&(H.code.source||H.code.process)?(0,a._)(WX||(WX=fe(["/*# sourceURL="," */"])),G):a.nil}function g(O){var H=O.schema,G=O.self;if("boolean"==typeof H)return!H;for(var F in H)if(G.RULES.all[F])return!0;return!1}function m(O){return"boolean"!=typeof O.schema}function v(O){var H,G,F,D;(0,u.checkUnknownRules)(O),F=(H=O).errSchemaPath,D=H.self,(G=H.schema).$ref&&H.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(G,D.RULES)&&D.logger.warn('$ref: keywords ignored in schema at path "'.concat(F,'"'))}function y(O,H){if(O.opts.jtd)return C(O,[],!1,H);var G=(0,n.getSchemaTypes)(O.schema);C(O,G,!(0,n.coerceAndCheckDataType)(O,G),H)}function b(O){var H=O.gen,G=O.schemaEnv,Z=O.errSchemaPath,D=O.opts,E=O.schema.$comment;if(!0===D.$comment)H.code((0,a._)(YX||(YX=fe(["",".logger.log(",")"])),l.default.self,E));else if("function"==typeof D.$comment){var M=(0,a.str)(JX||(JX=fe(["","/$comment"])),Z),U=H.scopeValue("root",{ref:G.root});H.code((0,a._)(KX||(KX=fe(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,E,M,U))}}function C(O,H,G,F){var ne,ge,ae,De,Z=O.gen,D=O.schema,E=O.data,M=O.allErrors,U=O.opts,L=O.self.RULES;function X(ne){(0,e.shouldUseGroup)(D,ne)&&(ne.type?(Z.if((0,i.checkDataType)(ne.type,E,U.strictNumbers)),k(O,ne),1===H.length&&H[0]===ne.type&&G&&(Z.else(),(0,i.reportTypeError)(O)),Z.endIf()):k(O,ne),M||Z.if((0,a._)(iQ||(iQ=fe([""," === ",""])),l.default.errors,F||0)))}!D.$ref||!U.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(D,L)?(U.jtd||(ge=H,(ne=O).schemaEnv.meta||!ne.opts.strictTypes||(function(ae,De){if(De.length){if(!ae.dataTypes.length)return void(ae.dataTypes=De);De.forEach(function(be){j(ae.dataTypes,be)||B(ae,'type "'.concat(be,'" not allowed by context "').concat(ae.dataTypes.join(","),'"'))}),function(be,Ie){var R,J=[],K=_e(be.dataTypes);try{for(K.s();!(R=K.n()).done;){var pe=R.value;j(Ie,pe)?J.push(pe):Ie.includes("integer")&&"number"===pe&&J.push("integer")}}catch(Te){K.e(Te)}finally{K.f()}be.dataTypes=J}(ae,De)}}(ne,ge),ne.opts.allowUnionTypes||(ae=ne,(De=ge).length>1&&(2!==De.length||!De.includes("null"))&&B(ae,"use allowUnionTypes to allow union type keyword")),function(ae,De){var be=ae.self.RULES.all;for(var Ie in be){var R=be[Ie];if("object"==xt(R)&&(0,e.shouldUseRule)(ae.schema,R)){var J=R.definition.type;J.length&&!J.some(function(K){return T(De,K)})&&B(ae,'missing type "'.concat(J.join(","),'" for keyword "').concat(Ie,'"'))}}}(ne,ne.dataTypes))),Z.block(function(){var ne,ge=_e(L.rules);try{for(ge.s();!(ne=ge.n()).done;)X(ne.value)}catch(ae){ge.e(ae)}finally{ge.f()}X(L.post)})):Z.block(function(){return $(O,"$ref",L.all.$ref.definition)})}function k(O,H){var G=O.gen,F=O.schema;O.opts.useDefaults&&(0,r.assignDefaults)(O,H.type),G.block(function(){var Z,D=_e(H.rules);try{for(D.s();!(Z=D.n()).done;){var E=Z.value;(0,e.shouldUseRule)(F,E)&&$(O,E.keyword,E.definition,H.type)}}catch(M){D.e(M)}finally{D.f()}})}function T(O,H){return O.includes(H)||"number"===H&&O.includes("integer")}function j(O,H){return O.includes(H)||"integer"===H&&O.includes("number")}function B(O,H){H+=' at "'.concat(O.schemaEnv.baseId+O.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(O,H,O.opts.strictTypes)}mh.validateFunctionCode=function(O){var H,G,F,Z;m(O)&&(v(O),g(O))?(G=(H=O).schema,F=H.opts,Z=H.gen,h(H,function(){var D,M;F.$comment&&G.$comment&&b(H),M=(D=H).opts,void 0!==D.schema.default&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(D,"default is ignored in the schema root"),Z.let(l.default.vErrors,null),Z.let(l.default.errors,0),F.unevaluated&&function(D){var E=D.gen,M=D.validateName;D.evaluated=E.const("evaluated",(0,a._)($X||($X=fe(["",".evaluated"])),M)),E.if((0,a._)(BX||(BX=fe(["",".dynamicProps"])),D.evaluated),function(){return E.assign((0,a._)(VX||(VX=fe(["",".props"])),D.evaluated),(0,a._)(HX||(HX=fe(["undefined"]))))}),E.if((0,a._)(UX||(UX=fe(["",".dynamicItems"])),D.evaluated),function(){return E.assign((0,a._)(zX||(zX=fe(["",".items"])),D.evaluated),(0,a._)(GX||(GX=fe(["undefined"]))))})}(H),y(H),function(D){var ne,ge,ae,De,be,E=D.gen,U=D.validateName,L=D.ValidationError,X=D.opts;D.schemaEnv.$async?E.if((0,a._)(XX||(XX=fe([""," === 0"])),l.default.errors),function(){return E.return(l.default.data)},function(){return E.throw((0,a._)(QX||(QX=fe(["new ","(",")"])),L,l.default.vErrors))}):(E.assign((0,a._)(ZX||(ZX=fe(["",".errors"])),U),l.default.vErrors),X.unevaluated&&(ge=(ne=D).gen,ae=ne.evaluated,be=ne.items,(De=ne.props)instanceof a.Name&&ge.assign((0,a._)(tQ||(tQ=fe(["",".props"])),ae),De),be instanceof a.Name&&ge.assign((0,a._)(nQ||(nQ=fe(["",".items"])),ae),be)),E.return((0,a._)(eQ||(eQ=fe([""," === 0"])),l.default.errors)))}(H)})):h(O,function(){return(0,t.topBoolOrEmptySchema)(O)})};var N=function(){function O(H,G,F){if(ue(this,O),(0,o.validateKeywordUsage)(H,G,F),this.gen=H.gen,this.allErrors=H.allErrors,this.keyword=F,this.data=H.data,this.schema=H.schema[F],this.$data=G.$data&&H.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(H,this.schema,F,this.$data),this.schemaType=G.schemaType,this.parentSchema=H.schema,this.params={},this.it=H,this.def=G,this.$data)this.schemaCode=H.gen.const("vSchema",Y(this.$data,H));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,G.schemaType,G.allowUndefined))throw new Error("".concat(F," value must be ").concat(JSON.stringify(G.schemaType)));("code"in G?G.trackErrors:!1!==G.errors)&&(this.errsCount=H.gen.const("_errs",l.default.errors))}return de(O,[{key:"result",value:function(H,G,F){this.failResult((0,a.not)(H),G,F)}},{key:"failResult",value:function(H,G,F){this.gen.if(H),F?F():this.error(),G?(this.gen.else(),G(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(H,G){this.failResult((0,a.not)(H),void 0,G)}},{key:"fail",value:function(H){if(void 0===H)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(H),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(H){if(!this.$data)return this.fail(H);var G=this.schemaCode;this.fail((0,a._)(rQ||(rQ=fe([""," !== undefined && (",")"])),G,(0,a.or)(this.invalid$data(),H)))}},{key:"error",value:function(H,G,F){if(G)return this.setParams(G),this._error(H,F),void this.setParams({});this._error(H,F)}},{key:"_error",value:function(H,G){(H?d.reportExtraError:d.reportError)(this,this.def.error,G)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(H){this.allErrors||this.gen.if(H)}},{key:"setParams",value:function(H,G){G?Object.assign(this.params,H):this.params=H}},{key:"block$data",value:function(H,G){var F=this,Z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){F.check$data(H,Z),G()})}},{key:"check$data",value:function(){var H=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,G=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var F=this.gen,Z=this.schemaCode,D=this.schemaType,E=this.def;F.if((0,a.or)((0,a._)(oQ||(oQ=fe([""," === undefined"])),Z),G)),H!==a.nil&&F.assign(H,!0),(D.length||E.validateSchema)&&(F.elseIf(this.invalid$data()),this.$dataError(),H!==a.nil&&F.assign(H,!1)),F.else()}}},{key:"invalid$data",value:function(){var H=this.gen,G=this.schemaCode,F=this.schemaType,Z=this.def,D=this.it;return(0,a.or)(function(){if(F.length){if(!(G instanceof a.Name))throw new Error("ajv implementation error");var E=Array.isArray(F)?F:[F];return(0,a._)(sQ||(sQ=fe(["",""])),(0,i.checkDataTypes)(E,G,D.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(Z.validateSchema){var E=H.scopeValue("validate$data",{ref:Z.validateSchema});return(0,a._)(aQ||(aQ=fe(["!","(",")"])),E,G)}return a.nil}())}},{key:"subschema",value:function(H,G){var F=(0,s.getSubschema)(this.it,H);(0,s.extendSubschemaData)(F,this.it,H),(0,s.extendSubschemaMode)(F,H);var Z=Ee(Ee(Ee({},this.it),F),{},{items:void 0,props:void 0});return function p(O,H){m(O)&&(v(O),g(O))?function(G,F){var M,U,D=G.gen;G.opts.$comment&&G.schema.$comment&&b(G),(U=(M=G).schema[M.opts.schemaId])&&(M.baseId=(0,c.resolveUrl)(M.opts.uriResolver,M.baseId,U)),function(M){if(M.schema.$async&&!M.schemaEnv.$async)throw new Error("async schema in sync schema")}(G);var E=D.const("_errs",l.default.errors);y(G,E),D.var(F,(0,a._)(qX||(qX=fe([""," === ",""])),E,l.default.errors))}(O,H):(0,t.boolOrEmptySchema)(O,H)}(Z,G),Z}},{key:"mergeEvaluated",value:function(H,G){var F=this.it,Z=this.gen;F.opts.unevaluated&&(!0!==F.props&&void 0!==H.props&&(F.props=u.mergeEvaluated.props(Z,H.props,F.props,G)),!0!==F.items&&void 0!==H.items&&(F.items=u.mergeEvaluated.items(Z,H.items,F.items,G)))}},{key:"mergeValidEvaluated",value:function(H,G){var F=this,Z=this.it;if(Z.opts.unevaluated&&(!0!==Z.props||!0!==Z.items))return this.gen.if(G,function(){return F.mergeEvaluated(H,a.Name)}),!0}}]),O}();function $(O,H,G,F){var Z=new N(O,G,H);"code"in G?G.code(Z,F):Z.$data&&G.validate?(0,o.funcKeywordCode)(Z,G):"macro"in G?(0,o.macroKeywordCode)(Z,G):(G.compile||G.validate)&&(0,o.funcKeywordCode)(Z,G)}mh.KeywordCxt=N;var V=/^\/(?:[^~]|~0|~1)*$/,z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Y(O,H){var G,F,Z=H.dataLevel,D=H.dataNames,E=H.dataPathArr;if(""===O)return l.default.rootData;if("/"===O[0]){if(!V.test(O))throw new Error("Invalid JSON-pointer: ".concat(O));G=O,F=l.default.rootData}else{var M=z.exec(O);if(!M)throw new Error("Invalid JSON-pointer: ".concat(O));var U=+M[1];if("#"===(G=M[2])){if(U>=Z)throw new Error(ae("property/index",U));return E[Z-U]}if(U>Z)throw new Error(ae("data",U));if(F=D[Z-U],!G)return F}var L,X=F,ne=_e(G.split("/"));try{for(ne.s();!(L=ne.n()).done;){var ge=L.value;ge&&(F=(0,a._)(lQ||(lQ=fe(["","",""])),F,(0,a.getProperty)((0,u.unescapeJsonPointer)(ge))),X=(0,a._)(cQ||(cQ=fe([""," && ",""])),X,F))}}catch(De){ne.e(De)}finally{ne.f()}return X;function ae(De,be){return"Cannot access ".concat(De," ").concat(be," levels up, current level is ").concat(Z)}}return mh.getData=Y,mh}Ws.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=A0(t[r]||n),a={"":s},l=Bve(o,s,!1),c={},u=new Set;return _ut(t,{allKeys:!0},function(f,p,g,m){if(void 0!==m){var v=l+p,y=a[m];"string"==typeof f[r]&&(y=b.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function b(k){if(k=A0(y?(0,this.opts.uriResolver.resolve)(y,k):k),u.has(k))throw h(k);u.add(k);var j=this.refs[k];return"string"==typeof j&&(j=this.refs[j]),"object"==xt(j)?d(f,j.schema,k):k!==A0(v)&&("#"===k[0]?(d(f,c[k],k),c[k]=f):this.refs[k]=v),k}function C(k){if("string"==typeof k){if(!Cut.test(k))throw new Error('invalid anchor "'.concat(k,'"'));b.call(this,"#".concat(k))}}}),c;function d(f,p,g){if(void 0!==p&&!yut(f,p))throw h(g)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var Uve,HT={};function _4(){if(Uve)return HT;Uve=1,Object.defineProperty(HT,"__esModule",{value:!0});var t=function(n){We(i,r_(Error));var e=qe(i);function i(r){var o;return ue(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return de(i)}();return HT.default=t,HT}var zve,UT={};function b4(){if(zve)return UT;zve=1,Object.defineProperty(UT,"__esModule",{value:!0});var t=Ws,n=function(e){We(r,r_(Error));var i=qe(r);function r(o,s,a,l){var c;return ue(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return de(r)}();return UT.default=n,UT}var Za={};Object.defineProperty(Za,"__esModule",{value:!0}),Za.resolveSchema=Za.getCompilingSchema=Za.resolveRef=Za.compileSchema=Za.SchemaEnv=void 0;var du=Si(),Sut=_4(),Mg=Hf(),hu=Ws,Gve=Bi,kut=VT(),zT=de(function t(n){var e,i;ue(this,t),this.refs={},this.dynamicAnchors={},"object"==xt(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,hu.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function w4(t){var n=Wve.call(this,t);if(n)return n;var e,i=(0,hu.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new du.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:Sut.default,code:(0,du._)(uQ||(uQ=fe(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:Mg.default.data,parentData:Mg.default.parentData,parentDataProperty:Mg.default.parentDataProperty,dataNames:[Mg.default.data],dataPathArr:[du.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,du.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:du.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,du._)(dQ||(dQ=fe(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,kut.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(Mg.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(Mg.default.self),"".concat(Mg.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,g=d.items;f.evaluated={props:p instanceof du.Name?void 0:p,items:g instanceof du.Name?void 0:g,dynamicProps:p instanceof du.Name,dynamicItems:g instanceof du.Name},f.source&&(f.source.evaluated=(0,du.stringify)(f.evaluated))}return t.validate=f,t}catch(m){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),m}finally{this._compilations.delete(t)}}function Tut(t){return(0,hu.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:w4.call(this,t)}function Wve(t){var n,e,i,r=_e(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function Dut(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||GT.call(this,t,n)}function GT(t,n){var e=this.opts.uriResolver.parse(n),i=(0,hu._getFullPath)(this.opts.uriResolver,e),r=(0,hu.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return x4.call(this,e,t);var o=(0,hu.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=GT.call(this,t,s);return"object"!==xt(a?.schema)?void 0:x4.call(this,e,a)}if("object"===xt(s?.schema)){if(s.validate||w4.call(this,s),o===(0,hu.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,hu.resolveUrl)(this.opts.uriResolver,r,u)),new zT({schema:l,schemaId:c,root:t,baseId:r})}return x4.call(this,e,s)}}Za.SchemaEnv=zT,Za.compileSchema=w4,Za.resolveRef=function(t,n,e){var i;e=(0,hu.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=Dut.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new zT({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=Tut.call(this,o):void 0},Za.getCompilingSchema=Wve,Za.resolveSchema=GT;var Aut=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function x4(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=_e(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,Gve.unescapeFragment)(c)];if(void 0===u)return;var d="object"===xt(r=u)&&r[this.opts.schemaId];!Aut.has(c)&&d&&(i=(0,hu.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,Gve.schemaHasRulesButRef)(r,this.RULES)){var h=(0,hu.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=GT.call(this,o,h)}return(a=a||new zT({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var Eut={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},C4={},qve={};(function(t){function n(){for(var le=arguments.length,Ce=Array(le),ke=0;ke1){Ce[0]=Ce[0].slice(0,-1);for(var Pe=Ce.length-1,Se=1;Se= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,V=String.fromCharCode;function z(le){throw new RangeError(B[le])}function O(le,Ce){var ke=le.split("@"),Pe="";return ke.length>1&&(Pe=ke[0]+"@",le=ke[1]),Pe+function Y(le,Ce){for(var ke=[],Pe=le.length;Pe--;)ke[Pe]=Ce(le[Pe]);return ke}((le=le.replace(j,".")).split("."),Ce).join(".")}function H(le){for(var Ce=[],ke=0,Pe=le.length;ke=55296&&Se<=56319&&ke>1,le+=$(le/Ce);le>455;Pe+=f)le=$(le/35);return $(Pe+36*le/(le+38))},E=function(le){var Ce=[],ke=le.length,Pe=0,Se=128,At=72,rn=le.lastIndexOf("-");rn<0&&(rn=0);for(var hn=0;hn=128&&z("not-basic"),Ce.push(le.charCodeAt(hn));for(var dn=rn>0?rn+1:0;dn=ke&&z("invalid-input");var bi=F(le.charCodeAt(dn++));(bi>=f||bi>$((h-Pe)/Yi))&&z("overflow"),Pe+=bi*Yi;var he=vn<=At?1:vn>=At+26?26:vn-At;if(bi$(h/Ye)&&z("overflow"),Yi*=Ye}var ot=Ce.length+1;At=D(Pe-Di,ot,0==Di),$(Pe/ot)>h-Se&&z("overflow"),Se+=$(Pe/ot),Pe%=ot,Ce.splice(Pe++,0,Se)}return String.fromCodePoint.apply(String,Ce)},M=function(le){var Ce=[],ke=(le=H(le)).length,Pe=128,Se=0,At=72,rn=!0,hn=!1,dn=void 0;try{for(var Di,Yi=le[Symbol.iterator]();!(rn=(Di=Yi.next()).done);rn=!0){var vn=Di.value;vn<128&&Ce.push(V(vn))}}catch(mu){hn=!0,dn=mu}finally{try{!rn&&Yi.return&&Yi.return()}finally{if(hn)throw dn}}var bi=Ce.length,he=bi;for(bi&&Ce.push("-");he=Pe&&Vt$((h-Se)/tn)&&z("overflow"),Se+=(Ye-Pe)*tn,Pe=Ye;var Xt=!0,wi=!1,Oi=void 0;try{for(var Nr,us=le[Symbol.iterator]();!(Xt=(Nr=us.next()).done);Xt=!0){var pu=Nr.value;if(puh&&z("overflow"),pu==Pe){for(var mc=Se,ds=f;;ds+=f){var Ma=ds<=At?1:ds>=At+26?26:ds-At;if(mc>6|192).toString(16).toUpperCase()+"%"+(63&Ce|128).toString(16).toUpperCase():"%"+(Ce>>12|224).toString(16).toUpperCase()+"%"+(Ce>>6&63|128).toString(16).toUpperCase()+"%"+(63&Ce|128).toString(16).toUpperCase()}function ae(le){for(var Ce="",ke=0,Pe=le.length;ke=194&&Se<224){if(Pe-ke>=6){var At=parseInt(le.substr(ke+4,2),16);Ce+=String.fromCharCode((31&Se)<<6|63&At)}else Ce+=le.substr(ke,6);ke+=6}else if(Se>=224){if(Pe-ke>=9){var rn=parseInt(le.substr(ke+4,2),16),hn=parseInt(le.substr(ke+7,2),16);Ce+=String.fromCharCode((15&Se)<<12|(63&rn)<<6|63&hn)}else Ce+=le.substr(ke,9);ke+=9}else Ce+=le.substr(ke,3),ke+=3}return Ce}function De(le,Ce){function ke(Pe){var Se=ae(Pe);return Se.match(Ce.UNRESERVED)?Se:Pe}return le.scheme&&(le.scheme=String(le.scheme).replace(Ce.PCT_ENCODED,ke).toLowerCase().replace(Ce.NOT_SCHEME,"")),void 0!==le.userinfo&&(le.userinfo=String(le.userinfo).replace(Ce.PCT_ENCODED,ke).replace(Ce.NOT_USERINFO,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.host&&(le.host=String(le.host).replace(Ce.PCT_ENCODED,ke).toLowerCase().replace(Ce.NOT_HOST,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.path&&(le.path=String(le.path).replace(Ce.PCT_ENCODED,ke).replace(le.scheme?Ce.NOT_PATH:Ce.NOT_PATH_NOSCHEME,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.query&&(le.query=String(le.query).replace(Ce.PCT_ENCODED,ke).replace(Ce.NOT_QUERY,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.fragment&&(le.fragment=String(le.fragment).replace(Ce.PCT_ENCODED,ke).replace(Ce.NOT_FRAGMENT,ge).replace(Ce.PCT_ENCODED,r)),le}function be(le){return le.replace(/^0*(.*)/,"$1")||"0"}function Ie(le,Ce){var ke=le.match(Ce.IPV4ADDRESS)||[],Pe=u(ke,2)[1];return Pe?Pe.split(".").map(be).join("."):le}function R(le,Ce){var ke=le.match(Ce.IPV6ADDRESS)||[],Pe=u(ke,3),Se=Pe[1],At=Pe[2];if(Se){for(var rn=Se.toLowerCase().split("::").reverse(),hn=u(rn,2),dn=hn[0],Di=hn[1],Yi=Di?Di.split(":").map(be):[],vn=dn.split(":").map(be),bi=Ce.IPV4ADDRESS.test(vn[vn.length-1]),he=bi?7:8,Ye=vn.length-he,ot=Array(he),ht=0;ht1){var Rn=ot.slice(0,vt.index),Vt=ot.slice(vt.index+vt.length);on=Rn.join(":")+"::"+Vt.join(":")}else on=ot.join(":");return At&&(on+="%"+At),on}return le}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,K=void 0==="".match(/(){0}/)[1];function pe(le){var Ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},ke={},Pe=!1!==Ce.iri?c:l;"suffix"===Ce.reference&&(le=(Ce.scheme?Ce.scheme+":":"")+"//"+le);var Se=le.match(J);if(Se){K?(ke.scheme=Se[1],ke.userinfo=Se[3],ke.host=Se[4],ke.port=parseInt(Se[5],10),ke.path=Se[6]||"",ke.query=Se[7],ke.fragment=Se[8],isNaN(ke.port)&&(ke.port=Se[5])):(ke.scheme=Se[1]||void 0,ke.userinfo=-1!==le.indexOf("@")?Se[3]:void 0,ke.host=-1!==le.indexOf("//")?Se[4]:void 0,ke.port=parseInt(Se[5],10),ke.path=Se[6]||"",ke.query=-1!==le.indexOf("?")?Se[7]:void 0,ke.fragment=-1!==le.indexOf("#")?Se[8]:void 0,isNaN(ke.port)&&(ke.port=le.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Se[4]:void 0)),ke.host&&(ke.host=R(Ie(ke.host,Pe),Pe)),ke.reference=void 0!==ke.scheme||void 0!==ke.userinfo||void 0!==ke.host||void 0!==ke.port||ke.path||void 0!==ke.query?void 0===ke.scheme?"relative":void 0===ke.fragment?"absolute":"uri":"same-document",Ce.reference&&"suffix"!==Ce.reference&&Ce.reference!==ke.reference&&(ke.error=ke.error||"URI is not a "+Ce.reference+" reference.");var At=ne[(Ce.scheme||ke.scheme||"").toLowerCase()];if(Ce.unicodeSupport||At&&At.unicodeSupport)De(ke,Pe);else{if(ke.host&&(Ce.domainHost||At&&At.domainHost))try{ke.host=X.toASCII(ke.host.replace(Pe.PCT_ENCODED,ae).toLowerCase())}catch(rn){ke.error=ke.error||"Host's domain name can not be converted to ASCII via punycode: "+rn}De(ke,l)}At&&At.parse&&At.parse(ke,Ce)}else ke.error=ke.error||"URI can not be parsed.";return ke}var ye=/^\.\.?\//,Ue=/^\/\.(\/|$)/,Je=/^\/\.\.(\/|$)/,_t=/^\/?(?:.|\n)*?(?=\/|$)/;function zt(le){for(var Ce=[];le.length;)if(le.match(ye))le=le.replace(ye,"");else if(le.match(Ue))le=le.replace(Ue,"/");else if(le.match(Je))le=le.replace(Je,"/"),Ce.pop();else if("."===le||".."===le)le="";else{var ke=le.match(_t);if(!ke)throw new Error("Unexpected dot segment condition");var Pe=ke[0];le=le.slice(Pe.length),Ce.push(Pe)}return Ce.join("")}function ct(le){var Ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},ke=Ce.iri?c:l,Pe=[],Se=ne[(Ce.scheme||le.scheme||"").toLowerCase()];if(Se&&Se.serialize&&Se.serialize(le,Ce),le.host&&!ke.IPV6ADDRESS.test(le.host)&&(Ce.domainHost||Se&&Se.domainHost))try{le.host=Ce.iri?X.toUnicode(le.host):X.toASCII(le.host.replace(ke.PCT_ENCODED,ae).toLowerCase())}catch(hn){le.error=le.error||"Host's domain name can not be converted to "+(Ce.iri?"Unicode":"ASCII")+" via punycode: "+hn}De(le,ke),"suffix"!==Ce.reference&&le.scheme&&(Pe.push(le.scheme),Pe.push(":"));var At=function Te(le,Ce){var ke=!1!==Ce.iri?c:l,Pe=[];return void 0!==le.userinfo&&(Pe.push(le.userinfo),Pe.push("@")),void 0!==le.host&&Pe.push(R(Ie(String(le.host),ke),ke).replace(ke.IPV6ADDRESS,function(Se,At,rn){return"["+At+(rn?"%25"+rn:"")+"]"})),"number"!=typeof le.port&&"string"!=typeof le.port||(Pe.push(":"),Pe.push(String(le.port))),Pe.length?Pe.join(""):void 0}(le,Ce);if(void 0!==At&&("suffix"!==Ce.reference&&Pe.push("//"),Pe.push(At),le.path&&"/"!==le.path.charAt(0)&&Pe.push("/")),void 0!==le.path){var rn=le.path;Ce.absolutePath||Se&&Se.absolutePath||(rn=zt(rn)),void 0===At&&(rn=rn.replace(/^\/\//,"/%2F")),Pe.push(rn)}return void 0!==le.query&&(Pe.push("?"),Pe.push(le.query)),void 0!==le.fragment&&(Pe.push("#"),Pe.push(le.fragment)),Pe.join("")}function Nn(le,Ce){var ke=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Pe={};return arguments[3]||(le=pe(ct(le,ke),ke),Ce=pe(ct(Ce,ke),ke)),!(ke=ke||{}).tolerant&&Ce.scheme?(Pe.scheme=Ce.scheme,Pe.userinfo=Ce.userinfo,Pe.host=Ce.host,Pe.port=Ce.port,Pe.path=zt(Ce.path||""),Pe.query=Ce.query):(void 0!==Ce.userinfo||void 0!==Ce.host||void 0!==Ce.port?(Pe.userinfo=Ce.userinfo,Pe.host=Ce.host,Pe.port=Ce.port,Pe.path=zt(Ce.path||""),Pe.query=Ce.query):(Ce.path?("/"===Ce.path.charAt(0)?Pe.path=zt(Ce.path):(Pe.path=void 0===le.userinfo&&void 0===le.host&&void 0===le.port||le.path?le.path?le.path.slice(0,le.path.lastIndexOf("/")+1)+Ce.path:Ce.path:"/"+Ce.path,Pe.path=zt(Pe.path)),Pe.query=Ce.query):(Pe.path=le.path,Pe.query=void 0!==Ce.query?Ce.query:le.query),Pe.userinfo=le.userinfo,Pe.host=le.host,Pe.port=le.port),Pe.scheme=le.scheme),Pe.fragment=Ce.fragment,Pe}function yi(le,Ce){return le&&le.toString().replace(Ce&&Ce.iri?c.PCT_ENCODED:l.PCT_ENCODED,ae)}var bn={scheme:"http",domainHost:!0,parse:function(le,Ce){return le.host||(le.error=le.error||"HTTP URIs must have a host."),le},serialize:function(le,Ce){var ke="https"===String(le.scheme).toLowerCase();return le.port!==(ke?443:80)&&""!==le.port||(le.port=void 0),le.path||(le.path="/"),le}},Hi={scheme:"https",domainHost:bn.domainHost,parse:bn.parse,serialize:bn.serialize};function Ir(le){return"boolean"==typeof le.secure?le.secure:"wss"===String(le.scheme).toLowerCase()}var Nt={scheme:"ws",domainHost:!0,parse:function(le,Ce){var ke=le;return ke.secure=Ir(ke),ke.resourceName=(ke.path||"/")+(ke.query?"?"+ke.query:""),ke.path=void 0,ke.query=void 0,ke},serialize:function(le,Ce){if(le.port!==(Ir(le)?443:80)&&""!==le.port||(le.port=void 0),"boolean"==typeof le.secure&&(le.scheme=le.secure?"wss":"ws",le.secure=void 0),le.resourceName){var ke=le.resourceName.split("?"),Pe=u(ke,2),Se=Pe[0],At=Pe[1];le.path=Se&&"/"!==Se?Se:void 0,le.query=At,le.resourceName=void 0}return le.fragment=void 0,le}},Ge={scheme:"wss",domainHost:Nt.domainHost,parse:Nt.parse,serialize:Nt.serialize},cn={},Pn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ti="[0-9A-Fa-f]",vr=e(e("%[EFef]"+Ti+"%"+Ti+Ti+"%"+Ti+Ti)+"|"+e("%[89A-Fa-f]"+Ti+"%"+Ti+Ti)+"|"+e("%"+Ti+Ti)),Be=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),an=new RegExp(Pn,"g"),wn=new RegExp(vr,"g"),Mi=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Be),"g"),Ui=new RegExp(n("[^]",Pn,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),nr=Ui;function Go(le){var Ce=ae(le);return Ce.match(an)?Ce:le}var _i={scheme:"mailto",parse:function(le,Ce){var ke=le,Pe=ke.to=ke.path?ke.path.split(","):[];if(ke.path=void 0,ke.query){for(var Se=!1,At={},rn=ke.query.split("&"),hn=0,dn=rn.length;hn string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=function(){function D(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ue(this,D),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,E=this.opts=Ee(Ee({},E),function y(D){var E,M,U,L,X,ne,ge,ae,De,be,Ie,R,J,K,pe,Te,ye,Ue,Je,_t,zt,ct,Nn,mt,pi,ki=D.strict,ci=null===(E=D.code)||void 0===E?void 0:E.optimize,yi=!0===ci||void 0===ci?1:ci||0,bn=null!==(U=null===(M=D.code)||void 0===M?void 0:M.regExp)&&void 0!==U?U:f,Hi=null!==(L=D.uriResolver)&&void 0!==L?L:h.default;return{strictSchema:null===(ne=null!==(X=D.strictSchema)&&void 0!==X?X:ki)||void 0===ne||ne,strictNumbers:null===(ae=null!==(ge=D.strictNumbers)&&void 0!==ge?ge:ki)||void 0===ae||ae,strictTypes:null!==(be=null!==(De=D.strictTypes)&&void 0!==De?De:ki)&&void 0!==be?be:"log",strictTuples:null!==(R=null!==(Ie=D.strictTuples)&&void 0!==Ie?Ie:ki)&&void 0!==R?R:"log",strictRequired:null!==(K=null!==(J=D.strictRequired)&&void 0!==J?J:ki)&&void 0!==K&&K,code:D.code?Ee(Ee({},D.code),{},{optimize:yi,regExp:bn}):{optimize:yi,regExp:bn},loopRequired:null!==(pe=D.loopRequired)&&void 0!==pe?pe:200,loopEnum:null!==(Te=D.loopEnum)&&void 0!==Te?Te:200,meta:null===(ye=D.meta)||void 0===ye||ye,messages:null===(Ue=D.messages)||void 0===Ue||Ue,inlineRefs:null===(Je=D.inlineRefs)||void 0===Je||Je,schemaId:null!==(_t=D.schemaId)&&void 0!==_t?_t:"$id",addUsedSchema:null===(zt=D.addUsedSchema)||void 0===zt||zt,validateSchema:null===(ct=D.validateSchema)||void 0===ct||ct,validateFormats:null===(Nn=D.validateFormats)||void 0===Nn||Nn,unicodeRegExp:null===(mt=D.unicodeRegExp)||void 0===mt||mt,int32range:null===(pi=D.int32range)||void 0===pi||pi,uriResolver:Hi}}(E));var M=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:M.es5,lines:M.lines}),this.logger=function V(D){if(!1===D)return $;if(void 0===D)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}(E.logger);var X=E.validateFormats;E.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,m,E,"NOT SUPPORTED"),C.call(this,v,E,"DEPRECATED","warn"),this._metaOpts=N.call(this),E.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),E.keywords&&B.call(this,E.keywords),"object"==xt(E.meta)&&this.addMetaSchema(E.meta),T.call(this),E.validateFormats=X}return de(D,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var E=this.opts,M=E.$data,U=E.meta,L=E.schemaId,X=d;"id"===L&&((X=Ee({},d)).id=X.$id,delete X.$id),U&&M&&this.addMetaSchema(X,X[L],!1)}},{key:"defaultMeta",value:function(){var E=this.opts,M=E.meta,U=E.schemaId;return this.opts.defaultMeta="object"==xt(M)?M[U]||M:void 0}},{key:"validate",value:function(E,M){var U;if("string"==typeof E){if(!(U=this.getSchema(E)))throw new Error('no schema with key or ref "'.concat(E,'"'))}else U=this.compile(E);var L=U(M);return"$async"in U||(this.errors=U.errors),L}},{key:"compile",value:function(E,M){var U=this._addSchema(E,M);return U.validate||this._compileSchemaEnv(U)}},{key:"compileAsync",value:function(E,M){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var U=this.opts.loadSchema;return L.call(this,E,M);function L(pe,Te){return X.apply(this,arguments)}function X(){return(X=ni(bt().mark(function pe(Te,ye){var Ue;return bt().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.next=2,ne.call(this,Te.$schema);case 2:return Ue=this._addSchema(Te,ye),Je.abrupt("return",Ue.validate||ae.call(this,Ue));case 4:case"end":return Je.stop()}},pe,this)}))).apply(this,arguments)}function ne(pe){return ge.apply(this,arguments)}function ge(){return(ge=ni(bt().mark(function pe(Te){return bt().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(!Te||this.getSchema(Te)){ye.next=3;break}return ye.next=3,L.call(this,{$ref:Te},!0);case 3:case"end":return ye.stop()}},pe,this)}))).apply(this,arguments)}function ae(pe){return De.apply(this,arguments)}function De(){return(De=ni(bt().mark(function pe(Te){return bt().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return ye.prev=0,ye.abrupt("return",this._compileSchemaEnv(Te));case 4:if(ye.prev=4,ye.t0=ye.catch(0),ye.t0 instanceof r.default){ye.next=8;break}throw ye.t0;case 8:return be.call(this,ye.t0),ye.next=11,Ie.call(this,ye.t0.missingSchema);case 11:return ye.abrupt("return",ae.call(this,Te));case 12:case"end":return ye.stop()}},pe,this,[[0,4]])}))).apply(this,arguments)}function be(pe){var Te=pe.missingSchema,ye=pe.missingRef;if(this.refs[Te])throw new Error("AnySchema ".concat(Te," is loaded but ").concat(ye," cannot be resolved"))}function Ie(pe){return R.apply(this,arguments)}function R(){return(R=ni(bt().mark(function pe(Te){var ye;return bt().wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ue.next=2,J.call(this,Te);case 2:if(ye=Ue.sent,this.refs[Te]){Ue.next=6;break}return Ue.next=6,ne.call(this,ye.$schema);case 6:this.refs[Te]||this.addSchema(ye,Te,M);case 7:case"end":return Ue.stop()}},pe,this)}))).apply(this,arguments)}function J(pe){return K.apply(this,arguments)}function K(){return(K=ni(bt().mark(function pe(Te){var ye;return bt().wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(!(ye=this._loading[Te])){Ue.next=3;break}return Ue.abrupt("return",ye);case 3:return Ue.prev=3,Ue.next=6,this._loading[Te]=U(Te);case 6:return Ue.abrupt("return",Ue.sent);case 7:return Ue.prev=7,delete this._loading[Te],Ue.finish(7);case 10:case"end":return Ue.stop()}},pe,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(E,M,U){var L,X=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(E)){var ne,ge=_e(E);try{for(ge.s();!(ne=ge.n()).done;)this.addSchema(ne.value,void 0,U,X)}catch(be){ge.e(be)}finally{ge.f()}return this}if("object"===xt(E)){var De=this.opts.schemaId;if(void 0!==(L=E[De])&&"string"!=typeof L)throw new Error("schema ".concat(De," must be string"))}return M=(0,l.normalizeId)(M||L),this._checkUnique(M),this.schemas[M]=this._addSchema(E,U,M,X,!0),this}},{key:"addMetaSchema",value:function(E,M){return this.addSchema(E,M,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(E,M){if("boolean"==typeof E)return!0;var U;if(void 0!==(U=E.$schema)&&"string"!=typeof U)throw new Error("$schema must be a string");if(!(U=U||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var L=this.validate(U,E);if(!L&&M){var X="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(X);this.logger.error(X)}return L}},{key:"getSchema",value:function(E){for(var M;"string"==typeof(M=k.call(this,E));)E=M;if(void 0===M){var L=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(M=s.resolveSchema.call(this,L,E)))return;this.refs[E]=M}return M.validate||this._compileSchemaEnv(M)}},{key:"removeSchema",value:function(E){if(E instanceof RegExp)return this._removeAllSchemas(this.schemas,E),this._removeAllSchemas(this.refs,E),this;switch(xt(E)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var M=k.call(this,E);return"object"==xt(M)&&this._cache.delete(M.schema),delete this.schemas[E],delete this.refs[E],this;case"object":this._cache.delete(E);var L=E[this.opts.schemaId];return L&&(L=(0,l.normalizeId)(L),delete this.schemas[L],delete this.refs[L]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(E){var M,U=_e(E);try{for(U.s();!(M=U.n()).done;)this.addKeyword(M.value)}catch(X){U.e(X)}finally{U.f()}return this}},{key:"addKeyword",value:function(E,M){var U,L=this;if("string"==typeof E)U=E,"object"==xt(M)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=U);else{if("object"!=xt(E)||void 0!==M)throw new Error("invalid addKeywords parameters");if(U=(M=E).keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(Y.call(this,U,M),!M)return(0,u.eachItem)(U,function(ne){return O.call(L,ne)}),this;G.call(this,M);var X=Ee(Ee({},M),{},{type:(0,c.getJSONTypes)(M.type),schemaType:(0,c.getJSONTypes)(M.schemaType)});return(0,u.eachItem)(U,0===X.type.length?function(ne){return O.call(L,ne,X)}:function(ne){return X.type.forEach(function(ge){return O.call(L,ne,X,ge)})}),this}},{key:"getKeyword",value:function(E){var M=this.RULES.all[E];return"object"==xt(M)?M.definition:!!M}},{key:"removeKeyword",value:function(E){var M=this.RULES;delete M.keywords[E],delete M.all[E];var U,L=_e(M.rules);try{for(L.s();!(U=L.n()).done;){var X=U.value,ne=X.rules.findIndex(function(ge){return ge.keyword===E});ne>=0&&X.rules.splice(ne,1)}}catch(ge){L.e(ge)}finally{L.f()}return this}},{key:"addFormat",value:function(E,M){return"string"==typeof M&&(M=new RegExp(M)),this.formats[E]=M,this}},{key:"errorsText",value:function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,M=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},U=M.separator,L=void 0===U?", ":U,X=M.dataVar,ne=void 0===X?"data":X;return E&&0!==E.length?E.map(function(ge){return"".concat(ne).concat(ge.instancePath," ").concat(ge.message)}).reduce(function(ge,ae){return ge+L+ae}):"No errors"}},{key:"$dataMetaSchema",value:function(E,M){var U=this.RULES.all;E=JSON.parse(JSON.stringify(E));var L,X=_e(M);try{for(X.s();!(L=X.n()).done;){var ne,ge=L.value.split("/").slice(1),ae=E,De=_e(ge);try{for(De.s();!(ne=De.n()).done;)ae=ae[ne.value]}catch(K){De.e(K)}finally{De.f()}for(var be in U){var Ie=U[be];if("object"==xt(Ie)){var J=ae[be];Ie.definition.$data&&J&&(ae[be]=Z(J))}}}}catch(K){X.e(K)}finally{X.f()}return E}},{key:"_removeAllSchemas",value:function(E,M){for(var U in E){var L=E[U];M&&!M.test(U)||("string"==typeof L?delete E[U]:L&&!L.meta&&(this._cache.delete(L.schema),delete E[U]))}}},{key:"_addSchema",value:function(E,M,U){var L,X=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,ne=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,ge=this.opts.schemaId;if("object"==xt(E))L=E[ge];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof E)throw new Error("schema must be object or boolean")}var ae=this._cache.get(E);if(void 0!==ae)return ae;U=(0,l.normalizeId)(L||U);var De=l.getSchemaRefs.call(this,E,U);return ae=new s.SchemaEnv({schema:E,schemaId:ge,meta:M,baseId:U,localRefs:De}),this._cache.set(ae.schema,ae),ne&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=ae),X&&this.validateSchema(E,!0),ae}},{key:"_checkUnique",value:function(E){if(this.schemas[E]||this.refs[E])throw new Error('schema with key or id "'.concat(E,'" already exists'))}},{key:"_compileSchemaEnv",value:function(E){if(E.meta?this._compileMetaSchema(E):s.compileSchema.call(this,E),!E.validate)throw new Error("ajv implementation error");return E.validate}},{key:"_compileMetaSchema",value:function(E){var M=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,E)}finally{this.opts=M}}}]),D}();function C(D,E,M){var U=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var L in D){var X=L;X in E&&this.logger[U]("".concat(M,": option ").concat(L,". ").concat(D[X]))}}function k(D){return D=(0,l.normalizeId)(D),this.schemas[D]||this.refs[D]}function T(){var D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(var E in D)this.addSchema(D[E],E)}function j(){for(var D in this.opts.formats){var E=this.opts.formats[D];E&&this.addFormat(D,E)}}function B(D){if(Array.isArray(D))this.addVocabulary(D);else for(var E in this.logger.warn("keywords option as map is deprecated, pass array"),D){var M=D[E];M.keyword||(M.keyword=E),this.addKeyword(M)}}function N(){var D,E=Ee({},this.opts),M=_e(p);try{for(M.s();!(D=M.n()).done;)delete E[D.value]}catch(U){M.e(U)}finally{M.f()}return E}t.default=b,b.ValidationError=i.default,b.MissingRefError=r.default;var $={log:function(){},warn:function(){},error:function(){}},z=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(D,E){var M=this.RULES;if((0,u.eachItem)(D,function(U){if(M.keywords[U])throw new Error("Keyword ".concat(U," is already defined"));if(!z.test(U))throw new Error("Keyword ".concat(U," has invalid name"))}),E&&E.$data&&!("code"in E)&&!("validate"in E))throw new Error('$data keyword must have "code" or "validate" function')}function O(D,E,M){var U,L=this,X=E?.post;if(M&&X)throw new Error('keyword with "post" flag cannot have "type"');var ne=this.RULES,ge=X?ne.post:ne.rules.find(function(De){return De.type===M});if(ge||ne.rules.push(ge={type:M,rules:[]}),ne.keywords[D]=!0,E){var ae={keyword:D,definition:Ee(Ee({},E),{},{type:(0,c.getJSONTypes)(E.type),schemaType:(0,c.getJSONTypes)(E.schemaType)})};E.before?H.call(this,ge,ae,E.before):ge.rules.push(ae),ne.all[D]=ae,null===(U=E.implements)||void 0===U||U.forEach(function(De){return L.addKeyword(De)})}}function H(D,E,M){var U=D.rules.findIndex(function(L){return L.keyword===M});U>=0?D.rules.splice(U,0,E):(D.rules.push(E),this.logger.warn("rule ".concat(M," is not defined")))}function G(D){var E=D.metaSchema;void 0!==E&&(D.$data&&this.opts.$data&&(E=Z(E)),D.validateSchema=this.compile(E,!0))}var F={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Z(D){return{anyOf:[D,F]}}}(wve);var S4={},k4={},T4={};Object.defineProperty(T4,"__esModule",{value:!0}),T4.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var Og={};Object.defineProperty(Og,"__esModule",{value:!0}),Og.callRef=Og.getValidate=void 0;var Out=b4(),Jve=uu(),el=Si(),E0=Hf(),Kve=Za,WT=Bi,Iut={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return qT(t,s,o,o.$async);var g=n.scopeValue("root",{ref:c});return qT(t,(0,el._)(hQ||(hQ=fe(["",".validate"])),g),c,c.$async)}();var u,d,h,f,g,m,p=Kve.resolveRef.call(l,c,r,e);if(void 0===p)throw new Out.default(i.opts.uriResolver,r,e);return p instanceof Kve.SchemaEnv?(m=Xve(t,g=p),void qT(t,m,g,g.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,el.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:el.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function Xve(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,el._)(fQ||(fQ=fe(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function qT(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?E0.default.this:el.nil;function c(d){var h=(0,el._)(mQ||(mQ=fe(["",".errors"])),d);r.assign(E0.default.vErrors,(0,el._)(vQ||(vQ=fe([""," === null ? "," : ",".concat(",")"])),E0.default.vErrors,h,E0.default.vErrors,h)),r.assign(E0.default.errors,(0,el._)(yQ||(yQ=fe(["",".length"])),E0.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=WT.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,el._)(_Q||(_Q=fe(["",".evaluated.props"])),d));o.props=WT.mergeEvaluated.props(r,p,o.props,el.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=WT.mergeEvaluated.items(r,f.items,o.items));else{var g=r.var("items",(0,el._)(bQ||(bQ=fe(["",".evaluated.items"])),d));o.items=WT.mergeEvaluated.items(r,g,o.items,el.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,el._)(pQ||(pQ=fe(["await ",""])),(0,Jve.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,el._)(gQ||(gQ=fe(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,Jve.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}Og.getValidate=Xve,Og.callRef=qT,Og.default=Iut,Object.defineProperty(k4,"__esModule",{value:!0}),k4.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",T4.default,Og.default];var D4={},A4={};Object.defineProperty(A4,"__esModule",{value:!0});var YT=Si(),zf=YT.operators,JT={maximum:{okStr:"<=",ok:zf.LTE,fail:zf.GT},minimum:{okStr:">=",ok:zf.GTE,fail:zf.LT},exclusiveMaximum:{okStr:"<",ok:zf.LT,fail:zf.GTE},exclusiveMinimum:{okStr:">",ok:zf.GT,fail:zf.LTE}},Put={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,YT.str)(wQ||(wQ=fe(["must be "," ",""])),JT[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,YT._)(xQ||(xQ=fe(["{comparison: ",", limit: ","}"])),JT[n].okStr,e)}},Rut={keyword:Object.keys(JT),type:"number",schemaType:"number",$data:!0,error:Put,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,YT._)(CQ||(CQ=fe([""," "," "," || isNaN(",")"])),e,JT[n].fail,i,e))}};A4.default=Rut;var E4={};Object.defineProperty(E4,"__esModule",{value:!0});var Eb=Si(),Lut={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,Eb.str)(SQ||(SQ=fe(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,Eb._)(kQ||(kQ=fe(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,Eb._)(TQ||(TQ=fe(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,Eb._)(DQ||(DQ=fe([""," !== parseInt(",")"])),o,o);t.fail$data((0,Eb._)(AQ||(AQ=fe(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};E4.default=Lut;var M4={},O4={};function Qve(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(Ib.nil,m);else{var v,y=_e(e);try{for(y.s();!(v=y.n()).done;)(0,Ob.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:b=v}),void n.forOf(b,i,function(){n.assign(C,(0,Ob.propertyInData)(n,r,b,a.ownProperties)),n.if((0,Ib.not)(C),function(){t.error(),n.break()})},Ib.nil);var b,C}),t.ok(y)}else n.if((0,Ob.checkMissingProp)(t,e,v)),(0,Ob.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=_e(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,g='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,Wut.checkStrictMode)(s,g,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function m(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,Ob.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};j4.default=qut;var P4={};Object.defineProperty(P4,"__esModule",{value:!0});var Nb=Si(),Yut={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,Nb.str)(UQ||(UQ=fe(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,Nb._)(zQ||(zQ=fe(["{limit: ","}"])),n)}},Jut={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Yut,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?Nb.operators.GT:Nb.operators.LT;t.fail$data((0,Nb._)(GQ||(GQ=fe(["",".length "," ",""])),e,r,i))}};P4.default=Jut;var R4={},jb={};Object.defineProperty(jb,"__esModule",{value:!0});var Zve=Fve;Zve.code='require("ajv/dist/runtime/equal").default',jb.default=Zve,Object.defineProperty(R4,"__esModule",{value:!0});var L4=Db,qs=Si(),Kut=Bi,Xut=jb,Qut={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,qs.str)(WQ||(WQ=fe(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,qs._)(qQ||(qQ=fe(["{i: ",", j: ","}"])),e,i)}},Zut={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Qut,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,L4.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,qs._)(JQ||(JQ=fe(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,qs._)(KQ||(KQ=fe([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,qs._)(YQ||(YQ=fe([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),g=(0,L4.checkDataTypes)(c,p,a.opts.strictNumbers,L4.DataType.Wrong),m=n.const("indices",(0,qs._)(XQ||(XQ=fe(["{}"]))));n.for((0,qs._)(QQ||(QQ=fe([";","--;"])),h),function(){n.let(p,(0,qs._)(ZQ||(ZQ=fe(["","[","]"])),e,h)),n.if(g,(0,qs._)(eZ||(eZ=fe(["continue"])))),c.length>1&&n.if((0,qs._)(tZ||(tZ=fe(["typeof ",' == "string"'])),p),(0,qs._)(nZ||(nZ=fe(["",' += "_"'])),p)),n.if((0,qs._)(iZ||(iZ=fe(["typeof ","[",'] == "number"'])),m,p),function(){n.assign(f,(0,qs._)(rZ||(rZ=fe(["","[","]"])),m,p)),t.error(),n.assign(l,!1).break()}).code((0,qs._)(oZ||(oZ=fe(["","[","] = ",""])),m,p,h))})}function d(h,f){var p=(0,Kut.useFunc)(n,Xut.default),g=n.name("outer");n.label(g).for((0,qs._)(sZ||(sZ=fe([";","--;"])),h),function(){return n.for((0,qs._)(aZ||(aZ=fe([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,qs._)(lZ||(lZ=fe(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(g)})})})}}};R4.default=Zut;var F4={};Object.defineProperty(F4,"__esModule",{value:!0});var $4=Si(),edt=Bi,tdt=jb,ndt={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,$4._)(cZ||(cZ=fe(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==xt(o)?t.fail$data((0,$4._)(uZ||(uZ=fe(["!","(",", ",")"])),(0,edt.useFunc)(n,tdt.default),e,r)):t.fail((0,$4._)(dZ||(dZ=fe([""," !== ",""])),o,e))}};F4.default=ndt;var B4={};Object.defineProperty(B4,"__esModule",{value:!0});var Pb=Si(),idt=Bi,rdt=jb,odt={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,Pb._)(hZ||(hZ=fe(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,idt.useFunc)(n,rdt.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,Pb._)(fZ||(fZ=fe(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=Pb.or.apply(void 0,sn(r.map(function(h,f){return p=d,"object"===xt(m=r[g=f])&&null!==m?(0,Pb._)(pZ||(pZ=fe(["","(",", ","[","])"])),u(),e,p,g):(0,Pb._)(gZ||(gZ=fe([""," === ",""])),e,m);var p,g,m})))}t.pass(l)}};B4.default=odt,Object.defineProperty(D4,"__esModule",{value:!0}),D4.default=[A4.default,E4.default,M4.default,I4.default,N4.default,j4.default,P4.default,R4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},F4.default,B4.default];var V4={},M0={};Object.defineProperty(M0,"__esModule",{value:!0}),M0.validateAdditionalItems=void 0;var Ng=Si(),H4=Bi,mdt={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Ng.str)(mZ||(mZ=fe(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Ng._)(vZ||(vZ=fe(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?e0e(t,i):(0,H4.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function e0e(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,Ng._)(yZ||(yZ=fe(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,Ng._)(_Z||(_Z=fe([""," <= ",""])),a,n.length));else if("object"==xt(i)&&!(0,H4.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,Ng._)(bZ||(bZ=fe([""," <= ",""])),a,n.length));e.if((0,Ng.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:H4.Type.Num},c),s.allErrors||e.if((0,Ng.not)(c),function(){return e.break()})});var c}),t.ok(l)}}M0.validateAdditionalItems=e0e,M0.default=mdt;var U4={},O0={};Object.defineProperty(O0,"__esModule",{value:!0}),O0.validateTuple=void 0;var t0e=Si(),XT=Bi,vdt=uu(),ydt={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return n0e(t,"additionalItems",n);e.items=!0,(0,XT.alwaysValidSchema)(e,n)||t.ok((0,vdt.validateArray)(t))}};function n0e(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var m='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,XT.checkStrictMode)(a,m,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=XT.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,t0e._)(wZ||(wZ=fe(["",".length"])),o));e.forEach(function(d,h){(0,XT.alwaysValidSchema)(a,d)||(i.if((0,t0e._)(xZ||(xZ=fe([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}O0.validateTuple=n0e,O0.default=ydt,Object.defineProperty(U4,"__esModule",{value:!0});var _dt=O0,bdt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,_dt.validateTuple)(t,"items")}};U4.default=bdt;var z4={};Object.defineProperty(z4,"__esModule",{value:!0});var i0e=Si(),wdt=Bi,xdt=uu(),Cdt=M0,Sdt={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,i0e.str)(CZ||(CZ=fe(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,i0e._)(SZ||(SZ=fe(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,wdt.alwaysValidSchema)(i,n)||(r?(0,Cdt.validateAdditionalItems)(t,r):t.ok((0,xdt.validateArray)(t)))}};z4.default=Sdt;var G4={};Object.defineProperty(G4,"__esModule",{value:!0});var gc=Si(),QT=Bi,kdt={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,gc.str)(kZ||(kZ=fe(["must contain at least "," valid item(s)"])),e):(0,gc.str)(TZ||(TZ=fe(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,gc._)(DZ||(DZ=fe(["{minContains: ","}"])),e):(0,gc._)(AZ||(AZ=fe(["{minContains: ",", maxContains: ","}"])),e,i)}},Tdt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:kdt,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,gc._)(EZ||(EZ=fe(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,QT.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,QT.alwaysValidSchema)(a,r)){var d=(0,gc._)(MZ||(MZ=fe([""," >= ",""])),u,n);return void 0!==e&&(d=(0,gc._)(OZ||(OZ=fe([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,gc._)(IZ||(IZ=fe(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,QT.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var g=i.name("_valid"),m=i.let("count",0);p(g,function(){return i.if(g,function(){return v=m,i.code((0,gc._)(NZ||(NZ=fe(["","++"])),v)),void(void 0===e?i.if((0,gc._)(jZ||(jZ=fe([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,gc._)(PZ||(PZ=fe([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,gc._)(RZ||(RZ=fe([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(g,m){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:QT.Type.Num,compositeRule:!0},g),m()})}}};G4.default=Tdt;var r0e={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=Si(),e=Bi,i=uu();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(LZ||(LZ=fe(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(FZ||(FZ=fe(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=Wt(function(d){var h=d.schema,f={},p={};for(var g in h)"__proto__"!==g&&((Array.isArray(h[g])?f:p)[g]=h[g]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(g){var m=l[g];if(0===m.length)return"continue";var v=(0,i.propertyInData)(c,u,g,d.opts.ownProperties);a.setParams({property:g,depsCount:m.length,deps:m.join(", ")}),d.allErrors?c.if(v,function(){var y,b=_e(m);try{for(b.s();!(y=b.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(k){b.e(k)}finally{b.f()}}):(c.if((0,n._)($Z||($Z=fe([""," && (",")"])),v,(0,i.checkMissingProp)(a,m,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(m){if((0,e.alwaysValidSchema)(h,l[m]))return"continue";c.if((0,i.propertyInData)(c,u,m,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:m},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var g in l)p(g)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(r0e);var W4={};Object.defineProperty(W4,"__esModule",{value:!0});var o0e=Si(),Ddt=Bi,Adt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,o0e._)(BZ||(BZ=fe(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,Ddt.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,o0e.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};W4.default=Adt;var ZT={};Object.defineProperty(ZT,"__esModule",{value:!0});var eD=uu(),fu=Si(),Edt=Hf(),tD=Bi,Mdt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,fu._)(VZ||(VZ=fe(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,tD.alwaysValidSchema)(s,e)){var c=(0,eD.allSchemaProperties)(i.properties),u=(0,eD.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(g){var m;if(c.length>8){var v=(0,tD.schemaRefOrVal)(s,i.properties,"properties");m=(0,eD.isOwnProperty)(n,v,g)}else m=c.length?fu.or.apply(void 0,sn(c.map(function(y){return(0,fu._)(UZ||(UZ=fe([""," === ",""])),g,y)}))):fu.nil;return u.length&&(m=fu.or.apply(void 0,[m].concat(sn(u.map(function(y){return(0,fu._)(zZ||(zZ=fe(["",".test(",")"])),(0,eD.usePattern)(t,y),g)}))))),(0,fu.not)(m)}(p),function(){return h(p)}):h(p)}),t.ok((0,fu._)(HZ||(HZ=fe([""," === ",""])),o,Edt.default.errors))}function d(p){n.code((0,fu._)(GZ||(GZ=fe(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==xt(e)&&!(0,tD.alwaysValidSchema)(s,e)){var g=n.name("valid");"failing"===l.removeAdditional?(f(p,g,!1),n.if((0,fu.not)(g),function(){t.reset(),d(p)})):(f(p,g),a||n.if((0,fu.not)(g),function(){return n.break()}))}}}function f(p,g,m){var v={keyword:"additionalProperties",dataProp:p,dataPropType:tD.Type.Str};!1===m&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,g)}}};ZT.default=Mdt;var q4={};Object.defineProperty(q4,"__esModule",{value:!0});var Odt=VT(),s0e=uu(),Y4=Bi,a0e=ZT,Idt={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&a0e.default.code(new Odt.KeywordCxt(o,a0e.default,"additionalProperties"));var s,a=(0,s0e.allSchemaProperties)(e),l=_e(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=Y4.mergeEvaluated.props(n,(0,Y4.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,Y4.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=_e(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?m(p):(n.if((0,s0e.propertyInData)(n,r,p,o.opts.ownProperties)),m(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function m(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};q4.default=Idt;var J4={};Object.defineProperty(J4,"__esModule",{value:!0});var l0e=uu(),nD=Si(),c0e=Bi,u0e=Bi,Ndt={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,l0e.allSchemaProperties)(e),l=a.filter(function(p){return(0,c0e.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof nD.Name||(o.props=(0,u0e.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,g=_e(a);try{for(g.s();!(p=g.n()).done;){var m=p.value;c&&h(m),o.allErrors?f(m):(n.var(u,!0),f(m),n.if(u))}}catch(v){g.e(v)}finally{g.f()}}()}function h(p){for(var g in c)new RegExp(p).test(g)&&(0,c0e.checkStrictMode)(o,"property ".concat(g," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(g){n.if((0,nD._)(WZ||(WZ=fe(["",".test(",")"])),(0,l0e.usePattern)(t,p),g),function(){var m=l.includes(p);m||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:g,dataPropType:u0e.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,nD._)(qZ||(qZ=fe(["","[","]"])),d,g),!0):m||o.allErrors||n.if((0,nD.not)(u),function(){return n.break()})})})}}};J4.default=Ndt;var K4={};Object.defineProperty(K4,"__esModule",{value:!0});var jdt=Bi,Pdt={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,jdt.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};K4.default=Pdt;var X4={};Object.defineProperty(X4,"__esModule",{value:!0});var Rdt={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:uu().validateUnion,error:{message:"must match a schema in anyOf"}};X4.default=Rdt;var Q4={};Object.defineProperty(Q4,"__esModule",{value:!0});var iD=Si(),Ldt=Bi,Fdt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,iD._)(YZ||(YZ=fe(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Ldt.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,iD._)(JZ||(JZ=fe([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,iD._)(KZ||(KZ=fe(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,iD.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};Q4.default=Fdt;var Z4={};Object.defineProperty(Z4,"__esModule",{value:!0});var $dt=Bi,Bdt={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,$dt.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};Z4.default=Bdt;var eF={};Object.defineProperty(eF,"__esModule",{value:!0});var rD=Si(),d0e=Bi,Vdt={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,rD.str)(XZ||(XZ=fe(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,rD._)(QZ||(QZ=fe(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,d0e.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=h0e(i,"then"),o=h0e(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,rD.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,rD._)(ZZ||(ZZ=fe(["",""])),d)):t.setParams({ifClause:d})}}}};function h0e(t,n){var e=t.schema[n];return void 0!==e&&!(0,d0e.alwaysValidSchema)(t,e)}eF.default=Vdt;var tF={};Object.defineProperty(tF,"__esModule",{value:!0});var Hdt=Bi,Udt={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,Hdt.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};tF.default=Udt,Object.defineProperty(V4,"__esModule",{value:!0});var zdt=M0,Gdt=U4,Wdt=O0,qdt=z4,Ydt=G4,Jdt=r0e,Kdt=W4,Xdt=ZT,Qdt=q4,Zdt=J4,eht=K4,tht=X4,nht=Q4,iht=Z4,rht=eF,oht=tF;V4.default=function(){var n=[eht.default,tht.default,nht.default,iht.default,rht.default,oht.default,Kdt.default,Xdt.default,Jdt.default,Qdt.default,Zdt.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Gdt.default,qdt.default):n.push(zdt.default,Wdt.default),n.push(Ydt.default),n};var nF={},iF={};Object.defineProperty(iF,"__esModule",{value:!0});var Mo=Si(),sht={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,Mo.str)(eee||(eee=fe(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,Mo._)(tee||(tee=fe(["{format: ","}"])),n)}},code:function(t,n){var m,v,h,f,p,g,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,Mo._)(nee||(nee=fe(["","[","]"])),h,s)),p=e.let("fType"),g=e.let("format"),e.if((0,Mo._)(iee||(iee=fe(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,Mo._)(ree||(ree=fe(["",'.type || "string"'])),f)).assign(g,(0,Mo._)(oee||(oee=fe(["",".validate"])),f))},function(){return e.assign(p,(0,Mo._)(see||(see=fe(['"string"'])))).assign(g,f)}),t.fail$data((0,Mo.or)(!1===l.strictSchema?Mo.nil:(0,Mo._)(aee||(aee=fe([""," && !",""])),s,g),(m=u.$async?(0,Mo._)(lee||(lee=fe(["(",".async ? await ","(",") : ","(","))"])),f,g,i,g,i):(0,Mo._)(cee||(cee=fe(["","(",")"])),g,i),v=(0,Mo._)(uee||(uee=fe(["(typeof ",' == "function" ? '," : ",".test(","))"])),g,m,g,i),(0,Mo._)(dee||(dee=fe([""," && "," !== true && "," === "," && !",""])),g,g,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=Wt(function(v){var y=v instanceof RegExp?(0,Mo.regexpCode)(v):l.code.formats?(0,Mo._)(hee||(hee=fe(["","",""])),l.code.formats,(0,Mo.getProperty)(o)):void 0,b=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=xt(v)||v instanceof RegExp?["string",v,b]:[v.type||"string",v.validate,(0,Mo._)(fee||(fee=fe(["",".validate"])),b)]}(h),3),g=f[1],m=f[2];f[0]===n&&t.pass(function(){if("object"==xt(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Mo._)(pee||(pee=fe(["await ","(",")"])),m,i)}return(0,Mo._)("function"==typeof g?gee||(gee=fe(["","(",")"])):mee||(mee=fe(["",".test(",")"])),m,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};iF.default=sht,Object.defineProperty(nF,"__esModule",{value:!0}),nF.default=[iF.default];var I0={};Object.defineProperty(I0,"__esModule",{value:!0}),I0.contentVocabulary=I0.metadataVocabulary=void 0,I0.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],I0.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(S4,"__esModule",{value:!0});var uht=nF,f0e=I0,dht=[k4.default,D4.default,(0,V4.default)(),uht.default,f0e.metadataVocabulary,f0e.contentVocabulary];S4.default=dht;var rF={},p0e={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(p0e),Object.defineProperty(rF,"__esModule",{value:!0});var N0=Si(),oF=p0e,g0e=Za,hht=Bi,fht={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===oF.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,N0._)(vee||(vee=fe(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,N0._)(yee||(yee=fe(["","",""])),e,(0,N0.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,N0.Name),h}n.if((0,N0._)(_ee||(_ee=fe(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},g=C(r),m=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",g="Colon",m="Rbrace",v="Number",y="Current",b="Expref",C="Pipe",j="EQ",B="GT",N="LT",$="GTE",V="LTE",z="NE",Y="Flatten",O="Star",H="Filter",G="Dot",Z="Lbrace",D="Lbracket",E="Lparen",M="Literal",U={".":G,"*":O,",":p,":":g,"{":Z,"}":m,"]":h,"(":E,")":f,"@":y},L={"<":!0,">":!0,"=":!0,"!":!0},X={" ":!0,"\t":!0,"\n":!0};function ne(R){return R>="0"&&R<="9"||"-"===R}function ge(){}ge.prototype={tokenize:function(R){var J,K,pe,Te,ye=[];for(this._current=0;this._current="a"&&Te<="z"||Te>="A"&&Te<="Z"||"_"===Te)J=this._current,K=this._consumeUnquotedIdentifier(R),ye.push({type:u,value:K,start:J});else if(void 0!==U[R[this._current]])ye.push({type:U[R[this._current]],value:R[this._current],start:this._current}),this._current++;else if(ne(R[this._current]))pe=this._consumeNumber(R),ye.push(pe);else if("["===R[this._current])pe=this._consumeLBracket(R),ye.push(pe);else if('"'===R[this._current])J=this._current,K=this._consumeQuotedIdentifier(R),ye.push({type:d,value:K,start:J});else if("'"===R[this._current])J=this._current,K=this._consumeRawStringLiteral(R),ye.push({type:M,value:K,start:J});else if("`"===R[this._current]){J=this._current;var Ue=this._consumeLiteral(R);ye.push({type:M,value:Ue,start:J})}else if(void 0!==L[R[this._current]])ye.push(this._consumeOperator(R));else if(void 0!==X[R[this._current]])this._current++;else if("&"===R[this._current])J=this._current,this._current++,"&"===R[this._current]?(this._current++,ye.push({type:"And",value:"&&",start:J})):ye.push({type:b,value:"&",start:J});else{if("|"!==R[this._current]){var Je=new Error("Unknown character:"+R[this._current]);throw Je.name="LexerError",Je}J=this._current,this._current++,"|"===R[this._current]?(this._current++,ye.push({type:"Or",value:"||",start:J})):ye.push({type:C,value:"|",start:J})}return ye},_consumeUnquotedIdentifier:function(R){var J,K=this._current;for(this._current++;this._current="a"&&J<="z"||J>="A"&&J<="Z"||J>="0"&&J<="9"||"_"===J);)this._current++;return R.slice(K,this._current)},_consumeQuotedIdentifier:function(R){var J=this._current;this._current++;for(var K=R.length;'"'!==R[this._current]&&this._current"===K?"="===R[this._current]?(this._current++,{type:$,value:">=",start:J}):{type:B,value:">",start:J}:"="===K&&"="===R[this._current]?(this._current++,{type:j,value:"==",start:J}):void 0},_consumeLiteral:function(R){this._current++;for(var J,K=this._current,pe=R.length;"`"!==R[this._current]&&this._current=0||["true","false","null"].indexOf(R)>=0)return!0;if(!("-0123456789".indexOf(R[0])>=0))return!1;try{return JSON.parse(R),!0}catch{return!1}}};var ae={};function De(){}function be(R){this.runtime=R}function Ie(R){this._interpreter=R,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}ae.EOF=0,ae.UnquotedIdentifier=0,ae.QuotedIdentifier=0,ae.Rbracket=0,ae.Rparen=0,ae.Comma=0,ae.Rbrace=0,ae.Number=0,ae.Current=0,ae.Expref=0,ae.Pipe=1,ae.Or=2,ae.And=3,ae.EQ=5,ae.GT=5,ae.LT=5,ae.GTE=5,ae.LTE=5,ae.NE=5,ae.Flatten=9,ae.Star=20,ae.Filter=21,ae.Dot=40,ae.Not=45,ae.Lbrace=50,ae.Lbracket=55,ae.Lparen=60,De.prototype={parse:function(R){this._loadTokens(R),this.index=0;var J=this.expression(0);if("EOF"!==this._lookahead(0)){var K=this._lookaheadToken(0),pe=new Error("Unexpected token type: "+K.type+", value: "+K.value);throw pe.name="ParserError",pe}return J},_loadTokens:function(R){var J=(new ge).tokenize(R);J.push({type:"EOF",value:"",start:R.length}),this.tokens=J},expression:function(R){var J=this._lookaheadToken(0);this._advance();for(var K=this.nud(J),pe=this._lookahead(0);R=0?this.expression(R):J===D?(this._match(D),this._parseMultiselectList()):J===Z?(this._match(Z),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(R){var J;if(ae[this._lookahead(0)]<10)J={type:"Identity"};else if(this._lookahead(0)===D)J=this.expression(R);else if(this._lookahead(0)===H)J=this.expression(R);else{if(this._lookahead(0)!==G){var K=this._lookaheadToken(0),pe=new Error("Sytanx error, unexpected token: "+K.value+"("+K.type+")");throw pe.name="ParserError",pe}this._match(G),J=this._parseDotRHS(R)}return J},_parseMultiselectList:function(){for(var R=[];this._lookahead(0)!==h;){var J=this.expression(0);if(R.push(J),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:R}},_parseMultiselectHash:function(){for(var R,J,K,pe=[],Te=[u,d];;){if(R=this._lookaheadToken(0),Te.indexOf(R.type)<0)throw new Error("Expecting an identifier token, got: "+R.type);if(J=R.value,this._advance(),this._match(g),K={type:"KeyValuePair",name:J,value:this.expression(0)},pe.push(K),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===m){this._match(m);break}}return{type:"MultiSelectHash",children:pe}}},be.prototype={search:function(R,J){return this.visit(R,J)},visit:function(R,J){var K,pe,Te,ye,Ue,Je,_t,zt,ct;switch(R.type){case"Field":return null!==J&&e(J)?void 0===(Je=J[R.name])?null:Je:null;case"Subexpression":for(Te=this.visit(R.children[0],J),ct=1;ct0)for(ct=ki;ctci;ct+=yi)Te.push(J[ct]);return Te;case"Projection":var bn=this.visit(R.children[0],J);if(!n(bn))return null;for(zt=[],ct=0;ctUe;break;case $:Te=ye>=Ue;break;case N:Te=ye=R&&(J=K<0?R-1:R),J}},Ie.prototype={callFunction:function(R,J){var K=this.functionTable[R];if(void 0===K)throw new Error("Unknown function: "+R+"()");return this._validateArgs(R,J,K._signature),K._func.call(this,J)},_validateArgs:function(R,J,K){var pe,Te,ye,Ue;if(K[K.length-1].variadic){if(J.length=0;pe--)K+=J[pe];return K}var Te=R[0].slice(0);return Te.reverse(),Te},_functionAbs:function(R){return Math.abs(R[0])},_functionCeil:function(R){return Math.ceil(R[0])},_functionAvg:function(R){for(var J=0,K=R[0],pe=0;pe=0},_functionFloor:function(R){return Math.floor(R[0])},_functionLength:function(R){return e(R[0])?Object.keys(R[0]).length:R[0].length},_functionMap:function(R){for(var J=[],K=this._interpreter,pe=R[0],Te=R[1],ye=0;ye0){if(this._getTypeName(R[0][0])===s)return Math.max.apply(Math,R[0]);for(var J=R[0],K=J[0],pe=1;pe0){if(this._getTypeName(R[0][0])===s)return Math.min.apply(Math,R[0]);for(var J=R[0],K=J[0],pe=1;pemt?1:NnUe&&(Ue=K,J=Te[Je]);return J},_functionMinBy:function(R){for(var J,K,Te=R[0],ye=this.createKeyFunction(R[1],[s,a]),Ue=1/0,Je=0;Je1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var yht=function(){function t(n,e,i,r){sF(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=oD(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),g=oD(p,4),b=g[3];void 0===b&&(b=1),o.rgba=[g[0],g[1],g[2],b]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return aF(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return y0e(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return y0e(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=vht[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=oD(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(m-=1),m<.16666666666666666?p+6*(g-p)*m:m<.5?g:m<.6666666666666666?p+(g-p)*(.6666666666666666-m)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),_ht=function(){function t(){sF(this,t),this._events=[]}return aF(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function lF(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,g=c.clientY,m=r(c.clientX-d.left,0,h),v=r(g-d.top,0,f);e(m/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function bd(t,n){return(n||document).querySelector(t)}function _0e(t){t.preventDefault(),t.stopPropagation()}function cF(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&_0e(o),i(o))})}var b0e=function(){function t(n){sF(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new _ht,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return aF(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),cF(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(_0e(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new yht(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=bd(".picker_hue",o),this._domSL=bd(".picker_sl",o),this._domA=bd(".picker_alpha",o),this._domEdit=bd(".picker_editor input",o),this._domSample=bd(".picker_sample",o),this._domOkay=bd(".picker_done button",o),this._domCancel=bd(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),lF(r,this._domH,function(l,c){return e._setHSLA(l)}),lF(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&lF(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),cF(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),cF(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=bd(".picker_selector",this._domH),d=bd(".picker_selector",l),h=bd(".picker_selector",c);b(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,b(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function b(k,T,j){T.style.left=100*j+"%"}function C(k,T,j){T.style.top=100*j+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),uF=document.createElement("style");uF.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(uF),b0e.StyleElement=uF;var bht=Object.freeze({__proto__:null,default:b0e});const wht=["editor"];function xht(t,n){if(1&t&&(_(0,"ngb-alert",38),ie(1,"img",39),_(2,"h6",40),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while modifying storage object: ",e.error,"")}}function Cht(t,n){1&t&&(_(0,"ngb-alert",41),ie(1,"img",42),_(2,"h6",40),A(3,"Storage object was modified successfully."),w()()),2&t&&S("dismissible",!1)}function Sht(t,n){1&t&&(_(0,"span"),A(1,"Save as a copy"),w())}function kht(t,n){1&t&&A(0,"Save")}function Tht(t,n){if(1&t&&(_(0,"button",43),q(1,Sht,2,0,"span",44),q(2,kht,1,0,"ng-template",null,45,lo),w()),2&t){const e=As(3),i=P();S("disabled",i.updating),x(1),S("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const dF=function(){return["/storage"]},Dht=function(t){return{collection:t}},Aht=function(t,n){return{collection:t,key:n}},Eht=function(t,n,e){return{collection:t,key:n,user_id:e}},hF=function(t){return{"is-invalid":t}},Lb=function(t){return{active:t}};let Mht=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;editor;jsonEditor;error="";object;objectForm;updating=!1;updated=!1;ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Sr.required],keyname:["",Sr.required],user_id:["",Sr.required],permission_read:[{value:0,disabled:!1},Sr.required],permission_write:[{value:0,disabled:!1},Sr.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(wht,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:88,vars:60,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["id","permission_read","name","permission_read",1,"btn-group","btn-group-toggle"],[1,"btn","btn-outline-secondary",3,"ngClass"],["formControlName","permission_read","type","radio",3,"value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["id","permission_write","name","permission_write",1,"btn-group","btn-group-toggle"],["formControlName","permission_write","type","radio",3,"value"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Storage Object"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),A(6,"Storage"),w(),_(7,"li",4)(8,"a",5),A(9),w()(),_(10,"li",4)(11,"a",5),A(12),w()(),_(13,"li",4)(14,"a",5),A(15),w()()()()(),q(16,xht,4,2,"ngb-alert",6),q(17,Cht,4,1,"ngb-alert",7),_(18,"form",8),se("ngSubmit",function(){return r.updateObject()}),_(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),A(23,"Collection"),w()(),ie(24,"input",13),_(25,"div",14),A(26,"Collection is required"),w()(),_(27,"div",10)(28,"div",11)(29,"label",15),A(30,"Key"),w()(),ie(31,"input",16),_(32,"div",14),A(33,"Key is required"),w()()(),_(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),A(38,"User ID"),w()(),ie(39,"input",18),_(40,"div",14),A(41,"User ID is required"),w()(),_(42,"div",19)(43,"div",11)(44,"label",20),A(45,"Read Permission"),w()(),_(46,"div",21)(47,"label",22),ie(48,"input",23),A(49," No Read "),w(),_(50,"label",22),ie(51,"input",23),A(52," Owner Read "),w(),_(53,"label",22),ie(54,"input",23),A(55," Public Read "),w()()()(),_(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),A(60,"Version"),w()(),ie(61,"input",25),w(),_(62,"div",19)(63,"div",11)(64,"label",26),A(65,"Write Permission"),w()(),_(66,"div",27)(67,"label",22),ie(68,"input",28),A(69," No Write "),w(),_(70,"label",22),ie(71,"input",28),A(72," Owner Write "),w()()()(),_(73,"div",29)(74,"div",10)(75,"div",11)(76,"label",30),A(77,"Create Time"),w()(),ie(78,"input",31),w(),_(79,"div",10)(80,"div",11)(81,"label",32),A(82,"Update Time"),w()(),ie(83,"input",33),w()(),_(84,"div",34),ie(85,"div",35,36),w(),q(87,Tht,4,3,"button",37),w()),2&i&&(x(8),S("routerLink",ma(32,dF))("queryParams",ui(33,Dht,r.object.collection)),x(1),ze(r.object.collection),x(2),S("routerLink",ma(35,dF))("queryParams",Ni(36,Aht,r.object.collection,r.object.key)),x(1),ze(r.object.key),x(2),S("routerLink",ma(39,dF))("queryParams",C1(40,Eht,r.object.collection,r.object.key,r.object.user_id)),x(1),ze(r.object.user_id),x(1),S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.objectForm),x(6),S("ngClass",ui(44,hF,r.f.collection.dirty&&r.f.collection.errors)),x(1),S("hidden",r.f.collection.disabled||r.f.collection.valid||r.f.collection.pristine),x(6),S("ngClass",ui(46,hF,r.f.keyname.dirty&&r.f.keyname.errors)),x(1),S("hidden",r.f.keyname.disabled||r.f.keyname.valid||r.f.keyname.pristine),x(7),S("ngClass",ui(48,hF,r.f.user_id.dirty&&r.f.user_id.errors)),x(1),S("hidden",r.f.user_id.disabled||r.f.user_id.valid||r.f.user_id.pristine),x(7),S("ngClass",ui(50,Lb,0==r.f.permission_read.value)),x(1),S("value",0),x(2),S("ngClass",ui(52,Lb,1==r.f.permission_read.value)),x(1),S("value",1),x(2),S("ngClass",ui(54,Lb,2==r.f.permission_read.value)),x(1),S("value",2),x(7),S("value",r.object.version),x(6),S("ngClass",ui(56,Lb,0==r.f.permission_write.value)),x(1),S("value",0),x(2),S("ngClass",ui(58,Lb,1==r.f.permission_write.value)),x(1),S("value",1),x(7),S("value",r.object.create_time),x(5),S("value",r.object.update_time),x(4),S("ngIf",r.updateAllowed()))},dependencies:[Mc,dp,Ct,pr,ms,ts,kO,ps,gs,Hh,Lo,ns],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),Oht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Iht(t,n){if(1&t&&(_(0,"ngb-alert",18),ie(1,"img",19),_(2,"h6",20),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while processing request: ",e.error,"")}}function Nht(t,n){1&t&&(_(0,"th",21),A(1,"Remove"),w())}function jht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"Yes"),w()}}function Pht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"No"),w()}}function Rht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"Yes"),w()}}function Lht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"No"),w()}}function Fht(t,n){if(1&t){const e=He();_(0,"td",26)(1,"button",27),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteLeaderboard(r,s,a))}),A(2,"Delete"),w()()}}function $ht(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(2),w(),_(3,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(4),w(),_(5,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(6),w(),_(7,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(8),w(),q(9,jht,2,0,"td",23),q(10,Pht,2,0,"td",23),q(11,Rht,2,0,"td",23),q(12,Lht,2,0,"td",23),q(13,Fht,3,0,"td",24),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.id),x(2),ze(i.orderString[e.sort_order]),x(2),ze(i.operatorString[e.operator]),x(2),ze(""===e.reset_schedule?"-":e.reset_schedule),x(1),S("ngIf",e.authoritative),x(1),S("ngIf",!e.authoritative),x(1),S("ngIf",e.tournament),x(1),S("ngIf",!e.tournament),x(1),S("ngIf",i.deleteAllowed())}}function Bht(t,n){1&t&&(_(0,"tr")(1,"td",28),A(2,"No leaderboards were found."),w()())}let Vht=(()=>{class t{route;router;authService;consoleService;deleteConfirmService;error="";leaderboards=[];nextCursor="";leaderboardsCount=0;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};constructor(e,i,r,o,s){this.route=e,this.router=i,this.authService=r,this.consoleService=o,this.deleteConfirmService=s}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(zr),te(kn),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),A(4,"Leaderboards"),w(),_(5,"h6",4),A(6),w()(),_(7,"div",5)(8,"div",6)(9,"button",7),se("click",function(){return r.search(0)}),ie(10,"img",8),w(),_(11,"button",7),se("click",function(){return r.search(1)}),ie(12,"img",9),w()()()()(),q(13,Iht,4,2,"ngb-alert",10),_(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),A(18,"Leaderboard ID"),w(),_(19,"th",13),A(20,"Sort Order"),w(),_(21,"th",13),A(22,"Operator"),w(),_(23,"th",13),A(24,"Reset Schedule"),w(),_(25,"th",14),A(26,"Authoritative"),w(),_(27,"th",14),A(28,"Tournament"),w(),q(29,Nht,2,0,"th",15),w()(),_(30,"tbody"),q(31,$ht,14,9,"tr",16),q(32,Bht,3,0,"tr",17),w()()),2&i&&(x(6),wt("",r.leaderboardsCount," leaderboards found."),x(3),S("disabled",0===r.leaderboards.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(16),S("ngIf",r.deleteAllowed()),x(2),S("ngForOf",r.leaderboards),x(1),S("ngIf",0===r.leaderboards.length))},dependencies:[Bt,Ct,pr],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Hht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Uht(t,n){if(1&t&&(_(0,"ngb-alert",31),ie(1,"img",32),_(2,"h6",33),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying accounts: ",e.error,"")}}function zht(t,n){if(1&t){const e=He();_(0,"ngb-alert",31),ie(1,"img",32),_(2,"h6",33),A(3,"Query ongoing..."),w(),_(4,"button",34),se("click",function(){return we(e),xe(P().cancelQuery())}),A(5,"Cancel!"),w()()}2&t&&S("dismissible",!1)}function Ght(t,n){1&t&&(_(0,"th",35),A(1,"Remove"),w())}function Wht(t,n){1&t&&(_(0,"tr")(1,"td",36),A(2,"No users found - change the filter criteria or add new user accounts."),w()())}function qht(t,n){1&t&&ie(0,"td")}function Yht(t,n){if(1&t){const e=He();_(0,"td",39)(1,"button",40),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteAccount(r,s,a))}),A(2,"Delete"),w()()}}function Jht(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(2),w(),_(3,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(6),w(),_(7,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(8),w(),q(9,qht,1,0,"td",29),q(10,Yht,3,0,"td",38),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.id),x(2),ze(e.username),x(2),ze(e.display_name),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),x(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Kht=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";accountsCount=0;accounts=[];nextCursor="";prevCursor="";searchForm;querySubject;ongoingQuery=!1;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.querySubject=new hr,this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}ngOnDestroy(){this.querySubject.next(),this.querySubject.complete()}search(e){this.ongoingQuery&&this.querySubject.next(),this.ongoingQuery=!0;let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).pipe(Xr(this.querySubject)).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"}),this.ongoingQuery=!1},o=>{this.error=o,this.ongoingQuery=!1})}cancelQuery(){this.querySubject.next(),this.ongoingQuery=!1}deleteAccount(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:46,vars:10,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button",1,"btn","btn-danger",3,"click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Accounts"),w(),_(2,"h6",1),A(3),w(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),se("ngSubmit",function(){return r.search(0)}),_(8,"div",6),ie(9,"input",7),_(10,"div",8)(11,"span",9),se("click",function(){return r.f.filter.setValue(r.systemUserId)}),ie(12,"img",10),w()(),_(13,"div",8)(14,"div",11)(15,"button",12),se("click",function(){return r.f.filter_type.setValue(0),r.search(0)}),A(16,"Search"),w(),_(17,"div",13),ie(18,"button",14),_(19,"div",15)(20,"button",16),se("click",function(){return r.f.filter_type.setValue(1),r.search(0)}),A(21,"Tombstones"),w()()()()()()()(),_(22,"div",17)(23,"div",18)(24,"button",19),se("click",function(){return r.search(0)}),ie(25,"img",20),w(),_(26,"button",19),se("click",function(){return r.search(1)}),ie(27,"img",21),w()()()()(),q(28,Uht,4,2,"ngb-alert",22),q(29,zht,6,1,"ngb-alert",22),_(30,"div",23)(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),A(35,"User ID"),w(),_(36,"th"),A(37,"Username"),w(),_(38,"th"),A(39,"Display Name"),w(),_(40,"th",27),A(41,"Last Update"),w(),q(42,Ght,2,0,"th",28),w()(),_(43,"tbody"),q(44,Wht,3,0,"tr",29),q(45,Jht,11,6,"tr",30),w()()()),2&i&&(x(3),wt("",r.accountsCount," accounts found."),x(4),S("formGroup",r.searchForm),x(11),S("disabled",!r.f.filter.value||""===r.f.filter.value),x(6),S("disabled",0===r.accounts.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(1),S("ngIf",r.ongoingQuery),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.accounts.length),x(1),S("ngForOf",r.accounts))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Xht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qht(t,n){if(1&t){const e=He();_(0,"button",15),se("click",function(r){return we(e),xe(P().exportAccount(r))}),ie(1,"img",16),A(2,"Export"),w()}}function Zht(t,n){1&t&&(_(0,"span"),A(1,"Unban"),w())}function eft(t,n){1&t&&(_(0,"span"),A(1,"Ban"),w())}function tft(t,n){if(1&t){const e=He();_(0,"button",15),se("click",function(r){return we(e),xe(P().banUnbanAccount(r))}),ie(1,"img",17),q(2,Zht,2,0,"span",18),q(3,eft,2,0,"span",18),w()}if(2&t){const e=P();x(2),S("ngIf",e.account.disable_time),x(1),S("ngIf",!e.account.disable_time)}}function nft(t,n){if(1&t){const e=He();_(0,"button",19),se("click",function(r){return we(e),xe(P().deleteAccount(r,!1))}),ie(1,"img",20),A(2,"Delete"),w()}}function ift(t,n){if(1&t){const e=He();_(0,"button",19),se("click",function(r){return we(e),xe(P().deleteAccount(r,!0))}),ie(1,"img",21),A(2,"Recorded delete"),w()}}function rft(t,n){if(1&t&&(_(0,"ngb-alert",22),ie(1,"img",23),_(2,"h6",24),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}const oft=function(t,n){return["/accounts",t,n]};function sft(t,n){if(1&t&&(_(0,"div"),ul(1,25),_(2,"a",26),A(3),w(),dl(),w()),2&t){const e=n.$implicit,i=P();x(1),S("ngbNavItem",e.path),x(1),S("routerLink",Ni(3,oft,i.account.user.id,e.path)),x(1),ze(e.label)}}const aft=function(){return["/accounts"]},lft=function(){return["/storage"]},cft=function(t){return{user_id:t}};let uft=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;account;error="";views=[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,XI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Account"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),A(7,"Account"),w()(),_(8,"li",6),A(9),w()()(),_(10,"div"),q(11,Qht,3,0,"button",7),q(12,tft,4,2,"button",7),q(13,nft,3,0,"button",8),q(14,ift,3,0,"button",8),w()(),q(15,rft,4,2,"ngb-alert",9),_(16,"nav",10,11),q(18,sft,4,6,"div",12),_(19,"div"),ul(20,13),_(21,"a",14),A(22," Storage "),w(),dl(),w()(),ie(23,"router-outlet")),2&i&&(x(6),S("routerLink",ma(10,aft)),x(3),ze(r.account.user.id),x(2),S("ngIf",r.exportAllowed()),x(1),S("ngIf",r.banAllowed()),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.error),x(3),S("ngForOf",r.views),x(3),S("routerLink",ma(11,lft))("queryParams",ui(12,cft,r.account.user.id)))},dependencies:[yp,Mc,ty,Bt,Ct,pr,Bu,Wd,Ty,Yh],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),dft=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const hft=["editor"];function fft(t,n){if(1&t&&(_(0,"ngb-alert",29),ie(1,"img",30),_(2,"h6",31),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function pft(t,n){1&t&&(_(0,"ngb-alert",32),ie(1,"img",33),_(2,"h6",31),A(3,"Account was modified successfully."),w()()),2&t&&S("dismissible",!1)}function gft(t,n){1&t&&(_(0,"button",34),A(1,"Save"),w()),2&t&&S("disabled",P().updating)}const mft=function(t){return{"is-invalid":t}};let vft=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Sr.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(hft,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(q(0,fft,4,2,"ngb-alert",0),q(1,pft,4,1,"ngb-alert",1),_(2,"form",2),se("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),A(7,"User ID"),w()(),ie(8,"input",7),w(),_(9,"div",4)(10,"div",5)(11,"label",8),A(12,"Username"),w()(),ie(13,"input",9),_(14,"div",10),A(15,"Username is required"),w()()(),_(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),A(20,"Display Name"),w()(),ie(21,"input",12),w(),_(22,"div",13)(23,"div",5)(24,"label",14),A(25,"Avatar URL"),w()(),ie(26,"input",15),w()(),_(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),A(31,"Location"),w()(),ie(32,"input",17),w(),_(33,"div",13)(34,"div",5)(35,"label",18),A(36,"Timezone"),w()(),ie(37,"input",19),w()(),_(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),A(42,"Create Time"),w()(),ie(43,"input",22),w(),_(44,"div",4)(45,"div",5)(46,"label",23),A(47,"Update Time"),w()(),ie(48,"input",24),w()(),_(49,"div",25),ie(50,"div",26,27),w(),q(52,gft,2,1,"button",28),w()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.accountForm),x(6),S("value",r.account.user.id),x(5),S("ngClass",ui(9,mft,r.f.username.dirty&&r.f.username.errors)),x(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),x(29),S("value",r.account.user.create_time),x(5),S("value",r.account.user.update_time),x(4),S("ngIf",r.updateAllowed()))},dependencies:[dp,Ct,pr,ms,ts,ps,gs,Hh,Lo,ns]})}return t})();function yft(t,n){if(1&t&&(_(0,"ngb-alert",36),ie(1,"img",37),_(2,"h6",38),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function _ft(t,n){1&t&&(_(0,"ngb-alert",39),ie(1,"img",40),_(2,"h6",38),A(3,"Account was modified successfully."),w()()),2&t&&S("dismissible",!1)}function bft(t,n){if(1&t&&(_(0,"option",41),A(1),w()),2&t){const e=n.$implicit,i=n.index;Nd("value",i),S("selected",0===i),x(1),ze(e.id)}}function wft(t,n){1&t&&(_(0,"button",42),A(1,"Save"),w()),2&t&&S("disabled",P().updating)}let xft=(()=>{class t{route;router;consoleService;authService;formBuilder;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(q(0,yft,4,2,"ngb-alert",0),q(1,_ft,4,1,"ngb-alert",1),_(2,"form",2),se("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),A(7,"Device IDs"),w()(),_(8,"div",7)(9,"button",8),se("click",function(){return r.copyDeviceIdToClipboard(r.f.selected_device_id_index.value)}),ie(10,"img",9),A(11," Copy "),w(),_(12,"select",10),q(13,bft,2,3,"option",11),w(),_(14,"div",12)(15,"button",13),se("click",function(s){return r.unlinkDeviceId(s)}),A(16,"Unlink"),w()()()(),_(17,"div",4)(18,"div",5)(19,"label",14),A(20,"Custom ID"),w()(),_(21,"div",7),ie(22,"input",15),_(23,"div",12)(24,"button",13),se("click",function(s){return r.unlinkCustomID(s)}),A(25,"Unlink"),w()()()()(),_(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),A(30,"Facebook ID"),w()(),_(31,"div",7),ie(32,"input",17),_(33,"div",12)(34,"button",13),se("click",function(s){return r.unlinkFacebook(s)}),A(35,"Unlink"),w()()()(),_(36,"div",18)(37,"div",5)(38,"label",19),A(39,"FB Instant Game ID"),w()(),_(40,"div",7),ie(41,"input",20),_(42,"div",12)(43,"button",13),se("click",function(s){return r.unlinkFacebookInstantGames(s)}),A(44,"Unlink"),w()()()()(),_(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),A(49,"Apple ID"),w()(),_(50,"div",7),ie(51,"input",22),_(52,"div",12)(53,"button",13),se("click",function(s){return r.unlinkApple(s)}),A(54,"Unlink"),w()()()(),_(55,"div",18)(56,"div",5)(57,"label",23),A(58,"GameCenter ID"),w()(),_(59,"div",7),ie(60,"input",24),_(61,"div",12)(62,"button",13),se("click",function(s){return r.unlinkGameCenter(s)}),A(63,"Unlink"),w()()()()(),_(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),A(68,"Google ID"),w()(),_(69,"div",7),ie(70,"input",26),_(71,"div",12)(72,"button",13),se("click",function(s){return r.unlinkGoogle(s)}),A(73,"Unlink"),w()()()(),_(74,"div",4)(75,"div",5)(76,"label",27),A(77,"Steam ID"),w()(),_(78,"div",7),ie(79,"input",28),_(80,"div",12)(81,"button",13),se("click",function(s){return r.unlinkSteam(s)}),A(82,"Unlink"),w()()()()(),_(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),A(87,"Email"),w(),ie(88,"br"),w(),ie(89,"input",30),w(),_(90,"div",4)(91,"div",5)(92,"label",31),A(93,"Password"),w()(),ie(94,"input",32),w()(),_(95,"div",33)(96,"div",4),ie(97,"div",5),_(98,"span",34),A(99),w()(),ie(100,"div",4),w(),q(101,wft,2,1,"button",35),w()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.accountForm),x(11),S("ngForOf",r.account.devices),x(2),S("disabled",!r.updateAllowed()||0===r.account.devices.length),x(7),S("value",r.account.custom_id),x(2),S("disabled",!r.updateAllowed()||!r.account.custom_id||""===r.account.custom_id),x(8),S("value",r.account.user.facebook_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_id||""===r.account.user.facebook_id),x(7),S("value",r.account.user.facebook_instant_game_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_instant_game_id||""===r.account.user.facebook_instant_game_id),x(8),S("value",r.account.user.apple_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.apple_id||""===r.account.user.apple_id),x(7),S("value",r.account.user.gamecenter_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.gamecenter_id||""===r.account.user.gamecenter_id),x(8),S("value",r.account.user.google_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.google_id||""===r.account.user.google_id),x(7),S("value",r.account.user.steam_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.steam_id||""===r.account.user.steam_id),x(18),wt("Verification Status: ",null===r.account.verify_time?"Not Verified":"Verified",""),x(2),S("ngIf",r.updateAllowed()))},dependencies:[Bt,Ct,pr,ms,_C,bC,ts,Fm,ps,gs,Lo,ns],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})}return t})();const Cft=["editor"];function Sft(t,n){if(1&t&&(_(0,"ngb-alert",24),ie(1,"img",25),_(2,"h6",26),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function kft(t,n){1&t&&(_(0,"ngb-alert",27),ie(1,"img",28),_(2,"h6",26),A(3,"Account was modified successfully."),w()()),2&t&&S("dismissible",!1)}function Tft(t,n){if(1&t){const e=He();_(0,"button",29),se("click",function(){return we(e),xe(P().updateWallet())}),A(1,"Save"),w()}2&t&&S("disabled",P().updating)}function Dft(t,n){1&t&&(_(0,"th",30),A(1,"Remove"),w())}function Aft(t,n){1&t&&(_(0,"tr")(1,"td",31),A(2,"No wallet ledger items found."),w()())}function Eft(t,n){1&t&&ie(0,"div",37)}function Mft(t,n){1&t&&ie(0,"div",38)}function Oft(t,n){if(1&t){const e=He();_(0,"td")(1,"button",39),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteLedgerItem(r,s,a))}),A(2,"Delete"),w()()}}function Ift(t,n){if(1&t&&(_(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),A(4),w()()()()),2&t){const e=P().$implicit;x(4),ze(e.metadata)}}function Nft(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",32),se("click",function(){const o=we(e).index,s=P();return xe(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),q(3,Eft,1,0,"div",33),q(4,Mft,1,0,"div",34),w(),A(5),w(),_(6,"td",35)(7,"pre",36),A(8),w()(),_(9,"td"),A(10),w(),q(11,Oft,3,0,"td",22),w(),q(12,Ift,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.walletLedgerMetadataOpen[e]),x(1),S("ngIf",r.walletLedgerMetadataOpen[e]),x(1),wt(" ",i.id," "),x(3),ze(i.changeset),x(2),ze(i.update_time),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.walletLedgerMetadataOpen[e])}}let jft=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;editor;jsonEditor;error="";account;walletLedger=[];walletLedgerMetadataOpen=[];updating=!1;updated=!1;nextCursor="";prevCursor="";limit=100;userID;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(Cft,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(q(0,Sft,4,2,"ngb-alert",0),q(1,kft,4,1,"ngb-alert",1),_(2,"div",2),ie(3,"div",3,4),w(),q(5,Tft,2,1,"button",5),ie(6,"hr",6),_(7,"div",7)(8,"div",8),ie(9,"div",9),_(10,"div",10)(11,"div",11)(12,"button",12),se("click",function(){return r.loadData("")}),ie(13,"img",13),w(),_(14,"button",12),se("click",function(){return r.loadData(r.prevCursor)}),ie(15,"img",14),w(),_(16,"button",12),se("click",function(){return r.loadData(r.nextCursor)}),ie(17,"img",15),w()()()()(),_(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),A(23,"ID"),w(),_(24,"th"),A(25,"Changeset"),w(),_(26,"th",20),A(27,"Update Time"),w(),q(28,Dft,2,0,"th",21),w()(),_(29,"tbody"),q(30,Aft,3,0,"tr",22),q(31,Nft,13,7,"ng-template",23),w()()()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(4),S("ngIf",r.updateAllowed()),x(7),S("disabled",0===r.walletLedger.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(12),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.walletLedger.length),x(1),S("ngForOf",r.walletLedger))},dependencies:[Bt,Ct,pr],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})}return t})(),Pft=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Rft(t,n){if(1&t&&(_(0,"ngb-alert",10),ie(1,"img",11),_(2,"h6",12),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function Lft(t,n){1&t&&(_(0,"th",13),A(1,"Remove"),w())}function Fft(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No friends found."),w()())}function $ft(t,n){1&t&&(_(0,"span"),A(1,"Friend (0)"),w())}function Bft(t,n){1&t&&(_(0,"span"),A(1,"Invite Sent (1)"),w())}function Vft(t,n){1&t&&(_(0,"span"),A(1,"Invite Received (2)"),w())}function Hft(t,n){1&t&&(_(0,"span"),A(1,"Blocked (3)"),w())}function Uft(t,n){if(1&t){const e=He();_(0,"td",17)(1,"button",18),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteFriend(r,s,a))}),A(2,"Delete"),w()()}}function zft(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o.user))}),A(2),w(),_(3,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o.user))}),A(4),w(),_(5,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o.user))}),q(6,$ft,2,0,"span",8),q(7,Bft,2,0,"span",8),q(8,Vft,2,0,"span",8),q(9,Hft,2,0,"span",8),w(),_(10,"td"),A(11),w(),q(12,Uft,3,0,"td",16),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.user.id),x(2),ze(e.user.username),x(2),S("ngIf",0===e.state),x(1),S("ngIf",1===e.state),x(1),S("ngIf",2===e.state),x(1),S("ngIf",3===e.state),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed())}}let Gft=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;friends=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(q(0,Rft,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),A(6,"User ID"),w(),_(7,"th"),A(8,"Username"),w(),_(9,"th",5),A(10,"State"),w(),_(11,"th",6),A(12,"Update Time"),w(),q(13,Lft,2,0,"th",7),w()(),_(14,"tbody"),q(15,Fft,3,0,"tr",8),q(16,zft,13,8,"tr",9),w()()()),2&i&&(S("ngIf",r.error),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.friends.length),x(1),S("ngForOf",r.friends))},dependencies:[Bt,Ct,pr],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Wft=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function qft(t,n){if(1&t&&(_(0,"ngb-alert",10),ie(1,"img",11),_(2,"h6",12),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function Yft(t,n){1&t&&(_(0,"th",13),A(1,"Remove"),w())}function Jft(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No group membership found."),w()())}function Kft(t,n){1&t&&(_(0,"span"),A(1,"Superadmin (0)"),w())}function Xft(t,n){1&t&&(_(0,"span"),A(1,"Admin (1)"),w())}function Qft(t,n){1&t&&(_(0,"span"),A(1,"Member (2)"),w())}function Zft(t,n){1&t&&(_(0,"span"),A(1,"Join Request (3)"),w())}function ept(t,n){1&t&&(_(0,"span"),A(1,"Banned (4)"),w())}function tpt(t,n){if(1&t){const e=He();_(0,"td")(1,"button",16),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteGroupUser(r,s,a))}),A(2,"Delete"),w()()}}function npt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(2),w(),_(3,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),q(6,Kft,2,0,"span",8),q(7,Xft,2,0,"span",8),q(8,Qft,2,0,"span",8),q(9,Zft,2,0,"span",8),q(10,ept,2,0,"span",8),w(),_(11,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(12),w(),q(13,tpt,3,0,"td",8),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.group.id),x(2),ze(e.group.name),x(2),S("ngIf",0===e.state),x(1),S("ngIf",1===e.state),x(1),S("ngIf",2===e.state),x(1),S("ngIf",3===e.state),x(1),S("ngIf",4===e.state),x(2),ze(e.group.update_time),x(1),S("ngIf",i.deleteAllowed())}}let ipt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;groups=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(q(0,qft,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),A(6,"Group ID"),w(),_(7,"th"),A(8,"Name"),w(),_(9,"th",5),A(10,"State"),w(),_(11,"th",6),A(12,"Update Time"),w(),q(13,Yft,2,0,"th",7),w()(),_(14,"tbody"),q(15,Jft,3,0,"tr",8),q(16,npt,14,9,"tr",9),w()()()),2&i&&(S("ngIf",r.error),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.groups.length),x(1),S("ngForOf",r.groups))},dependencies:[Bt,Ct,pr],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),rpt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const opt=["editor"];function spt(t,n){if(1&t&&(_(0,"ngb-alert",34),ie(1,"img",35),_(2,"h6",36),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function apt(t,n){1&t&&(_(0,"ngb-alert",37),ie(1,"img",38),_(2,"h6",36),A(3,"Group was modified successfully."),w()()),2&t&&S("dismissible",!1)}function lpt(t,n){1&t&&(_(0,"button",39),A(1,"Save"),w()),2&t&&S("disabled",P().updating)}const cpt=function(t){return["/accounts",t]},upt=function(t){return{"is-invalid":t}};let dpt=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";group;groupForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Sr.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(opt,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(q(0,spt,4,2,"ngb-alert",0),q(1,apt,4,1,"ngb-alert",1),_(2,"form",2),se("ngSubmit",function(){return r.updateGroup()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),A(7,"Group ID"),w()(),ie(8,"input",7),w(),_(9,"div",4)(10,"div",5)(11,"label",8),A(12,"Creator ID"),w()(),_(13,"a",9),ie(14,"input",10),w()()(),_(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),A(19,"Name"),w()(),ie(20,"input",12),_(21,"div",13),A(22,"Name is required"),w()(),_(23,"div",4)(24,"div",5)(25,"label",14),A(26,"Description"),w()(),ie(27,"input",15),w()(),_(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),A(32,"Avatar URL"),w()(),ie(33,"input",18),w(),_(34,"div",4)(35,"div",5)(36,"label",19),A(37,"Language"),w()(),ie(38,"input",20),w()(),_(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),A(43,"Members"),w()(),ie(44,"input",21),w(),_(45,"div",16)(46,"div",5)(47,"label",22),A(48,"Max Count"),w()(),ie(49,"input",23),w()(),_(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),A(54,"Open"),w()(),ie(55,"input",24),w()(),_(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),A(60,"Create Time"),w()(),ie(61,"input",27),w(),_(62,"div",4)(63,"div",5)(64,"label",28),A(65,"Update Time"),w()(),ie(66,"input",29),w()(),_(67,"div",30),ie(68,"div",31,32),w(),q(70,lpt,2,1,"button",33),w()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.groupForm),x(6),S("value",r.group.id),x(5),S("routerLink",ui(12,cpt,r.group.creator_id)),x(1),S("value",r.group.creator_id),x(6),S("ngClass",ui(14,upt,r.f.name.dirty&&r.f.name.errors)),x(1),S("hidden",r.f.name.disabled||r.f.name.valid||r.f.name.pristine),x(23),S("value",r.group.edge_count),x(17),S("value",r.group.create_time),x(5),S("value",r.group.update_time),x(4),S("ngIf",r.updateAllowed()))},dependencies:[Mc,dp,Ct,pr,ms,ts,lC,ps,gs,Hh,Lo,ns]})}return t})();function hpt(t,n){if(1&t&&(_(0,"ngb-alert",13),ie(1,"img",14),_(2,"h6",15),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function fpt(t,n){1&t&&(_(0,"span"),A(1,"Add by membership state"),w())}function ppt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P(2);x(1),ze(e.activeState)}}function gpt(t,n){if(1&t){const e=He();_(0,"button",20),se("click",function(){const o=we(e).$implicit;return xe(P(2).activeState=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function mpt(t,n){if(1&t&&(_(0,"div",16)(1,"button",17),q(2,fpt,2,0,"span",11),q(3,ppt,2,1,"span",11),w(),_(4,"div",18),q(5,gpt,2,1,"button",19),w()()),2&t){const e=P();x(2),S("ngIf",!e.activeState||""===e.activeState),x(1),S("ngIf",e.activeState&&""!==e.activeState),x(2),S("ngForOf",e.states)}}function vpt(t,n){if(1&t){const e=He();_(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),ie(5,"input",26),_(6,"div",27)(7,"div",28)(8,"button",29),se("click",function(){return we(e),xe(P().add())}),A(9,"Add"),w()()()()()()()()}if(2&t){const e=P();x(3),S("formGroup",e.addForm)}}function ypt(t,n){1&t&&(_(0,"th",30),A(1,"Demote"),w())}function _pt(t,n){1&t&&(_(0,"th",30),A(1,"Promote"),w())}function bpt(t,n){1&t&&(_(0,"th",31),A(1,"Remove"),w())}function wpt(t,n){1&t&&(_(0,"tr")(1,"td",32),A(2,"No group membership found."),w()())}function xpt(t,n){1&t&&(_(0,"span"),A(1,"Superadmin (0)"),w())}function Cpt(t,n){1&t&&(_(0,"span"),A(1,"Admin (1)"),w())}function Spt(t,n){1&t&&(_(0,"span"),A(1,"Member (2)"),w())}function kpt(t,n){1&t&&(_(0,"span"),A(1,"Join Request (3)"),w())}function Tpt(t,n){1&t&&(_(0,"span"),A(1,"Banned (4)"),w())}function Dpt(t,n){if(1&t){const e=He();_(0,"td",36)(1,"button",37),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().demoteGroupUser(r,s,a))}),Ne(),_(2,"svg",38),ie(3,"path",39),w()()()}}function Apt(t,n){if(1&t){const e=He();_(0,"td",36)(1,"button",37),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().promoteGroupUser(r,s,a))}),Ne(),_(2,"svg",40),ie(3,"path",41),w()()()}}function Ept(t,n){if(1&t){const e=He();_(0,"td",42)(1,"button",43),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteGroupUser(r,s,a))}),A(2,"Delete"),w()()}}function Mpt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(2),w(),_(3,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),q(6,xpt,2,0,"span",11),q(7,Cpt,2,0,"span",11),q(8,Spt,2,0,"span",11),q(9,kpt,2,0,"span",11),q(10,Tpt,2,0,"span",11),w(),_(11,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(12),w(),q(13,Dpt,4,0,"td",34),q(14,Apt,4,0,"td",34),q(15,Ept,3,0,"td",35),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.user.id),x(2),ze(e.user.username),x(2),S("ngIf",0===e.state),x(1),S("ngIf",1===e.state),x(1),S("ngIf",2===e.state),x(1),S("ngIf",3===e.state),x(1),S("ngIf",4===e.state),x(2),ze(e.user.update_time),x(1),S("ngIf",i.editionAllowed()),x(1),S("ngIf",i.editionAllowed()),x(1),S("ngIf",i.editionAllowed())}}let Opt=(()=>{class t{route;router;consoleService;formBuilder;authService;error="";group;members=[];activeState="Add Member";states=["Add Member","Join"];addForm;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(js),te(zr))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(q(0,hpt,4,2,"ngb-alert",0),q(1,mpt,6,3,"div",1),q(2,vpt,10,1,"div",2),_(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),A(8,"User ID"),w(),_(9,"th"),A(10,"Name"),w(),_(11,"th",7),A(12,"State"),w(),_(13,"th",8),A(14,"Update Time"),w(),q(15,ypt,2,0,"th",9),q(16,_pt,2,0,"th",9),q(17,bpt,2,0,"th",10),w()(),_(18,"tbody"),q(19,wpt,3,0,"tr",11),q(20,Mpt,16,11,"tr",12),w()()()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",!r.group.open&&r.editionAllowed()),x(1),S("ngIf",r.editionAllowed()),x(13),S("ngIf",r.editionAllowed()),x(1),S("ngIf",r.editionAllowed()),x(1),S("ngIf",r.editionAllowed()),x(2),S("ngIf",0===r.members.length),x(1),S("ngForOf",r.members))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Ipt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Npt(t,n){if(1&t&&(_(0,"ngb-alert",28),ie(1,"img",29),_(2,"h6",30),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function jpt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.activeType)}}function Ppt(t,n){if(1&t){const e=He();_(0,"button",31),se("click",function(){const o=we(e).$implicit;return xe(P().activeType=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function Rpt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.activeNode)}}function Lpt(t,n){if(1&t){const e=He();_(0,"button",31),se("click",function(){const o=we(e).$implicit;return xe(P().activeNode=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function Fpt(t,n){1&t&&(_(0,"tr")(1,"td",32),A(2,"No realtime matches were found."),w()())}function $pt(t,n){1&t&&ie(0,"div",40)}function Bpt(t,n){1&t&&ie(0,"div",41)}function Vpt(t,n){if(1&t){const e=He();_(0,"div",37),se("click",function(){we(e);const r=P(),o=r.index,s=r.$implicit,a=P();return a.getMatchState(o,s),xe(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),q(1,$pt,1,0,"div",38),q(2,Bpt,1,0,"div",39),w()}if(2&t){const e=P().index,i=P();x(1),S("ngIf",!i.matchStatesOpen[e]),x(1),S("ngIf",i.matchStatesOpen[e])}}function Hpt(t,n){1&t&&ie(0,"div",42)}function Upt(t,n){1&t&&(_(0,"span"),A(1,"Yes"),w())}function zpt(t,n){1&t&&(_(0,"span"),A(1,"No"),w())}function Gpt(t,n){1&t&&ie(0,"img",51)}function Wpt(t,n){if(1&t&&(_(0,"div")(1,"small")(2,"b"),A(3,"Current Tick"),w()(),_(4,"pre",47)(5,"small"),A(6),w()(),_(7,"small")(8,"b"),A(9,"Match State"),w()(),_(10,"pre",47)(11,"small"),A(12),w()()()),2&t){const e=P(2).index,i=P();x(6),ze(i.matchStates[e].tick),x(6),ze(i.matchStates[e].state)}}function qpt(t,n){1&t&&ie(0,"img",51)}function Ypt(t,n){if(1&t&&(_(0,"pre",47)(1,"small"),A(2),w()()),2&t){const e=P(2).index,i=P();x(2),ze(i.getMatchPresencesString(i.matchStates[e].presences))}}function Jpt(t,n){if(1&t&&(_(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),A(6,"Match Label"),w()(),_(7,"pre",47)(8,"small"),A(9),w()()(),_(10,"div",48),q(11,Gpt,1,0,"img",49),q(12,Wpt,13,2,"div",7),w(),_(13,"div",48)(14,"small")(15,"b"),A(16,"Match Presences"),w()(),q(17,qpt,1,0,"img",49),q(18,Ypt,3,1,"pre",50),w()()()()),2&t){const e=P(),i=e.$implicit,r=e.index,o=P();x(9),ze(i.api_match.label),x(2),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),x(1),S("ngIf",null!==o.matchStates[r]),x(5),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),x(1),S("ngIf",null!==o.matchStates[r])}}function Kpt(t,n){if(1&t&&(_(0,"tr")(1,"td"),q(2,Vpt,3,2,"div",33),q(3,Hpt,1,0,"div",34),A(4),w(),_(5,"td"),A(6),w(),_(7,"td",35),q(8,Upt,2,0,"span",7),q(9,zpt,2,0,"span",7),w(),_(10,"td"),A(11),w(),_(12,"td"),A(13),w(),_(14,"td"),A(15),w()(),q(16,Jpt,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=P();x(2),S("ngIf",i.api_match.authoritative),x(1),S("ngIf",!i.api_match.authoritative),x(1),wt(" ",i.api_match.match_id," "),x(2),ze(i.api_match.size),x(2),S("ngIf",i.api_match.authoritative),x(1),S("ngIf",!i.api_match.authoritative),x(2),ze(i.node),x(2),ze(i.api_match.handler_name),x(2),ze(i.api_match.authoritative?i.api_match.tick_rate:"-"),x(1),S("ngIf",r.matchStatesOpen[e])}}let Xpt=(()=>{class t{route;router;formBuilder;consoleService;error="";matches=[];matchStates=[];matchStatesOpen=[];updated=!1;searchForm1;searchForm2;searchForm3;type;activeType="All";types=["All","Authoritative","Relayed"];activeNode="All Nodes";nodes=["All Nodes"];constructor(e,i,r,o){this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));const i=e.get("type");this.type=Number(i);const r=e.get("node");if(this.route.data.subscribe(o=>{o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1===this.type||2===this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,w0e(this.consoleService,e,0===e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(js),te(kn))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Active Matches"),w(),_(2,"h6",1),A(3),w(),q(4,Npt,4,2,"ngb-alert",2),_(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),q(9,jpt,2,1,"span",7),w(),_(10,"div",8),q(11,Ppt,2,1,"button",9),w()()(),_(12,"div",10)(13,"button",11),se("click",function(){return r.search()}),A(14,"Search"),w()()(),_(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),se("ngSubmit",function(){return r.search()}),_(19,"div",16),ie(20,"input",17),w()(),_(21,"form",15),se("ngSubmit",function(){return r.search()}),_(22,"div",16),ie(23,"input",17),w()(),_(24,"form",15),se("ngSubmit",function(){return r.search()}),_(25,"div",16),ie(26,"input",18),_(27,"div",10)(28,"div",5)(29,"button",19),q(30,Rpt,2,1,"span",7),w(),_(31,"div",8),q(32,Lpt,2,1,"button",9),w()()()()()()()(),_(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),A(39,"Match ID"),w()(),_(40,"th",23),A(41,"Presence Count"),w(),_(42,"th",24),A(43,"Authoritative"),w(),_(44,"th",24),A(45,"Node"),w(),_(46,"th",25),A(47,"Handler Name"),w(),_(48,"th",26),A(49,"Tick Rate"),w()()(),_(50,"tbody"),q(51,Fpt,3,0,"tr",7),q(52,Kpt,17,10,"ng-template",27),w()()()),2&i&&(x(3),wt("",r.matches.length," running matches found."),x(1),S("ngIf",r.error),x(5),S("ngIf",r.activeType&&""!==r.activeType),x(2),S("ngForOf",r.types),x(7),S("hidden","All"!==r.activeType)("formGroup",r.searchForm1),x(3),S("hidden","Relayed"!==r.activeType)("formGroup",r.searchForm2),x(3),S("hidden","Authoritative"!==r.activeType)("formGroup",r.searchForm3),x(6),S("ngIf",r.activeNode&&""!==r.activeNode),x(2),S("ngForOf",r.nodes),x(6),Ft("pl-3",r.matches.length>0),x(13),S("ngIf",0===r.matches.length),x(1),S("ngForOf",r.matches))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Qpt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));return w0e(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))))}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function w0e(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return $t(null)}let Zpt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(_o(r=>$t(r.nodes.map(o=>o.name)))).pipe(Va(r=>(e.data={...e.data,error:r},$t([]))))}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function egt(t,n){if(1&t&&(_(0,"ngb-alert",25),ie(1,"img",26),_(2,"h6",27),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying groups: ",e.error,"")}}function tgt(t,n){1&t&&(_(0,"th",28),A(1,"Remove"),w())}function ngt(t,n){1&t&&(_(0,"tr")(1,"td",29),A(2,"No groups found - change the filter criteria or add new user groups."),w()())}function igt(t,n){1&t&&ie(0,"td")}function rgt(t,n){if(1&t){const e=He();_(0,"td",32)(1,"button",33),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteGroup(r,s,a))}),A(2,"Delete"),w()()}}function ogt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",30),se("click",function(){const o=we(e).$implicit;return xe(P().viewGroup(o))}),A(2),w(),_(3,"td",30),se("click",function(){const o=we(e).$implicit;return xe(P().viewGroup(o))}),A(4),w(),_(5,"td",30),se("click",function(){const o=we(e).$implicit;return xe(P().viewGroup(o))}),A(6),w(),q(7,igt,1,0,"td",23),q(8,rgt,3,0,"td",31),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.id),x(2),ze(e.name),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),x(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let sgt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";groupsCount=0;groups=[];nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Groups"),w(),_(2,"h6",1),A(3),w(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),se("ngSubmit",function(){return r.search(0)}),_(8,"div",6),ie(9,"input",7),_(10,"div",8)(11,"div",9)(12,"button",10),se("click",function(){return r.search(0)}),A(13,"Search"),w()()()()()(),_(14,"div",11)(15,"div",12)(16,"button",13),se("click",function(){return r.search(0)}),ie(17,"img",14),w(),_(18,"button",13),se("click",function(){return r.search(1)}),ie(19,"img",15),w()()()()(),q(20,egt,4,2,"ngb-alert",16),_(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),A(26,"Group ID"),w(),_(27,"th"),A(28,"Name"),w(),_(29,"th",21),A(30,"Last Update"),w(),q(31,tgt,2,0,"th",22),w()(),_(32,"tbody"),q(33,ngt,3,0,"tr",23),q(34,ogt,9,5,"tr",24),w()()()),2&i&&(x(3),wt("",r.groupsCount," groups found."),x(4),S("formGroup",r.searchForm),x(9),S("disabled",0===r.groups.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(11),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.groups.length),x(1),S("ngForOf",r.groups))},dependencies:[Bt,Ct,pr,ms,ts,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),agt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lgt(t,n){if(1&t){const e=He();_(0,"button",13),se("click",function(r){return we(e),xe(P().exportGroup(r))}),ie(1,"img",14),A(2,"Export"),w()}}function cgt(t,n){if(1&t){const e=He();_(0,"button",15),se("click",function(r){return we(e),xe(P().deleteGroup(r,!1))}),ie(1,"img",16),A(2,"Delete"),w()}}function ugt(t,n){if(1&t&&(_(0,"ngb-alert",17),ie(1,"img",18),_(2,"h6",19),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}const dgt=function(t,n){return["/groups",t,n]};function hgt(t,n){if(1&t&&(_(0,"div"),ul(1,20),_(2,"a",21),A(3),w(),dl(),w()),2&t){const e=n.$implicit,i=P();x(1),S("ngbNavItem",e.path),x(1),S("routerLink",Ni(3,dgt,i.group.id,e.path)),x(1),ze(e.label)}}const fgt=function(){return["/groups"]};let pgt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;group;error="";views=[{label:"Details",path:"details"},{label:"Members",path:"members"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,XI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Group"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),A(7,"Group"),w()(),_(8,"li",6),A(9),w()()(),_(10,"div"),q(11,lgt,3,0,"button",7),q(12,cgt,3,0,"button",8),w()(),q(13,ugt,4,2,"ngb-alert",9),_(14,"nav",10,11),q(16,hgt,4,6,"div",12),w(),ie(17,"router-outlet")),2&i&&(x(6),S("routerLink",ma(6,fgt)),x(3),ze(r.group.id),x(2),S("ngIf",r.exportAllowed()),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.error),x(3),S("ngForOf",r.views))},dependencies:[yp,Mc,ty,Bt,Ct,pr,Bu,Wd,Ty,Yh],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),ggt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function mgt(t,n){if(1&t){const e=He();_(0,"button",12),se("click",function(r){return we(e),xe(P().deleteLeaderboard(r))}),ie(1,"img",13),A(2,"Delete Leaderboard"),w()}}function vgt(t,n){if(1&t&&(_(0,"ngb-alert",14),ie(1,"img",15),_(2,"h6",16),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}const ygt=function(t,n){return["/leaderboards",t,n]};function _gt(t,n){if(1&t&&(_(0,"div"),ul(1,17),_(2,"a",18),A(3),w(),dl(),w()),2&t){const e=n.$implicit,i=P();x(1),S("ngbNavItem",e.path),x(1),S("routerLink",Ni(3,ygt,i.leaderboard.id,e.path)),x(1),ze(e.label)}}const bgt=function(){return["/leaderboards"]};let wgt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;leaderboard;error="";views=[{label:"Details",path:"details"},{label:"Records",path:"records"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Leaderboard"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),A(7,"Leaderboards"),w()(),_(8,"li",6),A(9),w()()(),_(10,"div"),q(11,mgt,3,0,"button",7),w()(),q(12,vgt,4,2,"ngb-alert",8),_(13,"nav",9,10),q(15,_gt,4,6,"div",11),w(),ie(16,"router-outlet")),2&i&&(x(6),S("routerLink",ma(5,bgt)),x(3),ze(r.leaderboard.id),x(2),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.error),x(3),S("ngForOf",r.views))},dependencies:[yp,Mc,ty,Bt,Ct,pr,Bu,Wd,Ty,Yh],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),xgt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Cgt=["editor"];function Sgt(t,n){if(1&t&&(_(0,"ngb-alert",24),ie(1,"img",25),_(2,"h6",26),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function kgt(t,n){if(1&t&&(_(0,"div",27)(1,"h6"),A(2,"Tournament"),w(),ie(3,"hr",28),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),A(8,"Title"),w()(),ie(9,"input",30),w(),_(10,"div",3)(11,"div",4)(12,"label",31),A(13,"Description"),w()(),ie(14,"input",32),w()(),_(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),A(19,"Category"),w()(),ie(20,"input",34),w(),_(21,"div",3)(22,"div",4)(23,"label",35),A(24,"Max Num Score"),w()(),ie(25,"input",36),w()(),_(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),A(30,"Size"),w()(),ie(31,"input",38),w(),_(32,"div",3)(33,"div",4)(34,"label",39),A(35,"Max Size"),w()(),ie(36,"input",40),w()(),_(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),A(41,"Duration"),w()(),ie(42,"input",42),w(),_(43,"div",3)(44,"div",4)(45,"label",43),A(46,"Join Required"),w()(),ie(47,"input",44),w()(),_(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),A(52,"Start Time"),w()(),ie(53,"input",46),w(),_(54,"div",3)(55,"div",4)(56,"label",47),A(57,"End Time"),w()(),ie(58,"input",48),w()(),_(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),A(63,"Start Active"),w()(),ie(64,"input",50),w(),_(65,"div",3)(66,"div",4)(67,"label",51),A(68,"End Active"),w()(),ie(69,"input",52),w()()()),2&t){const e=P();x(9),S("value",e.leaderboard.title),x(5),S("value",e.leaderboard.description),x(6),S("value",e.leaderboard.category),x(5),S("value",e.leaderboard.max_num_score),x(6),S("value",e.leaderboard.size),x(5),S("value",e.leaderboard.max_size),x(6),S("value",e.leaderboard.duration),x(5),S("value",e.leaderboard.join_required),x(6),S("value",e.leaderboard.start_time),x(5),S("value",e.leaderboard.end_time),x(6),S("value",e.leaderboard.start_active),x(5),S("value",e.leaderboard.end_active)}}let Tgt=(()=>{class t{route;editor;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};jsonEditor;leaderboard;error="";constructor(e){this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}static \u0275fac=function(i){return new(i||t)(te(Li))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(Cgt,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(i,r){1&i&&(q(0,Sgt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),A(6,"ID"),w()(),ie(7,"input",6),w(),_(8,"div",3)(9,"div",4)(10,"label",7),A(11,"Authoritative"),w()(),ie(12,"input",8),w()(),_(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),A(17,"Sort Order"),w()(),ie(18,"input",10),w(),_(19,"div",3)(20,"div",4)(21,"label",11),A(22,"Operator"),w()(),ie(23,"input",12),w()(),_(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),A(28,"Reset Schedule"),w()(),ie(29,"input",14),w(),_(30,"div",3)(31,"div",4)(32,"label",15),A(33,"Create Time"),w()(),ie(34,"input",16),w()(),_(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),A(39,"Prev Reset"),w()(),ie(40,"input",18),w(),_(41,"div",3)(42,"div",4)(43,"label",15),A(44,"Next Reset"),w()(),ie(45,"input",19),w()()(),q(46,kgt,70,12,"div",20),_(47,"div",21),ie(48,"div",22,23),w()),2&i&&(S("ngIf",r.error),x(7),S("value",r.leaderboard.id),x(5),S("value",r.leaderboard.authoritative),x(6),S("value",r.orderString[r.leaderboard.sort_order]),x(5),S("value",r.operatorString[r.leaderboard.operator]),x(6),S("value",r.leaderboard.reset_schedule),x(5),S("value",r.leaderboard.create_time),x(6),S("value",r.leaderboard.prev_reset),x(5),S("value",r.leaderboard.next_reset),x(1),S("ngIf",r.leaderboard.tournament))},dependencies:[Ct,pr],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})();function Dgt(t,n){if(1&t&&(_(0,"ngb-alert",19),ie(1,"img",20),_(2,"h6",21),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function Agt(t,n){1&t&&(_(0,"th",22),A(1,"Remove"),w())}function Egt(t,n){1&t&&(_(0,"tr")(1,"td",23),A(2,"No records found."),w()())}function Mgt(t,n){1&t&&ie(0,"div",28)}function Ogt(t,n){1&t&&ie(0,"div",29)}function Igt(t,n){if(1&t){const e=He();_(0,"td",30)(1,"button",31),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteRecord(r,s,a))}),A(2,"Delete"),w()()}}function Ngt(t,n){if(1&t&&(_(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),A(4),w()()()()),2&t){const e=P().$implicit;x(4),ze(e.metadata)}}function jgt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",24),se("click",function(){const o=we(e).index,s=P();return xe(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),q(3,Mgt,1,0,"div",25),q(4,Ogt,1,0,"div",26),w(),A(5),w(),_(6,"td"),A(7),w(),_(8,"td"),A(9),w(),_(10,"td"),A(11),w(),_(12,"td"),A(13),w(),_(14,"td"),A(15),w(),_(16,"td"),A(17),w(),q(18,Igt,3,0,"td",27),w(),q(19,Ngt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.recordsMetadataOpen[e]),x(1),S("ngIf",r.recordsMetadataOpen[e]),x(1),wt(" ",i.owner_id," "),x(2),ze(i.username),x(2),ze(i.score),x(2),ze(i.subscore),x(2),ze(i.rank),x(2),ze(i.num_score),x(2),ze(i.expiry_time?i.expiry_time:"-"),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.recordsMetadataOpen[e])}}let Pgt=(()=>{class t{route;consoleService;authService;deleteConfirmService;error="";leaderboard;records=[];recordsMetadataOpen=[];nextCursor="";prevCursor="";constructor(e,i,r,o){this.route=e,this.consoleService=i,this.authService=r,this.deleteConfirmService=o}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(q(0,Dgt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),ie(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),se("click",function(){return r.loadRecords(0)}),ie(7,"img",7),w(),_(8,"button",6),se("click",function(){return r.loadRecords(-1)}),ie(9,"img",8),w(),_(10,"button",6),se("click",function(){return r.loadRecords(1)}),ie(11,"img",9),w()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),A(17,"Owner ID"),w(),_(18,"th"),A(19,"Username"),w(),_(20,"th",14),A(21,"Score"),w(),_(22,"th",14),A(23,"Subscore"),w(),_(24,"th",14),A(25,"Rank"),w(),_(26,"th",14),A(27,"No. of scores"),w(),_(28,"th",15),A(29,"Expiry Time"),w(),q(30,Agt,2,0,"th",16),w()(),_(31,"tbody"),q(32,Egt,3,0,"tr",17),q(33,jgt,20,11,"ng-template",18),w()()()),2&i&&(S("ngIf",r.error),x(6),S("disabled",0===r.records.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(20),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.records.length),x(1),S("ngForOf",r.records))},dependencies:[Bt,Ct,pr]})}return t})(),Rgt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Lgt=["editorReq"],Fgt=["editorVars"],$gt=["editorRes"];function Bgt(t,n){if(1&t&&(_(0,"ngb-alert",27),ie(1,"img",28),_(2,"h6",29),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error invoking RPC call: ",e.error,"")}}function Vgt(t,n){if(1&t&&(_(0,"option",30),A(1),w()),2&t){const e=n.$implicit;Nd("value",e.method),x(1),ze(e.method)}}function Hgt(t,n){if(1&t&&(_(0,"option",30),A(1),w()),2&t){const e=n.$implicit;Nd("value",e.method),x(1),ze(e.method)}}function Ugt(t,n){if(1&t){const e=He();_(0,"button",31),se("click",function(){return we(e),xe(P().addSessionVars())}),A(1,"Add Session Variables"),w()}}let zgt=(()=>{class t{route;router;consoleService;formBuilder;editorReq;editorVars;editorRes;jsonEditorReq;jsonEditorVars;jsonEditorRes;error="";rpcEndpoints=[];endpoints=[];endpointCallForm;addVars=!1;constructor(e,i,r,o){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Sr.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditorReq=new Vf({target:this.editorReq.nativeElement,props:{mode:Fr.text,readOnly:!0}}),this.jsonEditorVars=new Vf({target:this.editorVars.nativeElement,props:{mode:Fr.text}}),this.jsonEditorRes=new Vf({target:this.editorRes.nativeElement,props:{mode:Fr.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=cg(this.jsonEditorReq.get()).text}catch(s){return void(this.error=s)}let i={};try{const s=cg(this.jsonEditorVars.get()).text;if(""!==s){const a=JSON.parse(s);Object.keys(a).forEach(l=>{if("string"!=typeof l)throw new Error(`Invalid session variables: ${l} must be a string`);if("string"!=typeof a[l])throw new Error(`Invalid session variables: ${a[l]} must be a string`)}),i=a}}catch(s){return void(this.error=s)}const r={user_id:this.f.user_id.value,body:e,session_vars:i};let o=null;o=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,r):this.consoleService.callApiEndpoint("",this.f.method.value,r),o.subscribe(s=>{if(s.error_message&&""!==s.error_message)this.jsonEditorRes.set({json:s.error_message});else{e="";try{e=""===s.body?s.body:JSON.stringify(JSON.parse(s.body),null,2)}catch(a){return void(this.error=a)}this.jsonEditorRes.set({text:e})}},s=>{this.jsonEditorRes.set({text:""}),this.error=s})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditorReq){if(!e||""===e)return this.jsonEditorReq.set({text:""}),void this.jsonEditorReq.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditorReq.set({text:i}),this.jsonEditorReq.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}addSessionVars(){this.addVars=!0,this.jsonEditorVars.set({json:{"":"","":""}})}get f(){return this.endpointCallForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&(xr(Lgt,5),xr(Fgt,5),xr($gt,5)),2&i){let o;kt(o=Tt())&&(r.editorReq=o.first),kt(o=Tt())&&(r.editorVars=o.first),kt(o=Tt())&&(r.editorRes=o.first)}},decls:43,vars:8,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","btn btn-primary","type","button",3,"click",4,"ngIf"],[1,"row","mb-3",3,"hidden"],[1,"col-md-6","py-3"],[1,"text-muted","pt-2"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","200px"],["editorVars",""],[1,"row","mb-3"],[1,"col-lg-6","py-3"],[2,"height","500px"],["editorReq",""],["editorRes",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"API Explorer"),w(),q(2,Bgt,4,2,"ngb-alert",1),_(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),se("ngSubmit",function(){return r.sendRequest()}),_(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),A(11,"Select Endpoint"),w(),q(12,Vgt,2,2,"option",10),_(13,"option",11),A(14,"----"),w(),q(15,Hgt,2,2,"option",10),w()(),ie(16,"input",12),_(17,"div",13)(18,"button",14),A(19,"Send Request"),w()()()()()()(),q(20,Ugt,2,0,"button",15),_(21,"div",16)(22,"div",17)(23,"h5"),A(24,"Session Vars"),w(),_(25,"div",18),A(26,"Add variables as object of string to string key-value pairs."),w(),_(27,"div",19),ie(28,"div",20,21),w()()(),_(30,"div",22)(31,"div",23)(32,"h5"),A(33,"Request Body"),w(),_(34,"div",19),ie(35,"div",24,25),w()(),_(37,"div",23)(38,"h5"),A(39,"Response"),w(),_(40,"div",19),ie(41,"div",24,26),w()()()),2&i&&(x(2),S("ngIf",r.error),x(4),S("formGroup",r.endpointCallForm),x(4),S("value",""),x(2),S("ngForOf",r.rpcEndpoints),x(3),S("ngForOf",r.endpoints),x(3),S("disabled",r.f.method.invalid),x(2),S("ngIf",!r.addVars),x(1),S("hidden",!r.addVars))},dependencies:[Bt,Ct,pr,ms,_C,bC,ts,Fm,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})}return t})(),Ggt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Wgt(t,n){if(1&t&&(_(0,"ngb-alert",16),ie(1,"img",17),_(2,"h6",18),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while processing request: ",e.error,"")}}function qgt(t,n){1&t&&(_(0,"th"),A(1,"User ID"),w())}function Ygt(t,n){1&t&&ie(0,"div",23)}function Jgt(t,n){1&t&&ie(0,"div",24)}function Kgt(t,n){if(1&t&&(_(0,"td"),A(1),w()),2&t){const e=P().$implicit;x(1),ze(e.user_id)}}function Xgt(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),A(6,"Provider Response"),w()()(),_(7,"div")(8,"pre",28)(9,"small"),A(10),w()()()()()()),2&t){const e=P().$implicit;x(10),ze(e.provider_response)}}function Qgt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",19),se("click",function(){const o=we(e).index,s=P();return xe(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),q(3,Ygt,1,0,"div",20),q(4,Jgt,1,0,"div",21),w(),A(5),w(),q(6,Kgt,2,1,"td",13),_(7,"td"),A(8),w(),_(9,"td"),A(10),w(),_(11,"td"),A(12),w(),_(13,"td"),A(14),w(),_(15,"td"),A(16),w()(),q(17,Xgt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.purchasesRowsOpen[e]),x(1),S("ngIf",r.purchasesRowsOpen[e]),x(1),wt(" ",i.transaction_id," "),x(1),S("ngIf",!r.userId),x(2),ze(i.product_id),x(2),ze(r.getStoreText(i.store)),x(2),ze(i.purchase_time),x(2),ze(i.create_time),x(2),ze(r.getRefundText(i.refund_time)),x(1),S("ngIf",r.purchasesRowsOpen[e])}}function Zgt(t,n){1&t&&(_(0,"tr")(1,"td",29),A(2,"No purchases were found."),w()())}let x0e=(()=>{class t{route;consoleService;purchases=[];purchasesRowsOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;transactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.route.data.subscribe(i=>{this.purchases=i[0].validated_purchases,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.transactionId.firstChange||(this.transactionId?(this.transactionId=this.transactionId.trim(),this.consoleService.getPurchase("",this.transactionId).subscribe(i=>{this.purchases=[i]},i=>{this.error=i})):""===this.transactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listPurchases("",this.userId,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(hy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn))};static \u0275cmp=nt({type:t,selectors:[["app-purchases"]],inputs:{transactionId:["transaction_id","transactionId"]},features:[Kt],decls:32,vars:7,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[4,"ngIf"],[2,"width","180px"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","6"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","6",1,"text-muted"]],template:function(i,r){1&i&&(q(0,Wgt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),ie(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),se("click",function(){return r.loadData("")}),ie(7,"img",7),w(),_(8,"button",6),se("click",function(){return r.loadData(r.prevCursor)}),ie(9,"img",8),w(),_(10,"button",6),se("click",function(){return r.loadData(r.nextCursor)}),ie(11,"img",9),w()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),A(17,"Transaction ID"),w(),q(18,qgt,2,0,"th",13),_(19,"th"),A(20,"Product ID"),w(),_(21,"th"),A(22,"Store"),w(),_(23,"th",14),A(24,"Purchase Time"),w(),_(25,"th",14),A(26,"Create Time"),w(),_(27,"th",14),A(28,"Refund Time"),w()()(),_(29,"tbody"),q(30,Qgt,18,10,"ng-template",15),q(31,Zgt,3,0,"tr",13),w()()()),2&i&&(S("ngIf",r.error),x(6),S("disabled",0===r.purchases.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(8),S("ngIf",!r.userId),x(12),S("ngForOf",r.purchases),x(1),S("ngIf",0===r.purchases.length))},dependencies:[Bt,Ct,pr]})}return t})(),C0e=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listPurchases("",r,100,"")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function emt(t,n){1&t&&(_(0,"span"),A(1,"Filter by type"),w())}function tmt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.activeFilter)}}function nmt(t,n){if(1&t){const e=He();_(0,"button",39),se("click",function(){const o=we(e).$implicit;return xe(P().activeFilter=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function imt(t,n){if(1&t&&(_(0,"h6"),A(1),w()),2&t){const e=P();x(1),wt("Showing results for chat room label: ",e.f1.label.value,"")}}const rmt=function(t){return["/groups",t]};function omt(t,n){if(1&t&&(_(0,"h6"),A(1,"Showing results for group ID: "),_(2,"a",40),A(3),w()()),2&t){const e=P();x(2),S("routerLink",ui(2,rmt,e.route.snapshot.queryParamMap.get("group_id"))),x(1),ze(e.f2.group_id.value)}}const S0e=function(t){return["/accounts",t]};function smt(t,n){if(1&t&&(_(0,"h6"),A(1,"Showing results for user IDs: "),_(2,"a",40),A(3),w(),A(4,", "),_(5,"a",40),A(6),w()()),2&t){const e=P();x(2),S("routerLink",ui(4,S0e,e.route.snapshot.queryParamMap.get("user_id_one"))),x(1),ze(e.f3.user_id_one.value),x(2),S("routerLink",ui(6,S0e,e.route.snapshot.queryParamMap.get("user_id_two"))),x(1),ze(e.f3.user_id_two.value)}}function amt(t,n){if(1&t&&(_(0,"ngb-alert",41),ie(1,"img",42),_(2,"h6",43),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying messages: ",e.error,"")}}function lmt(t,n){1&t&&(_(0,"th",44),A(1,"Remove"),w())}function cmt(t,n){if(1&t&&(_(0,"tr")(1,"td",45),A(2,"No messages found."),w()()),2&t){const e=P();x(1),Re("colspan",e.deleteAllowed()?6:5)}}function umt(t,n){1&t&&ie(0,"div",54)}function dmt(t,n){1&t&&ie(0,"div",55)}function hmt(t,n){1&t&&ie(0,"td")}function fmt(t,n){if(1&t){const e=He();_(0,"td",56)(1,"button",57),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteMessage(r,s,a))}),A(2,"Delete"),w()()}}function pmt(t,n){if(1&t&&(_(0,"tr",58)(1,"td"),A(2),w()()),2&t){const e=P().$implicit,i=P();x(1),Re("colspan",i.deleteAllowed()?6:5),x(1),wt(" ",e.content," ")}}function gmt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td"),A(2),w(),_(3,"td",46),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",47),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(6),w(),_(7,"td",48)(8,"div",49),se("click",function(){const o=we(e).index,s=P();return xe(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),q(9,umt,1,0,"div",50),q(10,dmt,1,0,"div",51),w(),A(11),w(),_(12,"td"),A(13),w(),q(14,hmt,1,0,"td",3),q(15,fmt,3,0,"td",52),w(),q(16,pmt,3,2,"tr",53)}if(2&t){const e=n.$implicit,i=n.index,r=P();x(2),ze(e.code),x(2),ze(e.sender_id),x(2),ze(e.username),x(3),S("ngIf",!r.messageStatesOpen[i]),x(1),S("ngIf",r.messageStatesOpen[i]),x(1),wt(" ",e.content," "),x(2),ze(e.create_time),x(1),S("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),x(1),S("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),x(1),S("ngIf",r.messageStatesOpen[i])}}function mmt(t,n){if(1&t&&(_(0,"ngb-alert",59),ie(1,"img",42),_(2,"h6",43),A(3,"Failed to delete data."),w(),_(4,"p",60),A(5),w()()),2&t){const e=P();S("dismissible",!1),x(5),ze(e.deleteError)}}function vmt(t,n){if(1&t){const e=He();_(0,"ngb-alert",61),se("close",function(){return we(e),xe(P().deleteSuccess=!1)}),ie(1,"img",62),_(2,"h6",43),A(3),w()()}if(2&t){const e=P();S("dismissible",!0),x(3),Ah("",e.totalDeleted," messages ",e.totalDeleted>0?"successfully":""," deleted.")}}function ymt(t,n){if(1&t){const e=He();_(0,"button",63),se("click",function(){return we(e),xe(P().deleteData())}),A(1,"Delete messages"),w()}2&t&&S("disabled",P().deleting)}let _mt=(()=>{class t{route;router;consoleService;authService;formBuilder;modalService;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";messages=[];nextCursor="";searchForm1;searchForm2;searchForm3;type;confirmDeleteForm;deleteError="";deleteSuccess=!1;deleting=!1;totalDeleted=0;activeFilter="";filters=["Chat Room","Group Chat","Direct Chat"];messageStatesOpen=[];constructor(e,i,r,o,s,a,l){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.deleteConfirmService=l,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Sr.compose([Sr.required,Sr.pattern("DELETE")])],numberValueControl:{title:"Choose how many days to retain:",id:"days"},days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");const i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2===this.type||3===this.type||4===this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(e=>{this.deleteError="",this.deleting=!0;const i=new Date,r=Number(e.days);i.setDate(i.getDate()-r),this.consoleService.deleteChannelMessages("",i.toISOString(),null).subscribe(o=>{this.totalDeleted=Number(o.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const s=this.route.snapshot.queryParamMap,a=s.get("type");let l=s.get("label");l||(l="0");const c=s.get("group_id"),u=s.get("user_id_one"),d=s.get("user_id_two");let h=s.get("cursor");h||(h=""),a&&this.updateMessages(Number(a),l,c,u,d,h)},o=>{this.deleting=!1,this.deleteError=o})},this.confirmDeleteForm,"Delete messages","Are you sure you want to delete all messages before retain days?")}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(zC),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:68,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Chat Messages"),w(),_(2,"div",1)(3,"button",2),q(4,emt,2,0,"span",3),q(5,tmt,2,1,"span",3),w(),_(6,"div",4),q(7,nmt,2,1,"button",5),w()(),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),ie(13,"input",11),_(14,"div",12)(15,"div",13)(16,"button",14),se("click",function(){return r.type=2,r.search(0)}),A(17,"Search"),w()()()()(),_(18,"form",9)(19,"div",10),ie(20,"input",15),_(21,"div",12)(22,"div",13)(23,"button",14),se("click",function(){return r.type=3,r.search(0)}),A(24,"Search "),w()()()()(),_(25,"form",9)(26,"div",10),ie(27,"input",16),_(28,"div",12)(29,"span",17),se("click",function(){return r.f3.user_id_one.setValue(r.systemUserId)}),ie(30,"img",18),w()(),ie(31,"input",19),_(32,"div",12)(33,"div",13)(34,"button",14),se("click",function(){return r.type=4,r.search(0)}),A(35,"Search "),w()()()()()(),_(36,"div",20)(37,"div",21)(38,"button",22),se("click",function(){return r.search(0)}),ie(39,"img",23),w(),_(40,"button",22),se("click",function(){return r.search(1)}),ie(41,"img",24),w()()()()(),q(42,imt,2,1,"h6",3),q(43,omt,4,4,"h6",3),q(44,smt,7,8,"h6",3),q(45,amt,4,2,"ngb-alert",25),_(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),A(51,"Code"),w(),_(52,"th",30),A(53,"Sender ID"),w(),_(54,"th",31),A(55,"Username"),w(),_(56,"th"),A(57,"Content"),w(),_(58,"th",32),A(59,"Create Time"),w(),q(60,lmt,2,0,"th",33),w()(),_(61,"tbody"),q(62,cmt,3,1,"tr",3),q(63,gmt,17,10,"ng-template",34),w()()(),q(64,mmt,6,2,"ngb-alert",35),q(65,vmt,4,3,"ngb-alert",36),_(66,"div",37),q(67,ymt,2,1,"button",38),w()),2&i&&(x(4),S("ngIf",!r.activeFilter||""===r.activeFilter),x(1),S("ngIf",r.activeFilter&&""!==r.activeFilter),x(2),S("ngForOf",r.filters),x(4),S("hidden","Chat Room"!==r.activeFilter)("formGroup",r.searchForm1),x(7),S("hidden","Group Chat"!==r.activeFilter)("formGroup",r.searchForm2),x(7),S("hidden","Direct Chat"!==r.activeFilter)("formGroup",r.searchForm3),x(13),S("disabled",0===r.messages.length),x(2),S("disabled",""===r.nextCursor||null===r.nextCursor),x(2),S("ngIf",0!=r.messages.length&&""===r.error&&2==r.type),x(1),S("ngIf",0!=r.messages.length&&""===r.error&&3==r.type),x(1),S("ngIf",0!=r.messages.length&&""===r.error&&4==r.type),x(1),S("ngIf",r.error),x(15),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.messages.length),x(1),S("ngForOf",r.messages),x(1),S("ngIf",r.deleteError),x(1),S("ngIf",r.deleteSuccess),x(2),S("ngIf",r.deleteMessagesAllowed()))},dependencies:[Mc,Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})}return t})(),bmt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))));default:return $t(null)}}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wmt(t,n){if(1&t&&(_(0,"ngb-alert",16),ie(1,"img",17),_(2,"h6",18),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while processing request: ",e.error,"")}}function xmt(t,n){1&t&&ie(0,"div",23)}function Cmt(t,n){1&t&&ie(0,"div",24)}function Smt(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),A(6,"Provider Response"),w()()(),_(7,"div")(8,"pre",28)(9,"small"),A(10),w()()(),_(11,"div",29)(12,"small")(13,"b"),A(14,"Provider Notification"),w()()(),_(15,"div")(16,"pre",28)(17,"small"),A(18),w()()()()()()),2&t){const e=P().$implicit;x(10),ze(e.provider_response),x(8),ze(e.provider_notification)}}function kmt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",19),se("click",function(){const o=we(e).index,s=P();return xe(s.subscriptionsRowOpen[o]=!s.subscriptionsRowOpen[o])}),q(3,xmt,1,0,"div",20),q(4,Cmt,1,0,"div",21),w(),A(5),w(),_(6,"td"),A(7),w(),_(8,"td"),A(9),w(),_(10,"td"),A(11),w(),_(12,"td"),A(13),w(),_(14,"td"),A(15),w(),_(16,"td"),A(17),w()(),q(18,Smt,19,2,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.subscriptionsRowOpen[e]),x(1),S("ngIf",r.subscriptionsRowOpen[e]),x(1),wt(" ",i.product_id," "),x(2),ze(i.original_transaction_id),x(2),ze(r.getStoreText(i.store)),x(2),ze(i.purchase_time),x(2),ze(i.expiry_time),x(2),ze(i.create_time),x(2),ze(r.getRefundText(i.refund_time)),x(1),S("ngIf",r.subscriptionsRowOpen[e])}}function Tmt(t,n){1&t&&(_(0,"tr")(1,"td",30),A(2,"No subscriptions were found."),w()())}let k0e=(()=>{class t{route;consoleService;subscriptions=[];subscriptionsRowOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;originalTransactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.userId=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(i=>{this.subscriptions=i[0].validated_subscriptions,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.originalTransactionId.firstChange||(this.originalTransactionId?(this.originalTransactionId=this.originalTransactionId.trim(),this.consoleService.getSubscription("",this.originalTransactionId).subscribe(i=>{this.subscriptions=[i]},i=>{this.error=i})):""===this.originalTransactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listSubscriptions("",this.userId,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.subscriptionsRowOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(hy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn))};static \u0275cmp=nt({type:t,selectors:[["app-subscriptions"]],inputs:{originalTransactionId:["original_transaction_id","originalTransactionId"]},features:[Kt],decls:33,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],[1,"pt-2"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(q(0,wmt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),ie(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),se("click",function(){return r.loadData("")}),ie(7,"img",7),w(),_(8,"button",6),se("click",function(){return r.loadData(r.prevCursor)}),ie(9,"img",8),w(),_(10,"button",6),se("click",function(){return r.loadData(r.nextCursor)}),ie(11,"img",9),w()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),A(17,"Product ID"),w(),_(18,"th"),A(19,"Original Transaction ID"),w(),_(20,"th"),A(21,"Store"),w(),_(22,"th",13),A(23,"Purchase Time"),w(),_(24,"th",13),A(25,"Expiry Time"),w(),_(26,"th",13),A(27,"Create Time"),w(),_(28,"th",13),A(29,"Refund Time"),w()()(),_(30,"tbody"),q(31,kmt,19,10,"ng-template",14),q(32,Tmt,3,0,"tr",15),w()()()),2&i&&(S("ngIf",r.error),x(6),S("disabled",0===r.subscriptions.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(21),S("ngForOf",r.subscriptions),x(1),S("ngIf",0===r.subscriptions.length))},dependencies:[Bt,Ct,pr]})}return t})(),T0e=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listSubscriptions("",r,100,"")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Dmt=[{path:"",component:jLe,canActivate:[eIe],canActivateChild:[PLe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:GHe,resolve:[WHe]},{path:"config",component:VGe,resolve:[HGe]},{path:"users",component:qGe,resolve:[YGe]},{path:"modules",component:lWe,resolve:[cWe]},{path:"storage",component:yWe,resolve:[_We,bWe],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Mht,resolve:[Oht],pathMatch:"full"},{path:"leaderboards",component:Vht,resolve:[Hht]},{path:"leaderboards/:id",component:wgt,resolve:[xgt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:Tgt,resolve:[]},{path:"records",component:Pgt,resolve:[Rgt]}]},{path:"matches",component:Xpt,resolve:[Qpt,Zpt]},{path:"groups",component:sgt,resolve:[agt]},{path:"groups/:id",component:pgt,resolve:[ggt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:dpt,resolve:[]},{path:"members",component:Opt,resolve:[Ipt],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Kht,resolve:[Xht]},{path:"accounts/:id",component:uft,resolve:[dft],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:vft,resolve:[]},{path:"authentication",component:xft,resolve:[]},{path:"wallet",component:jft,resolve:[Pft]},{path:"friends",component:Gft,resolve:[Wft]},{path:"groups",component:ipt,resolve:[rpt]},{path:"purchases",component:x0e,resolve:[C0e]},{path:"subscriptions",component:k0e,resolve:[T0e]}]},{path:"apiexplorer",component:zgt,resolve:[Ggt]},{path:"chat",component:_mt,resolve:[bmt]},{path:"purchases",component:(()=>{class t{formBuilder;transactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({transaction_id:[""]})}search(){this.transactionId=this.f.transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:12,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","transaction_id","placeholder","Search by transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Purchases"),w(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),se("ngSubmit",function(){return r.search()}),_(6,"div",5),ie(7,"input",6),_(8,"div",7)(9,"button",8),se("click",function(){return r.search()}),A(10,"Search"),w()()()()()()(),ie(11,"app-purchases",9)),2&i&&(x(5),S("formGroup",r.searchForm),x(6),S("transaction_id",r.transactionId))},dependencies:[ms,ts,ps,gs,Lo,ns,x0e],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[C0e]},{path:"subscriptions",component:(()=>{class t{formBuilder;originalTransactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({original_transaction_id:[""]})}search(){this.originalTransactionId=this.f.original_transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:13,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","original_transaction_id","placeholder","Search by original_transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"original_transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Subscriptions"),w(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),se("ngSubmit",function(){return r.search()}),_(6,"div",5),ie(7,"input",6),_(8,"div",7)(9,"div",8)(10,"button",9),se("click",function(){return r.search()}),A(11,"Search"),w()()()()()()()(),ie(12,"app-subscriptions",10)),2&i&&(x(5),S("formGroup",r.searchForm),x(7),S("original_transaction_id",r.originalTransactionId))},dependencies:[ms,ts,ps,gs,Lo,ns,k0e],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[T0e]}]},{path:"login",component:Q3e,canActivate:[Z3e]},{path:"**",redirectTo:""}];let Amt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Mn({type:t});static \u0275inj=Dn({imports:[KV.forRoot(Dmt,{useHash:!0}),KV]})}return t})(),Emt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=nt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(i,r){1&i&&ie(0,"router-outlet")},dependencies:[yp]})}return t})();new class Omt extends Lu{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Nmt=1;const jmt=Promise.resolve(),sD={};function D0e(t){return t in sD&&(delete sD[t],!0)}const A0e={setImmediate(t){const n=Nmt++;return sD[n]=!0,jmt.then(()=>D0e(n)&&t()),n},clearImmediate(t){D0e(t)}};new class Rmt extends Lu{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=A0e.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(A0e.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const hvt=new Ut("ng-select-selection-model");function fvt(){return new pvt}class pvt{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}let gvt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[{provide:hvt,useValue:fvt}],imports:[Mh]}),t})(),mvt=(()=>{class t{authenticationService;constructor(e){this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}static \u0275fac=function(i){return new(i||t)(Ve(zr))};static \u0275prov=Ke({token:t,factory:t.\u0275fac})}return t})(),vvt=(()=>{class t{authenticationService;router;constructor(e,i){this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Va(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),gp(r.error.message||r.statusText))))}static \u0275fac=function(i){return new(i||t)(Ve(zr),Ve(xi))};static \u0275prov=Ke({token:t,factory:t.\u0275fac})}return t})(),yvt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Mn({type:t,bootstrap:[Emt]});static \u0275inj=Dn({providers:[J3e,Yz,{provide:LO,useValue:{host:document.location.origin,timeout:15e3}},{provide:PO,useClass:mvt,multi:!0},{provide:PO,useClass:vvt,multi:!0}],imports:[CGe,Amt,lM,SAe,W3e,kLe,SHe,S3e.forRoot({apiKey:"",debug:!1,loadOnInitialization:!1}),kAe,w3e,b3e,gvt]})}return t})();vTe().bootstrapModule(yvt).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},327:function(Pg,Bb){var Gf,Wf;void 0!==(Wf="function"==typeof(Gf=function(){"use strict";function Rl(pn,zi,ua){var _r=new XMLHttpRequest;_r.open("GET",pn),_r.responseType="blob",_r.onload=function(){Cd(_r.response,zi,ua)},_r.onerror=function(){console.error("could not download file")},_r.send()}function qf(pn){var zi=new XMLHttpRequest;zi.open("HEAD",pn,!1);try{zi.send()}catch{}return 200<=zi.status&&299>=zi.status}function nl(pn){try{pn.dispatchEvent(new MouseEvent("click"))}catch{var zi=document.createEvent("MouseEvents");zi.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),pn.dispatchEvent(zi)}}var Na="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,cD=Na.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Cd=Na.saveAs||("object"!=typeof window||window!==Na?function(){}:"download"in HTMLAnchorElement.prototype&&!cD?function(pn,zi,ua){var _r=Na.URL||Na.webkitURL,Ln=document.createElement("a");Ln.download=zi=zi||pn.name||"download",Ln.rel="noopener","string"==typeof pn?(Ln.href=pn,Ln.origin===location.origin?nl(Ln):qf(Ln.href)?Rl(pn,zi,ua):nl(Ln,Ln.target="_blank")):(Ln.href=_r.createObjectURL(pn),setTimeout(function(){_r.revokeObjectURL(Ln.href)},4e4),setTimeout(function(){nl(Ln)},0))}:"msSaveOrOpenBlob"in navigator?function(pn,zi,ua){if(zi=zi||pn.name||"download","string"!=typeof pn)navigator.msSaveOrOpenBlob(function Ia(pn,zi){return typeof zi>"u"?zi={autoBom:!1}:"object"!=typeof zi&&(console.warn("Deprecated: Expected third argument to be a object"),zi={autoBom:!zi}),zi.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(pn.type)?new Blob(["\ufeff",pn],{type:pn.type}):pn}(pn,ua),zi);else if(qf(pn))Rl(pn,zi,ua);else{var _r=document.createElement("a");_r.href=pn,_r.target="_blank",setTimeout(function(){nl(_r)})}}:function(pn,zi,ua,_r){if((_r=_r||open("","_blank"))&&(_r.document.title=_r.document.body.innerText="downloading..."),"string"==typeof pn)return Rl(pn,zi,ua);var Ln="application/octet-stream"===pn.type,Vb=/constructor/i.test(Na.HTMLElement)||Na.safari,Hb=/CriOS\/[\d]+/.test(navigator.userAgent);if((Hb||Ln&&Vb||cD)&&typeof FileReader<"u"){var j0=new FileReader;j0.onloadend=function(){var Yf=j0.result;Yf=Hb?Yf:Yf.replace(/^data:[^;]*;/,"data:attachment/file;"),_r?_r.location.href=Yf:location=Yf,_r=null},j0.readAsDataURL(pn)}else{var _h=Na.URL||Na.webkitURL,bh=_h.createObjectURL(pn);_r?_r.location=bh:location.href=bh,_r=null,setTimeout(function(){_h.revokeObjectURL(bh)},4e4)}});Na.saveAs=Cd.saveAs=Cd,Pg.exports=Cd})?Gf.apply(Bb,[]):Gf)&&(Pg.exports=Wf)}},Pg=>{Pg(Pg.s=951)}]); \ No newline at end of file diff --git a/console/ui/dist/prod-nt/static/svg/chat.svg b/console/ui/dist/prod-nt/static/svg/chat.svg index 5c16182bfe..49c69d37bf 100644 --- a/console/ui/dist/prod-nt/static/svg/chat.svg +++ b/console/ui/dist/prod-nt/static/svg/chat.svg @@ -1,10 +1 @@ - - - - - - + \ No newline at end of file diff --git a/console/ui/dist/prod-nt/static/svg/purchases.svg b/console/ui/dist/prod-nt/static/svg/purchases.svg new file mode 100644 index 0000000000..7d8a95da12 --- /dev/null +++ b/console/ui/dist/prod-nt/static/svg/purchases.svg @@ -0,0 +1 @@ + diff --git a/console/ui/dist/prod-nt/static/svg/subscriptions.svg b/console/ui/dist/prod-nt/static/svg/subscriptions.svg new file mode 100644 index 0000000000..7e9700c342 --- /dev/null +++ b/console/ui/dist/prod-nt/static/svg/subscriptions.svg @@ -0,0 +1 @@ + diff --git a/console/ui/dist/prod/index.html b/console/ui/dist/prod/index.html index 3a68cf5920..b99c2a00e7 100644 --- a/console/ui/dist/prod/index.html +++ b/console/ui/dist/prod/index.html @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/console/ui/dist/prod/static/3rdpartylicenses.txt b/console/ui/dist/prod/static/3rdpartylicenses.txt index fd1b141e5f..4cd6ed1ec2 100644 --- a/console/ui/dist/prod/static/3rdpartylicenses.txt +++ b/console/ui/dist/prod/static/3rdpartylicenses.txt @@ -121,56 +121,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -base64-js -MIT -The MIT License (MIT) - -Copyright (c) 2014 Jameson Little - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -buffer -MIT -The MIT License (MIT) - -Copyright (c) Feross Aboukhadijeh, and other contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - d3-array BSD-3-Clause Copyright 2010-2020 Mike Bostock @@ -729,31 +679,6 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -esprima -BSD-2-Clause -Copyright JS Foundation and other contributors, https://js.foundation/ - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - file-saver MIT The MIT License @@ -769,21 +694,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI [1]: http://eligrey.com -ieee754 -BSD-3-Clause -Copyright 2008 Fair Oaks Labs, Inc. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - js-yaml MIT (The MIT License) diff --git a/console/ui/dist/prod/static/main.175bb59cdaac7d41.js b/console/ui/dist/prod/static/main.175bb59cdaac7d41.js new file mode 100644 index 0000000000..77b6426421 --- /dev/null +++ b/console/ui/dist/prod/static/main.175bb59cdaac7d41.js @@ -0,0 +1 @@ +(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{951:(Pg,Bb,Gf)=>{"use strict";function xu(t){return"function"==typeof t}let Wf=!1;const Ia={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Wf&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Wf=t},get useDeprecatedSynchronousErrorHandling(){return Wf}};function Rl(t){setTimeout(()=>{throw t},0)}const qf={closed:!0,next(t){},error(t){if(Ia.useDeprecatedSynchronousErrorHandling)throw t;Rl(t)},complete(){}},nl=Array.isArray||(t=>t&&"number"==typeof t.length);function Na(t){return null!==t&&"object"==typeof t}const Cd=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class pn{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof pn)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof Cd?e.errors:e),[])}pn.EMPTY=((t=new pn).closed=!0,t);const ua="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Ln extends pn{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=qf;break;case 1:if(!n){this.destination=qf;break}if("object"==typeof n){n instanceof Ln?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new Vb(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new Vb(this,n,e,i)}}[ua](){return this}static create(n,e,i){const r=new Ln(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class Vb extends Ln{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;xu(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==qf&&(s=Object.create(e),xu(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;Ia.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=Ia;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):Rl(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;Rl(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);Ia.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),Ia.useDeprecatedSynchronousErrorHandling)throw i;Rl(i)}}__tryOrSetError(n,e,i){if(!Ia.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return Ia.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(Rl(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const _h="function"==typeof Symbol&&Symbol.observable||"@@observable";function bh(t){return t}function fF(t){return 0===t.length?bh:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let ar=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function j0(t,n,e){if(t){if(t instanceof Ln)return t;if(t[ua])return t[ua]()}return t||n||e?new Ln(t,n,e):new Ln(qf)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||Ia.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),Ia.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){Ia.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Hb(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof Ln?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=pF(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[_h](){return this}pipe(...e){return 0===e.length?this:fF(e)(this)}toPromise(e){return new(e=pF(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function pF(t){if(t||(t=Ia.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Rg=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class I0e extends pn{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class gF extends Ln{constructor(n){super(n),this.destination=n}}let hr=(()=>{class t extends ar{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[ua](){return new gF(this)}lift(e){const i=new mF(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Rg;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew mF(n,e),t})();class mF extends hr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):pn.EMPTY}}function Jf(t){return t&&"function"==typeof t.schedule}function xn(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new N0e(t,n))}}class N0e{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new j0e(n,this.project,this.thisArg))}}class j0e extends Ln{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const vF=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function _F(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const uD=t=>{if(t&&"function"==typeof t[_h])return(t=>n=>{const e=t[_h]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(yF(t))return vF(t);if(_F(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,Rl),n))(t);if(t&&"function"==typeof t[wh])return(t=>n=>{const e=t[wh]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${Na(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function dD(t,n){return new ar(e=>{const i=new pn;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function Jo(t,n){return n?function z0e(t,n){if(null!=t){if(function H0e(t){return t&&"function"==typeof t[_h]}(t))return function $0e(t,n){return new ar(e=>{const i=new pn;return i.add(n.schedule(()=>{const r=t[_h]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(_F(t))return function B0e(t,n){return new ar(e=>{const i=new pn;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(yF(t))return dD(t,n);if(function U0e(t){return t&&"function"==typeof t[wh]}(t)||"string"==typeof t)return function V0e(t,n){if(!t)throw new Error("Iterable cannot be null");return new ar(e=>{const i=new pn;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[wh](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof ar?t:new ar(uD(t))}class P0 extends Ln{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class R0 extends Ln{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function L0(t,n){if(n.closed)return;if(t instanceof ar)return t.subscribe(n);let e;try{e=uD(t)(n)}catch(i){n.error(i)}return e}function _o(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(_o((r,o)=>Jo(t(r,o)).pipe(xn((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new G0e(t,e)))}class G0e{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new W0e(n,this.project,this.concurrent))}}class W0e extends R0{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function Lg(t=Number.POSITIVE_INFINITY){return _o(bh,t)}function F0(t,n){return n?dD(t,n):new ar(vF(t))}function hD(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Jf(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof ar?t[0]:Lg(n)(F0(t,e))}function Ub(){return function(n){return n.lift(new q0e(n))}}class q0e{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new Y0e(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class Y0e extends Ln{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class fD extends ar{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new pn,n.add(this.source.subscribe(new K0e(this.getSubject(),this))),n.closed&&(this._connection=null,n=pn.EMPTY)),n}refCount(){return Ub()(this)}}const J0e=(()=>{const t=fD.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class K0e extends gF{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class Z0e{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function e1e(){return new hr}function bF(){return t=>Ub()(function Q0e(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new Z0e(r,n));const o=Object.create(i,J0e);return o.source=i,o.subjectFactory=r,o}}(e1e)(t))}function fr(t){for(let n in t)if(t[n]===fr)return n;throw Error("Could not find renamed property on target object.")}function pD(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function br(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(br).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function gD(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const t1e=fr({__forward_ref__:fr});function Fn(t){return t.__forward_ref__=Fn,t.toString=function(){return br(this())},t}function Tn(t){return mD(t)?t():t}function mD(t){return"function"==typeof t&&t.hasOwnProperty(t1e)&&t.__forward_ref__===Fn}function vD(t){return t&&!!t.\u0275providers}const zb="https://g.co/ng/security#xss";class et extends Error{constructor(n,e){super(Gb(n,e)),this.code=n}}function Gb(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Un(t){return"string"==typeof t?t:null==t?"":String(t)}function Wb(t,n){throw new et(-201,!1)}function Ki(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}function Ke(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function Dn(t){return{providers:t.providers||[],imports:t.imports||[]}}function qb(t){return wF(t,Yb)||wF(t,CF)}function wF(t,n){return t.hasOwnProperty(n)?t[n]:null}function xF(t){return t&&(t.hasOwnProperty(yD)||t.hasOwnProperty(c1e))?t[yD]:null}const Yb=fr({\u0275prov:fr}),yD=fr({\u0275inj:fr}),CF=fr({ngInjectableDef:fr}),c1e=fr({ngInjectorDef:fr});var An=(()=>((An=An||{})[An.Default=0]="Default",An[An.Host=1]="Host",An[An.Self=2]="Self",An[An.SkipSelf=4]="SkipSelf",An[An.Optional=8]="Optional",An))();let _D;function Fl(t){const n=_D;return _D=t,n}function SF(t,n,e){const i=qb(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&An.Optional?null:void 0!==n?n:void Wb(br(t))}const Pr=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),$0={},bD="__NG_DI_FLAG__",Jb="ngTempTokenPath",d1e="ngTokenPath",h1e=/\n/gm,f1e="\u0275",kF="__source";let B0;function Fg(t){const n=B0;return B0=t,n}function p1e(t,n=An.Default){if(void 0===B0)throw new et(-203,!1);return null===B0?SF(t,void 0,n):B0.get(t,n&An.Optional?null:void 0,n)}function Ve(t,n=An.Default){return(function u1e(){return _D}()||p1e)(Tn(t),n)}function $n(t,n=An.Default){return Ve(t,Kb(n))}function Kb(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function wD(t){const n=[];for(let e=0;e((Cu=Cu||{})[Cu.OnPush=0]="OnPush",Cu[Cu.Default=1]="Default",Cu))(),_c=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(_c||(_c={})),_c))();const kd={},Gi=[],Xb=fr({\u0275cmp:fr}),xD=fr({\u0275dir:fr}),CD=fr({\u0275pipe:fr}),DF=fr({\u0275mod:fr}),Td=fr({\u0275fac:fr}),H0=fr({__NG_ELEMENT_ID__:fr});let y1e=0;function nt(t){return Sd(()=>{const n=EF(t),e={...n,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Cu.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||_c.Emulated,id:"c"+y1e++,styles:t.styles||Gi,_:null,schemas:t.schemas||null,tView:null};MF(e);const i=t.dependencies;return e.directiveDefs=Qb(i,!1),e.pipeDefs=Qb(i,!0),e})}function b1e(t){return Xi(t)||Ks(t)}function w1e(t){return null!==t}function Mn(t){return Sd(()=>({type:t.type,bootstrap:t.bootstrap||Gi,declarations:t.declarations||Gi,imports:t.imports||Gi,exports:t.exports||Gi,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function AF(t,n){if(null==t)return kd;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}function pt(t){return Sd(()=>{const n=EF(t);return MF(n),n})}function da(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Xi(t){return t[Xb]||null}function Ks(t){return t[xD]||null}function ja(t){return t[CD]||null}function rl(t,n){const e=t[DF]||null;if(!e&&!0===n)throw new Error(`Type ${br(t)} does not have '\u0275mod' property.`);return e}function EF(t){const n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||Gi,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:AF(t.inputs,n),outputs:AF(t.outputs)}}function MF(t){t.features?.forEach(n=>n(t))}function Qb(t,n){if(!t)return null;const e=n?ja:b1e;return()=>("function"==typeof t?t():t).map(i=>e(i)).filter(w1e)}const Dd=0,Lt=1,ei=2,so=3,bc=4,Kf=5,Xs=6,Bg=7,bo=8,Zb=9,ew=10,ri=11,SD=12,U0=13,OF=14,Vg=15,Qs=16,z0=17,Hg=18,Su=19,G0=20,IF=21,Rr=22,kD=1,NF=2,tw=7,nw=8,Ug=9,ha=10;function ol(t){return Array.isArray(t)&&"object"==typeof t[kD]}function wc(t){return Array.isArray(t)&&!0===t[kD]}function TD(t){return 0!=(4&t.flags)}function W0(t){return t.componentOffset>-1}function iw(t){return 1==(1&t.flags)}function xc(t){return!!t.template}function C1e(t){return 0!=(256&t[ei])}function Xf(t,n){return t.hasOwnProperty(Td)?t[Td]:null}class T1e{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Kt(){return RF}function RF(t){return t.type.prototype.ngOnChanges&&(t.setInput=A1e),D1e}function D1e(){const t=FF(this),n=t?.current;if(n){const e=t.previous;if(e===kd)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function A1e(t,n,e,i){const r=this.declaredInputs[e],o=FF(t)||function E1e(t,n){return t[LF]=n}(t,{previous:kd,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new T1e(l&&l.currentValue,n,a===kd),t[i]=n}Kt.ngInherit=!0;const LF="__ngSimpleChanges__";function FF(t){return t[LF]||null}const $l=function(t,n,e){},$F="svg";function Ts(t){for(;Array.isArray(t);)t=t[Dd];return t}function rw(t,n){return Ts(n[t])}function sl(t,n){return Ts(n[t.index])}function VF(t,n){return t.data[n]}function zg(t,n){return t[n]}function Pa(t,n){const e=n[t];return ol(e)?e:e[Dd]}function ow(t){return 64==(64&t[ei])}function Ch(t,n){return null==n?null:t[n]}function HF(t){t[Hg]=0}function AD(t,n){t[Kf]+=n;let e=t,i=t[so];for(;null!==i&&(1===n&&1===e[Kf]||-1===n&&0===e[Kf]);)i[Kf]+=n,e=i,i=i[so]}const zn={lFrame:QF(null),bindingsEnabled:!0};function zF(){return zn.bindingsEnabled}function st(){return zn.lFrame.lView}function Ri(){return zn.lFrame.tView}function we(t){return zn.lFrame.contextLView=t,t[bo]}function xe(t){return zn.lFrame.contextLView=null,t}function Ds(){let t=GF();for(;null!==t&&64===t.type;)t=t.parent;return t}function GF(){return zn.lFrame.currentTNode}function q0(){const t=zn.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function ku(t,n){const e=zn.lFrame;e.currentTNode=t,e.isParent=n}function ED(){return zn.lFrame.isParent}function MD(){zn.lFrame.isParent=!1}function fa(){const t=zn.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Ad(){return zn.lFrame.bindingIndex}function Gg(){return zn.lFrame.bindingIndex++}function Ed(t){const n=zn.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function YF(t){zn.lFrame.inI18n=t}function H1e(t,n){const e=zn.lFrame;e.bindingIndex=e.bindingRootIndex=t,OD(n)}function OD(t){zn.lFrame.currentDirectiveIndex=t}function JF(){return zn.lFrame.currentQueryIndex}function ND(t){zn.lFrame.currentQueryIndex=t}function z1e(t){const n=t[Lt];return 2===n.type?n.declTNode:1===n.type?t[Xs]:null}function KF(t,n,e){if(e&An.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&An.Host||(r=z1e(o),null===r||(o=o[Vg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=zn.lFrame=XF();return i.currentTNode=n,i.lView=t,!0}function jD(t){const n=XF(),e=t[Lt];zn.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function XF(){const t=zn.lFrame,n=null===t?null:t.child;return null===n?QF(t):n}function QF(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function ZF(){const t=zn.lFrame;return zn.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const e5=ZF;function PD(){const t=ZF();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function pa(){return zn.lFrame.selectedIndex}function Qf(t){zn.lFrame.selectedIndex=t}function Jr(){const t=zn.lFrame;return VF(t.tView,t.selectedIndex)}function Ne(){zn.lFrame.currentNamespace=$F}function Zf(){!function Y1e(){zn.lFrame.currentNamespace=null}()}function sw(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[Hg]+=65536),(a>11>16&&(3&t[ei])===n){t[ei]+=2048,$l(4,a,o);try{o.call(a)}finally{$l(5,a,o)}}}else{$l(4,a,o);try{o.call(a)}finally{$l(5,a,o)}}}const Wg=-1;class Y0{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function FD(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[Vg],e--;return i}let $D=!0;function dw(t){const n=$D;return $D=t,n}const s5=255,a5=5;let nye=0;const Tu={};function hw(t,n){const e=l5(t,n);if(-1!==e)return e;const i=n[Lt];i.firstCreatePass&&(t.injectorIndex=n.length,BD(i.data,t),BD(n,null),BD(i.blueprint,null));const r=VD(t,n),o=t.injectorIndex;if(o5(r)){const s=cw(r),a=uw(r,n),l=a[Lt].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function BD(t,n){t.push(0,0,0,0,0,0,0,0,n)}function l5(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function VD(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=g5(r),null===i)return Wg;if(e++,r=r[Vg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return Wg}function HD(t,n,e){!function iye(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(H0)&&(i=e[H0]),null==i&&(i=e[H0]=nye++);const r=i&s5;n.data[t+(r>>a5)]|=1<=0?n&s5:aye:n}(e);if("function"==typeof o){if(!KF(n,t,i))return i&An.Host?c5(r,0,i):u5(n,e,i,r);try{const s=o(i);if(null!=s||i&An.Optional)return s;Wb()}finally{e5()}}else if("number"==typeof o){let s=null,a=l5(t,n),l=Wg,c=i&An.Host?n[Qs][Xs]:null;for((-1===a||i&An.SkipSelf)&&(l=-1===a?VD(t,n):n[a+8],l!==Wg&&p5(i,!1)?(s=n[Lt],a=cw(l),n=uw(l,n)):a=-1);-1!==a;){const u=n[Lt];if(f5(o,a,u.data)){const d=oye(a,n,e,s,i,c);if(d!==Tu)return d}l=n[a+8],l!==Wg&&p5(i,n[Lt].data[a+8]===c)&&f5(o,a,n)?(s=u,a=cw(l),n=uw(l,n)):a=-1}}return r}function oye(t,n,e,i,r,o){const s=n[Lt],a=s.data[t+8],u=fw(a,s,e,null==i?W0(a)&&$D:i!=s&&0!=(3&a.type),r&An.Host&&o===a);return null!==u?ep(n,s,u,a):Tu}function fw(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&xc(f)&&f.type===e)return l}return null}function ep(t,n,e,i){let r=t[e];const o=n.data;if(function Q1e(t){return t instanceof Y0}(r)){const s=r;s.resolving&&function n1e(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new et(-200,`Circular dependency in DI detected for ${t}${e}`)}(function Ji(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Un(t)}(o[e]));const a=dw(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Fl(s.injectImpl):null;KF(t,i,An.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function K1e(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=RF(n);(e.preOrderHooks??(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&Fl(l),dw(a),s.resolving=!1,e5()}}return r}function f5(t,n,e){return!!(e[n+(t>>a5)]&1<{const n=t.prototype.constructor,e=n[Td]||UD(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Td]||UD(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function UD(t){return mD(t)?()=>{const n=UD(Tn(t));return n&&n()}:Xf(t)}function g5(t){const n=t[Lt],e=n.type;return 2===e?n.declTNode:1===e?t[Xs]:null}function Sh(t){return function rye(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function zD(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(Jg)?l[Jg]:Object.defineProperty(l,Jg,{value:[]})[Jg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class Ut{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Ke({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function tp(t,n){t.forEach(e=>Array.isArray(e)?tp(e,n):n(e))}function v5(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function pw(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function Q0(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function hye(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function WD(t,n){const e=Qg(t,n);if(e>=0)return t[1|e]}function Qg(t,n){return function y5(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Ra=Ra||{})[Ra.Important=1]="Important",Ra[Ra.DashCase=2]="DashCase",Ra))();const Oye=/^>|^->||--!>|)/,Nye="\u200b$1\u200b";const QD=new Map;let jye=0;const eA="__ngContext__";function Zs(t,n){ol(n)?(t[eA]=n[G0],function Rye(t){QD.set(t[G0],t)}(n)):t[eA]=n}let tA;function nA(t,n){return tA(t,n)}function r1(t){const n=t[so];return wc(n)?n[so]:n}function iA(t){return F5(t[U0])}function rA(t){return F5(t[bc])}function F5(t){for(;null!==t&&!wc(t);)t=t[bc];return t}function em(t,n,e,i,r){if(null!=i){let o,s=!1;wc(i)?o=i:ol(i)&&(s=!0,i=i[Dd]);const a=Ts(i);0===t&&null!==e?null==r?z5(n,e,a):np(n,e,a,r||null,!0):1===t&&null!==e?np(n,e,a,r||null,!0):2===t?dA(n,a,s):3===t&&n.destroyNode(a),null!=o&&function o_e(t,n,e,i,r){const o=e[tw];o!==Ts(e)&&em(n,t,i,o,r);for(let a=ha;an.replace(Iye,Nye))}(n))}function sA(t,n,e){return t.createElement(n,e)}function B5(t,n){const e=t[Ug],i=e.indexOf(n),r=n[so];512&n[ei]&&(n[ei]&=-513,AD(r,-1)),e.splice(i,1)}function aA(t,n){if(t.length<=ha)return;const e=ha+n,i=t[e];if(i){const r=i[z0];null!==r&&r!==t&&B5(r,i),n>0&&(t[e-1][bc]=i[bc]);const o=pw(t,ha+n);!function Yye(t,n){o1(t,n,n[ri],2,null,null),n[Dd]=null,n[Xs]=null}(i[Lt],i);const s=o[Su];null!==s&&s.detachView(o[Lt]),i[so]=null,i[bc]=null,i[ei]&=-65}return i}function V5(t,n){if(!(128&n[ei])){const e=n[ri];e.destroyNode&&o1(t,n,e,3,null,null),function Xye(t){let n=t[U0];if(!n)return lA(t[Lt],t);for(;n;){let e=null;if(ol(n))e=n[U0];else{const i=n[ha];i&&(e=i)}if(!e){for(;n&&!n[bc]&&n!==t;)ol(n)&&lA(n[Lt],n),n=n[so];null===n&&(n=t),ol(n)&&lA(n[Lt],n),e=n&&n[bc]}n=e}}(n)}}function lA(t,n){if(!(128&n[ei])){n[ei]&=-65,n[ei]|=128,function t_e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===_c.None||o===_c.Emulated)return null}return sl(i,e)}}function np(t,n,e,i,r){t.insertBefore(n,e,i,r)}function z5(t,n,e){t.appendChild(n,e)}function G5(t,n,e,i,r){null!==i?np(t,n,e,i,r):z5(t,n,e)}function yw(t,n){return t.parentNode(n)}function W5(t,n,e){return Y5(t,n,e)}function q5(t,n,e){return 40&t.type?sl(t,e):null}let cA,ww,pA,xw,Y5=q5;function J5(t,n){Y5=t,cA=n}function _w(t,n,e,i){const r=H5(t,i,n),o=n[ri],a=W5(i.parent||n[Xs],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return ww}()?.createHTML(t)||t}function e$(){return void 0!==pA?pA:typeof document<"u"?document:void 0}function gA(){if(void 0===xw&&(xw=null,Pr.trustedTypes))try{xw=Pr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return xw}function t$(t){return gA()?.createHTML(t)||t}function i$(t){return gA()?.createScriptURL(t)||t}class ip{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${zb})`}}class h_e extends ip{getTypeName(){return"HTML"}}class f_e extends ip{getTypeName(){return"Style"}}class p_e extends ip{getTypeName(){return"Script"}}class g_e extends ip{getTypeName(){return"URL"}}class m_e extends ip{getTypeName(){return"ResourceURL"}}function ll(t){return t instanceof ip?t.changingThisBreaksApplicationSecurity:t}function Du(t,n){const e=function v_e(t){return t instanceof ip&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${zb})`)}return e===n}function r$(t){const n=new S_e(t);return function k_e(){try{return!!(new window.DOMParser).parseFromString(tm(""),"text/html")}catch{return!1}}()?new C_e(n):n}class C_e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(tm(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class S_e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=tm(n),e}}const T_e=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Cw(t){return(t=String(t)).match(T_e)?t:"unsafe:"+t}function Md(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function s1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const o$=Md("area,br,col,hr,img,wbr"),s$=Md("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),a$=Md("rp,rt"),mA=s1(o$,s1(s$,Md("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),s1(a$,Md("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),s1(a$,s$)),vA=Md("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),l$=s1(vA,Md("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Md("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),D_e=Md("script,style,template");class A_e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!mA.hasOwnProperty(e))return this.sanitizedSomething=!0,!D_e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();mA.hasOwnProperty(e)&&!o$.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(c$(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const E_e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,M_e=/([^\#-~ |!])/g;function c$(t){return t.replace(/&/g,"&").replace(E_e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(M_e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Sw;function u$(t,n){let e=null;try{Sw=Sw||r$(t);let i=n?String(n):"";e=Sw.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Sw.getInertBodyElement(i)}while(i!==o);return tm((new A_e).sanitizeChildren(yA(e)||e))}finally{if(e){const i=yA(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function yA(t){return"content"in t&&function O_e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var wr=(()=>((wr=wr||{})[wr.NONE=0]="NONE",wr[wr.HTML=1]="HTML",wr[wr.STYLE=2]="STYLE",wr[wr.SCRIPT=3]="SCRIPT",wr[wr.URL=4]="URL",wr[wr.RESOURCE_URL=5]="RESOURCE_URL",wr))();function kw(t){const n=l1();return n?t$(n.sanitize(wr.HTML,t)||""):Du(t,"HTML")?t$(ll(t)):u$(e$(),Un(t))}function a1(t){const n=l1();return n?n.sanitize(wr.URL,t)||"":Du(t,"URL")?ll(t):Cw(Un(t))}function d$(t){const n=l1();if(n)return i$(n.sanitize(wr.RESOURCE_URL,t)||"");if(Du(t,"ResourceURL"))return i$(ll(t));throw new et(904,!1)}function l1(){const t=st();return t&&t[SD]}const Tw=new Ut("ENVIRONMENT_INITIALIZER"),f$=new Ut("INJECTOR",-1),p$=new Ut("INJECTOR_DEF_TYPES");class g${get(n,e=$0){if(e===$0){const i=new Error(`NullInjectorError: No provider for ${br(n)}!`);throw i.name="NullInjectorError",i}return e}}function F_e(...t){return{\u0275providers:m$(0,t),\u0275fromNgModule:!0}}function m$(t,...n){const e=[],i=new Set;let r;return tp(n,o=>{const s=o;_A(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&v$(r,e),e}function v$(t,n){for(let e=0;e{n.push(o)})}}function _A(t,n,e,i){if(!(t=Tn(t)))return!1;let r=null,o=xF(t);const s=!o&&Xi(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=xF(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)_A(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{tp(o.imports,u=>{_A(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&v$(c,n)}if(!a){const c=Xf(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:Gi},{provide:p$,useValue:r,multi:!0},{provide:Tw,useValue:()=>Ve(r),multi:!0})}const l=o.providers;null==l||a||bA(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function bA(t,n){for(let e of t)vD(e)&&(e=e.\u0275providers),Array.isArray(e)?bA(e,n):n(e)}const $_e=fr({provide:String,useValue:fr});function wA(t){return null!==t&&"object"==typeof t&&$_e in t}function rp(t){return"function"==typeof t}const xA=new Ut("Set Injector scope."),Dw={},V_e={};let CA;function Aw(){return void 0===CA&&(CA=new g$),CA}class Vl{}class b$ extends Vl{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,kA(n,s=>this.processProvider(s)),this.records.set(f$,nm(void 0,this)),r.has("environment")&&this.records.set(Vl,nm(void 0,this));const o=this.records.get(xA);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(p$.multi,Gi,An.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=Fg(this),i=Fl(void 0);try{return n()}finally{Fg(e),Fl(i)}}get(n,e=$0,i=An.Default){this.assertNotDestroyed(),i=Kb(i);const r=Fg(this),o=Fl(void 0);try{if(!(i&An.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function W_e(t){return"function"==typeof t||"object"==typeof t&&t instanceof Ut}(n)&&qb(n);a=l&&this.injectableDefInScope(l)?nm(SA(n),Dw):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&An.Self?Aw():this.parent).get(n,e=i&An.Optional&&e===$0?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Jb]=s[Jb]||[]).unshift(br(n)),r)throw s;return function m1e(t,n,e,i){const r=t[Jb];throw n[kF]&&r.unshift(n[kF]),t.message=function v1e(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==f1e?t.slice(2):t;let r=br(n);if(Array.isArray(n))r=n.map(br).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):br(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(h1e,"\n ")}`}("\n"+t.message,r,e,i),t[d1e]=r,t[Jb]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{Fl(o),Fg(r)}}resolveInjectorInitializers(){const n=Fg(this),e=Fl(void 0);try{const i=this.get(Tw.multi,Gi,An.Self);for(const r of i)r()}finally{Fg(n),Fl(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(br(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new et(205,!1)}processProvider(n){let e=rp(n=Tn(n))?n:Tn(n&&n.provide);const i=function U_e(t){return wA(t)?nm(void 0,t.useValue):nm(w$(t),Dw)}(n);if(rp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=nm(void 0,Dw,!0),r.factory=()=>wD(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Dw&&(e.value=V_e,e.value=e.factory()),"object"==typeof e.value&&e.value&&function G_e(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=Tn(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function SA(t){const n=qb(t),e=null!==n?n.factory:Xf(t);if(null!==e)return e;if(t instanceof Ut)throw new et(204,!1);if(t instanceof Function)return function H_e(t){const n=t.length;if(n>0)throw Q0(n,"?"),new et(204,!1);const e=function l1e(t){return t&&(t[Yb]||t[CF])||null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new et(204,!1)}function w$(t,n,e){let i;if(rp(t)){const r=Tn(t);return Xf(r)||SA(r)}if(wA(t))i=()=>Tn(t.useValue);else if(function _$(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...wD(t.deps||[]));else if(function y$(t){return!(!t||!t.useExisting)}(t))i=()=>Ve(Tn(t.useExisting));else{const r=Tn(t&&(t.useClass||t.provide));if(!function z_e(t){return!!t.deps}(t))return Xf(r)||SA(r);i=()=>new r(...wD(t.deps))}return i}function nm(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function kA(t,n){for(const e of t)Array.isArray(e)?kA(e,n):e&&vD(e)?kA(e.\u0275providers,n):n(e)}class q_e{}class x${}class J_e{resolveComponentFactory(n){throw function Y_e(t){const n=Error(`No component factory found for ${br(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let im=(()=>{class t{}return t.NULL=new J_e,t})();function K_e(){return rm(Ds(),st())}function rm(t,n){return new En(sl(t,n))}let En=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=K_e,t})();function X_e(t){return t instanceof En?t.nativeElement:t}class om{}let hs=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function Q_e(){const t=st(),e=Pa(Ds().index,t);return(ol(e)?e:t)[ri]}(),t})(),Z_e=(()=>{class t{}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:()=>null}),t})();class c1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const ebe=new c1("15.2.9"),TA={},DA="ngOriginalError";function AA(t){return t[DA]}class sm{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&AA(n);for(;e&&AA(e);)e=AA(e);return e||null}}function S$(t){return t.ownerDocument.defaultView}function Od(t){return t instanceof Function?t():t}function T$(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const D$="ng-template";function ube(t,n,e){let i=0,r=!0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==T$(f,c,0)||2&i&&c!==h){if(Cc(i))return!1;s=!0}}}}else{if(!s&&!Cc(i)&&!Cc(l))return!1;if(s&&Cc(l))continue;s=!1,i=l|1&i}}return Cc(i)||s}function Cc(t){return 0==(1&t)}function fbe(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Cc(s)&&(n+=M$(o,r),r=""),i=s,o=o||!Cc(i);e++}return""!==r&&(n+=M$(o,r)),n}const Gn={};function x(t){O$(Ri(),st(),pa()+t,!1)}function O$(t,n,e,i){if(!i)if(3==(3&n[ei])){const o=t.preOrderCheckHooks;null!==o&&aw(n,o,e)}else{const o=t.preOrderHooks;null!==o&&lw(n,o,0,e)}Qf(e)}function P$(t,n=null,e=null,i){const r=R$(t,n,e,i);return r.resolveInjectorInitializers(),r}function R$(t,n=null,e=null,i,r=new Set){const o=[e||Gi,F_e(t)];return i=i||("object"==typeof t?void 0:br(t)),new b$(o,n||Aw(),i||null,r)}let fs=(()=>{class t{static create(e,i){if(Array.isArray(e))return P$({name:""},i,e,"");{const r=e.name??"";return P$({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=$0,t.NULL=new g$,t.\u0275prov=Ke({token:t,providedIn:"any",factory:()=>Ve(f$)}),t.__NG_ELEMENT_ID__=-1,t})();function te(t,n=An.Default){const e=st();return null===e?Ve(t,n):d5(Ds(),e,Tn(t),n)}function z$(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;iRr&&O$(t,n,Rr,!1),$l(s?2:0,r),e(i,r)}finally{Qf(o),$l(s?3:1,r)}}function PA(t,n,e){if(TD(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,u1(t,e,r.hostVars,Gn),r)}function VA(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Un(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}function owe(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&HA(e)}}function HA(t){for(let i=iA(t);null!==i;i=rA(i))for(let r=ha;r0&&HA(o)}const e=t[Lt].components;if(null!==e)for(let i=0;i0&&HA(r)}}function uwe(t,n){const e=Pa(n,t),i=e[Lt];(function dwe(t,n){for(let e=n.length;e-1&&(aA(n,i),pw(e,i))}this._attachedToViewContainer=!1}V5(this._lView[Lt],this._lView)}onDestroy(n){q$(this._lView[Lt],this._lView,null,n)}markForCheck(){Nw(this._cdRefInjectingView||this._lView)}detach(){this._lView[ei]&=-65}reattach(){this._lView[ei]|=64}detectChanges(){jw(this._lView[Lt],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new et(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Kye(t,n){o1(t,n,n[ri],2,null,null)}(this._lView[Lt],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new et(902,!1);this._appRef=n}}class hwe extends d1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;jw(n[Lt],n,n[bo],!1)}checkNoChanges(){}get context(){return null}}class i6 extends im{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=Xi(n);return new h1(e,this.ngModule)}}function r6(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class pwe{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=Kb(i);const r=this.injector.get(n,TA,i);return r!==TA||e===TA?r:this.parentInjector.get(n,e,i)}}class h1 extends x${get inputs(){return r6(this.componentDef.inputs)}get outputs(){return r6(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function _be(t){return t.map(ybe).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof Vl?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new pwe(n,o):n,a=s.get(om,null);if(null===a)throw new et(407,!1);const l=s.get(Z_e,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function Ube(t,n,e){return t.selectRootElement(n,e===_c.ShadowDom)}(c,i,this.componentDef.encapsulation):sA(c,u,function fwe(t){const n=t.toLowerCase();return"svg"===n?$F:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=FA(0,null,null,1,0,null,null,null,null,null),p=Mw(null,f,null,h,null,null,a,c,l,s,null);let g,m;jD(p);try{const v=this.componentDef;let y,b=null;v.findHostDirectiveDefs?(y=[],b=new Map,v.findHostDirectiveDefs(v,y,b),y.push(v)):y=[v];const C=function mwe(t,n){const e=t[Lt],i=Rr;return t[i]=n,cm(e,i,2,"#host",null)}(p,d),k=function vwe(t,n,e,i,r,o,s,a){const l=r[Lt];!function ywe(t,n,e,i){for(const r of t)n.mergedAttrs=J0(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(Pw(n,n.mergedAttrs,!0),null!==e&&Z5(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Mw(r,W$(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&BA(l,t,i.length-1),Iw(r,u),r[t.index]=u}(C,d,v,y,p,a,c);m=VF(f,Rr),d&&function bwe(t,n,e,i){if(i)FD(t,e,["ng-version",ebe.full]);else{const{attrs:r,classes:o}=function bbe(t){const n=[],e=[];let i=1,r=2;for(;i0&&Q5(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function wwe(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=J0(r.hostAttrs,e=J0(e,r.hostAttrs))}}(i)}function GA(t){return t===kd?{}:t===Gi?[]:t}function Swe(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function kwe(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function Twe(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function f1(t){return n=>{n.findHostDirectiveDefs=s6,n.hostDirectives=(Array.isArray(t)?t:t()).map(e=>"function"==typeof e?{directive:Tn(e),inputs:kd,outputs:kd}:{directive:Tn(e.directive),inputs:a6(e.inputs),outputs:a6(e.outputs)})}}function s6(t,n,e){if(null!==t.hostDirectives)for(const i of t.hostDirectives){const r=Ks(i.directive);Mwe(r.declaredInputs,i.inputs),s6(r,n,e),e.set(r,i),n.push(r)}}function a6(t){if(void 0===t||0===t.length)return kd;const n={};for(let e=0;es(Ts(C[i.index])):i.index;let b=null;if(!s&&a&&(b=function $we(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==b)(b.__ngLastListenerFn__||b).__ngNextListenerFn__=o,b.__ngLastListenerFn__=o,h=!1;else{o=C6(i,n,u,o,!1);const C=e.listen(m,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=C6(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const g=p.length;if(g)for(let m=0;m-1?Pa(t.index,n):n);let l=x6(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=x6(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function P(t=1){return function G1e(t){return(zn.lFrame.contextLView=function W1e(t,n){for(;t>0;)n=n[Vg],t--;return n}(t,zn.lFrame.contextLView))[bo]}(t)}function Bwe(t,n){let e=null;const i=function pbe(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function JA(t){return 2|t}function ap(t){return(131068&t)>>2}function KA(t,n){return-131069&t|n<<2}function XA(t){return 1|t}function I6(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?Dh(o):ap(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];Wwe(t[a],n)&&(l=!0,t[a+1]=i?XA(u):JA(u)),a=i?Dh(u):ap(u)}l&&(t[e+1]=i?JA(o):XA(o))}function Wwe(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&Qg(t,n)>=0}const Xo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function N6(t){return t.substring(Xo.key,Xo.keyEnd)}function j6(t,n){const e=Xo.textEnd;return e===n?-1:(n=Xo.keyEnd=function Kwe(t,n,e){for(;n32;)n++;return n}(t,Xo.key=n,e),_m(t,n,e))}function _m(t,n,e){for(;n=0;e=j6(n,e))al(t,N6(n),!0)}function Sc(t,n,e,i){const r=st(),o=Ri(),s=Ed(2);o.firstUpdatePass&&B6(o,t,s,i),n!==Gn&&ea(r,s,n)&&H6(o,o.data[pa()],r,r[ri],t,r[s+1]=function axe(t,n){return null==t||""===t||("string"==typeof n?t+=n:"object"==typeof t&&(t=br(ll(t)))),t}(n,e),i,s)}function kc(t,n,e,i){const r=Ri(),o=Ed(2);r.firstUpdatePass&&B6(r,null,o,i);const s=st();if(e!==Gn&&ea(s,o,e)){const a=r.data[pa()];if(z6(a,i)&&!$6(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=gD(l,e||"")),qA(r,a,s,e,i)}else!function sxe(t,n,e,i,r,o,s,a){r===Gn&&(r=Gi);let l=0,c=0,u=0=t.expandoStartIndex}function B6(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[pa()],s=$6(t,e);z6(o,i)&&null===n&&!s&&(n=!1),n=function exe(t,n,e,i){const r=function ID(t){const n=zn.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=m1(e=QA(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=QA(r,t,n,e,i),null===o){let l=function txe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==ap(i))return t[Dh(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=QA(null,t,n,l[1],i),l=m1(l,n.attrs,i),function nxe(t,n,e,i){t[Dh(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function ixe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=Dh(t[a+1]);t[i+1]=$w(h,a),0!==h&&(t[h+1]=KA(t[h+1],i)),t[a+1]=function Hwe(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=$w(a,0),0!==a&&(t[a+1]=KA(t[a+1],i)),a=i;else t[i+1]=$w(l,0),0===a?a=i:t[l+1]=KA(t[l+1],i),l=i;c&&(t[i+1]=JA(t[i+1])),I6(t,u,i,!0),I6(t,u,i,!1),function Gwe(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&Qg(o,n)>=0&&(e[i+1]=XA(e[i+1]))}(n,u,t,i,o),s=$w(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function QA(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Gn&&(h=d?Gi:void 0);let f=d?WD(h,i):u===i?h:void 0;if(c&&!Bw(f)&&(f=WD(l,i)),Bw(f)&&(a=f,s))return a;const p=t[r+1];r=s?Dh(p):ap(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=WD(l,i))}return a}function Bw(t){return void 0!==t}function z6(t,n){return 0!=(t.flags&(n?8:16))}function A(t,n=""){const e=st(),i=Ri(),r=t+Rr,o=i.firstCreatePass?cm(i,r,1,n,null):i.data[r],s=e[r]=oA(e[ri],n);_w(i,e,s,o),ku(o,!1)}function ze(t){return wt("",t,""),ze}function wt(t,n,e){const i=st(),r=dm(i,t,n,e);return r!==Gn&&Id(i,pa(),r),wt}function Ah(t,n,e,i,r){const o=st(),s=hm(o,t,n,e,i,r);return s!==Gn&&Id(o,pa(),s),Ah}function Fa(t,n,e){const i=st();return ea(i,Gg(),n)&&cl(Ri(),Jr(),i,t,n,i[ri],e,!0),Fa}const lp=void 0;var kxe=["en",[["a","p"],["AM","PM"],lp],[["AM","PM"],lp,lp],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],lp,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],lp,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",lp,"{1} 'at' {0}",lp],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function Sxe(t){const e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let bm={};function ga(t){const n=function Txe(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=d8(n);if(e)return e;const i=n.split("-")[0];if(e=d8(i),e)return e;if("en"===i)return kxe;throw new et(701,!1)}function d8(t){return t in bm||(bm[t]=Pr.ng&&Pr.ng.common&&Pr.ng.common.locales&&Pr.ng.common.locales[t]),bm[t]}var Et=(()=>((Et=Et||{})[Et.LocaleId=0]="LocaleId",Et[Et.DayPeriodsFormat=1]="DayPeriodsFormat",Et[Et.DayPeriodsStandalone=2]="DayPeriodsStandalone",Et[Et.DaysFormat=3]="DaysFormat",Et[Et.DaysStandalone=4]="DaysStandalone",Et[Et.MonthsFormat=5]="MonthsFormat",Et[Et.MonthsStandalone=6]="MonthsStandalone",Et[Et.Eras=7]="Eras",Et[Et.FirstDayOfWeek=8]="FirstDayOfWeek",Et[Et.WeekendRange=9]="WeekendRange",Et[Et.DateFormat=10]="DateFormat",Et[Et.TimeFormat=11]="TimeFormat",Et[Et.DateTimeFormat=12]="DateTimeFormat",Et[Et.NumberSymbols=13]="NumberSymbols",Et[Et.NumberFormats=14]="NumberFormats",Et[Et.CurrencyCode=15]="CurrencyCode",Et[Et.CurrencySymbol=16]="CurrencySymbol",Et[Et.CurrencyName=17]="CurrencyName",Et[Et.Currencies=18]="Currencies",Et[Et.Directionality=19]="Directionality",Et[Et.PluralCase=20]="PluralCase",Et[Et.ExtraData=21]="ExtraData",Et))();const Dxe=["zero","one","two","few","many"],wm="en-US",Vw={marker:"element"},Hw={marker:"ICU"};var ao=(()=>((ao=ao||{})[ao.SHIFT=2]="SHIFT",ao[ao.APPEND_EAGERLY=1]="APPEND_EAGERLY",ao[ao.COMMENT=2]="COMMENT",ao))();let h8=wm;function f8(t){(function Ll(t,n){null==t&&Ki(n,t,null,"!=")})(t,"Expected localeId to be defined"),"string"==typeof t&&(h8=t.toLowerCase().replace(/_/g,"-"))}function p8(t,n,e){const i=n.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?q5(t,0,e):Ts(e[r])}function g8(t,n,e,i,r){const o=n.insertBeforeIndex;if(Array.isArray(o)){let s=i,a=null;if(3&n.type||(a=s,s=r),null!==s&&-1===n.componentOffset)for(let l=1;l1)for(let e=t.length-2;e>=0;e--){const i=t[e];v8(i)||Oxe(i,n)&&null===Ixe(i)&&Nxe(i,n.index)}}function v8(t){return!(64&t.type)}function Oxe(t,n){return v8(n)||t.index>n.index}function Ixe(t){const n=t.insertBeforeIndex;return Array.isArray(n)?n[0]:n}function Nxe(t,n){const e=t.insertBeforeIndex;Array.isArray(e)?e[0]=n:(J5(p8,g8),t.insertBeforeIndex=n)}function v1(t,n){const e=t.data[n];return null===e||"string"==typeof e?null:e.hasOwnProperty("currentCaseLViewIndex")?e:e.value}function Rxe(t,n,e){const i=NA(t,e,64,null,null);return m8(n,i),i}function Uw(t,n){const e=n[t.currentCaseLViewIndex];return null===e?e:e<0?~e:e}function y8(t){return t>>>17}function _8(t){return(131070&t)>>>1}let y1=0,_1=0;function w8(t,n,e,i){const r=e[ri];let s,o=null;for(let a=0;a>>1,e),null,null,f,p,null)}else switch(l){case Hw:const c=n[++a],u=n[++a];null===e[u]&&Zs(e[u]=qye(r,c),e);break;case Vw:const d=n[++a],h=n[++a];null===e[h]&&Zs(e[h]=sA(r,d,null),e)}}}function x8(t,n,e,i,r){for(let o=0;o>>2;switch(3&u){case 1:const h=e[++c],f=e[++c],p=t.data[d];"string"==typeof p?VA(n[ri],n[d],null,p,h,l,f):cl(t,p,n,h,l,n[ri],f,!1);break;case 0:const g=n[d];null!==g&&$5(n[ri],g,l);break;case 2:Vxe(t,v1(t,d),n,l);break;case 3:C8(t,v1(t,d),i,n)}}}}else{const l=e[o+1];if(l>0&&3==(3&l)){const u=v1(t,l>>>2);n[u.currentCaseLViewIndex]<0&&C8(t,u,i,n)}}o+=a}}function C8(t,n,e,i){let r=i[n.currentCaseLViewIndex];if(null!==r){let o=y1;r<0&&(r=i[n.currentCaseLViewIndex]=~r,o=-1),x8(t,i,n.update[r],e,o)}}function Vxe(t,n,e,i){const r=function Hxe(t,n){let e=t.cases.indexOf(n);if(-1===e)switch(t.type){case 1:{const i=function Axe(t,n){const e=function u8(t){return ga(t)[Et.PluralCase]}(n)(parseInt(t,10)),i=Dxe[e];return void 0!==i?i:"other"}(n,function Mxe(){return h8}());e=t.cases.indexOf(i),-1===e&&"other"!==i&&(e=t.cases.indexOf("other"));break}case 0:e=t.cases.indexOf("other")}return-1===e?null:e}(n,i);if(Uw(n,e)!==r&&(S8(t,n,e),e[n.currentCaseLViewIndex]=null===r?null:~r,null!==r)){const s=e[n.anchorIdx];s&&w8(t,n.create[r],e,s)}}function S8(t,n,e){let i=Uw(n,e);if(null!==i){const r=n.remove[i];for(let o=0;o0){const a=rw(s,e);null!==a&&dA(e[ri],a)}else S8(t,v1(t,~s),e)}}}function Uxe(){const t=[];let e,i,n=-1;function o(a,l){n=0;const c=Uw(a,l);i=null!==c?a.remove[c]:Gi}function s(){if(n0?e[a]:(t.push(n,i),o(e[Lt].data[~a],e),s())}return 0===t.length?null:(i=t.pop(),n=t.pop(),s())}return function r(a,l){for(e=l;t.length;)t.pop();return o(a.value,l),s}}const zw=/\ufffd(\d+):?\d*\ufffd/gi,Gxe=/\ufffd(\d+)\ufffd/,T8=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,b1="\ufffd",Wxe=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,qxe=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,Yxe=/\uE500/g;function D8(t,n,e,i,r,o,s){const a=u1(t,i,1,null);let l=a<e.length&&e.push(l)}return{type:i,mainBinding:r,cases:n,values:e}}function ZA(t){if(!t)return[];let n=0;const e=[],i=[],r=/[{}]/g;let o;for(r.lastIndex=0;o=r.exec(t);){const a=o.index;if("}"==o[0]){if(e.pop(),0==e.length){const l=t.substring(n,a);T8.test(l)?i.push(nCe(l)):i.push(l),n=a+1}}else{if(0==e.length){const l=t.substring(n,a);i.push(l),n=a+1}e.push("{")}}const s=t.substring(n);return i.push(s),i}function iCe(t,n,e,i,r,o,s,a){const l=[],c=[],u=[];n.cases.push(o),n.create.push(l),n.remove.push(c),n.update.push(u);const h=r$(e$()).getInertBodyElement(s),f=yA(h)||h;return f?O8(t,n,e,i,l,c,u,f,r,a,0):0}function O8(t,n,e,i,r,o,s,a,l,c,u){let d=0,h=a.firstChild;for(;h;){const f=u1(t,e,1,null);switch(h.nodeType){case Node.ELEMENT_NODE:const p=h,g=p.tagName.toLowerCase();if(mA.hasOwnProperty(g)){eE(r,Vw,g,l,f),t.data[f]=g;const b=p.attributes;for(let C=0;C>>ao.SHIFT;let d=t[u];null===d&&(d=t[u]=(s&ao.COMMENT)===ao.COMMENT?r.createComment(a):oA(r,a)),c&&null!==e&&np(r,e,d,i,!1)}})(r,l.create,u,a&&8&a.type?r[a.index]:null),YF(!0)}function Es(t,n,e){j8(t,n,e),function P8(){YF(!1)}()}function xm(t){return function Fxe(t){t&&(y1|=1<0){const i=t.data[e];x8(t,n,Array.isArray(i)?i:i.update,Ad()-_1-1,y1)}y1=0,_1=0}(Ri(),st(),t+Rr)}function tE(t,n,e,i,r){if(t=Tn(t),Array.isArray(t))for(let o=0;o>20;if(rp(t)||!t.multi){const f=new Y0(l,r,te),p=iE(a,n,r?u:u+h,d);-1===p?(HD(hw(c,s),o,a),nE(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=iE(a,n,u+h,d),p=iE(a,n,u,u+h),m=p>=0&&e[p];if(r&&!m||!r&&!(f>=0&&e[f])){HD(hw(c,s),o,a);const v=function wCe(t,n,e,i,r){const o=new Y0(t,e,te);return o.multi=[],o.index=n,o.componentProviders=0,R8(o,r,i&&!e),o}(r?bCe:_Ce,e.length,r,i,l);!r&&m&&(e[p].providerFactory=v),nE(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else nE(o,t,f>-1?f:p,R8(e[r?p:f],l,!r&&i));!r&&i&&m&&e[p].componentProviders++}}}function nE(t,n,e,i){const r=rp(n),o=function B_e(t){return!!t.useClass}(n);if(r||o){const l=(o?Tn(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function R8(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function iE(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function yCe(t,n,e){const i=Ri();if(i.firstCreatePass){const r=xc(t);tE(e,i.data,i.blueprint,r,!0),tE(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class Cm{}class L8{}class F8 extends Cm{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new i6(this);const i=rl(n);this._bootstrapComponents=Od(i.bootstrap),this._r3Injector=R$(n,e,[{provide:Cm,useValue:this},{provide:im,useValue:this.componentFactoryResolver}],br(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class oE extends L8{constructor(n){super(),this.moduleType=n}create(n){return new F8(this.moduleType,n)}}class CCe extends Cm{constructor(n,e,i){super(),this.componentFactoryResolver=new i6(this),this.instance=null;const r=new b$([...n,{provide:Cm,useValue:this},{provide:im,useValue:this.componentFactoryResolver}],e||Aw(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Gw(t,n,e=null){return new CCe(t,n,e).injector}let SCe=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=m$(0,e.type),r=i.length>0?Gw([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Ke({token:t,providedIn:"environment",factory:()=>new t(Ve(Vl))}),t})();function No(t){t.getStandaloneInjector=n=>n.get(SCe).getOrCreateStandaloneInjector(t)}function ma(t,n,e){const i=fa()+t,r=st();return r[i]===Gn?Eu(r,i,e?n.call(e):n()):function p1(t,n){return t[n]}(r,i)}function ui(t,n,e,i){return G8(st(),fa(),t,n,e,i)}function Ni(t,n,e,i,r){return function W8(t,n,e,i,r,o,s){const a=n+e;return op(t,a,r,o)?Eu(t,a+2,s?i.call(s,r,o):i(r,o)):S1(t,a+2)}(st(),fa(),t,n,e,i,r)}function C1(t,n,e,i,r,o){return function q8(t,n,e,i,r,o,s,a){const l=n+e;return function Fw(t,n,e,i,r){const o=op(t,n,e,i);return ea(t,n+2,r)||o}(t,l,r,o,s)?Eu(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):S1(t,l+3)}(st(),fa(),t,n,e,i,r,o)}function S1(t,n){const e=t[n];return e===Gn?void 0:e}function G8(t,n,e,i,r,o){const s=n+e;return ea(t,s,r)?Eu(t,s+1,o?i.call(o,r):i(r)):S1(t,s+1)}function aE(t,n){const e=Ri();let i;const r=t+Rr;e.firstCreatePass?(i=function $Ce(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Xf(i.type)),s=Fl(te);try{const a=dw(!1),l=o();return dw(a),function Rwe(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,st(),r,l),l}finally{Fl(s)}}function lE(t,n,e){const i=t+Rr,r=st(),o=zg(r,i);return function k1(t,n){return t[Lt].data[n].pure}(r,i)?G8(r,fa(),n,o.transform,e,o):o.transform(e)}function cE(t){return n=>{setTimeout(t,void 0,n)}}const Oe=class zCe extends hr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=cE(o),r&&(r=cE(r)),s&&(s=cE(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof pn&&n.add(a),a}};function GCe(){return this._results[Symbol.iterator]()}class uE{get changes(){return this._changes||(this._changes=new Oe)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=uE.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=GCe)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Bl(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function uye(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=YCe,t})();const WCe=ir,qCe=class extends WCe{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Mw(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[z0]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Su];return null!==s&&(r[Su]=s.createEmbeddedView(i)),jA(i,r,n),new d1(r)}};function YCe(){return Ww(Ds(),st())}function Ww(t,n){return 4&t.type?new qCe(n,t,rm(t,n)):null}let $a=(()=>{class t{}return t.__NG_ELEMENT_ID__=JCe,t})();function JCe(){return Q8(Ds(),st())}const KCe=$a,K8=class extends KCe{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return rm(this._hostTNode,this._hostLView)}get injector(){return new qg(this._hostTNode,this._hostLView)}get parentInjector(){const n=VD(this._hostTNode,this._hostLView);if(o5(n)){const e=uw(n,this._hostLView),i=cw(n);return new qg(e[Lt].data[i+8],e)}return new qg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=X8(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-ha}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function X0(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new h1(Xi(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Vl,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Lt];if(function j1e(t){return wc(t[so])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[so],h=new K8(d,d[Xs],d[so]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function Qye(t,n,e,i){const r=ha+i,o=e.length;i>0&&(e[r-1][bc]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=ha;d{class t{constructor(e){this.appInits=e,this.resolve=Yw,this.reject=Yw,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Ve(Jw,8))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const D1=new Ut("AppId",{providedIn:"root",factory:function wB(){return`${xE()}${xE()}${xE()}`}});function xE(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const xB=new Ut("Platform Initializer"),A1=new Ut("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),CB=new Ut("AnimationModuleType");let x2e=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const hl=new Ut("LocaleId",{providedIn:"root",factory:()=>$n(hl,An.Optional|An.SkipSelf)||function C2e(){return typeof $localize<"u"&&$localize.locale||wm}()});class k2e{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let SB=(()=>{class t{compileModuleSync(e){return new oE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Od(rl(e).declarations).reduce((s,a)=>{const l=Xi(a);return l&&s.push(new h1(l)),s},[]);return new k2e(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const A2e=(()=>Promise.resolve(0))();function CE(t){typeof Zone>"u"?A2e.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class si{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Oe(!1),this.onMicrotaskEmpty=new Oe(!1),this.onStable=new Oe(!1),this.onError=new Oe(!1),typeof Zone>"u")throw new et(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function E2e(){let t=Pr.requestAnimationFrame,n=Pr.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function I2e(t){const n=()=>{!function O2e(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Pr,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,kE(t),t.isCheckStableRunning=!0,SE(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),kE(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return DB(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),AB(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return DB(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),AB(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,kE(t),SE(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!si.isInAngularZone())throw new et(909,!1)}static assertNotInAngularZone(){if(si.isInAngularZone())throw new et(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,M2e,Yw,Yw);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const M2e={};function SE(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function kE(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function DB(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function AB(t){t._nesting--,SE(t)}class N2e{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Oe,this.onMicrotaskEmpty=new Oe,this.onStable=new Oe,this.onError=new Oe}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const EB=new Ut(""),Xw=new Ut("");let AE,TE=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,AE||(function j2e(t){AE=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{si.assertNotInAngularZone(),CE(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())CE(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(Ve(si),Ve(DE),Ve(Xw))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),DE=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return AE?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const jd=!1;let Eh=null;const MB=new Ut("AllowMultipleToken"),EE=new Ut("PlatformDestroyListeners"),OB=new Ut("appBootstrapListener");class IB{constructor(n,e){this.name=n,this.token=e}}function jB(t,n,e=[]){const i=`Platform: ${n}`,r=new Ut(i);return(o=[])=>{let s=ME();if(!s||s.injector.get(MB,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function L2e(t){if(Eh&&!Eh.get(MB,!1))throw new et(400,!1);Eh=t;const n=t.get(RB);(function NB(t){const n=t.get(xB,null);n&&n.forEach(e=>e())})(t)}(function PB(t=[],n){return fs.create({name:n,providers:[{provide:xA,useValue:"platform"},{provide:EE,useValue:new Set([()=>Eh=null])},...t]})}(a,i))}return function $2e(t){const n=ME();if(!n)throw new et(401,!1);return n}()}}function ME(){return Eh?.get(RB)??null}let RB=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function FB(t,n){let e;return e="noop"===t?new N2e:("zone.js"===t?void 0:t)||new si(n),e}(i?.ngZone,function LB(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:si,useValue:r}];return r.run(()=>{const s=fs.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(sm,null);if(!l)throw new et(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qw(this._modules,a),c.unsubscribe()})}),function $B(t,n,e){try{const i=e();return g1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(Kw);return c.runInitializers(),c.donePromise.then(()=>(f8(a.injector.get(hl,wm)||wm),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=BB({},i);return function P2e(t,n,e){const i=new oE(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Pd);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new et(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new et(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(EE,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Ve(fs))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function BB(t,n){return Array.isArray(n)?n.reduce(BB,t):{...t,...n}}let Pd=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new ar(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new ar(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{si.assertNotInAngularZone(),CE(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{si.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=hD(o,s.pipe(bF()))}bootstrap(e,i){const r=e instanceof x$;if(!this._injector.get(Kw).done){!r&&function $g(t){const n=Xi(t)||Ks(t)||ja(t);return null!==n&&n.standalone}(e);throw new et(405,jd)}let s;s=r?e:this._injector.get(im).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function R2e(t){return t.isBoundToModule}(s)?void 0:this._injector.get(Cm),c=s.create(fs.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(EB,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qw(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new et(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qw(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(OB,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new et(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(Ve(si),Ve(Vl),Ve(sm))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function Qw(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let jo=(()=>{class t{}return t.__NG_ELEMENT_ID__=V2e,t})();function V2e(t){return function H2e(t,n,e){if(W0(t)&&!e){const i=Pa(t.index,n);return new d1(i,i)}return 47&t.type?new d1(n[Qs],n):null}(Ds(),st(),16==(16&t))}class GB{constructor(){}supports(n){return Lw(n)}create(n){return new Y2e(n)}}const q2e=(t,n)=>n;class Y2e{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||q2e}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new J2e(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new WB),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new WB),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class J2e{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class K2e{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class WB{constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new K2e,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function qB(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new Q2e(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class Q2e{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function JB(){return new tx([new GB])}let tx=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||JB()),deps:[[t,new e1,new Z0]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new et(901,!1)}}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:JB}),t})();function KB(){return new E1([new YB])}let E1=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||KB()),deps:[[t,new e1,new Z0]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new et(901,!1)}}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:KB}),t})();const tSe=jB(null,"core",[]);let nSe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(Ve(Pd))},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();function Tm(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}function PE(t,n){const e=Xi(t),i=n.elementInjector||Aw();return new h1(e).create(i,n.projectableNodes,n.hostElement,n.environmentInjector)}let RE=null;function Rd(){return RE}class oSe{}const lr=new Ut("DocumentToken");let LE=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function sSe(){return Ve(XB)}()},providedIn:"platform"}),t})();const aSe=new Ut("Location Initialized");let XB=(()=>{class t extends LE{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Rd().getBaseHref(this._doc)}onPopState(e){const i=Rd().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Rd().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){QB()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){QB()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:function(){return function lSe(){return new XB(Ve(lr))}()},providedIn:"platform"}),t})();function QB(){return!!window.history.pushState}function FE(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function ZB(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function Ld(t){return t&&"?"!==t[0]?"?"+t:t}let up=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(t7)},providedIn:"root"}),t})();const e7=new Ut("appBaseHref");let t7=(()=>{class t extends up{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??$n(lr).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return FE(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+Ld(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+Ld(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+Ld(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(Ve(LE),Ve(e7,8))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),cSe=(()=>{class t extends up{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=FE(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Ld(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Ld(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(Ve(LE),Ve(e7,8))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),$E=(()=>{class t{constructor(e){this._subject=new Oe,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function hSe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(ZB(n7(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Ld(i))}normalize(e){return t.stripTrailingSlash(function dSe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,n7(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ld(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Ld(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=Ld,t.joinWithSlash=FE,t.stripTrailingSlash=ZB,t.\u0275fac=function(e){return new(e||t)(Ve(up))},t.\u0275prov=Ke({token:t,factory:function(){return function uSe(){return new $E(Ve(up))}()},providedIn:"root"}),t})();function n7(t){return t.replace(/\/index.html$/,"")}var Ba=(()=>((Ba=Ba||{})[Ba.Decimal=0]="Decimal",Ba[Ba.Percent=1]="Percent",Ba[Ba.Currency=2]="Currency",Ba[Ba.Scientific=3]="Scientific",Ba))(),Lr=(()=>((Lr=Lr||{})[Lr.Format=0]="Format",Lr[Lr.Standalone=1]="Standalone",Lr))(),Wn=(()=>((Wn=Wn||{})[Wn.Narrow=0]="Narrow",Wn[Wn.Abbreviated=1]="Abbreviated",Wn[Wn.Wide=2]="Wide",Wn[Wn.Short=3]="Short",Wn))(),Kr=(()=>((Kr=Kr||{})[Kr.Short=0]="Short",Kr[Kr.Medium=1]="Medium",Kr[Kr.Long=2]="Long",Kr[Kr.Full=3]="Full",Kr))(),Sn=(()=>((Sn=Sn||{})[Sn.Decimal=0]="Decimal",Sn[Sn.Group=1]="Group",Sn[Sn.List=2]="List",Sn[Sn.PercentSign=3]="PercentSign",Sn[Sn.PlusSign=4]="PlusSign",Sn[Sn.MinusSign=5]="MinusSign",Sn[Sn.Exponential=6]="Exponential",Sn[Sn.SuperscriptingExponent=7]="SuperscriptingExponent",Sn[Sn.PerMille=8]="PerMille",Sn[Sn.Infinity=9]="Infinity",Sn[Sn.NaN=10]="NaN",Sn[Sn.TimeSeparator=11]="TimeSeparator",Sn[Sn.CurrencyDecimal=12]="CurrencyDecimal",Sn[Sn.CurrencyGroup=13]="CurrencyGroup",Sn))();function r7(t,n,e){const i=ga(t),o=zl([i[Et.DayPeriodsFormat],i[Et.DayPeriodsStandalone]],n);return zl(o,e)}function o7(t,n,e){const i=ga(t),o=zl([i[Et.DaysFormat],i[Et.DaysStandalone]],n);return zl(o,e)}function BE(t,n,e){const i=ga(t),o=zl([i[Et.MonthsFormat],i[Et.MonthsStandalone]],n);return zl(o,e)}function nx(t,n){return zl(ga(t)[Et.DateFormat],n)}function ix(t,n){return zl(ga(t)[Et.TimeFormat],n)}function rx(t,n){return zl(ga(t)[Et.DateTimeFormat],n)}function Ul(t,n){const e=ga(t),i=e[Et.NumberSymbols][n];if(typeof i>"u"){if(n===Sn.CurrencyDecimal)return e[Et.NumberSymbols][Sn.Decimal];if(n===Sn.CurrencyGroup)return e[Et.NumberSymbols][Sn.Group]}return i}function s7(t){if(!t[Et.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Et.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function zl(t,n){for(let e=n;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new Error("Locale data API: locale data undefined")}function HE(t){const[n,e]=t.split(":");return{hours:+n,minutes:+e}}const xSe=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,M1={},CSe=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Qo=(()=>((Qo=Qo||{})[Qo.Short=0]="Short",Qo[Qo.ShortGMT=1]="ShortGMT",Qo[Qo.Long=2]="Long",Qo[Qo.Extended=3]="Extended",Qo))(),On=(()=>((On=On||{})[On.FullYear=0]="FullYear",On[On.Month=1]="Month",On[On.Date=2]="Date",On[On.Hours=3]="Hours",On[On.Minutes=4]="Minutes",On[On.Seconds=5]="Seconds",On[On.FractionalSeconds=6]="FractionalSeconds",On[On.Day=7]="Day",On))(),ti=(()=>((ti=ti||{})[ti.DayPeriods=0]="DayPeriods",ti[ti.Days=1]="Days",ti[ti.Months=2]="Months",ti[ti.Eras=3]="Eras",ti))();function a7(t,n,e,i){let r=function ISe(t){if(u7(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[r,o=1,s=1]=t.split("-").map(a=>+a);return ox(r,o-1,s)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(xSe))return function NSe(t){const n=new Date(0);let e=0,i=0;const r=t[8]?n.setUTCFullYear:n.setFullYear,o=t[8]?n.setUTCHours:n.setHours;t[9]&&(e=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));const s=Number(t[4]||0)-e,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return o.call(n,s,a,l,c),n}(i)}const n=new Date(t);if(!u7(n))throw new Error(`Unable to convert "${t}" into a date`);return n}(t);n=Fd(e,n)||n;let a,s=[];for(;n;){if(a=CSe.exec(n),!a){s.push(n);break}{s=s.concat(a.slice(1));const u=s.pop();if(!u)break;n=u}}let l=r.getTimezoneOffset();i&&(l=c7(i,l),r=function OSe(t,n,e){const i=e?-1:1,r=t.getTimezoneOffset();return function MSe(t,n){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+n),t}(t,i*(c7(n,r)-r))}(r,i,!0));let c="";return s.forEach(u=>{const d=function ESe(t){if(zE[t])return zE[t];let n;switch(t){case"G":case"GG":case"GGG":n=Cr(ti.Eras,Wn.Abbreviated);break;case"GGGG":n=Cr(ti.Eras,Wn.Wide);break;case"GGGGG":n=Cr(ti.Eras,Wn.Narrow);break;case"y":n=Ro(On.FullYear,1,0,!1,!0);break;case"yy":n=Ro(On.FullYear,2,0,!0,!0);break;case"yyy":n=Ro(On.FullYear,3,0,!1,!0);break;case"yyyy":n=Ro(On.FullYear,4,0,!1,!0);break;case"Y":n=cx(1);break;case"YY":n=cx(2,!0);break;case"YYY":n=cx(3);break;case"YYYY":n=cx(4);break;case"M":case"L":n=Ro(On.Month,1,1);break;case"MM":case"LL":n=Ro(On.Month,2,1);break;case"MMM":n=Cr(ti.Months,Wn.Abbreviated);break;case"MMMM":n=Cr(ti.Months,Wn.Wide);break;case"MMMMM":n=Cr(ti.Months,Wn.Narrow);break;case"LLL":n=Cr(ti.Months,Wn.Abbreviated,Lr.Standalone);break;case"LLLL":n=Cr(ti.Months,Wn.Wide,Lr.Standalone);break;case"LLLLL":n=Cr(ti.Months,Wn.Narrow,Lr.Standalone);break;case"w":n=UE(1);break;case"ww":n=UE(2);break;case"W":n=UE(1,!0);break;case"d":n=Ro(On.Date,1);break;case"dd":n=Ro(On.Date,2);break;case"c":case"cc":n=Ro(On.Day,1);break;case"ccc":n=Cr(ti.Days,Wn.Abbreviated,Lr.Standalone);break;case"cccc":n=Cr(ti.Days,Wn.Wide,Lr.Standalone);break;case"ccccc":n=Cr(ti.Days,Wn.Narrow,Lr.Standalone);break;case"cccccc":n=Cr(ti.Days,Wn.Short,Lr.Standalone);break;case"E":case"EE":case"EEE":n=Cr(ti.Days,Wn.Abbreviated);break;case"EEEE":n=Cr(ti.Days,Wn.Wide);break;case"EEEEE":n=Cr(ti.Days,Wn.Narrow);break;case"EEEEEE":n=Cr(ti.Days,Wn.Short);break;case"a":case"aa":case"aaa":n=Cr(ti.DayPeriods,Wn.Abbreviated);break;case"aaaa":n=Cr(ti.DayPeriods,Wn.Wide);break;case"aaaaa":n=Cr(ti.DayPeriods,Wn.Narrow);break;case"b":case"bb":case"bbb":n=Cr(ti.DayPeriods,Wn.Abbreviated,Lr.Standalone,!0);break;case"bbbb":n=Cr(ti.DayPeriods,Wn.Wide,Lr.Standalone,!0);break;case"bbbbb":n=Cr(ti.DayPeriods,Wn.Narrow,Lr.Standalone,!0);break;case"B":case"BB":case"BBB":n=Cr(ti.DayPeriods,Wn.Abbreviated,Lr.Format,!0);break;case"BBBB":n=Cr(ti.DayPeriods,Wn.Wide,Lr.Format,!0);break;case"BBBBB":n=Cr(ti.DayPeriods,Wn.Narrow,Lr.Format,!0);break;case"h":n=Ro(On.Hours,1,-12);break;case"hh":n=Ro(On.Hours,2,-12);break;case"H":n=Ro(On.Hours,1);break;case"HH":n=Ro(On.Hours,2);break;case"m":n=Ro(On.Minutes,1);break;case"mm":n=Ro(On.Minutes,2);break;case"s":n=Ro(On.Seconds,1);break;case"ss":n=Ro(On.Seconds,2);break;case"S":n=Ro(On.FractionalSeconds,1);break;case"SS":n=Ro(On.FractionalSeconds,2);break;case"SSS":n=Ro(On.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=ax(Qo.Short);break;case"ZZZZZ":n=ax(Qo.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=ax(Qo.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=ax(Qo.Long);break;default:return null}return zE[t]=n,n}(u);c+=d?d(r,e,l):"''"===u?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function ox(t,n,e){const i=new Date(0);return i.setFullYear(t,n,e),i.setHours(0,0,0),i}function Fd(t,n){const e=function fSe(t){return ga(t)[Et.LocaleId]}(t);if(M1[e]=M1[e]||{},M1[e][n])return M1[e][n];let i="";switch(n){case"shortDate":i=nx(t,Kr.Short);break;case"mediumDate":i=nx(t,Kr.Medium);break;case"longDate":i=nx(t,Kr.Long);break;case"fullDate":i=nx(t,Kr.Full);break;case"shortTime":i=ix(t,Kr.Short);break;case"mediumTime":i=ix(t,Kr.Medium);break;case"longTime":i=ix(t,Kr.Long);break;case"fullTime":i=ix(t,Kr.Full);break;case"short":const r=Fd(t,"shortTime"),o=Fd(t,"shortDate");i=sx(rx(t,Kr.Short),[r,o]);break;case"medium":const s=Fd(t,"mediumTime"),a=Fd(t,"mediumDate");i=sx(rx(t,Kr.Medium),[s,a]);break;case"long":const l=Fd(t,"longTime"),c=Fd(t,"longDate");i=sx(rx(t,Kr.Long),[l,c]);break;case"full":const u=Fd(t,"fullTime"),d=Fd(t,"fullDate");i=sx(rx(t,Kr.Full),[u,d])}return i&&(M1[e][n]=i),i}function sx(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(e,i){return null!=n&&i in n?n[i]:e})),t}function Dc(t,n,e="-",i,r){let o="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,o=e));let s=String(t);for(;s.length0||a>-e)&&(a+=e),t===On.Hours)0===a&&-12===e&&(a=12);else if(t===On.FractionalSeconds)return function SSe(t,n){return Dc(t,3).substring(0,n)}(a,n);const l=Ul(s,Sn.MinusSign);return Dc(a,n,l,i,r)}}function Cr(t,n,e=Lr.Format,i=!1){return function(r,o){return function TSe(t,n,e,i,r,o){switch(e){case ti.Months:return BE(n,r,i)[t.getMonth()];case ti.Days:return o7(n,r,i)[t.getDay()];case ti.DayPeriods:const s=t.getHours(),a=t.getMinutes();if(o){const c=function vSe(t){const n=ga(t);return s7(n),(n[Et.ExtraData][2]||[]).map(i=>"string"==typeof i?HE(i):[HE(i[0]),HE(i[1])])}(n),u=function ySe(t,n,e){const i=ga(t);s7(i);const o=zl([i[Et.ExtraData][0],i[Et.ExtraData][1]],n)||[];return zl(o,e)||[]}(n,r,i),d=c.findIndex(h=>{if(Array.isArray(h)){const[f,p]=h,g=s>=f.hours&&a>=f.minutes,m=s0?Math.floor(r/60):Math.ceil(r/60);switch(t){case Qo.Short:return(r>=0?"+":"")+Dc(s,2,o)+Dc(Math.abs(r%60),2,o);case Qo.ShortGMT:return"GMT"+(r>=0?"+":"")+Dc(s,1,o);case Qo.Long:return"GMT"+(r>=0?"+":"")+Dc(s,2,o)+":"+Dc(Math.abs(r%60),2,o);case Qo.Extended:return 0===i?"Z":(r>=0?"+":"")+Dc(s,2,o)+":"+Dc(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${t}"`)}}}const DSe=0,lx=4;function l7(t){return ox(t.getFullYear(),t.getMonth(),t.getDate()+(lx-t.getDay()))}function UE(t,n=!1){return function(e,i){let r;if(n){const o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{const o=l7(e),s=function ASe(t){const n=ox(t,DSe,1).getDay();return ox(t,0,1+(n<=lx?lx:lx+7)-n)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return Dc(r,t,Ul(i,Sn.MinusSign))}}function cx(t,n=!1){return function(e,i){return Dc(l7(e).getFullYear(),t,Ul(i,Sn.MinusSign),n)}}const zE={};function c7(t,n){t=t.replace(/:/g,"");const e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function u7(t){return t instanceof Date&&!isNaN(t.valueOf())}const jSe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,d7=22,ux=".",O1="0",PSe=";",RSe=",",GE="#";function YE(t){const n=parseInt(t);if(isNaN(n))throw new Error("Invalid integer literal when parsing "+t);return n}function p7(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const KE=/\s+/,g7=[];let dp=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=g7,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(KE):g7}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(KE):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(KE).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(te(tx),te(E1),te(En),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class WSe{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Bt=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new WSe(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),y7(a,r)}});for(let r=0,o=i.length;r{y7(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(te($a),te(ir),te(tx))},t.\u0275dir=pt({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function y7(t,n){t.context.$implicit=n.item}let Ct=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new YSe,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){_7("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){_7("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(te($a),te(ir))},t.\u0275dir=pt({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class YSe{constructor(){this.$implicit=null,this.ngIf=null}}function _7(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${br(n)}'.`)}class XE{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let dx=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),b7=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new XE(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(te($a),te(ir),te(dx,9))},t.\u0275dir=pt({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),x7=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Ra.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(E1),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),Ac=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(te($a))},t.\u0275dir=pt({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Kt]}),t})();let S7=(()=>{class t{constructor(e){this._locale=e}transform(e,i,r){if(!function QE(t){return!(null==t||""===t||t!=t)}(e))return null;r=r||this._locale;try{return function $Se(t,n,e){return function WE(t,n,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(t)){let c=function HSe(t){let i,r,o,s,a,n=Math.abs(t)+"",e=0;for((r=n.indexOf(ux))>-1&&(n=n.replace(ux,"")),(o=n.search(/e/i))>0?(r<0&&(r=o),r+=+n.slice(o+1),n=n.substring(0,o)):r<0&&(r=n.length),o=0;n.charAt(o)===O1;o++);if(o===(a=n.length))i=[0],r=1;else{for(a--;n.charAt(a)===O1;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(n.charAt(o))}return r>d7&&(i=i.splice(0,d7-1),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(t);s&&(c=function VSe(t){if(0===t.digits[0])return t;const n=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===n?t.digits.push(0,0):1===n&&t.digits.push(0),t.integerLen+=2),t}(c));let u=n.minInt,d=n.minFrac,h=n.maxFrac;if(o){const y=o.match(jSe);if(null===y)throw new Error(`${o} is not a valid digit info`);const b=y[1],C=y[3],k=y[5];null!=b&&(u=YE(b)),null!=C&&(d=YE(C)),null!=k?h=YE(k):null!=C&&d>h&&(h=d)}!function USe(t,n,e){if(n>e)throw new Error(`The minimum number of digits after fraction (${n}) is higher than the maximum (${e}).`);let i=t.digits,r=i.length-t.integerLen;const o=Math.min(Math.max(n,r),e);let s=o+t.integerLen,a=i[s];if(s>0){i.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[s-1]++;for(;r=c?p.pop():l=!1),h>=10?1:0},0);u&&(i.unshift(u),t.integerLen++)}(c,d,h);let f=c.digits,p=c.integerLen;const g=c.exponent;let m=[];for(l=f.every(y=>!y);p0?m=f.splice(p,f.length):(m=f,f=[0]);const v=[];for(f.length>=n.lgSize&&v.unshift(f.splice(-n.lgSize,f.length).join(""));f.length>n.gSize;)v.unshift(f.splice(-n.gSize,f.length).join(""));f.length&&v.unshift(f.join("")),a=v.join(Ul(e,i)),m.length&&(a+=Ul(e,r)+m.join("")),g&&(a+=Ul(e,Sn.Exponential)+"+"+g)}else a=Ul(e,Sn.Infinity);return a=t<0&&!l?n.negPre+a+n.negSuf:n.posPre+a+n.posSuf,a}(t,function qE(t,n="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(PSe),r=i[0],o=i[1],s=-1!==r.indexOf(ux)?r.split(ux):[r.substring(0,r.lastIndexOf(O1)+1),r.substring(r.lastIndexOf(O1)+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf(GE));for(let u=0;u{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();const k7="browser";function T7(t){return t===k7}let wke=(()=>{class t{}return t.\u0275prov=Ke({token:t,providedIn:"root",factory:()=>new xke(Ve(lr),window)}),t})();class xke{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function Cke(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=D7(this.window.history)||D7(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function D7(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class A7{}class Kke extends oSe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class nM extends Kke{static makeCurrent(){!function rSe(t){RE||(RE=t)}(new nM)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function Xke(){return N1=N1||document.querySelector("base"),N1?N1.getAttribute("href"):null}();return null==e?null:function Qke(t){px=px||document.createElement("a"),px.setAttribute("href",t);const n=px.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){N1=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return p7(document.cookie,n)}}let px,N1=null;const N7=new Ut("TRANSITION_ID"),eTe=[{provide:Jw,useFactory:function Zke(t,n,e){return()=>{e.get(Kw).donePromise.then(()=>{const i=Rd(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const gx=new Ut("EventManagerPlugins");let mx=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),j1=(()=>{class t extends P7{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const iM={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},rM=/%COMP%/g,F7=new Ut("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function $7(t,n){return n.flat(100).map(e=>e.replace(rM,t))}function B7(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let vx=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new oM(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof U7?r.applyToHost(e):r instanceof sM&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case _c.Emulated:o=new U7(s,a,i,this.appId,l);break;case _c.ShadowDom:return new cTe(s,a,e,i);default:o=new sM(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Ve(mx),Ve(j1),Ve(D1),Ve(F7))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();class oM{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(iM[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(H7(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(H7(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=iM[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=iM[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Ra.DashCase|Ra.Important)?n.style.setProperty(e,i,r&Ra.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Ra.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,B7(i)):this.eventManager.addEventListener(n,e,B7(i))}}function H7(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class cTe extends oM{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=$7(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class sM extends oM{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=$7(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class U7 extends sM{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function sTe(t){return"_ngcontent-%COMP%".replace(rM,t)}(s),this.hostAttr=function aTe(t){return"_nghost-%COMP%".replace(rM,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let uTe=(()=>{class t extends j7{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const z7=["alt","control","meta","shift"],dTe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},hTe={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let fTe=(()=>{class t extends j7{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Rd().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),z7.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=dTe[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),z7.forEach(s=>{s!==r&&(0,hTe[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const W7=[{provide:A1,useValue:k7},{provide:xB,useValue:function pTe(){nM.makeCurrent()},multi:!0},{provide:lr,useFactory:function mTe(){return function d_e(t){pA=t}(document),document},deps:[]}],vTe=jB(tSe,"browser",W7),q7=new Ut(""),Y7=[{provide:Xw,useClass:class tTe{addToWindow(n){Pr.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},Pr.getAllAngularTestabilities=()=>n.getAllTestabilities(),Pr.getAllAngularRootElements=()=>n.getAllRootElements(),Pr.frameworkStabilizers||(Pr.frameworkStabilizers=[]),Pr.frameworkStabilizers.push(i=>{const r=Pr.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?Rd().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:EB,useClass:TE,deps:[si,DE,Xw]},{provide:TE,useClass:TE,deps:[si,DE,Xw]}],J7=[{provide:xA,useValue:"root"},{provide:sm,useFactory:function gTe(){return new sm},deps:[]},{provide:gx,useClass:uTe,multi:!0,deps:[lr,si,A1]},{provide:gx,useClass:fTe,multi:!0,deps:[lr]},{provide:vx,useClass:vx,deps:[mx,j1,D1,F7]},{provide:om,useExisting:vx},{provide:P7,useExisting:j1},{provide:j1,useClass:j1,deps:[lr]},{provide:mx,useClass:mx,deps:[gx,si]},{provide:A7,useClass:nTe,deps:[]},[]];let lM=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:D1,useValue:e.appId},{provide:N7,useExisting:D1},eTe]}}}return t.\u0275fac=function(e){return new(e||t)(Ve(q7,12))},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[...J7,...Y7],imports:[Mh,nSe]}),t})(),K7=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function _Te(){return new K7(Ve(lr))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let Z7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new(e||t):Ve(e9),i},providedIn:"root"}),t})(),e9=(()=>{class t extends Z7{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case wr.NONE:return i;case wr.HTML:return Du(i,"HTML")?ll(i):u$(this._doc,String(i)).toString();case wr.STYLE:return Du(i,"Style")?ll(i):i;case wr.SCRIPT:if(Du(i,"Script"))return ll(i);throw new Error("unsafe value used in a script context");case wr.URL:return Du(i,"URL")?ll(i):Cw(String(i));case wr.RESOURCE_URL:if(Du(i,"ResourceURL"))return ll(i);throw new Error(`unsafe value used in a resource URL context (see ${zb})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${zb})`)}}bypassSecurityTrustHtml(e){return function y_e(t){return new h_e(t)}(e)}bypassSecurityTrustStyle(e){return function __e(t){return new f_e(t)}(e)}bypassSecurityTrustScript(e){return function b_e(t){return new p_e(t)}(e)}bypassSecurityTrustUrl(e){return function w_e(t){return new g_e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function x_e(t){return new m_e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function STe(t){return new e9(t.get(lr))}(Ve(fs)),i},providedIn:"root"}),t})();class t9{}class kTe{}const $d="*";function ta(t,n){return{type:7,name:t,definitions:n,options:{}}}function Ms(t,n=null){return{type:4,styles:n,timings:t}}function n9(t,n=null){return{type:2,steps:t,options:n}}function Ai(t){return{type:6,styles:t,offset:null}}function Os(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function i9(t){Promise.resolve().then(t)}class P1{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){i9(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class r9{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?i9(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const uM="!";function o9(t){return new et(3e3,!1)}function sDe(){return typeof window<"u"&&typeof window.document<"u"}function dM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Ih(t){switch(t.length){case 0:return new P1;case 1:return t[0];default:return new r9(t)}}function s9(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,g)=>{let m=g,v=p;if("offset"!==g)switch(m=n.normalizePropertyName(m,s),v){case uM:v=r.get(g);break;case $d:v=o.get(g);break;default:v=n.normalizeStyleValue(g,m,v,s)}f.set(m,v)}),h||a.push(f),c=f,l=d}),s.length)throw function YTe(t){return new et(3502,!1)}();return a}function hM(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&fM(e,"start",t)));break;case"done":t.onDone(()=>i(e&&fM(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&fM(e,"destroy",t)))}}function fM(t,n,e){const o=pM(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function pM(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function fl(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function a9(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let gM=(t,n)=>!1,l9=(t,n,e)=>[],c9=null;function mM(t){const n=t.parentNode||t.host;return n===c9?null:n}(dM()||typeof Element<"u")&&(sDe()?(c9=(()=>document.documentElement)(),gM=(t,n)=>{for(;n;){if(n===t)return!0;n=mM(n)}return!1}):gM=(t,n)=>t.contains(n),l9=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let hp=null,u9=!1;const d9=gM,h9=l9;let f9=(()=>{class t{validateStyleProperty(e){return function lDe(t){hp||(hp=function cDe(){return typeof document<"u"?document.body:null}()||{},u9=!!hp.style&&"WebkitAppearance"in hp.style);let n=!0;return hp.style&&!function aDe(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in hp.style,!n&&u9&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in hp.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return d9(e,i)}getParentElement(e){return mM(e)}query(e,i,r){return h9(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new P1(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),vM=(()=>{class t{}return t.NOOP=new f9,t})();const uDe=1e3,yM="ng-enter",yx="ng-leave",_x="ng-trigger",bx=".ng-trigger",g9="ng-animating",_M=".ng-animating";function Bd(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:bM(parseFloat(n[1]),n[2])}function bM(t,n){return"s"===n?t*uDe:t}function wx(t,n,e){return t.hasOwnProperty("duration")?t:function hDe(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(o9()),{duration:0,delay:0,easing:""};r=bM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=bM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function TTe(){return new et(3100,!1)}()),a=!0),o<0&&(n.push(function DTe(){return new et(3101,!1)}()),a=!0),a&&n.splice(l,0,o9())}return{duration:r,delay:o,easing:s}}(t,n,e)}function R1(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function m9(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Nh(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function y9(t,n,e){return e?n+":"+e+";":""}function _9(t){let n="";for(let e=0;e{const o=xM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),dM()&&_9(t))}function fp(t,n){t.style&&(n.forEach((e,i)=>{const r=xM(i);t.style[r]=""}),dM()&&_9(t))}function L1(t){return Array.isArray(t)?1==t.length?t[0]:n9(t):t}const wM=new RegExp("{{\\s*(.+?)\\s*}}","g");function b9(t){let n=[];if("string"==typeof t){let e;for(;e=wM.exec(t);)n.push(e[1]);wM.lastIndex=0}return n}function F1(t,n,e){const i=t.toString(),r=i.replace(wM,(o,s)=>{let a=n[s];return null==a&&(e.push(function ETe(t){return new et(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function xx(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const gDe=/-+([a-z0-9])/g;function xM(t){return t.replace(gDe,(...n)=>n[1].toUpperCase())}function mDe(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function pl(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function MTe(t){return new et(3004,!1)}()}}function w9(t,n){return window.getComputedStyle(t)[n]}const kx="*";function xDe(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function CDe(t,n,e){if(":"==t[0]){const l=function SDe(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function UTe(t){return new et(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(x9(r,s));"<"==o[0]&&!(r==kx&&s==kx)&&n.push(x9(s,r))}(i,e,n)):e.push(t),e}const Tx=new Set(["true","1"]),Dx=new Set(["false","0"]);function x9(t,n){const e=Tx.has(t)||Dx.has(t),i=Tx.has(n)||Dx.has(n);return(r,o)=>{let s=t==kx||t==r,a=n==kx||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Tx.has(t):Dx.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Tx.has(n):Dx.has(n)),s&&a}}const kDe=new RegExp("s*:selfs*,?","g");function CM(t,n,e,i){return new TDe(t).build(n,e,i)}class TDe{constructor(n){this._driver=n}build(n,e,i){const r=new EDe(e);return this._resetContextStyleTimingState(r),pl(this,L1(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function ITe(){return new et(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function NTe(){return new et(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{b9(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(xx(o.values()),e.errors.push(function jTe(t,n){return new et(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=pl(this,L1(n.animation),e);return{type:1,matchers:xDe(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:pp(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>pl(this,i,e)),options:pp(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=pl(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:pp(n.options)}}visitAnimate(n,e){const i=function ODe(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return SM(wx(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=SM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=wx(e,n);return SM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:Ai({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Ai(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===$d?i.push(a):e.errors.push(new et(3002,!1)):i.push(m9(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function RTe(t,n,e,i,r){return new et(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function pDe(t,n,e){const i=n.params||{},r=b9(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function ATe(t){return new et(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function LTe(){return new et(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let b=null!=y.offset?y.offset:function MDe(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=b&&(o++,C=y.offset=b),l=l||C<0||C>1,a=a||C0&&o{const b=h>0?y==f?1:h*y:s[y],C=b*m;e.currentTime=p+g.delay+C,g.duration=C,this._validateStyleAst(v,e),v.offset=b,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:pl(this,L1(n.animation),e),options:pp(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:pp(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:pp(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function DDe(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(kDe,"")),t=t.replace(/@\*/g,bx).replace(/@\w+/g,e=>bx+"-"+e.slice(1)).replace(/:animating/g,_M),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,fl(e.collectedStyles,e.currentQuerySelector,new Map);const a=pl(this,L1(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:pp(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function VTe(){return new et(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:wx(n.timings,e.errors,!0);return{type:12,animation:pl(this,L1(n.animation),e),timings:i,options:null}}}class EDe{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function pp(t){return t?(t=R1(t)).params&&(t.params=function ADe(t){return t?R1(t):null}(t.params)):t={},t}function SM(t,n,e){return{duration:t,delay:n,easing:e}}function kM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Ax{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const jDe=new RegExp(":enter","g"),RDe=new RegExp(":leave","g");function TM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new LDe).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class LDe{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Ax;const d=new DM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Bd(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),pl(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let g=f.length-1;g>=0;g--){const m=f[g];if(m.element===e){p=m;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[kM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Bd(F1(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Bd(i.duration):null,a=null!=i.delay?Bd(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),pl(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Ex);const s=Bd(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>pl(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Bd(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),pl(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return wx(e.params?F1(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Bd(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Ex);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),pl(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;pl(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Ex={};class DM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Ex,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Mx(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Bd(i.duration)),null!=i.delay&&(r.delay=Bd(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=F1(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new DM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Ex,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new FDe(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(jDe,"."+this._enterClassName)).replace(RDe,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function HTe(t){return new et(3014,!1)}()),a}}class Mx{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Mx(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||$d),this._currentKeyframe.set(e,$d);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function $De(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,$d)}else Nh(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=F1(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??$d),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Nh(a,new Map,this._backFill);c.forEach((u,d)=>{u===uM?n.add(d):u===$d&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?xx(n.values()):[],s=e.size?xx(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return kM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class FDe extends Mx{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Nh(n[0]);l.set("offset",0),o.push(l);const c=Nh(n[0]);c.set("offset",k9(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Nh(n[d]);const f=h.get("offset");h.set("offset",k9((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return kM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function k9(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class AM{}const BDe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class VDe extends AM{normalizePropertyName(n,e){return xM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(BDe.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function OTe(t,n){return new et(3005,!1)}())}return s+o}}function T9(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const EM={};class D9{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function HDe(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||EM,p=this.buildStyles(i,a&&a.params||EM,d),g=l&&l.params||EM,m=this.buildStyles(r,g,d),v=new Set,y=new Map,b=new Map,C="void"===r,k={params:UDe(g,h),delay:this.ast.options?.delay},T=u?[]:TM(n,e,this.ast.animation,o,s,p,m,k,c,d);let j=0;if(T.forEach(N=>{j=Math.max(N.duration+N.delay,j)}),d.length)return T9(e,this._triggerName,i,r,C,p,m,[],[],y,b,j,d);T.forEach(N=>{const $=N.element,V=fl(y,$,new Set);N.preStyleProps.forEach(Y=>V.add(Y));const z=fl(b,$,new Set);N.postStyleProps.forEach(Y=>z.add(Y)),$!==e&&v.add($)});const B=xx(v.values());return T9(e,this._triggerName,i,r,C,p,m,T,B,y,b,j)}}function UDe(t,n){const e=R1(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class zDe{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=R1(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=F1(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class WDe{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new zDe(r.style,r.options&&r.options.params||{},i))}),A9(this.states,"true","1"),A9(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new D9(n,r,this.states))}),this.fallbackTransition=function qDe(t,n,e){return new D9(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function A9(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const YDe=new Ax;class JDe{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=CM(this._driver,e,i,r);if(i.length)throw function JTe(t){return new et(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=s9(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=TM(this._driver,e,o,yM,yx,new Map,new Map,i,YDe,r),s.forEach(u=>{const d=fl(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function KTe(){return new et(3300,!1)}()),s=[]),r.length)throw function XTe(t){return new et(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,$d))})});const c=Ih(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function QTe(t){return new et(3301,!1)}();return e}listen(n,e,i,r){const o=pM(e,"","","");return hM(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const E9="ng-animate-queued",MM="ng-animate-disabled",eAe=[],M9={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tAe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Gl="__ng_removed";class OM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function oAe(t){return t??null}(i?n.value:n),i){const o=R1(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const $1="void",IM=new OM($1);class nAe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,Wl(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function ZTe(t,n){return new et(3302,!1)}();if(null==i||0==i.length)throw function eDe(t){return new et(3303,!1)}();if(!function sAe(t){return"start"==t||"done"==t}(i))throw function tDe(t,n){return new et(3400,!1)}();const o=fl(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=fl(this._engine.statesByElement,n,new Map);return a.has(e)||(Wl(n,_x),Wl(n,_x+"-"+e),a.set(e,IM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function nDe(t){return new et(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new NM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(Wl(n,_x),Wl(n,_x+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new OM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=IM),c.value!==$1&&l.value===c.value){if(!function cAe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{fp(n,m),Nu(n,v)})}return}const h=fl(this._engine.playersByElement,n,[]);h.forEach(g=>{g.namespaceId==this.id&&g.triggerName==e&&g.queued&&g.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(Wl(n,E9),s.onStart(()=>{Dm(n,E9)})),s.onDone(()=>{let g=this.players.indexOf(s);g>=0&&this.players.splice(g,1);const m=this._engine.playersByElement.get(n);if(m){let v=m.indexOf(s);v>=0&&m.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,bx,!0);i.forEach(r=>{if(r[Gl])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,$1,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&Ih(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||IM,u=new OM($1),d=new NM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[Gl];(!o||o===M9)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){Wl(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=pM(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,hM(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class iAe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new nAe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(Ox(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!Ox(e))return;const o=e[Gl];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),Wl(n,MM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),Dm(n,MM))}removeNode(n,e,i,r){if(Ox(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[Gl]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return Ox(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,bx,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,_M,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return Ih(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[Gl];if(e&&e.setForRemoval){if(n[Gl]=M9,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(MM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ih(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function iDe(t){return new et(3402,!1)}()}_flushAnimations(n,e){const i=new Ax,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(G=>{u.add(G);const F=this.driver.query(G,".ng-animate-queued",!0);for(let Z=0;Z{const Z=yM+g++;p.set(F,Z),G.forEach(D=>Wl(D,Z))});const m=[],v=new Set,y=new Set;for(let G=0;Gv.add(D)):y.add(F))}const b=new Map,C=N9(h,Array.from(v));C.forEach((G,F)=>{const Z=yx+g++;b.set(F,Z),G.forEach(D=>Wl(D,Z))}),n.push(()=>{f.forEach((G,F)=>{const Z=p.get(F);G.forEach(D=>Dm(D,Z))}),C.forEach((G,F)=>{const Z=b.get(F);G.forEach(D=>Dm(D,Z))}),m.forEach(G=>{this.processLeaveNode(G)})});const k=[],T=[];for(let G=this._namespaceList.length-1;G>=0;G--)this._namespaceList[G].drainQueuedTransitions(e).forEach(Z=>{const D=Z.player,E=Z.element;if(k.push(D),this.collectedEnterElements.length){const ae=E[Gl];if(ae&&ae.setForMove){if(ae.previousTriggersValues&&ae.previousTriggersValues.has(Z.triggerName)){const De=ae.previousTriggersValues.get(Z.triggerName),be=this.statesByElement.get(Z.element);if(be&&be.has(Z.triggerName)){const Ie=be.get(Z.triggerName);Ie.value=De,be.set(Z.triggerName,Ie)}}return void D.destroy()}}const M=!d||!this.driver.containsElement(d,E),U=b.get(E),L=p.get(E),X=this._buildInstruction(Z,i,L,U,M);if(X.errors&&X.errors.length)return void T.push(X);if(M)return D.onStart(()=>fp(E,X.fromStyles)),D.onDestroy(()=>Nu(E,X.toStyles)),void r.push(D);if(Z.isFallbackTransition)return D.onStart(()=>fp(E,X.fromStyles)),D.onDestroy(()=>Nu(E,X.toStyles)),void r.push(D);const ne=[];X.timelines.forEach(ae=>{ae.stretchStartingKeyframe=!0,this.disabledNodes.has(ae.element)||ne.push(ae)}),X.timelines=ne,i.append(E,X.timelines),s.push({instruction:X,player:D,element:E}),X.queriedElements.forEach(ae=>fl(a,ae,[]).push(D)),X.preStyleProps.forEach((ae,De)=>{if(ae.size){let be=l.get(De);be||l.set(De,be=new Set),ae.forEach((Ie,R)=>be.add(R))}}),X.postStyleProps.forEach((ae,De)=>{let be=c.get(De);be||c.set(De,be=new Set),ae.forEach((Ie,R)=>be.add(R))})});if(T.length){const G=[];T.forEach(F=>{G.push(function rDe(t,n){return new et(3505,!1)}())}),k.forEach(F=>F.destroy()),this.reportError(G)}const j=new Map,B=new Map;s.forEach(G=>{const F=G.element;i.has(F)&&(B.set(F,F),this._beforeAnimationBuild(G.player.namespaceId,G.instruction,j))}),r.forEach(G=>{const F=G.element;this._getPreviousPlayers(F,!1,G.namespaceId,G.triggerName,null).forEach(D=>{fl(j,F,[]).push(D),D.destroy()})});const N=m.filter(G=>P9(G,l,c)),$=new Map;I9($,this.driver,y,c,$d).forEach(G=>{P9(G,l,c)&&N.push(G)});const z=new Map;f.forEach((G,F)=>{I9(z,this.driver,new Set(G),l,uM)}),N.forEach(G=>{const F=$.get(G),Z=z.get(G);$.set(G,new Map([...Array.from(F?.entries()??[]),...Array.from(Z?.entries()??[])]))});const Y=[],O=[],H={};s.forEach(G=>{const{element:F,player:Z,instruction:D}=G;if(i.has(F)){if(u.has(F))return Z.onDestroy(()=>Nu(F,D.toStyles)),Z.disabled=!0,Z.overrideTotalTime(D.totalTime),void r.push(Z);let E=H;if(B.size>1){let U=F;const L=[];for(;U=U.parentNode;){const X=B.get(U);if(X){E=X;break}L.push(U)}L.forEach(X=>B.set(X,E))}const M=this._buildAnimation(Z.namespaceId,D,j,o,z,$);if(Z.setRealPlayer(M),E===H)Y.push(Z);else{const U=this.playersByElement.get(E);U&&U.length&&(Z.parentPlayer=Ih(U)),r.push(Z)}}else fp(F,D.fromStyles),Z.onDestroy(()=>Nu(F,D.toStyles)),O.push(Z),u.has(F)&&r.push(Z)}),O.forEach(G=>{const F=o.get(G.element);if(F&&F.length){const Z=Ih(F);G.setRealPlayer(Z)}}),r.forEach(G=>{G.parentPlayer?G.syncPlayerEvents(G.parentPlayer):G.destroy()});for(let G=0;G!M.destroyed);E.length?aAe(this,F,E):this.processLeaveNode(F)}return m.length=0,Y.forEach(G=>{this.players.push(G),G.onDone(()=>{G.destroy();const F=this.players.indexOf(G);this.players.splice(F,1)}),G.play()}),Y}elementContainsData(n,e){let i=!1;const r=e[Gl];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==$1;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=fl(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}fp(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const g=p.element;u.add(g);const m=g[Gl];if(m&&m.removedBeforeQueried)return new P1(p.duration,p.delay);const v=g!==l,y=function lAe(t){const n=[];return j9(t,n),n}((i.get(g)||eAe).map(j=>j.getRealPlayer())).filter(j=>!!j.element&&j.element===g),b=o.get(g),C=s.get(g),k=s9(0,this._normalizer,0,p.keyframes,b,C),T=this._buildPlayer(p,k,y);if(p.subTimeline&&r&&d.add(g),v){const j=new NM(n,a,g);j.setRealPlayer(T),c.push(j)}return T});c.forEach(p=>{fl(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function rAe(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>Wl(p,g9));const f=Ih(h);return f.onDestroy(()=>{u.forEach(p=>Dm(p,g9)),Nu(l,e.toStyles)}),d.forEach(p=>{fl(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new P1(n.duration,n.delay)}}class NM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new P1,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>hM(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){fl(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function Ox(t){return t&&1===t.nodeType}function O9(t,n){const e=t.style.display;return t.style.display=n??"none",e}function I9(t,n,e,i,r){const o=[];e.forEach(l=>o.push(O9(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Gl]=tAe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>O9(l,o[a++])),s}function N9(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function Wl(t,n){t.classList?.add(n)}function Dm(t,n){t.classList?.remove(n)}function aAe(t,n,e){Ih(e).onDone(()=>t.processLeaveNode(n))}function j9(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class Ix{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new iAe(n,e,i),this._timelineEngine=new JDe(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=CM(this._driver,o,l,c);if(l.length)throw function qTe(t,n){return new et(3404,!1)}();a=function GDe(t,n,e){return new WDe(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=a9(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=a9(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let dAe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Nu(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Nu(this._element,this._initialStyles),this._endStyles&&(Nu(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(fp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(fp(this._element,this._endStyles),this._endStyles=null),Nu(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function jM(t){let n=null;return t.forEach((e,i)=>{(function hAe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class R9{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:w9(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class fAe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return d9(n,e)}getParentElement(n){return mM(n)}query(n,e,i){return h9(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof R9);(function vDe(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,g)=>c.set(g,p))});let d=function fDe(t){return t.length?t[0]instanceof Map?t:t.map(n=>m9(n)):[]}(e).map(f=>Nh(f));d=function yDe(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,w9(t,a)))}}return n}(n,d,c);const h=function uAe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=jM(n[0]),n.length>1&&(i=jM(n[n.length-1]))):n instanceof Map&&(e=jM(n)),e||i?new dAe(t,e,i):null}(n,d);return new R9(n,d,l,h)}}let pAe=(()=>{class t extends t9{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:_c.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?n9(e):e;return L9(this._renderer,null,i,"register",[r]),new gAe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Ve(om),Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();class gAe extends kTe{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new mAe(this._id,n,e||{},this._renderer)}}class mAe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return L9(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function L9(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const F9="@.disabled";let vAe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new $9("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new yAe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Ve(om),Ve(Ix),Ve(si))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();class $9{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==F9?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class yAe extends $9{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==F9?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function _Ae(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function bAe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let wAe=(()=>{class t extends Ix{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr),Ve(vM),Ve(AM),Ve(Pd))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const B9=[{provide:t9,useClass:pAe},{provide:AM,useFactory:function xAe(){return new VDe}},{provide:Ix,useClass:wAe},{provide:om,useFactory:function CAe(t,n,e){return new vAe(t,n,e)},deps:[vx,Ix,si]}],PM=[{provide:vM,useFactory:()=>new fAe},{provide:CB,useValue:"BrowserAnimations"},...B9],RM=[{provide:vM,useClass:f9},{provide:CB,useValue:"NoopAnimations"},...B9];let SAe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?RM:PM}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:PM,imports:[lM]}),t})(),kAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:RM,imports:[lM]}),t})();function $t(...t){let n=t[t.length-1];return Jf(n)?(t.pop(),dD(t,n)):F0(t)}class Zo extends hr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Rg;return this._value}next(n){super.next(this._value=n)}}const jx=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class LM extends Ln{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class TAe extends Ln{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function FM(t,n,e,i,r=new TAe(t,e,i)){if(!r.closed)return n instanceof ar?n.subscribe(r):uD(n)(r)}const V9={};function Px(...t){let n,e;return Jf(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&nl(t[0])&&(t=t[0]),F0(t,e).lift(new DAe(n))}class DAe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new AAe(n,this.resultSelector))}}class AAe extends LM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(V9),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function Lx(t){return t?function MAe(t){return new ar(n=>t.schedule(()=>n.complete()))}(t):Vd}function H9(t){return new ar(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?Jo(e):Lx()).subscribe(n)})}function gp(t,n){return new ar(n?e=>n.schedule(OAe,0,{error:t,subscriber:e}):e=>e.error(t))}function OAe({error:t,subscriber:n}){n.error(t)}function gl(t,n){return"function"==typeof n?e=>e.pipe(gl((i,r)=>Jo(t(i,r)).pipe(xn((o,s)=>n(i,o,r,s))))):e=>e.lift(new IAe(t))}class IAe{constructor(n){this.project=n}call(n,e){return e.subscribe(new NAe(n,this.project))}}class NAe extends R0{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new P0(this),r=this.destination;r.add(i),this.innerSubscription=L0(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const U9=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function es(t){return n=>0===t?Lx():n.lift(new jAe(t))}class jAe{constructor(n){if(this.total=n,this.total<0)throw new U9}call(n,e){return e.subscribe(new PAe(n,this.total))}}class PAe extends Ln{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function Fx(...t){const n=t[t.length-1];return Jf(n)?(t.pop(),e=>Rx(t,e,n)):e=>Rx(t,e)}function co(t,n){return function(i){return i.lift(new RAe(t,n))}}class RAe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new LAe(n,this.predicate,this.thisArg))}}class LAe extends Ln{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function $x(t=null){return n=>n.lift(new FAe(t))}class FAe{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new $Ae(n,this.defaultValue))}}class $Ae extends Ln{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function z9(t=HAe){return n=>n.lift(new BAe(t))}class BAe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new VAe(n,this.errorFactory))}}class VAe extends Ln{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function HAe(){return new jx}function jh(t,n){const e=arguments.length>=2;return i=>i.pipe(t?co((r,o)=>t(r,o,i)):bh,es(1),e?$x(n):z9(()=>new jx))}function Ph(t,n){return _o(t,n,1)}function Hd(){}function xo(t,n,e){return function(r){return r.lift(new UAe(t,n,e))}}class UAe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new zAe(n,this.nextOrObserver,this.error,this.complete))}}class zAe extends Ln{constructor(n,e,i,r){super(n),this._tapNext=Hd,this._tapError=Hd,this._tapComplete=Hd,this._tapError=i||Hd,this._tapComplete=r||Hd,xu(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Hd,this._tapError=e.error||Hd,this._tapComplete=e.complete||Hd)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Va(t){return function(e){const i=new GAe(t),r=e.lift(i);return i.caught=r}}class GAe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new WAe(n,this.selector,this.caught))}}class WAe extends R0{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new P0(this);this.add(i);const r=L0(e,i);r!==i&&this.add(r)}}}function G9(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new qAe(t,n,e))}}class qAe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new YAe(n,this.accumulator,this.seed,this.hasSeed))}}class YAe extends Ln{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function $M(t){return function(e){return 0===t?Lx():e.lift(new JAe(t))}}class JAe{constructor(n){if(this.total=n,this.total<0)throw new U9}call(n,e){return e.subscribe(new KAe(n,this.total))}}class KAe extends Ln{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?co((r,o)=>t(r,o,i)):bh,$M(1),e?$x(n):z9(()=>new jx))}class QAe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new ZAe(n,this.predicate,this.inclusive))}}class ZAe extends Ln{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class tEe{constructor(n){this.value=n}call(n,e){return e.subscribe(new nEe(n,this.value))}}class nEe extends Ln{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function BM(t){return n=>n.lift(new iEe(t))}class iEe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new rEe(n,this.callback))}}class rEe extends Ln{constructor(n,e){super(n),this.add(new pn(e))}}const Jn="primary",B1=Symbol("RouteTitle");class oEe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function Am(t){return new oEe(t)}function sEe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function Y9(t){return Array.prototype.concat.apply([],t)}function J9(t){return t.length>0?t[t.length-1]:null}function Is(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function Rh(t){return YA(t)?t:g1(t)?Jo(Promise.resolve(t)):$t(t)}const Bx=!1,lEe={exact:function Q9(t,n,e){if(!mp(t.segments,n.segments)||!Vx(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!Q9(t.children[i],n.children[i],e))return!1;return!0},subset:Z9},K9={exact:function cEe(t,n){return ju(t,n)},subset:function uEe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>q9(t[e],n[e]))},ignored:()=>!0};function X9(t,n,e){return lEe[e.paths](t.root,n.root,e.matrixParams)&&K9[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function Z9(t,n,e){return eV(t,n,n.segments,e)}function eV(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!mp(r,e)||n.hasChildren()||!Vx(r,e,i))}if(t.segments.length===e.length){if(!mp(t.segments,e)||!Vx(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!Z9(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(mp(t.segments,r)&&Vx(t.segments,r,i)&&t.children[Jn])&&eV(t.children[Jn],n,o,i)}}function Vx(t,n,e){return n.every((i,r)=>K9[e](t[r].parameters,i.parameters))}class Lh{constructor(n=new di([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Am(this.queryParams)),this._queryParamMap}toString(){return fEe.serialize(this)}}class di{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Is(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Hx(this)}}class V1{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=Am(this.parameters)),this._parameterMap}toString(){return iV(this)}}function mp(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let H1=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return new VM},providedIn:"root"}),t})();class VM{parse(n){const e=new xEe(n);return new Lh(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${U1(n.root,!0)}`,i=function mEe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${Ux(e)}=${Ux(r)}`).join("&"):`${Ux(e)}=${Ux(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function pEe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const fEe=new VM;function Hx(t){return t.segments.map(n=>iV(n)).join("/")}function U1(t,n){if(!t.hasChildren())return Hx(t);if(n){const e=t.children[Jn]?U1(t.children[Jn],!1):"",i=[];return Is(t.children,(r,o)=>{o!==Jn&&i.push(`${o}:${U1(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function hEe(t,n){let e=[];return Is(t.children,(i,r)=>{r===Jn&&(e=e.concat(n(i,r)))}),Is(t.children,(i,r)=>{r!==Jn&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===Jn?[U1(t.children[Jn],!1)]:[`${r}:${U1(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[Jn]?`${Hx(t)}/${e[0]}`:`${Hx(t)}/(${e.join("//")})`}}function tV(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Ux(t){return tV(t).replace(/%3B/gi,";")}function HM(t){return tV(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function zx(t){return decodeURIComponent(t)}function nV(t){return zx(t.replace(/\+/g,"%20"))}function iV(t){return`${HM(t.path)}${function gEe(t){return Object.keys(t).map(n=>`;${HM(n)}=${HM(t[n])}`).join("")}(t.parameters)}`}const vEe=/^[^\/()?;=#]+/;function Gx(t){const n=t.match(vEe);return n?n[0]:""}const yEe=/^[^=?&#]+/,bEe=/^[^&#]+/;class xEe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new di([],{}):new di([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[Jn]=new di(n,e)),i}parseSegment(){const n=Gx(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new et(4009,Bx);return this.capture(n),new V1(zx(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=Gx(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=Gx(this.remaining);r&&(i=r,this.capture(i))}n[zx(e)]=zx(i)}parseQueryParam(n){const e=function _Ee(t){const n=t.match(yEe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function wEe(t){const n=t.match(bEe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=nV(e),o=nV(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=Gx(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new et(4010,Bx);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=Jn);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[Jn]:new di([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new et(4011,Bx)}}function UM(t){return t.segments.length>0?new di([],{[Jn]:t}):t}function Wx(t){const n={};for(const i of Object.keys(t.children)){const o=Wx(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function CEe(t){if(1===t.numberOfChildren&&t.children[Jn]){const n=t.children[Jn];return new di(t.segments.concat(n.segments),n.children)}return t}(new di(t.segments,n))}function vp(t){return t instanceof Lh}const zM=!1;function SEe(t,n,e,i,r){if(0===e.length)return Em(n.root,n.root,n.root,i,r);const o=function lV(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new aV(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Is(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new aV(e,n,i)}(e);return o.toRoot()?Em(n.root,n.root,new di([],{}),i,r):function s(l){const c=function TEe(t,n,e,i){if(t.isAbsolute)return new Mm(n.root,!0,0);if(-1===i)return new Mm(e,e===n.root,0);return function cV(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new et(4005,zM&&"Invalid number of '../'");r=i.segments.length}return new Mm(i,!1,r-o)}(e,i+(z1(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?Om(c.segmentGroup,c.index,o.commands):GM(c.segmentGroup,c.index,o.commands);return Em(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function z1(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function G1(t){return"object"==typeof t&&null!=t&&t.outlets}function Em(t,n,e,i,r){let s,o={};i&&Is(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:sV(t,n,e);const a=UM(Wx(s));return new Lh(a,o,r)}function sV(t,n,e){const i={};return Is(t.children,(r,o)=>{i[o]=r===n?e:sV(r,n,e)}),new di(t.segments,i)}class aV{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&z1(i[0]))throw new et(4003,zM&&"Root segment cannot have matrix parameters");const r=i.find(G1);if(r&&r!==J9(i))throw new et(4004,zM&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Mm{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function GM(t,n,e){if(t||(t=new di([],{})),0===t.segments.length&&t.hasChildren())return Om(t,n,e);const i=function AEe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(G1(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!dV(l,c,s))return o;i+=2}else{if(!dV(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=GM(t.children[s],n,o))}),Is(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new di(t.segments,r)}}function WM(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=WM(new di([],{}),0,e))}),n}function uV(t){const n={};return Is(t,(e,i)=>n[i]=`${e}`),n}function dV(t,n,e){return t==e.path&&ju(n,e.parameters)}const W1="imperative";class Pu{constructor(n,e){this.id=n,this.url=e}}class qx extends Pu{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Ud extends Pu{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class q1 extends Pu{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Yx extends Pu{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class Jx extends Pu{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class MEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class OEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class IEe extends Pu{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class NEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class jEe extends Pu{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class PEe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class REe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class LEe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class FEe{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class $Ee{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class BEe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class hV{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let UEe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return SEe(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),GEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(n){return UEe.\u0275fac(n)},providedIn:"root"}),t})();class fV{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=qM(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=qM(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=YM(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return YM(n,this._root).map(e=>e.value)}}function qM(t,n){if(t===n.value)return n;for(const e of n.children){const i=qM(t,e);if(i)return i}return null}function YM(t,n){if(t===n.value)return[n];for(const e of n.children){const i=YM(t,e);if(i.length)return i.unshift(n),i}return[]}class zd{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function Im(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class pV extends fV{constructor(n,e){super(n),this.snapshot=e,JM(this,n)}toString(){return this.snapshot.toString()}}function gV(t,n){const e=function WEe(t,n){const s=new Kx([],{},{},"",{},Jn,n,null,t.root,-1,{});return new vV("",new zd(s,[]))}(t,n),i=new Zo([new V1("",{})]),r=new Zo({}),o=new Zo({}),s=new Zo({}),a=new Zo(""),l=new Li(i,r,s,a,o,Jn,n,e.root);return l.snapshot=e.root,new pV(new zd(l,[]),e)}class Li{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(xn(c=>c[B1]))??$t(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(xn(n=>Am(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(xn(n=>Am(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function mV(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function qEe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class Kx{get title(){return this.data?.[B1]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Am(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Am(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class vV extends fV{constructor(n,e){super(e),this.url=n,JM(this,e)}toString(){return yV(this._root)}}function JM(t,n){n.value._routerState=t,n.children.forEach(e=>JM(t,e))}function yV(t){const n=t.children.length>0?` { ${t.children.map(yV).join(", ")} } `:"";return`${t.value}${n}`}function KM(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,ju(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),ju(n.params,e.params)||t.params.next(e.params),function aEe(t,n){if(t.length!==n.length)return!1;for(let e=0;eju(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||XM(t.parent,n.parent))}function Y1(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function JEe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return Y1(t,i,r);return Y1(t,i)})}(t,n,e);return new zd(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Y1(t,a)),s}}const i=function KEe(t){return new Li(new Zo(t.url),new Zo(t.params),new Zo(t.queryParams),new Zo(t.fragment),new Zo(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>Y1(t,o));return new zd(i,r)}}const QM="ngNavigationCancelingError";function _V(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=vp(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=bV(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function bV(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[QM]=!0,i.cancellationCode=n,e&&(i.url=e),i}function wV(t){return xV(t)&&vp(t.url)}function xV(t){return t&&t[QM]}class XEe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new J1,this.attachRef=null}}let J1=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new XEe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Xx=!1;let yp=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=Jn,this.activateEvents=new Oe,this.deactivateEvents=new Oe,this.attachEvents=new Oe,this.detachEvents=new Oe,this.parentContexts=$n(J1),this.location=$n($a),this.changeDetector=$n(jo),this.environmentInjector=$n(Vl)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new et(4012,Xx);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new et(4012,Xx);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new et(4012,Xx);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new et(4013,Xx);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new QEe(e,a,r.injector);if(i&&function ZEe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Kt]}),t})();class QEe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Li?this.route:n===J1?this.childContexts:this.parent.get(n,e)}}let ZM=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ng-component"]],standalone:!0,features:[No],decls:1,vars:0,template:function(e,i){1&e&&ie(0,"router-outlet")},dependencies:[yp],encapsulation:2}),t})();function CV(t,n){return t.providers&&!t._injector&&(t._injector=Gw(t.providers,n,`Route: ${t.path}`)),t._injector??n}function tO(t){const n=t.children&&t.children.map(tO),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==Jn&&(e.component=ZM),e}function ql(t){return t.outlet||Jn}function SV(t,n){const e=t.filter(i=>ql(i)===n);return e.push(...t.filter(i=>ql(i)!==n)),e}function K1(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class rMe{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),KM(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=Im(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Is(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Im(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=Im(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=Im(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new BEe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new FEe(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(KM(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),KM(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=K1(r.snapshot),l=a?.get(im)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class kV{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class Qx{constructor(n,e){this.component=n,this.route=e}}function oMe(t,n,e){const i=t._root;return X1(i,n?n._root:null,e,[i.value])}function Nm(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function a1e(t){return null!==qb(t)}(t)?n.get(t):t:i}function X1(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=Im(n);return t.children.forEach(s=>{(function aMe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function lMe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!mp(t.url,n.url);case"pathParamsOrQueryParamsChange":return!mp(t.url,n.url)||!ju(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!XM(t,n)||!ju(t.queryParams,n.queryParams);default:return!XM(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new kV(i)):(o.data=s.data,o._resolvedData=s._resolvedData),X1(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Qx(a.outlet.component,s))}else s&&Q1(n,a,r),r.canActivateChecks.push(new kV(i)),X1(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Is(o,(s,a)=>Q1(s,e.getContext(a),r)),r}function Q1(t,n,e){const i=Im(t),r=t.value;Is(i,(o,s)=>{Q1(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new Qx(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function Z1(t){return"function"==typeof t}function nO(t){return t instanceof jx||"EmptyError"===t?.name}const Zx=Symbol("INITIAL_VALUE");function jm(){return gl(t=>Px(t.map(n=>n.pipe(es(1),Fx(Zx)))).pipe(xn(n=>{for(const e of n)if(!0!==e){if(e===Zx)return Zx;if(!1===e||e instanceof Lh)return e}return!0}),co(n=>n!==Zx),es(1)))}function TV(t){return function Yf(...t){return fF(t)}(xo(n=>{if(vp(n))throw _V(0,n)}),xn(n=>!0===n))}const iO={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function DV(t,n,e,i,r){const o=rO(t,n,e);return o.matched?function kMe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?$t(r.map(s=>{const a=Nm(s,t);return Rh(function pMe(t){return t&&Z1(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(jm(),TV()):$t(!0)}(i=CV(n,i),n,e).pipe(xn(s=>!0===s?o:{...iO})):$t(o)}function rO(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...iO}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||sEe)(e,t,n);if(!r)return{...iO};const o={};Is(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function eC(t,n,e,i){if(e.length>0&&function AMe(t,n,e){return e.some(i=>tC(t,n,i)&&ql(i)!==Jn)}(t,e,i)){const o=new di(n,function DMe(t,n,e,i){const r={};r[Jn]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&ql(o)!==Jn){const s=new di([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[ql(o)]=s}return r}(t,n,i,new di(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function EMe(t,n,e){return e.some(i=>tC(t,n,i))}(t,e,i)){const o=new di(t.segments,function TMe(t,n,e,i,r){const o={};for(const s of i)if(tC(t,e,s)&&!r[ql(s)]){const a=new di([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[ql(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new di(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function tC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function AV(t,n,e,i){return!!(ql(t)===i||i!==Jn&&tC(n,e,t))&&("**"===t.path||rO(n,t,e).matched)}function EV(t,n,e){return 0===n.length&&!t.children[e]}const nC=!1;class iC{constructor(n){this.segmentGroup=n||null}}class MV{constructor(n){this.urlTree=n}}function ey(t){return gp(new iC(t))}function OV(t){return gp(new MV(t))}function MMe(t){return gp(new et(4e3,nC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class NMe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=eC(this.urlTree.root,[],[],this.config).segmentGroup,e=new di(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,Jn).pipe(xn(o=>this.createUrlTree(Wx(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Va(o=>{if(o instanceof MV)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof iC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,Jn).pipe(xn(r=>this.createUrlTree(Wx(r),n.queryParams,n.fragment))).pipe(Va(r=>{throw r instanceof iC?this.noMatchError(r):r}))}noMatchError(n){return new et(4002,nC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=UM(n);return new Lh(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(xn(o=>new di([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return Jo(r).pipe(Ph(o=>{const s=i.children[o],a=SV(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(xn(l=>({segment:l,outlet:o})))}),G9((o,s)=>(o[s.outlet]=s.segment,o),{}),W9())}expandSegment(n,e,i,r,o,s){return Jo(i).pipe(Ph(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Va(c=>{if(c instanceof iC)return $t(null);throw c}))),jh(a=>!!a),Va((a,l)=>{if(nO(a))return EV(e,r,o)?$t(new di([],{})):ey(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return AV(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):ey(e):ey(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?OV(o):this.lineralizeSegments(i,o).pipe(_o(s=>{const a=new di(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=rO(e,r,o);if(!a)return ey(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?OV(d):this.lineralizeSegments(r,d).pipe(_o(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=CV(i,n),i.loadChildren?(i._loadedRoutes?$t({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(xn(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new di(r,{})))):$t(new di(r,{}))):DV(e,i,r,n).pipe(gl(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(_o(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=eC(e,a,l,h),g=new di(f.segments,f.children);if(0===p.length&&g.hasChildren())return this.expandChildren(d,h,g).pipe(xn(b=>new di(a,b)));if(0===h.length&&0===p.length)return $t(new di(a,{}));const m=ql(i)===o;return this.expandSegment(d,g,h,p,m?Jn:o,!0).pipe(xn(y=>new di(a.concat(y.segments),y.children)))})):ey(e)))}getChildConfig(n,e,i){return e.children?$t({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?$t({routes:e._loadedRoutes,injector:e._loadedInjector}):function SMe(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?$t(!0):$t(r.map(s=>{const a=Nm(s,t);return Rh(function uMe(t){return t&&Z1(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(jm(),TV())}(n,e,i).pipe(_o(r=>r?this.configLoader.loadChildren(n,e).pipe(xo(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function OMe(t){return gp(bV(nC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):$t({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return $t(i);if(r.numberOfChildren>1||!r.children[Jn])return MMe(n.redirectTo);r=r.children[Jn]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Lh(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Is(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Is(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new di(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new et(4001,nC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class PMe{}class FMe{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=eC(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,Jn).pipe(xn(e=>{if(null===e)return null;const i=new Kx([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},Jn,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new zd(i,e),o=new vV(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=mV(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return Jo(Object.keys(i.children)).pipe(Ph(r=>{const o=i.children[r],s=SV(e,r);return this.processSegmentGroup(n,s,o,r)}),G9((r,o)=>r&&o?(r.push(...o),r):null),function XAe(t,n=!1){return e=>e.lift(new QAe(t,n))}(r=>null!==r),$x(null),W9(),xn(r=>{if(null===r)return null;const o=NV(r);return function $Me(t){t.sort((n,e)=>n.value.outlet===Jn?-1:e.value.outlet===Jn?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return Jo(e).pipe(Ph(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),jh(s=>!!s),Va(s=>{if(nO(s))return EV(i,r,o)?$t([]):$t(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!AV(e,i,r,o))return $t(null);let s;if("**"===e.path){const a=r.length>0?J9(r).parameters:{},l=PV(i)+r.length;s=$t({snapshot:new Kx(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,RV(e),ql(e),e.component??e._loadedComponent??null,e,jV(i),l,LV(e)),consumedSegments:[],remainingSegments:[]})}else s=DV(i,e,r,n).pipe(xn(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=PV(i)+l.length;return{snapshot:new Kx(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,RV(e),ql(e),e.component??e._loadedComponent??null,e,jV(i),d,LV(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(gl(a=>{if(null===a)return $t(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function BMe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=eC(i,c,u,h.filter(m=>void 0===m.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(xn(m=>null===m?null:[new zd(l,m)]));if(0===h.length&&0===p.length)return $t([new zd(l,[])]);const g=ql(e)===o;return this.processSegment(d,h,f,p,g?Jn:o).pipe(xn(m=>null===m?null:[new zd(l,m)]))}))}}function VMe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function NV(t){const n=[],e=new Set;for(const i of t){if(!VMe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=NV(i.children);n.push(new zd(i.value,r))}return n.filter(i=>!e.has(i))}function jV(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function PV(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function RV(t){return t.data||{}}function LV(t){return t.resolve||{}}function FV(t){return"string"==typeof t.title||null===t.title}function oO(t){return gl(n=>{const e=t(n);return e?Jo(e).pipe(xn(()=>n)):$t(n)})}const Pm=new Ut("ROUTES");let sO=(()=>{class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=$n(SB)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return $t(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=Rh(e.loadComponent()).pipe(xn(BV),xo(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),BM(()=>{this.componentLoaders.delete(e)})),r=new fD(i,()=>new hr).pipe(Ub());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return $t({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(xn(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=Y9(l.get(Pm,[],An.Self|An.Optional)));return{routes:c.map(tO),injector:l}}),BM(()=>{this.childrenLoaders.delete(i)})),s=new fD(o,()=>new hr).pipe(Ub());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return Rh(e()).pipe(xn(BV),_o(i=>i instanceof L8||Array.isArray(i)?$t(i):Jo(this.compiler.compileModuleAsync(i))))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function BV(t){return function JMe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let oC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new hr,this.configLoader=$n(sO),this.environmentInjector=$n(Vl),this.urlSerializer=$n(H1),this.rootContexts=$n(J1),this.navigationId=0,this.afterPreactivation=()=>$t(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new REe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new PEe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Zo({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:W1,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(co(i=>0!==i.id),xn(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),gl(i=>{let r=!1,o=!1;return $t(i).pipe(xo(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),gl(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new Yx(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vd}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return VV(s.source)&&(e.browserUrlTree=s.extractedUrl),$t(s).pipe(gl(u=>{const d=this.transitions?.getValue();return this.events.next(new qx(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Vd:Promise.resolve(u)}),function jMe(t,n,e,i){return gl(r=>function IMe(t,n,e,i,r){return new NMe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(xn(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),xo(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function UMe(t,n,e,i,r){return _o(o=>function LMe(t,n,e,i,r,o,s="emptyOnly"){return new FMe(t,n,e,i,r,s,o).recognize().pipe(gl(a=>null===a?function RMe(t){return new ar(n=>n.error(t))}(new PMe):$t(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(xn(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),xo(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new MEe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,g=new qx(u,this.urlSerializer.serialize(d),h,f);this.events.next(g);const m=gV(d,this.rootComponentType).snapshot;return $t(i={...s,targetSnapshot:m,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new Yx(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Vd}}),xo(s=>{const a=new OEe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),xn(s=>i={...s,guards:oMe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function mMe(t,n){return _o(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?$t({...e,guardsResult:!0}):function vMe(t,n,e,i){return Jo(t).pipe(_o(r=>function CMe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?$t(o.map(a=>{const l=K1(n)??r,c=Nm(a,l);return Rh(function fMe(t){return t&&Z1(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(jh())})).pipe(jm()):$t(!0)}(r.component,r.route,e,n,i)),jh(r=>!0!==r,!0))}(s,i,r,t).pipe(_o(a=>a&&function cMe(t){return"boolean"==typeof t}(a)?function yMe(t,n,e,i){return Jo(n).pipe(Ph(r=>Rx(function bMe(t,n){return null!==t&&n&&n(new LEe(t)),$t(!0)}(r.route.parent,i),function _Me(t,n){return null!==t&&n&&n(new $Ee(t)),$t(!0)}(r.route,i),function xMe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function sMe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>H9(()=>$t(s.guards.map(l=>{const c=K1(s.node)??e,u=Nm(l,c);return Rh(function hMe(t){return t&&Z1(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(jh())})).pipe(jm())));return $t(o).pipe(jm())}(t,r.path,e),function wMe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return $t(!0);const r=i.map(o=>H9(()=>{const s=K1(n)??e,a=Nm(o,s);return Rh(function dMe(t){return t&&Z1(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(jh())}));return $t(r).pipe(jm())}(t,r.route,e))),jh(r=>!0!==r,!0))}(i,o,t,n):$t(a)),xn(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),xo(s=>{if(i.guardsResult=s.guardsResult,vp(s.guardsResult))throw _V(0,s.guardsResult);const a=new IEe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),co(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),oO(s=>{if(s.guards.canActivateChecks.length)return $t(s).pipe(xo(a=>{const l=new NEe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),gl(a=>{let l=!1;return $t(a).pipe(function zMe(t,n){return _o(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return $t(e);let o=0;return Jo(r).pipe(Ph(s=>function GMe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!FV(r)&&(o[B1]=r.title),function WMe(t,n,e,i){const r=function qMe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return $t({});const o={};return Jo(r).pipe(_o(s=>function YMe(t,n,e,i){const r=K1(n)??i,o=Nm(t,r);return Rh(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(jh(),xo(a=>{o[s]=a}))),$M(1),function eEe(t){return n=>n.lift(new tEe(t))}(o),Va(s=>nO(s)?Vd:gp(s)))}(o,t,n,i).pipe(xn(s=>(t._resolvedData=s,t.data=mV(t,e).resolve,r&&FV(r)&&(t.data[B1]=r.title),null)))}(s.route,i,t,n)),xo(()=>o++),$M(1),_o(s=>o===r.length?$t(e):Vd))})}(e.paramsInheritanceStrategy,this.environmentInjector),xo({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),xo(a=>{const l=new jEe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),oO(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(xo(u=>{l.component=u}),xn(()=>{})));for(const u of l.children)c.push(...a(u));return c};return Px(a(s.targetSnapshot.root)).pipe($x(),es(1))}),oO(()=>this.afterPreactivation()),xn(s=>{const a=function YEe(t,n,e){const i=Y1(t,n._root,e?e._root:void 0);return new pV(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),xo(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>xn(i=>(new rMe(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),es(1),xo({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Ud(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),BM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Va(s=>{if(o=!0,xV(s)){wV(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new q1(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),wV(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||VV(i.source)};e.scheduleNavigation(l,W1,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new Jx(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Vd}))}))}cancelNavigationTransition(e,i,r){const o=new q1(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function VV(t){return t!==W1}let HV=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===Jn);return i}getResolvedTitleForRoute(e){return e.data[B1]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(KMe)},providedIn:"root"}),t})(),KMe=(()=>{class t extends HV{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(Ve(K7))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),XMe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(ZMe)},providedIn:"root"}),t})();class QMe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let ZMe=(()=>{class t extends QMe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const sC=new Ut("",{providedIn:"root",factory:()=>({})});let tOe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return $n(nOe)},providedIn:"root"}),t})(),nOe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function iOe(t){throw t}function rOe(t,n,e){return n.parse("/")}const oOe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},sOe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let xi=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=$n(x2e),this.isNgZoneEnabled=!1,this.options=$n(sC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||iOe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||rOe,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=$n(tOe),this.routeReuseStrategy=$n(XMe),this.urlCreationStrategy=$n(GEe),this.titleStrategy=$n(HV),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=Y9($n(Pm,{optional:!0})??[]),this.navigationTransitions=$n(oC),this.urlSerializer=$n(H1),this.location=$n($E),this.isNgZoneEnabled=$n(si)instanceof si&&si.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Lh,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=gV(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId??0},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),W1,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(tO),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=vp(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,W1,null,i)}navigate(e,i={skipLocationChange:!1}){return function aOe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",o)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-(this.browserPageId??this.currentPageId);0!==o?this.location.historyGo(o):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Mc=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new hr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof Ud&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=Tm(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=Tm(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=Tm(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function h$(t,n,e){return function R_e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?d$:a1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(te(xi),te(Li),Sh("tabindex"),te(hs),te(En),te(up))},t.\u0275dir=pt({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&se("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&Re("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Kt]}),t})(),ty=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new Oe,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof Ud&&this.update()})}ngAfterContentInit(){$t(this.links.changes,$t(null)).pipe(Lg()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=Jo(e).pipe(Lg()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function lOe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(te(xi),te(En),te(hs),te(jo),te(Mc,8))},t.\u0275dir=pt({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&Cn(r,Mc,5),2&e){let o;kt(o=Tt())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Kt]}),t})();class UV{}let cOe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(co(e=>e instanceof Ud),Ph(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=Gw(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return Jo(r).pipe(Lg())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):$t(null);const o=r.pipe(_o(s=>null===s?$t(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?Jo([o,this.loader.loadComponent(i)]).pipe(Lg()):o})}}return t.\u0275fac=function(e){return new(e||t)(Ve(xi),Ve(SB),Ve(Vl),Ve(UV),Ve(sO))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const lO=new Ut("");let zV=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof qx?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Ud&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof hV&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new hV(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function U$(){throw new Error("invalid")}()},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();var ml=(()=>((ml=ml||{})[ml.COMPLETE=0]="COMPLETE",ml[ml.FAILED=1]="FAILED",ml[ml.REDIRECTING=2]="REDIRECTING",ml))();const Rm=!1;function Fh(t,n){return{\u0275kind:t,\u0275providers:n}}const cO=new Ut("",{providedIn:"root",factory:()=>!1});function WV(){const t=$n(fs);return n=>{const e=t.get(Pd);if(n!==e.components[0])return;const i=t.get(xi),r=t.get(qV);1===t.get(uO)&&i.initialNavigation(),t.get(YV,null,An.Optional)?.setUpPreloading(),t.get(lO,null,An.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const qV=new Ut(Rm?"bootstrap done indicator":"",{factory:()=>new hr}),uO=new Ut(Rm?"initial navigation":"",{providedIn:"root",factory:()=>1});function pOe(){let t=[];return t=Rm?[{provide:Tw,multi:!0,useFactory:()=>{const n=$n(xi);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function VEe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Fh(1,t)}const YV=new Ut(Rm?"router preloader":"");function gOe(t){return Fh(0,[{provide:YV,useExisting:cOe},{provide:UV,useExisting:t}])}const ny=!1,JV=new Ut(ny?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),mOe=[$E,{provide:H1,useClass:VM},xi,J1,{provide:Li,useFactory:function GV(t){return t.routerState.root},deps:[xi]},sO,ny?{provide:cO,useValue:!0}:[]];function vOe(){return new IB("Router",xi)}let KV=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[mOe,ny&&i?.enableTracing?pOe().\u0275providers:[],{provide:Pm,multi:!0,useValue:e},{provide:JV,useFactory:wOe,deps:[[xi,new Z0,new e1]]},{provide:sC,useValue:i||{}},i?.useHash?{provide:up,useClass:cSe}:{provide:up,useClass:t7},{provide:lO,useFactory:()=>{const t=$n(wke),n=$n(si),e=$n(sC),i=$n(oC),r=$n(H1);return e.scrollOffset&&t.setOffset(e.scrollOffset),new zV(r,i,t,n,e)}},i?.preloadingStrategy?gOe(i.preloadingStrategy).\u0275providers:[],{provide:IB,multi:!0,useFactory:vOe},i?.initialNavigation?xOe(i):[],[{provide:XV,useFactory:WV},{provide:OB,multi:!0,useExisting:XV}]]}}static forChild(e){return{ngModule:t,providers:[{provide:Pm,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(Ve(JV,8))},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[ZM]}),t})();function wOe(t){if(ny&&t)throw new et(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function xOe(t){return["disabled"===t.initialNavigation?Fh(3,[{provide:Jw,multi:!0,useFactory:()=>{const n=$n(xi);return()=>{n.setUpLocationChangeListener()}}},{provide:uO,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Fh(2,[{provide:uO,useValue:0},{provide:Jw,multi:!0,deps:[fs],useFactory:n=>{const e=n.get(aSe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(xi),o=n.get(qV);(function uOe(t,n){t.events.pipe(co(e=>e instanceof Ud||e instanceof q1||e instanceof Jx||e instanceof Yx),xn(e=>e instanceof Ud||e instanceof Yx?ml.COMPLETE:e instanceof q1&&(0===e.code||1===e.code)?ml.REDIRECTING:ml.FAILED),co(e=>e!==ml.REDIRECTING),es(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(oC).afterPreactivation=()=>(i(!0),o.closed?$t(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const XV=new Ut(ny?"Router Initializer":"");function aC(t,n){return new ar(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let QV=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(te(hs),te(En))},t.\u0275dir=pt({type:t}),t})(),_p=(()=>{class t extends QV{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,features:[yn]}),t})();const Ha=new Ut("NgValueAccessor"),kOe={provide:Ha,useExisting:Fn(()=>lC),multi:!0};let lC=(()=>{class t extends _p{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&se("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Qi([kOe]),yn]}),t})();const TOe={provide:Ha,useExisting:Fn(()=>ts),multi:!0},AOe=new Ut("CompositionEventMode");let ts=(()=>{class t extends QV{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function DOe(){const t=Rd()?Rd().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(te(hs),te(En),te(AOe,8))},t.\u0275dir=pt({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&se("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Qi([TOe]),yn]}),t})();const EOe=!1;function $h(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function ZV(t){return null!=t&&"number"==typeof t.length}const Ns=new Ut("NgValidators"),Bh=new Ut("NgAsyncValidators"),MOe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Sr{static min(n){return eH(n)}static max(n){return function tH(t){return n=>{if($h(n.value)||$h(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return nH(n)}static requiredTrue(n){return function iH(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function rH(t){return $h(t.value)||MOe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function oH(t){return n=>$h(n.value)||!ZV(n.value)?null:n.value.lengthZV(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function aH(t){if(!t)return cC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if($h(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return fH(n)}static composeAsync(n){return pH(n)}}function eH(t){return n=>{if($h(n.value)||$h(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function dH(t,n){return n.map(e=>e(t))}function hH(t){return t.map(n=>function OOe(t){return!t.validate}(n)?n:e=>n.validate(e))}function fH(t){if(!t)return null;const n=t.filter(lH);return 0==n.length?null:function(e){return uH(dH(e,n))}}function dO(t){return null!=t?fH(hH(t)):null}function pH(t){if(!t)return null;const n=t.filter(lH);return 0==n.length?null:function(e){return function SOe(...t){if(1===t.length){const n=t[0];if(nl(n))return aC(n,null);if(Na(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return aC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return aC(t=1===t.length&&nl(t[0])?t[0]:t,null).pipe(xn(e=>n(...e)))}return aC(t,null)}(dH(e,n).map(cH)).pipe(xn(uH))}}function hO(t){return null!=t?pH(hH(t)):null}function gH(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function mH(t){return t._rawValidators}function vH(t){return t._rawAsyncValidators}function fO(t){return t?Array.isArray(t)?t:[t]:[]}function uC(t,n){return Array.isArray(t)?t.includes(n):t===n}function yH(t,n){const e=fO(n);return fO(t).forEach(r=>{uC(e,r)||e.push(r)}),e}function _H(t,n){return fO(n).filter(e=>!uC(t,e))}class bH{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=dO(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=hO(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class ya extends bH{get formDirective(){return null}get path(){return null}}class Vh extends bH{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class wH{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let ps=(()=>{class t extends wH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(te(Vh,2))},t.\u0275dir=pt({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Ft("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[yn]}),t})(),gs=(()=>{class t extends wH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(te(ya,10))},t.\u0275dir=pt({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Ft("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[yn]}),t})();function xH(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const mO=!1,iy="VALID",hC="INVALID",Lm="PENDING",ry="DISABLED";function vO(t){return(fC(t)?t.validators:t)||null}function yO(t,n){return(fC(n)?n.asyncValidators:t)||null}function fC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function CH(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new et(1e3,mO?function POe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new et(1001,mO?function ROe(t,n){return`Cannot find form control ${xH(t,n)}`}(n,e):"")}function SH(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new et(1002,mO?function LOe(t,n){return`Must supply a value for form control ${xH(t,n)}`}(n,r):"")})}class pC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===iy}get invalid(){return this.status===hC}get pending(){return this.status==Lm}get disabled(){return this.status===ry}get enabled(){return this.status!==ry}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(yH(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(yH(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(_H(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(_H(n,this._rawAsyncValidators))}hasValidator(n){return uC(this._rawValidators,n)}hasAsyncValidator(n){return uC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Lm,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=ry,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=iy,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===iy||this.status===Lm)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ry:iy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Lm,this._hasOwnPendingAsyncValidator=!0;const e=cH(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new Oe,this.statusChanges=new Oe}_calculateStatus(){return this._allControlsDisabled()?ry:this.errors?hC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Lm)?Lm:this._anyControlsHaveStatus(hC)?hC:iy}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){fC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function FOe(t){return Array.isArray(t)?dO(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function $Oe(t){return Array.isArray(t)?hO(t):t||null}(this._rawAsyncValidators)}}class oy extends pC{constructor(n,e,i){super(vO(e),yO(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){SH(this,!0,n),Object.keys(n).forEach(i=>{CH(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class kH extends oy{}const bp=new Ut("CallSetDisabledState",{providedIn:"root",factory:()=>sy}),sy="always";function ay(t,n,e=sy){_O(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function VOe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&TH(t,n)})}(t,n),function UOe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function HOe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&TH(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function BOe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function mC(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),yC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function vC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function _O(t,n){const e=mH(t);null!==n.validator?t.setValidators(gH(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=vH(t);null!==n.asyncValidator?t.setAsyncValidators(gH(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();vC(n._rawValidators,r),vC(n._rawAsyncValidators,r)}function yC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=mH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=vH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return vC(n._rawValidators,i),vC(n._rawAsyncValidators,i),e}function TH(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function EH(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function MH(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const cy=class extends pC{constructor(n=null,e,i){super(vO(e),yO(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),fC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=MH(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){EH(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){EH(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){MH(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let ms=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const QOe={provide:Ha,useExisting:Fn(()=>SO),multi:!0};let SO=(()=>{class t extends _p{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&se("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Qi([QOe]),yn]}),t})();const ZOe={provide:Ha,useExisting:Fn(()=>kO),multi:!0};let PH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})(),e3e=(()=>{class t{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e)return void this._accessors.splice(i,1)}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return!!e[0].control&&e[0]._parent===i._control._parent&&e[1].name===i.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:PH}),t})(),kO=(()=>{class t extends _p{constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=$n(bp,{optional:!0})??sy}ngOnInit(){this._control=this._injector.get(Vh),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(te(hs),te(En),te(e3e),te(fs))},t.\u0275dir=pt({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,i){1&e&&se("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Qi([ZOe]),yn]}),t})();const TO=new Ut("NgModelWithFormControlWarning"),i3e={provide:ya,useExisting:Fn(()=>Lo)};let Lo=(()=>{class t extends ya{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Oe,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(yC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return ay(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){mC(e.control||null,e,!1),function qOe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function AH(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(mC(i||null,e),(t=>t instanceof cy)(r)&&(ay(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function DH(t,n){_O(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function zOe(t,n){return yC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){_O(this.form,this),this._oldForm&&yC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(te(Ns,10),te(Bh,10),te(bp,8))},t.\u0275dir=pt({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&se("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Qi([i3e]),yn,Kt]}),t})();const s3e={provide:Vh,useExisting:Fn(()=>ns)};let ns=(()=>{class t extends Vh{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new Oe,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function xO(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===ts?e=o:function WOe(t){return Object.getPrototypeOf(t.constructor)===_p}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function wO(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function gC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(te(ya,13),te(Ns,10),te(Bh,10),te(Ha,10),te(TO,8))},t.\u0275dir=pt({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Qi([s3e]),yn,Kt]}),t})();const a3e={provide:Ha,useExisting:Fn(()=>Fm),multi:!0};function $H(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let Fm=(()=>{class t extends _p{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=$H(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function l3e(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&se("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Qi([a3e]),yn]}),t})(),_C=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue($H(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs),te(Fm,9))},t.\u0275dir=pt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const c3e={provide:Ha,useExisting:Fn(()=>EO),multi:!0};function BH(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let EO=(()=>{class t extends _p{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(BH(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(BH(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs),te(EO,9))},t.\u0275dir=pt({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let wp=(()=>{class t{constructor(){this._validator=cC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):cC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,features:[Kt]}),t})();const h3e={provide:Ns,useExisting:Fn(()=>MO),multi:!0};let MO=(()=>{class t extends wp{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function HH(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>eH(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Re("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Qi([h3e]),yn]}),t})();const f3e={provide:Ns,useExisting:Fn(()=>Hh),multi:!0};let Hh=(()=>{class t extends wp{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Tm,this.createValidator=e=>nH}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275dir=pt({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&Re("required",i._enabled?"":null)},inputs:{required:"required"},features:[Qi([f3e]),yn]}),t})(),JH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[PH]}),t})();class KH extends pC{constructor(n,e,i){super(vO(e),yO(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){SH(this,!1,n),n.forEach((i,r)=>{CH(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function XH(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let _3e=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return XH(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new oy(r,o)}record(e,i=null){const r=this._reduceControls(e);return new kH(r,i)}control(e,i,r){let o={};return this.useNonNullable?(XH(i)?o=i:(o.validators=i,o.asyncValidators=r),new cy(e,{...o,nonNullable:!0})):new cy(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new KH(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof cy||e instanceof pC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),js=(()=>{class t extends _3e{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),b3e=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:bp,useValue:e.callSetDisabledState??sy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[JH]}),t})(),w3e=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:TO,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:bp,useValue:e.callSetDisabledState??sy}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[JH]}),t})();const QH=new Ut("ngx-segment-analytics.config"),x3e={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js",plugins:[]};let ZH=(()=>{class t{analytics;static \u0275fac=function(i){return new(i||t)};static \u0275prov=Ke({token:t,factory:t.\u0275fac})}return t})(),wC=(()=>{class t{_w;_doc;_config;constructor(e,i,r){if(this._w=e,this._doc=i,this._config={...x3e,...r},this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");!0===this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics._writeKey=this._config.apiKey,this._w.analytics.SNIPPET_VERSION="4.15.3",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),!0===this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}setAnonymousId(e){this._w.analytics.setAnonymousId(e)}traits(){return this._w.analytics.user().traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}addDestinationMiddleware(e,...i){this._w.analytics.addDestinationMiddleware(e,...i)}register(...e){return this._w.analytics.register(...e)}get plugins(){return this._w.analytics.plugins}static \u0275fac=function(i){return new(i||t)(Ve(ZH),Ve(lr),Ve(QH))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function C3e(t){return T7(t)?window:{}}let S3e=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:QH,useValue:e},wC]}}constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static \u0275fac=function(i){return new(i||t)(Ve(t,12))};static \u0275mod=Mn({type:t});static \u0275inj=Dn({providers:[{provide:ZH,useFactory:C3e,deps:[A1]}],imports:[Mh]})}return t})();class xC{}class OO{}class Oc{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.entries(n).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){const o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Oc?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Oc;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Oc?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class k3e{encodeKey(n){return eU(n)}encodeValue(n){return eU(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const D3e=/%(\d[a-f0-9])/gi,A3e={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eU(t){return encodeURIComponent(t).replace(D3e,(n,e)=>A3e[e]??n)}function CC(t){return`${t}`}class Mt{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new k3e,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function T3e(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(CC):[CC(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new Mt({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(CC(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(CC(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class E3e{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tU(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function nU(t){return typeof Blob<"u"&&t instanceof Blob}function iU(t){return typeof FormData<"u"&&t instanceof FormData}class uy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function M3e(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Oc),this.context||(this.context=new E3e),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new uy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var Fo=(()=>((Fo=Fo||{})[Fo.Sent=0]="Sent",Fo[Fo.UploadProgress=1]="UploadProgress",Fo[Fo.ResponseHeader=2]="ResponseHeader",Fo[Fo.DownloadProgress=3]="DownloadProgress",Fo[Fo.Response=4]="Response",Fo[Fo.User=5]="User",Fo))();class IO{constructor(n,e=200,i="OK"){this.headers=n.headers||new Oc,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class NO extends IO{constructor(n={}){super(n),this.type=Fo.ResponseHeader}clone(n={}){return new NO({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class SC extends IO{constructor(n={}){super(n),this.type=Fo.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new SC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class rU extends IO{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function jO(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let kC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof uy)o=e;else{let l,c;l=r.headers instanceof Oc?r.headers:new Oc(r.headers),r.params&&(c=r.params instanceof Mt?r.params:new Mt({fromObject:r.params})),o=new uy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=$t(o).pipe(Ph(l=>this.handler.handle(l)));if(e instanceof uy||"events"===r.observe)return s;const a=s.pipe(co(l=>l instanceof SC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(xn(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(xn(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(xn(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(xn(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new Mt).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,jO(r,i))}post(e,i,r={}){return this.request("POST",e,jO(r,i))}put(e,i,r={}){return this.request("PUT",e,jO(r,i))}}return t.\u0275fac=function(e){return new(e||t)(Ve(xC))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();function oU(t,n){return n(t)}function I3e(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const PO=new Ut("HTTP_INTERCEPTORS"),dy=new Ut("HTTP_INTERCEPTOR_FNS");function j3e(){let t=null;return(n,e)=>(null===t&&(t=($n(PO,{optional:!0})??[]).reduceRight(I3e,oU)),t(n,e))}let sU=(()=>{class t extends xC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(dy)));this.chain=i.reduceRight((r,o)=>function N3e(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),oU)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(Ve(OO),Ve(Vl))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const F3e=/^\)\]\}',?\n/;let lU=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new ar(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Oc(r.getAllResponseHeaders()),g=function $3e(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new NO({headers:p,status:r.status,statusText:f,url:g}),s},l=()=>{let{headers:f,status:p,statusText:g,url:m}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const b=v;v=v.replace(F3e,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=b,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new SC({body:v,headers:f,status:p,statusText:g,url:m||void 0})),i.complete()):i.error(new rU({error:v,headers:f,status:p,statusText:g,url:m||void 0}))},c=f=>{const{url:p}=a(),g=new rU({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(g)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:Fo.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:Fo.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:Fo.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(Ve(A7))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const RO=new Ut("XSRF_ENABLED"),cU=new Ut("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),uU=new Ut("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class dU{}let H3e=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=p7(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr),Ve(A1),Ve(cU))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();function U3e(t,n){const e=t.url.toLowerCase();if(!$n(RO)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=$n(dU).getToken(),r=$n(uU);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var Co=(()=>((Co=Co||{})[Co.Interceptors=0]="Interceptors",Co[Co.LegacyInterceptors=1]="LegacyInterceptors",Co[Co.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",Co[Co.NoXsrfProtection=3]="NoXsrfProtection",Co[Co.JsonpSupport=4]="JsonpSupport",Co[Co.RequestsMadeViaParent=5]="RequestsMadeViaParent",Co))();function $m(t,n){return{\u0275kind:t,\u0275providers:n}}function z3e(...t){const n=[kC,lU,sU,{provide:xC,useExisting:sU},{provide:OO,useExisting:lU},{provide:dy,useValue:U3e,multi:!0},{provide:RO,useValue:!0},{provide:dU,useClass:H3e}];for(const e of t)n.push(...e.\u0275providers);return function L_e(t){return{\u0275providers:t}}(n)}const hU=new Ut("LEGACY_INTERCEPTOR_FN");let W3e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[z3e($m(Co.LegacyInterceptors,[{provide:hU,useFactory:j3e},{provide:dy,useExisting:hU,multi:!0}]))]}),t})();var nn=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(nn||(nn={})),nn))(),hy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY",t[t.FACEBOOK_INSTANT_STORE=3]="FACEBOOK_INSTANT_STORE"}(hy||(hy={})),hy))();class LO{host;timeoutMs}let kn=(()=>{class t{httpClient;config;constructor(e,i){this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new Mt({encoder:new Gt});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new Mt({encoder:new Gt});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new Mt({encoder:new Gt});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new Mt({encoder:new Gt});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getPurchase(e,i){const r=`/v2/console/iap/purchase/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getSubscription(e,i){const r=`/v2/console/iap/subscription/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new Mt({encoder:new Gt});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new Mt({encoder:new Gt});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new Mt({encoder:new Gt});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new Mt({encoder:new Gt});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new Mt({encoder:new Gt});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new Mt({encoder:new Gt});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new Mt({encoder:new Gt});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new Mt({encoder:new Gt});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new Mt({encoder:new Gt});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new Mt({encoder:new Gt});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new Mt({encoder:new Gt});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new Mt({encoder:new Gt});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new Mt({encoder:new Gt});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Oc).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Oc).set("Authorization","Basic "+btoa(e+":"+i))}static \u0275fac=function(i){return new(i||t)(Ve(kC),Ve(LO,8))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class Gt{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const fU=new Ut("window"),J3e=[{provide:fU,useFactory:()=>window}],FO="currentSession";let zr=(()=>{class t{window;segment;http;consoleService;currentSessionSubject;currentSession;constructor(e,i,r,o){this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(FO));s&&this.segmentIdentify(s),this.currentSessionSubject=new Zo(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return nn.USER_ROLE_ADMIN;case 2:return nn.USER_ROLE_DEVELOPER;case 3:return nn.USER_ROLE_MAINTAINER;case 4:return nn.USER_ROLE_READONLY;default:return nn.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(xo(r=>{localStorage.setItem(FO,JSON.stringify(r)),this.currentSessionSubject.next(r),this.segmentIdentify(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(xo(()=>{localStorage.removeItem(FO),this.currentSessionSubject.next(null)})):Vd}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}static \u0275fac=function(i){return new(i||t)(Ve(fU),Ve(wC),Ve(kC),Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function K3e(t,n){if(1&t&&(_(0,"div",27),A(1),w()),2&t){const e=P();x(1),wt(" ",e.error," ")}}const X3e=function(t){return{"was-validated":t}},pU=function(t){return{"is-invalid":t}};let Q3e=(()=>{class t{segment;formBuilder;route;router;authenticationService;error="";loginForm;submitted;returnUrl;constructor(e,i,r,o,s){this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.segment.page("/login"),this.loginForm=this.formBuilder.group({username:["",Sr.compose([Sr.required])],password:["",Sr.compose([Sr.required,Sr.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}static \u0275fac=function(i){return new(i||t)(te(wC),te(js),te(Li),te(xi),te(zr))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:53,vars:14,consts:[[1,"d-flex","flex-column","flex-lg-row","h-100","relative"],["src","/static/svg/logo-white.svg","alt","Nakama Logo","width","175","height","43",1,"logo"],[1,"login-panel"],[1,"align-self-center","login-form"],[1,"px-4"],[1,"login-title","mb-4"],["class","alert alert-warning","role","alert",4,"ngIf"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],[1,"heroic-stack"],[1,""],["src","/static/svg/hiro-logo.svg","alt","Hiro Logo","width","110","height","50",1,"mb-3"],["href","https://www.youtube.com/playlist?list=PLOAExZcDNj9sWny_J8J5ARkxDTwAV0i6f&utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Reconstructing%20Fun%20Sign-In","target","_blank"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Sign-In","target","_blank",1,"login-link"],["src","/static/svg/satori-logo.svg","alt","Satori Logo","width","134","height","50",1,"mb-3"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Sign-In","target","_blank",1,"login-link"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/calendar.svg","alt","Calendar"],[1,"font-weight-bold","ml-2",2,"font-size","20px"],["href","https://heroiclabs.com/bookademo?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Book%20a%20Demo%20Sign-In","target","_blank",1,"login-link-pink"],["src","/static/svg/phone.svg","alt","Phone"],["role","alert",1,"alert","alert-warning"]],template:function(i,r){1&i&&(_(0,"div",0),ie(1,"img",1),_(2,"div",2)(3,"div",3)(4,"div",4)(5,"h3",5),A(6,"Sign in to continue to the Nakama Dashboard"),w(),q(7,K3e,2,1,"div",6),_(8,"form",7),se("ngSubmit",function(){return r.onSubmit()}),_(9,"div",8)(10,"label",9),A(11,"Username"),w(),ie(12,"input",10),_(13,"div",11),A(14,"Please enter a username."),w()(),_(15,"div",8)(16,"label",12),A(17,"Password"),w(),ie(18,"input",13),_(19,"div",11),A(20,"Password must be at least 8 characters."),w()(),_(21,"button",14),A(22,"Login"),w()()()()(),_(23,"div",2)(24,"div",15)(25,"div",16),ie(26,"img",17),_(27,"p"),A(28,"A metagame framework built on Nakama to add virtual store, rewards, event leaderboards and much more rapidly and flexibly to your game. "),_(29,"a",18),A(30,"RECONSTRUCTING FUN"),w(),A(31," on YouTube shows you how."),w(),_(32,"a",19),A(33,"Explore Hiro"),w()(),ie(34,"hr"),_(35,"div",16),ie(36,"img",20),_(37,"p"),A(38,"LiveOps for your live services game. Live events, Experiments, Feature Flags, Audience Segmentation and Analytics built to work independently but beautifully with Nakama."),w(),_(39,"a",21),A(40,"Explore Satori"),w()(),ie(41,"hr"),_(42,"div")(43,"div",22),ie(44,"img",23),_(45,"span",24),A(46,"Working at a Game Studio?"),w()(),_(47,"p"),A(48,"Ready to take your game development to the next level? Contact us for a free 45 minute demo call."),w(),_(49,"a",25),ie(50,"img",26),_(51,"span"),A(52,"Schedule a call with us"),w()()()()()()),2&i&&(x(7),S("ngIf",r.error),x(1),S("formGroup",r.loginForm)("ngClass",ui(8,X3e,r.submitted)),x(4),S("ngClass",ui(10,pU,r.f.username.dirty&&r.f.username.errors)),x(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),x(5),S("ngClass",ui(12,pU,r.f.password.dirty&&r.f.password.errors)),x(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),x(2),S("disabled",!r.loginForm.valid||r.submitted))},dependencies:[dp,Ct,ms,ts,ps,gs,Hh,Lo,ns],styles:[".logo[_ngcontent-%COMP%]{position:absolute;top:10px;left:15px}@media (min-width: 992px){.logo[_ngcontent-%COMP%]{top:40px;left:30px}}.login-form[_ngcontent-%COMP%]{margin:100px auto auto;max-width:600px}@media (min-width: 992px){.login-form[_ngcontent-%COMP%]{width:485px;margin:auto}}.login-title[_ngcontent-%COMP%]{font-size:28px;font-weight:300}.login-panel[_ngcontent-%COMP%]{flex:1 1 0;display:flex}.login-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:300;font-size:20px}.heroic-stack[_ngcontent-%COMP%]{padding:0 1.5rem;max-width:600px;margin:70px auto 40px}@media (min-width: 992px){.heroic-stack[_ngcontent-%COMP%]{max-width:660px;padding:0 15px;margin:auto}}.login-link[_ngcontent-%COMP%], .login-link-pink[_ngcontent-%COMP%]{display:inline-flex;padding:15px;font-size:15px;border:1px;border-radius:5px;border:1px solid}.login-link[_ngcontent-%COMP%]{color:#4739c5;border-color:#4739c51a}hr[_ngcontent-%COMP%]{border:2px solid rgba(217,217,217,.2);margin-top:20px;margin-bottom:40px}.login-link-pink[_ngcontent-%COMP%]{border-color:#b421b41a;background:#FFF6FF;color:#b421b4}.login-link-pink[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:15px}"]})}return t})(),Z3e=(()=>{class t{authService;router;constructor(e,i){this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}static \u0275fac=function(i){return new(i||t)(Ve(zr),Ve(xi))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),eIe=(()=>{class t{router;authenticationService;constructor(e,i){this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}static \u0275fac=function(i){return new(i||t)(Ve(xi),Ve(zr))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class tIe extends pn{constructor(n,e){super()}schedule(n,e=0){return this}}class $O extends tIe{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let gU=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Lu extends gU{constructor(n,e=gU.now){super(n,()=>Lu.delegate&&Lu.delegate!==this?Lu.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Lu.delegate&&Lu.delegate!==this?Lu.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const TC=new Lu($O);class iIe{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new oIe(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class rIe{constructor(){this.buffer=[]}}class oIe extends Ln{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(mU,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(vU,e,{subscriber:this,context:s})),this.add(o.schedule(sIe,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(mU,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new rIe;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function mU(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function sIe(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(vU,e,{subscriber:i,context:o})),this.schedule(t,n))}function vU(t){const{subscriber:n,context:e}=t;n.closeContext(e)}function DC(t,n){return e=>e.lift(new aIe(t,n))}class aIe{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new lIe(n,this.compare,this.keySelector))}}class lIe extends Ln{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Ps(t,n,e,i){return xu(e)&&(i=e,e=void 0),i?Ps(t,n,e).pipe(xn(r=>nl(r)?i(...r):i(r))):new ar(r=>{yU(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function yU(t,n,e,i,r){let o;if(function dIe(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function uIe(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function cIe(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function fy(t=0,n,e){let i=-1;return _U(n)?i=Number(n)<1?1:Number(n):Jf(n)&&(e=n),Jf(e)||(e=TC),new ar(r=>{const o=_U(t)?t:+t-e.now();return e.schedule(hIe,o,{index:0,period:i,subscriber:r})})}function hIe(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function bU(...t){if(1===t.length){if(!nl(t[0]))return t[0];t=t[0]}return F0(t,void 0).lift(new fIe)}class fIe{call(n,e){return e.subscribe(new pIe(n))}}class pIe extends LM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class _Ie extends R0{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[wh](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return L0(this.observable,new P0(this))}}function Xr(t){return n=>n.lift(new wIe(t))}class wIe{constructor(n){this.notifier=n}call(n,e){const i=new xIe(n),r=L0(this.notifier,new P0(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class xIe extends R0{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function BO(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new CIe(t,e))}}class CIe{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new SIe(n,this.observables,this.project))}}class SIe extends LM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Ic{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return $t(this.value);case"E":return gp(this.error);case"C":return Lx()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Ic("N",n):Ic.undefinedValueNotification}static createError(n){return new Ic("E",void 0,n)}static createComplete(){return Ic.completeNotification}}function VO(t,n=TC){const i=function kIe(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new TIe(i,n))}Ic.completeNotification=new Ic("C"),Ic.undefinedValueNotification=new Ic("N",void 0);class TIe{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new HO(n,this.delay,this.scheduler))}}class HO extends Ln{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(HO.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new DIe(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Ic.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Ic.createComplete()),this.unsubscribe()}}class DIe{constructor(n,e){this.time=n,this.notification=e}}class EIe{constructor(n){this.total=n}call(n,e){return e.subscribe(new MIe(n,this.total))}}class MIe extends Ln{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){++this.count>this.total&&this.destination.next(n)}}var OIe={left:"right",right:"left",bottom:"top",top:"bottom"};function EC(t){return t.replace(/left|right|bottom|top/g,function(n){return OIe[n]})}function Fu(t){return t.split("-")[0]}var IIe={start:"end",end:"start"};function xU(t){return t.replace(/start|end/g,function(n){return IIe[n]})}var vl="top",Nc="bottom",jc="right",yl="left",UO="auto",py=[vl,Nc,jc,yl],Bm="start",gy="end",NIe="clippingParents",CU="viewport",my="popper",jIe="reference",SU=py.reduce(function(t,n){return t.concat([n+"-"+Bm,n+"-"+gy])},[]),kU=[].concat(py,[UO]).reduce(function(t,n){return t.concat([n,n+"-"+Bm,n+"-"+gy])},[]),zIe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function _l(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function xp(t){return t instanceof _l(t).Element||t instanceof Element}function Yl(t){return t instanceof _l(t).HTMLElement||t instanceof HTMLElement}function zO(t){return!(typeof ShadowRoot>"u")&&(t instanceof _l(t).ShadowRoot||t instanceof ShadowRoot)}function Uh(t){return((xp(t)?t.ownerDocument:t.document)||window.document).documentElement}var Cp=Math.max,MC=Math.min,Vm=Math.round;function GO(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function TU(){return!/^((?!chrome|android).)*safari/i.test(GO())}function Hm(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,o=1;n&&Yl(t)&&(r=t.offsetWidth>0&&Vm(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Vm(i.height)/t.offsetHeight||1);var a=(xp(t)?_l(t):window).visualViewport,l=!TU()&&e,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function WO(t){var n=_l(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function qO(t){return Hm(Uh(t)).left+WO(t).scrollLeft}function Gd(t){return _l(t).getComputedStyle(t)}function $u(t){return t?(t.nodeName||"").toLowerCase():null}function OC(t){return"html"===$u(t)?t:t.assignedSlot||t.parentNode||(zO(t)?t.host:null)||Uh(t)}function YO(t){var n=Gd(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function DU(t){return["html","body","#document"].indexOf($u(t))>=0?t.ownerDocument.body:Yl(t)&&YO(t)?t:DU(OC(t))}function vy(t,n){var e;void 0===n&&(n=[]);var i=DU(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=_l(i),s=r?[o].concat(o.visualViewport||[],YO(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(vy(OC(s)))}function qIe(t){return["table","td","th"].indexOf($u(t))>=0}function AU(t){return Yl(t)&&"fixed"!==Gd(t).position?t.offsetParent:null}function yy(t){for(var n=_l(t),e=AU(t);e&&qIe(e)&&"static"===Gd(e).position;)e=AU(e);return e&&("html"===$u(e)||"body"===$u(e)&&"static"===Gd(e).position)?n:e||function YIe(t){var n=/firefox/i.test(GO());if(/Trident/i.test(GO())&&Yl(t)&&"fixed"===Gd(t).position)return null;var r=OC(t);for(zO(r)&&(r=r.host);Yl(r)&&["html","body"].indexOf($u(r))<0;){var o=Gd(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||n&&"filter"===o.willChange||n&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(t)||n}function EU(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&zO(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function JO(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function MU(t,n,e){return n===CU?JO(function GIe(t,n){var e=_l(t),i=Uh(t),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=TU();(c||!c&&"fixed"===n)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+qO(t),y:l}}(t,e)):xp(n)?function JIe(t,n){var e=Hm(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):JO(function WIe(t){var n,e=Uh(t),i=WO(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=Cp(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Cp(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+qO(t),l=-i.scrollTop;return"rtl"===Gd(r||e).direction&&(a+=Cp(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Uh(t)))}function Um(t){return t.split("-")[1]}function KO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function OU(t){var l,n=t.reference,e=t.element,i=t.placement,r=i?Fu(i):null,o=i?Um(i):null,s=n.x+n.width/2-e.width/2,a=n.y+n.height/2-e.height/2;switch(r){case vl:l={x:s,y:n.y-e.height};break;case Nc:l={x:s,y:n.y+n.height};break;case jc:l={x:n.x+n.width,y:a};break;case yl:l={x:n.x-e.width,y:a};break;default:l={x:n.x,y:n.y}}var c=r?KO(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Bm:l[c]=l[c]-(n[u]/2-e[u]/2);break;case gy:l[c]=l[c]+(n[u]/2-e[u]/2)}}return l}function NU(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function jU(t,n){return n.reduce(function(e,i){return e[i]=t,e},{})}function XO(t,n){void 0===n&&(n={});var i=n.placement,r=void 0===i?t.placement:i,o=n.strategy,s=void 0===o?t.strategy:o,a=n.boundary,l=void 0===a?NIe:a,c=n.rootBoundary,u=void 0===c?CU:c,d=n.elementContext,h=void 0===d?my:d,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,v=NU("number"!=typeof m?m:jU(m,py)),b=t.rects.popper,C=t.elements[p?h===my?jIe:my:h],k=function XIe(t,n,e,i){var r="clippingParents"===n?function KIe(t){var n=vy(OC(t)),i=["absolute","fixed"].indexOf(Gd(t).position)>=0&&Yl(t)?yy(t):t;return xp(i)?n.filter(function(r){return xp(r)&&EU(r,i)&&"body"!==$u(r)}):[]}(t):[].concat(n),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=MU(t,c,i);return l.top=Cp(u.top,l.top),l.right=MC(u.right,l.right),l.bottom=MC(u.bottom,l.bottom),l.left=Cp(u.left,l.left),l},MU(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(xp(C)?C:C.contextElement||Uh(t.elements.popper),l,u,s),T=Hm(t.elements.reference),j=OU({reference:T,element:b,strategy:"absolute",placement:r}),B=JO(Object.assign({},b,j)),N=h===my?B:T,$={top:k.top-N.top+v.top,bottom:N.bottom-k.bottom+v.bottom,left:k.left-N.left+v.left,right:N.right-k.right+v.right},V=t.modifiersData.offset;if(h===my&&V){var z=V[r];Object.keys($).forEach(function(Y){var O=[jc,Nc].indexOf(Y)>=0?1:-1,H=[vl,Nc].indexOf(Y)>=0?"y":"x";$[Y]+=z[H]*O})}return $}const tNe={name:"flip",enabled:!0,phase:"main",fn:function eNe(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,f=e.flipVariations,p=void 0===f||f,g=e.allowedAutoPlacements,m=n.options.placement,v=Fu(m),b=l||(v!==m&&p?function ZIe(t){if(Fu(t)===UO)return[];var n=EC(t);return[xU(t),n,xU(n)]}(m):[EC(m)]),C=[m].concat(b).reduce(function(X,ne){return X.concat(Fu(ne)===UO?function QIe(t,n){void 0===n&&(n={});var r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?kU:l,u=Um(n.placement),d=u?a?SU:SU.filter(function(p){return Um(p)===u}):py,h=d.filter(function(p){return c.indexOf(p)>=0});0===h.length&&(h=d);var f=h.reduce(function(p,g){return p[g]=XO(t,{placement:g,boundary:r,rootBoundary:o,padding:s})[Fu(g)],p},{});return Object.keys(f).sort(function(p,g){return f[p]-f[g]})}(n,{placement:ne,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):ne)},[]),k=n.rects.reference,T=n.rects.popper,j=new Map,B=!0,N=C[0],$=0;$=0,H=O?"width":"height",G=XO(n,{placement:V,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),F=O?Y?jc:yl:Y?Nc:vl;k[H]>T[H]&&(F=EC(F));var Z=EC(F),D=[];if(o&&D.push(G[z]<=0),a&&D.push(G[F]<=0,G[Z]<=0),D.every(function(X){return X})){N=V,B=!1;break}j.set(V,D)}if(B)for(var M=function(ne){var ge=C.find(function(ae){var De=j.get(ae);if(De)return De.slice(0,ne).every(function(be){return be})});if(ge)return N=ge,"break"},U=p?3:1;U>0&&"break"!==M(U);U--);n.placement!==N&&(n.modifiersData[i]._skip=!0,n.placement=N,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function _y(t,n,e){return Cp(t,MC(n,e))}function QO(t){var n=Hm(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}const oNe={name:"preventOverflow",enabled:!0,phase:"main",fn:function rNe(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,f=void 0===h||h,p=e.tetherOffset,g=void 0===p?0:p,m=XO(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),v=Fu(n.placement),y=Um(n.placement),b=!y,C=KO(v),k=function nNe(t){return"x"===t?"y":"x"}(C),T=n.modifiersData.popperOffsets,j=n.rects.reference,B=n.rects.popper,N="function"==typeof g?g(Object.assign({},n.rects,{placement:n.placement})):g,$="number"==typeof N?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),V=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,z={x:0,y:0};if(T){if(o){var Y,O="y"===C?vl:yl,H="y"===C?Nc:jc,G="y"===C?"height":"width",F=T[C],Z=F+m[O],D=F-m[H],E=f?-B[G]/2:0,M=y===Bm?j[G]:B[G],U=y===Bm?-B[G]:-j[G],L=n.elements.arrow,X=f&&L?QO(L):{width:0,height:0},ne=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ge=ne[O],ae=ne[H],De=_y(0,j[G],X[G]),be=b?j[G]/2-E-De-ge-$.mainAxis:M-De-ge-$.mainAxis,Ie=b?-j[G]/2+E+De+ae+$.mainAxis:U+De+ae+$.mainAxis,R=n.elements.arrow&&yy(n.elements.arrow),K=null!=(Y=V?.[C])?Y:0,Te=F+Ie-K,ye=_y(f?MC(Z,F+be-K-(R?"y"===C?R.clientTop||0:R.clientLeft||0:0)):Z,F,f?Cp(D,Te):D);T[C]=ye,z[C]=ye-F}if(a){var Ue,zt=T[k],ct="y"===k?"height":"width",Nn=zt+m["x"===C?vl:yl],mt=zt-m["x"===C?Nc:jc],pi=-1!==[vl,yl].indexOf(v),ki=null!=(Ue=V?.[k])?Ue:0,ci=pi?Nn:zt-j[ct]-B[ct]-ki+$.altAxis,yi=pi?zt+j[ct]+B[ct]-ki-$.altAxis:mt,bn=f&&pi?function iNe(t,n,e){var i=_y(t,n,e);return i>e?e:i}(ci,zt,yi):_y(f?ci:Nn,zt,f?yi:mt);T[k]=bn,z[k]=bn-zt}n.modifiersData[i]=z}},requiresIfExists:["offset"]};const cNe={name:"arrow",enabled:!0,phase:"main",fn:function aNe(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Fu(e.placement),l=KO(a),u=[yl,jc].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(n,e){return NU("number"!=typeof(n="function"==typeof n?n(Object.assign({},e.rects,{placement:e.placement})):n)?n:jU(n,py))}(r.padding,e),h=QO(o),f="y"===l?vl:yl,p="y"===l?Nc:jc,g=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],m=s[l]-e.rects.reference[l],v=yy(o),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,T=y/2-h[u]/2+(g/2-m/2),j=_y(d[f],T,y-h[u]-d[p]);e.modifiersData[i]=((n={})[l]=j,n.centerOffset=j-T,n)}},effect:function lNe(t){var n=t.state,i=t.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=n.elements.popper.querySelector(r))||EU(n.elements.popper,r)&&(n.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fNe(t,n,e){void 0===e&&(e=!1);var i=Yl(n),r=Yl(n)&&function hNe(t){var n=t.getBoundingClientRect(),e=Vm(n.width)/t.offsetWidth||1,i=Vm(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),o=Uh(n),s=Hm(t,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==$u(n)||YO(o))&&(a=function dNe(t){return t!==_l(t)&&Yl(t)?function uNe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}(t):WO(t)}(n)),Yl(n)?((l=Hm(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):o&&(l.x=qO(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function pNe(t){var n=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=n.get(a);l&&r(l)}}),i.push(o)}return t.forEach(function(o){n.set(o.name,o)}),t.forEach(function(o){e.has(o.name)||r(o)}),i}function mNe(t){var n;return function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(t())})})),n}}var PU={placement:"bottom",modifiers:[],strategy:"absolute"};function RU(){for(var t=arguments.length,n=new Array(t),e=0;e=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[yl,jc].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,n.rects,o),u},{}),a=s[n.placement],c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=a.x,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}};function jNe(t,n){}function PNe(t,n){if(1&t&&(_(0,"button",3),A(1),q(2,jNe,0,0,"ng-template",4),w()),2&t){const e=n.$implicit;S("ngbPanelToggle",e),x(1),wt(" ",e.title," "),x(1),S("ngTemplateOutlet",null==e.titleTpl?null:e.titleTpl.templateRef)}}function RNe(t,n){}function LNe(t,n){}function FNe(t,n){if(1&t){const e=He();_(0,"div",8),se("ngbRef",function(r){return we(e),xe(P().$implicit.panelDiv=r)}),_(1,"div",9),q(2,LNe,0,0,"ng-template",4),w()()}if(2&t){const e=P().$implicit;Nd("id",e.id),Re("aria-labelledby",e.id+"-header"),x(2),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)}}const $Ne=function(t,n){return{$implicit:t,opened:n}};function BNe(t,n){if(1&t&&(_(0,"div")(1,"div",5),q(2,RNe,0,0,"ng-template",6),w(),q(3,FNe,3,3,"div",7),w()),2&t){const e=n.$implicit,i=P(),r=As(1);Ou("accordion-item "+(e.cardClass||"")),x(1),Ou("accordion-header "+(e.type?"bg-"+e.type:i.type?"bg-"+i.type:"")),sp("id","",e.id,"-header"),x(1),S("ngTemplateOutlet",(null==e.headerTpl?null:e.headerTpl.templateRef)||r)("ngTemplateOutletContext",Ni(8,$Ne,e,e.isOpen)),x(1),S("ngIf",!i.destroyOnHide||e.isOpen||e.transitionRunning)}}function VNe(t,n){if(1&t){const e=He();_(0,"button",1),se("click",function(){return we(e),xe(P().close())}),w()}}const by=["*"];function HNe(t,n){if(1&t){const e=He();_(0,"button",6),se("click",function(){const o=we(e).$implicit,s=P();return s.focus(),xe(s.select(o.id,s.NgbSlideEventSource.INDICATOR))}),w()}if(2&t){const e=n.$implicit,i=P();Ft("active",e.id===i.activeId),Re("aria-labelledby","slide-"+e.id)("aria-controls","slide-"+e.id)("aria-selected",e.id===i.activeId)}}function UNe(t,n){}function zNe(t,n){if(1&t&&(_(0,"div",7)(1,"span",8),Es(2,9),w(),q(3,UNe,0,0,"ng-template",10),w()),2&t){const e=n.$implicit,i=n.index,r=n.count;S("id","slide-"+e.id),x(2),xm(i+1)(r),x1(2),x(1),S("ngTemplateOutlet",e.tplRef)}}function GNe(t,n){if(1&t){const e=He();_(0,"button",11),se("click",function(){return we(e),xe(P().arrowLeft())}),ie(1,"span",12),_(2,"span",8),Es(3,13),w()()}}function WNe(t,n){if(1&t){const e=He();_(0,"button",14),se("click",function(){return we(e),xe(P().arrowRight())}),ie(1,"span",15),_(2,"span",8),Es(3,16),w()()}}const qNe=["ngbDatepickerDayView",""],YNe=["month"],JNe=["year"];function KNe(t,n){if(1&t&&(_(0,"option",5),A(1),w()),2&t){const e=n.$implicit,i=P();S("value",e),Re("aria-label",i.i18n.getMonthFullName(e,i.date.year)),x(1),ze(i.i18n.getMonthShortName(e,i.date.year))}}function XNe(t,n){if(1&t&&(_(0,"option",5),A(1),w()),2&t){const e=n.$implicit,i=P();S("value",e),x(1),ze(i.i18n.getYearNumerals(e))}}function QNe(t,n){if(1&t){const e=He();_(0,"ngb-datepicker-navigation-select",7),se("select",function(r){return we(e),xe(P().select.emit(r))}),w()}if(2&t){const e=P();S("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function ZNe(t,n){1&t&&ie(0,"div",0)}function eje(t,n){1&t&&ie(0,"div",0)}function tje(t,n){if(1&t&&(q(0,ZNe,1,0,"div",9),_(1,"div",10),A(2),w(),q(3,eje,1,0,"div",9)),2&t){const e=n.$implicit,i=n.index,r=P(2);S("ngIf",i>0),x(2),wt(" ",r.i18n.getMonthLabel(e.firstDate)," "),x(1),S("ngIf",i!==r.months.length-1)}}function nje(t,n){1&t&&q(0,tje,4,3,"ng-template",8),2&t&&S("ngForOf",P().months)}function ije(t,n){if(1&t&&(_(0,"div",5),A(1),w()),2&t){const e=P(2);x(1),ze(e.i18n.getWeekLabel())}}function rje(t,n){if(1&t&&(_(0,"div",6),A(1),w()),2&t){const e=n.$implicit;x(1),ze(e)}}function oje(t,n){if(1&t&&(_(0,"div",2),q(1,ije,2,1,"div",3),q(2,rje,2,1,"div",4),w()),2&t){const e=P();x(1),S("ngIf",e.datepicker.showWeekNumbers),x(1),S("ngForOf",e.viewModel.weekdays)}}function sje(t,n){if(1&t&&(_(0,"div",11),A(1),w()),2&t){const e=P(2).$implicit,i=P();x(1),ze(i.i18n.getWeekNumerals(e.number))}}function aje(t,n){}function lje(t,n){if(1&t&&q(0,aje,0,0,"ng-template",14),2&t){const e=P().$implicit;S("ngTemplateOutlet",P(3).datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function cje(t,n){if(1&t){const e=He();_(0,"div",12),se("click",function(r){const s=we(e).$implicit;return P(3).doSelect(s),xe(r.preventDefault())}),q(1,lje,1,2,"ng-template",13),w()}if(2&t){const e=n.$implicit;Ft("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),S("tabindex",e.tabindex),Re("aria-label",e.ariaLabel),x(1),S("ngIf",!e.hidden)}}function uje(t,n){if(1&t&&(_(0,"div",8),q(1,sje,2,1,"div",9),q(2,cje,2,9,"div",10),w()),2&t){const e=P().$implicit,i=P();x(1),S("ngIf",i.datepicker.showWeekNumbers),x(1),S("ngForOf",e.days)}}function dje(t,n){1&t&&q(0,uje,3,2,"div",7),2&t&&S("ngIf",!n.$implicit.collapsed)}const hje=["defaultDayTemplate"],fje=["content"];function pje(t,n){if(1&t&&ie(0,"div",8),2&t){const i=n.currentMonth,r=n.selected,o=n.disabled,s=n.focused;S("date",n.date)("currentMonth",i)("selected",r)("disabled",o)("focused",s)}}function gje(t,n){if(1&t&&(_(0,"div",13),A(1),w()),2&t){const e=P().$implicit,i=P(2);x(1),wt(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function mje(t,n){if(1&t&&(_(0,"div",10),q(1,gje,2,1,"div",11),ie(2,"ngb-datepicker-month",12),w()),2&t){const e=n.$implicit,i=P(2);x(1),S("ngIf","none"===i.navigation||i.displayMonths>1&&"select"===i.navigation),x(1),S("month",e.firstDate)}}function vje(t,n){1&t&&q(0,mje,3,2,"div",9),2&t&&S("ngForOf",P().model.months)}function yje(t,n){if(1&t){const e=He();_(0,"ngb-datepicker-navigation",14),se("navigate",function(r){return we(e),xe(P().onNavigateEvent(r))})("select",function(r){return we(e),xe(P().onNavigateDateSelect(r))}),w()}if(2&t){const e=P();S("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect","select"===e.model.navigation)("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function _je(t,n){}function bje(t,n){}const FU=function(t){return{$implicit:t}},wje=["dialog"],xje=["ngbNavOutlet",""];function Cje(t,n){}function Sje(t,n){if(1&t&&(_(0,"div",2),q(1,Cje,0,0,"ng-template",3),w()),2&t){const e=P().$implicit,i=P();S("item",e)("nav",i.nav)("role",i.paneRole),x(1),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",ui(5,FU,e.active||i.isPanelTransitioning(e)))}}function kje(t,n){if(1&t&&q(0,Sje,2,7,"div",1),2&t){const e=n.$implicit,i=P();S("ngIf",e.isPanelInDom()||i.isPanelTransitioning(e))}}function Tje(t,n){1&t&&(_(0,"span",9),Es(1,10),w())}function Dje(t,n){1&t&&(_(0,"span",9),Es(1,11),w())}function Aje(t,n){1&t&&(_(0,"span",9),Es(1,12),w())}function Eje(t,n){1&t&&(_(0,"span",9),Es(1,13),w())}function Mje(t,n){1&t&&A(0,"...")}function Oje(t,n){1&t&&A(0),2&t&&ze(n.$implicit)}function Ije(t,n){}const Nje=function(t){return{disabled:!0,currentPage:t}};function jje(t,n){if(1&t&&(_(0,"a",18),q(1,Ije,0,0,"ng-template",8),w()),2&t){const e=P(2).$implicit,i=P(),r=As(9);x(1),S("ngTemplateOutlet",(null==i.tplEllipsis?null:i.tplEllipsis.templateRef)||r)("ngTemplateOutletContext",ui(2,Nje,e))}}function Pje(t,n){}const Rje=function(t,n,e){return{disabled:t,$implicit:n,currentPage:e}};function Lje(t,n){if(1&t){const e=He();_(0,"a",19),se("click",function(r){we(e);const o=P().$implicit;return P(2).selectPage(o),xe(r.preventDefault())}),q(1,Pje,0,0,"ng-template",8),w()}if(2&t){const e=P().$implicit,i=P(),r=i.disabled,o=i.$implicit,s=P(),a=As(11);Re("tabindex",r?"-1":null)("aria-disabled",r?"true":null),x(1),S("ngTemplateOutlet",(null==s.tplNumber?null:s.tplNumber.templateRef)||a)("ngTemplateOutletContext",C1(4,Rje,r,e,o))}}function Fje(t,n){if(1&t&&(_(0,"li",15),q(1,jje,2,4,"a",16),q(2,Lje,2,8,"a",17),w()),2&t){const e=n.$implicit,i=P(),r=i.$implicit,o=i.disabled,s=P();Ft("active",e===r)("disabled",s.isEllipsis(e)||o),Re("aria-current",e===r?"page":null),x(1),S("ngIf",s.isEllipsis(e)),x(1),S("ngIf",!s.isEllipsis(e))}}function $je(t,n){1&t&&q(0,Fje,3,7,"li",14),2&t&&S("ngForOf",n.pages)}function Bje(t,n){}const ZO=function(t,n){return{disabled:t,currentPage:n}};function Vje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",20),se("click",function(r){return we(e),P().selectPage(1),xe(r.preventDefault())}),q(2,Bje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(1);Ft("disabled",e.previousDisabled()),x(1),Re("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplFirst?null:e.tplFirst.templateRef)||i)("ngTemplateOutletContext",Ni(6,ZO,e.previousDisabled(),e.page))}}function Hje(t,n){}const Uje=function(t){return{disabled:t}};function zje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",21),se("click",function(r){we(e);const o=P();return o.selectPage(o.page-1),xe(r.preventDefault())}),q(2,Hje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(3);Ft("disabled",e.previousDisabled()),x(1),Re("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplPrevious?null:e.tplPrevious.templateRef)||i)("ngTemplateOutletContext",ui(6,Uje,e.previousDisabled()))}}function Gje(t,n){}function Wje(t,n){}function qje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",22),se("click",function(r){we(e);const o=P();return o.selectPage(o.page+1),xe(r.preventDefault())}),q(2,Wje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(5);Ft("disabled",e.nextDisabled()),x(1),Re("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplNext?null:e.tplNext.templateRef)||i)("ngTemplateOutletContext",Ni(6,ZO,e.nextDisabled(),e.page))}}function Yje(t,n){}function Jje(t,n){if(1&t){const e=He();_(0,"li",15)(1,"a",23),se("click",function(r){we(e);const o=P();return o.selectPage(o.pageCount),xe(r.preventDefault())}),q(2,Yje,0,0,"ng-template",8),w()()}if(2&t){const e=P(),i=As(7);Ft("disabled",e.nextDisabled()),x(1),Re("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),x(1),S("ngTemplateOutlet",(null==e.tplLast?null:e.tplLast.templateRef)||i)("ngTemplateOutletContext",Ni(6,ZO,e.nextDisabled(),e.page))}}const Kje=function(t,n,e){return{$implicit:t,pages:n,disabled:e}};function Zje(t,n){if(1&t&&(_(0,"span"),Es(1,1),aE(2,"percent"),w()),2&t){const e=P();x(2),xm(lE(2,1,e.getValue()/e.max)),x1(1)}}function ePe(t,n){1&t&&A(0),2&t&&ze(100===n.fill?"\u2605":"\u2606")}function tPe(t,n){}function nPe(t,n){if(1&t){const e=He();_(0,"span",2),A(1),w(),_(2,"span",3),se("mouseenter",function(){const o=we(e).index;return xe(P().enter(o+1))})("click",function(){const o=we(e).index;return xe(P().handleClick(o+1))}),q(3,tPe,0,0,"ng-template",4),w()}if(2&t){const e=n.index,i=P(),r=As(1);x(1),wt("(",e=12)("ngIfElse",e)}}function gPe(t,n){if(1&t&&(_(0,"strong",3),A(1),w()),2&t){const e=P();x(1),ze(e.header)}}function mPe(t,n){}function vPe(t,n){if(1&t){const e=He();_(0,"div",4),q(1,mPe,0,0,"ng-template",5),_(2,"button",6),se("click",function(){return we(e),xe(P().hide())}),w()()}if(2&t){const e=P(),i=As(1);x(1),S("ngTemplateOutlet",e.contentHeaderTpl||i)}}function yPe(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P().$implicit;Ou(P().highlightClass),x(1),ze(e)}}function _Pe(t,n){1&t&&A(0),2&t&&ze(P().$implicit)}function bPe(t,n){if(1&t&&(q(0,yPe,2,3,"span",1),q(1,_Pe,1,1,"ng-template",null,2,lo)),2&t){const e=n.odd,i=As(2);S("ngIf",e)("ngIfElse",i)}}function Rs(t){return parseInt(`${t}`,10)}function $U(t){return null!=t?`${t}`:""}function NC(t,n,e=0){return Math.max(Math.min(t,n),e)}function Sp(t){return"string"==typeof t}function uo(t){return!isNaN(Rs(t))}function Qr(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function kp(t){return null!=t}function zm(t){return uo(t)?`0${t}`.slice(-2):""}function VU(t,n){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(n)>=0}function Gm(t){return(t||document.body).getBoundingClientRect()}function HU(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const UU={animation:!0,transitionTimerDelayMs:5},DPe=()=>{},{transitionTimerDelayMs:APe}=UU,wy=new Map,is=(t,n,e,i)=>{let r=i.context||{};const o=wy.get(n);if(o)switch(i.runningTransition){case"continue":return Vd;case"stop":t.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),wy.delete(n)}const s=e(n,i.animation,r)||DPe;if(!i.animation||"none"===window.getComputedStyle(n).transitionProperty)return t.run(()=>s()),$t(void 0).pipe(function kPe(t){return n=>new ar(e=>n.subscribe({next:s=>t.run(()=>e.next(s)),error:s=>t.run(()=>e.error(s)),complete:()=>t.run(()=>e.complete())}))}(t));const a=new hr,l=new hr,c=a.pipe(function bIe(...t){return n=>Rx(n,$t(...t))}(!0));wy.set(n,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function TPe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(n);return t.runOutsideAngular(()=>{const d=Ps(n,"transitionend").pipe(Xr(c),co(({target:f})=>f===n));bU(fy(u+APe).pipe(Xr(c)),d,l).pipe(Xr(c)).subscribe(()=>{wy.delete(n),t.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()},e3=(t,n,e)=>{let{direction:i,maxSize:r,dimension:o}=e;const{classList:s}=t;function a(){s.add("collapse"),"show"===i?s.add("show"):s.remove("show")}if(n)return r||(r=function MPe(t,n){if(typeof navigator>"u")return"0px";const{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[n]="";const r=t.getBoundingClientRect()[n]+"px";return i||e.remove("show"),r}(t,o),e.maxSize=r,t.style[o]="show"!==i?r:"0px",s.remove("collapse"),s.remove("collapsing"),s.remove("show"),Gm(t),s.add("collapsing")),t.style[o]="show"===i?r:"0px",()=>{a(),s.remove("collapsing"),t.style[o]=""};a()};let zh=(()=>{class t{constructor(){this.animation=UU.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),zU=(()=>{class t{constructor(e){this._ngbConfig=e,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),OPe=0,t3=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPanelHeader",""]],standalone:!0}),t})(),GU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPanelTitle",""]],standalone:!0}),t})(),WU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPanelContent",""]],standalone:!0}),t})(),n3=(()=>{class t{constructor(){this.disabled=!1,this.id="ngb-panel-"+OPe++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new Oe,this.hidden=new Oe}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["ngb-panel"]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,GU,4),Cn(r,t3,4),Cn(r,WU,4)),2&e){let o;kt(o=Tt())&&(i.titleTpls=o),kt(o=Tt())&&(i.headerTpls=o),kt(o=Tt())&&(i.contentTpls=o)}},inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},standalone:!0}),t})(),IPe=(()=>{class t{constructor(e){this._El=e,this.ngbRef=new Oe}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbRef",""]],outputs:{ngbRef:"ngbRef"},standalone:!0}),t})(),qU=(()=>{class t{constructor(e,i){this.accordion=e,this.panel=i}set ngbPanelToggle(e){e&&(this.panel=e)}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>r3)),te(n3,9))},t.\u0275dir=pt({type:t,selectors:[["button","ngbPanelToggle",""]],hostAttrs:["type","button"],hostVars:5,hostBindings:function(e,i){1&e&&se("click",function(){return i.accordion.toggle(i.panel.id)}),2&e&&(Fa("disabled",i.panel.disabled),Re("aria-expanded",i.panel.isOpen)("aria-controls",i.panel.id),Ft("collapsed",!i.panel.isOpen))},inputs:{ngbPanelToggle:"ngbPanelToggle"},standalone:!0}),t})(),r3=(()=>{class t{constructor(e,i,r){this._ngZone=i,this._changeDetector=r,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new Oe,this.shown=new Oe,this.hidden=new Oe,this.animation=e.animation,this.type=e.type,this.closeOtherPanels=e.closeOthers}isExpanded(e){return this.activeIds.indexOf(e)>-1}expand(e){this._changeOpenState(this._findPanelById(e),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(e=>this._changeOpenState(e,!0))}collapse(e){this._changeOpenState(this._findPanelById(e),!1)}collapseAll(){this.panels.forEach(e=>{this._changeOpenState(e,!1)})}toggle(e){const i=this._findPanelById(e);i&&this._changeOpenState(i,!i.isOpen)}ngAfterContentChecked(){Sp(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(e=>{e.isOpen=!e.disabled&&this.activeIds.indexOf(e.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe(es(1)).subscribe(()=>{this.panels.forEach(e=>{const i=e.panelDiv;i?e.initClassDone||(e.initClassDone=!0,is(this._ngZone,i,e3,{animation:!1,runningTransition:"continue",context:{direction:e.isOpen?"show":"hide",dimension:"height"}})):e.initClassDone=!1})})}_changeOpenState(e,i){if(null!=e&&!e.disabled&&e.isOpen!==i){let r=!1;this.panelChange.emit({panelId:e.id,nextState:i,preventDefault:()=>{r=!0}}),r||(e.isOpen=i,e.transitionRunning=!0,i&&this.closeOtherPanels&&this._closeOthers(e.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(e,i=!0){this.panels.forEach(r=>{r.id!==e&&r.isOpen&&(r.isOpen=!1,r.transitionRunning=i)})}_findPanelById(e){return this.panels.find(i=>i.id===e)||null}_updateActiveIds(){this.activeIds=this.panels.filter(e=>e.isOpen&&!e.disabled).map(e=>e.id)}_runTransitions(e){this._changeDetector.detectChanges(),this.panels.forEach(i=>{i.transitionRunning&&is(this._ngZone,i.panelDiv,e3,{animation:e,runningTransition:"stop",context:{direction:i.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{i.transitionRunning=!1;const{id:o}=i;i.isOpen?(i.shown.emit(),this.shown.emit(o)):(i.hidden.emit(),this.hidden.emit(o))})})}}return t.\u0275fac=function(e){return new(e||t)(te(zU),te(si),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["ngb-accordion"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,n3,4),2&e){let o;kt(o=Tt())&&(i.panels=o)}},hostAttrs:["role","tablist",1,"accordion"],hostVars:1,hostBindings:function(e,i){2&e&&Re("aria-multiselectable",!i.closeOtherPanels)},inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0,features:[No],decls:3,vars:1,consts:[["ngbPanelHeader",""],["t",""],["ngFor","",3,"ngForOf"],[1,"accordion-button",3,"ngbPanelToggle"],[3,"ngTemplateOutlet"],["role","tab",3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","tabpanel",3,"id","ngbRef",4,"ngIf"],["role","tabpanel",3,"id","ngbRef"],[1,"accordion-body"]],template:function(e,i){1&e&&(q(0,PNe,3,3,"ng-template",0,1,lo),q(2,BNe,4,11,"ng-template",2)),2&e&&(x(2),S("ngForOf",i.panels))},dependencies:[Bt,Ac,qU,IPe,t3,Ct],encapsulation:2}),t})(),XU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[r3]}),t})();const FPe=({classList:t})=>{t.remove("show")};let $Pe=(()=>{class t{constructor(e){this._ngbConfig=e,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),pr=(()=>{class t{constructor(e,i,r,o){this._renderer=i,this._element=r,this._zone=o,this.closed=new Oe,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=is(this._zone,this._element.nativeElement,FPe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(te($Pe),te(hs),te(En),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&Ft("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],standalone:!0,features:[Kt,No],ngContentSelectors:by,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close:Close`,[["type","button","class","btn-close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kh(),Th(0),q(1,VNe,1,0,"button",0)),2&e&&(x(1),S("ngIf",i.dismissible))},dependencies:[Ct],styles:["ngb-alert{display:block}\n"],encapsulation:2,changeDetection:0}),t})(),QU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[pr]}),t})();var Gh=(()=>(function(t){t.START="start",t.END="end"}(Gh||(Gh={})),Gh))();const ZU=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),xy=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},jC=t=>{xy(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},BPe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(ZU(t)?xy(i):(i.add("carousel-item-"+(e===Gh.START?"next":"prev")),Gm(t),i.add("carousel-item-"+e)),()=>{jC(i),i.add("active")}):(xy(i),jC(i),void i.add("active"))},VPe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(ZU(t)?xy(i):i.add("carousel-item-"+e),()=>{jC(i),i.remove("active")}):(xy(i),jC(i),void i.remove("active"))};let HPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),UPe=0,zPe=(()=>{class t{constructor(e){this.tplRef=e,this.id="ngb-slide-"+UPe++,this.slid=new Oe}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbSlide",""]],inputs:{id:"id"},outputs:{slid:"slid"},standalone:!0}),t})(),GPe=(()=>{class t{constructor(e,i,r,o,s){this._platformId=i,this._ngZone=r,this._cd=o,this._container=s,this.NgbSlideEventSource=Dp,this._destroy$=new hr,this._interval$=new Zo(0),this._mouseHover$=new Zo(!1),this._focused$=new Zo(!1),this._pauseOnHover$=new Zo(!1),this._pauseOnFocus$=new Zo(!1),this._pause$=new Zo(!1),this._wrap$=new Zo(!1),this.slide=new Oe,this.slid=new Oe,this._transitionIds=null,this.animation=e.animation,this.interval=e.interval,this.wrap=e.wrap,this.keyboard=e.keyboard,this.pauseOnHover=e.pauseOnHover,this.pauseOnFocus=e.pauseOnFocus,this.showNavigationArrows=e.showNavigationArrows,this.showNavigationIndicators=e.showNavigationIndicators}set interval(e){this._interval$.next(e)}get interval(){return this._interval$.value}set wrap(e){this._wrap$.next(e)}get wrap(){return this._wrap$.value}set pauseOnHover(e){this._pauseOnHover$.next(e)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(e){this._pauseOnFocus$.next(e)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(e){this._mouseHover$.next(e)}get mouseHover(){return this._mouseHover$.value}set focused(e){this._focused$.next(e)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(Dp.ARROW_LEFT)}arrowRight(){this.focus(),this.next(Dp.ARROW_RIGHT)}ngAfterContentInit(){T7(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const e=Px([this.slide.pipe(xn(i=>i.current),Fx(this.activeId)),this._wrap$,this.slides.changes.pipe(Fx(null))]).pipe(xn(([i,r])=>{const o=this.slides.toArray(),s=this._getSlideIdxById(i);return r?o.length>1:si||r&&o||s&&a||!c?0:l),DC(),gl(i=>i>0?fy(i,i):wU),Xr(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(Dp.TIMER)))}),this.slides.changes.pipe(Xr(this._destroy$)).subscribe(()=>{this._transitionIds?.forEach(e=>(t=>{wy.get(t)?.complete()})(this._getSlideElement(e))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe(es(1)).subscribe(()=>{for(const{id:e}of this.slides){const i=this._getSlideElement(e);e===this.activeId?i.classList.add("active"):i.classList.remove("active")}})})}ngAfterContentChecked(){let e=this._getSlideById(this.activeId);this.activeId=e?e.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const e=this._getSlideElement(this.activeId);e&&e.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(e,i){this._cycleToSelected(e,this._getSlideEventDirection(this.activeId,e),i)}prev(e){this._cycleToSelected(this._getPrevSlide(this.activeId),Gh.END,e)}next(e){this._cycleToSelected(this._getNextSlide(this.activeId),Gh.START,e)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(e,i,r){const o=this._transitionIds;if(o&&(o[0]!==e||o[1]!==this.activeId))return;let s=this._getSlideById(e);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,e],this.slide.emit({prev:this.activeId,current:s.id,direction:i,paused:this._pause$.value,source:r});const a={animation:this.animation,runningTransition:"stop",context:{direction:i}},l=[],c=this._getSlideById(this.activeId);if(c){const f=is(this._ngZone,this._getSlideElement(c.id),VPe,a);f.subscribe(()=>{c.slid.emit({isShown:!1,direction:i,source:r})}),l.push(f)}const u=this.activeId;this.activeId=s.id;const d=this._getSlideById(this.activeId),h=is(this._ngZone,this._getSlideElement(s.id),BPe,a);h.subscribe(()=>{d?.slid.emit({isShown:!0,direction:i,source:r})}),l.push(h),AC(...l).pipe(es(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:u,current:s.id,direction:i,paused:this._pause$.value,source:r})})}this._cd.markForCheck()}_getSlideEventDirection(e,i){return this._getSlideIdxById(e)>this._getSlideIdxById(i)?Gh.END:Gh.START}_getSlideById(e){return this.slides.find(i=>i.id===e)||null}_getSlideIdxById(e){const i=this._getSlideById(e);return null!=i?this.slides.toArray().indexOf(i):-1}_getNextSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return r===i.length-1?this.wrap?i[0].id:i[i.length-1].id:i[r+1].id}_getPrevSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return 0===r?this.wrap?i[i.length-1].id:i[0].id:i[r-1].id}_getSlideElement(e){return this._container.nativeElement.querySelector(`#slide-${e}`)}}return t.\u0275fac=function(e){return new(e||t)(te(HPe),te(A1),te(si),te(jo),te(En))},t.\u0275cmp=nt({type:t,selectors:[["ngb-carousel"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,zPe,4),2&e){let o;kt(o=Tt())&&(i.slides=o)}},hostAttrs:["tabIndex","0",1,"carousel","slide"],hostVars:3,hostBindings:function(e,i){1&e&&se("keydown.arrowLeft",function(){return i.keyboard&&i.arrowLeft()})("keydown.arrowRight",function(){return i.keyboard&&i.arrowRight()})("mouseenter",function(){return i.mouseHover=!0})("mouseleave",function(){return i.mouseHover=!1})("focusin",function(){return i.focused=!0})("focusout",function(){return i.focused=!1}),2&e&&(Re("aria-activedescendant","slide-"+i.activeId),oi("display","block"))},inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},exportAs:["ngbCarousel"],standalone:!0,features:[No],decls:6,vars:6,consts:function(){let n,e,i;return n=$localize`:Currently selected slide number read by screen reader@@ngb.carousel.slide-number: Slide ${"\ufffd0\ufffd"}:INTERPOLATION: of ${"\ufffd1\ufffd"}:INTERPOLATION_1: `,e=$localize`:@@ngb.carousel.previous:Previous`,i=$localize`:@@ngb.carousel.next:Next`,[["role","tablist",1,"carousel-indicators"],["type","button","data-bs-target","","role","tab",3,"active","click",4,"ngFor","ngForOf"],[1,"carousel-inner"],["class","carousel-item","role","tabpanel",3,"id",4,"ngFor","ngForOf"],["class","carousel-control-prev","type","button",3,"click",4,"ngIf"],["class","carousel-control-next","type","button",3,"click",4,"ngIf"],["type","button","data-bs-target","","role","tab",3,"click"],["role","tabpanel",1,"carousel-item",3,"id"],[1,"visually-hidden"],n,[3,"ngTemplateOutlet"],["type","button",1,"carousel-control-prev",3,"click"],["aria-hidden","true",1,"carousel-control-prev-icon"],e,["type","button",1,"carousel-control-next",3,"click"],["aria-hidden","true",1,"carousel-control-next-icon"],i]},template:function(e,i){1&e&&(_(0,"div",0),q(1,HNe,1,5,"button",1),w(),_(2,"div",2),q(3,zNe,4,4,"div",3),w(),q(4,GNe,4,0,"button",4),q(5,WNe,4,0,"button",5)),2&e&&(Ft("visually-hidden",!i.showNavigationIndicators),x(1),S("ngForOf",i.slides),x(2),S("ngForOf",i.slides),x(1),S("ngIf",i.showNavigationArrows),x(1),S("ngIf",i.showNavigationArrows))},dependencies:[Bt,Ac,Ct],encapsulation:2,changeDetection:0}),t})();var Dp=(()=>(function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(Dp||(Dp={})),Dp))();let ez=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[GPe]}),t})(),tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();class rs{constructor(n,e,i){this.year=Qr(n)?n:null,this.month=Qr(e)?e:null,this.day=Qr(i)?i:null}static from(n){return n instanceof rs?n:n?new rs(n.year,n.month,n.day):null}equals(n){return null!=n&&this.year===n.year&&this.month===n.month&&this.day===n.day}before(n){return!!n&&(this.year===n.year?this.month===n.month?this.day!==n.day&&this.dayn.day:this.month>n.month:this.year>n.year)}}function Wm(t,n){return!function WPe(t,n){return!t&&!n||!!t&&!!n&&t.equals(n)}(t,n)}function nz(t,n){return!(!t&&!n||t&&n&&t.year===n.year&&t.month===n.month)}function PC(t,n,e){return t&&n&&t.before(n)?n:t&&e&&t.after(e)?e:t||null}function s3(t,n){const{minDate:e,maxDate:i,disabled:r,markDisabled:o}=n;return!(null==t||r||o&&o(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function iz(t){return new rs(t.getFullYear(),t.getMonth()+1,t.getDate())}function RC(t){const n=new Date(t.year,t.month-1,t.day,12);return isNaN(n.getTime())||n.setFullYear(t.year),n}let LC=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function tRe(){return new nRe}()},providedIn:"root"}),t})(),nRe=(()=>{class t extends LC{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",r=1){let o=RC(e),s=!0,a=o.getMonth();switch(i){case"y":o.setFullYear(o.getFullYear()+r);break;case"m":a+=r,o.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":o.setDate(o.getDate()+r),s=!1;break;default:return e}return s&&o.getMonth()!==a&&o.setDate(0),iz(o)}getPrev(e,i="d",r=1){return this.getNext(e,i,-r)}getWeekday(e){let r=RC(e).getDay();return 0===r?7:r}getWeekNumber(e,i){7===i&&(i=0);const s=RC(e[(11-i)%7]);s.setDate(s.getDate()+4-(s.getDay()||7));const a=s.getTime();return s.setMonth(0),s.setDate(1),Math.floor(Math.round((a-s.getTime())/864e5)/7)+1}getToday(){return iz(new Date)}isValid(e){if(!(e&&Qr(e.year)&&Qr(e.month)&&Qr(e.day)&&0!==e.year))return!1;const i=RC(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),Ap=(()=>{class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function iRe(t){return new rRe(t)}(Ve(hl)),i},providedIn:"root"}),t})(),rRe=(()=>{class t extends Ap{constructor(e){super(),this._locale=e,this._monthsShort=BE(e,Lr.Standalone,Wn.Abbreviated),this._monthsFull=BE(e,Lr.Standalone,Wn.Wide)}getWeekdayLabel(e,i){const r=o7(this._locale,Lr.Standalone,void 0===i?Wn.Short:i);return r.map((s,a)=>r[(a+1)%7])[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){return a7(new Date(e.year,e.month-1,e.day),"fullDate",this._locale)}}return t.\u0275fac=function(e){return new(e||t)(Ve(hl))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),a3=(()=>{class t{constructor(e,i){this._calendar=e,this._i18n=i,this._VALIDATORS={dayTemplateData:r=>{if(this._state.dayTemplateData!==r)return{dayTemplateData:r}},displayMonths:r=>{if(Qr(r=Rs(r))&&r>0&&this._state.displayMonths!==r)return{displayMonths:r}},disabled:r=>{if(this._state.disabled!==r)return{disabled:r}},firstDayOfWeek:r=>{if(Qr(r=Rs(r))&&r>=0&&this._state.firstDayOfWeek!==r)return{firstDayOfWeek:r}},focusVisible:r=>{if(this._state.focusVisible!==r&&!this._state.disabled)return{focusVisible:r}},markDisabled:r=>{if(this._state.markDisabled!==r)return{markDisabled:r}},maxDate:r=>{const o=this.toValidDate(r,null);if(Wm(this._state.maxDate,o))return{maxDate:o}},minDate:r=>{const o=this.toValidDate(r,null);if(Wm(this._state.minDate,o))return{minDate:o}},navigation:r=>{if(this._state.navigation!==r)return{navigation:r}},outsideDays:r=>{if(this._state.outsideDays!==r)return{outsideDays:r}},weekdays:r=>{const o=!0===r||!1===r?Wn.Short:r,s=!0!==r&&!1!==r||r;if(this._state.weekdayWidth!==o||this._state.weekdaysVisible!==s)return{weekdayWidth:o,weekdaysVisible:s}}},this._model$=new hr,this._dateSelect$=new hr,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:Wn.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe(co(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(co(e=>null!==e))}set(e){let i=Object.keys(e).map(r=>this._VALIDATORS[r](e[r])).reduce((r,o)=>({...r,...o}),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){const i=this.toValidDate(e,null);null!=i&&!this._state.disabled&&Wm(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){s3(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){const i=this.toValidDate(e,this._calendar.getToday());null!=i&&!this._state.disabled&&(!this._state.firstDate||nz(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){const r=this.toValidDate(e,null);null!=r&&!this._state.disabled&&(Wm(this._state.selectedDate,r)&&this._nextState({selectedDate:r}),i.emitEvent&&s3(r,this._state)&&this._dateSelect$.next(r))}toValidDate(e,i){const r=rs.from(e);return void 0===i&&(i=this._calendar.getToday()),this._calendar.isValid(r)?r:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){const i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){const{months:i,displayMonths:r,selectedDate:o,focusDate:s,focusVisible:a,disabled:l,outsideDays:c}=e;e.months.forEach(u=>{u.weeks.forEach(d=>{d.days.forEach(h=>{s&&(h.context.focused=s.equals(h.date)&&a),h.tabindex=!l&&s&&h.date.equals(s)&&s.month===u.number?0:-1,!0===l&&(h.context.disabled=!0),void 0!==o&&(h.context.selected=null!==o&&o.equals(h.date)),u.number!==h.date.month&&(h.hidden="hidden"===c||"collapsed"===c||r>1&&h.date.after(i[0].firstDate)&&h.date.before(i[r-1].lastDate))})})})}_updateState(e){const i=Object.assign({},this._state,e);let r=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(function qPe(t,n){if(n&&t&&n.before(t))throw new Error(`'maxDate' ${n} should be greater than 'minDate' ${t}`)}(i.minDate,i.maxDate),i.focusDate=PC(i.focusDate,i.minDate,i.maxDate),i.firstDate=PC(i.firstDate,i.minDate,i.maxDate),r=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(r=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=PC(i.focusDate,i.minDate,i.maxDate),r=i.focusDate,0!==i.months.length&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=PC(i.firstDate,i.minDate,i.maxDate),r=i.firstDate),r){const s=function QPe(t,n,e,i,r){const{displayMonths:o,months:s}=e,a=s.splice(0,s.length);return Array.from({length:o},(c,u)=>{const d=Object.assign(t.getNext(n,"m",u),{day:1});if(s[u]=null,!r){const h=a.findIndex(f=>f.firstDate.equals(d));-1!==h&&(s[u]=a.splice(h,1)[0])}return d}).forEach((c,u)=>{null===s[u]&&(s[u]=function ZPe(t,n,e,i,r={}){const{dayTemplateData:o,minDate:s,maxDate:a,firstDayOfWeek:l,markDisabled:c,outsideDays:u,weekdayWidth:d,weekdaysVisible:h}=e,f=t.getToday();r.firstDate=null,r.lastDate=null,r.number=n.month,r.year=n.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],n=function eRe(t,n,e){const i=t.getDaysPerWeek(),r=new rs(n.year,n.month,1),o=t.getWeekday(r)%i;return t.getPrev(r,"d",(i+o-e)%i)}(t,n,l),h||(r.weekdays.length=0);for(let p=0;pv.date),l),g.collapsed="collapsed"===u&&m[0].date.month!==r.number&&m[m.length-1].date.month!==r.number}return r}(t,c,e,i,a.shift()||{}))}),s}(this._calendar,r,i,this._i18n,"dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e);i.months=s,i.firstDate=s[0].firstDate,i.lastDate=s[s.length-1].lastDate,"selectedDate"in e&&!s3(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=r);const a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;"select"===i.navigation?(("minDate"in e||"maxDate"in e||0===i.selectBoxes.years.length||a)&&(i.selectBoxes.years=function JPe(t,n,e){if(!t)return[];const i=n?Math.max(n.year,t.year-500):t.year-10,o=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,s=Array(o);for(let a=0;as===e.month);r=r.slice(o)}if(i&&n.year===i.year){const o=r.findIndex(s=>s===i.month);r=r.slice(0,o+1)}return r}(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},("arrows"===i.navigation||"select"===i.navigation)&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||function XPe(t,n,e){const i=Object.assign(t.getPrev(n,"m"),{day:1});return null!=e&&(i.year===e.year&&i.month(function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(qm||(qm={})),qm))();let oRe=(()=>{class t{constructor(e){this.i18n=e}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}return t.\u0275fac=function(e){return new(e||t)(te(Ap))},t.\u0275cmp=nt({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(e,i){2&e&&Ft("bg-primary",i.selected)("text-white",i.selected)("text-muted",i.isMuted())("outside",i.isMuted())("active",i.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},standalone:!0,features:[No],attrs:qNe,decls:1,vars:1,template:function(e,i){1&e&&A(0),2&e&&ze(i.i18n.getDayNumerals(i.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),sRe=(()=>{class t{constructor(e,i){this.i18n=e,this._renderer=i,this.select=new Oe,this._month=-1,this._year=-1}changeMonth(e){this.select.emit(new rs(this.date.year,Rs(e),1))}changeYear(e){this.select.emit(new rs(Rs(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}return t.\u0275fac=function(e){return new(e||t)(te(Ap),te(hs))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(e,i){if(1&e&&(xr(YNe,7,En),xr(JNe,7,En)),2&e){let r;kt(r=Tt())&&(i.monthSelect=r.first),kt(r=Tt())&&(i.yearSelect=r.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},standalone:!0,features:[No],decls:6,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.select-month:Select month`,e=$localize`:@@ngb.datepicker.select-month:Select month`,i=$localize`:@@ngb.datepicker.select-year:Select year`,r=$localize`:@@ngb.datepicker.select-year:Select year`,[["aria-label",n,"title",e,1,"form-select",3,"disabled","change"],["month",""],[3,"value",4,"ngFor","ngForOf"],["aria-label",i,"title",r,1,"form-select",3,"disabled","change"],["year",""],[3,"value"]]},template:function(e,i){1&e&&(_(0,"select",0,1),se("change",function(o){return i.changeMonth(o.target.value)}),q(2,KNe,2,3,"option",2),w(),_(3,"select",3,4),se("change",function(o){return i.changeYear(o.target.value)}),q(5,XNe,2,2,"option",2),w()),2&e&&(S("disabled",i.disabled),x(2),S("ngForOf",i.months),x(1),S("disabled",i.disabled),x(2),S("ngForOf",i.years))},dependencies:[Bt],styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],encapsulation:2,changeDetection:0}),t})(),aRe=(()=>{class t{constructor(e){this.i18n=e,this.navigation=qm,this.months=[],this.navigate=new Oe,this.select=new Oe}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}return t.\u0275fac=function(e){return new(e||t)(te(Ap))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},standalone:!0,features:[No],decls:8,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.previous-month:Previous month`,e=$localize`:@@ngb.datepicker.previous-month:Previous month`,i=$localize`:@@ngb.datepicker.next-month:Next month`,r=$localize`:@@ngb.datepicker.next-month:Next month`,[[1,"ngb-dp-arrow"],["type","button","aria-label",n,"title",e,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["type","button","aria-label",i,"title",r,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"button",1),se("click",function(o){return i.onClickPrev(o)}),ie(2,"span",2),w()(),q(3,QNe,1,4,"ngb-datepicker-navigation-select",3),q(4,nje,1,1,null,4),_(5,"div",5)(6,"button",6),se("click",function(o){return i.onClickNext(o)}),ie(7,"span",2),w()()),2&e&&(x(1),S("disabled",i.prevDisabled),x(2),S("ngIf",i.showSelect),x(1),S("ngIf",!i.showSelect),x(2),S("disabled",i.nextDisabled))},dependencies:[Ct,Bt,sRe],styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],encapsulation:2,changeDetection:0}),t})();var ji=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(ji||(ji={})),ji))();let lRe=(()=>{class t{processKey(e,i){const{state:r,calendar:o}=i;switch(e.which){case ji.PageUp:i.focusDate(o.getPrev(r.focusedDate,e.shiftKey?"y":"m",1));break;case ji.PageDown:i.focusDate(o.getNext(r.focusedDate,e.shiftKey?"y":"m",1));break;case ji.End:i.focusDate(e.shiftKey?r.maxDate:r.lastDate);break;case ji.Home:i.focusDate(e.shiftKey?r.minDate:r.firstDate);break;case ji.ArrowLeft:i.focusDate(o.getPrev(r.focusedDate,"d",1));break;case ji.ArrowUp:i.focusDate(o.getPrev(r.focusedDate,"d",o.getDaysPerWeek()));break;case ji.ArrowRight:i.focusDate(o.getNext(r.focusedDate,"d",1));break;case ji.ArrowDown:i.focusDate(o.getNext(r.focusedDate,"d",o.getDaysPerWeek()));break;case ji.Enter:case ji.Space:i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),l3=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=Wn.Short}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),c3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function cRe(){return new uRe}()},providedIn:"root"}),t})(),uRe=(()=>{class t extends c3{fromModel(e){return e&&Qr(e.year)&&Qr(e.month)&&Qr(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&Qr(e.year)&&Qr(e.month)&&Qr(e.day)?{year:e.year,month:e.month,day:e.day}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),rz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbDatepickerContent",""]],standalone:!0}),t})(),u3=(()=>{class t{constructor(e,i,r,o){this.i18n=e,this.datepicker=i,this._keyboardService=r,this._service=o}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){!e.context.disabled&&!e.hidden&&this.datepicker.onDateSelect(e.date)}}return t.\u0275fac=function(e){return new(e||t)(te(Ap),te(Fn(()=>FC)),te(lRe),te(a3))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(e,i){1&e&&se("keydown",function(o){return i.onKeyDown(o)})},inputs:{month:"month"},standalone:!0,features:[No],decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek small",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(q(0,oje,3,2,"div",0),q(1,dje,1,1,"ng-template",1)),2&e&&(S("ngIf",i.viewModel.weekdays.length>0),x(1),S("ngForOf",i.viewModel.weeks))},dependencies:[Ct,Bt,Ac],styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],encapsulation:2}),t})(),FC=(()=>{class t{constructor(e,i,r,o,s,a,l,c){this._service=e,this._calendar=i,this._i18n=r,this._elementRef=a,this._ngbDateAdapter=l,this._ngZone=c,this.injector=$n(fs),this._controlValue=null,this._destroyed$=new hr,this._publicState={},this.navigate=new Oe,this.dateSelect=new Oe,this.onChange=u=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(u=>this[u]=o[u]),e.dateSelect$.pipe(Xr(this._destroyed$)).subscribe(u=>{this.dateSelect.emit(u)}),e.model$.pipe(Xr(this._destroyed$)).subscribe(u=>{const d=u.firstDate,h=this.model?this.model.firstDate:null;this._publicState={maxDate:u.maxDate,minDate:u.minDate,firstDate:u.firstDate,lastDate:u.lastDate,focusedDate:u.focusDate,months:u.months.map(v=>v.firstDate)};let f=!1;if(!d.equals(h)&&(this.navigate.emit({current:h?{year:h.year,month:h.month}:null,next:{year:d.year,month:d.month},preventDefault:()=>f=!0}),f&&null!==h))return void this._service.open(h);const p=u.selectedDate,g=u.focusDate,m=this.model?this.model.focusDate:null;this.model=u,Wm(p,this._controlValue)&&(this._controlValue=p,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(p))),Wm(g,m)&&m&&u.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(e){this._service.focus(rs.from(e))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(es(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()})}navigateTo(e){this._service.open(rs.from(e?e.day?e:{...e,day:1}:null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const e=Ps(this._contentEl.nativeElement,"focusin"),i=Ps(this._contentEl.nativeElement,"focusout"),{nativeElement:r}=this._elementRef;hD(e,i).pipe(co(({target:o,relatedTarget:s})=>!(VU(o,"ngb-dp-day")&&VU(s,"ngb-dp-day")&&r.contains(o)&&r.contains(s))),Xr(this._destroyed$)).subscribe(({type:o})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===o})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(i=>e[i]=this[i]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(e){const i={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(r=>r in e).forEach(r=>i[r]=this[r]),this._service.set(i),"startDate"in e){const{currentValue:r,previousValue:o}=e.startDate;nz(o,r)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case qm.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case qm.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=rs.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}}return t.\u0275fac=function(e){return new(e||t)(te(a3),te(LC),te(Ap),te(l3),te(jo),te(En),te(c3),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-datepicker"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,rz,7),2&e){let o;kt(o=Tt())&&(i.contentTemplateFromContent=o.first)}},viewQuery:function(e,i){if(1&e&&(xr(hje,7),xr(fje,7)),2&e){let r;kt(r=Tt())&&(i._defaultDayTemplate=r.first),kt(r=Tt())&&(i._contentEl=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("disabled",i.model.disabled)},inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},exportAs:["ngbDatepicker"],standalone:!0,features:[Qi([{provide:Ha,useExisting:Fn(()=>t),multi:!0},a3]),Kt,No],decls:10,vars:9,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(e,i){if(1&e&&(q(0,pje,1,5,"ng-template",null,0,lo),q(2,vje,1,1,"ng-template",null,1,lo),_(4,"div",2),q(5,yje,1,7,"ngb-datepicker-navigation",3),w(),_(6,"div",4,5),q(8,_je,0,0,"ng-template",6),w(),q(9,bje,0,0,"ng-template",7)),2&e){const r=As(3);x(5),S("ngIf","none"!==i.navigation),x(1),Ft("ngb-dp-months",!i.contentTemplate),x(2),S("ngTemplateOutlet",i.contentTemplate||(null==i.contentTemplateFromContent?null:i.contentTemplateFromContent.templateRef)||r)("ngTemplateOutletContext",ui(7,FU,i))("ngTemplateOutletInjector",i.injector),x(1),S("ngTemplateOutlet",i.footerTemplate)}},dependencies:[Ct,Bt,Ac,oRe,u3,aRe],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],encapsulation:2,changeDetection:0}),t})();const $C=(t,n)=>!!n&&n.some(e=>e.contains(t)),oz=(t,n)=>!n||null!=function SPe(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),dRe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),hRe=t=>dRe?()=>setTimeout(()=>t(),100):t;function d3(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(hRe(()=>{const c=Ps(n,"keydown").pipe(Xr(r),co(h=>h.which===ji.Escape),xo(h=>h.preventDefault())),u=Ps(n,"mousedown").pipe(xn(h=>{const f=h.target;return 2!==h.button&&!$C(f,s)&&("inside"===e?$C(f,o)&&oz(f,a):"outside"===e?!$C(f,o):oz(f,a)||!$C(f,o))}),Xr(r)),d=Ps(n,"mouseup").pipe(BO(u),co(([h,f])=>f),VO(0),Xr(r));bU([c.pipe(xn(h=>0)),d.pipe(xn(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const sz=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function az(t){const n=Array.from(t.querySelectorAll(sz)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}let fRe=(()=>{class t{constructor(e){this._element=e.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const pRe=/\s+/,gRe=/ +/gi,mRe={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},yRe=/^left/,_Re=/^right/,bRe=/^start/,wRe=/^end/;function cz({placement:t,baseClass:n},e){let i=Array.isArray(t)?t:t.split(pRe),o=i.findIndex(c=>"auto"===c);o>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(c){null==i.find(u=>-1!==u.search("^"+c))&&i.splice(o++,1,c)});const s=i.map(c=>function vRe(t,n){const[e,i]=mRe[t];return n&&i||e}(c,e.isRTL()));return{placement:s.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!n,phase:"write",fn({state:c}){const u=new RegExp(n+"(-[a-z]+)*","gi"),d=c.elements.popper,h=c.placement;let f=d.className;f=f.replace(u,""),f+=` ${function xRe(t,n){let[e,i]=n.split("-");const r=e.replace(yRe,"start").replace(_Re,"end");let o=[r];if(i){let s=i;("left"===e||"right"===e)&&(s=s.replace(bRe,"top").replace(wRe,"bottom")),o.push(`${r}-${s}`)}return t&&(o=o.map(s=>`${t}-${s}`)),o.join(" ")}(n,h)}`,f=f.trim().replace(gRe," "),d.className=f}},tNe,oNe,cNe,{enabled:!0,name:"flip",options:{fallbackPlacements:s}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function uz(t){return t}function h3(){const t=$n(fRe);let n=null;return{createPopper(e){if(!n){let r=(e.updatePopperOptions||uz)(cz(e,t));n=MNe(e.hostElement,e.targetElement,r)}},update(){n&&n.update()},setOptions(e){if(n){let r=(e.updatePopperOptions||uz)(cz(e,t));n.setOptions(r)}},destroy(){n&&(n.destroy(),n=null)}}}new Date(1882,10,12),new Date(2174,10,25);let _z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[FC,u3]}),t})(),NRe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Wh=(()=>{class t{constructor(e,i){this.elementRef=e,this._renderer=i,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(e,i){2&e&&(Fa("tabIndex",i.disabled?-1:0),Ft("disabled",i.disabled))},inputs:{disabled:"disabled"},standalone:!0}),t})(),qh=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Rc)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&Cn(r,Wh,4),2&e){let o;kt(o=Tt())&&(i.menuItems=o)}},hostVars:4,hostBindings:function(e,i){1&e&&se("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&Ft("dropdown-menu",!0)("show",i.dropdown.isOpen())},standalone:!0}),t})(),UC=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Rc)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&Re("aria-expanded",i.dropdown.isOpen())},standalone:!0}),t})(),Op=(()=>{class t extends UC{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Rc)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&se("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&Re("aria-expanded",i.dropdown.isOpen())},standalone:!0,features:[Qi([{provide:UC,useExisting:Fn(()=>t)}]),yn]}),t})(),Rc=(()=>{class t{constructor(e,i,r,o,s,a){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._destroyCloseHandlers$=new hr,this._bodyContainer=null,this._open=!1,this.openChange=new Oe,this.placement=i.placement,this.popperOptions=i.popperOptions,this.container=i.container,this.autoClose=i.autoClose,this._positioning=h3(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe(es(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),e.dropdownClass){const{currentValue:i,previousValue:r}=e.dropdownClass;this._applyCustomDropdownClass(i,r)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:e=>this.popperOptions(function hz(t){return n=>(n.modifiers.push(NNe,{name:"offset",options:{offset:()=>t}}),n)}([0,2])(e))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),d3(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==ji.Space&&i!==ji.Enter){if(i!==ji.Tab){if(a||s){if(this.open(),r.length){switch(i){case ji.ArrowDown:o=Math.min(o+1,r.length-1);break;case ji.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case ji.Home:o=0;break;case ji.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(sz);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Ps(e.target,"focusout").pipe(es(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Ps(s,"click").pipe(es(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;this._menu&&e.appendChild(this._elementRef.nativeElement,this._menu.nativeElement),this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1055"),i.appendChild(o,r),i.appendChild(this._document.body,o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,i){const r="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;r&&(i&&this._renderer.removeClass(r,i),e&&this._renderer.addClass(r,e))}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown");const{nativeElement:s}=i;"static"===this.display?(i.placement=null,r.setAttribute(s,"data-bs-popper","static")):(i.placement=e,r.removeAttribute(s,"data-bs-popper"));const a=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,a);const l=this._bodyContainer;l&&(r.removeClass(l,"dropup"),r.removeClass(l,"dropdown"),r.addClass(l,a))}}}return t.\u0275fac=function(e){return new(e||t)(te(jo),te(NRe),te(lr),te(si),te(En),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,qh,5),Cn(r,UC,5)),2&e){let o;kt(o=Tt())&&(i._menu=o.first),kt(o=Tt())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("show",i.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],standalone:!0,features:[Kt]}),t})(),bz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();class Ip{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class jRe{constructor(n,e,i,r,o,s){this._componentType=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:r}=this._windowRef.location,o=this._ngZone.onStable.pipe(es(1),_o(()=>is(this._ngZone,r,({classList:s})=>s.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:o}}close(n=!1){return this._windowRef?is(this._ngZone,this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(xo(()=>{this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),this._contentRef?.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):$t(void 0)}_getContentRef(n,e){if(n){if(n instanceof ir){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new Ip([i.rootNodes],i)}return new Ip([[this._renderer.createText(`${n}`)]])}return new Ip([])}}let PRe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(es(1)).subscribe(()=>{is(this._zone,this._el.nativeElement,(e,i)=>{i&&Gm(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return is(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(e,i){2&e&&(Ou("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),Ft("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[No],decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class wz{update(n){}close(n){}dismiss(n){}}const RRe=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],LRe=["animation","backdropClass"];class FRe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new hr,this._dismissed=new hr,this._hidden=new hr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}_applyWindowOptions(n,e){RRe.forEach(i=>{kp(e[i])&&(n[i]=e[i])})}_applyBackdropOptions(n,e){LRe.forEach(i=>{kp(e[i])&&(n[i]=e[i])})}update(n){this._applyWindowOptions(this._windowCmptRef.instance,n),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,n)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Xr(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Xr(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();!function BU(t){return t&&t.then}(e)?!1!==e&&this._dismiss(n):e.then(i=>{!1!==i&&this._dismiss(n)},()=>{})}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():$t(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),AC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var ky=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(ky||(ky={})),ky))();let $Re=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new hr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Oe,this.shown=new hr,this.hidden=new hr}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":Sp(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(es(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=AC(is(this._zone,e,()=>e.classList.remove("show"),i),is(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const e={animation:this.animation,runningTransition:"continue"};AC(is(this._zone,this._elRef.nativeElement,(o,s)=>{s&&Gm(o),o.classList.add("show")},e),is(this._zone,this._dialogEl.nativeElement,()=>{},e)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Ps(e,"keydown").pipe(Xr(this._closed$),co(r=>r.which===ji.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(ky.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Ps(this._dialogEl.nativeElement,"mousedown").pipe(Xr(this._closed$),xo(()=>i=!1),gl(()=>Ps(e,"mouseup").pipe(Xr(this._closed$),es(1))),co(({target:r})=>e===r)).subscribe(()=>{i=!0}),Ps(e,"click").pipe(Xr(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(ky.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=az(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&is(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(te(lr),te(En),te(si))},t.\u0275cmp=nt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&xr(wje,7),2&e){let r;kt(r=Tt())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(Re("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Ou("modal d-block"+(i.windowClass?" "+i.windowClass:"")),Ft("fade",i.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[No],ngContentSelectors:by,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(kh(),_(0,"div",0,1)(2,"div",2),Th(3),w()()),2&e&&Ou("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+i.fullscreenClass+(i.scrollable?" modal-dialog-scrollable":"")+(i.modalDialogClass?" "+i.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:2}),t})(),BRe=(()=>{class t{constructor(e){this._document=e}hide(){const e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:o,paddingRight:s}=r;if(e>0){const a=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${a+e}px`}return r.overflow="hidden",()=>{e>0&&(r.paddingRight=s),r.overflow=o}}}return t.\u0275fac=function(e){return new(e||t)(Ve(lr))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),VRe=(()=>{class t{constructor(e,i,r,o,s,a,l){this._applicationRef=e,this._injector=i,this._environmentInjector=r,this._document=o,this._scrollBar=s,this._rendererFactory=a,this._ngZone=l,this._activeWindowCmptHasChanged=new hr,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new Oe,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const c=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Ps(n,"focusin").pipe(Xr(e),xn(o=>o.target));Ps(n,"keydown").pipe(Xr(e),co(o=>o.which===ji.Tab),BO(r)).subscribe(([o,s])=>{const[a,l]=az(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Ps(n,"click").pipe(Xr(e),BO(r),xn(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,c.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(c.location.nativeElement)}})}_restoreScrollBar(){const e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,r){const o=r.container instanceof HTMLElement?r.container:kp(r.container)?this._document.querySelector(r.container):this._document.body,s=this._rendererFactory.createRenderer(null,null);if(!o)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const a=new wz,l=(e=r.injector||e).get(Vl,null)||this._environmentInjector,c=this._getContentRef(e,l,i,a,r);let u=!1!==r.backdrop?this._attachBackdrop(o):void 0,d=this._attachWindowComponent(o,c.nodes),h=new FRe(d,c,u,r.beforeDismiss);return this._registerModalRef(h),this._registerWindowCmpt(d),h.hidden.pipe(es(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=f=>{h.close(f)},a.dismiss=f=>{h.dismiss(f)},a.update=f=>{h.update(f)},h.update(r),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&u.changeDetectorRef.detectChanges(),d.changeDetectorRef.detectChanges(),h}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let i=PE(PRe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let r=PE($Re,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_getContentRef(e,i,r,o,s){return r?r instanceof ir?this._createFromTemplateRef(r,o):Sp(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new Ip([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new Ip([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new Ip([[i]])}_createFromComponent(e,i,r,o,s){const l=PE(r,{environmentInjector:i,elementInjector:fs.create({providers:[{provide:wz,useValue:o}],parent:e})}),c=l.location.nativeElement;return s.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new Ip([[c]],l.hostView,l)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(Ve(Pd),Ve(fs),Ve(Vl),Ve(lr),Ve(BRe),Ve(om),Ve(si))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),HRe=(()=>{class t{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),zC=(()=>{class t{constructor(e,i,r){this._injector=e,this._modalStack=i,this._config=r}open(e,i={}){const r={...this._config,animation:this._config.animation,...i};return this._modalStack.open(this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(Ve(fs),Ve(VRe),Ve(HRe))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),xz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[zC]}),t})(),URe=(()=>{class t{constructor(e){this._ngbConfig=e,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Cz=t=>kp(t)&&""!==t;let zRe=0,Sz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbNavContent",""]],standalone:!0}),t})(),Wd=(()=>{class t{constructor(e,i){this._nav=e,this.elementRef=i,this.disabled=!1,this.shown=new Oe,this.hidden=new Oe}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){kp(this.domId)||(this.domId="ngb-nav-"+zRe++)}get active(){return this._nav.activeId===this.id}get id(){return Cz(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(kp(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(te(Fn(()=>Bu)),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&Cn(r,Sz,4),2&e){let o;kt(o=Tt())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("nav-item",!0)},inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"],standalone:!0}),t})(),Bu=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new Oe,this.shown=new Oe,this.hidden=new Oe,this.destroy$=new hr,this.navItemChange$=new hr,this.navChange=new Oe,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case ji.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case ji.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case ji.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case ji.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case ji.Home:s=0;break;case ji.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!kp(this.activeId)){const e=this.items.first?this.items.first.id:null;Cz(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(Xr(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Sh("role"),te(URe),te(jo),te(lr))},t.\u0275dir=pt({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,Wd,4),Cn(r,Yh,5)),2&e){let o;kt(o=Tt())&&(i.items=o),kt(o=Tt())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&se("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(Re("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),Ft("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],standalone:!0,features:[Kt]}),t})(),Yh=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Sh("role"),te(Wd),te(Bu),te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbNavLink",""]],hostVars:14,hostBindings:function(e,i){2&e&&(Fa("id",i.navItem.domId),Re("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),Ft("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))},standalone:!0}),t})(),Ty=(()=>{class t{constructor(e,i){this.navItem=e,this.nav=i}}return t.\u0275fac=function(e){return new(e||t)(te(Wd),te(Bu))},t.\u0275dir=pt({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostBindings:function(e,i){1&e&&se("click",function(o){return i.nav.click(i.navItem),o.preventDefault()})},standalone:!0,features:[f1([Yh])]}),t})();const qRe=({classList:t})=>(t.remove("show"),()=>t.remove("active")),YRe=(t,n)=>{n&&Gm(t),t.classList.add("show")};let m3=(()=>{class t{constructor(e){this.elRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275dir=pt({type:t,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(e,i){2&e&&(Fa("id",i.item.panelDomId),Re("role",i.role?i.role:i.nav.roles?"tabpanel":void 0)("aria-labelledby",i.item.domId),Ft("fade",i.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"},standalone:!0}),t})(),kz=(()=>{class t{constructor(e,i){this._cd=e,this._ngZone=i,this._activePane=null}isPanelTransitioning(e){return this._activePane?.item===e}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(Xr(this.nav.destroy$),Fx(this._activePane?.item||null),DC(),function AIe(t){return n=>n.lift(new EIe(t))}(1)).subscribe(e=>{const i={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?is(this._ngZone,this._activePane.elRef.nativeElement,qRe,i).subscribe(()=>{const r=this._activePane?.item;this._activePane=this._getPaneForItem(e),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),is(this._ngZone,this._activePane.elRef.nativeElement,YRe,i).subscribe(()=>{e&&(e.shown.emit(),this.nav.shown.emit(e.id))})),r&&(r.hidden.emit(),this.nav.hidden.emit(r.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.elRef.nativeElement.classList.add("show"),this._activePane?.elRef.nativeElement.classList.add("active")}_getPaneForItem(e){return this._panes&&this._panes.find(i=>i.item===e)||null}_getActivePane(){return this._panes&&this._panes.find(e=>e.item.active)||null}}return t.\u0275fac=function(e){return new(e||t)(te(jo),te(si))},t.\u0275cmp=nt({type:t,selectors:[["","ngbNavOutlet",""]],viewQuery:function(e,i){if(1&e&&xr(m3,5),2&e){let r;kt(r=Tt())&&(i._panes=r)}},hostVars:2,hostBindings:function(e,i){2&e&&Ft("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},standalone:!0,features:[No],attrs:xje,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["ngbNavPane","",3,"item","nav","role",4,"ngIf"],["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&q(0,kje,1,1,"ng-template",0),2&e&&S("ngForOf",i.nav.items)},dependencies:[m3,Bt,Ct,Ac],encapsulation:2,changeDetection:0}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[kz]}),t})(),JRe=(()=>{class t{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Dz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationEllipsis",""]],standalone:!0}),t})(),Az=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationFirst",""]],standalone:!0}),t})(),Ez=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationLast",""]],standalone:!0}),t})(),Mz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationNext",""]],standalone:!0}),t})(),Oz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationNumber",""]],standalone:!0}),t})(),Iz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationPrevious",""]],standalone:!0}),t})(),Nz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["ng-template","ngbPaginationPages",""]],standalone:!0}),t})(),jz=(()=>{class t{constructor(e){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new Oe(!0),this.disabled=e.disabled,this.boundaryLinks=e.boundaryLinks,this.directionLinks=e.directionLinks,this.ellipses=e.ellipses,this.maxSize=e.maxSize,this.pageSize=e.pageSize,this.rotate=e.rotate,this.size=e.size}hasPrevious(){return this.page>1}hasNext(){return this.page0&&(e>2?this.pages.unshift(-1):2===e&&this.pages.unshift(2),this.pages.unshift(1)),i0&&this.pageCount>this.maxSize){let i=0,r=this.pageCount;[i,r]=this.rotate?this._applyRotation():this._applyPagination(),this.pages=this.pages.slice(i,r),this._applyEllipses(i,r)}}}return t.\u0275fac=function(e){return new(e||t)(te(JRe))},t.\u0275cmp=nt({type:t,selectors:[["ngb-pagination"]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,Dz,5),Cn(r,Az,5),Cn(r,Ez,5),Cn(r,Mz,5),Cn(r,Oz,5),Cn(r,Iz,5),Cn(r,Nz,5)),2&e){let o;kt(o=Tt())&&(i.tplEllipsis=o.first),kt(o=Tt())&&(i.tplFirst=o.first),kt(o=Tt())&&(i.tplLast=o.first),kt(o=Tt())&&(i.tplNext=o.first),kt(o=Tt())&&(i.tplNumber=o.first),kt(o=Tt())&&(i.tplPrevious=o.first),kt(o=Tt())&&(i.tplPages=o.first)}},hostAttrs:["role","navigation"],inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},standalone:!0,features:[Kt,No],decls:20,vars:12,consts:function(){let n,e,i,r,o,s,a,l;return n=$localize`:@@ngb.pagination.first:««`,e=$localize`:@@ngb.pagination.previous:«`,i=$localize`:@@ngb.pagination.next:»`,r=$localize`:@@ngb.pagination.last:»»`,o=$localize`:@@ngb.pagination.first-aria:First`,s=$localize`:@@ngb.pagination.previous-aria:Previous`,a=$localize`:@@ngb.pagination.next-aria:Next`,l=$localize`:@@ngb.pagination.last-aria:Last`,[["first",""],["previous",""],["next",""],["last",""],["ellipsis",""],["defaultNumber",""],["defaultPages",""],["class","page-item",3,"disabled",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true"],n,e,i,r,["class","page-item",3,"active","disabled",4,"ngFor","ngForOf"],[1,"page-item"],["class","page-link","tabindex","-1","aria-disabled","true",4,"ngIf"],["class","page-link","href","",3,"click",4,"ngIf"],["tabindex","-1","aria-disabled","true",1,"page-link"],["href","",1,"page-link",3,"click"],["aria-label",o,"href","",1,"page-link",3,"click"],["aria-label",s,"href","",1,"page-link",3,"click"],["aria-label",a,"href","",1,"page-link",3,"click"],["aria-label",l,"href","",1,"page-link",3,"click"]]},template:function(e,i){if(1&e&&(q(0,Tje,2,0,"ng-template",null,0,lo),q(2,Dje,2,0,"ng-template",null,1,lo),q(4,Aje,2,0,"ng-template",null,2,lo),q(6,Eje,2,0,"ng-template",null,3,lo),q(8,Mje,1,0,"ng-template",null,4,lo),q(10,Oje,1,1,"ng-template",null,5,lo),q(12,$je,1,1,"ng-template",null,6,lo),_(14,"ul"),q(15,Vje,3,9,"li",7),q(16,zje,3,8,"li",7),q(17,Gje,0,0,"ng-template",8),q(18,qje,3,9,"li",7),q(19,Jje,3,9,"li",7),w()),2&e){const r=As(13);x(14),Ou("pagination"+(i.size?" pagination-"+i.size:"")),x(1),S("ngIf",i.boundaryLinks),x(1),S("ngIf",i.directionLinks),x(1),S("ngTemplateOutlet",(null==i.tplPages?null:i.tplPages.templateRef)||r)("ngTemplateOutletContext",C1(8,Kje,i.page,i.pages,i.disabled)),x(1),S("ngIf",i.directionLinks),x(1),S("ngIf",i.boundaryLinks)}},dependencies:[Ct,Bt,Ac],encapsulation:2,changeDetection:0}),t})(),Pz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[jz]}),t})();class KRe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const XRe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},Rz=t=>t>0?VO(t):n=>n;let Lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})(),nLe=(()=>{class t{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),iLe=(()=>{class t{constructor(e){this.value=0,this.max=e.max,this.animated=e.animated,this.ariaLabel=e.ariaLabel,this.striped=e.striped,this.textType=e.textType,this.type=e.type,this.showValue=e.showValue,this.height=e.height}set max(e){this._max=!uo(e)||e<=0?100:e}get max(){return this._max}getValue(){return NC(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}return t.\u0275fac=function(e){return new(e||t)(te(nLe))},t.\u0275cmp=nt({type:t,selectors:[["ngb-progressbar"]],hostAttrs:["role","progressbar","aria-valuemin","0",1,"progress"],hostVars:5,hostBindings:function(e,i){2&e&&(Re("aria-valuenow",i.getValue())("aria-valuemax",i.max)("aria-label",i.ariaLabel),oi("height",i.height))},inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},standalone:!0,features:[No],ngContentSelectors:by,decls:3,vars:11,consts:function(){let n;return n=$localize`:@@ngb.progressbar.value:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[4,"ngIf"],n]},template:function(e,i){1&e&&(kh(),_(0,"div"),q(1,Zje,3,3,"span",0),Th(2),w()),2&e&&(function Z6(t,n,e,i,r){kc(al,Iu,hm(st(),t,n,e,i,r),!0)}("progress-bar",i.type?i.textType?" bg-"+i.type:" text-bg-"+i.type:"","",i.textType?" text-"+i.textType:"",""),oi("width",i.getPercentValue(),"%"),Ft("progress-bar-animated",i.animated)("progress-bar-striped",i.striped),x(1),S("ngIf",i.showValue))},dependencies:[Ct,S7],encapsulation:2,changeDetection:0}),t})(),Fz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[iLe]}),t})(),rLe=(()=>{class t{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),oLe=(()=>{class t{constructor(e,i){this._changeDetectorRef=i,this.contexts=[],this.disabled=!1,this.hover=new Oe,this.leave=new Oe,this.rateChange=new Oe(!0),this.onChange=r=>{},this.onTouched=()=>{},this.max=e.max,this.readonly=e.readonly,this.tabindex=e.tabindex}ariaValueText(e,i){return`${e} out of ${i}`}isInteractive(){return!this.readonly&&!this.disabled}enter(e){this.isInteractive()&&this._updateState(e),this.hover.emit(e)}handleBlur(){this.onTouched()}handleClick(e){this.isInteractive()&&this.update(this.resettable&&this.rate===e?0:e)}handleKeyDown(e){switch(e.which){case ji.ArrowDown:case ji.ArrowLeft:this.update(this.rate-1);break;case ji.ArrowUp:case ji.ArrowRight:this.update(this.rate+1);break;case ji.Home:this.update(0);break;case ji.End:this.update(this.max);break;default:return}e.preventDefault()}ngOnChanges(e){e.rate&&this.update(this.rate),e.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(e){this.disabled=e}update(e,i=!0){const r=NC(e,this.max,0);this.isInteractive()&&this.rate!==r&&(this.rate=r,this.rateChange.emit(this.rate)),i&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(e){this.update(e,!1),this._changeDetectorRef.markForCheck()}_updateState(e){this.nextRate=e,this.contexts.forEach((i,r)=>i.fill=Math.round(100*NC(e-r,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(e,i)=>({fill:0,index:i}))}}return t.\u0275fac=function(e){return new(e||t)(te(rLe),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["ngb-rating"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,ir,5),2&e){let o;kt(o=Tt())&&(i.starTemplateFromContent=o.first)}},hostAttrs:["role","slider","aria-valuemin","0",1,"d-inline-flex"],hostVars:5,hostBindings:function(e,i){1&e&&se("blur",function(){return i.handleBlur()})("keydown",function(o){return i.handleKeyDown(o)})("mouseleave",function(){return i.reset()}),2&e&&(Fa("tabindex",i.disabled?-1:i.tabindex),Re("aria-valuemax",i.max)("aria-valuenow",i.nextRate)("aria-valuetext",i.ariaValueText(i.nextRate,i.max))("aria-disabled",!!i.readonly||null))},inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},standalone:!0,features:[Qi([{provide:Ha,useExisting:Fn(()=>t),multi:!0}]),Kt,No],decls:3,vars:1,consts:[["t",""],["ngFor","",3,"ngForOf"],[1,"visually-hidden"],[3,"mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(q(0,ePe,1,1,"ng-template",null,0,lo),q(2,nPe,4,5,"ng-template",1)),2&e&&(x(2),S("ngForOf",i.contexts))},dependencies:[Bt,Ac],encapsulation:2,changeDetection:0}),t})(),$z=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[oLe]}),t})();class Bz{constructor(n,e,i){this.hour=Rs(n),this.minute=Rs(e),this.second=Rs(i)}changeHour(n=1){this.updateHour((isNaN(this.hour)?0:this.hour)+n)}updateHour(n){this.hour=uo(n)?(n<0?24+n:n)%24:NaN}changeMinute(n=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+n)}updateMinute(n){uo(n)?(this.minute=n%60<0?60+n%60:n%60,this.changeHour(Math.floor(n/60))):this.minute=NaN}changeSecond(n=1){this.updateSecond((isNaN(this.second)?0:this.second)+n)}updateSecond(n){uo(n)?(this.second=n<0?60+n%60:n%60,this.changeMinute(Math.floor(n/60))):this.second=NaN}isValid(n=!0){return uo(this.hour)&&uo(this.minute)&&(!n||uo(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let sLe=(()=>{class t{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Vz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(){return function aLe(){return new lLe}()},providedIn:"root"}),t})(),lLe=(()=>{class t extends Vz{fromModel(e){return e&&Qr(e.hour)&&Qr(e.minute)?{hour:e.hour,minute:e.minute,second:Qr(e.second)?e.second:null}:null}toModel(e){return e&&Qr(e.hour)&&Qr(e.minute)?{hour:e.hour,minute:e.minute,second:Qr(e.second)?e.second:null}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),Hz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Ke({token:t,factory:function(e){let i=null;return i=e?new e:function cLe(t){return new uLe(t)}(Ve(hl)),i},providedIn:"root"}),t})(),uLe=(()=>{class t extends Hz{constructor(e){super(),this._periods=r7(e,Lr.Standalone,Wn.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}return t.\u0275fac=function(e){return new(e||t)(Ve(hl))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})();const dLe=/[^0-9]/g;let hLe=(()=>{class t{constructor(e,i,r,o){this._config=e,this._ngbTimeAdapter=i,this._cd=r,this.i18n=o,this.onChange=s=>{},this.onTouched=()=>{},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}set hourStep(e){this._hourStep=Qr(e)?e:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(e){this._minuteStep=Qr(e)?e:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(e){this._secondStep=Qr(e)?e:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(e){const i=this._ngbTimeAdapter.fromModel(e);this.model=i?new Bz(i.hour,i.minute,i.second):new Bz,!this.seconds&&(!i||!uo(i.second))&&(this.model.second=0),this._cd.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}changeHour(e){this.model?.changeHour(e),this.propagateModelChange()}changeMinute(e){this.model?.changeMinute(e),this.propagateModelChange()}changeSecond(e){this.model?.changeSecond(e),this.propagateModelChange()}updateHour(e){const i=!!this.model&&this.model.hour>=12,r=Rs(e);this.model?.updateHour(this.meridian&&(i&&r<12||!i&&12===r)?r+12:r),this.propagateModelChange()}updateMinute(e){this.model?.updateMinute(Rs(e)),this.propagateModelChange()}updateSecond(e){this.model?.updateSecond(Rs(e)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(e){e.value=e.value.replace(dLe,"")}formatHour(e){return uo(e)?zm(this.meridian?e%12==0?12:e%12:e%24):zm(NaN)}formatMinSec(e){return zm(uo(e)?e:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(e){e.seconds&&!this.seconds&&this.model&&!uo(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(e=!0){e&&this.onTouched(),this.model?.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}return t.\u0275fac=function(e){return new(e||t)(te(sLe),te(Vz),te(jo),te(Hz))},t.\u0275cmp=nt({type:t,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},exportAs:["ngbTimepicker"],standalone:!0,features:[Qi([{provide:Ha,useExisting:Fn(()=>t),multi:!0}]),Kt,No],decls:16,vars:25,consts:function(){let n,e,i,r,o,s,a,l,c,u,d,h,f,p;return n=$localize`:@@ngb.timepicker.HH:HH`,e=$localize`:@@ngb.timepicker.hours:Hours`,i=$localize`:@@ngb.timepicker.MM:MM`,r=$localize`:@@ngb.timepicker.minutes:Minutes`,o=$localize`:@@ngb.timepicker.increment-hours:Increment hours`,s=$localize`:@@ngb.timepicker.decrement-hours:Decrement hours`,a=$localize`:@@ngb.timepicker.increment-minutes:Increment minutes`,l=$localize`:@@ngb.timepicker.decrement-minutes:Decrement minutes`,c=$localize`:@@ngb.timepicker.SS:SS`,u=$localize`:@@ngb.timepicker.seconds:Seconds`,d=$localize`:@@ngb.timepicker.increment-seconds:Increment seconds`,h=$localize`:@@ngb.timepicker.decrement-seconds:Decrement seconds`,f=$localize`:@@ngb.timepicker.PM:${"\ufffd0\ufffd"}:INTERPOLATION:`,p=$localize`:@@ngb.timepicker.AM:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric","placeholder",n,"aria-label",e,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["type","text","maxlength","2","inputmode","numeric","placeholder",i,"aria-label",r,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"visually-hidden"],o,[1,"chevron","ngb-tp-chevron","bottom"],s,a,l,[1,"ngb-tp-input-container","ngb-tp-second"],["type","text","maxlength","2","inputmode","numeric","placeholder",c,"aria-label",u,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],d,h,[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],f,p]},template:function(e,i){1&e&&(_(0,"fieldset",0)(1,"div",1)(2,"div",2),q(3,iPe,4,7,"button",3),_(4,"input",4),se("change",function(o){return i.updateHour(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeHour(i.hourStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeHour(-i.hourStep),o.preventDefault()}),w(),q(5,rPe,4,7,"button",3),w(),_(6,"div",5),A(7,":"),w(),_(8,"div",6),q(9,oPe,4,7,"button",3),_(10,"input",7),se("change",function(o){return i.updateMinute(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeMinute(i.minuteStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeMinute(-i.minuteStep),o.preventDefault()}),w(),q(11,sPe,4,7,"button",3),w(),q(12,aPe,2,0,"div",8),q(13,uPe,4,9,"div",9),q(14,dPe,1,0,"div",8),q(15,pPe,5,9,"div",10),w()()),2&e&&(Ft("disabled",i.disabled),S("disabled",i.disabled),x(3),S("ngIf",i.spinners),x(1),Ft("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatHour(null==i.model?null:i.model.hour))("readOnly",i.readonlyInputs)("disabled",i.disabled),x(1),S("ngIf",i.spinners),x(4),S("ngIf",i.spinners),x(1),Ft("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatMinSec(null==i.model?null:i.model.minute))("readOnly",i.readonlyInputs)("disabled",i.disabled),x(1),S("ngIf",i.spinners),x(1),S("ngIf",i.seconds),x(1),S("ngIf",i.seconds),x(1),S("ngIf",i.meridian),x(1),S("ngIf",i.meridian))},dependencies:[Ct],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],encapsulation:2}),t})(),Uz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[hLe]}),t})();const fLe=(t,n)=>{const{classList:e}=t;if(n)return e.add("fade"),Gm(t),e.add("show","showing"),()=>{e.remove("showing")};e.add("show")},pLe=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});let gLe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),mLe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=pt({type:t,selectors:[["","ngbToastHeader",""]],standalone:!0}),t})(),vLe=(()=>{class t{constructor(e,i,r,o){this.ariaLive=e,this._zone=r,this._element=o,this.contentHeaderTpl=null,this.shown=new Oe,this.hidden=new Oe,null==this.ariaLive&&(this.ariaLive=i.ariaLive),this.delay=i.delay,this.autohide=i.autohide,this.animation=i.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe(es(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(e){"autohide"in e&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const e=is(this._zone,this._element.nativeElement,pLe,{animation:this.animation,runningTransition:"stop"});return e.subscribe(()=>{this.hidden.emit()}),e}show(){const e=is(this._zone,this._element.nativeElement,fLe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>{this.shown.emit()}),e}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}return t.\u0275fac=function(e){return new(e||t)(Sh("aria-live"),te(gLe),te(si),te(En))},t.\u0275cmp=nt({type:t,selectors:[["ngb-toast"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,mLe,7,ir),2&e){let o;kt(o=Tt())&&(i.contentHeaderTpl=o.first)}},hostAttrs:["role","alert","aria-atomic","true",1,"toast"],hostVars:3,hostBindings:function(e,i){2&e&&(Re("aria-live",i.ariaLive),Ft("fade",i.animation))},inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbToast"],standalone:!0,features:[Kt,No],ngContentSelectors:by,decls:5,vars:1,consts:function(){let n;return n=$localize`:@@ngb.toast.close-aria:Close`,[["headerTpl",""],[3,"ngIf"],[1,"toast-body"],[1,"me-auto"],[1,"toast-header"],[3,"ngTemplateOutlet"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kh(),q(0,gPe,2,1,"ng-template",null,0,lo),q(2,vPe,3,1,"ng-template",1),_(3,"div",2),Th(4),w()),2&e&&(x(2),S("ngIf",i.contentHeaderTpl||i.header))},dependencies:[Ct,Ac],styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],encapsulation:2}),t})(),zz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[vLe]}),t})(),yLe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(Ve(zh))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_Le=0,bLe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip",2,"position","absolute"],hostVars:5,hostBindings:function(e,i){2&e&&(Fa("id",i.id),Ou("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),Ft("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},standalone:!0,features:[No],ngContentSelectors:by,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(kh(),ie(0,"div",0),_(1,"div",1),Th(2),w())},encapsulation:2,changeDetection:0}),t})(),wLe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u){this._elementRef=e,this._renderer=i,this._ngZone=a,this._document=l,this._changeDetector=c,this.shown=new Oe,this.hidden=new Oe,this._ngbTooltipWindowId="ngb-tooltip-"+_Le++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disableTooltip=s.disableTooltip,this.tooltipClass=s.tooltipClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._popupService=new jRe(bLe,r,o,i,this._ngZone,u),this._positioning=h3()}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:o=>this.popperOptions(o)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),d3(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(e=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(e).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function tLe(t,n,e,i,r,o,s=0,a=0){const l=function QRe(t,n=XRe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new KRe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function ZRe(t,n,e,i){return new ar(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function eLe(t,n,e){return i=>{let r=null;const o=i.pipe(xn(l=>({open:l})),co(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),bF());return hD(o.pipe(co(l=>l.open),Rz(t)),o.pipe(co(l=>!l.open),Rz(n))).pipe(co(l=>l===r&&(r=null,l.open!==e())),xn(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(Sp(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs),te(fs),te($a),te(yLe),te(si),te(lr),te(jo),te(Pd))},t.\u0275dir=pt({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],standalone:!0,features:[Kt]}),t})(),Gz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})(),xLe=(()=>{class t{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const i=$U(this.result),r=Array.isArray(this.term)?this.term:[this.term],o=c=>this.accentSensitive?c:HU(c),s=r.map(c=>function CPe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(o($U(c)))).filter(c=>c),a=this.accentSensitive?i:HU(i),l=s.length?a.split(new RegExp(`(${s.join("|")})`,"gmi")):[i];if(this.accentSensitive)this.parts=l;else{let c=0;this.parts=l.map(u=>i.substring(c,c+=u.length))}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[Kt,No],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(e,i){1&e&&q(0,bPe,3,2,"ng-template",0),2&e&&S("ngForOf",i.parts)},dependencies:[Ct,Bt],styles:[".ngb-highlight{font-weight:700}\n"],encapsulation:2,changeDetection:0}),t})();new Ut("live announcer delay",{providedIn:"root",factory:function CLe(){return 100}});let Wz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[xLe]}),t})(),qz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({}),t})();const SLe=[XU,QU,ez,tz,_z,bz,xz,Tz,qz,Pz,Lz,Fz,$z,Uz,zz,Gz,Wz];let kLe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[SLe,XU,QU,ez,tz,_z,bz,xz,Tz,qz,Pz,Lz,Fz,$z,Uz,zz,Gz,Wz]}),t})(),Yz=(()=>{class t{restrictedPages=new Map([["users",nn.USER_ROLE_ADMIN],["config",nn.USER_ROLE_DEVELOPER],["modules",nn.USER_ROLE_DEVELOPER],["apiexplorer",nn.USER_ROLE_DEVELOPER]]);static \u0275fac=function(i){return new(i||t)};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function TLe(t,n){if(1&t&&(ul(0,5),_(1,"a",31),ie(2,"img",32),_(3,"span",12),A(4),w()(),dl()),2&t){const e=P().$implicit;S("ngbNavItem",e.navItem),x(1),S("routerLink",e.routerLink),x(1),sp("src","/static/svg/",e.icon,".svg",a1),x(2),ze(e.label)}}function DLe(t,n){1&t&&ie(0,"hr")}function ALe(t,n){if(1&t&&(q(0,TLe,5,4,"ng-container",30),q(1,DLe,1,0,"hr",29)),2&t){const e=n.$implicit;S("ngIf",P().getSessionRole()<=e.minRole),x(1),S("ngIf",e.separator)}}function ELe(t,n){if(1&t&&(_(0,"div",33)(1,"h2",34),ie(2,"img",35),A(3,"An error has occurred!"),w(),_(4,"h6",36),A(5),w(),_(6,"p"),A(7,"Please refresh the page to try again."),w()()),2&t){const e=P();x(5),ze(e.error)}}function MLe(t,n){1&t&&(_(0,"div",37),ie(1,"img",38),w())}function OLe(t,n){1&t&&ie(0,"router-outlet")}const ILe=function(){return["/"]},NLe=function(){return["/login"]};let jLe=(()=>{class t{route;router;segment;consoleService;authService;routerSub;segmentRouterSub;loading=!0;error="";routes=[{navItem:"status",routerLink:["/status"],label:"Status",minRole:nn.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:nn.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:nn.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:nn.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:nn.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:nn.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:nn.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:nn.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:nn.USER_ROLE_READONLY,icon:"chat"},{navItem:"purchases",routerLink:["/purchases"],label:"Purchases",minRole:nn.USER_ROLE_READONLY,icon:"purchases"},{navItem:"subscriptions",routerLink:["/subscriptions"],label:"Subscriptions",minRole:nn.USER_ROLE_READONLY,icon:"subscriptions"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:nn.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:nn.USER_ROLE_DEVELOPER,icon:"api-explorer"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function nIe(t){let n=arguments.length,e=TC;Jf(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new iIe(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof qx&&(this.loading=!0),l instanceof Ud&&(this.loading=!1),l instanceof q1&&(this.loading=!1),l instanceof Jx&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(DC((a,l)=>!(l instanceof Ud)||a.url===l.url)).subscribe(a=>{a&&r.page(a.url)})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(wC),te(kn),te(zr))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:49,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","http://heroiclabs.com/cloud?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Heroic%20Cloud%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/hiro.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/satori.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/docs/nakama/getting-started/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Documentation%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Blog%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"nav",2,3),se("navChange",function(s){return r.onSidebarNavChange(s)}),_(4,"div",4),ul(5,5),_(6,"a",6),ie(7,"img",7)(8,"img",8),w(),dl(),ie(9,"hr"),q(10,ALe,2,2,"ng-template",9),ie(11,"hr"),_(12,"a",10),ie(13,"img",11),_(14,"span",12),A(15,"Heroic Cloud"),w()(),_(16,"a",13),ie(17,"img",14),_(18,"span",12),A(19,"Hiro"),w()(),_(20,"a",15),ie(21,"img",16),_(22,"span",12),A(23,"Satori"),w()(),ie(24,"hr"),_(25,"a",17),ie(26,"img",18),_(27,"span",12),A(28,"Documentation"),w()(),_(29,"a",19),ie(30,"img",20),_(31,"span",12),A(32,"Forum"),w()(),_(33,"a",21),ie(34,"img",22),_(35,"span",12),A(36,"Heroic Labs Blog"),w()(),ie(37,"hr"),_(38,"div",23),A(39),w(),ul(40,5),_(41,"a",24),se("click",function(){return r.logout()}),ie(42,"img",25),_(43,"span",12),A(44,"Logout"),w()(),dl(),w()(),_(45,"main",26),q(46,ELe,8,1,"div",27),q(47,MLe,2,0,"div",28),q(48,OLe,1,0,"router-outlet",29),w()()()),2&i&&(x(5),S("ngbNavItem","logo"),x(1),S("routerLink",ma(9,ILe)),x(4),S("ngForOf",r.routes),x(29),wt("Logged in as: ",r.getUsername(),""),x(1),S("ngbNavItem","logout"),x(1),S("routerLink",ma(10,NLe)),x(5),S("ngIf",r.error),x(1),S("ngIf",!r.error&&r.loading),x(1),S("ngIf",!r.error&&!r.loading))},dependencies:[yp,Mc,ty,Bt,Ct,Bu,Wd,Ty,Yh],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px;color:#fff}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})}return t})(),PLe=(()=>{class t{authService;router;globals;constructor(e,i,r){this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||fs.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class BLe extends $Le{}"function"==typeof SuppressedError&&SuppressedError;class d4e{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new h4e(n,this.dueTime,this.scheduler))}}class h4e extends Ln{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(f4e,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function f4e(t){t.debouncedNext()}function p4e(){}function x3(t){return null==t?p4e:function(){return this.querySelector(t)}}function m4e(){return[]}function Qz(t){return null==t?m4e:function(){return this.querySelectorAll(t)}}function Zz(t){return function(){return this.matches(t)}}function eG(t){return new Array(t.length)}function GC(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}GC.prototype={constructor:GC,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var tG="$";function w4e(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var C3="http://www.w3.org/1999/xhtml";const nG={svg:"http://www.w3.org/2000/svg",xhtml:C3,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function WC(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),nG.hasOwnProperty(n)?{space:nG[n],local:t}:t}function R4e(t){return function(){this.removeAttribute(t)}}function L4e(t){return function(){this.removeAttributeNS(t.space,t.local)}}function F4e(t,n){return function(){this.setAttribute(t,n)}}function $4e(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function B4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function V4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function iG(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U4e(t){return function(){this.style.removeProperty(t)}}function z4e(t,n,e){return function(){this.style.setProperty(t,n,e)}}function G4e(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function Jm(t,n){return t.style.getPropertyValue(n)||iG(t).getComputedStyle(t,null).getPropertyValue(n)}function q4e(t){return function(){delete this[t]}}function Y4e(t,n){return function(){this[t]=n}}function J4e(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function rG(t){return t.trim().split(/^|\s+/)}function S3(t){return t.classList||new oG(t)}function oG(t){this._node=t,this._names=rG(t.getAttribute("class")||"")}function sG(t,n){for(var e=S3(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var cG={},$i=null;function kFe(t,n,e){return t=uG(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function uG(t,n,e){return function(i){var r=$i;$i=i;try{t.call(this,this.__data__,n,e)}finally{$i=r}}}function DFe(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=b&&(b=y+1);!(k=m[b])&&++b=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function A4e(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=E4e);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?U4e:"function"==typeof n?G4e:z4e)(t,n,e??"")):Jm(this.node(),t)},property:function K4e(t,n){return arguments.length>1?this.each((null==n?q4e:"function"==typeof n?J4e:Y4e)(t,n)):this.node()[t]},classed:function eFe(t,n){var e=rG(t+"");if(arguments.length<2){for(var i=S3(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?AFe:DFe,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?JC(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?JC(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=BFe.exec(t))?new wl(n[1],n[2],n[3],1):(n=VFe.exec(t))?new wl(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=HFe.exec(t))?JC(n[1],n[2],n[3],n[4]):(n=UFe.exec(t))?JC(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=zFe.exec(t))?SG(n[1],n[2]/100,n[3]/100,1):(n=GFe.exec(t))?SG(n[1],n[2]/100,n[3]/100,n[4]):yG.hasOwnProperty(t)?wG(yG[t]):"transparent"===t?new wl(NaN,NaN,NaN,0):null}function wG(t){return new wl(t>>16&255,t>>8&255,255&t,1)}function JC(t,n,e,i){return i<=0&&(t=n=e=NaN),new wl(t,n,e,i)}function Iy(t,n,e,i){return 1===arguments.length?function qFe(t){return t instanceof Ey||(t=Np(t)),t?new wl((t=t.rgb()).r,t.g,t.b,t.opacity):new wl}(t):new wl(t,n,e,i??1)}function wl(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function xG(){return"#"+D3(this.r)+D3(this.g)+D3(this.b)}function CG(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function D3(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function SG(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Hu(t,n,e,i)}function kG(t){if(t instanceof Hu)return new Hu(t.h,t.s,t.l,t.opacity);if(t instanceof Ey||(t=Np(t)),!t)return new Hu;if(t instanceof Hu)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Hu(s,a,l,t.opacity)}function Hu(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function A3(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function TG(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function E3(t){return function(){return t}}function AG(t,n){var e=n-t;return e?function DG(t,n){return function(e){return t+e*n}}(t,e):E3(isNaN(t)?n:t)}T3(Ey,Np,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:_G,formatHex:_G,formatHsl:function WFe(){return kG(this).formatHsl()},formatRgb:bG,toString:bG}),T3(wl,Iy,vG(Ey,{brighter:function(t){return t=null==t?YC:Math.pow(YC,t),new wl(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wl(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xG,formatHex:xG,formatRgb:CG,toString:CG})),T3(Hu,function YFe(t,n,e,i){return 1===arguments.length?kG(t):new Hu(t,n,e,i??1)},vG(Ey,{brighter:function(t){return t=null==t?YC:Math.pow(YC,t),new Hu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hu(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new wl(A3(t>=240?t-240:t+120,r,i),A3(t,r,i),A3(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const KC=function t(n){var e=function QFe(t){return 1==(t=+t)?AG:function(n,e){return e-n?function XFe(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):E3(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=Iy(r)).r,(o=Iy(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=AG(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function EG(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return TG((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lc(i,r)})),e=O3.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--Xm}()}finally{Xm=0,function u5e(){for(var t,e,n=XC,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:XC=e);Py=t,I3(i)}(),Pp=0}}function c5e(){var t=Ry.now(),n=t-QC;n>jG&&(ZC-=n,QC=t)}function I3(t){Xm||(Ny&&(Ny=clearTimeout(Ny)),t-Pp>24?(t<1/0&&(Ny=setTimeout(LG,t-Ry.now()-ZC)),jy&&(jy=clearInterval(jy))):(jy||(QC=Ry.now(),jy=setInterval(c5e,jG)),Xm=1,PG(LG)))}function FG(t,n,e){var i=new t2;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}t2.prototype=RG.prototype={constructor:t2,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?e2():+e)+(null==n?0:+n),!this._next&&Py!==this&&(Py?Py._next=this:XC=this,Py=this),this._call=t,this._time=e,I3()},stop:function(){this._call&&(this._call=null,this._time=1/0,I3())}};var d5e=mG("start","end","cancel","interrupt"),h5e=[],$G=0,BG=1,N3=2,n2=3,VG=4,j3=5,i2=6;function r2(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function f5e(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==BG)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===n2)return FG(s);f.state===VG?(f.state=i2,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u$G)throw new Error("too late; already scheduled");return e}function qd(t,n){var e=Fc(t,n);if(e.state>n2)throw new Error("too late; already running");return e}function Fc(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function R3(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>N3&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lc(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lc(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(r(f)+"scale(",null,",",null,")");p.push({i:g-4,x:Lc(c,d)},{i:g-2,x:Lc(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var m,p=-1,g=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?P3:qd;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function A5e(t,n){var e=WC(t),i="transform"===e?y5e:WG;return this.attrTween(t,"function"==typeof n?(e.local?D5e:T5e)(e,i,$3(this,"attr."+t,n)):null==n?(e.local?C5e:x5e)(e):(e.local?k5e:S5e)(e,i,n))},attrTween:function N5e(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=WC(t);return this.tween(e,(i.local?O5e:I5e)(i,n))},style:function i$e(t,n,e){var i="transform"==(t+="")?v5e:WG;return null==n?this.styleTween(t,function Z5e(t,n){var e,i,r;return function(){var o=Jm(this,t),s=(this.style.removeProperty(t),Jm(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,qG(t)):"function"==typeof n?this.styleTween(t,function t$e(t,n,e){var i,r,o;return function(){var s=Jm(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=Jm(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,$3(this,"style."+t,n))).each(function n$e(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=qd(this,t),c=l.on,u=null==l.value[o]?a||(a=qG(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function e$e(t,n,e){var i,o,r=e+"";return function(){var s=Jm(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function s$e(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function o$e(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function r$e(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function c$e(t){return this.tween("text","function"==typeof t?function l$e(t){return function(){var n=t(this);this.textContent=n??""}}($3(this,"text",t)):function a$e(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function h$e(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function d$e(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function u$e(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function Y5e(){return this.on("end.remove",function q5e(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function w5e(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=Fc(this.node(),e).tween,r=0,o=i.length;r0&&(N=$-E),C<0?Z=D-M:C>0&&(z=Y-M),y=U3,R.attr("cursor",Jd.selection),pe());break;default:return}H3()},!0).on("keyup.brush",function Ue(){switch($i.keyCode){case 16:L&&(X=ne=L=!1,pe());break;case 18:y===ev&&(b<0?H=G:b>0&&(N=$),C<0?Z=D:C>0&&(z=Y),y=Zm,pe());break;case 32:y===U3&&($i.altKey?(b&&(H=G-E*b,N=$+E*b),C&&(Z=D-M*C,z=Y+M*C),y=ev):(b<0?H=G:b>0&&(N=$),C<0?Z=D:C>0&&(z=Y),y=Zm),R.attr("cursor",Jd[v]),pe());break;default:return}H3()},!0),function LFe(t){var n=t.document.documentElement,e=vs(t).on("dragstart.drag",k3,!0);"onselectstart"in n?e.on("selectstart.drag",k3,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}($i.view)}JG(),R3(m),c.call(m),be.start()}function K(){var Je=ge(m);L&&!X&&!ne&&(Math.abs(Je[0]-De[0])>Math.abs(Je[1]-De[1])?ne=!0:X=!0),De=Je,U=!0,H3(),pe()}function pe(){var Je;switch(E=De[0]-ae[0],M=De[1]-ae[1],y){case U3:case KG:b&&(E=Math.max(B-N,Math.min(O-H,E)),$=N+E,G=H+E),C&&(M=Math.max(V-z,Math.min(F-Z,M)),Y=z+M,D=Z+M);break;case Zm:b<0?(E=Math.max(B-N,Math.min(O-N,E)),$=N+E,G=H):b>0&&(E=Math.max(B-H,Math.min(O-H,E)),$=N,G=H+E),C<0?(M=Math.max(V-z,Math.min(F-z,M)),Y=z+M,D=Z):C>0&&(M=Math.max(V-Z,Math.min(F-Z,M)),Y=z,D=Z+M);break;case ev:b&&($=Math.max(B,Math.min(O,N-E*b)),G=Math.max(B,Math.min(O,H+E*b))),C&&(Y=Math.max(V,Math.min(F,z-M*C)),D=Math.max(V,Math.min(F,Z+M*C)))}G<$&&(b*=-1,Je=N,N=H,H=Je,Je=$,$=G,G=Je,v in QG&&R.attr("cursor",Jd[v=QG[v]])),Dn?1:t>=n?0:NaN}function Y3(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function O$e(t){return(n,e)=>q3(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var J3=Math.sqrt(50),K3=Math.sqrt(10),X3=Math.sqrt(2);function eW(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=J3?10:o>=K3?5:o>=X3?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=J3?10:o>=K3?5:o>=X3?2:1)}function Q3(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=J3?r*=10:o>=K3?r*=5:o>=X3&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return tI.setTime(+o),nI.setTime(+s),t(tI),t(nI),Math.floor(e(tI,nI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var l2=ys(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});l2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ys(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):l2:null};const N$e=l2;var nW=ys(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+n*Kd)},function(t,n){return(n-t)/Kd},function(t){return t.getUTCSeconds()});const $y=nW;var iW=ys(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kd)},function(t,n){t.setTime(+t+n*Jl)},function(t,n){return(n-t)/Jl},function(t){return t.getMinutes()});const rW=iW;var oW=ys(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kd-t.getMinutes()*Jl)},function(t,n){t.setTime(+t+n*Xd)},function(t,n){return(n-t)/Xd},function(t){return t.getHours()});const sW=oW;var aW=ys(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Jl)/Rp,t=>t.getDate()-1);const lW=aW;function Lp(t){return ys(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*Jl)/Z3})}var iI=Lp(0),cW=(Lp(1),Lp(2),Lp(3),Lp(4),Lp(5),Lp(6),ys(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}));const uW=cW;var rI=ys(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});rI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ys(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const dW=rI;var hW=ys(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*Jl)},function(t,n){return(n-t)/Jl},function(t){return t.getUTCMinutes()});const B$e=hW;var fW=ys(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Xd)},function(t,n){return(n-t)/Xd},function(t){return t.getUTCHours()});const V$e=fW;var pW=ys(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Rp},function(t){return t.getUTCDate()-1});const H$e=pW;function Fp(t){return ys(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/Z3})}var gW=Fp(0),mW=(Fp(1),Fp(2),Fp(3),Fp(4),Fp(5),Fp(6),ys(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}));const J$e=mW;var oI=ys(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});oI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ys(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const K$e=oI;function vW(t,n,e,i,r,o){const s=[[$y,1,Kd],[$y,5,5*Kd],[$y,15,15*Kd],[$y,30,30*Kd],[o,1,Jl],[o,5,5*Jl],[o,15,15*Jl],[o,30,30*Jl],[r,1,Xd],[r,3,3*Xd],[r,6,6*Xd],[r,12,12*Xd],[i,1,Rp],[i,2,2*Rp],[e,1,Z3],[n,1,tW],[n,3,3*tW],[t,1,eI]];function l(c,u,d){const h=Math.abs(u-c)/d,f=Y3(([,,m])=>m).right(s,h);if(f===s.length)return t.every(Q3(c/eI,u/eI,d));if(0===f)return N$e.every(Math.max(Q3(c,u,d),1));const[p,g]=s[h/s[f-1][2]0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return sI.setTime(+o),aI.setTime(+s),t(sI),t(aI),Math.floor(e(sI,aI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var yW=6e4,bW=6048e5;function $p(t){return Qd(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/bW})}var wW=$p(0),c2=$p(1),tv=($p(2),$p(3),$p(4)),xW=($p(5),$p(6),Qd(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const CW=xW;function Bp(t){return Qd(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*yW)/bW})}var SW=Bp(0),u2=Bp(1),nv=(Bp(2),Bp(3),Bp(4)),kW=(Bp(5),Bp(6),Qd(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*yW)/864e5},function(t){return t.getDate()-1}));const TW=kW;var lI=Qd(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});lI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Qd(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const By=lI;var cI=Qd(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});cI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Qd(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const Vy=cI;function uI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function dI(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Hy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var iv,VW,DW={"-":"",_:" ",0:"0"},_s=/^\s*\d+/,l6e=/^%/,c6e=/[\\^$*+?|[\]().{}]/g;function Vi(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function m6e(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function v6e(t,n,e){var i=_s.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function y6e(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function MW(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function _6e(t,n,e){var i=_s.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function OW(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function b6e(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function w6e(t,n,e){var i=_s.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function x6e(t,n,e){var i=_s.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function C6e(t,n,e){var i=_s.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function S6e(t,n,e){var i=l6e.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function k6e(t,n,e){var i=_s.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function T6e(t,n,e){var i=_s.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function IW(t,n){return Vi(t.getDate(),n,2)}function D6e(t,n){return Vi(t.getHours(),n,2)}function A6e(t,n){return Vi(t.getHours()%12||12,n,2)}function E6e(t,n){return Vi(1+TW.count(By(t),t),n,3)}function NW(t,n){return Vi(t.getMilliseconds(),n,3)}function M6e(t,n){return NW(t,n)+"000"}function O6e(t,n){return Vi(t.getMonth()+1,n,2)}function I6e(t,n){return Vi(t.getMinutes(),n,2)}function N6e(t,n){return Vi(t.getSeconds(),n,2)}function j6e(t){var n=t.getDay();return 0===n?7:n}function P6e(t,n){return Vi(SW.count(By(t)-1,t),n,2)}function jW(t){var n=t.getDay();return n>=4||0===n?nv(t):nv.ceil(t)}function R6e(t,n){return t=jW(t),Vi(nv.count(By(t),t)+(4===By(t).getDay()),n,2)}function L6e(t){return t.getDay()}function F6e(t,n){return Vi(u2.count(By(t)-1,t),n,2)}function $6e(t,n){return Vi(t.getFullYear()%100,n,2)}function B6e(t,n){return Vi((t=jW(t)).getFullYear()%100,n,2)}function V6e(t,n){return Vi(t.getFullYear()%1e4,n,4)}function H6e(t,n){var e=t.getDay();return Vi((t=e>=4||0===e?nv(t):nv.ceil(t)).getFullYear()%1e4,n,4)}function U6e(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Vi(n/60|0,"0",2)+Vi(n%60,"0",2)}function PW(t,n){return Vi(t.getUTCDate(),n,2)}function z6e(t,n){return Vi(t.getUTCHours(),n,2)}function G6e(t,n){return Vi(t.getUTCHours()%12||12,n,2)}function W6e(t,n){return Vi(1+CW.count(Vy(t),t),n,3)}function RW(t,n){return Vi(t.getUTCMilliseconds(),n,3)}function q6e(t,n){return RW(t,n)+"000"}function Y6e(t,n){return Vi(t.getUTCMonth()+1,n,2)}function J6e(t,n){return Vi(t.getUTCMinutes(),n,2)}function K6e(t,n){return Vi(t.getUTCSeconds(),n,2)}function X6e(t){var n=t.getUTCDay();return 0===n?7:n}function Q6e(t,n){return Vi(wW.count(Vy(t)-1,t),n,2)}function LW(t){var n=t.getUTCDay();return n>=4||0===n?tv(t):tv.ceil(t)}function Z6e(t,n){return t=LW(t),Vi(tv.count(Vy(t),t)+(4===Vy(t).getUTCDay()),n,2)}function e8e(t){return t.getUTCDay()}function t8e(t,n){return Vi(c2.count(Vy(t)-1,t),n,2)}function n8e(t,n){return Vi(t.getUTCFullYear()%100,n,2)}function i8e(t,n){return Vi((t=LW(t)).getUTCFullYear()%100,n,2)}function r8e(t,n){return Vi(t.getUTCFullYear()%1e4,n,4)}function o8e(t,n){var e=t.getUTCDay();return Vi((t=e>=4||0===e?tv(t):tv.ceil(t)).getUTCFullYear()%1e4,n,4)}function s8e(){return"+0000"}function FW(){return"%"}function $W(t){return+t}function BW(t){return Math.floor(+t/1e3)}function HW(t){return null===t?NaN:+t}!function u8e(t){iv=function a6e(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Uy(r),u=zy(r),d=Uy(o),h=zy(o),f=Uy(s),p=zy(s),g=Uy(a),m=zy(a),v=Uy(l),y=zy(l),b={a:function F(be){return s[be.getDay()]},A:function Z(be){return o[be.getDay()]},b:function D(be){return l[be.getMonth()]},B:function E(be){return a[be.getMonth()]},c:null,d:IW,e:IW,f:M6e,g:B6e,G:H6e,H:D6e,I:A6e,j:E6e,L:NW,m:O6e,M:I6e,p:function M(be){return r[+(be.getHours()>=12)]},q:function U(be){return 1+~~(be.getMonth()/3)},Q:$W,s:BW,S:N6e,u:j6e,U:P6e,V:R6e,w:L6e,W:F6e,x:null,X:null,y:$6e,Y:V6e,Z:U6e,"%":FW},C={a:function L(be){return s[be.getUTCDay()]},A:function X(be){return o[be.getUTCDay()]},b:function ne(be){return l[be.getUTCMonth()]},B:function ge(be){return a[be.getUTCMonth()]},c:null,d:PW,e:PW,f:q6e,g:i8e,G:o8e,H:z6e,I:G6e,j:W6e,L:RW,m:Y6e,M:J6e,p:function ae(be){return r[+(be.getUTCHours()>=12)]},q:function De(be){return 1+~~(be.getUTCMonth()/3)},Q:$W,s:BW,S:K6e,u:X6e,U:Q6e,V:Z6e,w:e8e,W:t8e,x:null,X:null,y:n8e,Y:r8e,Z:s8e,"%":FW},k={a:function $(be,Ie,R){var J=f.exec(Ie.slice(R));return J?(be.w=p[J[0].toLowerCase()],R+J[0].length):-1},A:function V(be,Ie,R){var J=d.exec(Ie.slice(R));return J?(be.w=h[J[0].toLowerCase()],R+J[0].length):-1},b:function z(be,Ie,R){var J=v.exec(Ie.slice(R));return J?(be.m=y[J[0].toLowerCase()],R+J[0].length):-1},B:function Y(be,Ie,R){var J=g.exec(Ie.slice(R));return J?(be.m=m[J[0].toLowerCase()],R+J[0].length):-1},c:function O(be,Ie,R){return B(be,n,Ie,R)},d:MW,e:MW,f:C6e,g:EW,G:AW,H:OW,I:OW,j:_6e,L:x6e,m:y6e,M:b6e,p:function N(be,Ie,R){var J=c.exec(Ie.slice(R));return J?(be.p=u[J[0].toLowerCase()],R+J[0].length):-1},q:v6e,Q:k6e,s:T6e,S:w6e,u:h6e,U:f6e,V:p6e,w:d6e,W:g6e,x:function H(be,Ie,R){return B(be,e,Ie,R)},X:function G(be,Ie,R){return B(be,i,Ie,R)},y:EW,Y:AW,Z:m6e,"%":S6e};function T(be,Ie){return function(R){var ye,Ue,Je,J=[],K=-1,pe=0,Te=be.length;for(R instanceof Date||(R=new Date(+R));++K53)return null;"w"in J||(J.w=1),"Z"in J?(Te=(pe=dI(Hy(J.y,0,1))).getUTCDay(),pe=Te>4||0===Te?c2.ceil(pe):c2(pe),pe=CW.offset(pe,7*(J.V-1)),J.y=pe.getUTCFullYear(),J.m=pe.getUTCMonth(),J.d=pe.getUTCDate()+(J.w+6)%7):(Te=(pe=uI(Hy(J.y,0,1))).getDay(),pe=Te>4||0===Te?u2.ceil(pe):u2(pe),pe=TW.offset(pe,7*(J.V-1)),J.y=pe.getFullYear(),J.m=pe.getMonth(),J.d=pe.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),Te="Z"in J?dI(Hy(J.y,0,1)).getUTCDay():uI(Hy(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+7*J.W-(Te+5)%7:J.w+7*J.U-(Te+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,dI(J)):uI(J)}}function B(be,Ie,R,J){for(var ye,Ue,K=0,pe=Ie.length,Te=R.length;K=Te)return-1;if(37===(ye=Ie.charCodeAt(K++))){if(ye=Ie.charAt(K++),!(Ue=k[ye in DW?Ie.charAt(K++):ye])||(J=Ue(be,R,J))<0)return-1}else if(ye!=R.charCodeAt(J++))return-1}return J}return b.x=T(e,b),b.X=T(i,b),b.c=T(n,b),C.x=T(e,C),C.X=T(i,C),C.c=T(n,C),{format:function(be){var Ie=T(be+="",b);return Ie.toString=function(){return be},Ie},parse:function(be){var Ie=j(be+="",!1);return Ie.toString=function(){return be},Ie},utcFormat:function(be){var Ie=T(be+="",C);return Ie.toString=function(){return be},Ie},utcParse:function(be){var Ie=j(be+="",!0);return Ie.toString=function(){return be},Ie}}}(t),VW=iv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const d8e=Y3(q3).right,zW=(Y3(HW),d8e);function h8e(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function p8e(t){return+t}var GW=[0,1];function rv(t){return t}function hI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function f8e(t){return function(){return t}}(isNaN(n)?NaN:.5)}function m8e(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?v8e:m8e,l=c=null,d}function d(h){return null==h||isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lc)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,p8e),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=h8e,u()},d.clamp=function(h){return arguments.length?(s=!!h||rv,u()):s!==rv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(rv,rv)}function Gy(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function b8e(t){return new Date(t)}function w8e(t){return t instanceof Date?+t:+new Date(+t)}function YW(t,n,e,i,r,o,s,a,l,c){var u=qW(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),C=c("%Y");function k(T){return(l(T)=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function d2(t){if(!(n=x8e.exec(t)))throw new Error("invalid format: "+t);var n;return new fI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function fI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function h2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function ov(t){return(t=h2(Math.abs(t)))?t[1]:NaN}function KW(t,n){var e=h2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}d2.prototype=fI.prototype,fI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const XW={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function C8e(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return KW(100*t,n)},r:KW,s:function A8e(t,n){var e=h2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(JW=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+h2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function QW(t){return t}var f2,pI,tq,ZW=Array.prototype.map,eq=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function j8e(t){var n=t.domain;return t.ticks=function(e){var i=n();return function I$e(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0){let l=Math.round(t/a),c=Math.round(n/a);for(l*an&&--c,s=new Array(o=c-l+1);++rn&&--c,s=new Array(o=c-l+1);++r0;){if((c=eW(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function gr(){var t=qW();return t.copy=function(){return WW(t,gr())},Gy.apply(t,arguments),j8e(t)}function nq(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(ZW.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?QW:function T8e(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(ZW.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=d2(d)).fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,y=d.comma,b=d.precision,C=d.trim,k=d.type;"n"===k?(y=!0,k="g"):XW[k]||(void 0===b&&(b=12),C=!0,k="g"),(m||"0"===h&&"="===f)&&(m=!0,h="0",f="=");var T="$"===g?e:"#"===g&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",j="$"===g?i:/[%p]/.test(k)?s:"",B=XW[k],N=/[defgprs%]/.test(k);function $(V){var O,H,G,z=T,Y=j;if("c"===k)Y=B(V)+Y,V="";else{var F=(V=+V)<0||1/V<0;if(V=isNaN(V)?l:B(Math.abs(V),b),C&&(V=function D8e(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(V)),F&&0==+V&&"+"!==p&&(F=!1),z=(F?"("===p?p:a:"-"===p||"("===p?"":p)+z,Y=("s"===k?eq[8+JW/3]:"")+Y+(F&&"("===p?")":""),N)for(O=-1,H=V.length;++O(G=V.charCodeAt(O))||G>57){Y=(46===G?r+V.slice(O+1):V.slice(O))+Y,V=V.slice(0,O);break}}y&&!m&&(V=n(V,1/0));var Z=z.length+V.length+Y.length,D=Z>1)+z+V+Y+D.slice(Z);break;default:V=D+z+V+Y}return o(V)}return b=void 0===b?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),$.toString=function(){return d+""},$}return{format:c,formatPrefix:function u(d,h){var f=c(((d=d2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(ov(h)/3))),g=Math.pow(10,-p),m=eq[8+p/3];return function(v){return f(g*v)+m}}}}(t),pI=f2.format,tq=f2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const iq=Symbol("implicit");function gI(){var t=new Map,n=[],e=[],i=iq;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==iq)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return gI(n,e).unknown(i)},Gy.apply(r,arguments),r}function Ls(){var o,s,t=gI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function oq(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],azp)if(Math.abs(u*a-l*c)>zp&&r){var h=e-o,f=i-s,p=a*a+l*l,g=h*h+f*f,m=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((mI-Math.acos((p+d-g)/(2*m*v)))/2),b=y/v,C=y/m;Math.abs(b-1)>zp&&(this._+="L"+(t+b*c)+","+(n+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>zp||Math.abs(this._y1-c)>zp)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%vI+vI),d>R8e?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>zp&&(this._+="A"+e+","+e+",0,"+ +(d>=mI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const _I=aq;function cr(t){return function(){return t}}function lq(t){return t[0]}function cq(t){return t[1]}function p2(){var t=lq,n=cq,e=cr(!0),i=null,r=Up,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=_I())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],b[f]);a.lineEnd(),a.areaEnd()}m&&(y[d]=+t(g,d,u),b[d]=+e(g,d,u),a.point(n?+n(g,d,u):y[d],i?+i(g,d,u):b[d]))}if(v)return a=null,v+""||null}function c(){return p2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:cr(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:cr(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:cr(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:cr(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:cr(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:cr(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:cr(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function uq(){}function bI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function dq(t,n){this._context=t,this._k=(1-n)/6}function hq(t,n){this._context=t,this._k=(1-n)/6}function fq(t){this._curve=t}function eBe(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function yq(t,n){var r,s,a,l,c,e=new Jy(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=bBe);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new Jy(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(_q)}function bBe(t){return t.children}function wBe(t){t.data=t.data.data}function _q(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Jy(t){this.data=t,this.depth=this.height=0,this.parent=null}dq.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:bI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:bI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new dq(i,n)}return e.tension=function(i){return t(+i)},e}(0),hq.prototype={areaStart:uq,areaEnd:uq,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:bI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new hq(i,n)}return e.tension=function(i){return t(+i)},e}(0),function pq(t){function n(e){return new fq(t(e))}return n._curve=t,n}(Up),fq.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function iBe(t,n,e,i,r,o){for(var l,c,f,p,m,v,y,b,C,k,T,s=[],a=n.children,u=0,d=0,h=a.length,g=n.value;uy&&(y=c),T=m*m*k,(b=Math.max(y/T,T/v))>C){m-=c;break}C=b}s.push(l={value:m,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),Jy.prototype=yq.prototype={constructor:Jy,count:function aBe(){return this.eachAfter(sBe)},each:function lBe(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function dBe(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function hBe(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function fBe(t){for(var n=this,e=function pBe(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function gBe(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function mBe(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function vBe(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function yBe(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function _Be(){return yq(this).eachBefore(wBe)}};const TBe=["caretElm"];function DBe(t,n){}const ABe=function(t){return{model:t}};function EBe(t,n){if(1&t&&(_(0,"span"),q(1,DBe,0,0,"ng-template",5),w()),2&t){const e=P();x(1),S("ngTemplateOutlet",e.template)("ngTemplateOutletContext",ui(2,ABe,e.context))}}function MBe(t,n){1&t&&ie(0,"span",6),2&t&&S("innerHTML",P().title,kw)}function OBe(t,n){if(1&t&&(Ne(),Zf(),ie(0,"ngx-charts-scale-legend",4)),2&t){const e=P();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function IBe(t,n){if(1&t){const e=He();Ne(),Zf(),_(0,"ngx-charts-legend",5),se("labelClick",function(r){return we(e),xe(P().legendLabelClick.emit(r))})("labelActivate",function(r){return we(e),xe(P().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return we(e),xe(P().legendLabelDeactivate.emit(r))}),w()}if(2&t){const e=P();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const xq=["*"],NBe=["ngx-charts-axis-label",""],Cq=["ticksel"],jBe=["ngx-charts-x-axis-ticks",""];function PBe(t,n){if(1&t&&(Ne(),_(0,"g",3)(1,"title"),A(2),w(),_(3,"text",4),A(4),w()()),2&t){const e=n.$implicit,i=P();Re("transform",i.tickTransform(e)),x(2),ze(i.tickFormat(e)),x(1),oi("font-size","12px"),Re("text-anchor",i.textAnchor)("transform",i.textTransform),x(1),wt(" ",i.tickTrim(i.tickFormat(e))," ")}}function RBe(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"line",6),w()),2&t){const e=P(2);Re("transform",e.gridLineTransform()),x(1),Re("y1",-e.gridLineHeight)}}function LBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,RBe,2,2,"g",5),w()),2&t){const e=n.$implicit,i=P();Re("transform",i.tickTransform(e)),x(1),S("ngIf",i.showGridLines)}}const FBe=["ngx-charts-x-axis",""];function $Be(t,n){if(1&t){const e=He();Ne(),_(0,"g",2),se("dimensionsChanged",function(r){return we(e),xe(P().emitTicksHeight(r))}),w()}if(2&t){const e=P();S("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function BBe(t,n){if(1&t&&(Ne(),ie(0,"g",3)),2&t){const e=P();S("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const VBe=["ngx-charts-y-axis-ticks",""];function HBe(t,n){if(1&t&&(Ne(),_(0,"g",4)(1,"title"),A(2),w(),_(3,"text",5),A(4),w()()),2&t){const e=n.$implicit,i=P();Re("transform",i.transform(e)),x(2),ze(i.tickFormat(e)),x(1),oi("font-size","12px"),Re("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),x(1),wt(" ",i.tickTrim(i.tickFormat(e))," ")}}function UBe(t,n){if(1&t&&(Ne(),ie(0,"path",6)),2&t){const e=P();Re("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function zBe(t,n){1&t&&(Ne(),ie(0,"line",9)),2&t&&Re("x2",P(3).gridLineWidth)}function GBe(t,n){1&t&&(Ne(),ie(0,"line",9)),2&t&&Re("x2",-P(3).gridLineWidth)}function WBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,zBe,1,1,"line",8),q(2,GBe,1,1,"line",8),w()),2&t){const e=P(2);Re("transform",e.gridLineTransform()),x(1),S("ngIf","left"===e.orient),x(1),S("ngIf","right"===e.orient)}}function qBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,WBe,3,3,"g",7),w()),2&t){const e=n.$implicit,i=P();Re("transform",i.transform(e)),x(1),S("ngIf",i.showGridLines)}}function YBe(t,n){if(1&t&&(Ne(),_(0,"g")(1,"title"),A(2),w(),_(3,"text",11),A(4),w()()),2&t){const e=P(2).$implicit,i=P();x(2),ze(i.tickTrim(i.tickFormat(e.value))),x(1),Re("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),x(1),wt(" ",e.name," ")}}function JBe(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"line",10),q(2,YBe,5,6,"g",7),w()),2&t){const e=P().$implicit,i=P();Re("transform",i.transform(e.value)),x(1),Re("x2",i.gridLineWidth)("transform",i.gridLineTransform()),x(1),S("ngIf",i.showRefLabels)}}function KBe(t,n){if(1&t&&(Ne(),_(0,"g"),q(1,JBe,3,4,"g",7),w()),2&t){const e=P();x(1),S("ngIf",e.showRefLines)}}const XBe=["ngx-charts-y-axis",""];function QBe(t,n){if(1&t){const e=He();Ne(),_(0,"g",2),se("dimensionsChanged",function(r){return we(e),xe(P().emitTicksWidth(r))}),w()}if(2&t){const e=P();S("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function ZBe(t,n){if(1&t&&(Ne(),ie(0,"g",3)),2&t){const e=P();S("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const e7e=["ngx-charts-circle-series",""];function t7e(t,n){if(1&t&&(Ne(),ie(0,"rect",4)),2&t){const e=P(2);S("@animationState","active"),Re("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const n7e=function(t){return{name:t}};function i7e(t,n){if(1&t){const e=He();Ne(),_(0,"g")(1,"defs"),ie(2,"g",1),w(),q(3,t7e,1,6,"rect",2),_(4,"g",3),se("select",function(){we(e);const r=P();return xe(r.onClick(r.circle.data))})("activate",function(){return we(e),xe(P().activateCircle())})("deactivate",function(){return we(e),xe(P().deactivateCircle())}),w()()}if(2&t){const e=P();x(2),S("name",e.gradientId)("stops",e.circle.gradientStops),x(1),S("ngIf",e.barVisible&&"standard"===e.type),x(1),Ft("active",e.isActive(ui(18,n7e,e.circle.seriesName))),S("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const r7e=["ngx-charts-circle",""],l7e=["ngx-charts-svg-linear-gradient",""];function c7e(t,n){if(1&t&&(Ne(),ie(0,"stop")),2&t){const e=n.$implicit;oi("stop-color",e.color)("stop-opacity",e.opacity),Re("offset",e.offset+"%")}}const h7e=["ngx-charts-area",""];function f7e(t,n){if(1&t&&(Ne(),_(0,"defs"),ie(1,"g",2),w()),2&t){const e=P();x(1),S("name",e.gradientId)("stops",e.gradientStops)}}const g7e=["tooltipAnchor"],m7e=["ngx-charts-tooltip-area",""];function v7e(t,n){if(1&t&&(_(0,"div",6),ie(1,"span",7),A(2),w()),2&t){const e=n.$implicit,i=P(2);x(1),oi("background-color",e.color),x(1),wt(" ",i.getToolTipText(e)," ")}}function y7e(t,n){if(1&t&&(Ne(),Zf(),_(0,"div",4),q(1,v7e,3,3,"div",5),w()),2&t){const e=n.model;x(1),S("ngForOf",e)}}const _7e=["ngx-charts-timeline",""];function b7e(t,n){if(1&t&&(_(0,"header",4)(1,"span",5),A(2),w()()),2&t){const e=P();x(2),ze(e.title)}}function w7e(t,n){if(1&t){const e=He();_(0,"li",6)(1,"ngx-charts-legend-entry",7),se("select",function(r){return we(e),xe(P().labelClick.emit(r))})("activate",function(r){return we(e),xe(P().activate(r))})("deactivate",function(r){return we(e),xe(P().deactivate(r))}),w()()}if(2&t){const e=n.$implicit,i=P();x(1),S("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const $o=["tooltipTemplate"],_2=["seriesTooltipTemplate"],kr=function(t,n){return[t,n]},U9e=["ngx-charts-line",""];function z9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",7),se("dimensionsChanged",function(r){return we(e),xe(P().updateXAxisHeight(r))}),w()}if(2&t){const e=P();S("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function G9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",8),se("dimensionsChanged",function(r){return we(e),xe(P().updateYAxisWidth(r))}),w()}if(2&t){const e=P();S("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function W9e(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"g",9),w()),2&t){const e=n.$implicit,i=P();S("@animationState","active"),x(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function q9e(t,n){if(1&t){const e=He();Ne(),_(0,"g")(1,"g",13),se("select",function(r){return we(e),xe(P(2).onClick(r))})("activate",function(r){return we(e),xe(P(2).onActivate(r))})("deactivate",function(r){return we(e),xe(P(2).onDeactivate(r))}),w()()}if(2&t){const e=n.$implicit,i=P(2);x(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function Y9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",10),se("mouseleave",function(){return we(e),xe(P().hideCircles())}),_(1,"g",11),se("hover",function(r){return we(e),xe(P().updateHoveredVertical(r))}),w(),q(2,q9e,2,9,"g",12),w()}if(2&t){const e=P();x(1),S("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),x(1),S("ngForOf",e.results)}}function J9e(t,n){if(1&t&&(Ne(),_(0,"g"),ie(1,"g",15),w()),2&t){const e=n.$implicit,i=P(2);x(1),S("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function K9e(t,n){if(1&t){const e=He();Ne(),_(0,"g",14),se("onDomainChange",function(r){return we(e),xe(P().updateDomain(r))}),q(1,J9e,2,8,"g",4),w()}if(2&t){const e=P();S("results",e.results)("view",Ni(10,kr,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),Re("transform",e.timelineTransform),x(1),S("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const X9e=["ngx-charts-line-series",""];function Q9e(t,n){if(1&t&&(Ne(),ie(0,"g",4)),2&t){const e=P();S("name",e.gradientId)("stops",e.gradientStops)}}function Z9e(t,n){if(1&t&&(Ne(),ie(0,"g",5)),2&t){const e=P();Ft("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),S("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let Dq=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function YVe(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new BLe(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Jz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(Ve(Pd),Ve(im),Ve(fs))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function JVe(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function KVe(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:JVe(o.value,t,n)}),this[r]}}}}var Bo=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}(Bo||(Bo={})),Bo))();const Jh=7;function Aq(t,n,e){return"top"===e?t.top-Jh:"bottom"===e?t.top+t.height-n.height+Jh:"center"===e?t.top+t.height/2-n.height/2:void 0}function Eq(t,n,e){return"left"===e?t.left-Jh:"right"===e?t.left+t.width-n.width+Jh:"center"===e?t.left+t.width/2-n.width/2:void 0}class xl{static calculateVerticalAlignment(n,e,i){let r=Aq(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Jh),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Jh),"center"===r&&(o=e.height/2-i.height/2);const s=Aq(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=Eq(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Jh),"right"===r&&(o=e.width-n.width/2-i.width/2-Jh),"center"===r&&(o=e.width/2-i.width/2);const s=Eq(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===Bo.right?(a=-7,s=xl.calculateVerticalCaret(i,e,r,o)):n===Bo.left?(a=e.width,s=xl.calculateVerticalCaret(i,e,r,o)):n===Bo.top?(s=e.height,a=xl.calculateHorizontalCaret(i,e,r,o)):n===Bo.bottom&&(s=-7,a=xl.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===Bo.right?(a=i.left+i.width+r,s=xl.calculateVerticalAlignment(i,e,o)):n===Bo.left?(a=i.left-e.width-r,s=xl.calculateVerticalAlignment(i,e,o)):n===Bo.top?(s=i.top-e.height-r,a=xl.calculateHorizontalAlignment(i,e,o)):n===Bo.bottom&&(s=i.top+i.height+r,a=xl.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(xl.shouldFlip(i,e,n,r)){if(n===Bo.right)return Bo.left;if(n===Bo.left)return Bo.right;if(n===Bo.top)return Bo.bottom;if(n===Bo.bottom)return Bo.top}return n}}let XVe=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=xl.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=xl.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=xl.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(hs))},t.\u0275cmp=nt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&xr(TBe,5),2&e){let r;kt(r=Tt())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&se("resize",function(){return i.onWindowResize()},0,S$),2&e&&Ou(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(_(0,"div"),ie(1,"span",0,1),_(3,"div",2),q(4,EBe,2,4,"span",3),q(5,MBe,1,1,"span",4),w()()),2&e&&(x(1),function Q6(t,n,e){kc(al,Iu,dm(st(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),S("hidden",!i.showCaret),x(3),S("ngIf",!i.title),x(1),S("ngIf",i.title))},dependencies:[Ct,Ac],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function Kz(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o}([KVe(100)],t.prototype,"onWindowResize",null),t})();class QVe{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let CI=(()=>{class t extends QVe{constructor(e){super(e),this.type=XVe}}return t.\u0275fac=function(e){return new(e||t)(Ve(Dq))},t.\u0275prov=Ke({token:t,factory:t.\u0275fac}),t})(),Zr=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Oe,this.legendLabelActivate=new Oe,this.legendLabelDeactivate=new Oe}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Qi([CI]),Kt],ngContentSelectors:xq,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(kh(),_(0,"div",0),Ne(),_(1,"svg",1),Th(2),w(),q(3,OBe,1,5,"ngx-charts-scale-legend",2),q(4,IBe,1,7,"ngx-charts-legend",3),w()),2&e&&(oi("width",i.view[0],"px"),S("@animationState","active")("@.disabled",!i.animations),x(1),Re("width",i.chartWidth)("height",i.view[1]),x(2),S("ngIf",i.showLegend&&"scaleLegend"===i.legendType),x(1),S("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[Ct,Vq,Uq]},encapsulation:2,data:{animation:[ta("animationState",[Os(":enter",[Ai({opacity:0}),Ms("500ms 100ms",Ai({opacity:1}))])])]},changeDetection:0}),t})(),ZVe=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new Oe,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(si))},t.\u0275dir=pt({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),eo=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Oe}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new ZVe(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new d4e(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(si),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Kt],decls:1,vars:0,template:function(e,i){1&e&&ie(0,"div")},encapsulation:2}),t})(),SI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Kt],attrs:NBe,decls:2,vars:6,template:function(e,i){1&e&&(Ne(),_(0,"text"),A(1),w()),2&e&&(Re("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),x(1),wt(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Kh(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function Mq(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Oe,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=Mq(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Kh(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xr(Cq,5),2&e){let r;kt(r=Tt())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:jBe,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(Ne(),_(0,"g",null,0),q(2,PBe,5,7,"g",1),w(),q(3,LBe,2,2,"g",2)),2&e&&(x(2),S("ngForOf",i.ticks),x(1),S("ngForOf",i.ticks))},dependencies:[Bt,Ct],encapsulation:2,changeDetection:0}),t})(),za=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Oe,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&xr(Oq,5),2&e){let r;kt(r=Tt())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:FBe,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(Ne(),_(0,"g"),q(1,$Be,1,12,"g",0),q(2,BBe,1,5,"g",1),w()),2&e&&(Re("class",i.xAxisClassName)("transform",i.transform),x(1),S("ngIf",i.xScale),x(1),S("ngIf",i.showLabel))},dependencies:[Ct,SI,Oq],encapsulation:2,changeDetection:0}),t})();let Iq=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Oe,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function Zd(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=Mq(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Kh(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xr(Cq,5),2&e){let r;kt(r=Tt())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:VBe,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(Ne(),_(0,"g",null,0),q(2,HBe,5,9,"g",1),w(),q(3,UBe,1,2,"path",2),q(4,qBe,2,2,"g",3),q(5,KBe,2,1,"g",3)),2&e&&(x(2),S("ngForOf",i.ticks),x(1),S("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),x(1),S("ngForOf",i.ticks),x(1),S("ngForOf",i.referenceLines))},dependencies:[Bt,Ct],encapsulation:2,changeDetection:0}),t})(),_a=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Oe,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&xr(Iq,5),2&e){let r;kt(r=Tt())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Kt],attrs:XBe,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(Ne(),_(0,"g"),q(1,QBe,1,14,"g",0),q(2,ZBe,1,5,"g",1),w()),2&e&&(Re("class",i.yAxisClassName)("transform",i.transform),x(1),S("ngIf",i.yScale),x(1),S("ngIf",i.showLabel))},dependencies:[Ct,SI,Iq],encapsulation:2,changeDetection:0}),t})(),Nq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Mh]}),t})();var b2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(b2||(b2={})),b2))(),w2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(w2||(w2={})),w2))(),Xh=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}(Xh||(Xh={})),Xh))();let $c=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=Bo.top,this.tooltipAlignment=w2.center,this.tooltipType=b2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=Xh.all,this.tooltipImmediateExit=!1,this.show=new Oe,this.hide=new Oe}get listensForFocus(){return this.tooltipShowEvent===Xh.all||this.tooltipShowEvent===Xh.focus}get listensForHover(){return this.tooltipShowEvent===Xh.all||this.tooltipShowEvent===Xh.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(te(CI),te($a),te(hs))},t.\u0275dir=pt({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&se("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),jq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[Dq,CI],imports:[Mh]}),t})();function Fs(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function os(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const Pq={};function ba(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,Pq[t]?ba():(Pq[t]=!0,t)}let AI,Ky=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Oe,this.activate=new Oe,this.deactivate=new Oe,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+ba().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Fs(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${os(r)} \u2022 ${os(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Kt],attrs:e7e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&q(0,i7e,5,20,"g",0),2&e&&S("ngIf",i.circle)},dependencies:function(){return[Ct,$c,x2,Wp]},encapsulation:2,data:{animation:[ta("animationState",[Os(":enter",[Ai({opacity:0}),Ms(250,Ai({opacity:1}))])])]},changeDetection:0}),t})(),x2=(()=>{class t{constructor(){this.select=new Oe,this.activate=new Oe,this.deactivate=new Oe}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&se("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Kt],attrs:r7e,decls:1,vars:8,template:function(e,i){1&e&&(Ne(),ie(0,"circle")),2&e&&Re("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),Wp=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Kt],attrs:l7e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(Ne(),_(0,"linearGradient",0),q(1,c7e,1,5,"stop",1),w()),2&e&&(S("id",i.name),Re("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),x(1),S("ngForOf",i.stops))},dependencies:[Bt],encapsulation:2,changeDetection:0}),t})(),DI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Oe,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+ba().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=vs(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Kt],attrs:h7e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(q(0,f7e,2,2,"defs",0),Ne(),ie(1,"path",1)),2&e&&(S("ngIf",i.gradient),x(1),oi("opacity",i.opacity),Re("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[Ct,Wp],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?AI=window:typeof global<"u"&&(AI=global);const Bq=AI.MouseEvent;function EI(t,n=!1,e=!0){if("function"==typeof Bq)return new Bq(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let Xy=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Oe}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=EI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=EI("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=EI("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&xr(g7e,5),2&e){let r;kt(r=Tt())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:m7e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","'auto'",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(Ne(),_(0,"g")(1,"rect",0),se("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),w(),q(2,y7e,2,1,"ng-template",null,1,lo),ie(4,"rect",2,3),w()),2&e){const r=As(3);x(1),Re("x",0)("width",i.dims.width)("height",i.dims.height),x(3),oi("opacity",i.anchorOpacity)("pointer-events","none"),S("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),Re("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[Bt,$c],encapsulation:2,data:{animation:[ta("animationState",[Os("inactive => active",[Ai({opacity:0}),Ms(250,Ai({opacity:.7}))]),Os("active => inactive",[Ai({opacity:.7}),Ms(250,Ai({opacity:0}))])])]},changeDetection:0}),t})(),Qy=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new Oe,this.onDomainChange=new Oe,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+ba().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=Vp().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=gr().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=Hp().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function M$e(){return W3(s2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=($i.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),vs(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),vs(this.element).select(".brush").call(this.brush),vs(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(te(En),te(jo))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Kt],attrs:_7e,ngContentSelectors:xq,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(kh(),Ne(),_(0,"g",0)(1,"filter"),ie(2,"feColorMatrix",1),w(),_(3,"g",2),Th(4),w(),ie(5,"rect",3)(6,"g",4),w()),2&e&&(Re("transform",i.transform),x(1),Re("id",i.filterId),x(4),Re("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),Vq=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new Oe,this.labelActivate=new Oe,this.labelDeactivate=new Oe,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Fs(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(te(jo))},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Kt],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(_(0,"div"),q(1,b7e,3,1,"header",0),_(2,"div",1)(3,"ul",2),q(4,w7e,2,4,"li",3),w()()()),2&e&&(oi("width",i.width,"px"),x(1),S("ngIf",(null==i.title?null:i.title.length)>0),x(2),oi("max-height",i.height-45,"px"),Ft("horizontal-legend",i.horizontal),x(1),S("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[Bt,Ct,Hq]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),Hq=(()=>{class t{constructor(){this.isActive=!1,this.select=new Oe,this.activate=new Oe,this.deactivate=new Oe,this.toggle=new Oe}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&se("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(_(0,"span",0),se("click",function(){return i.select.emit(i.formattedLabel)}),_(1,"span",1),se("click",function(){return i.toggle.emit(i.formattedLabel)}),w(),_(2,"span",2),A(3),w()()),2&e&&(Ft("active",i.isActive),S("title",i.formattedLabel),x(1),oi("background-color",i.color),x(2),wt(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),Uq=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(te(Z7))},t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Kt],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1)(2,"span"),A(3),w()(),ie(4,"div",2),_(5,"div",1)(6,"span"),A(7),w()()()),2&e&&(oi("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),Ft("horizontal-legend",i.horizontal),x(3),ze(i.valueRange[1].toLocaleString()),x(1),oi("background",i.gradient),x(3),ze(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Bc=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Mh,Nq,jq,Mh,Nq,jq]}),t})();let Gq=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class fo{constructor(n,e,i,r){"string"==typeof n&&(n=Gq.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=Gq.find(o=>o.name===n)),"quantile"===e)r=oq().range(n.domain).domain(i);else if("ordinal"===e)r=gI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=nq(0,1,1/o.length);r=gr().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=gr().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=gr().domain(this.domain).range([0,1]),r=Ls().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let eHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),qq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),nHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),oHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),Kq=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new Oe,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=vs(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(te(En))},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Kt],attrs:U9e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(Ne(),ie(0,"path",0)),2&e&&(S("@animationState","active"),Re("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[ta("animationState",[Os(":enter",[Ai({strokeDasharray:2e3,strokeDashoffset:2e3}),Ms(1e3,Ai({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),sHe=(()=>{class t extends eo{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=Up,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Oe,this.deactivate=new Oe,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function ho({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,g=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(g-=5,g-=o,a&&(g-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),g=Math.max(0,g),{width:Math.floor(p),height:Math.floor(g),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+ba().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function S2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Qh(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=Vp().range([0,i]).domain(e):"linear"===this.scaleType?(r=gr().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=Hp().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=gr().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new fo(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Bn(t)))(i||t)}}(),t.\u0275cmp=nt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(Cn(r,$o,5),Cn(r,_2,5)),2&e){let o;kt(o=Tt())&&(i.tooltipTemplate=o.first),kt(o=Tt())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&se("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[yn],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(_(0,"ngx-charts-chart",0),se("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),Ne(),_(1,"defs")(2,"clipPath"),ie(3,"rect"),w()(),_(4,"g",1),q(5,z9e,1,10,"g",2),q(6,G9e,1,12,"g",3),_(7,"g"),q(8,W9e,2,11,"g",4),q(9,Y9e,3,9,"g",5),w()(),q(10,K9e,2,13,"g",6),w()),2&e&&(S("view",Ni(17,kr,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),x(2),Re("id",i.clipPathId),x(1),Re("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),x(1),Re("transform",i.transform),x(1),S("ngIf",i.xAxis),x(1),S("ngIf",i.yAxis),x(1),Re("clip-path",i.clipPath),x(1),S("ngForOf",i.results)("ngForTrackBy",i.trackBy),x(1),S("ngIf",!i.tooltipDisabled),x(1),S("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[Bt,Ct,za,_a,Xy,Zr,Ky,Qy,aHe]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[ta("animationState",[Os(":leave",[Ai({opacity:1}),Ms(500,Ai({opacity:0}))])])]},changeDetection:0}),t})(),aHe=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return p2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return sv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return sv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function MI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function II(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function OI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+ba().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=nt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Kt],attrs:X9e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(Ne(),_(0,"g")(1,"defs"),q(2,Q9e,1,2,"g",0),w(),ie(3,"g",1)(4,"g",2),q(5,Z9e,1,9,"g",3),w()),2&e&&(x(2),S("ngIf",i.hasGradient),x(1),Ft("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),x(1),Ft("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),x(1),S("ngIf",i.hasRange))},dependencies:[Ct,DI,Wp,Kq],encapsulation:2,changeDetection:0}),t})(),Xq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})();Math;let RI=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),hHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc,RI,Xq]}),t})(),mHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),_He=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc]}),t})(),xHe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc,RI,qq]}),t})(),SHe=(()=>{class t{constructor(){!function CHe(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({imports:[Bc,eHe,qq,nHe,oHe,Xq,hHe,mHe,RI,_He,xHe]}),t})();function kHe(t,n){if(1&t&&(_(0,"ngb-alert",19),ie(1,"img",20),_(2,"h6",21),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function THe(t,n){1&t&&ie(0,"img",31)}function DHe(t,n){1&t&&ie(0,"img",32)}function AHe(t,n){1&t&&ie(0,"img",33)}function EHe(t,n){1&t&&ie(0,"img",34)}function MHe(t,n){if(1&t&&(_(0,"tr",24)(1,"td"),ul(2,25),q(3,THe,1,0,"img",26),q(4,DHe,1,0,"img",27),q(5,AHe,1,0,"img",28),q(6,EHe,1,0,"img",29),dl(),_(7,"span"),A(8),w()(),_(9,"td"),A(10),_(11,"span",30),A(12),w()(),_(13,"td"),A(14),_(15,"span",30),A(16),w()(),_(17,"td"),A(18),_(19,"span",30),A(20),w()(),_(21,"td"),A(22),_(23,"span",30),A(24),w()()()),2&t){const e=n.$implicit,i=P(2);x(2),S("ngSwitch",e.health),x(1),S("ngSwitchCase",0),x(1),S("ngSwitchCase",1),x(1),S("ngSwitchCase",2),x(1),S("ngSwitchCase",3),x(2),ze(e.name),x(2),wt("",e.session_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxSessionCount()-e.session_count," delta)"),x(2),wt("",e.presence_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxPresenceCount()-e.presence_count," delta)"),x(2),wt("",e.match_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxMatchCount()-e.match_count," delta)"),x(2),wt("",e.goroutine_count," "),x(1),S("hidden",!i.showDelta),x(1),wt("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function OHe(t,n){if(1&t&&(_(0,"tbody"),q(1,MHe,25,18,"tr",22),_(2,"tr",3),ie(3,"td",23),_(4,"th",3),A(5),w(),_(6,"th",3),A(7),w(),_(8,"th",3),A(9),w(),_(10,"th",3),A(11),w()()()),2&t){const e=P();x(1),S("ngForOf",e.statusData.nodes),x(4),ze(e.getTotalSessionCount()),x(2),ze(e.getMaxPresenceCount()),x(2),ze(e.getTotalMatchCount()),x(2),ze(e.getTotalGorountineCount())}}function IHe(t,n){if(1&t&&(_(0,"option",35),A(1),w()),2&t){const e=n.$implicit,i=P();Nd("value",e),x(1),ze(i.ranges[e])}}const D2=function(t){return{"background-color":t}};function NHe(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function jHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,NHe,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function PHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",37),q(2,jHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function RHe(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function LHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,RHe,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function FHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",43),q(2,LHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function $He(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function BHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,$He,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function VHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",44),q(2,BHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function HHe(t,n){if(1&t&&(_(0,"span"),ie(1,"br")(2,"span",41),_(3,"span",42),A(4),w()()),2&t){const e=n.$implicit;x(2),S("ngStyle",ui(3,D2,e.color)),x(2),Ah("",e.series,": ",e.value,"")}}function UHe(t,n){if(1&t&&(_(0,"div",39),A(1),q(2,HHe,5,5,"span",40),w()),2&t){const e=n.model;x(1),wt(" ",e[0].name.toLocaleString()," "),x(1),S("ngForOf",e)}}function zHe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",45),q(2,UHe,3,2,"ng-template",null,38,lo),w()()),2&t){const e=P();x(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let GHe=(()=>{class t{route;consoleService;formBuilder;error="";showDelta=!1;statusData;rateGraphData=[];latencyGraphData=[];inputGraphData=[];outputGraphData=[];rangeForm;ranges={1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"};rangesKeys=Object.keys(this.ranges).map(e=>+e);colorScheme={domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]};samples=60;refreshTimer;$refreshTimer;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=fy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(g=>g.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=fy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn),te(js))};static \u0275cmp=nt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Status"),w(),q(2,kHe,4,2,"ngb-alert",1),_(3,"table",2),se("mouseover",function(){return r.showDelta=!0})("mouseout",function(){return r.showDelta=!1}),_(4,"thead",3)(5,"tr")(6,"th",4),A(7,"Node name"),w(),_(8,"th",4),A(9,"Sessions"),w(),_(10,"th",4),A(11,"Presences"),w(),_(12,"th",4),A(13,"Authoritative Matches"),w(),_(14,"th",4),A(15,"Goroutines"),w()()(),q(16,OHe,12,5,"tbody",5),w(),_(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),A(21,"View:"),w(),_(22,"div",9)(23,"select",10),se("change",function(s){return r.setRange(s)}),q(24,IHe,2,2,"option",11),aE(25,"sortNumbers"),w()()()()(),_(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),A(30,"Processing Latency"),w(),_(31,"small"),A(32," (ms)"),w()()(),_(33,"div",13)(34,"div",14)(35,"h5",15),A(36,"Rate"),w(),_(37,"small"),A(38," (rpc/s)"),w()()()(),_(39,"div",12)(40,"div",16),q(41,PHe,4,12,"div",17),w(),_(42,"div",16),q(43,FHe,4,12,"div",17),w()(),_(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),A(48,"Input"),w(),_(49,"small"),A(50," (kb/s)"),w()()(),_(51,"div",13)(52,"div",14)(53,"h5",15),A(54,"Output"),w(),_(55,"small"),A(56," (kb/s)"),w()()()(),_(57,"div",12)(58,"div",16),q(59,VHe,4,12,"div",17),w(),_(60,"div",16),q(61,zHe,4,12,"div",17),w()()),2&i&&(x(2),S("ngIf",r.error),x(14),S("ngIf",r.statusData),x(1),S("formGroup",r.rangeForm),x(7),S("ngForOf",lE(25,8,r.rangesKeys)),x(17),S("ngIf",r.latencyGraphData.length>0),x(2),S("ngIf",r.rateGraphData.length>0),x(16),S("ngIf",r.inputGraphData.length>0),x(2),S("ngIf",r.outputGraphData.length>0))},dependencies:function(){return[Bt,Ct,x7,dx,b7,pr,Rc,wLe,sHe,ms,_C,bC,Fm,ps,gs,Lo,ns,qHe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})}return t})(),WHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(_o(r=>$t(r.nodes.map(o=>o.name)))).pipe(Va(r=>(e.data={...e.data,error:r},$t([]))))}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),qHe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}static \u0275fac=function(i){return new(i||t)};static \u0275pipe=da({name:"sortNumbers",type:t,pure:!1})}return t})();var ss_isNegativeZero=function QHe(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t};function oY(t,n){var e="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(e+='in "'+t.mark.name+'" '),e+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(e+="\n\n"+t.mark.snippet),i+" "+e):i}function Zy(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=oY(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Zy.prototype=Object.create(Error.prototype)).constructor=Zy,Zy.prototype.toString=function(n){return this.name+": "+oY(this,n)};var wa=Zy,aUe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],lUe=["scalar","sequence","mapping"],$s=function uUe(t,n){if(n=n||{},Object.keys(n).forEach(function(e){if(-1===aUe.indexOf(e))throw new wa('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(e){return e},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=function cUe(t){var n={};return null!==t&&Object.keys(t).forEach(function(e){t[e].forEach(function(i){n[String(i)]=e})}),n}(n.styleAliases||null),-1===lUe.indexOf(this.kind))throw new wa('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function sY(t,n){var e=[];return t[n].forEach(function(i){var r=e.length;e.forEach(function(o,s){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(r=s)}),e[r]=i}),e}function $I(t){return this.extend(t)}$I.prototype.extend=function(n){var e=[],i=[];if(n instanceof $s)i.push(n);else if(Array.isArray(n))i=i.concat(n);else{if(!n||!Array.isArray(n.implicit)&&!Array.isArray(n.explicit))throw new wa("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.implicit&&(e=e.concat(n.implicit)),n.explicit&&(i=i.concat(n.explicit))}e.forEach(function(o){if(!(o instanceof $s))throw new wa("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&"scalar"!==o.loadKind)throw new wa("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new wa("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof $s))throw new wa("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create($I.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=sY(r,"implicit"),r.compiledExplicit=sY(r,"explicit"),r.compiledTypeMap=function dUe(){var n,e,t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(r){r.multi?(t.multi[r.kind].push(r),t.multi.fallback.push(r)):t[r.kind][r.tag]=t.fallback[r.tag]=r}for(n=0,e=arguments.length;n=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),SUe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),DUe=/^[-+]?[0-9]+e/,gY=new $s("tag:yaml.org,2002:float",{kind:"scalar",resolve:function kUe(t){return!(null===t||!SUe.test(t)||"_"===t[t.length-1])},construct:function TUe(t){var n,e;return e="-"===(n=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),".inf"===n?1===e?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:e*parseFloat(n,10)},predicate:function EUe(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ss_isNegativeZero(t))},represent:function AUe(t,n){var e;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ss_isNegativeZero(t))return"-0.0";return e=t.toString(10),DUe.test(e)?e.replace("e",".e"):e},defaultStyle:"lowercase"}),vY=dY.extend({implicit:[hY,fY,pY,gY]}),yY=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_Y=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),bY=new $s("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function MUe(t){return null!==t&&(null!==yY.exec(t)||null!==_Y.exec(t))},construct:function OUe(t){var n,e,i,r,o,s,a,h,l=0,c=null;if(null===(n=yY.exec(t))&&(n=_Y.exec(t)),null===n)throw new Error("Date resolve error");if(e=+n[1],i=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(e,i,r));if(o=+n[4],s=+n[5],a=+n[6],n[7]){for(l=n[7].slice(0,3);l.length<3;)l+="0";l=+l}return n[9]&&(c=6e4*(60*+n[10]+ +(n[11]||0)),"-"===n[9]&&(c=-c)),h=new Date(Date.UTC(e,i,r,o,s,a,l)),c&&h.setTime(h.getTime()-c),h},instanceOf:Date,represent:function IUe(t){return t.toISOString()}}),wY=new $s("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function NUe(t){return"<<"===t||null===t}}),BI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",xY=new $s("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function jUe(t){if(null===t)return!1;var n,e,i=0,r=t.length,o=BI;for(e=0;e64)){if(n<0)return!1;i+=6}return i%8==0},construct:function PUe(t){var n,e,i=t.replace(/[\r\n=]/g,""),r=i.length,o=BI,s=0,a=[];for(n=0;n>16&255),a.push(s>>8&255),a.push(255&s)),s=s<<6|o.indexOf(i.charAt(n));return 0==(e=r%4*6)?(a.push(s>>16&255),a.push(s>>8&255),a.push(255&s)):18===e?(a.push(s>>10&255),a.push(s>>2&255)):12===e&&a.push(s>>4&255),new Uint8Array(a)},predicate:function LUe(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function RUe(t){var i,r,n="",e=0,o=t.length,s=BI;for(i=0;i>18&63],n+=s[e>>12&63],n+=s[e>>6&63],n+=s[63&e]),e=(e<<8)+t[i];return 0==(r=o%3)?(n+=s[e>>18&63],n+=s[e>>12&63],n+=s[e>>6&63],n+=s[63&e]):2===r?(n+=s[e>>10&63],n+=s[e>>4&63],n+=s[e<<2&63],n+=s[64]):1===r&&(n+=s[e>>2&63],n+=s[e<<4&63],n+=s[64],n+=s[64]),n}}),FUe=Object.prototype.hasOwnProperty,$Ue=Object.prototype.toString,CY=new $s("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function BUe(t){if(null===t)return!0;var e,i,r,o,s,n=[],a=t;for(e=0,i=a.length;e{class t{confirmed=new Oe;canceled=new Oe;title="Delete Confirmation";message="Are you sure you want to delete this item?";confirmDeleteForm;closeModal(){this.canceled.emit()}cancel(){this.canceled.emit()}confirm(){(!this.confirmDeleteForm||this.confirmDeleteForm.valid)&&this.confirmed.emit()}get f(){return this.confirmDeleteForm.controls}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=nt({type:t,selectors:[["app-delete-confirm-dialog"]],inputs:{confirmDeleteForm:"confirmDeleteForm"},outputs:{confirmed:"confirmed",canceled:"canceled"},decls:14,vars:3,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","Close","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["class","d-flex flex-column justify-content-center",4,"ngIf"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"click"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],["class","mt-2",4,"ngIf"],["type","text","class","form-control","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",3,"ngClass",4,"ngIf"],[1,"mt-2"],["type","number","value","30","min","0",2,"width","80px",3,"formControlName"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h4",1),A(2),w(),_(3,"button",2),se("click",function(){return r.closeModal()}),_(4,"span",3),A(5,"\xd7"),w()()(),_(6,"div",4),A(7),q(8,gGe,4,3,"div",5),w(),_(9,"div",6)(10,"button",7),se("click",function(){return r.cancel()}),A(11,"Cancel"),w(),_(12,"button",8),se("click",function(){return r.confirm()}),A(13,"Delete"),w()()),2&i&&(x(2),ze(r.title),x(5),wt(" ",r.message," "),x(1),S("ngIf",r.confirmDeleteForm))},dependencies:[dp,Ct,ms,ts,SO,ps,gs,MO,Lo,ns]})}return t})(),Wa=(()=>{class t{modalService;constructor(e){this.modalService=e}openDeleteConfirmModal(e,i=null,r="",o=""){const a=this.modalService.open(mGe,{backdrop:!1,centered:!0});i&&(a.componentInstance.confirmDeleteForm=i),r&&(a.componentInstance.title=r),o&&(a.componentInstance.message=o),a.componentInstance.confirmed.subscribe(()=>{e(i?.value),a.close()}),a.componentInstance.canceled.subscribe(()=>{a.close()})}static \u0275fac=function(i){return new(i||t)(Ve(zC))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const vGe=["fileSelector"];function yGe(t,n){if(1&t&&(_(0,"div",8),A(1),w()),2&t){const e=P(2);x(1),ze(e.dropZoneLabel)}}function _Ge(t,n){if(1&t){const e=He();_(0,"div")(1,"input",9),se("click",function(r){return we(e),xe(P(2).openFileSelector(r))}),w()()}if(2&t){const e=P(2);x(1),Nd("value",e.browseBtnLabel),S("className",e.browseBtnClassName)}}function bGe(t,n){if(1&t&&(q(0,yGe,2,1,"div",6),q(1,_Ge,2,2,"div",7)),2&t){const e=P();S("ngIf",e.dropZoneLabel),x(1),S("ngIf",e.showBrowseBtn)}}function wGe(t,n){}const xGe=function(t){return{openFileSelector:t}};class j2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let aJ=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(te(ir))},t.\u0275dir=pt({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),lJ=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Oe,this.onFileOver=new Oe,this.onFileLeave=new Oe,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new j2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=fy(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new j2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new j2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(te(si),te(hs))},t.\u0275cmp=nt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&Cn(r,aJ,5,ir),2&e){let o;kt(o=Tt())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&xr(vGe,7),2&e){let r;kt(r=Tt())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(_(0,"div",0),se("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),_(1,"div",1)(2,"input",2,3),se("change",function(o){return i.uploadFiles(o)}),w(),q(4,bGe,2,2,"ng-template",null,4,lo),q(6,wGe,0,0,"ng-template",5),w()()),2&e){const r=As(5);Ft("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),S("className",i.dropZoneClassName),x(1),S("className",i.contentClassName),x(1),S("accept",i.accept)("multiple",i.multiple),Re("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),x(4),S("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",ui(13,xGe,i.openFileSelector))}},dependencies:[Ct,Ac],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),CGe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t,bootstrap:function(){return[lJ]}}),t.\u0275inj=Dn({imports:[Mh]}),t})();function SGe(t,n){1&t&&(_(0,"ngb-alert",21),ie(1,"img",22),_(2,"h6",23),A(3,"Failed to retrieve configuration."),w()()),2&t&&S("dismissible",!1)}function kGe(t,n){if(1&t&&(_(0,"span",32),A(1),w()),2&t){const e=P(2).$implicit;S("id",e.name),x(1),ze(e.value)}}function TGe(t,n){1&t&&(_(0,"span",33),A(1,"(empty)"),w()),2&t&&S("id",P(2).$implicit.name)}function DGe(t,n){if(1&t&&(_(0,"div",34)(1,"b"),A(2),w(),_(3,"label",26)(4,"a",27),ie(5,"img",10),w()()()),2&t){const e=P(2).index,i=P();x(2),ze(i.flatConfig[e+1].name),x(1),S("for",i.flatConfig[e+1].name),x(1),sp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",i.flatConfig[e+1].name,"",a1)}}function AGe(t,n){if(1&t&&(_(0,"span",32),A(1),w()),2&t){const e=P(3).index,i=P();S("id",i.flatConfig[e+1].name),x(1),ze(i.flatConfig[e+1].value)}}function EGe(t,n){if(1&t&&(_(0,"span",33),A(1,"(empty)"),w()),2&t){const e=P(3).index;S("id",P().flatConfig[e+1].name)}}function MGe(t,n){if(1&t&&(_(0,"div",35),q(1,AGe,2,2,"span",28),q(2,EGe,2,1,"span",29),w()),2&t){const e=P(2).index,i=P();x(1),S("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),x(1),S("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function OGe(t,n){if(1&t&&(_(0,"div",25)(1,"div",7)(2,"b"),A(3),w(),_(4,"label",26)(5,"a",27),ie(6,"img",10),w()()(),_(7,"div",7),q(8,kGe,2,2,"span",28),q(9,TGe,2,1,"span",29),w(),q(10,DGe,6,3,"div",30),q(11,MGe,3,2,"div",31),w()),2&t){const e=P(),i=e.index,r=e.$implicit,o=P();Ft("border-top-0",i>0),x(3),ze(r.name),x(1),S("for",r.name),x(1),sp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",r.value.name,"",a1),x(3),S("ngIf",!o.isEmpty(r.value)),x(1),S("ngIf",o.isEmpty(r.value)),x(1),S("ngIf",i{class t{config;route;httpClient;modalService;consoleService;formBuilder;deleteConfirmService;configError="";uploadError="";deleteError="";jsonConfig;flatConfig;nakamaVersion;file;uploading=!1;uploadSuccess=!1;deleteSuccess=!1;deleting=!1;confirmDeleteForm;apiConfig;constructor(e,i,r,o,s,a,l){this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.deleteConfirmService=l,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Sr.compose([Sr.required,Sr.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([sJ(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});XI.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(()=>{this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(VO(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})},this.confirmDeleteForm,"Delete All Data","Are you sure you want to delete all the database data?")}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(te(LO),te(Li),te(kC),te(zC),te(kn),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:41,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height","16"],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(q(0,SGe,4,1,"ngb-alert",0),_(1,"h2",1),A(2,"Server Configuration"),w(),_(3,"div",2)(4,"h5")(5,"b"),A(6,"Server version:"),w(),A(7),w(),_(8,"button",3),se("click",function(){return r.exportYaml()}),A(9,"Export Configuration"),w()(),_(10,"div",4),q(11,IGe,2,1,"ng-container",5),_(12,"div",6)(13,"div",7)(14,"b"),A(15,"runtime.env"),w(),_(16,"label",8)(17,"a",9),ie(18,"img",10),w()()(),_(19,"div",11),q(20,jGe,2,1,"div",12),q(21,PGe,3,0,"div",12),w()()(),_(22,"h5",13),A(23,"Import storage data"),w(),_(24,"p"),A(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),w(),q(26,RGe,6,2,"ngb-alert",0),q(27,LGe,4,1,"ngb-alert",14),_(28,"ngx-file-drop",15),se("onFileDrop",function(s){return r.dropped(s)}),q(29,FGe,2,0,"ng-template",16),w(),_(30,"h5",13),A(31,"Delete all data"),w(),q(32,$Ge,6,2,"ngb-alert",0),q(33,BGe,4,1,"ngb-alert",14),_(34,"div",17)(35,"div"),ie(36,"img",18),_(37,"small",19),A(38,"Warning - this operation is not reversible!"),w()(),_(39,"button",20),se("click",function(){return r.deleteData()}),A(40,"Delete all"),w()()),2&i&&(S("ngIf",r.configError),x(7),wt(" ",r.nakamaVersion,""),x(4),S("ngForOf",r.flatConfig),x(9),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&r.jsonConfig.runtime.env.length>0),x(1),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&0===r.jsonConfig.runtime.env.length),x(5),S("ngIf",r.uploadError),x(1),S("ngIf",r.uploadSuccess),x(1),S("disabled",r.uploading),x(4),S("ngIf",r.deleteError),x(1),S("ngIf",r.deleteSuccess),x(6),S("disabled",r.deleting))},dependencies:[lJ,aJ,Bt,Ct,pr],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})}return t})(),HGe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function UGe(t,n){if(1&t&&(_(0,"ngb-alert",48),ie(1,"img",49),_(2,"h6",50),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function zGe(t,n){1&t&&(_(0,"tr")(1,"td",51),A(2,"No additional users are setup. Create a new user below."),w()()),2&t&&(x(1),S("colSpan",4))}function GGe(t,n){if(1&t){const e=He();_(0,"tr")(1,"td"),A(2),w(),_(3,"td"),A(4),w(),_(5,"td")(6,"span",36),A(7,"Administrator"),w(),_(8,"span",36),A(9,"Developer"),w(),_(10,"span",36),A(11,"Maintainer"),w(),_(12,"span",36),A(13,"View Only"),w()(),_(14,"td")(15,"button",52),se("click",function(){const o=we(e).$implicit;return xe(P().deleteUser(o.username))}),A(16,"Delete"),w()()()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.username),x(2),ze(e.email),x(2),S("hidden",e.role!==i.adminRole),x(2),S("hidden",e.role!==i.developerRole),x(2),S("hidden",e.role!==i.maintainerRole),x(2),S("hidden",e.role!==i.readonlyRole)}}function WGe(t,n){if(1&t&&(_(0,"ngb-alert",48),ie(1,"img",49),_(2,"h6",50),A(3,"An error occurred:"),w(),_(4,"p",53),A(5),w()()),2&t){const e=P();S("dismissible",!1),x(5),ze(e.userCreateError)}}const QI=function(t){return{"is-invalid":t}};let qGe=(()=>{class t{route;consoleService;formBuilder;error="";userCreateError="";users=[];createUserForm;adminRole=nn.USER_ROLE_ADMIN;developerRole=nn.USER_ROLE_DEVELOPER;maintainerRole=nn.USER_ROLE_MAINTAINER;readonlyRole=nn.USER_ROLE_READONLY;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Sr.required],email:["",[Sr.required,Sr.email]],password:["",Sr.compose([Sr.required,Sr.minLength(8)])],role:[+this.readonlyRole,Sr.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(_o(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=nn.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=nn.USER_ROLE_ADMIN;break;case 2:e=nn.USER_ROLE_DEVELOPER;break;case 3:e=nn.USER_ROLE_MAINTAINER;break;case 4:e=nn.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(_o(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn),te(js))};static \u0275cmp=nt({type:t,selectors:[["app-users"]],decls:121,vars:25,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type","dismissible"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Management"),w(),q(2,UGe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),A(7,"Username"),w(),_(8,"th"),A(9,"Email"),w(),_(10,"th",5),A(11,"Role"),w(),_(12,"th",6),A(13,"Action"),w()()(),_(14,"tbody"),q(15,zGe,3,1,"tr",7),q(16,GGe,17,6,"tr",8),w()(),_(17,"h5",9),A(18,"Add new user"),w(),_(19,"ngb-alert",10)(20,"h6",11),A(21,"User roles"),w(),_(22,"div",12)(23,"div",13)(24,"div",14),ie(25,"img",15),_(26,"h6",16),A(27,"Administrator"),w()(),_(28,"small"),A(29," Owners have complete control over the server, its users and resources. "),w()(),_(30,"div",13)(31,"div",14),ie(32,"img",17),_(33,"h6",16),A(34,"Developer"),w()(),_(35,"small"),A(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),w()(),_(37,"div",13)(38,"div",14),ie(39,"img",18),_(40,"h6",16),A(41,"Maintainer"),w()(),_(42,"small"),A(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),w()(),_(44,"div",13)(45,"div",14),ie(46,"img",19),_(47,"h6",16),A(48,"View Only"),w()(),_(49,"small"),A(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),w()()()(),q(51,WGe,6,2,"ngb-alert",1),_(52,"div",20)(53,"form",21),se("ngSubmit",function(){return r.addUser()}),_(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),A(58,"Email"),w()(),_(59,"div",26),ie(60,"input",27),_(61,"div",28),A(62,"Email is required"),w()()()(),_(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),A(67,"Username"),w()(),_(68,"div",26),ie(69,"input",30),_(70,"div",28),A(71,"Username is required"),w()()()(),_(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),A(76,"Password"),w()(),_(77,"div",26),ie(78,"input",32),_(79,"div",28),A(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),w()()()(),_(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),A(85,"Role"),w()(),_(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),A(90,"Administrator"),w(),_(91,"span",36),A(92,"Developer"),w(),_(93,"span",36),A(94,"Maintainer"),w(),_(95,"span",36),A(96,"View Only"),w()(),_(97,"div",37),ie(98,"button",38),_(99,"div",39)(100,"button",40),se("click",function(){return r.f.role.setValue(+r.adminRole)}),A(101,"Administrator"),w(),_(102,"button",40),se("click",function(){return r.f.role.setValue(+r.developerRole)}),A(103,"Developer"),w(),_(104,"button",40),se("click",function(){return r.f.role.setValue(+r.maintainerRole)}),A(105,"Maintainer"),w(),_(106,"button",40),se("click",function(){return r.f.role.setValue(+r.readonlyRole)}),A(107,"View Only"),w()()()(),_(108,"div",28),A(109,"Role is required"),w()()()(),_(110,"div",41)(111,"div",42),ie(112,"div",24),_(113,"div",26)(114,"div",43),ie(115,"input",44),_(116,"label",45),A(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),w()()()()(),_(118,"div",46)(119,"button",47),A(120,"Save"),w()()()()),2&i&&(x(2),S("ngIf",r.error),x(13),S("ngIf",0===r.users.length),x(1),S("ngForOf",r.users),x(3),S("type","secondary")("dismissible",!1),x(32),S("ngIf",r.userCreateError),x(2),S("formGroup",r.createUserForm),x(7),S("ngClass",ui(19,QI,r.f.email.dirty&&r.f.email.errors)),x(1),S("hidden",r.f.email.disabled||r.f.email.valid||r.f.email.pristine),x(8),S("ngClass",ui(21,QI,r.f.username.dirty&&r.f.username.errors)),x(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),x(8),S("ngClass",ui(23,QI,r.f.password.dirty&&r.f.password.errors)),x(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),x(10),S("hidden",r.f.role.value!==+r.adminRole),x(2),S("hidden",r.f.role.value!==+r.developerRole),x(2),S("hidden",r.f.role.value!==+r.maintainerRole),x(2),S("hidden",r.f.role.value!==+r.readonlyRole),x(13),S("hidden",r.f.role.disabled||r.f.role.valid||r.f.role.pristine),x(11),S("disabled",r.createUserForm.invalid))},dependencies:[dp,Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,lC,ps,gs,Hh,Lo,ns],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})}return t})(),YGe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function JGe(t,n){if(1&t&&(_(0,"ngb-alert",10),ie(1,"img",11),_(2,"h6",12),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Failed to retrieve runtime information: ",e.error,"")}}function KGe(t,n){if(1&t&&(_(0,"tr")(1,"td"),A(2),w(),_(3,"td",13),A(4),w()()),2&t){const e=n.$implicit;x(2),ze(e.path),x(2),ze(e.mod_time)}}function XGe(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No Go modules were found."),w(),ie(3,"td"),w())}function QGe(t,n){if(1&t&&(_(0,"tr")(1,"td"),A(2),w(),_(3,"td",13),A(4),w()()),2&t){const e=n.$implicit;x(2),ze(e.path),x(2),ze(e.mod_time)}}function ZGe(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No Lua modules were found."),w(),ie(3,"td"),w())}function eWe(t,n){if(1&t&&(_(0,"tr")(1,"td"),A(2),w(),_(3,"td",13),A(4),w()()),2&t){const e=n.$implicit;x(2),ze(e.path),x(2),ze(e.mod_time)}}function tWe(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No JavaScript modules were found."),w(),ie(3,"td"),w())}const ZI=function(){return["/apiexplorer"]},eN=function(t){return{endpoint:t}};function nWe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),A(3),w()(),_(4,"td",15)(5,"a",16),A(6,"API Explorer"),w()()()),2&t){const e=n.$implicit;x(3),ze(e),x(2),S("routerLink",ma(3,ZI))("queryParams",ui(4,eN,e))}}function iWe(t,n){1&t&&(_(0,"tr")(1,"td",17),A(2,"No Go RPC functions were found."),w()())}function rWe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),A(3),w()(),_(4,"td",15)(5,"a",16),A(6,"API Explorer"),w()()()),2&t){const e=n.$implicit;x(3),ze(e),x(2),S("routerLink",ma(3,ZI))("queryParams",ui(4,eN,e))}}function oWe(t,n){1&t&&(_(0,"tr")(1,"td",17),A(2,"No Lua RPC functions were found."),w()())}function sWe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),A(3),w()(),_(4,"td",15)(5,"a",16),A(6,"API Explorer"),w()()()),2&t){const e=n.$implicit;x(3),ze(e),x(2),S("routerLink",ma(3,ZI))("queryParams",ui(4,eN,e))}}function aWe(t,n){1&t&&(_(0,"tr")(1,"td",17),A(2,"No JavaScript RPC functions were found."),w()())}let lWe=(()=>{class t{route;consoleService;error="";runtimeInfo;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Runtime Modules"),w(),q(2,JGe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),A(7,"Go Modules"),w(),_(8,"th",4),A(9,"Last Modified"),w()()(),_(10,"tbody"),q(11,KGe,5,2,"tr",5),q(12,XGe,4,0,"tr",6),w(),_(13,"thead",3)(14,"tr")(15,"th",7),A(16,"Lua Modules"),w()()(),_(17,"tbody"),q(18,QGe,5,2,"tr",5),q(19,ZGe,4,0,"tr",6),w(),_(20,"thead",3)(21,"tr")(22,"th",7),A(23,"JavaScript Modules"),w()()(),_(24,"tbody"),q(25,eWe,5,2,"tr",5),q(26,tWe,4,0,"tr",6),w()(),_(27,"h4",8),A(28,"Registered RPC Functions"),w(),_(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),A(33,"Go RPC Functions"),w()()(),_(34,"tbody"),q(35,nWe,7,6,"tr",5),q(36,iWe,3,0,"tr",6),w(),_(37,"thead",3)(38,"tr")(39,"th",7),A(40,"Lua RPC Functions"),w()()(),_(41,"tbody"),q(42,rWe,7,6,"tr",5),q(43,oWe,3,0,"tr",6),w(),_(44,"thead",3)(45,"tr")(46,"th",7),A(47,"JavaScript RPC Functions"),w()()(),_(48,"tbody"),q(49,sWe,7,6,"tr",5),q(50,aWe,3,0,"tr",6),w()()),2&i&&(x(2),S("ngIf",r.error),x(9),S("ngForOf",r.runtimeInfo.go_modules),x(1),S("ngIf",0===r.runtimeInfo.go_modules.length),x(6),S("ngForOf",r.runtimeInfo.lua_modules),x(1),S("ngIf",0===r.runtimeInfo.lua_modules.length),x(6),S("ngForOf",r.runtimeInfo.js_modules),x(1),S("ngIf",0===r.runtimeInfo.js_modules.length),x(9),S("ngForOf",r.runtimeInfo.go_rpc_functions),x(1),S("ngIf",0===r.runtimeInfo.go_rpc_functions.length),x(6),S("ngForOf",r.runtimeInfo.lua_rpc_functions),x(1),S("ngIf",0===r.runtimeInfo.lua_rpc_functions.length),x(6),S("ngForOf",r.runtimeInfo.js_rpc_functions),x(1),S("ngIf",0===r.runtimeInfo.js_rpc_functions.length))},dependencies:[Mc,Bt,Ct,pr],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})}return t})(),cWe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function uWe(t,n){1&t&&(_(0,"span"),A(1,"Filter by collection"),w())}function dWe(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.f.collection.value)}}function hWe(t,n){if(1&t){const e=He();_(0,"button",34),se("click",function(){const o=we(e).$implicit;return xe(P().f.collection.setValue(o))}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function fWe(t,n){if(1&t&&(_(0,"ngb-alert",35),ie(1,"img",36),_(2,"h6",37),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying storage objects: ",e.error,"")}}function pWe(t,n){1&t&&(_(0,"th",38),A(1,"Remove"),w())}function gWe(t,n){1&t&&(_(0,"tr")(1,"td",39),A(2,"No storage objects found - change the filter criteria or add new objects."),w()())}function mWe(t,n){if(1&t){const e=He();_(0,"td",42)(1,"button",43),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteObject(r,s,a))}),A(2,"Delete"),w()()}}function vWe(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(2),w(),_(3,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(4),w(),_(5,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(6),w(),_(7,"td",40),se("click",function(){const o=we(e).$implicit;return xe(P().viewObject(o))}),A(8),w(),q(9,mWe,3,0,"td",41),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.collection),x(2),ze(e.key),x(2),ze(e.user_id),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed())}}let yWe=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";collections=[];objects=[];objectCount=0;nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Storage Objects"),w(),_(2,"h6",1),A(3),w(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),se("ngSubmit",function(){return r.search(0)}),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),q(12,uWe,2,0,"span",10),q(13,dWe,2,1,"span",10),w(),_(14,"div",11)(15,"button",12),se("click",function(){return r.f.collection.reset()}),A(16,"\u2718 Deselect collection"),w(),ie(17,"div",13),q(18,hWe,2,1,"button",14),w()()(),ie(19,"input",15)(20,"input",16),_(21,"div",17)(22,"span",18),se("click",function(){return r.f.user_id.setValue(r.systemUserId)}),ie(23,"img",19),w()(),_(24,"div",17)(25,"button",20),se("click",function(){return r.search(0)}),A(26,"Search"),w()()()()(),_(27,"div",21)(28,"div",22)(29,"button",23),se("click",function(){return r.search(0)}),ie(30,"img",24),w(),_(31,"button",23),se("click",function(){return r.search(1)}),ie(32,"img",25),w()()()()(),q(33,fWe,4,2,"ngb-alert",26),_(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),A(39,"Collection Name"),w(),_(40,"th"),A(41,"Key Name"),w(),_(42,"th",30),A(43,"User ID"),w(),_(44,"th",31),A(45,"Last Update"),w(),q(46,pWe,2,0,"th",32),w()(),_(47,"tbody"),q(48,gWe,3,0,"tr",10),q(49,vWe,10,5,"tr",33),w()()()),2&i&&(x(3),wt("",r.objectCount," objects found."),x(4),S("formGroup",r.searchForm),x(4),S("disabled",0===r.collections.length),x(1),S("ngIf",!r.f.collection.value||""===r.f.collection.value),x(1),S("ngIf",r.f.collection.value&&""!==r.f.collection.value),x(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),x(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),x(1),S("ngForOf",r.collections),x(7),S("disabled",r.disableSearch()),x(4),S("disabled",0===r.objects.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.objects.length),x(1),S("ngForOf",r.objects))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),_We=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),bWe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var tN,cJ,uJ,dJ,hJ,fJ,pJ,gJ,mJ,vJ,yJ,_J,bJ,wJ,xJ,CJ,SJ,kJ,TJ,DJ,AJ,EJ,MJ,OJ,IJ,NJ,jJ,PJ,RJ,LJ,FJ,$J,BJ,VJ,HJ,UJ,zJ,GJ,WJ,qJ,YJ,JJ,KJ,XJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,gK,mK,vK,yK,_K,bK,wK,xK,CK,SK,kK,TK,DK,AK,EK,MK,OK,IK,NK,jK,PK,RK,LK,FK,$K,BK,VK,HK,UK,zK,GK,WK,qK,YK,JK,KK,XK,QK,ZK,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,gX,mX,vX,yX,_X,bX,wX,xX,CX,SX,kX,TX,DX,AX,EX,MX,OX,IX,NX,jX,PX,RX,LX,FX,$X,BX,VX,HX,UX,zX,GX,WX,qX,YX,JX,KX,XX,QX,ZX,eQ,tQ,nQ,iQ,rQ,oQ,sQ,aQ,lQ,cQ,uQ,dQ,hQ,fQ,pQ,gQ,mQ,vQ,yQ,_Q,bQ,wQ,xQ,CQ,SQ,kQ,TQ,DQ,AQ,EQ,MQ,OQ,IQ,NQ,jQ,PQ,RQ,LQ,FQ,$Q,BQ,VQ,HQ,UQ,zQ,GQ,WQ,qQ,YQ,JQ,KQ,XQ,QQ,ZQ,eZ,tZ,nZ,iZ,rZ,oZ,sZ,aZ,lZ,cZ,uZ,dZ,hZ,fZ,pZ,gZ,mZ,vZ,yZ,_Z,bZ,wZ,xZ,CZ,SZ,kZ,TZ,DZ,AZ,EZ,MZ,OZ,IZ,NZ,jZ,PZ,RZ,LZ,FZ,$Z,BZ,VZ,HZ,UZ,zZ,GZ,WZ,qZ,YZ,JZ,KZ,XZ,QZ,ZZ,eee,tee,nee,iee,ree,oee,see,aee,lee,cee,uee,dee,hee,fee,pee,gee,mee,vee,yee,_ee,bee,wWe=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],xWe=["mainAxis","crossAxis","limiter"];function r_(t){var n="function"==typeof Map?new Map:void 0;return r_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return nN(e,arguments,Xn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o_(r,e)},r_(t)}function nN(t,n,e){return(nN=Tee()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&o_(a,o.prototype),a}).apply(null,arguments)}function fe(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function wee(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function _e(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=P2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function bt(){bt=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(z,Y,O){z[Y]=O.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(z,Y,O){return Object.defineProperty(z,Y,{value:O,enumerable:!0,configurable:!0,writable:!0}),z[Y]}try{l({},"")}catch{l=function(Y,O,H){return Y[O]=H}}function c(z,Y,O,H){var F=Object.create((Y&&Y.prototype instanceof h?Y:h).prototype),Z=new N(H||[]);return i(F,"_invoke",{value:k(z,O,Z)}),F}function u(z,Y,O){try{return{type:"normal",arg:z.call(Y,O)}}catch(H){return{type:"throw",arg:H}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var g={};l(g,o,function(){return this});var m=Object.getPrototypeOf,v=m&&m(m($([])));v&&v!==n&&e.call(v,o)&&(g=v);var y=p.prototype=h.prototype=Object.create(g);function b(z){["next","throw","return"].forEach(function(Y){l(z,Y,function(O){return this._invoke(Y,O)})})}function C(z,Y){function O(G,F,Z,D){var E=u(z[G],z,F);if("throw"!==E.type){var M=E.arg,U=M.value;return U&&"object"==xt(U)&&e.call(U,"__await")?Y.resolve(U.__await).then(function(L){O("next",L,Z,D)},function(L){O("throw",L,Z,D)}):Y.resolve(U).then(function(L){M.value=L,Z(M)},function(L){return O("throw",L,Z,D)})}D(E.arg)}var H;i(this,"_invoke",{value:function(G,F){function Z(){return new Y(function(D,E){O(G,F,D,E)})}return H=H?H.then(Z,Z):Z()}})}function k(z,Y,O){var H="suspendedStart";return function(G,F){if("executing"===H)throw new Error("Generator is already running");if("completed"===H){if("throw"===G)throw F;return{value:void 0,done:!0}}for(O.method=G,O.arg=F;;){var Z=O.delegate;if(Z){var D=T(Z,O);if(D){if(D===d)continue;return D}}if("next"===O.method)O.sent=O._sent=O.arg;else if("throw"===O.method){if("suspendedStart"===H)throw H="completed",O.arg;O.dispatchException(O.arg)}else"return"===O.method&&O.abrupt("return",O.arg);H="executing";var E=u(z,Y,O);if("normal"===E.type){if(H=O.done?"completed":"suspendedYield",E.arg===d)continue;return{value:E.arg,done:O.done}}"throw"===E.type&&(H="completed",O.method="throw",O.arg=E.arg)}}}function T(z,Y){var O=Y.method,H=z.iterator[O];if(void 0===H)return Y.delegate=null,"throw"===O&&z.iterator.return&&(Y.method="return",Y.arg=void 0,T(z,Y),"throw"===Y.method)||"return"!==O&&(Y.method="throw",Y.arg=new TypeError("The iterator does not provide a '"+O+"' method")),d;var G=u(H,z.iterator,Y.arg);if("throw"===G.type)return Y.method="throw",Y.arg=G.arg,Y.delegate=null,d;var F=G.arg;return F?F.done?(Y[z.resultName]=F.value,Y.next=z.nextLoc,"return"!==Y.method&&(Y.method="next",Y.arg=void 0),Y.delegate=null,d):F:(Y.method="throw",Y.arg=new TypeError("iterator result is not an object"),Y.delegate=null,d)}function j(z){var Y={tryLoc:z[0]};1 in z&&(Y.catchLoc=z[1]),2 in z&&(Y.finallyLoc=z[2],Y.afterLoc=z[3]),this.tryEntries.push(Y)}function B(z){var Y=z.completion||{};Y.type="normal",delete Y.arg,z.completion=Y}function N(z){this.tryEntries=[{tryLoc:"root"}],z.forEach(j,this),this.reset(!0)}function $(z){if(z){var Y=z[o];if(Y)return Y.call(z);if("function"==typeof z.next)return z;if(!isNaN(z.length)){var O=-1,H=function G(){for(;++O=0;--H){var G=this.tryEntries[H],F=G.completion;if("root"===G.tryLoc)return O("end");if(G.tryLoc<=this.prev){var Z=e.call(G,"catchLoc"),D=e.call(G,"finallyLoc");if(Z&&D){if(this.prev=0;--O){var H=this.tryEntries[O];if(H.tryLoc<=this.prev&&e.call(H,"finallyLoc")&&this.prev=0;--Y){var O=this.tryEntries[Y];if(O.finallyLoc===z)return this.complete(O.completion,O.afterLoc),B(O),d}},catch:function(z){for(var Y=this.tryEntries.length-1;Y>=0;--Y){var O=this.tryEntries[Y];if(O.tryLoc===z){var H=O.completion;if("throw"===H.type){var G=H.arg;B(O)}return G}}throw new Error("illegal catch attempt")},delegateYield:function(z,Y,O){return this.delegate={iterator:$(z),resultName:Y,nextLoc:O},"next"===this.method&&(this.arg=void 0),d}},t}function xee(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function ni(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){xee(o,i,r,s,a,"next",l)}function a(l){xee(o,i,r,s,a,"throw",l)}s(void 0)})}}function Wt(t,n){return See(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||P2(t,n)||Cee()}function Cee(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function See(t){if(Array.isArray(t))return t}function kee(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Ee(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xn(t){return(Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function ue(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Dee(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function Wu(t,n){return new t(n)}var a_,L2=new Map,sN=0;function Bee(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function AWe(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=oN(t),g=L2.get(p)||function EWe(t,n){var e={stylesheet:TWe(n),rules:{}};return L2.set(t,e),e}(p,t),m=g.stylesheet,v=g.rules;v[f]||(v[f]=!0,m.insertRule("@keyframes ".concat(f," ").concat(h),m.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),sN+=1,f}function l_(t){a_=t}function fv(){if(!a_)throw new Error("Function called outside component initialization");return a_}function Kl(t){fv().$$.on_mount.push(t)}function Vc(t){fv().$$.on_destroy.push(t)}function Vee(){var t=fv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=$ee(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function Hee(t,n){return fv().$$.context.set(t,n),n}function xs(t){return fv().$$.context.get(t)}function F2(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var pv=[],qn=[],$2=[],aN=[],Uee=Promise.resolve(),lN=!1;function zee(){lN||(lN=!0,Uee.then(Gee))}function Ya(){return zee(),Uee}function Yp(t){$2.push(t)}function Hc(t){aN.push(t)}var B2,cN=new Set,gv=0;function Gee(){if(0===gv){var t=a_;do{try{for(;gvl.start&&(a=d(l,b),l=null,uN(t,a.b,"start"),B&&(u(),c=Bee(t,s,a.b,a.duration,0,k,o.css))),a&&($>=a.end?(j(s=a.b,1-s),uN(t,a.b,"end"),l||(a.b?u():--a.group.r||rr(a.group.c)),a=null):$>=a.start&&(s=a.a+a.d*k(($-a.start)/a.duration),j(s,1-s))),!(!a&&!l)},0===s_.size&&rN(Pee),new Promise(function($){s_.add({c:p,f:$})}))}return{run:function(f){bs(o)?(B2||(B2=Promise.resolve()).then(function(){B2=null}),B2).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var dN=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function NWe(t,n){t.d(1),n.delete(t.key)}function hN(t,n){Q(t,1,1,function(){n.delete(t.key)})}function U2(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,g={};p--;)g[t[p].key]=p;var m=[],v=new Map,y=new Map;for(p=f;p--;){var b=d(r,o,p),C=e(b),k=s.get(C);k?i&&k.p(b,n):(k=c(C,b)).c(),v.set(C,m[p]=k),C in g&&y.set(C,Math.abs(p-g[C]))}var T=new Set,j=new Set;function B(O){W(O,1),O.m(a,u),s.set(O.key,O),u=O.first,f--}for(;h&&f;){var N=m[f-1],$=t[h-1],V=N.key,z=$.key;N===$?(u=N.first,h--,f--):v.has(z)?!s.has(V)||T.has(V)?B(N):j.has(z)?h--:y.get(V)>y.get(z)?(j.add(V),B(N)):(T.add(z),h--):(l($,s),h--)}for(;h--;){var Y=t[h];v.has(Y.key)||l(Y,s)}for(;f;)B(m[f-1]);return m}function Jp(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function z2(t){return"object"===xt(t)&&null!==t?t:{}}function Uc(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function $e(t){t&&t.c()}function Le(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||Yp(function(){var a,l=t.$$.on_mount.map(Oee).filter(bs);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,sn(l)):rr(l),t.$$.on_mount=[]}),s.forEach(Yp)}function Fe(t,n){var e=t.$$;null!==e.fragment&&(rr(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Pt(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=a_;l_(t);var c=t.$$={fragment:null,ctx:[],props:o,update:tt,not_equal:r,bound:Iee(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:Iee(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function jWe(t,n){-1===t.$$.dirty[0]&&(pv.push(t),zee(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function LWe(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function FWe(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?Mee:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var BWe=dN.window;function VWe(t){gn(t,"svelte-n7cvum",".svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}")}function qee(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=t[1].closeButton&&Yee(t),C=t[2];return C&&(s=Wu(C,{})),{c:function(){n=oe("div"),e=oe("div"),i=oe("div"),b&&b.c(),r=Me(),o=oe("div"),s&&$e(s.$$.fragment),I(o,"class",a=Tr(t[1].classContent)+" svelte-n7cvum"),I(o,"style",t[9]),Xe(o,"content",!t[0]),I(i,"class",l=Tr(t[1].classWindow)+" svelte-n7cvum"),I(i,"role","dialog"),I(i,"aria-modal","true"),I(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),I(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),I(i,"style",t[8]),Xe(i,"window",!t[0]),I(e,"class",h=Tr(t[1].classWindowWrap)+" svelte-n7cvum"),I(e,"style",t[7]),Xe(e,"wrap",!t[0]),I(n,"id",f=t[1].id),I(n,"class",p=Tr(t[1].classBg)+" svelte-n7cvum"),I(n,"style",t[6]),Xe(n,"bg",!t[0])},m:function(k,T){ve(k,n,T),ee(n,e),ee(e,i),b&&b.m(i,null),ee(i,r),ee(i,o),s&&Le(s,o,null),t[50](i),t[51](e),t[52](n),m=!0,v||(y=[Ze(i,"introstart",function(){bs(t[13])&&t[13].apply(this,arguments)}),Ze(i,"outrostart",function(){bs(t[14])&&t[14].apply(this,arguments)}),Ze(i,"introend",function(){bs(t[15])&&t[15].apply(this,arguments)}),Ze(i,"outroend",function(){bs(t[16])&&t[16].apply(this,arguments)}),Ze(n,"mousedown",t[20]),Ze(n,"mouseup",t[21])],v=!0)},p:function(k,T){if((t=k)[1].closeButton?b?(b.p(t,T),2&T[0]&&W(b,1)):((b=Yee(t)).c(),W(b,1),b.m(i,r)):b&&(it(),Q(b,1,1,function(){b=null}),rt()),C!==(C=t[2])){if(s){it();var j=s;Q(j.$$.fragment,1,0,function(){Fe(j,1)}),rt()}C?($e((s=Wu(C,{})).$$.fragment),W(s.$$.fragment,1),Le(s,o,null)):s=null}(!m||2&T[0]&&a!==(a=Tr(t[1].classContent)+" svelte-n7cvum"))&&I(o,"class",a),(!m||512&T[0])&&I(o,"style",t[9]),(!m||3&T[0])&&Xe(o,"content",!t[0]),(!m||2&T[0]&&l!==(l=Tr(t[1].classWindow)+" svelte-n7cvum"))&&I(i,"class",l),(!m||2&T[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&I(i,"aria-label",c),(!m||2&T[0]&&u!==(u=t[1].ariaLabelledBy||null))&&I(i,"aria-labelledby",u),(!m||256&T[0])&&I(i,"style",t[8]),(!m||3&T[0])&&Xe(i,"window",!t[0]),(!m||2&T[0]&&h!==(h=Tr(t[1].classWindowWrap)+" svelte-n7cvum"))&&I(e,"class",h),(!m||128&T[0])&&I(e,"style",t[7]),(!m||3&T[0])&&Xe(e,"wrap",!t[0]),(!m||2&T[0]&&f!==(f=t[1].id))&&I(n,"id",f),(!m||2&T[0]&&p!==(p=Tr(t[1].classBg)+" svelte-n7cvum"))&&I(n,"class",p),(!m||64&T[0])&&I(n,"style",t[6]),(!m||3&T[0])&&Xe(n,"bg",!t[0])},i:function(k){m||(W(b),s&&W(s.$$.fragment,k),Yp(function(){d||(d=H2(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),Yp(function(){g||(g=H2(n,t[11],t[1].transitionBgProps,!0)),g.run(1)}),m=!0)},o:function(k){Q(b),s&&Q(s.$$.fragment,k),d||(d=H2(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),g||(g=H2(n,t[11],t[1].transitionBgProps,!1)),g.run(0),m=!1},d:function(k){k&&me(n),b&&b.d(),s&&Fe(s),t[50](null),k&&d&&d.end(),t[51](null),t[52](null),k&&g&&g.end(),v=!1,rr(y)}}}function Yee(t){var n,e,i,r,o,s=[UWe,HWe],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=Ci()},m:function(c,u){a[e].m(c,u),ve(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(it(),Q(a[d],1,1,function(){a[d]=null}),rt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),W(i,1),i.m(r.parentNode,r))},i:function(c){o||(W(i),o=!0)},o:function(c){Q(i),o=!1},d:function(c){a[e].d(c),c&&me(r)}}}function HWe(t){var n,e,i,r;return{c:function(){I(n=oe("button"),"class",e=Tr(t[1].classCloseButton)+" svelte-n7cvum"),I(n,"aria-label","Close modal"),I(n,"style",t[10]),I(n,"type","button"),Xe(n,"close",!t[0])},m:function(o,s){ve(o,n,s),i||(r=Ze(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=Tr(o[1].classCloseButton)+" svelte-n7cvum")&&I(n,"class",e),1024&s[0]&&I(n,"style",o[10]),3&s[0]&&Xe(n,"close",!o[0])},i:tt,o:tt,d:function(o){o&&me(n),i=!1,r()}}}function UWe(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=Wu(r,o(t))),{c:function(){n&&$e(n.$$.fragment),e=Ci()},m:function(s,a){n&&Le(n,s,a),ve(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){it();var l=n;Q(l.$$.fragment,1,0,function(){Fe(l,1)}),rt()}r?($e((n=Wu(r,o(s))).$$.fragment),W(n.$$.fragment,1),Le(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&W(n.$$.fragment,s),i=!0)},o:function(s){n&&Q(n.$$.fragment,s),i=!1},d:function(s){s&&me(e),n&&Fe(n,s)}}}function zWe(t){var n,e,i,r,o=t[2]&&qee(t),s=t[49].default,a=ko(s,t,t[48],null);return{c:function(){o&&o.c(),n=Me(),a&&a.c()},m:function(l,c){o&&o.m(l,c),ve(l,n,c),a&&a.m(l,c),e=!0,i||(r=Ze(BWe,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&W(o,1)):((o=qee(l)).c(),W(o,1),o.m(n.parentNode,n)):o&&(it(),Q(o,1,1,function(){o=null}),rt()),a&&a.p&&(!e||131072&c[1])&&Do(a,s,l,l[48],e?To(s,l[48],c,null):Ao(l[48]),null)},i:function(l){e||(W(o),W(a,l),e=!0)},o:function(l){Q(o),Q(a,l),e=!1},d:function(l){o&&o.d(l),l&&me(n),a&&a.d(l),i=!1,r()}}}function Jee(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Ee(Ee({},e),{},{props:Ee(Ee({},n),e.props)}))}}function GWe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y=n.$$slots,b=void 0===y?{}:y,C=n.$$scope,k=Vee(),j=n.isTabbable,B=void 0===j?function(Se){return Se.tabIndex>=0&&!Se.hidden&&!Se.disabled&&"none"!==Se.style.display&&"hidden"!==Se.type&&Boolean(Se.offsetWidth||Se.offsetHeight||Se.getClientRects().length)}:j,N=n.show,$=void 0===N?null:N,V=n.id,z=void 0===V?null:V,Y=n.key,O=void 0===Y?"simple-modal":Y,H=n.ariaLabel,G=void 0===H?null:H,F=n.ariaLabelledBy,Z=void 0===F?null:F,D=n.closeButton,E=void 0===D||D,M=n.closeOnEsc,U=void 0===M||M,L=n.closeOnOuterClick,X=void 0===L||L,ne=n.styleBg,ge=void 0===ne?{}:ne,ae=n.styleWindowWrap,De=void 0===ae?{}:ae,be=n.styleWindow,Ie=void 0===be?{}:be,R=n.styleContent,J=void 0===R?{}:R,K=n.styleCloseButton,pe=void 0===K?{}:K,Te=n.classBg,ye=void 0===Te?null:Te,Ue=n.classWindowWrap,Je=void 0===Ue?null:Ue,_t=n.classWindow,zt=void 0===_t?null:_t,ct=n.classContent,Nn=void 0===ct?null:ct,mt=n.classCloseButton,pi=void 0===mt?null:mt,ki=n.unstyled,ci=void 0!==ki&&ki,yi=n.setContext,bn=void 0===yi?Hee:yi,Hi=n.transitionBg,Ir=void 0===Hi?$We:Hi,Nt=n.transitionBgProps,Ge=void 0===Nt?{duration:250}:Nt,cn=n.transitionWindow,Pn=void 0===cn?Ir:cn,Ti=n.transitionWindowProps,vr=void 0===Ti?Ge:Ti,qr=n.disableFocusTrap,Be=void 0!==qr&&qr,jt={id:z,ariaLabel:G,ariaLabelledBy:Z,closeButton:E,closeOnEsc:U,closeOnOuterClick:X,styleBg:ge,styleWindowWrap:De,styleWindow:Ie,styleContent:J,styleCloseButton:pe,classBg:ye,classWindowWrap:Je,classWindow:zt,classContent:Nn,classCloseButton:pi,transitionBg:Ir,transitionBgProps:Ge,transitionWindow:Pn,transitionWindowProps:vr,disableFocusTrap:Be,isTabbable:B,unstyled:ci},an=Ee({},jt),wn=null,Mi=function(Se){return Se?Object.keys(Se).reduce(function(At,rn){return"".concat(At,"; ").concat((hn=rn,hn.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Se[rn]);var hn},""):""},Ui=function(Se){return!!(Se&&Se.constructor&&Se.call&&Se.apply)},nr=function(){e(6,a=Mi(Object.assign({},{width:window.innerWidth,height:window.innerHeight},an.styleBg))),e(7,l=Mi(an.styleWindowWrap)),e(8,c=Mi(an.styleWindow)),e(9,u=Mi(an.styleContent)),e(10,d=Mi(an.styleCloseButton)),e(11,h=an.transitionBg),e(12,f=an.transitionWindow)},Go=function(){},_i=Go,Wo=Go,Ys=Go,Js=Go,Pl=function(Se){var rn=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},hn=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,wn=Jee(Se,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,an=Ee(Ee({},jt),rn)),nr(),Ce(),e(13,_i=function(dn){hn.onOpen&&hn.onOpen(dn),k("open"),k("opening")}),e(14,Wo=function(dn){hn.onClose&&hn.onClose(dn),k("close"),k("closing")}),e(15,Ys=function(dn){hn.onOpened&&hn.onOpened(dn),k("opened")}),e(16,Js=function(dn){hn.onClosed&&hn.onClosed(dn),k("closed")})},le=function(){var Se=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};wn&&(e(14,Wo=Se.onClose||Wo),e(16,Js=Se.onClosed||Js),e(2,wn=null),ke())},Ce=function(){s=window.scrollY,p=document.body.style.position,g=document.body.style.overflow,m=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},ke=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=g||"",document.body.style.width=m||"",window.scrollTo({top:s,left:0,behavior:"instant"})};bn(O,{open:Pl,close:le});var Pe=!1;return Vc(function(){Pe&&le()}),Kl(function(){e(47,Pe=!0)}),t.$$set=function(Se){"isTabbable"in Se&&e(22,B=Se.isTabbable),"show"in Se&&e(23,$=Se.show),"id"in Se&&e(24,z=Se.id),"key"in Se&&e(25,O=Se.key),"ariaLabel"in Se&&e(26,G=Se.ariaLabel),"ariaLabelledBy"in Se&&e(27,Z=Se.ariaLabelledBy),"closeButton"in Se&&e(28,E=Se.closeButton),"closeOnEsc"in Se&&e(29,U=Se.closeOnEsc),"closeOnOuterClick"in Se&&e(30,X=Se.closeOnOuterClick),"styleBg"in Se&&e(31,ge=Se.styleBg),"styleWindowWrap"in Se&&e(32,De=Se.styleWindowWrap),"styleWindow"in Se&&e(33,Ie=Se.styleWindow),"styleContent"in Se&&e(34,J=Se.styleContent),"styleCloseButton"in Se&&e(35,pe=Se.styleCloseButton),"classBg"in Se&&e(36,ye=Se.classBg),"classWindowWrap"in Se&&e(37,Je=Se.classWindowWrap),"classWindow"in Se&&e(38,zt=Se.classWindow),"classContent"in Se&&e(39,Nn=Se.classContent),"classCloseButton"in Se&&e(40,pi=Se.classCloseButton),"unstyled"in Se&&e(0,ci=Se.unstyled),"setContext"in Se&&e(41,bn=Se.setContext),"transitionBg"in Se&&e(42,Ir=Se.transitionBg),"transitionBgProps"in Se&&e(43,Ge=Se.transitionBgProps),"transitionWindow"in Se&&e(44,Pn=Se.transitionWindow),"transitionWindowProps"in Se&&e(45,vr=Se.transitionWindowProps),"disableFocusTrap"in Se&&e(46,Be=Se.disableFocusTrap),"$$scope"in Se&&e(48,C=Se.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&&Pe&&(Ui($)?Pl($):le())},[ci,an,wn,i,r,o,a,l,c,u,d,h,f,_i,Wo,Ys,Js,Ui,le,function(Se){if(an.closeOnEsc&&wn&&"Escape"===Se.key&&(Se.preventDefault(),le()),wn&&"Tab"===Se.key&&!an.disableFocusTrap){var At=o.querySelectorAll("*"),rn=Array.from(At).filter(an.isTabbable).sort(function(dn,Di){return dn.tabIndex-Di.tabIndex}),hn=rn.indexOf(document.activeElement);-1===hn&&Se.shiftKey&&(hn=0),hn+=rn.length+(Se.shiftKey?-1:1),rn[hn%=rn.length].focus(),Se.preventDefault()}},function(Se){!an.closeOnOuterClick||Se.target!==i&&Se.target!==r||(v=Se.target)},function(Se){an.closeOnOuterClick&&Se.target===v&&(Se.preventDefault(),le())},B,$,z,O,G,Z,E,U,X,ge,De,Ie,J,pe,ye,Je,zt,Nn,pi,bn,Ir,Ge,Pn,vr,Be,Pe,C,b,function(Se){qn[Se?"unshift":"push"](function(){e(5,o=Se)})},function(Se){qn[Se?"unshift":"push"](function(){e(4,r=Se)})},function(Se){qn[Se?"unshift":"push"](function(){e(3,i=Se)})}]}var Fr,Zi,zc,qu,Gc,Xl,Kee=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,GWe,zWe,po,{isTabbable:22,show:23,id:24,key:25,ariaLabel:26,ariaLabelledBy:27,closeButton:28,closeOnEsc:29,closeOnOuterClick:30,styleBg:31,styleWindowWrap:32,styleWindow:33,styleContent:34,styleCloseButton:35,classBg:36,classWindowWrap:37,classWindow:38,classContent:39,classCloseButton:40,unstyled:0,setContext:41,transitionBg:42,transitionBgProps:43,transitionWindow:44,transitionWindowProps:45,disableFocusTrap:46},VWe,[-1,-1,-1]),r}return de(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Fr||(Fr={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(Zi||(Zi={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(zc||(zc={})),function(t){t.info="info",t.warning="warning",t.error="error"}(qu||(qu={})),function(t){t.key="key",t.value="value"}(Gc||(Gc={})),function(t){t.asc="asc",t.desc="desc"}(Xl||(Xl={}));var Kp=[{start:0,end:100}],Xp={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},WWe=Ee(Ee({},Xp),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),qWe=Ee(Ee({},Xp),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),Xee=Ee(Ee({},Xp),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),fN="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",pN="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",YWe="NO",gN="SELF",mN="NEXT_INSIDE",JWe=(qa(tN={},Xl.asc,"ascending"),qa(tN,Xl.desc,"descending"),tN),KWe=0;function c_(){return++KWe}function sf(t){return(sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function er(t){return Array.isArray(t)}function Dr(t){return null!==t&&"object"===sf(t)&&t.constructor===Object}function Qee(t){return!(!t||"object"!==sf(t))&&"add"===t.op}function Zee(t){return!(!t||"object"!==sf(t))&&"remove"===t.op}function vN(t){return!(!t||"object"!==sf(t))&&"replace"===t.op}function yN(t){return!(!t||"object"!==sf(t))&&"copy"===t.op}function mv(t){return!(!t||"object"!==sf(t))&&"move"===t.op}function _N(t){return(_N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function XWe(t,n){return t===n}function ete(t){return t.slice(0,t.length-1)}function tte(t){return"object"===_N(t)&&null!==t}function u_(t){return(u_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function nte(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function QWe(t,n,e){return r=function(o,s){if("object"!==u_(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==u_(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===u_(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function bN(t){if(er(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Dr(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=Wc(t?t[r]:void 0,n.slice(1),e,i);if(Dr(t)||er(t))return wN(t,r,o);if(i){var s=ZWe.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var ZWe=/^\d+$/;function ite(t,n,e){if(0===n.length)return e(t);if(!tte(t))throw new Error("Path doesn't exist");var i=n[0];return wN(t,i,ite(t[i],n.slice(1),e))}function xN(t,n){if(0===n.length)return t;if(!tte(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=bN(t);return er(i)&&i.splice(parseInt(e),1),Dr(i)&&delete i[e],i}return t}var r=n[0];return wN(t,r,xN(t[r],n.slice(1)))}function CN(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return ite(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=bN(o);return s.splice(parseInt(r),0,e),s})}function Ql(t,n){return void 0!==t&&(0===n.length||null!==t&&Ql(t[n[0]],n.slice(1)))}function qc(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function gt(t){return t.map(rte).join("")}function rte(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function SN(t,n){return t+rte(n)}function vv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Yc(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:XWe;if(p.length=0?B=function(){var $="",V=!0;"-"==t[s]&&($+=h()),$+="0"==t[s]?h():g(),"."==t[s]&&($+=h()+g(),V=!1),"e"!=t[s]&&"E"!=t[s]||($+=h(),"+"!=t[s]&&"-"!=t[s]||($+=h()),$+=g(),V=!1);var z=+$;return a&&V&&(z>Number.MAX_SAFE_INTEGER||z="a"&&B<="f"?j+=B.charCodeAt()-cqe+10:B>="0"&&B<="9"?j+=+B:C()}return String.fromCharCode(j)}function g(){for(var T="";t[s]>="0"&&t[s]<="9";)T+=h();if(T.length)return T;k(),b()}function m(T,j){v(T,j,y())}function v(T,j,B){i[T]=i[T]||{},i[T][j]=B}function y(){return{line:r,column:o,pos:s}}function b(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),b()}function k(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},G2.stringify=function(t,n,e){if(W2(t)){var i,r,o=0,s="object"==xt(e)?e.space:e;switch(xt(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var dqe=/"|\\/g,hqe=/[\b]/g,fqe=/\f/g,pqe=/\n/g,gqe=/\r/g,mqe=/\t/g;function q2(t){return'"'+(t=t.replace(dqe,"\\$&").replace(fqe,"\\f").replace(hqe,"\\b").replace(pqe,"\\n").replace(gqe,"\\r").replace(mqe,"\\t"))+'"'}var vqe=/~/g,yqe=/\//g;function DN(t){return t.replace(vqe,"~0").replace(yqe,"~1")}function AN(t){return(AN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function EN(t){var n="function"==typeof Map?new Map:void 0;return EN=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return MN(e,arguments,f_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h_(r,e)},EN(t)}function MN(t,n,e){return(MN=dte()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&h_(a,o.prototype),a}).apply(null,arguments)}function dte(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h_(t,n){return(h_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function f_(t){return(f_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var af=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&h_(l,c)}(a,EN(Error));var n,e,i,s=(n=a,e=dte(),function(){var l,c=f_(n);if(e){var u=f_(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function _qe(t,n){if(n&&("object"===AN(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function Y2(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function J2(t){return t>=48&&t<=57}function bqe(t){return t>=32&&t<=1114111}var wqe=/^[,:[\]{}()\n]$/;function hte(t){return xqe.test(t)||t&&X2(t.charCodeAt(0))}var xqe=/^[[{\w-]$/;function Cqe(t){return 10===t||13===t||9===t||8===t||12===t}function K2(t){return 32===t||10===t||9===t||13===t}function Sqe(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function X2(t){return fte(t)||ON(t)}function fte(t){return 34===t||8220===t||8221===t}function ON(t){return 39===t||8216===t||8217===t||96===t||180===t}function p_(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function Qp(t,n){var e=t.length;if(!K2(t.charCodeAt(e-1)))return t+n;for(;K2(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function kqe(t,n,e){return t.substring(0,n)+t.substring(n+e)}var Tqe={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Dqe={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Yu(t){var n=0,e="";r()||function(){throw new af("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),hte(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=Qp(e,",")),function(){for(var b=!0,C=!0;C;)b?b=!1:l(44)||(e=Qp(e,",")),C=r();C||(e=p_(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=p_(e,",")),n>=t.length)return e;function r(){o();var b=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&k<=57)for(n++;J2(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);J2(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);J2(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),b}function o(){var b=n,C=s();do{(C=a())&&(C=s())}while(C);return n>b}function s(){for(var b,C="";(b=K2(t.charCodeAt(n)))||Sqe(t.charCodeAt(n));)C+=b?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;K2(t.charCodeAt(n-1))&&n>0;)n--;var k=t.slice(C,n);return e+=JSON.stringify(k),!0}}function f(b){if(!J2(t.charCodeAt(n))){var C=t.slice(b,n);throw new af("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(b){throw new af("Invalid character "+JSON.stringify(b),n)}function g(){throw new af("Object key expected",n)}function m(){throw new af("Object value expected",n)}function v(){throw new af("Colon expected",n)}function y(b){for(var C=b+2;/\w/.test(t[C]);)C++;var k=t.slice(b,C);throw new af('Invalid unicode character "'.concat(k,'"'),n)}!function(){throw new af("Unexpected character "+JSON.stringify(t[n]),n)}()}function Aqe(t,n){return"*"===t[n]&&"/"===t[n+1]}function Ho(t){return parseInt(t,10)}function IN(t){return Eqe.test(t)}var Eqe=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Ar(t){return"object"===xt(t)&&null!==t&&t.constructor===Object}function $r(t){return"object"===xt(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function NN(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return NN(Number(t));try{var n=t&&t.valueOf();if(n!==t)return NN(n)}catch{return!1}return!1}function pte(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function jN(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return xt(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(Ar(t))return"object";var e=n.stringify(t);return e&&IN(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var Mqe=/^https?:\/\/\S+$/;function Q2(t){return"string"==typeof t&&Mqe.test(t)}function yv(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&(IN(e)?n.parse(e):t)}var Oqe=/^-?[0-9]+$/,mte="object"==(typeof global>"u"?"undefined":xt(global))&&global&&global.Object===Object&&global,Iqe="object"==(typeof self>"u"?"undefined":xt(self))&&self&&self.Object===Object&&self,Ss=mte||Iqe||Function("return this")(),ra=Ss.Symbol,vte=Object.prototype,Nqe=vte.hasOwnProperty,jqe=vte.toString,g_=ra?ra.toStringTag:void 0,Pqe=Object.prototype.toString,yte=ra?ra.toStringTag:void 0;function xa(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":yte&&yte in Object(t)?function(n){var e=Nqe.call(n,g_),i=n[g_];try{n[g_]=void 0;var r=!0}catch{}var o=jqe.call(n);return r&&(e?n[g_]=i:delete n[g_]),o}(t):Pqe.call(t)}function no(t){return null!=t&&"object"==xt(t)}function Ja(t){return"symbol"==xt(t)||no(t)&&"[object Symbol]"==xa(t)}function _te(t){return"number"==typeof t?t:Ja(t)?NaN:+t}function Wr(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var Pte=jte(Ete),rYe=/\{\n\/\* \[wrapped with (.+)\] \*/,oYe=/,? & /,sYe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function rS(t){return function(){return t}}var aYe=function(){try{var t=eg(Object,"defineProperty");return t({},"",{}),t}catch{}}(),oS=aYe,lYe=oS?function(t,n){return oS(t,"toString",{configurable:!0,enumerable:!1,value:rS(n),writable:!0})}:oa,LN=jte(lYe);function ec(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var cYe=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function Lte(t,n,e){var o,i=n+"";return LN(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(sYe,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return ec(cYe,function(s){var a="_."+s[0];o&s[1]&&!aS(r,a)&&r.push(a)}),r.sort()}((o=i.match(rYe))?o[1].split(oYe):[],e)))}function Fte(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return RN(t)&&Pte(h,d),h.placeholder=i,Lte(h,t,n)}function xv(t){return t.placeholder}var uYe=/^(?:0|[1-9]\d*)$/;function rh(t,n){var e=xt(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&uYe.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function Ca(t){return null!=t&&__(t.length)&&!Ku(t)}function Sa(t,n,e){if(!Br(e))return!1;var i=xt(n);return!!("number"==i?Ca(e)&&rh(n,e.length):"string"==i&&n in e)&&tc(e[n],t)}function Cv(t){return hi(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&Sa(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":xt(exports))&&exports&&!exports.nodeType&&exports,Gte=zte&&"object"==(typeof module>"u"?"undefined":xt(module))&&module&&!module.nodeType&&module,Wte=Gte&&Gte.exports===zte?Ss.Buffer:void 0,ah=(Wte?Wte.isBuffer:void 0)||cS,Vr={};function Dl(t){return function(n){return t(n)}}Vr["[object Float32Array]"]=Vr["[object Float64Array]"]=Vr["[object Int8Array]"]=Vr["[object Int16Array]"]=Vr["[object Int32Array]"]=Vr["[object Uint8Array]"]=Vr["[object Uint8ClampedArray]"]=Vr["[object Uint16Array]"]=Vr["[object Uint32Array]"]=!0,Vr["[object Arguments]"]=Vr["[object Array]"]=Vr["[object ArrayBuffer]"]=Vr["[object Boolean]"]=Vr["[object DataView]"]=Vr["[object Date]"]=Vr["[object Error]"]=Vr["[object Function]"]=Vr["[object Map]"]=Vr["[object Number]"]=Vr["[object Object]"]=Vr["[object RegExp]"]=Vr["[object Set]"]=Vr["[object String]"]=Vr["[object WeakMap]"]=!1;var qte="object"==(typeof exports>"u"?"undefined":xt(exports))&&exports&&!exports.nodeType&&exports,w_=qte&&"object"==(typeof module>"u"?"undefined":xt(module))&&module&&!module.nodeType&&module,BN=w_&&w_.exports===qte&&mte.process,nc=function(){try{return w_&&w_.require&&w_.require("util").types||BN&&BN.binding&&BN.binding("util")}catch{}}(),Yte=nc&&nc.isTypedArray,tg=Yte?Dl(Yte):function(t){return no(t)&&__(t.length)&&!!Vr[xa(t)]},_Ye=Object.prototype.hasOwnProperty;function Jte(t,n){var e=Vn(t),i=!e&&cf(t),r=!e&&!i&&ah(t),o=!e&&!i&&!r&&tg(t),s=e||i||r||o,a=s?$N(t.length,String):[],l=a.length;for(var c in t)!n&&!_Ye.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rh(c,l))||a.push(c);return a}function Kte(t,n){return function(e){return t(n(e))}}var bYe=Kte(Object.keys,Object),wYe=Object.prototype.hasOwnProperty;function VN(t){if(!b_(t))return bYe(t);var n=[];for(var e in Object(t))wYe.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Uo(t){return Ca(t)?Jte(t):VN(t)}var xYe=Object.prototype.hasOwnProperty,CYe=Cv(function(t,n){if(b_(n)||Ca(n))Xu(n,Uo(n),t);else for(var e in n)xYe.call(n,e)&&y_(t,e,n[e])}),Xte=CYe,SYe=Object.prototype.hasOwnProperty;function ka(t){return Ca(t)?Jte(t,!0):function kYe(t){if(!Br(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=b_(t),e=[];for(var i in t)("constructor"!=i||!n&&SYe.call(t,i))&&e.push(i);return e}(t)}var TYe=Cv(function(t,n){Xu(n,ka(n),t)}),uS=TYe,DYe=Cv(function(t,n,e,i){Xu(n,ka(n),t,i)}),Sv=DYe,AYe=Cv(function(t,n,e,i){Xu(n,Uo(n),t,i)}),Qte=AYe,EYe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MYe=/^\w*$/;function HN(t,n){if(Vn(t))return!1;var e=xt(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Ja(t))||MYe.test(t)||!EYe.test(t)||null!=n&&t in Object(n)}var x_=eg(Object,"create"),OYe=Object.prototype.hasOwnProperty,IYe=Object.prototype.hasOwnProperty;function ng(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},lh.prototype.set=function(t,n){var e=this.__data__,i=dS(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var C_=eg(Ss,"Map");function hS(t,n){var i,r,e=t.__data__;return("string"==(r=xt(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function ch(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?Bs(a,n-1,e,i,r):df(r,a):i||(r[r.length]=a)}return r}function zN(t){return null!=t&&t.length?Bs(t,1):[]}function uh(t){return LN(Vte(t,void 0,zN),t+"")}var tne=uh(UN),pS=Kte(Object.getPrototypeOf,Object),nne=Function.prototype.toString,BYe=Object.prototype.hasOwnProperty,VYe=nne.call(Object);function Tv(t){if(!no(t)||"[object Object]"!=xa(t))return!1;var n=pS(t);if(null===n)return!0;var e=BYe.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&nne.call(e)==VYe}function gS(t){if(!no(t))return!1;var n=xa(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Tv(t)}var HYe=hi(function(t,n){try{return Tl(t,void 0,n)}catch(e){return gS(e)?e:new Error(e)}}),GN=HYe;function WN(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Kn(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var qN=hi(function(t,n,e){var i=1;if(e.length){var r=lf(e,xv(qN));i|=32}return oh(t,i,n,e,r)});qN.placeholder={};var YN=qN,UYe=uh(function(t,n){return ec(n,function(e){e=Qu(e),sh(t,e,YN(t[e],t))}),t}),ine=UYe,JN=hi(function(t,n,e){var i=3;if(e.length){var r=lf(e,xv(JN));i|=32}return oh(n,i,t,e,r)});JN.placeholder={};var rne=JN;function ic(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:ic(t,n,e)}var zYe=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Dv(t){return zYe.test(t)}var KN="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",XN="\\ud83c[\\udffb-\\udfff]",one="[^\\ud800-\\udfff]",sne="(?:\\ud83c[\\udde6-\\uddff]){2}",ane="[\\ud800-\\udbff][\\udc00-\\udfff]",lne="(?:"+KN+"|"+XN+")?",WYe="[\\ufe0e\\ufe0f]?"+lne+"(?:\\u200d(?:"+[one,sne,ane].join("|")+")[\\ufe0e\\ufe0f]?"+lne+")*",qYe="(?:"+[one+KN+"?",KN,sne,ane,"[\\ud800-\\udfff]"].join("|")+")",YYe=RegExp(XN+"(?="+XN+")|"+qYe+WYe,"g");function Kc(t){return Dv(t)?function(n){return n.match(YYe)||[]}(t):function(n){return n.split("")}(t)}function cne(t){return function(n){var e=Dv(n=Wi(n))?Kc(n):void 0,i=e?e[0]:n.charAt(0),r=e?hf(e,1).join(""):n.slice(1);return i[t]()+r}}var mS=cne("toUpperCase");function QN(t){return mS(Wi(t).toLowerCase())}function ZN(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function Cne(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=kl(e))==e?e:0),void 0!==n&&(n=(n=kl(n))==n?n:0),rg(kl(t),n,e)}function Xc(t){var n=this.__data__=new lh(t);this.size=n.size}function Sne(t,n){return t&&Xu(n,Uo(n),t)}Xc.prototype.clear=function(){this.__data__=new lh,this.size=0},Xc.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Xc.prototype.get=function(t){return this.__data__.get(t)},Xc.prototype.has=function(t){return this.__data__.has(t)},Xc.prototype.set=function(t,n){var e=this.__data__;if(e instanceof lh){var i=e.__data__;if(!C_||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new ch(i)}return e.set(t,n),this.size=e.size,this};var kne="object"==(typeof exports>"u"?"undefined":xt(exports))&&exports&&!exports.nodeType&&exports,Tne=kne&&"object"==(typeof module>"u"?"undefined":xt(module))&&module&&!module.nodeType&&module,Dne=Tne&&Tne.exports===kne?Ss.Buffer:void 0,Ane=Dne?Dne.allocUnsafe:void 0;function Ene(t,n){if(n)return t.slice();var e=t.length,i=Ane?Ane(e):new t.constructor(e);return t.copy(i),i}function ff(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new sg:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&b-c>=o}function m(){var C,k,b=T_();if(g(b))return v(b);a=setTimeout(m,(k=n-((C=b)-l),d?MJe(k,o-(C-c)):k))}function v(b){return a=void 0,h&&i?f(b):(i=r=void 0,s)}function y(){var b=T_(),C=g(b);if(i=arguments,r=this,l=b,C){if(void 0===a)return function p(b){return c=b,a=setTimeout(m,n),u?f(b):s}(l);if(d)return clearTimeout(a),a=setTimeout(m,n),f(l)}return void 0===a&&(a=setTimeout(m,n)),s}return n=kl(n)||0,Br(e)&&(u=!!e.leading,o=(d="maxWait"in e)?EJe(kl(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(T_())},y}function sie(t,n){return null==t||t!=t?n:t}var aie=Object.prototype,OJe=aie.hasOwnProperty,IJe=hi(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&Sa(n[0],n[1],r)&&(i=1);++e=200&&(o=S_,s=!1,n=new sg(n));e:for(;++r=0&&t.slice(e,r)==n}function kie(t){return function(n){var i,r,o,e=Zu(n);return"[object Map]"==e?mj(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Wr(r,function(o){return[o,i[o]]})}(n,t(n))}}var AS=kie(Uo),ES=kie(ka),BJe=ej({"&":"&","<":"<",">":">",'"':""","'":"'"}),Tie=/[&<>"']/g,VJe=RegExp(Tie.source);function Ej(t){return(t=Wi(t))&&VJe.test(t)?t.replace(Tie,BJe):t}var Die=/[\\^$.*+?()[\]{}|]/g,HJe=RegExp(Die.source);function Aie(t){return(t=Wi(t))&&HJe.test(t)?t.replace(Die,"\\$&"):t}function Eie(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Kn(l))<0&&(l+=c),l=a>l?0:Mj(l);a-1?r[o?n[s]:s]:void 0}}var zJe=Math.max;function Oj(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Kn(e);return r<0&&(r=zJe(i+r,0)),sS(t,Hn(n),r)}var Pie=jie(Oj);function Rie(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function Lie(t,n){return Rie(t,Hn(n),ed)}var GJe=Math.max,WJe=Math.min;function Ij(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Kn(e),r=e<0?GJe(i+r,0):WJe(r,i-1)),sS(t,Hn(n),r,!0)}var Fie=jie(Ij);function $ie(t,n){return Rie(t,Hn(n),Aj)}function as(t){return t&&t.length?t[0]:void 0}function Bie(t,n){var e=-1,i=Ca(t)?Array(t.length):[];return pf(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function Iv(t,n){return(Vn(t)?Wr:Bie)(t,Hn(n))}function Vie(t,n){return Bs(Iv(t,n),1)}function Hie(t,n){return Bs(Iv(t,n),1/0)}function Uie(t,n,e){return e=void 0===e?1:Kn(e),Bs(Iv(t,n),e)}function zie(t){return null!=t&&t.length?Bs(t,1/0):[]}function Gie(t,n){return null!=t&&t.length?Bs(t,n=void 0===n?1:Kn(n)):[]}function Wie(t){return oh(t,512)}var qie=ij("floor");function Yie(t){return uh(function(n){var e=n.length,i=e,r=Zl.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==iS(o))var s=new Zl([],!0)}for(i=s?i:e;++in}function OS(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=kl(n),e=kl(e)),t(n,e)}}var rre=OS(Nj),ore=OS(function(t,n){return t>=n}),JJe=Object.prototype.hasOwnProperty;function KJe(t,n){return null!=t&&JJe.call(t,n)}function sre(t,n){return null!=t&&Kne(t,n,KJe)}var XJe=Math.max,QJe=Math.min;function are(t,n,e){return n=Ju(n),void 0===e?(e=n,n=0):e=Ju(e),(i=t=kl(t))>=QJe(r=n,o=e)&&i-1:!!r&&wv(t,n,e)>-1}var eKe=Math.max;function cre(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Kn(e);return r<0&&(r=eKe(i+r,0)),wv(t,n,r)}function Qn(t){return null!=t&&t.length?ic(t,0,-1):[]}var tKe=Math.min;function Pj(t,n,e){for(var i=e?Dj:aS,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Wr(u,Dl(n))),l=tKe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new sg(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function Rre(t){return void 0===t}function Lre(t){return no(t)&&"[object WeakMap]"==Zu(t)}function Fre(t){return no(t)&&"[object WeakSet]"==xa(t)}function $re(t){return Hn("function"==typeof t?t:rc(t,1))}var hKe=Array.prototype.join;function Bre(t,n){return null==t?"":hKe.call(t,n)}var fKe=Ev(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Vre=fKe,pKe=xS(function(t,n,e){sh(t,e,n)}),Hre=pKe,gKe=Math.max,mKe=Math.min;function Ure(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Kn(e))<0?gKe(i+r,0):mKe(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):sS(t,Rte,r,!0)}var vKe=Ev(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),zre=vKe,Gre=cne("toLowerCase");function $j(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function aoe(t,n){var e=t.length;if(e)return rh(n+=n<0?e:0,e)?t[n]:void 0}function loe(t,n){return t&&t.length?aoe(t,Kn(n)):void 0}function coe(t){return t=Kn(t),hi(function(n){return aoe(n,t)})}function Wj(t,n){return null==(t=vre(t,n=uf(n,t)))||delete t[Qu(Rt(n))]}function wKe(t){return Tv(t)?void 0:t}var xKe=uh(function(t,n){var e={};if(null==t)return e;var i=!1;n=Wr(n,function(o){return o=uf(o,t),i||(i=o.length>1),o}),Xu(t,aj(t),e),i&&(e=rc(e,7,wKe));for(var r=n.length;r--;)Wj(e,n[r]);return e}),uoe=xKe;function O_(t,n,e,i){if(!Br(t))return t;for(var r=-1,o=(n=uf(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?g:g*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(Bie(t,function(o,s,a){return{criteria:Wr(n,function(c){return c(o)}),index:++i,value:o}}))}function moe(t,n,e,i){return null==t?[]:(Vn(n)||(n=null==n?[]:[n]),Vn(e=i?void 0:e)||(e=null==e?[]:[e]),goe(t,n,e))}function Yj(t){return uh(function(n){return n=Wr(n,Dl(Hn)),hi(function(e){var i=this;return t(n,function(r){return Tl(r,i,e)})})})}var voe=Yj(Wr),SKe=Math.min,kKe=hi(function(t,n){var e=(n=1==n.length&&Vn(n[0])?Wr(n[0],Dl(Hn)):Wr(Bs(n,1),Dl(Hn))).length;return hi(function(i){for(var r=-1,o=SKe(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=TKe(n/2))&&(t+=t)}while(n);return e}var DKe=bj("length"),Kj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xj="\\ud83c[\\udffb-\\udfff]",woe="[^\\ud800-\\udfff]",xoe="(?:\\ud83c[\\udde6-\\uddff]){2}",Coe="[\\ud800-\\udbff][\\udc00-\\udfff]",Soe="(?:"+Kj+"|"+Xj+")?",EKe="[\\ufe0e\\ufe0f]?"+Soe+"(?:\\u200d(?:"+[woe,xoe,Coe].join("|")+")[\\ufe0e\\ufe0f]?"+Soe+")*",MKe="(?:"+[woe+Kj+"?",Kj,xoe,Coe,"[\\ud800-\\udfff]"].join("|")+")",koe=RegExp(Xj+"(?="+Xj+")|"+MKe+EKe,"g");function Rv(t){return Dv(t)?function(n){for(var e=koe.lastIndex=0;koe.test(n);)++e;return e}(t):DKe(t)}var OKe=Math.ceil;function jS(t,n){var e=(n=void 0===n?" ":Sl(n)).length;if(e<2)return e?Jj(n,t):n;var i=Jj(n,OKe(t/Rv(n)));return Dv(n)?hf(Kc(i),0,t).join(""):i.slice(0,t)}var IKe=Math.ceil,NKe=Math.floor;function Toe(t,n,e){t=Wi(t);var i=(n=Kn(n))?Rv(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return jS(NKe(r),e)+t+jS(IKe(r),e)}function Doe(t,n,e){t=Wi(t);var i=(n=Kn(n))?Rv(t):0;return n&&i-1;)a!==t&&Noe.call(a,l,1),Noe.call(t,l,1);return t}function rP(t,n){return t&&t.length&&n&&n.length?iP(t,n):t}var joe=hi(rP);function Poe(t,n,e){return t&&t.length&&n&&n.length?iP(t,n,Hn(e)):t}function Roe(t,n,e){return t&&t.length&&n&&n.length?iP(t,n,void 0,e):t}var $Ke=Array.prototype.splice;function Loe(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;rh(r)?$Ke.call(t,r,1):Wj(t,r)}}return t}var BKe=uh(function(t,n){var e=null==t?0:t.length,i=UN(t,n);return Loe(t,Wr(n,function(r){return rh(r,e)?+r:r}).sort(poe)),i}),Foe=BKe,VKe=Math.floor,HKe=Math.random;function oP(t,n){return t+VKe(HKe()*(n-t+1))}var UKe=parseFloat,zKe=Math.min,GKe=Math.random;function $oe(t,n,e){if(e&&"boolean"!=typeof e&&Sa(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Ju(t),void 0===n?(n=t,t=0):n=Ju(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=GKe();return zKe(t+r*(n-t+UKe("1e-"+((r+"").length-1))),n)}return oP(t,n)}var WKe=Math.ceil,qKe=Math.max;function Boe(t){return function(n,e,i){return i&&"number"!=typeof i&&Sa(n,e,i)&&(e=i=void 0),n=Ju(n),void 0===e?(e=n,n=0):e=Ju(e),function(r,o,s,a){for(var l=-1,c=qKe(WKe((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&Sa(t,n[0],n[1])?n=[]:e>2&&Sa(n[0],n[1],n[2])&&(n=[n[0]]),goe(t,Bs(n,1),[])}),aP=rXe,oXe=Math.floor,sXe=Math.min;function lP(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Ja(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Ja(s)&&(e?s<=n:s>>0)?(t=Wi(t))&&("string"==typeof n||null!=n&&!IS(n))&&!(n=Sl(n))&&Dv(t)?hf(Kc(t),0,e):t.split(n,e):[]}var aXe=Math.max;function _se(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:aXe(Kn(n),0),hi(function(e){var i=e[n],r=hf(e,0,n);return i&&df(r,i),Tl(t,this,r)})}var lXe=Ev(function(t,n,e){return t+(e?" ":"")+mS(n)}),bse=lXe;function wse(t,n,e){return t=Wi(t),e=null==e?0:rg(Kn(e),0,t.length),n=Sl(n),t.slice(e,e+n.length)==n}function xse(){return{}}function Cse(){return""}function Sse(){return!0}var kse=Z2(function(t,n){return t-n},0);function Tse(t){return t&&t.length?Vj(t,oa):0}function Dse(t,n){return t&&t.length?Vj(t,Hn(n)):0}function Ase(t){var n=null==t?0:t.length;return n?ic(t,1,n):[]}function Ese(t,n,e){return t&&t.length?ic(t,0,(n=e||void 0===n?1:Kn(n))<0?0:n):[]}function Mse(t,n,e){var i=null==t?0:t.length;return i?ic(t,(n=i-(n=e||void 0===n?1:Kn(n)))<0?0:n,i):[]}function Ose(t,n){return t&&t.length?TS(t,Hn(n),!1,!0):[]}function Ise(t,n){return t&&t.length?TS(t,Hn(n)):[]}function Nse(t,n){return n(t),t}var jse=Object.prototype,cXe=jse.hasOwnProperty;function Pse(t,n,e,i){return void 0===t||tc(t,jse[e])&&!cXe.call(i,e)?n:t}var uXe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function dXe(t){return"\\"+uXe[t]}var Rse=/<%=([\s\S]+?)%>/g,FS={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Rse,variable:"",imports:{_:{escape:Ej}}},hXe=/\b__p \+= '';/g,fXe=/\b(__p \+=) '' \+/g,pXe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gXe=/[()=,{}\[\]\/\s]/,mXe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$S=/($^)/,vXe=/['\n\r\u2028\u2029\\]/g,Lse=Object.prototype.hasOwnProperty;function Fse(t,n,e){var i=FS.imports._.templateSettings||FS;e&&Sa(t,n,e)&&(n=void 0),t=Wi(t),n=Sv({},n,i,Pse);var r,o,s=Sv({},n.imports,i.imports,Pse),a=Uo(s),l=jj(s,a),c=0,u=n.interpolate||$S,d="__p += '",h=RegExp((n.escape||$S).source+"|"+u.source+"|"+(u===Rse?mXe:$S).source+"|"+(n.evaluate||$S).source+"|$","g"),f=Lse.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(m,v,y,b,C,k){return y||(y=b),d+=t.slice(c,k).replace(vXe,dXe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=k+m.length,m}),d+="';\n";var p=Lse.call(n,"variable")&&n.variable;if(p){if(gXe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(hXe,""):d).replace(fXe,"$1").replace(pXe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=GN(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(g.source=d,gS(g))throw g;return g}function cP(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Br(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),Ov(t,n,{leading:i,maxWait:n,trailing:r})}function Lv(t,n){return n(t)}var yXe=Math.min;function uP(t,n){if((t=Kn(t))<1||t>9007199254740991)return[];var e=4294967295,i=yXe(t,4294967295);t-=4294967295;for(var r=$N(i,n=td(n));++e-1;);return e}function Wse(t,n){for(var e=-1,i=t.length;++e-1;);return e}function qse(t,n,e){if((t=Wi(t))&&(e||void 0===n))return Ste(t);if(!t||!(n=Sl(n)))return t;var i=Kc(t),r=Kc(n);return hf(i,Wse(i,r),Gse(i,r)+1).join("")}function Yse(t,n,e){if((t=Wi(t))&&(e||void 0===n))return t.slice(0,Cte(t)+1);if(!t||!(n=Sl(n)))return t;var i=Kc(t);return hf(i,0,Gse(i,Kc(n))+1).join("")}var _Xe=/^\s+/;function Jse(t,n,e){if((t=Wi(t))&&(e||void 0===n))return t.replace(_Xe,"");if(!t||!(n=Sl(n)))return t;var i=Kc(t);return hf(i,Wse(i,Kc(n))).join("")}var bXe=/\w*$/;function Kse(t,n){var e=30,i="...";if(Br(n)){var r="separator"in n?n.separator:r;e="length"in n?Kn(n.length):e,i="omission"in n?Sl(n.omission):i}var o=(t=Wi(t)).length;if(Dv(t)){var s=Kc(t);o=s.length}if(e>=o)return t;var a=e-Rv(i);if(a<1)return i;var l=s?hf(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),IS(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Wi(bXe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(Sl(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function Xse(t){return FN(t,1)}var wXe=ej({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Qse=/&(?:amp|lt|gt|quot|#39);/g,xXe=RegExp(Qse.source);function Zse(t){return(t=Wi(t))&&xXe.test(t)?t.replace(Qse,wXe):t}var CXe=Mv&&1/_S(new Mv([,-0]))[1]==1/0?function(t){return new Mv(t)}:ur,SXe=CXe;function gf(t,n,e){var i=-1,r=aS,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=Dj;else if(o>=200){var c=n?null:SXe(t);if(c)return _S(c);s=!1,r=S_,l=new sg}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Ei&&rh(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:Lv,args:[r],thisArg:void 0}),new Zl(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),pae=MXe;function gae(){return rj(this)}function mae(){var t=this.__wrapped__;if(t instanceof Ei){var n=t;return this.__actions__.length&&(n=new Ei(this)),(n=n.reverse()).__actions__.push({func:Lv,args:[PS],thisArg:void 0}),new Zl(n,this.__chain__)}return this.thru(PS)}function fP(t,n,e){var i=t.length;if(i<2)return i?gf(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,hP(t,e)}),Sae=IXe,qt={chunk:xne,compact:Hne,concat:Une,difference:pie,differenceBy:gie,differenceWith:mie,drop:yie,dropRight:_ie,dropRightWhile:bie,dropWhile:wie,fill:Oie,findIndex:Oj,findLastIndex:Ij,first:as,flatten:zN,flattenDeep:zie,flattenDepth:Gie,fromPairs:tre,head:as,indexOf:cre,initial:Qn,intersection:ure,intersectionBy:dre,intersectionWith:hre,join:Bre,last:Rt,lastIndexOf:Ure,nth:loe,pull:joe,pullAll:rP,pullAllBy:Poe,pullAllWith:Roe,pullAt:Foe,remove:qoe,reverse:PS,slice:sse,sortedIndex:cse,sortedIndexBy:use,sortedIndexOf:dse,sortedLastIndex:hse,sortedLastIndexBy:fse,sortedLastIndexOf:pse,sortedUniq:mse,sortedUniqBy:vse,tail:Ase,take:Ese,takeRight:Mse,takeRightWhile:Ose,takeWhile:Ise,union:eae,unionBy:tae,unionWith:nae,uniq:iae,uniqBy:rae,uniqWith:oae,unzip:BS,unzipWith:hP,without:hae,xor:vae,xorBy:yae,xorWith:_ae,zip:bae,zipObject:xae,zipObjectDeep:Cae,zipWith:Sae},dr={countBy:rie,each:DS,eachRight:A_,every:Mie,filter:Nie,find:Pie,findLast:Fie,flatMap:Vie,flatMapDeep:Hie,flatMapDepth:Uie,forEach:DS,forEachRight:A_,groupBy:Nv,includes:lre,invokeMap:_re,keyBy:Hre,map:Iv,orderBy:moe,partition:tP,reduce:zoe,reduceRight:Goe,reject:Woe,sample:ese,sampleSize:tse,shuffle:rse,size:ose,some:lse,sortBy:aP},NXe={now:T_},mo={after:kte,ary:FN,before:WN,bind:YN,bindKey:rne,curry:CS,curryRight:SS,debounce:Ov,defer:hie,delay:fie,flip:Wie,memoize:kv,negate:Pv,once:foe,overArgs:yoe,partial:Zj,partialRight:Moe,rearg:Hoe,rest:Koe,spread:_se,throttle:cP,unary:Xse,wrap:fae},mn={castArray:bne,clone:$ne,cloneDeep:Bne,cloneDeepWith:fj,cloneWith:Vne,conformsTo:tie,eq:tc,gt:rre,gte:ore,isArguments:cf,isArray:Vn,isArrayBuffer:wre,isArrayLike:Ca,isArrayLikeObject:go,isBoolean:xre,isBuffer:ah,isDate:Sre,isElement:kre,isEmpty:Yn,isEqual:ai,isEqualWith:Tre,isError:gS,isFinite:Dre,isFunction:Ku,isInteger:Lj,isLength:__,isMap:dj,isMatch:Are,isMatchWith:Ere,isNaN:Mre,isNative:Ore,isNil:Ire,isNull:Nre,isNumber:Fj,isObject:Br,isObjectLike:no,isPlainObject:Tv,isRegExp:IS,isSafeInteger:Pre,isSet:hj,isString:E_,isSymbol:Ja,isTypedArray:tg,isUndefined:Rre,isWeakMap:Lre,isWeakSet:Fre,lt:Wre,lte:qre,toArray:zj,toFinite:Ju,toInteger:Kn,toLength:Mj,toNumber:kl,toPlainObject:kj,toSafeInteger:Hse,toString:Wi},Ta={add:xte,ceil:wne,divide:vie,floor:qie,max:Xre,maxBy:Qre,mean:eoe,meanBy:toe,min:ooe,minBy:jv,multiply:soe,round:Qoe,subtract:kse,sum:Tse,sumBy:Dse},jXe=Cne,PXe=are,RXe=$oe,jn={assign:Xte,assignIn:uS,assignInWith:Sv,assignWith:Qte,at:tne,create:oie,defaults:lie,defaultsDeep:uie,entries:AS,entriesIn:ES,extend:uS,extendWith:Sv,findKey:Lie,findLastKey:$ie,forIn:Xie,forInRight:Qie,forOwn:Zie,forOwnRight:ere,functions:nre,functionsIn:ire,get:fS,has:sre,hasIn:wS,invert:pre,invertBy:mre,invoke:yre,keys:Uo,keysIn:ka,mapKeys:Yre,mapValues:Bj,merge:noe,mergeWith:Tj,omit:uoe,omitBy:hoe,pick:Ooe,pickBy:qj,result:Xoe,set:nse,setWith:ise,toPairs:AS,toPairsIn:ES,transform:zse,unset:sae,update:lae,updateWith:cae,values:ag,valuesIn:dae},nd={at:pae,chain:rj,commit:pj,lodash:re,next:Gj,plant:nP,reverse:mae,tap:Nse,thru:Lv,toIterator:dP,toJSON:lg,value:lg,valueOf:lg,wrapperChain:gae},qi={camelCase:_ne,capitalize:QN,deburr:tj,endsWith:Sie,escape:Ej,escapeRegExp:Aie,kebabCase:Vre,lowerCase:zre,lowerFirst:Gre,pad:Toe,padEnd:Doe,padStart:Aoe,parseInt:Eoe,repeat:Yoe,replace:Joe,snakeCase:ase,split:yse,startCase:bse,startsWith:wse,template:Fse,templateSettings:FS,toLower:Bse,toUpper:Use,trim:qse,trimEnd:Yse,trimStart:Jse,truncate:Kse,unescape:Zse,upperCase:uae,upperFirst:mS,words:nj},tr={attempt:GN,bindAll:ine,cond:Qne,conforms:eie,constant:rS,defaultTo:sie,flow:Jie,flowRight:Kie,identity:oa,iteratee:$re,matches:Jre,matchesProperty:Kre,method:ioe,methodOf:roe,mixin:Hj,noop:ur,nthArg:coe,over:voe,overEvery:_oe,overSome:boe,property:wj,propertyOf:Ioe,range:sP,rangeRight:Voe,stubArray:vS,stubFalse:cS,stubObject:xse,stubString:Cse,stubTrue:Sse,times:uP,toPath:Vse,uniqueId:mf},LXe=Math.max,FXe=Math.min,$Xe=Math.min,BXe=Array.prototype,kae=Object.prototype.hasOwnProperty,Tae=ra?ra.iterator:void 0,VXe=Math.max,Dae=Math.min,gP=function(t){return function(n,e,i){if(null==i){var r=Br(e),o=r&&Uo(e),s=o&&o.length&&MS(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(Hj);re.after=mo.after,re.ary=mo.ary,re.assign=jn.assign,re.assignIn=jn.assignIn,re.assignInWith=jn.assignInWith,re.assignWith=jn.assignWith,re.at=jn.at,re.before=mo.before,re.bind=mo.bind,re.bindAll=tr.bindAll,re.bindKey=mo.bindKey,re.castArray=mn.castArray,re.chain=nd.chain,re.chunk=qt.chunk,re.compact=qt.compact,re.concat=qt.concat,re.cond=tr.cond,re.conforms=tr.conforms,re.constant=tr.constant,re.countBy=dr.countBy,re.create=jn.create,re.curry=mo.curry,re.curryRight=mo.curryRight,re.debounce=mo.debounce,re.defaults=jn.defaults,re.defaultsDeep=jn.defaultsDeep,re.defer=mo.defer,re.delay=mo.delay,re.difference=qt.difference,re.differenceBy=qt.differenceBy,re.differenceWith=qt.differenceWith,re.drop=qt.drop,re.dropRight=qt.dropRight,re.dropRightWhile=qt.dropRightWhile,re.dropWhile=qt.dropWhile,re.fill=qt.fill,re.filter=dr.filter,re.flatMap=dr.flatMap,re.flatMapDeep=dr.flatMapDeep,re.flatMapDepth=dr.flatMapDepth,re.flatten=qt.flatten,re.flattenDeep=qt.flattenDeep,re.flattenDepth=qt.flattenDepth,re.flip=mo.flip,re.flow=tr.flow,re.flowRight=tr.flowRight,re.fromPairs=qt.fromPairs,re.functions=jn.functions,re.functionsIn=jn.functionsIn,re.groupBy=dr.groupBy,re.initial=qt.initial,re.intersection=qt.intersection,re.intersectionBy=qt.intersectionBy,re.intersectionWith=qt.intersectionWith,re.invert=jn.invert,re.invertBy=jn.invertBy,re.invokeMap=dr.invokeMap,re.iteratee=tr.iteratee,re.keyBy=dr.keyBy,re.keys=Uo,re.keysIn=jn.keysIn,re.map=dr.map,re.mapKeys=jn.mapKeys,re.mapValues=jn.mapValues,re.matches=tr.matches,re.matchesProperty=tr.matchesProperty,re.memoize=mo.memoize,re.merge=jn.merge,re.mergeWith=jn.mergeWith,re.method=tr.method,re.methodOf=tr.methodOf,re.mixin=gP,re.negate=Pv,re.nthArg=tr.nthArg,re.omit=jn.omit,re.omitBy=jn.omitBy,re.once=mo.once,re.orderBy=dr.orderBy,re.over=tr.over,re.overArgs=mo.overArgs,re.overEvery=tr.overEvery,re.overSome=tr.overSome,re.partial=mo.partial,re.partialRight=mo.partialRight,re.partition=dr.partition,re.pick=jn.pick,re.pickBy=jn.pickBy,re.property=tr.property,re.propertyOf=tr.propertyOf,re.pull=qt.pull,re.pullAll=qt.pullAll,re.pullAllBy=qt.pullAllBy,re.pullAllWith=qt.pullAllWith,re.pullAt=qt.pullAt,re.range=tr.range,re.rangeRight=tr.rangeRight,re.rearg=mo.rearg,re.reject=dr.reject,re.remove=qt.remove,re.rest=mo.rest,re.reverse=qt.reverse,re.sampleSize=dr.sampleSize,re.set=jn.set,re.setWith=jn.setWith,re.shuffle=dr.shuffle,re.slice=qt.slice,re.sortBy=dr.sortBy,re.sortedUniq=qt.sortedUniq,re.sortedUniqBy=qt.sortedUniqBy,re.split=qi.split,re.spread=mo.spread,re.tail=qt.tail,re.take=qt.take,re.takeRight=qt.takeRight,re.takeRightWhile=qt.takeRightWhile,re.takeWhile=qt.takeWhile,re.tap=nd.tap,re.throttle=mo.throttle,re.thru=Lv,re.toArray=mn.toArray,re.toPairs=jn.toPairs,re.toPairsIn=jn.toPairsIn,re.toPath=tr.toPath,re.toPlainObject=mn.toPlainObject,re.transform=jn.transform,re.unary=mo.unary,re.union=qt.union,re.unionBy=qt.unionBy,re.unionWith=qt.unionWith,re.uniq=qt.uniq,re.uniqBy=qt.uniqBy,re.uniqWith=qt.uniqWith,re.unset=jn.unset,re.unzip=qt.unzip,re.unzipWith=qt.unzipWith,re.update=jn.update,re.updateWith=jn.updateWith,re.values=jn.values,re.valuesIn=jn.valuesIn,re.without=qt.without,re.words=qi.words,re.wrap=mo.wrap,re.xor=qt.xor,re.xorBy=qt.xorBy,re.xorWith=qt.xorWith,re.zip=qt.zip,re.zipObject=qt.zipObject,re.zipObjectDeep=qt.zipObjectDeep,re.zipWith=qt.zipWith,re.entries=jn.toPairs,re.entriesIn=jn.toPairsIn,re.extend=jn.assignIn,re.extendWith=jn.assignInWith,gP(re,re),re.add=Ta.add,re.attempt=tr.attempt,re.camelCase=qi.camelCase,re.capitalize=qi.capitalize,re.ceil=Ta.ceil,re.clamp=jXe,re.clone=mn.clone,re.cloneDeep=mn.cloneDeep,re.cloneDeepWith=mn.cloneDeepWith,re.cloneWith=mn.cloneWith,re.conformsTo=mn.conformsTo,re.deburr=qi.deburr,re.defaultTo=tr.defaultTo,re.divide=Ta.divide,re.endsWith=qi.endsWith,re.eq=mn.eq,re.escape=qi.escape,re.escapeRegExp=qi.escapeRegExp,re.every=dr.every,re.find=dr.find,re.findIndex=qt.findIndex,re.findKey=jn.findKey,re.findLast=dr.findLast,re.findLastIndex=qt.findLastIndex,re.findLastKey=jn.findLastKey,re.floor=Ta.floor,re.forEach=dr.forEach,re.forEachRight=dr.forEachRight,re.forIn=jn.forIn,re.forInRight=jn.forInRight,re.forOwn=jn.forOwn,re.forOwnRight=jn.forOwnRight,re.get=jn.get,re.gt=mn.gt,re.gte=mn.gte,re.has=jn.has,re.hasIn=jn.hasIn,re.head=qt.head,re.identity=oa,re.includes=dr.includes,re.indexOf=qt.indexOf,re.inRange=PXe,re.invoke=jn.invoke,re.isArguments=mn.isArguments,re.isArray=Vn,re.isArrayBuffer=mn.isArrayBuffer,re.isArrayLike=mn.isArrayLike,re.isArrayLikeObject=mn.isArrayLikeObject,re.isBoolean=mn.isBoolean,re.isBuffer=mn.isBuffer,re.isDate=mn.isDate,re.isElement=mn.isElement,re.isEmpty=mn.isEmpty,re.isEqual=mn.isEqual,re.isEqualWith=mn.isEqualWith,re.isError=mn.isError,re.isFinite=mn.isFinite,re.isFunction=mn.isFunction,re.isInteger=mn.isInteger,re.isLength=mn.isLength,re.isMap=mn.isMap,re.isMatch=mn.isMatch,re.isMatchWith=mn.isMatchWith,re.isNaN=mn.isNaN,re.isNative=mn.isNative,re.isNil=mn.isNil,re.isNull=mn.isNull,re.isNumber=mn.isNumber,re.isObject=Br,re.isObjectLike=mn.isObjectLike,re.isPlainObject=mn.isPlainObject,re.isRegExp=mn.isRegExp,re.isSafeInteger=mn.isSafeInteger,re.isSet=mn.isSet,re.isString=mn.isString,re.isSymbol=mn.isSymbol,re.isTypedArray=mn.isTypedArray,re.isUndefined=mn.isUndefined,re.isWeakMap=mn.isWeakMap,re.isWeakSet=mn.isWeakSet,re.join=qt.join,re.kebabCase=qi.kebabCase,re.last=Rt,re.lastIndexOf=qt.lastIndexOf,re.lowerCase=qi.lowerCase,re.lowerFirst=qi.lowerFirst,re.lt=mn.lt,re.lte=mn.lte,re.max=Ta.max,re.maxBy=Ta.maxBy,re.mean=Ta.mean,re.meanBy=Ta.meanBy,re.min=Ta.min,re.minBy=Ta.minBy,re.stubArray=tr.stubArray,re.stubFalse=tr.stubFalse,re.stubObject=tr.stubObject,re.stubString=tr.stubString,re.stubTrue=tr.stubTrue,re.multiply=Ta.multiply,re.nth=qt.nth,re.noop=tr.noop,re.now=NXe.now,re.pad=qi.pad,re.padEnd=qi.padEnd,re.padStart=qi.padStart,re.parseInt=qi.parseInt,re.random=RXe,re.reduce=dr.reduce,re.reduceRight=dr.reduceRight,re.repeat=qi.repeat,re.replace=qi.replace,re.result=jn.result,re.round=Ta.round,re.sample=dr.sample,re.size=dr.size,re.snakeCase=qi.snakeCase,re.some=dr.some,re.sortedIndex=qt.sortedIndex,re.sortedIndexBy=qt.sortedIndexBy,re.sortedIndexOf=qt.sortedIndexOf,re.sortedLastIndex=qt.sortedLastIndex,re.sortedLastIndexBy=qt.sortedLastIndexBy,re.sortedLastIndexOf=qt.sortedLastIndexOf,re.startCase=qi.startCase,re.startsWith=qi.startsWith,re.subtract=Ta.subtract,re.sum=Ta.sum,re.sumBy=Ta.sumBy,re.template=qi.template,re.times=tr.times,re.toFinite=mn.toFinite,re.toInteger=Kn,re.toLength=mn.toLength,re.toLower=qi.toLower,re.toNumber=mn.toNumber,re.toSafeInteger=mn.toSafeInteger,re.toString=mn.toString,re.toUpper=qi.toUpper,re.trim=qi.trim,re.trimEnd=qi.trimEnd,re.trimStart=qi.trimStart,re.truncate=qi.truncate,re.unescape=qi.unescape,re.uniqueId=tr.uniqueId,re.upperCase=qi.upperCase,re.upperFirst=qi.upperFirst,re.each=dr.forEach,re.eachRight=dr.forEachRight,re.first=qt.head,gP(re,(pP={},ed(re,function(t,n){kae.call(re.prototype,n)||(pP[n]=t)}),pP),{chain:!1}),re.VERSION="4.17.21",(re.templateSettings=qi.templateSettings).imports._=re,ec(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){re[t].placeholder=re}),ec(["drop","take"],function(t,n){Ei.prototype[t]=function(e){e=void 0===e?1:VXe(Kn(e),0);var i=this.__filtered__&&!n?new Ei(this):this.clone();return i.__filtered__?i.__takeCount__=Dae(e,i.__takeCount__):i.__views__.push({size:Dae(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Ei.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ec(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Ei.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Hn(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),ec(["head","last"],function(t,n){var e="take"+(n?"Right":"");Ei.prototype[t]=function(){return this[e](1).value()[0]}}),ec(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Ei.prototype[t]=function(){return this.__filtered__?new Ei(this):this[e](1)}}),Ei.prototype.compact=function(){return this.filter(oa)},Ei.prototype.find=function(t){return this.filter(t).head()},Ei.prototype.findLast=function(t){return this.reverse().find(t)},Ei.prototype.invokeMap=hi(function(t,n){return"function"==typeof t?new Ei(this):this.map(function(e){return M_(e,t,n)})}),Ei.prototype.reject=function(t){return this.filter(Pv(Hn(t)))},Ei.prototype.slice=function(t,n){t=Kn(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Ei(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Kn(n))<0?e.dropRight(-n):e.take(n-t)),e)},Ei.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ei.prototype.toArray=function(){return this.take(4294967295)},ed(Ei.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=re[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(re.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Ei,c=a[0],u=l||Vn(s),d=function(v){var y=r.apply(re,df([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,g=l&&!this.__actions__.length;if(!o&&u){s=g?s:new Ei(this);var m=t.apply(s,a);return m.__actions__.push({func:Lv,args:[d],thisArg:void 0}),new Zl(m,h)}return p&&g?t.apply(this,a):(m=this.thru(d),p?i?m.value()[0]:m.value():m)})}),ec(["pop","push","shift","sort","splice","unshift"],function(t){var n=BXe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);re.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(Vn(o)?o:[],r)}return this[e](function(s){return n.apply(Vn(s)?s:[],r)})}}),ed(Ei.prototype,function(t,n){var e=re[n];if(e){var i=e.name+"";kae.call(bv,i)||(bv[i]=[]),bv[i].push({name:n,func:e})}}),bv[lS(void 0,2).name]=[{name:"wrapper",func:void 0}],Ei.prototype.clone=function(){var t=new Ei(this.__wrapped__);return t.__actions__=Ka(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ka(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ka(this.__views__),t},Ei.prototype.reverse=function(){if(this.__filtered__){var t=new Ei(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ei.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Vn(t),i=n<0,r=e?t.length:0,o=function(k,T,j){for(var B=-1,N=j.length;++B1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!Ar(l)||n&&c.length>0)&&(e[gt(c)]=!0),Ar(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function Eae(t){return Ee({},t)}function Mae(t){return Object.values(t)}function Oae(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(sn(o))),r}function vP(t,n){try{return n.parse(t)}catch{return n.parse(Yu(t))}}function Iae(t,n){try{return vP(t,n)}catch{return}}function HS(t,n){t=t.replace(jae,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function Nae(t){t=t.replace(jae,"");try{return Yu(t)}catch{}try{var n=Yu("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Yu("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var jae=/,\s*$/;function US(t,n){var e=Lae.exec(n);if(e){var i=Ho(e[2]),r=function(f,p){for(var m=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return Fv(t)?t:{text:e.stringify(t.json,null,n)}}function Pae(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return _P(t)?t:{json:n.parse(t.text)}}function zS(t,n,e){return cg(t,n,e).text}function Rae(t,n){return function GXe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(Fv(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(Ar(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var Lae=/(position|char) (\d+)/,WXe=/line (\d+)/,qXe=/column (\d+)/;function $ae(t){return YXe.test(t)&&t.length>2}var YXe=/^[[{]\S/;function bP(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?JXe:KXe:e?XXe:QXe}var JXe={escapeValue:function(t){return Bae(Uae(String(t)))},unescapeValue:function(t){return zae(Vae(t))}},KXe={escapeValue:function(t){return Uae(String(t))},unescapeValue:function(t){return zae(t)}},XXe={escapeValue:function(t){return Bae(String(t))},unescapeValue:function(t){return Vae(t)}},QXe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function Bae(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function Vae(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return Hae[e]||e}catch{return n}})}var Hae={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},ZXe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function Uae(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return Hae[n]||n})}function zae(t){return t.replace(/\\["bfnrt\\]/g,function(n){return ZXe[n]||n})}function ug(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function Gae(t,n){return I_(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function dg(t,n,e){return I_(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function I_(t,n){return!!wP(t,n)}function wP(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function Wae(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function GS(t,n,e){var i=$v(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,Wae(r))}}function $v(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function WS(t){var e=$v(t)?.document.activeElement;return!!e&&I_(e,function(i){return i===t})}function qae(t,n){return wP(t,function(e){return e.nodeName===n})}function xP(t){return dg(t,"data-type","selectable-key")?Zi.key:dg(t,"data-type","selectable-value")?Zi.value:dg(t,"data-type","insert-selection-area-inside")?Zi.inside:dg(t,"data-type","insert-selection-area-after")?Zi.after:Zi.multi}function Bv(t){return encodeURIComponent(gt(t))}function Yae(t){var e=wP(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?qc(decodeURIComponent(e)):null}function vf(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in tQe||e.push(i),e.join(n)}var tQe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},CP=dN.window;function nQe(t){gn(t,"svelte-1r8q3m8",".jse-absolute-popup.svelte-1r8q3m8.svelte-1r8q3m8{position:relative;left:0;top:0;width:0;height:0;z-index:1001}.jse-absolute-popup.svelte-1r8q3m8 .jse-hidden-input.svelte-1r8q3m8{position:fixed;left:0;top:0;width:0;height:0;padding:0;margin:0;border:none;outline:none;overflow:hidden}.jse-absolute-popup.svelte-1r8q3m8 .jse-absolute-popup-content.svelte-1r8q3m8{position:absolute}")}function Jae(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,B="left"===v||b+u>window.innerWidth&&b>u;return{left:B?y.right-m:b+m,top:j?C-p:y.bottom+p,positionAbove:j,positionLeft:B}}if("number"==typeof n.left&&"number"==typeof n.top){var N=n.left,$=n.top,V=n.width,z=void 0===V?0:V,Y=n.height,O=void 0===Y?0:Y;return{left:N,top:$,positionAbove:$+O>window.innerHeight&&$>O,positionLeft:N+z>window.innerWidth&&N>z}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function oQe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!I_(l.target,function(c){return c===i})&&s(o.id)}return Kl(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===vf(l)&&s(o.id)},function(l){a(l)},s,function(l){qn[l?"unshift":"push"](function(){e(2,r=l)})},function(l){qn[l?"unshift":"push"](function(){e(1,i=l)})}]}var sQe=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,oQe,iQe,po,{popup:0,closeAbsolutePopup:6},nQe),r}return de(e)}();function Xae(t,n,e){var i=t.slice();return i[6]=n[e],i}function Qae(t){var n,e;return n=new sQe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function aQe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(uQe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var uQe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function N_(t){return{value:t,label:Yn(t)?"(whole item)":oc(Xa(t))}}function id(t){return t.map(function(n){return kP.test(n)?"?.[".concat(n,"]"):SP.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var SP=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,kP=/^\d+$/;function j_(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function rd(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var dQe={id:"javascript",name:"JavaScript",description:"\n

    \n Enter a JavaScript function to filter, sort, or transform the data.\n

    \n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(id(e.path)),a=function TP(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function gte(t){return Oqe.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(id(i.path),"\n")+" const valueB = b".concat(id(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(id(i.path),"\n")+" const valueB = b".concat(id(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(id(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(id(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')()(t);return void 0!==e?e:null}},hQe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7l0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5H93c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8l0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4l0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5H210.4c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8l0 0 0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM176 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80V416H256v16c0 44.2-35.8 80-80 80z"]},P_={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},R_={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},fQe={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};function pQe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var VQe=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,BQe,$Qe,In,{path:4,value:0,readOnly:1,onPatch:5,focus:6},FQe),r}return de(e)}();function cle(t){for(var n=aP(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=JS(n,u);AP(l,d,function(m){o[c]=String(m),a(l[m])}),o.pop()}}}else if(Ar(l)&&i(o)){r[gt(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=_e(h);try{for(p.s();!(f=p.n()).done;){var g=f.value;o[c]=g,a(l[g])}}catch(m){p.e(m)}finally{p.f()}o.pop()}}}(s),Ee(Ee({},n),{},{expandedMap:r})}function ule(t,n){var e=Vv(t.expandedMap,n),i=Vv(t.enforceStringMap,n),r=Vv(t.visibleSectionsMap,n);return Ee(Ee({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function dle(t,n,e){if(e){var i=Ee({},t.enforceStringMap);return i[n]=e,Ee(Ee({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Ee({},t.enforceStringMap);return delete r[n],Ee(Ee({},t),{},{enforceStringMap:r})}return t}function hle(t,n,e){var i=Yc(t,e),r=e.reduce(function(o,s){return Qee(s)?fle(i,o,s):Zee(s)?ple(i,o,s):vN(s)?(u=(c=s).path,d=NP(a=i,(l=o).expandedMap),h=NP(a,l.enforceStringMap),f=NP(a,l.visibleSectionsMap),Dr(c.value)||er(c.value)||delete d[u],er(c.value)||delete f[u],(Dr(c.value)||er(c.value))&&delete h[u],Ee(Ee({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):yN(s)||mv(s)?function(a,l,c){if(mv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=IP(MP(l.expandedMap,c.from),u),h=IP(MP(l.enforceStringMap,c.from),u),f=IP(MP(l.visibleSectionsMap,c.from),u),p=l;mv(c)&&(p=ple(a,p,{op:"remove",path:c.from}));var g=OP((p=fle(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),m=OP(p.enforceStringMap,h),v=OP(p.visibleSectionsMap,f);return Ee(Ee({},l),{},{expandedMap:g,enforceStringMap:m,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function fle(t,n,e){var i=Jc(t,e.path),r=Qn(i),o=gt(r);if(er(Dt(t,r))){var s=Ho(Rt(i)),a=Hv(n.expandedMap,r,s,1),l=Hv(n.enforceStringMap,r,s,1),c=Hv(n.visibleSectionsMap,r,s,1);return c=gle(c,o,function(u){return mle(u,s,1)}),Ee(Ee({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function ple(t,n,e){var i=Jc(t,e.path),r=Qn(i),o=gt(r),s=Dt(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=Vv(a,i),l=Vv(l,i),c=Vv(c,i),er(s)){var u=Ho(Rt(i));a=Hv(a,r,u,-1),l=Hv(l,r,u,-1),c=gle(c=Hv(c,r,u,-1),o,function(d){return mle(d,u,-1)})}return Ee(Ee({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function Vv(t,n){var e={},i=gt(n);return Object.keys(t).forEach(function(r){vv(r,i)||(e[r]=t[r])}),e}function MP(t,n){var e={};return Object.keys(t).forEach(function(i){vv(i,n)&&(e[i]=t[i])}),e}function OP(t,n){return Ee(Ee({},t),n)}function IP(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function Hv(t,n,e,i){for(var r=n.length,o=gt(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:gt(u),value:t[c]}))}}if(0===s.length)return t;var h=Ee({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function NP(t,n){var e={};return Object.keys(n).filter(function(i){return Ql(t,Jc(t,i))}).forEach(function(i){e[i]=n[i]}),e}function gle(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!ai(i,r)){var o=Ee({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function mle(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function dh(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof yv(o,i)}function L_(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function jP(t,n){var e=[];return function i(r,o){e.push(o);var s=gt(o);if(r&&!0===n.expandedMap[s]){if(er(r)){var a=JS(n,s);AP(r,a,function(l){i(r[l],o.concat(String(l)))})}Dr(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function vle(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:zc.value});var a=gt(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:zc.inside}),er(o)){var l=JS(n,a);AP(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:zc.after})})}Dr(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:zc.key}),r(o[c],u),e&&i.push({path:u,type:zc.after})})}}(t,[]),i}function PP(t,n,e){var i=jP(t,n),r=i.map(gt).indexOf(gt(e));return-1!==r&&r0;){if(!0===t.pointersMap[gt(i)])return!0;i.pop()}return vo(t)?e===Zi.key&&ai(t.focusPath,n):!(!Zn(t)||!(e===Zi.value&&ai(t.focusPath,n)||Wv(n,t.focusPath)&&n.length>t.focusPath.length&&(e===Zi.key||e===Zi.value||e===Zi.multi)))}function ble(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Pi(r)?r.focusPath:as(r.paths),s=function zQe(t,n,e){var i=jP(t,n),r=i.map(gt),o=gt(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Qc(r)||zo(r)?Eo(t,r.anchorPath,r.anchorPath):Eo(t,r.anchorPath,l);if(vo(r)){var u=Dt(t,Qn(s));return Array.isArray(u)||Yn(s)?mi(s,!1):ac(s,!1)}return Zn(r)?mi(s,!1):Qc(r)||zo(r)?Eo(t,o,o):Eo(t,a,l)}function wle(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=vle(t,n,e),o=r.findIndex(function(s){return ai(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Dt(t,Qn(r)))?mi(r,!1):ac(r,!1)}function Gv(t,n){if(1===n.length){var e=as(n);if("replace"===e.op||"move"===e.op)return mi(Jc(t,e.path),!1)}if(!Yn(n)&&n.every(function(s){return"move"===s.op})){var i=as(n),r=n.slice(1);if((yN(i)||mv(i))&&i.from!==i.path&&r.every(function(s){return(yN(s)||mv(s))&&s.from===s.path}))return ac(Jc(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Jc(t,s.path)});if(!Yn(o))return{type:Zi.multi,paths:o,anchorPath:as(o),focusPath:Rt(o),pointersMap:xle(o)}}function xle(t){var n={};return t.forEach(function(e){n[gt(e)]=!0}),n}function XS(t){return qa({},gt(t),!0)}function $_(t){return void 0!==t&&(vo(t)||Zn(t)||Pi(t)&&1===t.paths.length)}function Cle(t,n){return $_(n)&&$r(Dt(t,n.focusPath))?n.focusPath:Qn(n.focusPath)}function Wv(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Ee(Ee({},r),{},{active:o===n})});return Ee(Ee({},t),{},{items:i,itemsMap:Nv(i,function(r){return gt(r.path)}),activeItem:e,activeIndex:n})}function ZQe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Ee(Ee({},r),{},{active:o===n})});return Ee(Ee({},t),{},{items:i,itemsMap:Nv(i,function(r){return gt(r.path)}),activeItem:e,activeIndex:n})}function jle(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Dr(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,g=h;p=e)return}r.pop()}else Ple(String(c),l,r,Gc.value,o)}(t.toLowerCase(),n),i}function Ple(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function $P(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function Rle(t,n,e){var i=t;return A_(e,function(r){i=$P(i,n,r.start,r.end)}),i}function eZe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Gc.key){var c=Qn(s),u=Dt(t,c),d=Rt(s),h=V_(c,Object.keys(u),d,$P(d,e,a,l));return{newSelection:Gv(t,h),operations:h}}if(o===Gc.value){var f=Dt(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(gt(s)));var p="string"==typeof f?f:String(f),g=gt(s),m=dh(f,n.enforceStringMap,g,r),v=$P(p,e,a,l),y=[{op:"replace",path:gt(s),value:m?v:yv(v,r)}];return{newSelection:Gv(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function tZe(t,n,e,i,r){for(var o=jle(e,t,1/0),s=[],a=0;an.floating[o]&&(s=ok(s)),{main:s,cross:ok(s)}}var VZe={start:"end",end:"start"};function qP(t){return t.replace(/start|end/g,function(n){return VZe[n]})}var HZe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return ni(bt().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y,O,H,Z,D,E,M,U,L,X;return bt().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,g=u.fallbackPlacements,v=void 0===(m=u.fallbackStrategy)?"bestFit":m,b=void 0===(y=u.fallbackAxisSideDirection)?"none":y,k=void 0===(C=u.flipAlignment)||C,T=wee(u,wWe),j=gg(r),B=gg(a)===a,ne.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return N=ne.sent,$=g||(B||!k?[ok(a)]:(void 0,ae=ok(ge=a),[qP(ge),ae,qP(ae)])),g||"none"===b||$.push.apply($,sn(function(ge,ae,De,be){var Ie=ik(ge),R=function(J,K,pe){var Te=["left","right"],ye=["right","left"];switch(J){case"top":case"bottom":return pe?K?ye:Te:K?Te:ye;case"left":case"right":return K?["top","bottom"]:["bottom","top"];default:return[]}}(gg(ge),"start"===De,be);return Ie&&(R=R.map(function(J){return J+"-"+Ie}),ae&&(R=R.concat(R.map(qP)))),R}(a,k,b,N))),V=[a].concat(sn($)),ne.next=29,Qle(n,T);case 29:if(z=ne.sent,Y=[],O=(null==(i=o.flip)?void 0:i.overflows)||[],h&&Y.push(z[j]),p&&(H=BZe(r,s,N),Y.push(z[H.main],z[H.cross])),O=[].concat(sn(O),[{placement:r,overflows:Y}]),Y.every(function(ge){return ge<=0})){ne.next=48;break}if(E=((null==(Z=o.flip)?void 0:Z.index)||0)+1,!(M=V[E])){ne.next=37;break}return ne.abrupt("return",{data:{index:E,overflows:O},reset:{placement:M}});case 37:if(U=null==(D=O.filter(function(ge){return ge.overflows[0]<=0}).sort(function(ge,ae){return ge.overflows[1]-ae.overflows[1]})[0])?void 0:D.placement,U){ne.next=46;break}ne.t0=v,ne.next="bestFit"===ne.t0?42:"initialPlacement"===ne.t0?45:46;break;case 42:return X=null==(L=O.map(function(ge){return[ge.placement,ge.overflows.filter(function(ae){return ae>0}).reduce(function(ae,De){return ae+De},0)]}).sort(function(ge,ae){return ge[1]-ae[1]})[0])?void 0:L[0],X&&(U=X),ne.abrupt("break",46);case 45:U=a;case 46:if(r===U){ne.next=48;break}return ne.abrupt("return",{reset:{placement:U}});case 48:return ne.abrupt("return",{});case 49:case"end":return ne.stop()}var ge,ae},e)}))()}}},UZe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return ni(bt().mark(function e(){var i,r,o;return bt().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=ni(bt().mark(function l(c,u){var d,h,f,p,g,m,v,y,b,C,k,T,j,B;return bt().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return d=c.placement,h=c.platform,f=c.elements,N.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=N.sent,g=gg(d),m=ik(d),v="x"===rk(d),y=["left","top"].includes(g)?-1:1,b=p&&v?-1:1,C="function"==typeof u?u(c):u,k="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Ee({mainAxis:0,crossAxis:0,alignmentAxis:null},C),T=k.mainAxis,j=k.crossAxis,B=k.alignmentAxis,N.abrupt("return",(m&&"number"==typeof B&&(j="end"===m?-1*B:B),v?{x:j*b,y:T*y}:{x:T*y,y:j*b}));case 14:case"end":return N.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function zZe(t){return"x"===t?"y":"x"}var GZe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return ni(bt().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,j;return bt().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(N){return{x:N.x,y:N.y}}}:h,p=wee(a,xWe),g={x:r,y:o},B.next=14,Qle(n,p);case 14:return m=B.sent,v=rk(gg(s)),y=zZe(v),b=g[v],C=g[y],c&&(b=Zle(b+m["y"===v?"top":"left"],b,b-m["y"===v?"bottom":"right"])),d&&(C=Zle(C+m["y"===y?"top":"left"],C,C-m["y"===y?"bottom":"right"])),j=f.fn(Ee(Ee({},n),{},(qa(i={},v,b),qa(i,y,C),i))),B.abrupt("return",Ee(Ee({},j),{},{data:{x:j.x-r,y:j.y-o}}));case 22:case"end":return B.stop()}},e)}))()}}};function Al(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function ad(t){return Al(t).getComputedStyle(t)}var YP,ece=Math.min,U_=Math.max,sk=Math.round;function tce(t){var n=ad(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=sk(e)!==r||sk(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function Cf(t){return ice(t)?(t.nodeName||"").toLowerCase():""}function nce(){if(YP)return YP;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?YP=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function ld(t){return t instanceof Al(t).HTMLElement}function eu(t){return t instanceof Al(t).Element}function ice(t){return t instanceof Al(t).Node}function rce(t){return typeof ShadowRoot<"u"&&(t instanceof Al(t).ShadowRoot||t instanceof ShadowRoot)}function ak(t){var n=ad(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function WZe(t){return["table","td","th"].includes(Cf(t))}function JP(t){var n=/firefox/i.test(nce()),e=ad(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function KP(){return/^((?!chrome|android).)*safari/i.test(nce())}function XP(t){return["html","body","#document"].includes(Cf(t))}function oce(t){return eu(t)?t:t.contextElement}var sce={x:1,y:1};function Zv(t){var n=oce(t);if(!ld(n))return sce;var e=n.getBoundingClientRect(),i=tce(n),r=i.width,o=i.height,s=i.fallback,a=(s?sk(e.width):e.width)/r,l=(s?sk(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function mg(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=oce(t),l=sce;n&&(i?eu(i)&&(l=Zv(i)):l=Zv(t));var c=a?Al(a):window,u=KP()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var g=Al(a),m=i&&eu(i)?Al(i):i,v=g.frameElement;v&&i&&m!==g;){var y=Zv(v),b=v.getBoundingClientRect(),C=getComputedStyle(v);b.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,b.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=b.x,h+=b.y,v=Al(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function Sf(t){return((ice(t)?t.ownerDocument:t.document)||window.document).documentElement}function lk(t){return eu(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ace(t){return mg(Sf(t)).left+lk(t).scrollLeft}function z_(t){if("html"===Cf(t))return t;var n=t.assignedSlot||t.parentNode||rce(t)&&t.host||Sf(t);return rce(n)?n.host:n}function lce(t){var n=z_(t);return XP(n)?n.ownerDocument.body:ld(n)&&ak(n)?n:lce(n)}function G_(t,n){var e;void 0===n&&(n=[]);var i=lce(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Al(i);return r?n.concat(o,o.visualViewport||[],ak(i)?i:[]):n.concat(i,G_(i))}function cce(t,n,e){var i,l,c,u,d,h,f,p,g;if("viewport"===n)i=function(l,c){var u=Al(l),d=Sf(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,g=0,m=0;if(h){f=h.width,p=h.height;var v=KP();(!v||v&&"fixed"===c)&&(g=h.offsetLeft,m=h.offsetTop)}return{width:f,height:p,x:g,y:m}}(t,e);else if("document"===n)l=Sf(t),c=Sf(l),u=lk(l),h=U_(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=U_(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+ace(l),g=-u.scrollTop,"rtl"===ad(d).direction&&(p+=U_(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:g};else if(eu(n))i=function(l,c){var u=mg(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=ld(l)?Zv(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Ee({},n);if(KP()){var o,s,a=Al(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return GP(i)}function uce(t,n){return ld(t)&&"fixed"!==ad(t).position?n?n(t):t.offsetParent:null}function dce(t,n){for(var e=Al(t),i=uce(t,n);i&&WZe(i)&&"static"===ad(i).position;)i=uce(i,n);return i&&("html"===Cf(i)||"body"===Cf(i)&&"static"===ad(i).position&&!JP(i))?e:i||function(r){for(var o=z_(r);ld(o)&&!XP(o);){if(JP(o))return o;o=z_(o)}return null}(t)||e}function qZe(t,n,e){var i=ld(n),r=Sf(n),o=mg(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==Cf(n)||ak(r))&&(s=lk(n)),ld(n)){var l=mg(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=ace(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var YZe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=G_(c).filter(function(y){return eu(y)&&"body"!==Cf(y)}),f=null,p="fixed"===ad(c).position,g=p?z_(c):c;eu(g)&&!XP(g);){var m=ad(g),v=JP(g);"fixed"===m.position?f=null:(p?v||f:v||"static"!==m.position||!f||!["absolute","fixed"].includes(f.position))?f=m:h=h.filter(function(y){return y!==g}),g=z_(g)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(sn(o),[i]),l=s.reduce(function(c,u){var d=cce(n,u,r);return c.top=U_(d.top,c.top),c.right=ece(d.right,c.right),c.bottom=ece(d.bottom,c.bottom),c.left=U_(d.left,c.left),c},cce(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=ld(e),o=Sf(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==Cf(e)||ak(o))&&(s=lk(e)),ld(e))){var c=mg(e);a=Zv(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:eu,getDimensions:function(t){return ld(t)?tce(t):t.getBoundingClientRect()},getOffsetParent:dce,getDocumentElement:Sf,getScale:Zv,getElementRects:function(t){var n=this;return ni(bt().mark(function e(){var i,r,o,s,a;return bt().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||dce,a=n.getDimensions,l.t0=qZe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Ee,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===ad(t).direction}};function XZe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==xt(i[0])&&(i=u(i));var f=i.filter(function(p){var g=c(p[h],e,p);return g&&r&&null!=o&&o.length&&(g=!o.some(function(m){return!!l&&m[s]===p[s]})),g});return a&&(f=d(f)),f}function QZe(t){return QP.apply(this,arguments)}function QP(){return QP=ni(bt().mark(function t(n){var e,i,r,o,s;return bt().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==xt(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),QP.apply(this,arguments)}function ZZe(t){gn(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function eet(t){var n,e;return{c:function(){n=Gu("svg"),I(e=Gu("path"),"fill","currentColor"),I(e,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),I(n,"width","100%"),I(n,"height","100%"),I(n,"viewBox","0 0 20 20"),I(n,"focusable","false"),I(n,"aria-hidden","true"),I(n,"class","svelte-qbd276")},m:function(i,r){ve(i,n,r),ee(n,e)},p:tt,i:tt,o:tt,d:function(i){i&&me(n)}}}var tet=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,null,eet,po,{},ZZe),r}return de(e)}();function net(t){gn(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function iet(t){var n,e;return{c:function(){n=Gu("svg"),I(e=Gu("path"),"fill","currentColor"),I(e,"d","M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),I(n,"width","100%"),I(n,"height","100%"),I(n,"viewBox","-2 -2 50 50"),I(n,"focusable","false"),I(n,"aria-hidden","true"),I(n,"role","presentation"),I(n,"class","svelte-whdbu1")},m:function(i,r){ve(i,n,r),ee(n,e)},p:tt,i:tt,o:tt,d:function(i){i&&me(n)}}}var ck=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,null,iet,po,{},net),r}return de(e)}();function ret(t){gn(t,"svelte-1p3nqvd",".loading.svelte-1p3nqvd{width:var(--spinner-width, 20px);height:var(--spinner-height, 20px);color:var(--spinner-color, var(--icons-color));animation:svelte-1p3nqvd-rotate 0.75s linear infinite;transform-origin:center center;transform:none}.circle_path.svelte-1p3nqvd{stroke-dasharray:90;stroke-linecap:round}@keyframes svelte-1p3nqvd-rotate{100%{transform:rotate(360deg)}}")}function oet(t){var n,e;return{c:function(){n=Gu("svg"),I(e=Gu("circle"),"class","circle_path svelte-1p3nqvd"),I(e,"cx","50"),I(e,"cy","50"),I(e,"r","20"),I(e,"fill","none"),I(e,"stroke","currentColor"),I(e,"stroke-width","5"),I(e,"stroke-miterlimit","10"),I(n,"class","loading svelte-1p3nqvd"),I(n,"viewBox","25 25 50 50")},m:function(i,r){ve(i,n,r),ee(n,e)},p:tt,i:tt,o:tt,d:function(i){i&&me(n)}}}var set=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,null,oet,po,{},ret),r}return de(e)}();function aet(t){gn(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:absolute;cursor:default;border:none;color:var(--input-color, var(--item-color));padding:var(--input-padding, 0);letter-spacing:var(--input-letter-spacing, inherit);margin:var(--input-margin, 0);min-width:10px;top:0;right:0;bottom:0;left:0;background:transparent;font-size:var(--font-size, 16px)}.svelte-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:relative;overflow:var(--selected-item-overflow, hidden);padding:var(--selected-item-padding, 0 20px 0 0);text-overflow:ellipsis;white-space:nowrap;color:var(--selected-item-color, inherit);font-size:var(--font-size, 16px)}.multi.svelte-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{all:unset;display:flex;align-items:center;justify-content:center;width:var(--clear-select-width, 40px);height:var(--clear-select-height, 100%);color:var(--clear-select-color, var(--icons-color));margin:var(--clear-select-margin, 0);pointer-events:all;flex-shrink:0}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--loading-width, 40px);height:var(--loading-height);color:var(--loading-color, var(--icons-color));margin:var(--loading--margin, 0);flex-shrink:0}.chevron.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--chevron-width, 40px);height:var(--chevron-height, 40px);background:var(--chevron-background, transparent);pointer-events:var(--chevron-pointer-events, none);color:var(--chevron-color, var(--icons-color));border:var(--chevron-border, 0 0 0 1px solid #d8dbdf);flex-shrink:0}.multi.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-input-padding, 0);position:relative;margin:var(--multi-select-input-margin, 5px 0);flex:1 1 40px}.svelte-select.error.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{z-index:9999;border:0px;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0px;white-space:nowrap}.multi-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--multi-item-bg, #ebedef);margin:var(--multi-item-margin, 0);outline:var(--multi-item-outline, 1px solid #ddd);border-radius:var(--multi-item-border-radius, 4px);height:var(--multi-item-height, 25px);line-height:var(--multi-item-height, 25px);display:flex;cursor:default;padding:var(--multi-item-padding, 0 5px);overflow:hidden;gap:var(--multi-item-gap, 4px);outline-offset:-1px;max-width:var(--multi-max-width, none);color:var(--multi-item-color, var(--item-color))}.multi-item.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-shadow:var(--list-shadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--list-border-radius, 4px);max-height:var(--list-max-height, 252px);overflow-y:auto;background:var(--list-background, #fff);position:var(--list-position, absolute);z-index:var(--list-z-index, 2);border:var(--list-border)}.prefloat.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{cursor:default;height:var(--item-height, var(--height, 42px));line-height:var(--item-line-height, var(--height, 42px));padding:var(--item-padding, 0 20px);color:var(--item-color, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:var(--item-transition, all 0.2s);align-items:center;width:100%}.item.group-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var cet=function(t){return{value:8&t[0]}},hce=function(t){return{value:t[3]}},uet=function(t){return{listOpen:64&t[0]}},fce=function(t){return{listOpen:t[6]}},det=function(t){return{}},pce=function(t){return{}},het=function(t){return{}},gce=function(t){return{}},fet=function(t){return{selection:8&t[0]}},mce=function(t){return{selection:t[3]}};function vce(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var pet=function(t){return{}},yce=function(t){return{}},get=function(t){return{selection:8&t[0]}},_ce=function(t){return{selection:t[127],index:t[129]}},met=function(t){return{}},bce=function(t){return{}},vet=function(t){return{}},wce=function(t){return{}};function xce(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var yet=function(t){return{item:16777216&t[0]}},Cce=function(t){return{item:t[127],index:t[129]}},_et=function(t){return{filteredItems:16777216&t[0]}},Sce=function(t){return{filteredItems:t[24]}};function kce(t){var n,e,i,r,o,s,a=[xet,wet,bet],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=oe("div"),i&&i.c(),I(n,"class","svelte-select-list svelte-tyxmms"),Xe(n,"prefloat",t[28])},m:function(u,d){ve(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[ws(t[49].call(null,n)),Ze(n,"scroll",t[41]),Ze(n,"pointerdown",th(t[50])),Ze(n,"pointerup",nh(th(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&(it(),Q(l[h],1,1,function(){l[h]=null}),rt()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),W(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&Xe(n,"prefloat",u[28])},i:function(u){r||(W(i),r=!0)},o:function(u){Q(i),r=!1},d:function(u){u&&me(n),~e&&l[e].d(),t[91](null),o=!1,rr(s)}}}function bet(t){var n,e,i=t[83].empty,r=ko(i,t,t[82],wce),o=r||{c:function(){(e=oe("div")).textContent="No options",I(e,"class","empty svelte-tyxmms")},m:function(s,a){ve(s,e,a)},p:tt,d:function(s){s&&me(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Do(r,i,s,s[82],n?To(i,s[82],a,vet):Ao(s[82]),wce)},i:function(s){n||(W(o,s),n=!0)},o:function(s){Q(o,s),n=!1},d:function(s){o&&o.d(s)}}}function wet(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Ae,Qt)}:At,hn=n.debounceWait,dn=void 0===hn?300:hn,Di=n.hideEmptyState,Yi=void 0!==Di&&Di,vn=n.inputAttributes,bi=void 0===vn?{}:vn,he=n.listAutoWidth,Ye=void 0===he||he,ot=n.showChevron,ht=void 0!==ot&&ot,vt=n.listOffset,on=void 0===vt?5:vt,Rn=n.hoverItemIndex,Vt=void 0===Rn?0:Rn,tn=n.floatingConfig,Xt=void 0===tn?{}:tn,wi=n.class,Oi=void 0===wi?"":wi;function Nr(Ae){var Qt=[],ii={};Ae.forEach(function(wu){var Fi=ki(wu);Qt.includes(Fi)||(Qt.push(Fi),ii[Fi]=[],Fi&&ii[Fi].push(Object.assign(Go(Fi,wu),{id:Fi,groupHeader:!0,selectable:Hi}))),ii[Fi].push(Object.assign({groupItem:!!Fi},wu))});var qo=[];return yi(Qt).forEach(function(wu){ii[wu]&&qo.push.apply(qo,sn(ii[wu]))}),qo}function us(){var Ae=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Qt=arguments.length>1?arguments[1]:void 0;e(7,Vt=Ae<0?0:Ae),!Qt&&ki&&c[Vt]&&!c[Vt].selectable&&yr(1)}function pu(){var Ae=!0;if(R){var Qt=[],ii=[];R.forEach(function(qo){Qt.includes(qo[Nt])?Ae=!1:(Qt.push(qo[Nt]),ii.push(qo))}),Ae||e(3,R=ii)}return Ae}function mc(Ae){var Qt=Ae?Ae[Nt]:R[Nt];return _t.find(function(ii){return ii[Nt]===Qt})}function ds(Ae){return Ma.apply(this,arguments)}function Ma(){return(Ma=ni(bt().mark(function Ae(Qt){var ii;return bt().wrap(function(qo){for(;;)switch(qo.prev=qo.next){case 0:ii=R[Qt],e(3,R=1===R.length?void 0:R.filter(function(wu){return wu!==ii})),j("clear",ii);case 3:case"end":return qo.stop()}},Ae)}))).apply(this,arguments)}function gu(Ae){var Qt;be&&M===(null===(Qt=document)||void 0===Qt?void 0:Qt.activeElement)||(Ae&&j("focus",Ae),M.focus(),e(2,be=!0))}function Oo(Ae){return mu.apply(this,arguments)}function mu(){return(mu=ni(bt().mark(function Ae(Qt){return bt().wrap(function(ii){for(;;)switch(ii.prev=ii.next){case 0:if(!fn&&!$b){ii.next=2;break}return ii.abrupt("return");case 2:(Se||be)&&(j("blur",Qt),vu(),e(2,be=!1),e(26,f=void 0),M.blur());case 3:case"end":return ii.stop()}},Ae)}))).apply(this,arguments)}function vu(){e(4,K=""),e(6,Se=!1)}y=ni(bt().mark(function Ae(){return bt().wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:e(78,p=R),e(79,g=K),e(80,m=L);case 3:case"end":return Qt.stop()}},Ae)})),fv().$$.before_update.push(y),Kl(function(){Se&&e(2,be=!0),be&&M&&M.focus()});var ft,lD=n.ariaValues,ce=void 0===lD?function(Ae){return"Option ".concat(Ae,", selected.")}:lD,je=n.ariaListOpen,Qe=void 0===je?function(Ae,Qt){return"You are currently focused on option ".concat(Ae,". There are ").concat(Qt," results available.")}:je,at=n.ariaFocused,dt=void 0===at?function(){return"Select is focused, type to refine list, press down to open the menu."}:at,Ht=null;function ln(){clearTimeout(ft),ft=setTimeout(function(){fn=!1},100)}Vc(function(){var Ae;null===(Ae=Ht)||void 0===Ae||Ae.remove()});var fn=!1;function jr(Ae){Ae&&!1!==Ae.selectable&&function(Qt){if(Qt){e(4,K="");var ii=Object.assign({},Qt);if(ii.groupHeader&&!ii.selectable)return;e(3,R=L?R?R.concat([ii]):[ii]:e(3,R=ii)),setTimeout(function(){Ui&&vu(),e(26,f=void 0),j("change",R),j("select",Qt)})}}(Ae)}function Io(Ae){fn||e(7,Vt=Ae)}function Yr(Ae){var qo,Qt=Ae.item,ii=Ae.i;if(!1!==Qt?.selectable){if(R&&!L&&R[Nt]===Qt[Nt])return vu();((qo=Qt).groupHeader&&qo.selectable||qo.selectable||!qo.hasOwnProperty("selectable"))&&(e(7,Vt=ii),jr(Qt)),$b=!1}}function yr(Ae){if(0===c.filter(function(ii){return!Object.hasOwn(ii,"selectable")||!0===ii.selectable}).length)return e(7,Vt=0);e(7,Ae>0&&Vt===c.length-1?Vt=0:Ae<0&&0===Vt?Vt=c.length-1:Vt+=Ae);var Qt=c[Vt];Qt&&!1===Qt.selectable&&(1!==Ae&&-1!==Ae||yr(Ae))}var Oa=yu,wd=yu;function yu(Ae){return{update:function(Qt){Qt.scroll&&(ln(),Ae.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Ii={strategy:"absolute",placement:"bottom-start",middleware:[UZe(on),HZe(),GZe()],autoUpdate:!1},tl=Wt(function KZe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Ee(Ee(Ee({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Ee({platform:YZe},d),p=Ee(Ee({},f.platform),{},{_c:h}),PZe(c,u,Ee(Ee({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Vc(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function JZe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(sn(eu(t)?G_(t):t.contextElement?G_(t.contextElement):[]),sn(G_(n))):[];p.forEach(function(b){f&&b.addEventListener("scroll",e,{passive:!0}),l&&b.addEventListener("resize",e)});var g,m=null;if(u){var v=!0;m=new ResizeObserver(function(){v||e(),v=!1}),eu(t)&&!h&&m.observe(t),eu(t)||!t.contextElement||h||m.observe(t.contextElement),m.observe(n)}var y=h?mg(t):null;return h&&function b(){var C=mg(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,g=requestAnimationFrame(b)}(),e(),function(){var b;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(b=m)||b.disconnect(),m=null,h&&cancelAnimationFrame(g)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Ii),3),vc=tl[0],_u=tl[1],xd=tl[2],bu=!0,$b=!1;return t.$$set=function(Ae){"justValue"in Ae&&e(53,N=Ae.justValue),"filter"in Ae&&e(54,V=Ae.filter),"getItems"in Ae&&e(55,Y=Ae.getItems),"id"in Ae&&e(56,H=Ae.id),"name"in Ae&&e(8,F=Ae.name),"container"in Ae&&e(0,D=Ae.container),"input"in Ae&&e(1,M=Ae.input),"multiple"in Ae&&e(9,L=Ae.multiple),"multiFullItemClearable"in Ae&&e(10,ne=Ae.multiFullItemClearable),"disabled"in Ae&&e(11,ae=Ae.disabled),"focused"in Ae&&e(2,be=Ae.focused),"value"in Ae&&e(3,R=Ae.value),"filterText"in Ae&&e(4,K=Ae.filterText),"placeholder"in Ae&&e(57,Te=Ae.placeholder),"placeholderAlwaysShow"in Ae&&e(58,Ue=Ae.placeholderAlwaysShow),"items"in Ae&&e(52,_t=Ae.items),"label"in Ae&&e(12,ct=Ae.label),"itemFilter"in Ae&&e(59,mt=Ae.itemFilter),"groupBy"in Ae&&e(60,ki=Ae.groupBy),"groupFilter"in Ae&&e(61,yi=Ae.groupFilter),"groupHeaderSelectable"in Ae&&e(62,Hi=Ae.groupHeaderSelectable),"itemId"in Ae&&e(13,Nt=Ae.itemId),"loadOptions"in Ae&&e(63,cn=Ae.loadOptions),"containerStyles"in Ae&&e(14,Ti=Ae.containerStyles),"hasError"in Ae&&e(15,qr=Ae.hasError),"filterSelectedItems"in Ae&&e(64,jt=Ae.filterSelectedItems),"required"in Ae&&e(16,wn=Ae.required),"closeListOnChange"in Ae&&e(65,Ui=Ae.closeListOnChange),"createGroupHeaderItem"in Ae&&e(66,Go=Ae.createGroupHeaderItem),"searchable"in Ae&&e(17,Wo=Ae.searchable),"inputStyles"in Ae&&e(18,Js=Ae.inputStyles),"clearable"in Ae&&e(68,le=Ae.clearable),"loading"in Ae&&e(5,ke=Ae.loading),"listOpen"in Ae&&e(6,Se=Ae.listOpen),"debounce"in Ae&&e(69,rn=Ae.debounce),"debounceWait"in Ae&&e(70,dn=Ae.debounceWait),"hideEmptyState"in Ae&&e(19,Yi=Ae.hideEmptyState),"inputAttributes"in Ae&&e(71,bi=Ae.inputAttributes),"listAutoWidth"in Ae&&e(72,Ye=Ae.listAutoWidth),"showChevron"in Ae&&e(20,ht=Ae.showChevron),"listOffset"in Ae&&e(73,on=Ae.listOffset),"hoverItemIndex"in Ae&&e(7,Vt=Ae.hoverItemIndex),"floatingConfig"in Ae&&e(74,Xt=Ae.floatingConfig),"class"in Ae&&e(21,Oi=Ae.class),"ariaValues"in Ae&&e(75,ce=Ae.ariaValues),"ariaListOpen"in Ae&&e(76,Qe=Ae.ariaListOpen),"ariaFocused"in Ae&&e(77,dt=Ae.ariaFocused),"$$scope"in Ae&&e(82,k=Ae.$$scope)},t.$$.update=function(){var Ae,Qt,ii,qo,wu,Fi;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&R&&function(){if("string"==typeof R){var Fi,Yo=(_t||[]).find(function(yc){return yc[Nt]===R});e(3,R=Yo||(qa(Fi={},Nt,R),qa(Fi,"label",R),Fi))}else L&&Array.isArray(R)&&R.length>0&&e(3,R=R.map(function(yc){return"string"==typeof yc?{value:yc,label:yc}:yc}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!bi&&Wo||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},bi)),H&&e(27,v.id=H,v),Wo||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&L&&R&&(Array.isArray(R)?e(3,R=sn(R)):e(3,R=[R])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&m&&!L&&R&&e(3,R=null),520&t.$$.dirty[0]&&L&&R&&R.length>1&&pu(),8&t.$$.dirty[0]&&R&&(L?JSON.stringify(R)!==JSON.stringify(p)&&pu()&&j("input",R):p&&JSON.stringify(R[Nt])===JSON.stringify(p[Nt])||j("input",R)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!R&&L&&p&&j("input",R),6&t.$$.dirty[0]&&!be&&M&&vu(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&K!==g&&(cn||0!==K.length)&&(cn?rn(ni(bt().mark(function Fi(){var Yo;return bt().wrap(function(yc){for(;;)switch(yc.prev=yc.next){case 0:return e(5,ke=!0),yc.next=3,Y({dispatch:j,loadOptions:cn,convertStringItemsToObjects:Pce,filterText:K});case 3:(Yo=yc.sent)?(e(5,ke=Yo.loading),e(6,Se=Se?Yo.listOpen:K.length>0),e(2,be=Se&&Yo.focused),e(52,_t=ki?Nr(Yo.filteredItems):Yo.filteredItems)):(e(5,ke=!1),e(2,be=!0),e(6,Se=!0));case 5:case"end":return yc.stop()}},Fi)})),dn):(e(6,Se=!0),L&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=V({loadOptions:cn,filterText:K,items:_t,multiple:L,value:R,itemId:Nt,groupBy:ki,label:ct,filterSelectedItems:jt,itemFilter:mt,convertStringItemsToObjects:Pce,filterGroupedItems:Nr})),16777800&t.$$.dirty[0]&&!L&&Se&&R&&c&&(Ae=c.findIndex(function(Fi){return Fi[Nt]===R[Nt]}),us(Ae,!0)),576&t.$$.dirty[0]&&Se&&L&&e(7,Vt=0),16&t.$$.dirty[0]&&K&&e(7,Vt=0),128&t.$$.dirty[0]&&j("hoverItem",Vt),520&t.$$.dirty[0]&&e(25,i=L?R&&R.length>0:R),33554448&t.$$.dirty[0]&&e(35,r=i&&K.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&le&&!ae&&!ke),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=Ue&&L||L&&0===(null===(Qt=R)||void 0===Qt?void 0:Qt.length)?Te:R?"":Te),520&t.$$.dirty[0]&&e(32,a=R?(ii=L&&R.length>0?R.map(function(Fi){return Fi[ct]}).join(", "):R[ct],ce(ii)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var Fi=c[Vt];return Se&&Fi?Qe(Fi[ct],c?c.length:0):dt()}()),2097152&t.$$.dirty[1]&&(Fi=_t)&&0!==Fi.length&&!Fi.some(function(Yo){return"object"!==xt(Yo)})&&R&&(L?!R.some(function(Yo){return!Yo||!Yo[Nt]}):R[Nt])&&(Array.isArray(R)?e(3,R=R.map(function(Yo){return mc(Yo)||Yo})):e(3,R=mc()||R)),8712&t.$$.dirty[0]&&e(53,N=L?R?R.map(function(Fi){return Fi[Nt]}):null:R&&R[Nt]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(L||!p||R||j("input",R)),16777800&t.$$.dirty[0]&&Se&&c&&!L&&!R&&us(),16777216&t.$$.dirty[0]&&function(Fi){Se&&j("filter",Fi)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&D&&void 0===(null===(qo=Xt)||void 0===qo?void 0:qo.autoUpdate)&&e(81,Ii.autoUpdate=!0,Ii),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&D&&Xt&&xd(Object.assign(Ii,Xt)),8388608&t.$$.dirty[0]&&e(30,u=!!Ht),8388672&t.$$.dirty[0]&&function(Fi,Yo){if(!Fi||!Yo)return e(28,bu=!0);setTimeout(function(){e(28,bu=!1)},0)}(Ht,Se),8388673&t.$$.dirty[0]&&Se&&D&&Ht&&(wu=D.getBoundingClientRect().width,e(23,Ht.style.width=Ye?wu+"px":"auto",Ht)),128&t.$$.dirty[0]&&e(29,d=Vt),70&t.$$.dirty[0]&&M&&Se&&!be&&gu()},[D,M,be,R,K,ke,Se,Vt,F,L,ne,ae,ct,Nt,Ti,qr,wn,Wo,Js,Yi,ht,Oi,function(){j("clear",R),e(3,R=void 0),vu(),gu()},Ht,c,i,f,v,bu,d,u,l,a,s,o,r,ds,function(Ae){if(be)switch(Ae.stopPropagation(),Ae.key){case"Escape":Ae.preventDefault(),vu();break;case"Enter":if(Ae.preventDefault(),Se){if(0===c.length)break;if(R&&!L&&R[Nt]===c[Vt][Nt]){vu();break}jr(c[Vt])}break;case"ArrowDown":Ae.preventDefault(),Se?yr(1):(e(6,Se=!0),e(26,f=void 0));break;case"ArrowUp":Ae.preventDefault(),Se?yr(-1):(e(6,Se=!0),e(26,f=void 0));break;case"Tab":if(Se&&be){if(0===c.length||R&&R[Nt]===c[Vt][Nt])return vu();Ae.preventDefault(),jr(c[Vt]),vu()}break;case"Backspace":if(!L||K.length>0)return;if(L&&R&&R.length>0){if(ds(void 0!==f?f:R.length-1),0===f||void 0===f)break;e(26,f=R.length>f?f-1:void 0)}break;case"ArrowLeft":if(!R||!L||K.length>0)return;void 0===f?e(26,f=R.length-1):R.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!R||!L||K.length>0||void 0===f)return;f===R.length-1?e(26,f=void 0):f",">="].map(function(H){return{value:H,label:H}}),N=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],$=null!==(i=T)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?N_(T.filter.path):null,V=null!==(o=T)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?B.find(function(H){var G;return H.value===(null===(G=T.filter)||void 0===G?void 0:G.relation)}):null,z=(null===(a=T)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",Y=null!==(c=T)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?N_(T.sort.path):null,O=null!==(d=T)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?N.find(function(H){var G;return H.value===(null===(G=T.sort)||void 0===G?void 0:G.direction)}):null;return t.$$set=function(H){"json"in H&&e(11,C=H.json),"queryOptions"in H&&e(10,T=H.queryOptions),"onChange"in H&&e(12,j=H.onChange)},t.$$.update=function(){var H,G,F,Z,D,E,M,U,L,X,ne,ge,ae,De,be,Ie,R,J,K,pe,Te;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?mP(C):[]),34816&t.$$.dirty&&e(13,g=f?mP(C,!0):[]),16384&t.$$.dirty&&e(7,m=p.map(N_)),8192&t.$$.dirty&&e(6,v=g?g.map(N_):[]),1088&t.$$.dirty&&e(5,y=null!==(H=T)&&void 0!==H&&null!==(G=H.projection)&&void 0!==G&&G.paths&&v?T.projection.paths.map(function(K){return v.find(function(pe){return ai(pe.value,K)})}).filter(function(K){return!!K}):null),1&t.$$.dirty&&(Z=(null===(F=$)||void 0===F?void 0:F.value)||null,ai(null===(D=T)||void 0===D||null===(E=D.filter)||void 0===E?void 0:E.path,Z)||(b("changeFilterPath",Z),e(10,T=Wc(T,["filter","path"],Z,!0)),j(T))),2&t.$$.dirty&&(U=(null===(M=V)||void 0===M?void 0:M.value)||null,ai(null===(L=T)||void 0===L||null===(X=L.filter)||void 0===X?void 0:X.relation,U)||(b("changeFilterRelation",U),e(10,T=Wc(T,["filter","relation"],U,!0)),j(T))),4&t.$$.dirty&&(ai(null===(ge=T)||void 0===ge||null===(ae=ge.filter)||void 0===ae?void 0:ae.value,ne=z||null)||(b("changeFilterValue",ne),e(10,T=Wc(T,["filter","value"],ne,!0)),j(T))),8&t.$$.dirty&&(K=(null===(De=Y)||void 0===De?void 0:De.value)||null,ai(null===(pe=T)||void 0===pe||null===(Te=pe.sort)||void 0===Te?void 0:Te.path,K)||(b("changeSortPath",K),e(10,T=Wc(T,["sort","path"],K,!0)),j(T))),16&t.$$.dirty&&(Ie=(null===(be=O)||void 0===be?void 0:be.value)||null,ai(null===(R=T)||void 0===R||null===(J=R.sort)||void 0===J?void 0:J.direction,Ie)||(b("changeSortDirection",Ie),e(10,T=Wc(T,["sort","direction"],Ie,!0)),j(T))),32&t.$$.dirty&&function(K){var pe,Te;ai(null===(pe=T)||void 0===pe||null===(Te=pe.projection)||void 0===Te?void 0:Te.paths,K)||(b("changeProjectionPaths",K),e(10,T=Wc(T,["projection","paths"],K,!0)),j(T))}(y?y.map(function(K){return K.value}):null)},[$,V,z,Y,O,y,v,m,B,N,T,C,j,g,p,f,function(H){e(0,$=H)},function(H){e(1,V=H)},function(){e(2,z=this.value)},function(H){e(3,Y=H)},function(H){e(4,O=H)},function(H){e(5,y=H),e(10,T),e(6,v),e(13,g),e(15,f),e(11,C)}]}var Oet=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Met,Eet,In,{json:11,queryOptions:10,onChange:12},Aet),r}return de(e)}();function Iet(t){gn(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function Rce(t,n,e){var i=t.slice();return i[5]=n[e],i}function Net(t){var n,e;return n=new li({props:{data:R_}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function jet(t){var n,e;return n=new li({props:{data:P_}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Lce(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[jet,Net],f=[];function p(m,v){return m[5].id===m[0]?0:1}function g(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=oe("button"),i.c(),r=Me(),o=ut(d),s=Me(),I(n,"type","button"),I(n,"class","jse-query-language svelte-19cxesy"),I(n,"title",a="Select ".concat(t[5].name," as query language")),Xe(n,"selected",t[5].id===t[0])},m:function(m,v){ve(m,n,v),f[e].m(n,null),ee(n,r),ee(n,o),ee(n,s),l=!0,c||(u=Ze(n,"click",g),c=!0)},p:function(m,v){var y=e;(e=p(t=m))===y?f[e].p(t,v):(it(),Q(f[y],1,1,function(){f[y]=null}),rt(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),W(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&Jt(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&I(n,"title",a),(!l||3&v)&&Xe(n,"selected",t[5].id===t[0])},i:function(m){l||(W(i),l=!0)},o:function(m){Q(i),l=!1},d:function(m){m&&me(n),f[e].d(),c=!1,u()}}}function Pet(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&Fce(t);return s=new li({props:{data:Qv}}),{c:function(){n=oe("div"),(e=oe("div")).textContent="Transform",i=Me(),u&&u.c(),r=Me(),o=oe("button"),$e(s.$$.fragment),I(e,"class","jse-title svelte-d01h2s"),I(o,"type","button"),I(o,"class","jse-close svelte-d01h2s"),I(n,"class","jse-header svelte-d01h2s")},m:function(d,h){ve(d,n,h),ee(n,e),ee(n,i),u&&u.m(n,null),ee(n,r),ee(n,o),Le(s,o,null),a=!0,l||(c=Ze(o,"click",t[2]),l=!0)},p:function(d,h){var f=Wt(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&W(u,1)):((u=Fce(d)).c(),W(u,1),u.m(n,r)):u&&(it(),Q(u,1,1,function(){u=null}),rt())},i:function(d){a||(W(u),W(s.$$.fragment,d),a=!0)},o:function(d){Q(u),Q(s.$$.fragment,d),a=!1},d:function(d){d&&me(n),u&&u.d(),Fe(s),l=!1,c()}}}function Bet(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=xs("simple-modal").close,c=xs("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(Let,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){qn[h?"unshift":"push"](function(){e(1,i=h)})}]}var Vet=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Bet,$et,In,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},Fet),r}return de(e)}(),ZP=Cs("jsoneditor:AutoScrollHandler"),Het=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},$ce=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function g(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function m(v){c||(c=v),g(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||Het,s=y.a11y||!1,xt(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),xt(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,xt(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(m)}},uk=Cs("jsoneditor:History");function Bce(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){uk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){uk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,uk("undo",h),a(),h}},redo:function d(){if(o())return uk("redo",e[i-=1]),a(),e[i]}}}function e0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var t0=Cs("validation");function Vce(t,n,e,i){return t0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function Uet(t,n,e,i){if(t0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:qu.info}]};if(0===t.length)return null;try{var r=e0(function(){return e.parse(t)},function(l){return t0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:e0(function(){return i.parse(t)},function(l){return t0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=e0(function(){return n(o)},function(l){return t0("validate: validated json in ".concat(l," ms"))});return Yn(s)?null:{validationErrors:s}}catch(l){var a=e0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Yu(c)),!0}catch{return!1}}(t,e)},function(c){return t0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:US(t,l.message||l.toString()),isRepairable:a}}}var dk=Cs("jsoneditor:FocusTracker");function eR(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(dk("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){dk("blur"),l=!1,a()}))}(0,t.onMount)(function(){dk("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){dk("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function zet(t){gn(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function Hce(t,n,e){var i=t.slice();return i[8]=n[e],i}function Uce(t){var n,e;return n=new li({props:{data:t[1]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function zce(t){var n,e;return n=new li({props:{data:t[8].icon}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Gce(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&zce(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=oe("button"),d&&d.c(),e=Me(),i=ut(u),r=Me(),I(n,"type","button"),I(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),I(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,g){ve(p,n,g),d&&d.m(n,null),ee(n,e),ee(n,i),ee(n,r),a=!0,l||(c=[Ze(n,"click",h),Ze(n,"mousedown",f)],l=!0)},p:function(p,g){(t=p)[8].icon?d?(d.p(t,g),8&g&&W(d,1)):((d=zce(t)).c(),W(d,1),d.m(n,e)):d&&(it(),Q(d,1,1,function(){d=null}),rt()),(!a||8&g)&&u!==(u=t[8].text+"")&&Jt(i,u),(!a||8&g&&o!==(o=t[8].title))&&I(n,"title",o),(!a||8&g&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(W(d),a=!0)},o:function(p){Q(d),a=!1},d:function(p){p&&me(n),d&&d.d(),l=!1,rr(c)}}}function Get(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&Uce(t),f=t[3],p=[],g=0;g100&&Kce(t);return{c:function(){n=oe("table"),e=oe("tbody");for(var u=0;u100?c?c.p(u,d):((c=Kce(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&Yce(t);function y(){return t[6](t[7])}return{c:function(){n=oe("tr"),e=oe("td"),$e(i.$$.fragment),r=Me(),o=oe("td"),s=ut(g),a=Me(),l=oe("td"),c=ut(m),u=Me(),d=oe("td"),v&&v.c(),I(e,"class","jse-validation-error-icon svelte-1oe8e8r"),I(o,"class","svelte-1oe8e8r"),I(l,"class","svelte-1oe8e8r"),I(d,"class","jse-validation-error-action svelte-1oe8e8r"),I(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(b,C){ve(b,n,C),ee(n,e),Le(i,e,null),ee(n,r),ee(n,o),ee(o,s),ee(n,a),ee(n,l),ee(l,c),ee(n,u),ee(n,d),v&&v.m(d,null),h=!0,f||(p=Ze(n,"click",y),f=!0)},p:function(b,C){t=b,(!h||1&C)&&g!==(g=oc(Xa(t[7].path))+"")&&Jt(s,g),(!h||1&C)&&m!==(m=t[7].message+"")&&Jt(c,m),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&W(v,1)):((v=Yce(t)).c(),W(v,1),v.m(d,null)):v&&(it(),Q(v,1,1,function(){v=null}),rt())},i:function(b){h||(W(i.$$.fragment,b),W(v),h=!0)},o:function(b){Q(i.$$.fragment,b),Q(v),h=!1},d:function(b){b&&me(n),Fe(i),v&&v.d(),f=!1,p()}}}function Kce(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=oe("tr"),e=oe("td"),i=Me(),r=oe("td"),o=Me(),s=oe("td"),a=ut("(and "),l=ut(h),c=ut(" more errors)"),u=Me(),d=oe("td"),I(e,"class","svelte-1oe8e8r"),I(r,"class","svelte-1oe8e8r"),I(s,"class","svelte-1oe8e8r"),I(d,"class","svelte-1oe8e8r"),I(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){ve(f,n,p),ee(n,e),ee(n,i),ee(n,r),ee(n,o),ee(n,s),ee(s,a),ee(s,l),ee(s,c),ee(n,u),ee(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&Jt(l,h)},d:function(f){f&&me(n)}}}function Ket(t){var n,e,i=!Yn(t[0]),r=i&&qce(t);return{c:function(){r&&r.c(),n=Ci()},m:function(o,s){r&&r.m(o,s),ve(o,n,s),e=!0},p:function(o,s){var a=Wt(s,1)[0];1&a&&(i=!Yn(o[0])),i?r?(r.p(o,a),1&a&&W(r,1)):((r=qce(o)).c(),W(r,1),r.m(n.parentNode,n)):r&&(it(),Q(r,1,1,function(){r=null}),rt())},i:function(o){e||(W(r),e=!0)},o:function(o){Q(r),e=!1},d:function(o){r&&r.d(o),o&&me(n)}}}function Xet(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var tR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Xet,Ket,In,{validationErrors:0,selectError:1},qet),r}return de(e)}(),Qet=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function Zet(t){gn(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function ett(t){var n,e,i,r,o,s,a,l,c;return s=new li({props:{data:Qv}}),{c:function(){n=oe("div"),e=oe("div"),i=ut(t[0]),r=Me(),o=oe("button"),$e(s.$$.fragment),I(e,"class","jse-title svelte-d01h2s"),I(o,"type","button"),I(o,"class","jse-close svelte-d01h2s"),I(n,"class","jse-header svelte-d01h2s")},m:function(u,d){ve(u,n,d),ee(n,e),ee(e,i),ee(n,r),ee(n,o),Le(s,o,null),a=!0,l||(c=Ze(o,"click",t[3]),l=!0)},p:function(u,d){var h=Wt(d,1)[0];(!a||1&h)&&Jt(i,u[0])},i:function(u){a||(W(s.$$.fragment,u),a=!0)},o:function(u){Q(s.$$.fragment,u),a=!1},d:function(u){u&&me(n),Fe(s),l=!1,c()}}}function ttt(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=xs("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var nR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ttt,ett,In,{title:0,onClose:1},Zet),r}return de(e)}();function ntt(t){gn(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function itt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B;return e=new nR({props:{title:"Copying and pasting"}}),{c:function(){n=oe("div"),$e(e.$$.fragment),i=Me(),r=oe("div"),(o=oe("div")).textContent="These actions are unavailable via the menu. Please use:",s=Me(),a=oe("div"),l=oe("div"),(c=oe("div")).textContent="".concat(t[1],"+C"),u=ut("\n for copy"),d=Me(),h=oe("div"),(f=oe("div")).textContent="".concat(t[1],"+X"),p=ut("\n for cut"),g=Me(),m=oe("div"),(v=oe("div")).textContent="".concat(t[1],"+V"),y=ut("\n for paste"),b=Me(),C=oe("div"),(k=oe("button")).textContent="Close",I(c,"class","jse-key svelte-1olothd"),I(l,"class","jse-shortcut"),I(f,"class","jse-key svelte-1olothd"),I(h,"class","jse-shortcut"),I(v,"class","jse-key svelte-1olothd"),I(m,"class","jse-shortcut"),I(a,"class","jse-shortcuts svelte-1olothd"),I(k,"type","button"),I(k,"class","jse-primary svelte-1olothd"),I(C,"class","jse-actions svelte-1olothd"),I(r,"class","jse-modal-contents svelte-1olothd"),I(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(N,$){ve(N,n,$),Le(e,n,null),ee(n,i),ee(n,r),ee(r,o),ee(r,s),ee(r,a),ee(a,l),ee(l,c),ee(l,u),ee(a,d),ee(a,h),ee(h,f),ee(h,p),ee(a,g),ee(a,m),ee(m,v),ee(m,y),ee(r,b),ee(r,C),ee(C,k),T=!0,j||(B=Ze(k,"click",t[0]),j=!0)},p:tt,i:function(N){T||(W(e.$$.fragment,N),T=!0)},o:function(N){Q(e.$$.fragment,N),T=!1},d:function(N){N&&me(n),Fe(e),j=!1,B()}}}function rtt(t){return[xs("simple-modal").close,Qet?"\u2318":"Ctrl"]}var Xce=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,rtt,itt,In,{},ntt),r}return de(e)}();function Qce(t){return!!t&&("space"===t.type||!0===t.space)}function hk(t){return!!t&&("separator"===t.type||!0===t.separator)}function W_(t){return!!t&&"function"==typeof t.onClick}function iR(t){return!!t&&"dropdown-button"===t.type&&W_(t.main)&&Array.isArray(t.items)}function Zce(t){return Ar(t)&&Ar(t.parseError)}function stt(t){gn(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var att=function(t){return{}},eue=function(t){return{}};function tue(t,n,e){var i=t.slice();return i[3]=n[e],i}var ltt=function(t){return{}},nue=function(t){return{}};function ctt(t){var n,e=sue(t[3])+"";return{c:function(){n=ut(e)},m:function(i,r){ve(i,n,r)},p:function(i,r){1&r&&e!==(e=sue(i[3])+"")&&Jt(n,e)},i:tt,o:tt,d:function(i){i&&me(n)}}}function utt(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&iue(t),u=t[3].text&&rue(t);return{c:function(){n=oe("button"),c&&c.c(),e=Me(),u&&u.c(),I(n,"type","button"),I(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),I(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){ve(d,n,h),c&&c.m(n,null),ee(n,e),u&&u.m(n,null),s=!0,a||(l=Ze(n,"click",function(){bs(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&W(c,1)):((c=iue(t)).c(),W(c,1),c.m(n,e)):c&&(it(),Q(c,1,1,function(){c=null}),rt()),t[3].text?u?u.p(t,h):((u=rue(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&I(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&I(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(W(c),s=!0)},o:function(d){Q(c),s=!1},d:function(d){d&&me(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function dtt(t){var n;return{c:function(){I(n=oe("div"),"class","jse-space svelte-497ud4")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function htt(t){var n;return{c:function(){I(n=oe("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function iue(t){var n,e;return n=new li({props:{data:t[3].icon}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function rue(t){var n,e=t[3].text+"";return{c:function(){n=ut(e)},m:function(i,r){ve(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&Jt(n,e)},d:function(i){i&&me(n)}}}function oue(t){var n,e,i,r,o,s,a,l=[htt,dtt,utt,ctt],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!hk(d[3])),n?0:(null==e&&(e=!!Qce(d[3])),e?1:(null==i&&(i=!!W_(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=Ci()},m:function(d,h){c[r].m(d,h),ve(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):(it(),Q(c[f],1,1,function(){c[f]=null}),rt(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),W(o,1),o.m(s.parentNode,s))},i:function(d){a||(W(o),a=!0)},o:function(d){Q(o),a=!1},d:function(d){c[r].d(d),d&&me(s)}}}function ftt(t){for(var n,e,i,r,o=t[2].left,s=ko(o,t,t[1],nue),a=t[0],l=[],c=0;c0&&b.height>0}),u),c=u(e);function u(y){var b=y.getBoundingClientRect();return{x:b.left+b.width/2,y:b.top+b.height/2,rect:b,element:y}}function d(y,b){var k=y.x-b.x,T=(y.y-b.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(k*k+T*T)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(jv(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(jv(m.filter(function(y){return o(y.element)}),h)||jv(m,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){qn[a?"unshift":"push"](function(){e(2,i=a)})}]}var Cue=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ent,Ztt,In,{items:0,tip:1},Ltt),r}return de(e)}();function tnt(t){var n,e;return n=new Cue({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function nnt(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j=n.json,B=n.documentState,N=n.parser,$=n.showTip,V=n.onCloseContextMenu,z=n.onEditKey,Y=n.onEditValue,O=n.onToggleEnforceString,H=n.onCut,G=n.onCopy,F=n.onPaste,Z=n.onRemove,D=n.onDuplicate,E=n.onExtract,M=n.onInsertBefore,U=n.onInsert,L=n.onConvert,X=n.onInsertAfter,ne=n.onSort,ge=n.onTransform;function ae(){V(),z()}function De(){V(),Y()}function be(){V(),O()}function Ie(){V(),H(!0)}function R(){V(),H(!1)}function J(){V(),G(!0)}function K(){V(),G(!1)}function pe(){V(),F()}function Te(){V(),Z()}function ye(){V(),D()}function Ue(){V(),E()}function Je(mt){V(),c?L(mt):U(mt)}function _t(){V(),ne()}function zt(){V(),ge()}function ct(){V(),M()}function Nn(){V(),X()}return t.$$set=function(mt){"json"in mt&&e(2,j=mt.json),"documentState"in mt&&e(3,B=mt.documentState),"parser"in mt&&e(4,N=mt.parser),"showTip"in mt&&e(0,$=mt.showTip),"onCloseContextMenu"in mt&&e(5,V=mt.onCloseContextMenu),"onEditKey"in mt&&e(6,z=mt.onEditKey),"onEditValue"in mt&&e(7,Y=mt.onEditValue),"onToggleEnforceString"in mt&&e(8,O=mt.onToggleEnforceString),"onCut"in mt&&e(9,H=mt.onCut),"onCopy"in mt&&e(10,G=mt.onCopy),"onPaste"in mt&&e(11,F=mt.onPaste),"onRemove"in mt&&e(12,Z=mt.onRemove),"onDuplicate"in mt&&e(13,D=mt.onDuplicate),"onExtract"in mt&&e(14,E=mt.onExtract),"onInsertBefore"in mt&&e(15,M=mt.onInsertBefore),"onInsert"in mt&&e(16,U=mt.onInsert),"onConvert"in mt&&e(17,L=mt.onConvert),"onInsertAfter"in mt&&e(18,X=mt.onInsertAfter),"onSort"in mt&&e(19,ne=mt.onSort),"onTransform"in mt&&e(20,ge=mt.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=B.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==j),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Yn(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Dt(j,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":Ar(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Pi(i)||vo(i)||Zn(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Pi(i)||Zn(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&$_(i)&&!s&&!Array.isArray(Dt(j,Qn(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&$_(i)),136&t.$$.dirty[1]&&e(32,p=f&&!$r(a)),4194304&t.$$.dirty[0]&&e(25,g=c),33554432&t.$$.dirty[0]&&e(24,m=g?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!g&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=g?hg(i)&&!Ar(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,b=g?hg(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=g?hg(i)&&$r(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,k=null!=i&&dh(a,B.enforceStringMap,gt(i.focusPath),N)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,T=[{type:"row",items:[{type:"button",onClick:ae,icon:Kv,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:De,icon:Kv,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:Kv,text:l,title:"Edit the value (Double-click on the value)",onClick:De,disabled:!f},{type:"button",icon:k?P_:R_,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:be,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:Ie,icon:Jv,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:Jv,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:Ie,disabled:!c},{type:"button",icon:Jv,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:R,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:J,icon:xf,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:xf,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:J,disabled:!c},{type:"button",icon:xf,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:K,disabled:!c}]},{type:"button",onClick:pe,icon:Hle,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:ye,icon:Jle,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:Ue,icon:EZe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:_t,icon:nk,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:zt,icon:ZS,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Te,icon:VP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:m},{type:"button",onClick:function(){return Je("structure")},icon:g?tk:Xv,text:"Structure",title:m+" structure",disabled:!v},{type:"button",onClick:function(){return Je("object")},icon:g?tk:Xv,text:"Object",title:m+" structure",disabled:!y},{type:"button",onClick:function(){return Je("array")},icon:g?tk:Xv,text:"Array",title:m+" array",disabled:!b},{type:"button",onClick:function(){return Je("value")},icon:g?tk:Xv,text:"Value",title:m+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:ct,icon:DZe,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Nn,icon:SZe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[$,T,j,B,N,V,z,Y,O,H,G,F,Z,D,E,M,U,L,X,ne,ge,s,c,C,m,g,b,y,v,d,u,o,p,k,f,l,h,i,a,r]}var int=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,nnt,tnt,In,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return de(e)}();function rnt(t){gn(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function Sue(t,n,e){var i=t.slice();return i[13]=n[e],i}function kue(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=oe("button"),e=ut("show "),i=ut(c),r=ut("-"),o=ut(u),s=Me(),I(n,"type","button"),I(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){ve(h,n,f),ee(n,e),ee(n,i),ee(n,r),ee(n,o),ee(n,s),a||(l=Ze(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&Jt(i,c),16&f&&u!==(u=t[13].end+"")&&Jt(o,u)},d:function(h){h&&me(n),a=!1,l()}}}function ont(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&b.end<=T.start)&&j.push(b),T.start>=(B?b.end:v.end)&&j.push(T),a=j))},[d,p,o,r,a,s,l,c,u,h,f,i,function(g){return p(d,g)}]}var lnt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ant,ont,In,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},rnt),r}return de(e)}();function cnt(t){gn(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function unt(t){var n,e,i,r,o;return e=new li({props:{data:lc}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-context-menu-pointer svelte-1yzl4st"),I(n,"title",pN),Xe(n,"jse-selected",t[0])},m:function(s,a){ve(s,n,a),Le(e,n,null),i=!0,r||(o=Ze(n,"click",t[1]),r=!0)},p:function(s,a){var l=Wt(a,1)[0];(!i||1&l)&&Xe(n,"jse-selected",s[0])},i:function(s){i||(W(e.$$.fragment,s),i=!0)},o:function(s){Q(e.$$.fragment,s),i=!1},d:function(s){s&&me(n),Fe(e),r=!1,o()}}}function dnt(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var kf=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,dnt,unt,In,{selected:0,onContextMenu:2},cnt),r}return de(e)}();function hnt(t){gn(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function fnt(t){var n,e,i,r,o,s,a,l=[mnt,gnt],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=oe("div"),i.c(),I(n,"data-type","selectable-key"),I(n,"class",r=Tr(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){ve(d,n,h),c[e].m(n,null),o=!0,s||(a=Ze(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):(it(),Q(c[f],1,1,function(){c[f]=null}),rt(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),W(i,1),i.m(n,null)),(!o||1&h&&r!==(r=Tr(d[6](d[0]))+" svelte-24a1b2"))&&I(n,"class",r)},i:function(d){o||(W(i),o=!0)},o:function(d){Q(i),o=!1},d:function(d){d&&me(n),c[e].d(),s=!1,a()}}}function pnt(t){var n,e;return n=new Ale({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function gnt(t){var n,e=ug(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=ut(e)},m:function(i,r){ve(i,n,r)},p:function(i,r){5&r&&e!==(e=ug(i[2].normalization.escapeValue(i[0]))+"")&&Jt(n,e)},i:tt,o:tt,d:function(i){i&&me(n)}}}function mnt(t){var n,e;return n=new Vle({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Due(t){var n,e;return n=new kf({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function vnt(t){var n,e,i,r,o,s=[pnt,fnt],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&Due(t);return{c:function(){e.c(),i=Me(),c&&c.c(),r=Ci()},m:function(u,d){a[n].m(u,d),ve(u,i,d),c&&c.m(u,d),ve(u,r,d),o=!0},p:function(u,d){var h=Wt(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):(it(),Q(a[f],1,1,function(){a[f]=null}),rt(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),W(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&(it(),Q(c,1,1,function(){c=null}),rt()):c?(c.p(u,h),28&h&&W(c,1)):((c=Due(u)).c(),W(c,1),c.m(r.parentNode,r))},i:function(u){o||(W(e),W(c),o=!0)},o:function(u){Q(e),Q(c),o=!1},d:function(u){a[n].d(u),u&&me(i),c&&c.d(u),u&&me(r)}}}function ynt(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&vo(l):void 0),2056&t.$$.dirty&&e(4,r=i&&_f(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(ac(o,!0)))},function(h){return sd("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),g=Qn(o).concat(p);d.onSelect(f===mN?mi(g,!1):ac(g,!1)),f!==gN&&d.focus()},function(){d.onSelect(ac(o,!1)),d.focus()},o,s,l,u]}var _nt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,ynt,vnt,In,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},hnt),r}return de(e)}();function Aue(t,n,e){var i=t.slice();return i[8]=n[e],i}function Eue(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+m()/2;)y+=m(),v-=1;return v!==g&&void 0!==d[v]?{beforePath:d[v].path,offset:v-g}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,g=u.deltaY,m=KS(u.selection),v=f.findIndex(function($){return ai($.path,m)}),y=0,b=v,C=function(){var $;return null===($=f[b+1])||void 0===$?void 0:$.height};void 0!==C()&&Math.abs(g)>y+C()/2;)y+=C(),b+=1;var T=Dt(h,Qn(m)),j=Array.isArray(T),B=null===(d=f[j?b:b+1])||void 0===d?void 0:d.path,N=b-v;return B?{beforePath:B,offset:N}:{append:!0,offset:N}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,g,m,v,y,b,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,g=Qn(d.focusPath),m=Dt(u,g);if(!(p||f&&Wv(f,g)&&f.length>g.length))return[];var v=Uv(d),y=KS(d),b=Rt(v),C=Rt(y),k=f?f[g.length]:void 0;if(!Dr(m)){if(er(m)){var T=Ho(b),j=Ho(C),B=void 0!==k?Ho(k):m.length;return uP(j-T+1,B$?[].concat(sn(N.slice($,V+1)),sn(N.slice(z,N.length))).map(function(Y){return fg(g,Y)}):[].concat(sn(N.slice(z,$)),sn(N.slice(V+1,N.length))).map(function(Y){return fg(g,Y)}):[]}(n,o,s),l=Dt(n,Qn(Uv(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,m=u.offset,v=Uv(g=u.selection),y=KS(g),b=f.findIndex(function(j){return ai(j.path,v)}),C=f.findIndex(function(j){return ai(j.path,y)}),Eo(p,null===(d=f[b+m])||void 0===d?void 0:d.path,null===(h=f[C+m])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function cd(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return vv(e,n)})}function Snt(t){gn(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function knt(t){var n,e,i,r,o,s;return e=new li({props:{data:pg}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){ve(a,n,l),Le(e,n,null),r=!0,o||(s=[Ze(n,"click",function(){bs(t[0])&&t[0].apply(this,arguments)}),ws(i=BP.call(null,n,Ee({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=Wt(l,1)[0];t=a,i&&bs(i.update)&&2&c&&i.update.call(null,Ee({text:t[1]},t[2]))},i:function(a){r||(W(e.$$.fragment,a),r=!0)},o:function(a){Q(e.$$.fragment,a),r=!1},d:function(a){a&&me(n),Fe(e),o=!1,rr(s)}}}function Tnt(t,n,e){var i,r=xs("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var o0=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Tnt,knt,po,{validationError:3,onExpand:0},Snt),r}return de(e)}();function Dnt(t){gn(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var Ant=function(t){return{}},Mue=function(t){return{}};function Oue(t,n,e){var i=t.slice();return i[53]=n[e],i}var Ent=function(t){return{}},Iue=function(t){return{}};function Nue(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function jue(t,n,e){var i=t.slice();return i[50]=n[e],i}var Mnt=function(t){return{}},Pue=function(t){return{}};function Ont(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Zn(t[7])||Pi(t[7]))&&!t[7].edit&&ai(t[7].focusPath,t[1]),d=t[34].identifier,h=ko(d,t,t[35],Mue),f=!t[17]&&Rue();o=new Cnt({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:Fle(t[6],t[9]),context:t[8]}});var p=u&&Lue(t),g=t[15]&&Fue(t),m=!t[17]&&$ue(t);return{c:function(){n=oe("div"),e=oe("div"),h&&h.c(),i=Me(),f&&f.c(),r=Me(),$e(o.$$.fragment),s=Me(),p&&p.c(),a=Me(),g&&g.c(),l=Me(),m&&m.c(),I(e,"class","jse-contents svelte-1wlxti1"),I(n,"class","jse-contents-outer svelte-1wlxti1"),I(n,"style",t[18])},m:function(v,y){ve(v,n,y),ee(n,e),h&&h.m(e,null),ee(e,i),f&&f.m(e,null),ee(e,r),Le(o,e,null),ee(e,s),p&&p.m(e,null),ee(n,a),g&&g.m(n,null),ee(n,l),m&&m.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Do(h,d,v,v[35],c?To(d,v[35],y,Ant):Ao(v[35]),Mue),v[17]?f&&(f.d(1),f=null):f||((f=Rue()).c(),f.m(e,r));var b={};2&y[0]&&(b.path=v[1]),1&y[0]&&(b.value=v[0]),8192&y[0]&&(b.enforceString=v[13]),65664&y[0]&&(b.selection=v[16]?v[7]:void 0),576&y[0]&&(b.searchResultItems=Fle(v[6],v[9])),256&y[0]&&(b.context=v[8]),o.$set(b),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Zn(v[7])||Pi(v[7]))&&!v[7].edit&&ai(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&W(p,1)):((p=Lue(v)).c(),W(p,1),p.m(e,null)):p&&(it(),Q(p,1,1,function(){p=null}),rt()),v[15]?g?(g.p(v,y),32768&y[0]&&W(g,1)):((g=Fue(v)).c(),W(g,1),g.m(n,l)):g&&(it(),Q(g,1,1,function(){g=null}),rt()),v[17]?m&&(m.d(1),m=null):m?m.p(v,y):((m=$ue(v)).c(),m.m(n,null)),(!c||262144&y[0])&&I(n,"style",v[18])},i:function(v){c||(W(h,v),W(o.$$.fragment,v),W(p),W(g),c=!0)},o:function(v){Q(h,v),Q(o.$$.fragment,v),Q(p),Q(g),c=!1},d:function(v){v&&me(n),h&&h.d(v),f&&f.d(),Fe(o),p&&p.d(),g&&g.d(),m&&m.d()}}}function Int(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Zn(t[7])||Pi(t[7]))&&!t[7].edit&&ai(t[7].focusPath,t[1]),C=[Pnt,jnt],k=[];function T(D,E){return D[12]?0:1}r=T(t),o=k[r]=C[r](t);var j=t[34].identifier,B=ko(j,t,t[35],Iue),N=!t[17]&&Bue();function $(D,E){return D[12]?Lnt:Rnt}var V=$(t),z=V(t),Y=b&&Vue(t),O=t[15]&&(!t[12]||!t[15].isChildError)&&Hue(t);function H(D,E){return D[12]?$nt:D[17]?void 0:Fnt}var G=H(t),F=G&&G(t),Z=t[12]&&Uue(t);return{c:function(){n=oe("div"),e=oe("div"),i=oe("button"),o.c(),s=Me(),B&&B.c(),a=Me(),N&&N.c(),l=Me(),c=oe("div"),u=oe("div"),z.c(),d=Me(),Y&&Y.c(),h=Me(),O&&O.c(),f=Me(),F&&F.c(),p=Me(),Z&&Z.c(),g=Ci(),I(i,"type","button"),I(i,"class","jse-expand svelte-1wlxti1"),I(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),I(u,"class","jse-meta-inner svelte-1wlxti1"),I(c,"class","jse-meta svelte-1wlxti1"),I(c,"data-type","selectable-value"),I(e,"class","jse-header svelte-1wlxti1"),I(n,"class","jse-header-outer svelte-1wlxti1"),I(n,"style",t[18])},m:function(D,E){ve(D,n,E),ee(n,e),ee(e,i),k[r].m(i,null),ee(e,s),B&&B.m(e,null),ee(e,a),N&&N.m(e,null),ee(e,l),ee(e,c),ee(c,u),z.m(u,null),ee(e,d),Y&&Y.m(e,null),ee(n,h),O&&O.m(n,null),ee(n,f),F&&F.m(n,null),ve(D,p,E),Z&&Z.m(D,E),ve(D,g,E),m=!0,v||(y=Ze(i,"click",t[21]),v=!0)},p:function(D,E){var M=r;(r=T(D))===M?k[r].p(D,E):(it(),Q(k[M],1,1,function(){k[M]=null}),rt(),(o=k[r])?o.p(D,E):(o=k[r]=C[r](D)).c(),W(o,1),o.m(i,null)),B&&B.p&&(!m||16&E[1])&&Do(B,j,D,D[35],m?To(j,D[35],E,Ent):Ao(D[35]),Iue),D[17]?N&&(N.d(1),N=null):N||((N=Bue()).c(),N.m(e,l)),V===(V=$(D))&&z?z.p(D,E):(z.d(1),(z=V(D))&&(z.c(),z.m(u,null))),65922&E[0]&&(b=!D[8].readOnly&&D[16]&&D[7]&&(Zn(D[7])||Pi(D[7]))&&!D[7].edit&&ai(D[7].focusPath,D[1])),b?Y?(Y.p(D,E),65922&E[0]&&W(Y,1)):((Y=Vue(D)).c(),W(Y,1),Y.m(e,null)):Y&&(it(),Q(Y,1,1,function(){Y=null}),rt()),!D[15]||D[12]&&D[15].isChildError?O&&(it(),Q(O,1,1,function(){O=null}),rt()):O?(O.p(D,E),36864&E[0]&&W(O,1)):((O=Hue(D)).c(),W(O,1),O.m(n,f)),G===(G=H(D))&&F?F.p(D,E):(F&&F.d(1),(F=G&&G(D))&&(F.c(),F.m(n,null))),(!m||262144&E[0])&&I(n,"style",D[18]),D[12]?Z?(Z.p(D,E),4096&E[0]&&W(Z,1)):((Z=Uue(D)).c(),W(Z,1),Z.m(g.parentNode,g)):Z&&(it(),Q(Z,1,1,function(){Z=null}),rt())},i:function(D){m||(W(o),W(B,D),W(Y),W(O),W(Z),m=!0)},o:function(D){Q(o),Q(B,D),Q(Y),Q(O),Q(Z),m=!1},d:function(D){D&&me(n),k[r].d(),B&&B.d(D),N&&N.d(),z.d(),Y&&Y.d(),O&&O.d(),F&&F.d(),D&&me(p),Z&&Z.d(D),D&&me(g),v=!1,y()}}}function Nnt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Zn(t[7])||Pi(t[7]))&&!t[7].edit&&ai(t[7].focusPath,t[1]),C=[Hnt,Vnt],k=[];function T(D,E){return D[12]?0:1}r=T(t),o=k[r]=C[r](t);var j=t[34].identifier,B=ko(j,t,t[35],Pue),N=!t[17]&&que();function $(D,E){return D[12]?znt:Unt}var V=$(t),z=V(t),Y=b&&Yue(t),O=t[15]&&(!t[12]||!t[15].isChildError)&&Jue(t);function H(D,E){return D[12]?Wnt:Gnt}var G=H(t),F=G(t),Z=t[12]&&Kue(t);return{c:function(){n=oe("div"),e=oe("div"),i=oe("button"),o.c(),s=Me(),B&&B.c(),a=Me(),N&&N.c(),l=Me(),c=oe("div"),u=oe("div"),z.c(),d=Me(),Y&&Y.c(),h=Me(),O&&O.c(),f=Me(),F.c(),p=Me(),Z&&Z.c(),g=Ci(),I(i,"type","button"),I(i,"class","jse-expand svelte-1wlxti1"),I(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),I(u,"class","jse-meta-inner svelte-1wlxti1"),I(u,"data-type","selectable-value"),I(c,"class","jse-meta svelte-1wlxti1"),I(e,"class","jse-header svelte-1wlxti1"),I(n,"class","jse-header-outer svelte-1wlxti1"),I(n,"style",t[18])},m:function(D,E){ve(D,n,E),ee(n,e),ee(e,i),k[r].m(i,null),ee(e,s),B&&B.m(e,null),ee(e,a),N&&N.m(e,null),ee(e,l),ee(e,c),ee(c,u),z.m(u,null),ee(e,d),Y&&Y.m(e,null),ee(n,h),O&&O.m(n,null),ee(n,f),F.m(n,null),ve(D,p,E),Z&&Z.m(D,E),ve(D,g,E),m=!0,v||(y=Ze(i,"click",t[21]),v=!0)},p:function(D,E){var M=r;(r=T(D))===M?k[r].p(D,E):(it(),Q(k[M],1,1,function(){k[M]=null}),rt(),(o=k[r])?o.p(D,E):(o=k[r]=C[r](D)).c(),W(o,1),o.m(i,null)),B&&B.p&&(!m||16&E[1])&&Do(B,j,D,D[35],m?To(j,D[35],E,Mnt):Ao(D[35]),Pue),D[17]?N&&(N.d(1),N=null):N||((N=que()).c(),N.m(e,l)),V===(V=$(D))&&z?z.p(D,E):(z.d(1),(z=V(D))&&(z.c(),z.m(u,null))),65922&E[0]&&(b=!D[8].readOnly&&D[16]&&D[7]&&(Zn(D[7])||Pi(D[7]))&&!D[7].edit&&ai(D[7].focusPath,D[1])),b?Y?(Y.p(D,E),65922&E[0]&&W(Y,1)):((Y=Yue(D)).c(),W(Y,1),Y.m(e,null)):Y&&(it(),Q(Y,1,1,function(){Y=null}),rt()),!D[15]||D[12]&&D[15].isChildError?O&&(it(),Q(O,1,1,function(){O=null}),rt()):O?(O.p(D,E),36864&E[0]&&W(O,1)):((O=Jue(D)).c(),W(O,1),O.m(n,f)),G===(G=H(D))&&F?F.p(D,E):(F.d(1),(F=G(D))&&(F.c(),F.m(n,null))),(!m||262144&E[0])&&I(n,"style",D[18]),D[12]?Z?(Z.p(D,E),4096&E[0]&&W(Z,1)):((Z=Kue(D)).c(),W(Z,1),Z.m(g.parentNode,g)):Z&&(it(),Q(Z,1,1,function(){Z=null}),rt())},i:function(D){m||(W(o),W(B,D),W(Y),W(O),W(Z),m=!0)},o:function(D){Q(o),Q(B,D),Q(Y),Q(O),Q(Z),m=!1},d:function(D){D&&me(n),k[r].d(),B&&B.d(D),N&&N.d(),z.d(),Y&&Y.d(),O&&O.d(),F.d(),D&&me(p),Z&&Z.d(D),D&&me(g),v=!1,y()}}}function Rue(t){var n;return{c:function(){(n=oe("div")).textContent=":",I(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){ve(e,n,i)},d:function(e){e&&me(n)}}}function Lue(t){var n,e,i;return e=new kf({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=oe("div"),$e(e.$$.fragment),I(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){ve(r,n,o),Le(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(W(e.$$.fragment,r),i=!0)},o:function(r){Q(e.$$.fragment,r),i=!1},d:function(r){r&&me(n),Fe(e)}}}function Fue(t){var n,e;return n=new o0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function $ue(t){var n,e,i;return{c:function(){I(n=oe("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),I(n,"data-type","insert-selection-area-after")},m:function(r,o){ve(r,n,o),e||(i=Ze(n,"click",t[30]),e=!0)},p:tt,d:function(r){r&&me(n),e=!1,i()}}}function jnt(t){var n,e;return n=new li({props:{data:bf}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Pnt(t){var n,e;return n=new li({props:{data:lc}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Bue(t){var n;return{c:function(){(n=oe("div")).textContent=":",I(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){ve(e,n,i)},d:function(e){e&&me(n)}}}function Rnt(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=oe("div")).textContent="{",e=Me(),i=oe("button"),r=ut(d),o=Me(),s=ut(h),a=Me(),(l=oe("div")).textContent="}",I(n,"class","jse-bracket svelte-1wlxti1"),I(i,"type","button"),I(i,"class","jse-tag svelte-1wlxti1"),I(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){ve(f,n,p),ve(f,e,p),ve(f,i,p),ee(i,r),ee(i,o),ee(i,s),ve(f,a,p),ve(f,l,p),c||(u=Ze(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&Jt(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&Jt(s,h)},d:function(f){f&&me(n),f&&me(e),f&&me(i),f&&me(a),f&&me(l),c=!1,u()}}}function Lnt(t){var n;return{c:function(){(n=oe("div")).textContent="{",I(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){ve(e,n,i)},p:tt,d:function(e){e&&me(n)}}}function Vue(t){var n,e,i;return e=new kf({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=oe("div"),$e(e.$$.fragment),I(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){ve(r,n,o),Le(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(W(e.$$.fragment,r),i=!0)},o:function(r){Q(e.$$.fragment,r),i=!1},d:function(r){r&&me(n),Fe(e)}}}function Hue(t){var n,e;return n=new o0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Fnt(t){var n,e,i;return{c:function(){I(n=oe("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),I(n,"data-type","insert-selection-area-after")},m:function(r,o){ve(r,n,o),e||(i=Ze(n,"click",t[30]),e=!0)},p:tt,d:function(r){r&&me(n),e=!1,i()}}}function $nt(t){var n,e,i;return{c:function(){I(n=oe("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),I(n,"data-type","insert-selection-area-inside")},m:function(r,o){ve(r,n,o),e||(i=Ze(n,"click",t[29]),e=!0)},p:tt,d:function(r){r&&me(n),e=!1,i()}}}function Uue(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&zo(t[7])),c=l&&zue(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=Me(),p&&p.c(),I(n,"class","jse-props svelte-1wlxti1"),I(o,"data-type","selectable-value"),I(o,"class","jse-footer svelte-1wlxti1"),I(r,"class","jse-footer-outer svelte-1wlxti1"),I(r,"style",t[18])},m:function(g,m){ve(g,n,m),c&&c.m(n,null),ee(n,e);for(var v=0;v]',s=Me(),v&&v.c(),I(n,"class","jse-items svelte-1wlxti1"),I(o,"data-type","selectable-value"),I(o,"class","jse-footer svelte-1wlxti1"),I(r,"class","jse-footer-outer svelte-1wlxti1"),I(r,"style",t[18])},m:function(y,b){ve(y,n,b),d&&d.m(n,null),ee(n,e);for(var C=0;C=ye.start&&J<=ye.end});if(!K)return null;Aae(K.start,Math.min(p.length,K.end),function(ye){return De(String(ye))})}else Object.keys(p).forEach(De);return ae}(k,l||Kp);if(B("dragSelectionStart",{selection:k,items:M}),M){var U=Uv(k),L=M.findIndex(function(ne){return ai(ne.path,U)}),X=sR({json:T.getJson(),documentState:T.getDocumentState(),deltaY:0,items:M}).offset;e(11,V={initialTarget:D.target,initialClientY:D.clientY,initialContentTop:H(),selectionStartIndex:L,selectionItemsCount:kle(k).length,items:M,offset:X,didMoveItems:!1}),ls.dragging=!0,document.addEventListener("mousemove",F,!0),document.addEventListener("mouseup",Z)}else B("Cannot drag the current selection (probably spread over multiple sections)")}else j(D)}},function(D){ls.selecting||ls.dragging||(D.stopPropagation(),dg(D.target,"data-type","selectable-value")?e(10,N="hover-collection"):dg(D.target,"data-type","insert-selection-area-inside")?e(10,N="hover-insert-inside"):dg(D.target,"data-type","insert-selection-area-after")&&e(10,N="hover-insert-after"),clearTimeout($))},function(D){D.stopPropagation(),$=setTimeout(function(){return e(10,N=void 0)})},function(D){D.shiftKey||(D.stopPropagation(),D.preventDefault(),T.onSelect(hh(g)))},function(D){D.shiftKey||(D.stopPropagation(),D.preventDefault(),T.onSelect(fh(g)))},function(D){T.onSelect(hh(g)),T.onContextMenu(D)},function(D){T.onSelect(fh(g)),T.onContextMenu(D)},j,h,f]}var aR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Jnt,Ynt,In,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},Dnt,[-1,-1]),r}return de(e)}(),Knt=aR,Xnt={prefix:"fas",iconName:"jsoneditor-expand",icon:[512,512,[],"","M 0,448 V 512 h 512 v -64 z M 0,0 V 64 H 512 V 0 Z M 256,96 128,224 h 256 z M 256,416 384,288 H 128 Z"]},Qnt={prefix:"fas",iconName:"jsoneditor-collapse",icon:[512,512,[],"","m 0,224 v 64 h 512 v -64 z M 256,192 384,64 H 128 Z M 256,320 128,448 h 256 z"]},lR={prefix:"fas",iconName:"jsoneditor-format",icon:[512,512,[],"","M 0,32 v 64 h 416 v -64 z M 160,160 v 64 h 352 v -64 z M 160,288 v 64 h 288 v -64 z M 0,416 v 64 h 320 v -64 z"]},Znt={prefix:"fas",iconName:"jsoneditor-compact",icon:[512,512,[],"","M 0,32 v 64 h 512 v -64 z M 0,160 v 64 h 512 v -64 z M 0,288 v 64 h 352 v -64 z"]};function eit(t){var n,e;return n=new fk({props:{items:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&Wt(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function tit(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,g=n.historyState,m=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,b=n.onRedo,C=n.onSort,k=n.onTransform,T=n.onContextMenu,j=n.onCopy,B=n.onRenderMenu;function N(){e(1,p=!p)}return t.$$set=function($){"json"in $&&e(2,u=$.json),"selection"in $&&e(3,d=$.selection),"readOnly"in $&&e(4,h=$.readOnly),"showSearch"in $&&e(1,p=$.showSearch),"historyState"in $&&e(5,g=$.historyState),"onExpandAll"in $&&e(6,m=$.onExpandAll),"onCollapseAll"in $&&e(7,v=$.onCollapseAll),"onUndo"in $&&e(8,y=$.onUndo),"onRedo"in $&&e(9,b=$.onRedo),"onSort"in $&&e(10,C=$.onSort),"onTransform"in $&&e(11,k=$.onTransform),"onContextMenu"in $&&e(12,T=$.onContextMenu),"onCopy"in $&&e(13,j=$.onCopy),"onRenderMenu"in $&&e(14,B=$.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Pi(d)||vo(d)||Zn(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:Xnt,title:"Expand all",className:"jse-expand-all",onClick:m,disabled:!$r(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:Qnt,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!$r(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:zP,title:"Search (Ctrl+F)",className:"jse-search",onClick:N,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:xf,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:j,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:nk,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:ZS,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:k,disabled:h||void 0===u},l,{type:"button",icon:Wle,title:pN,className:"jse-contextmenu",onClick:T},{type:"separator"},{type:"button",icon:UP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!g.canUndo},{type:"button",icon:HP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:b,disabled:!g.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=B(c)||c)},[o,p,u,d,h,g,m,v,y,b,C,k,T,j,B,s,a,l,c,r,i]}var nit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,tit,eit,In,{json:2,selection:3,readOnly:4,showSearch:1,historyState:5,onExpandAll:6,onCollapseAll:7,onUndo:8,onRedo:9,onSort:10,onTransform:11,onContextMenu:12,onCopy:13,onRenderMenu:14}),r}return de(e)}();function iit(t){gn(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function ide(t){var n;return{c:function(){(n=oe("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',I(n,"class","svelte-1q2qkk2")},m:function(e,i){ve(e,n,i)},d:function(e){e&&me(n)}}}function rit(t){var n,e,i,r,o,s,a,l=!t[0]&&ide();return{c:function(){n=oe("div"),e=oe("div"),i=Me(),r=oe("div"),o=ut("Empty document\n "),l&&l.c(),s=Me(),a=oe("div"),I(e,"class","jse-space jse-before svelte-1q2qkk2"),I(r,"class","jse-contents svelte-1q2qkk2"),I(a,"class","jse-space jse-after svelte-1q2qkk2"),I(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){ve(c,n,u),ee(n,e),ee(n,i),ee(n,r),ee(r,o),l&&l.m(r,null),ee(n,s),ee(n,a)},p:function(c,u){Wt(u,1),c[0]?l&&(l.d(1),l=null):l||((l=ide()).c(),l.m(r,null))},i:tt,o:tt,d:function(c){c&&me(n),l&&l.d()}}}function oit(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var sit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,oit,rit,In,{readOnly:0},iit),r}return de(e)}(),cR={},ait={get exports(){return cR},set exports(t){cR=t}},rde=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(er(Dt(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function cit(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function uit(t,n){return function(e,i){var r=Dt(e,t),o=Dt(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Dt(t,n);return[{op:"replace",path:gt(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(Ar(t))return function lit(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Dt(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*uR(u,d)});for(var s=[],a=0;aY_&&lde();return{c:function(){n=oe("div");for(var d=0;dY_?u?u.p(d,f):((u=lde()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:tt,o:tt,d:function(d){d&&me(n);for(var h=0;h0&&(a("scrollTo ",m),o.scrollTo({left:m,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(m){a("get items for path",m);var v=Dt(l,m);if(Array.isArray(v))return sP(0,v.length).map(String);if(Ar(v)){var y=Object.keys(v).slice(0);return y.sort(uR),y}return[]},function(m){return Ql(l,m)},p,function(){e(6,f=!f)},g,function(m){g(),p(m)},c,u,function(m){qn[m?"unshift":"push"](function(){e(5,s=m)})},function(m){qn[m?"unshift":"push"](function(){e(4,o=m)})}]}var Dit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Tit,kit,In,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},xit),r}return de(e)}();function Ait(t){gn(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function vde(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",O=!t[4]&&yde(t),H=[Mit,Eit],G=[];function F(D,E){return D[2]?0:1}a=F(t),l=G[a]=H[a](t),y=new li({props:{data:NZe}}),k=new li({props:{data:TZe}}),B=new li({props:{data:Qv}});var Z=t[0]&&!t[4]&&_de(t);return{c:function(){n=oe("div"),e=oe("form"),O&&O.c(),i=Me(),r=oe("div"),o=oe("div"),s=oe("div"),l.c(),c=Me(),u=oe("label"),d=oe("input"),h=Me(),f=oe("div"),p=ut(Y),g=ut(t[10]),m=Me(),v=oe("button"),$e(y.$$.fragment),b=Me(),C=oe("button"),$e(k.$$.fragment),T=Me(),j=oe("button"),$e(B.$$.fragment),N=Me(),Z&&Z.c(),I(s,"class","jse-search-icon svelte-3lbrbf"),I(d,"class","jse-search-input svelte-3lbrbf"),I(d,"title","Enter text to search"),I(d,"type","text"),I(d,"placeholder","Find"),I(u,"class","jse-search-input-label svelte-3lbrbf"),I(u,"about","jse-search input"),I(f,"class","jse-search-count svelte-3lbrbf"),Xe(f,"jse-visible",""!==t[8]),I(v,"type","button"),I(v,"class","jse-search-next svelte-3lbrbf"),I(v,"title","Go to next search result (Enter)"),I(C,"type","button"),I(C,"class","jse-search-previous svelte-3lbrbf"),I(C,"title","Go to previous search result (Shift+Enter)"),I(j,"type","button"),I(j,"class","jse-search-clear svelte-3lbrbf"),I(j,"title","Close search box (Esc)"),I(o,"class","jse-search-section svelte-3lbrbf"),I(r,"class","jse-search-contents svelte-3lbrbf"),I(e,"class","jse-search-form svelte-3lbrbf"),I(n,"class","jse-search-box svelte-3lbrbf")},m:function(D,E){ve(D,n,E),ee(n,e),O&&O.m(e,null),ee(e,i),ee(e,r),ee(r,o),ee(o,s),G[a].m(s,null),ee(o,c),ee(o,u),ee(u,d),nf(d,t[8]),ee(o,h),ee(o,f),ee(f,p),ee(f,g),ee(o,m),ee(o,v),Le(y,v,null),ee(o,b),ee(o,C),Le(k,C,null),ee(o,T),ee(o,j),Le(B,j,null),ee(r,N),Z&&Z.m(r,null),$=!0,V||(z=[Ze(d,"input",t[21]),ws(Iit.call(null,d)),Ze(v,"click",t[22]),Ze(C,"click",t[23]),Ze(j,"click",t[24]),Ze(e,"submit",t[12]),Ze(e,"keydown",t[13])],V=!0)},p:function(D,E){D[4]?O&&(it(),Q(O,1,1,function(){O=null}),rt()):O?(O.p(D,E),16&E&&W(O,1)):((O=yde(D)).c(),W(O,1),O.m(e,i));var M=a;(a=F(D))===M?G[a].p(D,E):(it(),Q(G[M],1,1,function(){G[M]=null}),rt(),(l=G[a])?l.p(D,E):(l=G[a]=H[a](D)).c(),W(l,1),l.m(s,null)),256&E&&d.value!==D[8]&&nf(d,D[8]),(!$||8&E)&&Y!==(Y=(-1!==D[3]?"".concat(D[3]+1,"/"):"")+"")&&Jt(p,Y),(!$||1024&E)&&Jt(g,D[10]),(!$||256&E)&&Xe(f,"jse-visible",""!==D[8]),D[0]&&!D[4]?Z?Z.p(D,E):((Z=_de(D)).c(),Z.m(r,null)):Z&&(Z.d(1),Z=null)},i:function(D){$||(W(O),W(l),W(y.$$.fragment,D),W(k.$$.fragment,D),W(B.$$.fragment,D),$=!0)},o:function(D){Q(O),Q(l),Q(y.$$.fragment,D),Q(k.$$.fragment,D),Q(B.$$.fragment,D),$=!1},d:function(D){D&&me(n),O&&O.d(),G[a].d(),Fe(y),Fe(k),Fe(B),Z&&Z.d(),V=!1,rr(z)}}}function yde(t){var n,e,i,r,o;return e=new li({props:{data:t[0]?lc:bf}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-replace-toggle svelte-3lbrbf"),I(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){ve(s,n,a),Le(e,n,null),i=!0,r||(o=Ze(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?lc:bf),e.$set(l)},i:function(s){i||(W(e.$$.fragment,s),i=!0)},o:function(s){Q(e.$$.fragment,s),i=!1},d:function(s){s&&me(n),Fe(e),r=!1,o()}}}function Eit(t){var n,e;return n=new li({props:{data:zP}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Mit(t){var n,e;return n=new li({props:{data:CZe,spin:!0}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:tt,i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function _de(t){var n,e,i,r,o,s,a,l;return{c:function(){n=oe("div"),e=oe("input"),i=Me(),(r=oe("button")).textContent="Replace",o=Me(),(s=oe("button")).textContent="All",I(e,"class","jse-replace-input svelte-3lbrbf"),I(e,"title","Enter replacement text"),I(e,"type","text"),I(e,"placeholder","Replace"),I(r,"type","button"),I(r,"title","Replace current occurrence (Ctrl+Enter)"),I(r,"class","svelte-3lbrbf"),I(s,"type","button"),I(s,"title","Replace all occurrences"),I(s,"class","svelte-3lbrbf"),I(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){ve(c,n,u),ee(n,e),nf(e,t[9]),ee(n,i),ee(n,r),ee(n,o),ee(n,s),a||(l=[Ze(e,"input",t[25]),Ze(r,"click",t[14]),Ze(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&nf(e,c[9])},d:function(c){c&&me(n),a=!1,rr(l)}}}function Oit(t){var n,e,i=t[1]&&vde(t);return{c:function(){i&&i.c(),n=Ci()},m:function(r,o){i&&i.m(r,o),ve(r,n,o),e=!0},p:function(r,o){var s=Wt(o,1)[0];r[1]?i?(i.p(r,s),2&s&&W(i,1)):((i=vde(r)).c(),W(i,1),i.m(n.parentNode,n)):i&&(it(),Q(i,1,1,function(){i=null}),rt())},i:function(r){e||(W(i),e=!0)},o:function(r){Q(i),e=!1},d:function(r){i&&i.d(r),r&&me(n)}}}function Iit(t){t.select()}function Nit(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,g=void 0!==p&&p,m=n.onChange,v=void 0===m?ur:m,y=n.onPrevious,b=void 0===y?ur:y,C=n.onNext,k=void 0===C?ur:C,T=n.onReplace,j=void 0===T?ur:T,B=n.onReplaceAll,N=void 0===B?ur:B,$=n.onClose,V=void 0===$?ur:$,z="",Y="",O="";function H(){e(0,f=!f&&!g)}function G(){g||j(z,O)}return t.$$set=function(F){"show"in F&&e(1,s=F.show),"searching"in F&&e(2,a=F.searching),"resultCount"in F&&e(16,c=F.resultCount),"activeIndex"in F&&e(3,d=F.activeIndex),"showReplace"in F&&e(0,f=F.showReplace),"readOnly"in F&&e(4,g=F.readOnly),"onChange"in F&&e(17,v=F.onChange),"onPrevious"in F&&e(5,b=F.onPrevious),"onNext"in F&&e(6,k=F.onNext),"onReplace"in F&&e(18,j=F.onReplace),"onReplaceAll"in F&&e(19,N=F.onReplaceAll),"onClose"in F&&e(7,V=F.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=Ov(v,300)),1048832&t.$$.dirty&&r(z),2&t.$$.dirty&&s&&""!==z&&v(z)},[f,s,a,d,g,b,k,V,z,O,i,H,function(F){F.preventDefault(),z!==Y?(Y=z,r.cancel(),v(z)):k()},function(F){F.stopPropagation();var Z=vf(F);"Enter"===Z&&(F.preventDefault(),k()),"Shift+Enter"===Z&&(F.preventDefault(),b()),"Ctrl+Enter"===Z&&(F.preventDefault(),f?G():k()),"Ctrl+H"===Z&&(F.preventDefault(),H()),"Escape"===Z&&(F.preventDefault(),V())},G,function(){g||N(z,O)},c,v,j,N,r,function(){e(8,z=this.value)},function(){return k()},function(){return b()},function(){return V()},function(){e(9,O=this.value)}]}var jit=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Nit,Oit,In,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},Ait),r}return de(e)}(),bde=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function Pit(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',I(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function Xit(t){var n,e,i,r,o,s,a,l,c,u=[Zit,Qit],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=oe("label"),e=oe("input"),i=Me(),o.c(),s=Ci(),I(e,"type","text"),e.readOnly="readonly",I(e,"tabindex","-1"),I(e,"class","jse-hidden-input svelte-qojdc1"),I(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){ve(f,n,p),ee(n,e),t[76](e),ve(f,i,p),d[r].m(f,p),ve(f,s,p),a=!0,l||(c=Ze(e,"paste",t[34]),l=!0)},p:function(f,p){var g=r;(r=h(f))===g?d[r].p(f,p):(it(),Q(d[g],1,1,function(){d[g]=null}),rt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),W(o,1),o.m(s.parentNode,s))},i:function(f){a||(W(o),a=!0)},o:function(f){Q(o),a=!1},d:function(f){f&&me(n),t[76](null),f&&me(i),d[r].d(f),f&&me(s),l=!1,c()}}}function Qit(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new jit({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new Knt({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:ur}});var g=t[18]&&Ode(t),m=t[23]&&Ide(t);return f=new tR({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=oe("div"),$e(s.$$.fragment),a=Me(),l=oe("div"),$e(c.$$.fragment),u=Me(),g&&g.c(),d=Me(),m&&m.c(),h=Me(),$e(f.$$.fragment),I(o,"class","jse-search-box-container svelte-qojdc1"),I(l,"class","jse-contents svelte-qojdc1"),I(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){ve(v,o,y),Le(s,o,null),ve(v,a,y),ve(v,l,y),Le(c,l,null),t[77](l),ve(v,u,y),g&&g.m(v,y),ve(v,d,y),m&&m.m(v,y),ve(v,h,y),Le(f,v,y),p=!0},p:function(v,y){var b,C,k,T,j={};524288&y[0]&&(j.show=v[19]),131072&y[0]&&(j.resultCount=(null===(b=v[17])||void 0===b||null===(C=b.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&(j.activeIndex=(null===(k=v[17])||void 0===k?void 0:k.activeIndex)||0),1048576&y[0]&&(j.showReplace=v[20]),2097152&y[0]&&(j.searching=v[21]),1&y[0]&&(j.readOnly=v[0]),s.$set(j);var B={};1024&y[0]&&(B.value=v[10]),65536&y[0]&&(B.expandedMap=v[16].expandedMap),65536&y[0]&&(B.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(B.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(B.validationErrorsMap=v[24]),131072&y[0]&&(B.searchResultItemsMap=null===(T=v[17])||void 0===T?void 0:T.itemsMap),65536&y[0]&&(B.selection=v[16].selection),8192&y[0]&&(B.context=v[13]),c.$set(B),v[18]?g?(g.p(v,y),262144&y[0]&&W(g,1)):((g=Ode(v)).c(),W(g,1),g.m(d.parentNode,d)):g&&(it(),Q(g,1,1,function(){g=null}),rt()),v[23]?m?(m.p(v,y),8388608&y[0]&&W(m,1)):((m=Ide(v)).c(),W(m,1),m.m(h.parentNode,h)):m&&(it(),Q(m,1,1,function(){m=null}),rt());var N={};4096&y[0]&&(N.validationErrors=v[12]),f.$set(N)},i:function(v){p||(W(s.$$.fragment,v),W(c.$$.fragment,v),W(g),W(m),W(f.$$.fragment,v),p=!0)},o:function(v){Q(s.$$.fragment,v),Q(c.$$.fragment,v),Q(g),Q(m),Q(f.$$.fragment,v),p=!1},d:function(v){v&&me(o),Fe(s),v&&me(a),v&&me(l),Fe(c),t[77](null),v&&me(u),g&&g.d(v),v&&me(d),m&&m.d(v),v&&me(h),Fe(f,v)}}}function Zit(t){var n,e,i,r,o=[trt,ert],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=Ci()},m:function(l,c){s[n].m(l,c),ve(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):(it(),Q(s[u],1,1,function(){s[u]=null}),rt(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),W(e,1),e.m(i.parentNode,i))},i:function(l){r||(W(e),r=!0)},o:function(l){Q(e),r=!1},d:function(l){s[n].d(l),l&&me(i)}}}function Ode(t){var n,e;return n=new tu({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:ek,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Ide(t){var n,e;return n=new tu({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:H_,text:"Ok",onClick:t[8]},{icon:wf,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:H_,text:"Ok",onClick:i[8]},{icon:wf,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function ert(t){var n,e,i,r;return n=new tu({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:wf,text:"Repair manually",onClick:t[47]}]}}),i=new Ade({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){$e(n.$$.fragment),e=Me(),$e(i.$$.fragment)},m:function(o,s){Le(n,o,s),ve(o,e,s),Le(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:wf,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(W(n.$$.fragment,o),W(i.$$.fragment,o),r=!0)},o:function(o){Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!1},d:function(o){Fe(n,o),o&&me(e),Fe(i,o)}}}function trt(t){var n,e;return n=new sit({props:{readOnly:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function nrt(t){var n,e,i,r,o,s,a,l,c=t[1]&&Ede(t),u=t[2]&&Mde(t),h=[];return o=h[r=t[25]?1:0]=[Xit,Kit][r](t),{c:function(){n=oe("div"),c&&c.c(),e=Me(),u&&u.c(),i=Me(),o.c(),I(n,"class","jse-tree-mode svelte-qojdc1"),Xe(n,"no-main-menu",!t[1])},m:function(f,p){ve(f,n,p),c&&c.m(n,null),ee(n,e),u&&u.m(n,null),ee(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[Ze(Yit,"mousedown",t[49]),Ze(n,"keydown",t[41]),Ze(n,"mousedown",t[42]),Ze(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&W(c,1)):((c=Ede(f)).c(),W(c,1),c.m(n,e)):c&&(it(),Q(c,1,1,function(){c=null}),rt()),f[2]?u?(u.p(f,p),4&p[0]&&W(u,1)):((u=Mde(f)).c(),W(u,1),u.m(n,i)):u&&(it(),Q(u,1,1,function(){u=null}),rt()),o.p(f,p),(!s||2&p[0])&&Xe(n,"no-main-menu",!f[1])},i:function(f){s||(W(c),W(u),W(o),s=!0)},o:function(f){Q(c),Q(u),Q(o),s=!1},d:function(f){f&&me(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,rr(l)}}}function irt(t,n,e){var i,r=Cs("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=xs("simple-modal").open,h=mf(),f=mf(),p=xs("absolute-popup"),g=p.openAbsolutePopup,m=p.closeAbsolutePopup,v=!1,y=$ce(),b=n.readOnly,C=n.externalContent,k=n.mainMenuBar,T=n.navigationBar,j=n.escapeControlCharacters,B=n.escapeUnicodeCharacters,N=n.parser,$=n.parseMemoizeOne,V=n.validator,z=n.validationParser,Y=n.pathParser,O=n.indentation,H=n.onError,G=n.onChange,F=n.onChangeMode,Z=n.onRenderValue,D=n.onRenderMenu,E=n.onClassName,M=n.onFocus,U=n.onBlur,L=n.onSortModal,X=n.onTransformModal,ne=n.onJSONEditorModal,ge=!1;eR({onMount:Kl,onDestroy:Vc,getWindow:function(){return $v(l)},hasFocus:function(){return ge&&document.hasFocus()||WS(l)},onFocus:function(){v=!0,M&&M()},onBlur:function(){v=!1,U&&U()}});var ae=void 0;function De(ce){r("updateSelection",ce);var je="function"==typeof ce?ce(K.selection):ce;ai(je,K.selection)||e(16,K=Ee(Ee({},K),{},{selection:je}))}var be,Ie,R,J=!1,K=YS(),pe=!1,Te=!1,ye=!1,Ue="";function Je(ce){return _t.apply(this,arguments)}function _t(){return(_t=ni(bt().mark(function ce(je){return bt().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return r("search text updated",je),e(74,Ue=je),Qe.next=4,Ya();case 4:return Qe.next=6,pi();case 6:case"end":return Qe.stop()}},ce)}))).apply(this,arguments)}function zt(){return(zt=ni(bt().mark(function ce(){return bt().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return e(17,be=be?QQe(be):void 0),je.next=3,pi();case 3:case"end":return je.stop()}},ce)}))).apply(this,arguments)}function ct(){return(ct=ni(bt().mark(function ce(){return bt().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return e(17,be=be?ZQe(be):void 0),je.next=3,pi();case 3:case"end":return je.stop()}},ce)}))).apply(this,arguments)}function Nn(){return(Nn=ni(bt().mark(function ce(je,Qe){var at,dt,ft,ln;return bt().wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:if(dt=null===(at=be)||void 0===at?void 0:at.activeItem,r("handleReplace",{replacementText:Qe,activeItem:dt}),dt){fn.next=4;break}return fn.abrupt("return");case 4:return ft=eZe(c,K,Qe,dt,N),ln=ft.newSelection,Xt(ft.operations,function(jr,Io){return{state:Ee(Ee({},Io),{},{selection:ln})}}),fn.next=8,Ya();case 8:return fn.next=10,pi();case 10:case"end":return fn.stop()}},ce)}))).apply(this,arguments)}function mt(){return(mt=ni(bt().mark(function ce(je,Qe){var at,ft;return bt().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:return r("handleReplaceAll",{text:je,replacementText:Qe}),at=tZe(c,K,je,Qe,N),ft=at.newSelection,Xt(at.operations,function(ln,fn){return{state:Ee(Ee({},fn),{},{selection:ft})}}),Ht.next=5,Ya();case 5:return Ht.next=7,pi();case 7:case"end":return Ht.stop()}},ce)}))).apply(this,arguments)}function pi(){return ki.apply(this,arguments)}function ki(){return(ki=ni(bt().mark(function ce(){var je,Qe,at;return bt().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(Qe=null===(je=be)||void 0===je?void 0:je.activeItem,r("focusActiveSearchResult",be),!Qe){dt.next=9;break}return e(16,K=Ee(Ee({},EP(c,K,at=Qe.path)),{},{selection:void 0})),dt.next=7,Ya();case 7:return dt.next=9,vt(at);case 9:case"end":return dt.stop()}},ce)}))).apply(this,arguments)}var bn,Hi,ci=Bce({onChange:function(ce){e(22,yi=ce)}}),yi=ci.getState(),Ir=cP(function(ce,je){if(""===ce)return r("clearing search result"),void(void 0!==be&&e(17,be=void 0));e(21,ye=!0),setTimeout(function(){r("searching...",ce);var dt,ft,Ht,ln,fn,jr,Io,Qe=jle(ce,je,1e3);e(17,(dt=Qe,Ht=null!=(ft=be)&&ft.activeItem?Lle(ft.activeItem):void 0,ln=dt.findIndex(function(Yr){return ai(Ht,Lle(Yr))}),fn=-1!==ln?ln:void 0!==ft?.activeIndex&&ft?.activeIndex0?0:-1,Io=(jr=dt.map(function(Yr,yr){return Ee(Ee({},Yr),{},{active:yr===fn})}))[fn],be={items:jr,itemsMap:Nv(jr,function(Yr){return gt(Yr.path)}),activeItem:Io,activeIndex:fn})),e(21,ye=!1)})},300),Nt=!1,Ge=[],cn=J_(Vce);function Pn(ce,je,Qe,at){e0(function(){var dt;try{dt=cn(ce,je,Qe,at)}catch(ft){dt=[{path:[],message:"Failed to validate: "+ft.message,severity:qu.warning}]}ai(dt,Ge)||(r("validationErrors changed:",dt),e(12,Ge=dt))},function(dt){return r("validationErrors updated in ".concat(dt," ms"))})}function Ti(){return r("validate"),ae?{parseError:ae,isRepairable:!1}:(Pn(c,V,N,z),Yn(Ge)?null:{validationErrors:Ge})}function vr(){return c}function qr(){return K}function jt(ce){J||(J=!0,e(16,K=sc(ce,K,[],Rae({json:ce},10240)?od:F_)))}function an(ce){void 0!==K.selection&&(K.selection&&Ql(ce,K.selection.anchorPath)&&Ql(ce,K.selection.focusPath)||(r("clearing selection: path does not exist anymore",K.selection),e(16,K=Ee(Ee({},K),{},{selection:zv(ce,K)}))))}function wn(ce){var je=ce.previousJson,Qe=ce.previousState,at=ce.previousText,dt=ce.previousTextIsRepaired;void 0===je&&void 0===at||(void 0!==c?ci.add(void 0!==je?{undo:{patch:[{op:"replace",path:"",value:je}],state:sa(Qe),json:void 0,text:at,textIsRepaired:dt},redo:{patch:[{op:"replace",path:"",value:c}],state:sa(K),json:void 0,text:u,textIsRepaired:Nt}}:{undo:{patch:void 0,json:void 0,text:at,state:sa(Qe),textIsRepaired:dt},redo:{patch:void 0,json:c,state:sa(K),text:u,textIsRepaired:Nt}}):void 0!==je&&ci.add({undo:{patch:void 0,json:je,state:sa(Qe),text:at,textIsRepaired:dt},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:Nt,state:sa(K)}}))}function Mi(ce,je){if(r("patch",ce,je),void 0===c)throw new Error("Cannot apply patch: no JSON");var Qe={json:c,text:u},at=c,dt=K,ft=u,Ht=Nt,ln=Ile(c,ce),fn=hle(c,K,ce),jr=Gv(c,ce),Io=function(wd,yu){return void 0!==yu||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Ee(Ee({},wd),{},{selection:yu}):wd}(fn.documentState,jr,!1);r("patch updatedSelection",jr);var Yr="function"==typeof je?je(fn.json,Io):void 0;e(10,c=Yr&&void 0!==Yr.json?Yr.json:fn.json);var yr=Yr&&void 0!==Yr.state?Yr.state:Io;e(16,K=yr),e(11,u=void 0),e(23,Nt=!1),e(18,R=void 0),an(c),ci.add({undo:{patch:ln,json:void 0,text:ft,state:sa(dt),textIsRepaired:Ht},redo:{patch:ce,json:void 0,state:sa(yr),text:u,textIsRepaired:Nt}});var Oa={json:c,previousJson:at,undo:ln,redo:ce};return tn(Qe,Oa),Oa}function Ui(){!b&&K.selection&&De(ac(K.selection.focusPath,!0))}function nr(){if(!b&&K.selection){var ce=K.selection.focusPath,je=Dt(c,ce);$r(je)?(r("openJSONEditorModal",{path:Qe=ce,value:at=je}),ge=!0,ne({content:{json:at},path:Qe,onPatch:Hi.onPatch,onClose:function(){ge=!1,Oo()}})):De(mi(ce,!0))}var Qe,at}function Go(){if(!b&&Zn(K.selection)){var ce=K.selection.focusPath,je=gt(ce),Qe=Dt(c,ce),at=!dh(Qe,K.enforceStringMap,je,N),dt=at?String(Qe):yv(String(Qe),N);r("handleToggleEnforceString",{enforceString:at,value:Qe,updatedValue:dt}),Xt([{op:"replace",path:je,value:dt}],function(ft,Ht){return{state:dle(Ht,je,at)}})}}function _i(){return Wo.apply(this,arguments)}function Wo(){return Wo=ni(bt().mark(function ce(){var je,Qe=arguments;return bt().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return je=!(Qe.length>0&&void 0!==Qe[0])||Qe[0],at.next=3,Cde({json:c,documentState:K,indentation:je?O:void 0,readOnly:b,parser:N,onPatch:Xt});case 3:case"end":return at.stop()}},ce)})),Wo.apply(this,arguments)}function Ys(){return Js.apply(this,arguments)}function Js(){return Js=ni(bt().mark(function ce(){var je,Qe=arguments;return bt().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:if(je=!(Qe.length>0&&void 0!==Qe[0])||Qe[0],void 0!==c){at.next=3;break}return at.abrupt("return");case 3:return at.next=5,Sde({json:c,documentState:K,indentation:je?O:void 0,parser:N});case 5:case"end":return at.stop()}},ce)})),Js.apply(this,arguments)}function Pl(){d(Xce,{},Ee(Ee({},Xp),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Oo()}})}function le(ce,je){d(lue,{text:ce,onParse:HS,onRepair:Nae,onApply:je},Ee(Ee({},Xp),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Oo()}})}function Ce(){Tde({json:c,text:u,documentState:K,keepSelection:!1,readOnly:b,onChange:G,onPatch:Xt})}function ke(){!b&&void 0!==c&&K.selection&&qv(K.selection)&&!Yn(K.selection.focusPath)&&(r("duplicate",{selection:K.selection}),Xt(Ele(c,kle(K.selection))))}function Pe(){b||!K.selection||!Pi(K.selection)&&!Zn(K.selection)||Yn(K.selection.focusPath)||(r("extract",{selection:K.selection}),Xt(function(je,Qe){if(Zn(Qe))return[{op:"move",from:gt(Qe.focusPath),path:""}];if(!Pi(Qe))throw new Error("Cannot create extract operations: parent must be an Object or Array");var at=Dt(je,Qn(Qe.focusPath));if(er(at))return[{op:"replace",path:"",value:Qe.paths.map(function(ft){var Ht=Ho(Rt(ft));return at[Ht]})}];if(Dr(at)){var dt={};return Qe.paths.forEach(function(ft){var Ht=String(Rt(ft));dt[Ht]=at[Ht]}),[{op:"replace",path:"",value:dt}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(Qe))}(c,K.selection),function(je,Qe){if($r(je))return{state:yf(je,Qe,[])}}))}function Se(ce){void 0!==c&&gk({insertType:ce,selectInside:!0,refJsonEditor:l,json:c,documentState:K,readOnly:b,parser:N,onPatch:Xt,onReplaceJson:wi})}function At(ce){vo(K.selection)&&De(mi(K.selection.focusPath,!1)),Se(ce)}function rn(ce){if(!b&&K.selection)if(hg(K.selection))try{var je=K.selection.anchorPath,Qe=Dt(c,je),at=function(ft,Ht,ln){if("array"===Ht){if(Array.isArray(ft))return ft;if(Ar(ft))return Mae(ft);if("string"==typeof ft)try{var fn=ln.parse(ft);if(Array.isArray(fn))return fn;if(Ar(fn))return Mae(fn)}catch{return[ft]}return[ft]}if("object"===Ht){if(Array.isArray(ft))return Eae(ft);if(Ar(ft))return ft;if("string"==typeof ft)try{var jr=ln.parse(ft);if(Ar(jr))return jr;if(Array.isArray(jr))return Eae(jr)}catch{return{value:ft}}return{value:ft}}if("value"===Ht)return $r(ft)?ln.stringify(ft):ft;throw new Error("Cannot convert ".concat(jN(ft,ln)," to ").concat(Ht))}(Qe,ce,N);if(at===Qe)return;var dt=[{op:"replace",path:gt(je),value:at}];r("handleConvert",{selection:K.selection,path:je,type:ce,operations:dt}),Xt(dt,function(ft,Ht){return{state:yf(ft,Ht,K.selection.focusPath)}})}catch(ft){H(ft)}else H(new Error("Cannot convert current selection to ".concat(ce)))}function hn(){var ce=ble(c,K,!1),je=Qn(K.selection.focusPath);!Yn(ce.focusPath)&&ai(je,Qn(ce.focusPath))?De(fh(ce.focusPath)):De(hh(je)),r("insert before",{selection:K.selection,selectionBefore:ce,parentPath:je}),Ya().then(Ma)}function dn(){var ce=Pi(K.selection)?Rt(K.selection.paths):K.selection.focusPath;r("insert after",ce),De(fh(ce)),Ya().then(Ma)}function Di(ce){return Yi.apply(this,arguments)}function Yi(){return(Yi=ni(bt().mark(function ce(je){return bt().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.next=2,Dde({char:je,selectInside:!0,refJsonEditor:l,json:c,documentState:K,readOnly:b,parser:N,onPatch:Xt,onReplaceJson:wi,onSelect:De});case 2:case"end":return Qe.stop()}},ce)}))).apply(this,arguments)}function vn(){if(!b&&ci.getState().canUndo){var ce=ci.undo();if(ce){var je={json:c,text:u};e(10,c=ce.undo.patch?Yc(c,ce.undo.patch):ce.undo.json),e(16,K=ce.undo.state),e(11,u=ce.undo.text),e(23,Nt=ce.undo.textIsRepaired),r("undo",{item:ce,json:c,documentState:K}),tn(je,{json:c,previousJson:je.json,redo:ce.undo.patch,undo:ce.redo.patch}),Oo(),K.selection&&vt(K.selection.focusPath,!1)}}}function bi(){if(!b&&ci.getState().canRedo){var ce=ci.redo();if(ce){var je={json:c,text:u};e(10,c=ce.redo.patch?Yc(c,ce.redo.patch):ce.redo.json),e(16,K=ce.redo.state),e(11,u=ce.redo.text),e(23,Nt=ce.redo.textIsRepaired),r("redo",{item:ce,json:c,documentState:K}),tn(je,{json:c,previousJson:je.json,redo:ce.redo.patch,undo:ce.undo.patch}),Oo(),K.selection&&vt(K.selection.focusPath,!1)}}}function he(ce){var je;b||void 0===c||(ge=!0,L({id:h,json:c,rootPath:ce,onSort:(je=ni(bt().mark(function Qe(at){var dt;return bt().wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:r("onSort",ce,dt=at.operations),Xt(dt,function(Ht,ln){return{state:Ee(Ee({},yf(Ht,ln,ce)),{},{selection:mi(ce,!1)})}});case 3:case"end":return ft.stop()}},Qe)})),function(Qe){return je.apply(this,arguments)}),onClose:function(){ge=!1,Oo()}}))}function Ye(){K.selection&&he(Cle(c,K.selection))}function ot(ce){var Qe=ce.rootPath,at=ce.onTransform,dt=ce.onClose;void 0!==c&&Qe&&(ge=!0,X({id:ce.id||f,json:c,rootPath:Qe,onTransform:at?function(ft){at({operations:ft,json:c,transformedJson:Yc(c,ft)})}:function(ft){r("onTransform",Qe,ft),Xt(ft,function(Ht,ln){return{state:Ee(Ee({},yf(Ht,ln,Qe)),{},{selection:mi(Qe,!1)})}})},onClose:function(){ge=!1,Oo(),dt&&dt()}}))}function ht(){K.selection&&ot({rootPath:Cle(c,K.selection)})}function vt(ce){return on.apply(this,arguments)}function on(){return on=ni(bt().mark(function ce(je){var Qe,at,dt,ft,ln=arguments;return bt().wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:return Qe=!(ln.length>1&&void 0!==ln[1])||ln[1],e(16,K=EP(c,K,Qn(je))),fn.next=4,Ya();case 4:if(!(at=Rn(je))){fn.next=14;break}if(r("scrollTo",{path:je,elem:at,refContents:s}),dt=s.getBoundingClientRect(),ft=at.getBoundingClientRect(),Qe){fn.next=12;break}if(!(ft.bottom>dt.top&&ft.topQe.bottom-20&&y(je,{container:s,offset:-(Qe.height-dt-20),duration:0})}}function tn(ce,je){(void 0!==ce.json||void 0!==ce?.text)&&(void 0!==u?G({text:u,json:void 0},ce,{contentErrors:Ti(),patchResult:je}):void 0!==c&&G({text:void 0,json:c},ce,{contentErrors:Ti(),patchResult:je}))}function Xt(ce,je){if(!b)return r("handlePatch",ce,je),Mi(ce,je)}function wi(ce,je){var Qe=K,at=c,dt=u,ft={json:c,text:u},Ht=Nt,ln=sc(c,K,[],od),fn="function"==typeof je?je(ce,ln):void 0;e(10,c=fn&&void 0!==fn.json?fn.json:ce),e(16,K=fn&&void 0!==fn.state?fn.state:ln),e(11,u=void 0),e(23,Nt=!1),an(c),wn({previousJson:at,previousState:Qe,previousText:dt,previousTextIsRepaired:Ht}),tn(ft,null)}function Oi(ce,je){r("handleChangeText");var Qe=K,at=c,dt=u,ft={json:c,text:u},Ht=Nt;try{e(10,c=$(ce)),e(16,K=sc(c,K,[],od)),e(11,u=void 0),e(23,Nt=!1)}catch{try{e(10,c=$(Yu(ce))),e(16,K=sc(c,K,[],od)),e(11,u=ce),e(23,Nt=!0)}catch{e(10,c=void 0),e(16,K=YS({json:c,expand:od})),e(11,u=ce),e(23,Nt=!1)}}if("function"==typeof je){var ln=je(c,K);e(10,c=ln&&ln.json?ln.json:c),e(16,K=ln&&ln.state?ln.state:K)}an(c),wn({previousJson:at,previousState:Qe,previousText:dt,previousTextIsRepaired:Ht}),tn(ft,null)}function Nr(ce,je){var Qe=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:ce,expanded:je,recursive:Qe}),e(16,K=je?Qe?sc(c,K,ce,F_):function UQe(t,n){return Ee(Ee({},t),{},{expandedMap:Ee(Ee({},t.expandedMap),{},qa({},gt(n),!0))})}(K,ce):ule(K,ce)),K.selection&&!je&&function GQe(t,n){return Wv(t.focusPath,n)&&(t.focusPath.length>n.length||zo(t))}(K.selection,ce)&&De(void 0),setTimeout(function(){WS(l)||Oo()})}function us(ce){r("openFind",{findAndReplace:ce}),e(19,pe=!1),e(20,Te=!1),Ya().then(function(){e(19,pe=!0),e(20,Te=ce)})}function pu(ce,je){r("handleExpandSection",ce,je);var dt,ft,Ht,Qe=gt(ce);e(16,(ft=Qe,Ht=je,K=Ee(Ee({},dt=K),{},{visibleSectionsMap:Ee(Ee({},dt.visibleSectionsMap),{},qa({},ft,cle(JS(dt,ft).concat(Ht))))})))}function mc(ce){r("pasted json as text",ce),e(18,R=ce)}function ds(ce){ge=!0;var jr=g(int,{json:c,documentState:K,parser:N,showTip:ce.showTip,onEditKey:Ui,onEditValue:nr,onToggleEnforceString:Go,onCut:_i,onCopy:Ys,onPaste:Pl,onRemove:Ce,onDuplicate:ke,onExtract:Pe,onInsertBefore:hn,onInsert:At,onConvert:rn,onInsertAfter:dn,onSort:Ye,onTransform:ht,onCloseContextMenu:function(){m(jr),Oo()}},{left:ce.left,top:ce.top,offsetTop:ce.offsetTop,offsetLeft:ce.offsetLeft,width:ce.width,height:ce.height,anchor:ce.anchor,closeOnOuterClick:!0,onClose:function(){ge=!1,Oo()}})}function Ma(ce){if(!b&&!_f(K.selection)){if(ce&&(ce.stopPropagation(),ce.preventDefault()),ce&&"contextmenu"===ce.type&&ce.target!==a)ds({left:ce.clientX,top:ce.clientY,width:260,height:336,showTip:!1});else{var je,Qe=null===(je=s)||void 0===je?void 0:je.querySelector(".jse-context-menu-pointer.jse-selected");if(Qe)ds({anchor:Qe,offsetTop:2,width:260,height:336,showTip:!1});else{var at,dt=null===(at=s)||void 0===at?void 0:at.getBoundingClientRect();dt&&ds({top:dt.top+2,left:dt.left+2,width:260,height:336,showTip:!1})}}return!1}}function gu(){return(gu=ni(bt().mark(function ce(){var je,Qe,at;return bt().wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:return r("apply pasted json",R),Qe=(je=R).path,at=je.contents,De(mi(Qe,!1)),dt.next=5,Ya();case 5:Xt([{op:"replace",path:gt(Qe),value:at}],function(ft,Ht){return{state:yf(ft,Ht,Qe)}});case 7:case"end":return dt.stop()}},ce)}))).apply(this,arguments)}function Oo(){r("focus"),a&&(a.focus(),a.select())}function mu(ce){return je=c,Qe=K,dt=Qn(at=ce),ft=[Rt(at)],(ln=(Ht=Dt(je,dt))?PP(Ht,Qe,ft):void 0)?mi(dt.concat(ln),!1):fh(at);var je,Qe,at,dt,ft,Ht,ln}function vu(ce){i&&i.onDrag(ce)}function lD(){i&&i.onDragEnd()}return t.$$set=function(ce){"readOnly"in ce&&e(0,b=ce.readOnly),"externalContent"in ce&&e(50,C=ce.externalContent),"mainMenuBar"in ce&&e(1,k=ce.mainMenuBar),"navigationBar"in ce&&e(2,T=ce.navigationBar),"escapeControlCharacters"in ce&&e(51,j=ce.escapeControlCharacters),"escapeUnicodeCharacters"in ce&&e(52,B=ce.escapeUnicodeCharacters),"parser"in ce&&e(3,N=ce.parser),"parseMemoizeOne"in ce&&e(53,$=ce.parseMemoizeOne),"validator"in ce&&e(54,V=ce.validator),"validationParser"in ce&&e(55,z=ce.validationParser),"pathParser"in ce&&e(4,Y=ce.pathParser),"indentation"in ce&&e(5,O=ce.indentation),"onError"in ce&&e(6,H=ce.onError),"onChange"in ce&&e(56,G=ce.onChange),"onChangeMode"in ce&&e(57,F=ce.onChangeMode),"onRenderValue"in ce&&e(58,Z=ce.onRenderValue),"onRenderMenu"in ce&&e(7,D=ce.onRenderMenu),"onClassName"in ce&&e(59,E=ce.onClassName),"onFocus"in ce&&e(60,M=ce.onFocus),"onBlur"in ce&&e(61,U=ce.onBlur),"onSortModal"in ce&&e(62,L=ce.onSortModal),"onTransformModal"in ce&&e(63,X=ce.onTransformModal),"onJSONEditorModal"in ce&&e(64,ne=ce.onJSONEditorModal)},t.$$.update=function(){var ce,je;3145728&t.$$.dirty[1]&&e(73,Ie=bP({escapeControlCharacters:j,escapeUnicodeCharacters:B})),524288&t.$$.dirty[1]&&function Be(ce){void 0!==ce.json&&function(je){if(void 0!==je){var Qe=!ai(c,je);if(r("update external json",{isChanged:Qe,currentlyText:void 0===c}),Qe){var at={json:c,text:u},dt=K,ft=c,Ht=u,ln=Nt;e(10,c=je),jt(c),e(11,u=void 0),e(23,Nt=!1),an(c),wn({previousJson:ft,previousState:dt,previousText:Ht,previousTextIsRepaired:ln}),tn(at,null)}}}(ce.json),void 0!==ce.text&&function(je){if(void 0!==je&&void 0===C.json){var Qe=je!==u;if(r("update external text",{isChanged:Qe}),Qe){var at={json:c,text:u},dt=c,ft=K,Ht=u,ln=Nt;try{e(10,c=$(je)),jt(c),e(11,u=je),e(23,Nt=!1),ae=void 0}catch(fn){try{e(10,c=$(Yu(je))),jt(c),e(11,u=je),e(23,Nt=!0),ae=void 0,an(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,Nt=!1),ae=US(u,fn.message||fn.toString())}}an(c),wn({previousJson:dt,previousState:ft,previousText:Ht,previousTextIsRepaired:ln}),tn(at,null)}}}(ce.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&Ir(Ue,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Pn(c,V,N,z),4096&t.$$.dirty[0]&&e(24,(je={},(ce=Ge).forEach(function(Qe){je[gt(Qe.path)]=Qe}),ce.forEach(function(Qe){for(var at=Qe.path;at.length>0;){var dt=gt(at=Qn(at));dt in je||(je[dt]={isChildError:!0,path:at,message:"Contains invalid data",severity:qu.warning})}}),bn=je)),512&t.$$.dirty[0]&&(i=s?function(ce){var je,Qe;function at(ln){return ln<20?200:ln<50?400:1200}function dt(){ce&&(ce.scrollTop+=.05*(je||0))}function ft(ln){Qe&&ln===je||(Ht(),ZP("startAutoScroll",ln),je=ln,Qe=setInterval(dt,50))}function Ht(){Qe&&(ZP("stopAutoScroll"),clearInterval(Qe),Qe=void 0,je=void 0)}return ZP("createAutoScrollHandler",ce),{onDrag:function(ln){if(ce){var fn=ln.clientY,jr=ce.getBoundingClientRect(),Io=jr.top,Yr=jr.bottom;fnYr?ft(at(fn-Yr)):Ht()}},onDragEnd:function(){Ht()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Hi={readOnly:b,parser:N,normalization:Ie,getJson:vr,getDocumentState:qr,findElement:Rn,findNextInside:mu,focus:Oo,onPatch:Xt,onInsert:Se,onExpand:Nr,onSelect:De,onFind:us,onExpandSection:pu,onPasteJson:mc,onRenderValue:Z,onContextMenu:ds,onClassName:E||function(){},onDrag:vu,onDragEnd:lD}),8192&t.$$.dirty[0]&&r("context changed",Hi)},[b,k,T,N,Y,O,H,D,function(){return Nt&&void 0!==c&&wi(c),{json:c,text:u}},s,c,u,Ge,Hi,a,l,K,be,R,pe,Te,ye,yi,Nt,bn,o,Je,function(){return zt.apply(this,arguments)},function(){return ct.apply(this,arguments)},function(ce,je){return Nn.apply(this,arguments)},function(ce,je){return mt.apply(this,arguments)},function(){e(19,pe=!1),e(20,Te=!1),Je(""),Oo()},function(ce){r("select validation error",ce),De(mi(ce.path,!1)),vt(ce.path)},Ys,function(ce){ce.preventDefault(),kde({clipboardText:ce.clipboardData.getData("text/plain"),json:c,documentState:K,readOnly:b,parser:N,onPatch:Xt,onChangeText:Oi,openRepairModal:le})},vn,bi,function(){he([])},function(){ot({rootPath:[]})},function(){Nr([],!0,!0)},function(){Nr([],!1,!0)},function(ce){var je=vf(ce),Qe=ce.shiftKey;if(r("keydown",{combo:je,key:ce.key}),"Ctrl+X"===je&&(ce.preventDefault(),_i(!0)),"Ctrl+Shift+X"===je&&(ce.preventDefault(),_i(!1)),"Ctrl+C"===je&&(ce.preventDefault(),Ys(!0)),"Ctrl+Shift+C"===je&&(ce.preventDefault(),Ys(!1)),"Ctrl+D"===je&&(ce.preventDefault(),ke()),"Delete"!==je&&"Backspace"!==je||(ce.preventDefault(),Ce()),"Insert"===je&&(ce.preventDefault(),Se("structure")),"Ctrl+A"===je&&(ce.preventDefault(),De(mi([],!1))),"Ctrl+Q"===je&&Ma(ce),"ArrowUp"===je||"Shift+ArrowUp"===je){ce.preventDefault();var at=K.selection?ble(c,K,Qe,!0)||K.selection:zv(c,K);De(at),Vt(at.focusPath)}if("ArrowDown"===je||"Shift+ArrowDown"===je){ce.preventDefault();var dt=K.selection?function(yr,Oa){var wd=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ii=Oa.selection;if(!Ii)return null;var tl=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Pi(Ii)?Ii.focusPath:Rt(Ii.paths),vc=PP(yr,Oa,tl),_u=vc,xd=vc;if(null===vc||null==_u||null==xd)return null;if(wd){var bu=PP(yr,$r(Dt(yr,tl))?ule(Oa,tl):Oa,tl);return null===bu?null:Qc(Ii)?Eo(yr,bu,bu):zo(Ii)?Eo(yr,_u,xd):Eo(yr,Ii.anchorPath,bu)}if(vo(Ii)){var $b=Dt(yr,Qn(vc));return Array.isArray($b)?mi(xd,!1):ac(xd,!1)}return Zn(Ii)?mi(xd,!1):zo(Ii)?Eo(yr,_u,xd):Eo(yr,vc,vc)}(c,K,Qe,!0)||K.selection:zv(c,K);De(dt),Vt(dt.focusPath)}if("ArrowLeft"===je||"Shift+ArrowLeft"===je){ce.preventDefault();var ft=K.selection?function(yr,Oa){var wd=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ii=Oa.selection;if(!Ii)return null;var tl=wle(yr,Oa,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),vc=tl.caret,_u=tl.previous;if(wd)return Pi(Ii)?null:Eo(yr,Ii.anchorPath,Ii.focusPath);if(vc&&_u)return RP(_u);var bu=Dt(yr,Qn(Ii.focusPath));return Zn(Ii)&&Array.isArray(bu)?Eo(yr,Ii.focusPath,Ii.focusPath):Pi(Ii)&&!Array.isArray(bu)?ac(Ii.focusPath,!1):null}(c,K,Qe,!b)||K.selection:zv(c,K);De(ft),Vt(ft.focusPath)}if("ArrowRight"===je||"Shift+ArrowRight"===je){ce.preventDefault();var Ht=K.selection&&void 0!==c?function(yr,Oa){var wd=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ii=Oa.selection;if(!Ii)return null;var tl=wle(yr,Oa,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),vc=tl.caret,_u=tl.next;return wd?Pi(Ii)?null:Eo(yr,Ii.anchorPath,Ii.focusPath):vc&&_u?RP(_u):Pi(Ii)?mi(Ii.focusPath,!1):null}(c,K,Qe,!b)||K.selection:zv(c,K);De(Ht),Vt(Ht.focusPath)}if("Enter"===je&&K.selection){if(!b&&Pi(K.selection)&&1===K.selection.paths.length){var ln=K.selection.focusPath,fn=Dt(c,Qn(ln));Array.isArray(fn)&&De(mi(ln,!1))}!b&&vo(K.selection)&&(ce.preventDefault(),De(Ee(Ee({},K.selection),{},{edit:!0}))),Zn(K.selection)&&(ce.preventDefault(),$r(Dt(c,K.selection.focusPath))?Nr(K.selection.focusPath,!0):b||De(Ee(Ee({},K.selection),{},{edit:!0})))}if(1===je.replace(/^Shift\+/,"").length&&K.selection)return ce.preventDefault(),void Di(ce.key);if("Enter"===je&&(Qc(K.selection)||zo(K.selection)))return ce.preventDefault(),void Di("");if("Ctrl+Enter"===je&&Zn(K.selection)){var jr=Dt(c,K.selection.focusPath);Q2(jr)&&window.open(String(jr),"_blank")}if("Escape"===je&&K.selection&&(ce.preventDefault(),De(void 0)),"Ctrl+F"===je&&(ce.preventDefault(),us(!1)),"Ctrl+H"===je&&(ce.preventDefault(),us(!0)),"Ctrl+Z"===je){ce.preventDefault();var Io=document.activeElement;Io&&Io.blur&&Io.focus?(Io.blur(),setTimeout(function(){vn(),setTimeout(function(){return Io.select()})})):vn()}if("Ctrl+Shift+Z"===je){ce.preventDefault();var Yr=document.activeElement;Yr&&Yr.blur&&Yr.focus?(Yr.blur(),setTimeout(function(){bi(),setTimeout(function(){return Yr.select()})})):bi()}},function(ce){r("handleMouseDown",ce),setTimeout(function(){setTimeout(function(){v||Gae(ce.target,"BUTTON")||(Oo(),K.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,K=Ee(Ee({},K),{},{selection:Eo(c||{},[],[])}))))})})},Ma,function(ce){b||ds({anchor:qae(ce.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gu.apply(this,arguments)},function(){r("clear pasted json"),e(18,R=void 0)},function(){F(Fr.text)},function(ce){De(ce),Oo(),vt(ce.focusPath)},function(ce){!I_(ce.target,function(Qe){return Qe===l})&&_f(K.selection)&&(r("click outside the editor, stop edit mode"),De(function(Qe){return vo(Qe)||Zn(Qe)?Ee(Ee({},Qe),{},{edit:!1}):Qe}),v&&a&&(a.focus(),a.blur()),Ya().then(function(){setTimeout(function(){a&&a.blur()})}))},C,j,B,$,V,z,G,F,Z,E,M,U,L,X,ne,function(){var ce=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F_;r("expand");var je=Ee(Ee({},K),{},{expandedMap:{},visibleSectionsMap:{}});e(16,K=sc(c,je,[],ce))},Ti,vr,Mi,ot,vt,Rn,Oo,Ie,Ue,function(ce){e(19,pe=ce)},function(ce){qn[ce?"unshift":"push"](function(){e(14,a=ce)})},function(ce){qn[ce?"unshift":"push"](function(){e(9,s=ce)})},function(ce){qn[ce?"unshift":"push"](function(){e(15,l=ce)})}]}var vR=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,irt,nrt,In,{readOnly:0,externalContent:50,mainMenuBar:1,navigationBar:2,escapeControlCharacters:51,escapeUnicodeCharacters:52,parser:3,parseMemoizeOne:53,validator:54,validationParser:55,pathParser:4,indentation:5,onError:6,onChange:56,onChangeMode:57,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},Jit,[-1,-1,-1,-1,-1]),r}return de(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function rrt(t){gn(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function Nde(t){var n,e,i,r,o,s=[srt,ort],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=Ci()},m:function(c,u){a[e].m(c,u),ve(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(it(),Q(a[d],1,1,function(){a[d]=null}),rt(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),W(i,1),i.m(r.parentNode,r))},i:function(c){o||(W(i),o=!0)},o:function(c){Q(i),o=!1},d:function(c){a[e].d(c),c&&me(r)}}}function ort(t){var n;return{c:function(){n=ut("(Only available for arrays, not for objects)")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function srt(t){var n,e;return n=new Oet({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function jde(t){var n,e;return n=new vR({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ur,onError:console.error,onChange:ur,onChangeMode:ur,onFocus:ur,onBlur:ur,onSortModal:ur,onTransformModal:ur,onJSONEditorModal:ur,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function art(t){var n,e;return{c:function(){n=oe("div"),e=ut(t[17]),I(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){ve(i,n,r),ee(n,e)},p:function(i,r){131072&r[0]&&Jt(e,i[17])},i:tt,o:tt,d:function(i){i&&me(n)}}}function lrt(t){var n,e;return n=new vR({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ur,onError:console.error,onChange:ur,onChangeMode:ur,onFocus:ur,onBlur:ur,onSortModal:ur,onTransformModal:ur,onJSONEditorModal:ur,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function crt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y,O,H,G,F,Z,D,E,M,U,L,X,ne,ge,ae,De,be,Ie,R,J=t[21](t[0]).description+"";n=new Vet({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new li({props:{data:t[15]?lc:bf}});var K=t[15]&&Nde(t);H=new li({props:{data:t[16]?lc:bf}});var pe=t[16]&&jde(t),Te=[lrt,art],ye=[];function Ue(Je,_t){return Je[17]?1:0}return U=Ue(t),L=ye[U]=Te[U](t),{c:function(){$e(n.$$.fragment),e=Me(),i=oe("div"),r=oe("div"),o=oe("div"),(s=oe("div")).innerHTML='
    Language
    ',a=Me(),l=oe("div"),c=Me(),(u=oe("div")).innerHTML='
    Path
    ',d=Me(),h=oe("input"),p=Me(),g=oe("div"),m=oe("div"),v=oe("button"),$e(y.$$.fragment),b=ut("\n Wizard"),C=Me(),K&&K.c(),k=Me(),(T=oe("div")).innerHTML='
    Query
    ',j=Me(),B=oe("textarea"),N=Me(),$=oe("div"),V=oe("div"),z=oe("div"),Y=oe("div"),O=oe("button"),$e(H.$$.fragment),G=ut("\n Original"),F=Me(),pe&&pe.c(),Z=Me(),D=oe("div"),(E=oe("div")).innerHTML='
    Preview
    ',M=Me(),L.c(),X=Me(),ne=oe("div"),ge=oe("button"),ae=ut("Transform"),I(s,"class","jse-label svelte-107mggt"),I(l,"class","jse-description svelte-107mggt"),I(u,"class","jse-label svelte-107mggt"),I(h,"class","jse-path svelte-107mggt"),I(h,"type","text"),h.readOnly=!0,I(h,"title","Selected path"),h.value=f=Yn(t[1])?"(whole document)":oc(Xa(t[1])),I(v,"type","button"),I(v,"class","svelte-107mggt"),I(m,"class","jse-label-inner svelte-107mggt"),I(g,"class","jse-label svelte-107mggt"),I(T,"class","jse-label svelte-107mggt"),I(B,"class","jse-query svelte-107mggt"),I(B,"spellcheck","false"),B.value=t[13],I(o,"class","jse-query-contents svelte-107mggt"),I(O,"type","button"),I(O,"class","svelte-107mggt"),I(Y,"class","jse-label-inner svelte-107mggt"),I(z,"class","jse-label svelte-107mggt"),I(V,"class","jse-original-data svelte-107mggt"),Xe(V,"jse-hide",!t[16]),I(E,"class","jse-label svelte-107mggt"),I(D,"class","jse-preview-data svelte-107mggt"),I($,"class","jse-data-contents svelte-107mggt"),Xe($,"jse-hide-original-data",!t[16]),I(r,"class","jse-main-contents svelte-107mggt"),I(ge,"type","button"),I(ge,"class","jse-primary svelte-107mggt"),ge.disabled=De=!!t[17],I(ne,"class","jse-actions svelte-107mggt"),I(i,"class","jse-modal-contents svelte-107mggt")},m:function(Je,_t){Le(n,Je,_t),ve(Je,e,_t),ve(Je,i,_t),ee(i,r),ee(r,o),ee(o,s),ee(o,a),ee(o,l),l.innerHTML=J,ee(o,c),ee(o,u),ee(o,d),ee(o,h),ee(o,p),ee(o,g),ee(g,m),ee(m,v),Le(y,v,null),ee(v,b),ee(o,C),K&&K.m(o,null),ee(o,k),ee(o,T),ee(o,j),ee(o,B),ee(r,N),ee(r,$),ee($,V),ee(V,z),ee(z,Y),ee(Y,O),Le(H,O,null),ee(O,G),ee(V,F),pe&&pe.m(V,null),ee($,Z),ee($,D),ee(D,E),ee(D,M),ye[U].m(D,null),ee(i,X),ee(i,ne),ee(ne,ge),ee(ge,ae),be=!0,Ie||(R=[Ze(v,"click",t[25]),Ze(B,"input",t[23]),Ze(O,"click",t[26]),Ze(ge,"click",t[24]),ws(drt.call(null,ge))],Ie=!0)},p:function(Je,_t){var zt={};512&_t[0]&&(zt.queryLanguages=Je[9]),1&_t[0]&&(zt.queryLanguageId=Je[0]),n.$set(zt),(!be||1&_t[0])&&J!==(J=Je[21](Je[0]).description+"")&&(l.innerHTML=J),(!be||2&_t[0]&&f!==(f=Yn(Je[1])?"(whole document)":oc(Xa(Je[1])))&&h.value!==f)&&(h.value=f);var ct={};32768&_t[0]&&(ct.data=Je[15]?lc:bf),y.$set(ct),Je[15]?K?(K.p(Je,_t),32768&_t[0]&&W(K,1)):((K=Nde(Je)).c(),W(K,1),K.m(o,k)):K&&(it(),Q(K,1,1,function(){K=null}),rt()),(!be||8192&_t[0])&&(B.value=Je[13]);var Nn={};65536&_t[0]&&(Nn.data=Je[16]?lc:bf),H.$set(Nn),Je[16]?pe?(pe.p(Je,_t),65536&_t[0]&&W(pe,1)):((pe=jde(Je)).c(),W(pe,1),pe.m(V,null)):pe&&(it(),Q(pe,1,1,function(){pe=null}),rt()),(!be||65536&_t[0])&&Xe(V,"jse-hide",!Je[16]);var mt=U;(U=Ue(Je))===mt?ye[U].p(Je,_t):(it(),Q(ye[mt],1,1,function(){ye[mt]=null}),rt(),(L=ye[U])?L.p(Je,_t):(L=ye[U]=Te[U](Je)).c(),W(L,1),L.m(D,null)),(!be||65536&_t[0])&&Xe($,"jse-hide-original-data",!Je[16]),(!be||131072&_t[0]&&De!==(De=!!Je[17]))&&(ge.disabled=De)},i:function(Je){be||(W(n.$$.fragment,Je),W(y.$$.fragment,Je),W(K),W(H.$$.fragment,Je),W(pe),W(L),be=!0)},o:function(Je){Q(n.$$.fragment,Je),Q(y.$$.fragment,Je),Q(K),Q(H.$$.fragment,Je),Q(pe),Q(L),be=!1},d:function(Je){Fe(n,Je),Je&&me(e),Je&&me(i),Fe(y),K&&K.d(),Fe(H),pe&&pe.d(),ye[U].d(),Ie=!1,rr(R)}}}function urt(t){var n,e,i,r,o;return e=new Zae({props:{$$slots:{default:[crt]},$$scope:{ctx:t}}}),{c:function(){n=oe("div"),$e(e.$$.fragment),I(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){ve(s,n,a),Le(e,n,null),i=!0,r||(o=ws(pk.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(W(e.$$.fragment,s),i=!0)},o:function(s){Q(e.$$.fragment,s),i=!1},d:function(s){s&&me(n),Fe(e),r=!1,o()}}}function drt(t){t.focus()}function hrt(t,n,e){var i,r,o=Cs("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+c_():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,g=n.parseMemoizeOne,m=n.validationParser,v=n.pathParser,y=n.queryLanguages,b=n.queryLanguageId,C=n.onChangeQueryLanguage,k=n.onRenderValue,T=n.onClassName,j=n.onTransform,B=xs("simple-modal").close,N="".concat(a,":").concat(gt(u)),$=Zc[N]||{},V=!1!==Zc.showWizard,z=!1!==Zc.showOriginal,Y=$.queryOptions||{},O=b===$.queryLanguageId&&$.query?$.query:Z(b).createQuery(l,$.queryOptions||{}),H=$.isManual||!1,G=void 0,F={text:""};function Z(E){return y.find(function(M){return M.id===E})||y[0]}var D=Ov(function(E,M){try{o("previewTransform",{query:M});var U=Z(b).executeQuery(E,M,p);e(18,F={json:U}),e(17,G=void 0)}catch(L){e(18,F={text:""}),e(17,G=L.toString())}},300);return t.$$set=function(E){"id"in E&&e(28,a=E.id),"json"in E&&e(29,l=E.json),"rootPath"in E&&e(1,u=E.rootPath),"indentation"in E&&e(2,d=E.indentation),"escapeControlCharacters"in E&&e(3,h=E.escapeControlCharacters),"escapeUnicodeCharacters"in E&&e(4,f=E.escapeUnicodeCharacters),"parser"in E&&e(5,p=E.parser),"parseMemoizeOne"in E&&e(6,g=E.parseMemoizeOne),"validationParser"in E&&e(7,m=E.validationParser),"pathParser"in E&&e(8,v=E.pathParser),"queryLanguages"in E&&e(9,y=E.queryLanguages),"queryLanguageId"in E&&e(0,b=E.queryLanguageId),"onChangeQueryLanguage"in E&&e(30,C=E.onChangeQueryLanguage),"onRenderValue"in E&&e(10,k=E.onRenderValue),"onClassName"in E&&e(11,T=E.onClassName),"onTransform"in E&&e(31,j=E.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Dt(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&D(i,O),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,Zc[N]={queryOptions:Y,query:O,queryLanguageId:b,isManual:H},Zc),o("store state in memory",N,Zc[N]))},[b,u,d,h,f,p,g,m,v,y,k,T,Y,O,i,V,z,G,F,r,B,Z,function(E){e(12,Y=E),e(13,O=Z(b).createQuery(l,E)),e(33,H=!1),o("updateQueryByWizard",{queryOptions:Y,query:O,isManual:H})},function(E){e(13,O=E.target.value),e(33,H=!0),o("handleChangeQuery",{query:O,isManual:H})},function(){try{o("handleTransform",{query:O});var E=Z(b).executeQuery(i,O,p);j([{op:"replace",path:gt(u),value:E}]),B()}catch(M){console.error(M),e(18,F={text:""}),e(17,G=M.toString())}},function(){e(15,V=!V),e(32,Zc.showWizard=V,Zc)},function(){e(16,z=!z),e(32,Zc.showOriginal=z,Zc)},function(E){o("handleChangeQueryLanguage",E),e(0,b=E),C(E);var M=Z(b);e(13,O=M.createQuery(l,Y)),e(33,H=!1)},a,l,C,j,Zc,H]}var frt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,hrt,urt,In,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},rrt,[-1,-1]),r}return de(e)}(),Tf={};function prt(t){gn(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function Pde(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new vg({props:c}),qn.push(function(){return Uc(o,"value",l)}),{c:function(){n=oe("tr"),(e=oe("th")).textContent="Property",i=Me(),r=oe("td"),$e(o.$$.fragment),I(e,"class","svelte-1y818v2"),I(r,"class","svelte-1y818v2")},m:function(u,d){ve(u,n,d),ee(n,e),ee(n,i),ee(n,r),Le(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],Hc(function(){return s=!1})),o.$set(h)},i:function(u){a||(W(o.$$.fragment,u),a=!0)},o:function(u){Q(o.$$.fragment,u),a=!1},d:function(u){u&&me(n),Fe(o)}}}function Rde(t){var n,e;return{c:function(){n=oe("div"),e=ut(t[5]),I(n,"class","jse-error svelte-1y818v2")},m:function(i,r){ve(i,n,r),ee(n,e)},p:function(i,r){32&r&&Jt(e,i[5])},d:function(i){i&&me(n)}}}function grt(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,z,Y,O,H,G;e=new nR({props:{title:t[4]?"Sort array items":"Sort object keys"}});var F=t[4]&&(t[3].length>1||void 0===t[1])&&Pde(t);function Z(M){t[15](M)}var D={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(D.value=t[2]),k=new vg({props:D}),qn.push(function(){return Uc(k,"value",Z)});var E=t[5]&&Rde(t);return{c:function(){n=oe("div"),$e(e.$$.fragment),i=Me(),r=oe("div"),o=oe("table"),(s=oe("colgroup")).innerHTML=' \n ',a=Me(),l=oe("tbody"),c=oe("tr"),(u=oe("th")).textContent="Path",d=Me(),h=oe("td"),f=oe("input"),g=Me(),F&&F.c(),m=Me(),v=oe("tr"),(y=oe("th")).textContent="Direction",b=Me(),C=oe("td"),$e(k.$$.fragment),j=Me(),B=oe("div"),E&&E.c(),N=Me(),$=oe("div"),V=oe("button"),z=ut("Sort"),I(u,"class","svelte-1y818v2"),I(f,"class","jse-path svelte-1y818v2"),I(f,"type","text"),f.readOnly=!0,I(f,"title","Selected path"),f.value=p=Yn(t[0])?"(whole document)":oc(Xa(t[0])),I(h,"class","svelte-1y818v2"),I(y,"class","svelte-1y818v2"),I(C,"class","svelte-1y818v2"),I(o,"class","svelte-1y818v2"),I(B,"class","jse-space svelte-1y818v2"),I(V,"type","button"),I(V,"class","jse-primary svelte-1y818v2"),V.disabled=Y=!!t[4]&&!t[1],I($,"class","jse-actions svelte-1y818v2"),I(r,"class","jse-modal-contents svelte-1y818v2"),I(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(M,U){ve(M,n,U),Le(e,n,null),ee(n,i),ee(n,r),ee(r,o),ee(o,s),ee(o,a),ee(o,l),ee(l,c),ee(c,u),ee(c,d),ee(c,h),ee(h,f),ee(l,g),F&&F.m(l,null),ee(l,m),ee(l,v),ee(v,y),ee(v,b),ee(v,C),Le(k,C,null),ee(r,j),ee(r,B),E&&E.m(B,null),ee(r,N),ee(r,$),ee($,V),ee(V,z),O=!0,H||(G=[Ze(V,"click",t[8]),ws(mrt.call(null,V)),ws(pk.call(null,n,t[6]))],H=!0)},p:function(M,U){var L=Wt(U,1)[0],X={};16&L&&(X.title=M[4]?"Sort array items":"Sort object keys"),e.$set(X),(!O||1&L&&p!==(p=Yn(M[0])?"(whole document)":oc(Xa(M[0])))&&f.value!==p)&&(f.value=p),M[4]&&(M[3].length>1||void 0===M[1])?F?(F.p(M,L),26&L&&W(F,1)):((F=Pde(M)).c(),W(F,1),F.m(l,m)):F&&(it(),Q(F,1,1,function(){F=null}),rt());var ne={};!T&&4&L&&(T=!0,ne.value=M[2],Hc(function(){return T=!1})),k.$set(ne),M[5]?E?E.p(M,L):((E=Rde(M)).c(),E.m(B,null)):E&&(E.d(1),E=null),(!O||18&L&&Y!==(Y=!!M[4]&&!M[1]))&&(V.disabled=Y)},i:function(M){O||(W(e.$$.fragment,M),W(F),W(k.$$.fragment,M),O=!0)},o:function(M){Q(e.$$.fragment,M),Q(F),Q(k.$$.fragment,M),O=!1},d:function(M){M&&me(n),Fe(e),F&&F.d(),Fe(k),E&&E.d(),H=!1,rr(G)}}}function mrt(t){t.focus()}function vrt(t,n,e){var i,r,o,s=Cs("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=xs("simple-modal").close,h="".concat(a,":").concat(gt(c)),f=Dt(l,c),p={value:1,label:"ascending"},g=[p,{value:-1,label:"descending"}],m=Tf[h]&&Tf[h].selectedProperty||void 0,v=Tf[h]&&Tf[h].selectedDirection||p,y=void 0;return t.$$set=function(b){"id"in b&&e(9,a=b.id),"json"in b&&e(10,l=b.json),"rootPath"in b&&e(0,c=b.rootPath),"onSort"in b&&e(11,u=b.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?mP(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(N_):void 0),10&t.$$.dirty&&void 0===m&&o&&1===o.length&&e(1,m=o[0]),4102&t.$$.dirty&&(e(12,Tf[h]={selectedProperty:m,selectedDirection:v},Tf),s("store state in memory",h,Tf[h]))},e(4,i=Array.isArray(f)),[c,m,v,o,i,y,d,g,function(){try{var b,C;e(5,y=void 0);var k=null===(b=m)||void 0===b?void 0:b.value,T=null===(C=v)||void 0===C?void 0:C.value,j=ode(l,c,k,T);u({operations:j,rootPath:c,itemPath:k,direction:T}),d()}catch(B){e(5,y=B.toString())}},a,l,u,Tf,r,function(b){e(1,m=b),e(3,o),e(13,r),e(4,i)},function(b){e(2,v=b)}]}var yrt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,vrt,grt,In,{id:9,json:10,rootPath:0,onSort:11},prt),r}return de(e)}();function ud(){}function vk(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function _rt(t){var n,e;return n=new fk({props:{items:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&Wt(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function brt(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,g=n.canRedo,m=n.canFormat,v=n.canCompact,y=n.canSort,b=n.canTransform,C=n.onRenderMenu;return t.$$set=function(k){"readOnly"in k&&e(1,s=k.readOnly),"onFormat"in k&&e(2,a=k.onFormat),"onCompact"in k&&e(3,l=k.onCompact),"onSort"in k&&e(4,c=k.onSort),"onTransform"in k&&e(5,u=k.onTransform),"onToggleSearch"in k&&e(6,d=k.onToggleSearch),"onUndo"in k&&e(7,h=k.onUndo),"onRedo"in k&&e(8,f=k.onRedo),"canUndo"in k&&e(9,p=k.canUndo),"canRedo"in k&&e(10,g=k.canRedo),"canFormat"in k&&e(11,m=k.canFormat),"canCompact"in k&&e(12,v=k.canCompact),"canSort"in k&&e(13,y=k.canSort),"canTransform"in k&&e(14,b=k.canTransform),"onRenderMenu"in k&&e(15,C=k.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:lR,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!m},{type:"button",icon:Znt,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:nk,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:ZS,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!b},{type:"button",icon:zP,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:UP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:HP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!g},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,r]}var wrt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,brt,_rt,In,{readOnly:1,onFormat:2,onCompact:3,onSort:4,onTransform:5,onToggleSearch:6,onUndo:7,onRedo:8,canUndo:9,canRedo:10,canFormat:11,canCompact:12,canSort:13,canTransform:14,onRenderMenu:15}),r}return de(e)}(),or=function(){function t(){ue(this,t)}return de(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),yk.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),yk.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new X_(this),o=new X_(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new X_(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new Fde(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new $de(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new nu(n):yk.from(nu.split(n,[])):t.empty}}]),t}(),nu=function(t){We(e,or);var n=qe(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function xrt(t){var n,e=-1,i=_e(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return ue(this,e),(r=n.call(this)).text=i,r.length=o,r}return de(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new Crt(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(Lde(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=_k(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return gi(Xn(e.prototype),"replace",this).call(this,i,r,o);var s=_k(this.text,_k(o.text,Lde(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):yk.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=_e(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=_e(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),yk=function(t){We(e,or);var n=qe(e);function e(i,r){var o;ue(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=_e(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return de(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return gi(Xn(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return gi(Xn(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=_e(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=Wt(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(N,$){return N+$.length+1},-1),s=0,a=_e(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(N){a.e(N)}finally{a.f()}if(s<32){var c,u=[],d=_e(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(N){d.e(N)}finally{d.f()}return new nu(u,o)}var f=Math.max(32,s>>5),p=f<<1,g=f>>1,m=[],v=0,y=-1,b=[];function C(N){var $;if(N.lines>p&&N instanceof e){var V,z=_e(N.children);try{for(z.s();!(V=z.n()).done;)C(V.value)}catch(Y){z.e(Y)}finally{z.f()}}else N.lines>g&&(v>g||!v)?(k(),m.push(N)):N instanceof nu&&v&&($=b[b.length-1])instanceof nu&&N.lines+$.lines<=32?(v+=N.lines,y+=N.length+1,b[b.length-1]=new nu($.text.concat(N.text),$.length+1+N.length)):(v+N.lines>f&&k(),v+=N.lines,y+=N.length+1,b.push(N))}function k(){0!=v&&(m.push(1==b.length?b[0]:e.from(b,y)),y=-1,v=b.length=0)}var T,j=_e(i);try{for(j.s();!(T=j.n()).done;)C(T.value)}catch(N){j.e(N)}finally{j.f()}return k(),1==m.length?m[0]:new e(m,o)}}]),e}();function _k(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;ue(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof nu?n.text.length:n.children.length)<<1]}return de(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof nu?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof nu){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof nu?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),Fde=function(){function t(n,e,i){ue(this,t),this.value="",this.done=!1,this.cursor=new X_(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return de(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),$de=function(){function t(n){ue(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return de(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),t}();typeof Symbol<"u"&&(or.prototype[Symbol.iterator]=function(){return this.iter()},X_.prototype[Symbol.iterator]=Fde.prototype[Symbol.iterator]=$de.prototype[Symbol.iterator]=function(){return this});for(var Crt=function(){function t(n,e,i,r){ue(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return de(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),a0="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(function(t){return t?parseInt(t,36):1}),bk=1;bkt)return a0[n-1]<=t;return!1}function Bde(t){return t>=127462&&t<=127487}function Aa(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?krt:Vde)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function Vde(t,n,e){if(n==t.length)return n;n&&Hde(t.charCodeAt(n))&&Ude(t.charCodeAt(n-1))&&n--;var i=Vs(t,n);for(n+=El(i);n=0&&Bde(Vs(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function krt(t,n,e){for(;n>0;){var i=Vde(t,n-2,e);if(i=56320&&t<57344}function Ude(t){return t>=55296&&t<56320}function Vs(t,n){var e=t.charCodeAt(n);if(!Ude(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return Hde(i)?i-56320+(e-55296<<10)+65536:e}function yR(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function El(t){return t<65536?1:2}var _R=/\r\n?|\n/,Ea=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Ea||(Ea={})),l0=function(){function t(n){ue(this,t),this.sections=n}return de(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ea.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Ea.Simple&&c>=n&&(i==Ea.TrackDel&&rn||i==Ea.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),iu=function(t){We(e,l0);var n=qe(e);function e(i,r){var o;return ue(this,e),(o=n.call(this,i)).inserted=r,o}return de(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return bR(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return wR(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){bR(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return l0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new Q_(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&Df(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||g<0||v>r)throw new RangeError("Invalid change range ".concat(g," to ").concat(v," (in doc of length ").concat(r,")"));var b=y?"string"==typeof y?or.of(y.split(o||_R)):y:or.empty,C=b.length;if(g==v&&0==C)return;gl&&aa(s,g-l,-1),aa(s,v-g,C),Df(a,s,b),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function Df(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function wR(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new Q_(t),a=new Q_(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);aa(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?iu.createSet(r,o):l0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new Q_(t),s=new Q_(n),a=!1;;){if(o.done&&s.done)return r?iu.createSet(i,r):l0.create(i);if(0==o.ins)aa(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;aa(i,l,u,a),r&&u&&Df(r,i,s.text)}else-1==s.ins?(aa(i,o.off?0:o.len,l,a),r&&Df(r,i,o.textBit(l))):(aa(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&Df(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else aa(i,0,s.ins,a),r&&Df(r,i,s.text),s.next()}}var Q_=function(){function t(n){ue(this,t),this.set=n,this.i=0,this.next()}return de(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?or.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?or.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),wk=function(){function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.flags=i}return de(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return lt.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return lt.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return lt.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),lt=function(){function t(n,e){ue(this,t),this.ranges=n,this.mainIndex=e}return de(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return wk.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return wk.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function Gde(t,n){var e,i=_e(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var xR=0,Zt=function(){function t(n,e,i,r,o){ue(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=xR++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return de(t,[{key:"of",value:function(n){return new xk([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new xk(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new xk(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:CR),!!n.static,n.enables)}}]),t}();function CR(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var xk=function(){function t(n,e,i,r){ue(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=xR++}return de(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=_e(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(g){f.e(g)}finally{f.f()}return{create:function(g){return g.values[l]=o(g),1},update:function(g,m){if(u&&m.docChanged||d&&(m.docChanged||m.selection)||SR(g,h)){var v=o(g);if(c?!Wde(v,g.values[l],s):!s(v,g.values[l]))return g.values[l]=v,1}return 0},reconfigure:function(g,m){var v,y=m.config.address[a];if(null!=y){var b=Ck(m,y);if(r.dependencies.every(function(C){return C instanceof Zt?m.facet(C)===g.facet(C):!(C instanceof Hs)||m.field(C,!1)==g.field(C,!1)})||(c?Wde(v=o(g),b,s):s(v=o(g),b)))return g.values[l]=b,0}else v=o(g);return g.values[l]=v,1}}}}]),t}();function Wde(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,qde.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(xR++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function Z_(t){return function(n){return new Yde(n,t)}}var c0={highest:Z_(0),high:Z_(1),default:Z_(2),low:Z_(3),lowest:Z_(4)},Yde=de(function t(n,e){ue(this,t),this.inner=n,this.prec=e}),Af=function(){function t(){ue(this,t)}return de(t,[{key:"of",value:function(n){return new TR(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),TR=de(function t(n,e){ue(this,t),this.compartment=n,this.inner=e}),Jde=function(){function t(n,e,i,r,o,s){for(ue(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,k,T,j,B,o=[],s=Object.create(null),a=new Map,l=_e((C=n,k=e,T=a,j=[[],[],[],[],[]],B=new Map,function N($,V){var z=B.get($);if(null!=z){if(z<=V)return;var Y=j[z].indexOf($);Y>-1&&j[z].splice(Y,1),$ instanceof TR&&T.delete($.compartment)}if(B.set($,V),Array.isArray($)){var O,H=_e($);try{for(H.s();!(O=H.n()).done;)N(O.value,V)}catch(Z){H.e(Z)}finally{H.f()}}else if($ instanceof TR){if(T.has($.compartment))throw new RangeError("Duplicate use of compartment in extensions");var G=k.get($.compartment)||$.inner;T.set($.compartment,G),N(G,V)}else if($ instanceof Yde)N($.inner,$.prec);else if($ instanceof Hs)j[V].push($),$.provides&&N($.provides,V);else if($ instanceof xk)j[V].push($),$.facet.extensions&&N($.facet.extensions,2);else{var F=$.extension;if(!F)throw new Error("Unrecognized extension value in extension set (".concat($,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));N(F,V)}}(C,2),j.reduce(function($,V){return $.concat(V)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Hs?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=g[p];u[C.id]=h.length<<1,h.push(function(k){return C.slot(k)})},p=0,g=o;p>1;function E(M){for(var U=[],L=0;L>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function Ck(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Kde=Zt.define(),Xde=Zt.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Qde=Zt.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Zde=Zt.define(),ehe=Zt.define(),the=Zt.define(),nhe=Zt.define({combine:function(t){return!!t.length&&t[0]}}),Ef=function(){function t(n,e){ue(this,t),this.type=n,this.value=e}return de(t,null,[{key:"define",value:function(){return new Ert}}]),t}(),Ert=function(){function t(){ue(this,t)}return de(t,[{key:"of",value:function(n){return new Ef(this,n)}}]),t}(),Mrt=function(){function t(n){ue(this,t),this.map=n}return de(t,[{key:"of",value:function(n){return new fi(this,n)}}]),t}(),fi=function(){function t(n,e){ue(this,t),this.type=n,this.value=e}return de(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new Mrt((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=_e(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();fi.reconfigure=fi.define(),fi.appendConfig=fi.define();var Qa=function(){function t(n,e,i,r,o,s){ue(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&Gde(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return de(t,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(n){var e,i=_e(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function Ort(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=ihe(u,DR(l,h,a.changes.newLength),!0))}return u==a?a:Qa.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=_e(c.facet(Zde));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:Ort(u,h))}}catch(b){d.e(b)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=iu.empty(c.doc.length);else{var g=a.changes.filter(u);f=g.changes,p=g.filtered.mapDesc(g.changes).invertedDesc}a=Qa.create(c,f,a.selection&&a.selection.map(p),fi.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var m=c.facet(ehe),v=m.length-1;v>=0;v--){var y=m[v](a);a=y instanceof Qa?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Qa?y[0]:rhe(c,u0(y),!1)}return a}(s):s)}Qa.time=Ef.define(),Qa.userEvent=Ef.define(),Qa.addToHistory=Ef.define(),Qa.remote=Ef.define();var Irt=[];function u0(t){return null==t?Irt:Array.isArray(t)?t:[t]}var AR,io=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(io||(io={})),Nrt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{AR=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var Mr=function(){function t(n,e,i,r,o,s){ue(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return eb(this,i),Ck(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof iu?n:iu.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return or.of(n.split(this.facet(t.lineSeparator)||_R))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(eb(this,e),Ck(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Hs&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(nhe)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=_e(this.facet(Kde));try{for(s.s();!(i=s.n()).done;){var a,c=_e((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function jrt(t){return function(n){if(!/\S/.test(n))return io.Space;if(function(i){if(AR)return AR.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||Nrt.test(o)))return!0}return!1}(n))return io.Word;for(var e=0;e-1)return io.Word;return io.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Aa(i,a,!1);if(s(i.slice(c,a))!=io.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:lt.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Jde.resolve(n.extensions||[],new Map),i=n.doc instanceof or?n.doc:or.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||_R)),r=n.selection?n.selection instanceof lt?n.selection:lt.single(n.selection.anchor,n.selection.head):lt.single(0);return Gde(r,i.length),e.staticFacet(Xde)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function uc(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=_e(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();_g.prototype.startSide=_g.prototype.endSide=0,_g.prototype.point=!1,_g.prototype.mapMode=Ea.TrackDel;var ER=function(){function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.value=i}return de(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function MR(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var Prt=function(){function t(n,e,i,r){ue(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return de(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Hr=function(){function t(n,e,i,r){ue(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return de(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=_e(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(MR)),this.isEmpty)return i.length?t.of(i):this;for(var d=new she(this,null,-1).goto(0),h=0,f=[],p=new bg;d.value||h=0){var g=i[h++];p.addInner(g.from,g.to,g.value)||f.push(g)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return OR.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return OR.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=ohe(s,a,i),c=new tb(s,l,o),u=new tb(a,l,o);i.iterGaps(function(d,h,f){return ahe(c,d,u,h,f,r)}),i.empty&&0==i.length&&ahe(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=ohe(o,s),l=new tb(o,a,0).goto(i),c=new tb(s,a,0).goto(i);;){if(l.to!=c.to||!NR(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new tb(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new bg,o=_e(n instanceof ER?[n]:i?function Rrt(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(MR);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Hr.empty=new Hr([],[],null,-1),Hr.empty.nextLayer=Hr.empty;var bg=function(){function t(){ue(this,t),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return de(t,[{key:"finishChunk",value:function(n){this.chunks.push(new Prt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Hr.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Hr.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function ohe(t,n,e){var i,r=new Map,o=_e(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;ue(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return de(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=_e(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)IR(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=_e(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)IR(this.heap,o);(this.to-n||this.value.endSide-e)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),IR(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new she(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function IR(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var tb=function(){function t(n,e,i){ue(this,t),this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=OR.from(n,e,i)}return de(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){Sk(this.active,n),Sk(this.activeTo,n),Sk(this.activeRank,n),this.minActive=lhe(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Sk(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function ahe(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&NR(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!NR(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function NR(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function lhe(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Aa(t,r)}return!0===i?-1:t.length}for(var che=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),PR=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),uhe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},Mf=function(){function t(n,e){ue(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var g=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(m){return a.map(function(v){return m.replace(/&/,v)})}).reduce(function(m,v){return m.concat(v)}),g,c);else if(g&&"object"==xt(g)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),g,d,f)}else null!=g&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(m){return"-"+m.toLowerCase()})+": "+g+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return de(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=uhe[che]||1;return uhe[che]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[PR]||new Lrt(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),Tk=null,Lrt=function(){function t(n){if(ue(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Tk)return n.adoptedStyleSheets=[Tk.sheet].concat(n.adoptedStyleSheets),n[PR]=Tk;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),Tk=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[PR]=this}return de(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},dhe=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),Frt=typeof navigator<"u"&&/Mac/.test(navigator.platform),$rt=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Brt=Frt||dhe&&+dhe[1]<57,Us=0;Us<10;Us++)Of[48+Us]=Of[96+Us]=String(Us);for(Us=1;Us<=24;Us++)Of[Us+111]="F"+Us;for(Us=65;Us<=90;Us++)Of[Us]=String.fromCharCode(Us+32),ib[Us]=String.fromCharCode(Us);for(var RR in Of)ib.hasOwnProperty(RR)||(ib[RR]=Of[RR]);function Dk(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function d0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function Ak(t,n){if(!n.anchorNode)return!1;try{return d0(t,n.anchorNode)}catch{return!1}}function rb(t){return 3==t.nodeType?f0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Ek(t,n,e,i){return!!e&&(hhe(t,n,e,i,-1)||hhe(t,n,e,i,1))}function Mk(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function hhe(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:ob(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=Mk(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?ob(t):0}}}function ob(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var fhe={left:0,right:0,top:0,bottom:0};function LR(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function Vrt(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var phe,Hrt=function(){function t(){ue(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return de(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),h0=null;function ghe(t){if(t.setActive)return t.setActive();if(h0)return t.focus(h0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==h0?{get preventScroll(){return h0={preventScroll:!0},!0}}:void 0),!h0){h0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=phe||(phe=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function p0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function mhe(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Ml=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ue(this,t),this.node=n,this.offset=e,this.precise=i}return de(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,Mk(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,Mk(n)+1,e)}}]),t}(),FR=[],yo=function(){function t(){ue(this,t),this.parent=null,this.dom=null,this.dirty=2}return de(t,[{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(n){var e,i=this.posAtStart,r=_e(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=_e(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=vhe(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=vhe(i)}else if(1&this.dirty){var u,d=_e(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==ob(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:FR;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function vhe(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}yo.prototype.breakAfter=0;var yhe=function(){function t(n,e,i){ue(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return de(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function _he(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),en={mac:khe||/Mac/.test(Ol.platform),windows:/Win/.test(Ol.platform),linux:/Linux|X11/.test(Ol.platform),ie:Ok,ie_version:whe?$R.documentMode||6:VR?+VR[1]:BR?+BR[1]:0,gecko:xhe,gecko_version:xhe?+(/Firefox\/(\d+)/.exec(Ol.userAgent)||[0,0])[1]:0,chrome:!!HR,chrome_version:HR?+HR[1]:0,ios:khe,android:/Android\b/.test(Ol.userAgent),webkit:Che,safari:She,webkit_version:Che?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=$R.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},sb=function(t){We(e,yo);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).text=i,r}return de(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Ml(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return UR(this.dom,i,r)}}]),e}(),wg=function(t){We(e,yo);var n=qe(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;ue(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=_e(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(Ot(r))}catch(u){l.e(u)}finally{l.f()}return r}return de(e,[{key:"setAttrs",value:function(i){if(mhe(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),gi(Xn(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return Ahe(this,i)}},{key:"coordsAt",value:function(i,r){return Mhe(this,i,r)}}]),e}();function UR(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?en.chrome||en.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return en.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?LR(l,s<0):l||null}var zR=function(t){We(e,yo);var n=qe(e);function e(i,r,o){var s;return ue(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return de(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:LR(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){gi(Xn(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),The=function(t){We(e,zR);var n=qe(e);function e(){return ue(this,e),n.apply(this,arguments)}return de(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?GR(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Ml(s,Math.min(a,s.nodeValue.length))}):new Ml(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?Dhe(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?GR(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return UR(a,l,c)}):UR(a,i,r)}},{key:"destroy",value:function(){var i;gi(Xn(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function GR(t,n,e,i,r,o){if(e instanceof wg){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=yo.get(s);if(!a)return o(t,n);var l=d0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return or.empty}}]),e}();function Ahe(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof wg&&r.length&&(i=r[r.length-1])instanceof wg&&i.mark.eq(n.mark)?Ehe(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function Mhe(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new Ohe(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new ab(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=Ihe(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new ab(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new KR(i)}},{key:"set",value:function(i){return Hr.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();_n.none=Hr.empty;var Ohe=function(t){We(e,_n);var n=qe(e);function e(i){var r;ue(this,e);var o=Ihe(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return de(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&YR(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return gi(Xn(e.prototype),"range",this).call(this,i,r)}}]),e}();Ohe.prototype.point=!1;var KR=function(t){We(e,_n);var n=qe(e);function e(i){return ue(this,e),n.call(this,-2e8,-2e8,null,i)}return de(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&YR(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return gi(Xn(e.prototype),"range",this).call(this,i,r)}}]),e}();KR.prototype.mapMode=Ea.TrackBefore,KR.prototype.point=!0;var ab=function(t){We(e,_n);var n=qe(e);function e(i,r,o,s,a,l){var c;return ue(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Ea.TrackBefore:Ea.TrackAfter:Ea.TrackDel,c}return de(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return gi(Xn(e.prototype),"range",this).call(this,i,r)}}]),e}();function Ihe(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function XR(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}ab.prototype.point=!0;var ru=function(t){We(e,yo);var n=qe(e);function e(){var i;return ue(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return de(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),bhe(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){YR(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){Ehe(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=qR(r,this.attrs||{})),o&&(this.attrs=qR({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return Ahe(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(mhe(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(JR(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),gi(Xn(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&yo.get(s)instanceof wg;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=yo.get(s))||void 0===o?void 0:o.isEditable)||en.ios&&this.children.some(function(l){return l instanceof sb})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=_e(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof sb)||/[^ -~]/.test(s.text))return null;var a=rb(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return Mhe(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return mr.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),QR=function(t){We(e,yo);var n=qe(e);function e(i,r,o){var s;return ue(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return de(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(Ik(new WR(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(Ik(new sb(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof ab){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof ab)if(i.block){var l=i.type;l!=mr.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new QR(i.widget||new Nhe("div"),a,l))}else{var c=zR.create(i.widget||new Nhe("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(Ik(new WR(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(Ik(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Hr.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function Ik(t,n){var e,i=_e(n);try{for(i.s();!(e=i.n()).done;)t=new wg(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var Nhe=function(t){We(e,If);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).tag=i,r}return de(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),jhe=Zt.define(),Phe=Zt.define(),Rhe=Zt.define(),Lhe=Zt.define(),ZR=Zt.define(),Fhe=Zt.define(),$he=Zt.define(),Bhe=Zt.define({combine:function(t){return t.some(function(n){return n})}}),Vhe=Zt.define({combine:function(t){return t.some(function(n){return n})}}),Hhe=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;ue(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return de(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),Uhe=fi.define({map:function(t,n){return t.map(n)}});function Il(t,n,e){var i=t.facet(Lhe);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var Nk=Zt.define({combine:function(t){return!t.length||t[0]}}),Grt=0,lb=Zt.define(),ks=function(){function t(n,e,i,r){ue(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return de(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(Grt++,n,i.eventHandlers,function(a){var l=[lb.of(a)];return s&&l.push(cb.of(function(c){var u=c.plugin(a);return u?s(u):_n.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),eL=function(){function t(n){ue(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return de(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Il(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Il(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Il(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),zhe=Zt.define(),tL=Zt.define(),cb=Zt.define(),Ghe=Zt.define(),Whe=Zt.define(),ub=Zt.define(),g0=function(){function t(n,e,i,r){ue(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return de(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),qhe=function(){function t(n,e,i){ue(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=iu.empty(this.startState.doc.length);var r,o=_e(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new g0(l,c,u,d))}),this.changedRanges=a}return de(t,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some(function(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),ro=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(ro||(ro={})),nL=ro.LTR,Wrt=ro.RTL;function Yhe(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),oo=[];function Zhe(t){return[new m0(0,t,0)]}var efe="";function Xrt(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=m0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Aa(t.text,s,u);if(efe=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return lt.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=_e(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=yo.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=_e(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=_e(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function nfe(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var ife=de(function t(n,e){ue(this,t),this.node=n,this.offset=e,this.pos=-1}),rfe=function(t){We(e,yo);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).view=i,r.compositionDeco=_n.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new ru],r.children[0].setParent(Ot(r)),r.updateDeco(),r.updateInner([new g0(0,0,0,i.state.doc.length)],0),r}return de(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=_n.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=sfe(a);if(!c)return _n.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),g=Math.max(p,l.mapPos(d,-1)),m=a.state,v=3==h.nodeType?h.nodeValue:new tfe([],m).readRange(h.firstChild,null).text;if(g-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=zrt.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,g=h.openStart,m=h.openEnd,v=o.findPos(c,1),y=v.i,b=v.off,C=o.findPos(l,-1);_he(this,C.i,C.off,y,b,f,p,g,m)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(en.gecko&&a.empty&&function Qrt(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Ml(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&Ek(l.node,l.offset,d.anchorNode,d.anchorOffset)&&Ek(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){en.android&&en.chrome&&i.dom.contains(d.focusNode)&&function not(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=Dk(i.view.root);if(h)if(a.empty){if(en.gecko){var f=function eot(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var m=[c,l];l=m[0],c=m[1]}g.setEnd(c.node,c.offset),g.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(g)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Ml(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Ml(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=Dk(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=ru.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||Ak(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=yo.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=mr.WidgetBefore&&a.type!=mr.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==mr.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==ro.LTR,d=0,h=0;hs)break;if(d>=o){var g=f.dom.getBoundingClientRect();if(r.push(g.height),l){var m=f.dom.lastChild,v=m?rb(m):[];if(v.length){var y=v[v.length-1],b=u?y.right-g.left:g.right-y.left;b>c&&(c=b,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?ro.RTL:ro.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=_e(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof ru){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=rb(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new yhe(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(_n.replace({widget:new ofe(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return _n.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(cb).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=_e(this.view.state.facet(Whe).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var g=p.left,m=p.right,v=p.top,y=p.bottom;null!=g&&(c=Math.max(c,g)),null!=m&&(u=Math.max(u,m)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,k,T,j,B,N,$,V){for(var z=C.ownerDocument,Y=z.defaultView||window,O=C;O;)if(1==O.nodeType){var H=void 0,G=O==z.body;if(G)H=Vrt(Y);else{if(O.scrollHeight<=O.clientHeight&&O.scrollWidth<=O.clientWidth){O=O.assignedSlot||O.parentNode;continue}var F=O.getBoundingClientRect();H={left:F.left,right:F.left+O.clientWidth,top:F.top,bottom:F.top+O.clientHeight}}var Z=0,D=0;if("nearest"==B)k.top0&&k.bottom>H.bottom+D&&(D=k.bottom-H.bottom+D+$)):k.bottom>H.bottom&&(D=k.bottom-H.bottom+$,T<0&&k.top-D0&&k.right>H.right+Z&&(Z=k.right-H.right+Z+N)):k.right>H.right&&(Z=k.right-H.right+N,T<0&&k.left0&&e<=0)n=ob(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var tot=function(){function t(){ue(this,t),this.changes=[]}return de(t,[{key:"compareRange",value:function(n,e){XR(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){XR(n,e,this.changes)}}]),t}();function iot(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function rot(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function oL(t,n){return t.topn.top+1}function lfe(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function sL(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=rb(h),p=0;pv||s==v&&o>m){i=h,r=g,o=m,s=v;var y=v?e0?p0)}0==m?e>g.bottom&&(!c||c.bottomg.top)&&(l=h,u=g):c&&oL(c,g)?c=cfe(c,g.bottom):u&&oL(u,g)&&(u=lfe(u,g.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var b=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?ufe(i,b,e):d&&"false"!=i.contentEditable?sL(i,b,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function ufe(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((en.chrome||en.gecko)&&f0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function dfe(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=mr.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:hfe(t,s,r,c,u);var g=t.dom.ownerDocument,m=t.root.elementFromPoint?t.root:g,v=m.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=m.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,b=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(g.caretPositionFromPoint){var C=g.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,b=C.offset)}else if(g.caretRangeFromPoint){var k=g.caretRangeFromPoint(c,u);k&&(b=k.startOffset,(!t.contentDOM.contains(y=k.startContainer)||en.safari&&function oot(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return f0(t,i-1,i).getBoundingClientRect().left>e}(y,b,c)||en.chrome&&function sot(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():f0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,b,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var T=ru.find(t.docView,p);if(!T)return d>r.top+r.height/2?r.to:r.from;var j=sL(T.dom,c,u);y=j.node,b=j.offset}var B=t.docView.nearest(y);if(!B)return null;if(B.isWidget){var N=B.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+jR(s,o,t.state.tabSize)}function ffe(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=Xrt(r,o,s,a,e),u=efe;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=lt.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function aL(t,n,e){for(var i=t.state.facet(Ghe).map(function(a){return a(t)});;){var r,o=!1,s=_e(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?lt.cursor(a,1):lt.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var lot=function(){function t(n){var e=this;ue(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=cs[s];n.contentDOM.addEventListener(s,function(l){mfe(n,l)&&i(a,l)},lL[s]),e.registeredEvents.push(s)};for(var o in cs)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(cs.mousedown,s)}),en.chrome&&102==en.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,en.safari&&n.contentDOM.addEventListener("input",function(){return null})}return de(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=_e(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){mfe(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=_e(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Il(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=_e(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Il(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,p0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(en.safari&&!en.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),pfe=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],cot="dthko",gfe=[16,17,18,20,91,92,224,225];function jk(t){return.7*t+8}var uot=function(){function t(n,e,i,r){ue(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Mr.allowMultipleSelections)&&(a=e,(l=n.state.facet(jhe)).length?l[0](a):en.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(Phe);return l.length?l[0](a):en.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=Dk(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=Tfe(e))&&null}return de(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-jk(o.left-n.clientX):n.clientX>=o.right&&(i=jk(n.clientX-o.right)),n.clientY<=o.top?r=-jk(o.top-n.clientY):n.clientY>=o.bottom&&(r=jk(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.scroll()},50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}},{key:"scroll",value:function(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}},{key:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function mfe(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=yo.get(i))&&e.ignoreEvent(n))return!1;return!0}var cs=Object.create(null),lL=Object.create(null),vfe=en.ie&&en.ie_version<15||en.ios&&en.webkit_version<604;function yfe(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=cL&&i.selection.ranges.every(function(c){return c.empty})&&cL==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:lt.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:lt.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function _fe(t,n,e,i){if(1==i)return lt.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return lt.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,g=f;u<0?p=Aa(h.text,f,!1):g=Aa(h.text,f);for(var m=d(h.text.slice(p,g));p>0;){var v=Aa(h.text,p,!1);if(d(h.text.slice(v,p))!=m)break;p=v}for(;gDate.now()-2e3)){var e,i=null,r=_e(t.state.facet(Rhe));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=xfe(s=t,a=n),c=Tfe(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=xfe(s,d),g=_fe(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var m=_fe(s,l.pos,l.bias,c),v=Math.min(m.from,g.from),y=Math.max(m.to,g.to);g=v1&&u.ranges.some(function(b){return b.eq(g)})?function(b,C){for(var k=0;;k++)if(b.ranges[k].eq(C))return lt.create(b.ranges.slice(0,k).concat(b.ranges.slice(k+1)),b.mainIndex==k?0:b.mainIndex-(b.mainIndex>k?1:0))}(u,g):f?u.addRange(g):lt.create([g])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new uot(t,n,i,o)),o&&t.observer.ignore(function(){return ghe(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var bfe=function(t,n){return t>=n.top&&t<=n.bottom},wfe=function(t,n,e){return bfe(n,e)&&t>=e.left&&t<=e.right};function dot(t,n,e,i){var r=ru.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&wfe(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&wfe(e,i,a)?1:s&&bfe(i,s)?-1:1}function xfe(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:dot(t,e,n.clientX,n.clientY)}}var hot=en.ie&&en.ie_version<=11,Cfe=null,Sfe=0,kfe=0;function Tfe(t){if(!hot)return t.detail;var n=Cfe,e=kfe;return Cfe=t,kfe=Date.now(),Sfe=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(Sfe+1)%3:1}function Dfe(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}cs.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},cs.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&Dfe(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;ag&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),g=y.number}}catch(b){m.e(b)}finally{m.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){cL=o?i:null;var s=vfe?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var Afe=Ef.define();function Efe(t,n){var e,i=[],r=_e(t.facet($he));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:Afe.of(!0)}):null}function Mfe(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=Efe(t.state,n);e?t.dispatch(e):t.update([])}},10)}cs.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Mfe(t)},cs.blur=function(t){t.observer.clearSelectionRange(),Mfe(t)},cs.compositionstart=cs.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},cs.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,en.chrome&&en.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},cs.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},cs.beforeinput=function(t,n){var e,i;if(en.chrome&&en.android&&(i=pfe.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var Ofe=["pre-wrap","normal","pre-line","break-spaces"],fot=function(){function t(n){ue(this,t),this.lineWrapping=n,this.doc=or.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return de(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return Ofe.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;ue(this,t),this.length=n,this.height=e,this.flags=i}return de(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Ur.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Ur.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),hd=function(t){We(e,Ife);var n=qe(e);function e(i,r){var o;return ue(this,e),(o=n.call(this,i,r,mr.Text)).collapsed=0,o.widgetHeight=0,o}return de(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof v0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof v0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):ou.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),v0=function(t){We(e,ou);var n=qe(e);function e(i){return ue(this,e),n.call(this,i,0)}return de(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,g=Math.max(o,i-p/2);return new xg(f.from,f.length,g,p,mr.Text)}var m=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+m);return new xg(v.from,v.length,o+u*m,u,mr.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Ur.ByHeight)return this.blockAt(i,o,s,a);if(r==Ur.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new xg(c,l.to-c,0,0,mr.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,g=o.doc.lineAt(i),m=f+g.length*p,v=g.number-h;return new xg(g.from,g.length,Math.max(s,Math.min(s+f*v+p*(g.from-a-v),s+this.height-m)),m,mr.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var g=o.doc.lineAt(f);if(f==i){var m=g.number-u;p+=d*m+h*(i-a-m)}var v=d+h*g.length;l(new xg(g.from,g.length,p,v,mr.Text)),p+=v,f=g.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return ou.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new hd(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=ou.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),got=function(t){We(e,ou);var n=qe(e);function e(i,r,o){var s;return ue(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return de(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Ur.ByPosNoHeight?Ur.ByPosNoHeight:Ur.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Ur.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=_e(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&Nfe(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?ou.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function Nfe(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof v0&&(i=t[n+1])instanceof v0&&t.splice(n-1,3,new v0(e.length+1+i.length))}var mot=function(){function t(n,e){ue(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return de(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof hd?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new hd(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new hd(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new v0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof hd)return n;var e=new hd(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=mr.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=mr.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof hd||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function bot(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var uL=function(){function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.size=i}return de(t,[{key:"draw",value:function(n){return _n.replace({widget:new wot(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new Pk(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?Pfe:new Cot(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:db(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(cb).filter(function(c){return"function"!=typeof c});var o=g0.extendWithRanges(n.changedRanges,function vot(t,n,e){var i=new yot;return Hr.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:iu.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(Vhe)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?ro.RTL:ro.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?bot:_ot)(e,this.paddingTop),p=f.top-this.pixelViewport.top,g=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var b=n.docView.measureTextSize(),C=b.lineHeight,k=b.charWidth;(s=C>0&&r.refresh(o,C,k,v/k,y))&&(n.docView.minWidth=0,c|=8)}p>0&&g>0?u=Math.max(p,g):p<0&&g<0&&(u=Math.min(p,g)),r.heightChanged=!1;var T,j=_e(this.viewports);try{for(j.s();!(T=j.n()).done;){var B=T.value,N=B.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(B);this.heightMap=(s?ou.empty().applyChanges(this.stateDeco,or.empty,this.heightOracle,[new g0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new pot(B.from,N))}}catch(V){j.e(V)}finally{j.f()}r.heightChanged&&(c|=2)}var $=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return $&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||$)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),c}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new Pk(r.lineAt(this.visibleTop-1e3*i,Ur.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Ur.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Ur.ByPos,o,0,0);l=new Pk(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Ur.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Ur.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=ro.LTR&&!r)return[];var l,c=[],u=function z(Y,O,H,G){if(!(O-YY&&M=H.from&&X.to<=H.to&&Math.abs(X.from-Y)ne})});if(!U){if(O=O})){var L=e.moveToLineBoundary(lt.cursor(O),!1,!0).head;L>Y&&(O=L)}U=new uL(Y,O,i.gapSize(H,Y,O,G))}c.push(U)}},d=_e(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,g,h,f),m=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||db(this.heightMap.lineAt(n,Ur.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return db(this.heightMap.lineAt(this.scaler.fromDOM(n),Ur.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return db(this.heightMap.blockAt(this.scaler.fromDOM(n),this.heightOracle,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),t}(),Pk=de(function t(n,e){ue(this,t),this.from=n,this.to=e});function xot(t,n,e){var i=[],r=t,o=0;return Hr.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function Lk(t,n){var e,i=0,r=_e(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var Pfe={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},Cot=function(){function t(n,e,i){ue(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Ur.ByPos,n,0,0).top,p=e.lineAt(h,Ur.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=_e(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return de(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),hL=Mf.newName(),Rfe=Mf.newName(),Lfe=Mf.newName(),Ffe={"&light":"."+Rfe,"&dark":"."+Lfe};function fL(t,n,e){return new Mf(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var Sot=fL("."+hL,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Ffe),kot=de(function t(n,e,i,r){ue(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var g=f.observer.selectionRange,m=g.anchorNode,v=g.anchorOffset,y=g.focusNode,b=g.focusOffset;return m&&(p.push(new ife(m,v)),y==m&&b==v||p.push(new ife(y,b))),p}(n),c=new tfe(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var g=f[0].pos,m=2==f.length?f[1].pos:g;return g>-1&&m>-1?lt.single(g+p,m+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!d0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!d0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=lt.single(h,d)}});function $fe(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||en.android&&n.text.length0&&G>0&&N.charCodeAt(H-1)==$.charCodeAt(G-1);)H--,G--;return"end"==z&&(V-=H+Math.max(0,O-Math.min(H,G))-O),H=H?O-V:0)+(G-H),H=O):G=G?O-V:0)+(H-G),G=O),{from:O,toA:H,toB:G}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(en.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:or.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(Nk)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(en.mac||en.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=lt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:or.of([" "])}):en.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=lt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:or.of([" "])}),e){var d=t.state;if(en.ios&&t.inputState.flushIOSKey(t)||en.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&p0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&p0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&p0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(Fhe).some(function(N){return N(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+g))}else{var m=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=m.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),b=sfe(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,k=r.to-r.from;h=d.changeByRange(function(N){if(N.from==r.from&&N.to==r.to)return{changes:m,range:v||N.map(m)};var $=N.to-C,V=$-y.length;if(N.to-N.from!=k||t.state.sliceDoc(V,$)!=y||b&&N.to>=b.from&&N.from<=b.to)return{range:N};var z=d.changes({from:V,to:$,insert:e.insert}),Y=N.to-r.to;return{changes:z,range:v?lt.range(Math.max(0,v.anchor+Y),Math.max(0,v.head+Y)):N.map(z)}})}else h={changes:m,selection:v&&d.selection.replaceRange(v)}}var T="input.type";return t.composing&&(T+=".compose",t.inputState.compositionFirstChange&&(T+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:T}),!0}if(i&&!i.main.eq(r)){var j=!1,B="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(j=!0),B=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:j,userEvent:B}),!0}return!1}var Tot={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},pL=en.ie&&en.ie_version<=11,Dot=function(){function t(n){var e=this;ue(this,t),this.view=n,this.active=!1,this.selectionRange=new Hrt,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=_e(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(en.ie&&en.ie_version<=11||en.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),pL&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(function(){var i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return de(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=_e(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(Nk)?i.root.activeElement==this.dom:Ak(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(en.ie&&en.ie_version<=11||en.android&&en.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Ek(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=en.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(Ek(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||Dk(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=Ak(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=_e(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=_e(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&Ak(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new kot(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=$fe(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=Bfe(e,n.previousSibling||n.target.previousSibling,-1),r=Bfe(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=_e(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function Bfe(t,n,e){for(;n;){var i=yo.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Yt=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ue(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function Urt(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new jfe(e.state||Mr.create(e)),this.plugins=this.state.facet(lb).map(function(s){return new eL(s)});var i,r=_e(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new Dot(this),this.inputState=new lot(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new rfe(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return de(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Qa?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=_e(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(N){l.e(N)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(N){return N.annotation(Afe)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=Efe(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(Mr.phrases)!=this.state.facet(Mr.phrases))return this.setState(a);(i=qhe.create(this,a,n)).flags|=d;var g=this.viewState.scrollTarget;try{this.updateState=2;var m,v=_e(n);try{for(v.s();!(m=v.n()).done;){var y=m.value;if(g&&(g=g.map(y.changes)),y.scrollIntoView){var b=y.state.selection.main;g=new Hhe(b.empty?b:lt.cursor(b.head,b.head>b.anchor?-1:1))}var C,k=_e(y.effects);try{for(k.s();!(C=k.n()).done;){var T=C.value;T.is(Uhe)&&(g=T.value)}}catch(N){k.e(N)}finally{k.f()}}}catch(N){v.e(N)}finally{v.f()}this.viewState.update(i,g),this.bidiCache=Hfe.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(ub)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(N){return N.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(Fk)!=i.state.facet(Fk)&&(this.viewState.mustMeasureContent=!0),(o||s||g||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var j,B=_e(this.state.facet(ZR));try{for(B.s();!(j=B.n()).done;)(0,j.value)(i)}catch(N){B.e(N)}finally{B.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!$fe(e,p)&&f.force&&p0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=_e(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new jfe(n),this.plugins=n.facet(lb).map(function(a){return new eL(a)}),this.pluginMap.clear();var o,s=_e(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new rfe(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(lb),i=n.state.facet(lb);if(e!=i){var r,o=[],s=_e(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new eL(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(m){s.e(m)}finally{s.f()}var u,d=_e(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(m){d.e(m)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=_e(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(m){p.e(m)}finally{p.f()}}for(var g=0;g0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var f=[];if(!(4&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var g=f.map(function(N){try{return N.read(n)}catch($){return Il(n.state,$),Vfe}}),m=qhe.create(this,this.state,[]),v=!1,y=!1;m.flags|=h,i?i.flags|=h:i=m,this.updateState=2,m.empty||(this.updatePlugins(m),this.inputState.update(m),this.updateAttrs(),v=this.docView.update(m));for(var b=0;b1||k<-1)&&(this.scrollDOM.scrollTop+=k,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var T,j=_e(this.state.facet(ZR));try{for(j.s();!(T=j.n()).done;)(0,T.value)(i)}catch(N){j.e(N)}finally{j.f()}}}}},{key:"themeClasses",get:function(){return hL+" "+(this.state.facet(dL)?Lfe:Rfe)+" "+this.state.facet(Fk)}},{key:"updateAttrs",value:function(){var n=this,e=Ufe(this,zhe,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Nk)?"true":"false",class:"cm-content",style:"".concat(en.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),Ufe(this,tL,i);var r=this.observer.ignore(function(){var o=JR(n.contentDOM,n.contentAttrs,i),s=JR(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=_e(n);try{for(r.s();!(e=r.n()).done;){var o,s=_e(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(ub),Mf.mount(this.root,this.styleModules.concat(Sot).reverse())}},{key:"readMeasured",value:function(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}},{key:"requestMeasure",value:function(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==ro.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return lt.cursor(l,e?-1:1)}var c=ru.find(t.docView,n.head);return lt.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return aL(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return lt.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var g=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-g.from))),u=(c<0?g.top:g.bottom)+p}for(var m=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var b=u+(v+y)*c,C=dfe(r,{x:m,y:b},!1,c);if(bh.bottom||(c<0?Cl))return lt.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),dfe(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return LR(i,o[m0.find(o,n-r.from,-1,e)].dir==ro.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(Bhe)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>Aot)return Zhe(n.length);var e,i=this.textDirectionAt(n.from),r=_e(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==nL?1:2,d=l==nL?2:1;if(!a||1==u&&!Krt.test(a))return Zhe(c);for(var h=0,f=u,p=u;h=0;Y-=3)if(dd[Y+1]==-B){var O=dd[Y+2],H=2&O?u:4&O?1&O?d:u:0;H&&(oo[$]=oo[dd[Y]]=H),V=Y;break}}else{if(189==dd.length)break;dd[V++]=$,dd[V++]=j,dd[V++]=z}else if(2==(N=oo[$])||1==N){var G=N==u;z=G?0:1;for(var F=V-3;F>=0;F-=3){var Z=dd[F+2];if(2&Z)break;if(G)dd[F+2]|=2;else{if(4&Z)break;dd[F+2]|=4}}}for(var D=0;Dge;){for(var be=De,Ie=2!=oo[--De];De>ge&&Ie==(2!=oo[De-1]);)De--;X.push(new m0(De,be,Ie?2:1))}else X.push(new m0(ge,ne,0))}else for(var R=0;RDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){ghe(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=_e(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Uhe.of(new Hhe("number"==typeof n?lt.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return ks.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=Mf.newName(),r=[Fk.of(i),ub.of(fL(".".concat(i),n))];return e&&e.dark&&r.push(dL.of(!0)),r}},{key:"baseTheme",value:function(n){return c0.lowest(ub.of(fL("."+hL,n,Ffe)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&yo.get(i)||yo.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Yt.styleModule=ub,Yt.inputHandler=Fhe,Yt.focusChangeEffect=$he,Yt.perLineTextDirection=Bhe,Yt.exceptionSink=Lhe,Yt.updateListener=ZR,Yt.editable=Nk,Yt.mouseSelectionStyle=Rhe,Yt.dragMovesSelection=Phe,Yt.clickAddsSelectionRange=jhe,Yt.decorations=cb,Yt.atomicRanges=Ghe,Yt.scrollMargins=Whe,Yt.darkTheme=dL,Yt.contentAttributes=tL,Yt.editorAttributes=zhe,Yt.lineWrapping=Yt.contentAttributes.of({class:"cm-lineWrapping"}),Yt.announce=fi.define();var Aot=4096,Vfe={},Hfe=function(){function t(n,e,i,r){ue(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return de(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:ro.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&qR(s,e)}return e}var Eot=en.mac?"mac":en.windows?"win":en.linux?"linux":"key";function $k(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var Oot=c0.default(Yt.domEventHandlers({keydown:function(t,n){return Wfe(Gfe(n.state),t,n,"editor")}})),Bk=Zt.define({enables:Oot}),zfe=new WeakMap;function Gfe(t){var n=t.facet(Bk),e=zfe.get(n);return e||zfe.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Eot,s=Object.create(null),a=Object.create(null),l=function(T,j){var B=a[T];if(null==B)a[T]=j;else if(B!=j)throw new Error("Key binding "+T+" is used both as a regular binding and as a multi-stroke prefix")},c=function(T,j,B,N){for(var $,V,z=s[T]||(s[T]=Object.create(null)),Y=j.split(/ (?!$)/).map(function(Z){return function Mot(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==ro.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=qfe(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=Jfe(t,i),f=Jfe(t,r),p=h.type==mr.Text?h:null,g=f.type==mr.Text?f:null;if(t.lineWrapping&&(p&&(p=Yfe(t,i,p)),g&&(g=Yfe(t,r,g))),p&&g&&p.from==g.from)return C(k(e.from,e.to,p));var m=p?k(e.from,null,p):T(h,!1),v=g?k(null,e.to,g):T(f,!0),y=[];return(p||h).to<(g||f).from-1?y.push(b(u,m.bottom,d,v.top)):m.bottomH&&Z.from=E)break;ge>D&&Y(Math.max(ne,D),null==j&&ne<=H,Math.min(ge,E),null==B&&ge>=G,X.dir)}}catch(ae){L.e(ae)}finally{L.f()}if((D=U.to+1)>=E)break}}}catch(ae){F.e(ae)}finally{F.f()}return 0==z.length&&Y(H,null==j,G,null==B,t.textDirection),{top:$,bottom:V,horizontal:z}}function T(j,B){var N=a.top+(B?j.top:j.bottom);return{top:N,bottom:N,horizontal:[]}}}(n,e,i)}}]),t}();function qfe(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ro.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function Yfe(t,n,e){var i=lt.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:mr.Text}}function Jfe(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=_e(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==mr.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var Not=function(){function t(n,e){ue(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return de(t,[{key:"update",value:function(n){n.startState.facet(Vk)!=n.state.facet(Vk)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(Vk);e0&&void 0!==arguments[0]?arguments[0]:{}),Pot,Rot,Lot,Vhe.of(!0)]}function Qfe(t){return t.startState.facet(hb)!=t.state.facet(hb)}var Pot=Kfe({above:!0,markers:function(t){var n,e=t.state,i=e.facet(hb),r=[],o=_e(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||Xfe:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:lt.cursor(s.head,s.head>s.anchor?-1:1),d=_e(gL.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Qfe(t);return e&&Zfe(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Zfe(n.state,t)},class:"cm-cursorLayer"});function Zfe(t,n){n.style.animationDuration=t.facet(hb).cursorBlinkRate+"ms"}var Rot=Kfe({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:gL.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Qfe(t)},class:"cm-selectionLayer"}),epe={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Xfe&&(epe[".cm-line"].caretColor="transparent !important");var Lot=c0.highest(Yt.theme(epe)),tpe=fi.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),fb=Hs.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(tpe)?i.value:e},t)}}),Fot=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return de(t,[{key:"update",value:function(n){var e,i=n.state.field(fb);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(fb)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(fb),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(fb)!=n&&this.view.dispatch({effects:tpe.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function npe(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var $ot=function(){function t(n){ue(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return de(t,[{key:"createDeco",value:function(n){var e,i=this,r=new bg,o=r.add.bind(r),s=_e(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],g=_e(h);try{for(g.s();!(f=g.n()).done;){var m=f.value,v=m.from,y=m.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(b){g.e(b)}finally{g.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;npe(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=_e(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:g})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),mL=null!=/x/.unicode?"gu":"g",Bot=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",mL),Vot={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},vL=null,Hk=Zt.define({combine:function(t){var n=uc(t,{render:null,specialChars:Bot,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==vL&&typeof document<"u"&&document.body){var i=document.body.style;vL=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return vL||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,mL)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,mL)),n}});function Hot(){return[Hk.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ipe||(ipe=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.decorations=_n.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Hk)),this.decorations=this.decorator.createDeco(n)}return de(t,[{key:"makeDecorator",value:function(n){var e=this;return new $ot({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=Vs(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=nb(l.text,c,o-l.from);return _n.replace({widget:new Got((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=_n.replace({widget:new zot(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(Hk);n.startState.facet(Hk)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var ipe=null,zot=function(t){We(e,If);var n=qe(e);function e(i,r){var o;return ue(this,e),(o=n.call(this)).options=i,o.code=r,o}return de(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+(Vot[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),Got=function(t){We(e,If);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).width=i,r}return de(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),Wot=_n.line({class:"cm-activeLine"}),qot=ks.fromClass(function(){function t(n){ue(this,t),this.decorations=this.getDeco(n)}return de(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=_e(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(Wot.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return _n.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function rpe(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):nb(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function Jot(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Yt.mouseSelectionStyle.of(function(e,i){return n(i)?function Yot(t,n){var e=rpe(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=rpe(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var g=Math.min(u.off,d.off),m=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=m&&p.push(lt.range(y.from+g,y.to+m))}else for(var b=Math.min(u.col,d.col),C=Math.max(u.col,d.col),k=h;k<=f;k++){var T=c.doc.line(k),j=jR(T.text,b,c.tabSize,!0);if(j<0)p.push(lt.cursor(T.to));else{var B=jR(T.text,C,c.tabSize);p.push(lt.range(T.from+j,T.from+B))}}return p}(t.state,e,a);return l.length?lt.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var Kot={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},Xot={style:"cursor: crosshair"};function Qot(){var n=Wt(Kot[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=ks.fromClass(function(){function o(s){ue(this,o),this.view=s,this.isDown=!1}return de(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Yt.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?Xot:null})]}var ope=function(){function t(n,e,i){ue(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return de(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=_e(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return de(t,[{key:"createContainer",value:function(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var n,e=_e(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(yL);if(r.position!=this.position){this.position=r.position;var o,s=_e(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=_e(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=_e(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(yL).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,g=null!==(e=spe.get(l))&&void 0!==e?e:d.bottom-d.top,m=l.offset||tst,v=this.view.textDirection==ro.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+m.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-m.x),b=!!a.above;!a.strictSide&&(b?u.top-(d.bottom-d.top)-m.yr.bottom)&&b==r.bottom-u.bottom>u.top-r.top&&(b=!b);var C=(b?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&N.topk&&(k=b?N.top-g-2-f:N.bottom+f+2)}}catch($){B.e($)}finally{B.f()}}"absolute"==this.position?(c.style.top=k-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=k+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?m.x:-m.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:k,right:T,bottom:k+g}),c.classList.toggle("cm-tooltip-above",b),c.classList.toggle("cm-tooltip-below",!b),l.positioned&&l.positioned(n.space)}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var n,e=_e(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),est=Yt.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),tst={x:0,y:0},Uk=Zt.define({enables:[ape,est]}),zk=Zt.define(),nst=function(){function t(n){var e=this;ue(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ope(n,zk,function(i){return e.createHostedView(i)})}return de(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=_e(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=_e(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),ist=Uk.compute([zk],function(t){var n=t.facet(zk).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,sn(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,sn(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:nst.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),rst=function(){function t(n,e,i,r,o){ue(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return de(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==ro.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=fi.define(),i=Hs.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Ea.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=_e(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(ast)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return zk.from(r)}});return[i,ks.define(function(r){return new rst(r,t,i,e,n.hoverTime||300)}),ist]}var ast=fi.define(),cpe=Zt.define({combine:function(t){var n,e,i,r=_e(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function pb(t,n){var e=t.plugin(upe),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var upe=ks.fromClass(function(){function t(n){ue(this,t),this.input=n.state.facet(gb),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(cpe);this.top=new Gk(n,!0,e.topContainer),this.bottom=new Gk(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=_e(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return de(t,[{key:"update",value:function(n){var e=n.state.facet(cpe);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Gk(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Gk(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(gb);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=_e(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,g=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),mpe=function(){function t(n,e){var i=this;ue(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=ppe(e.markers(n)),e.initialSpacer&&(this.spacer=new vpe(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return de(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=ppe(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Hr.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=_e(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),vpe=function(){function t(n,e,i,r){ue(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return de(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),fpe(),hst]}function ype(t){for(var n=9;ni&&(i=s,e.push(pst.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Hr.of(e)}),mst=0,xL=de(function t(n,e){ue(this,t),this.from=n,this.to=e}),vi=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ue(this,t),this.id=mst++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return de(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=dc.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();vi.closedBy=new vi({deserialize:function(t){return t.split(" ")}}),vi.openedBy=new vi({deserialize:function(t){return t.split(" ")}}),vi.group=new vi({deserialize:function(t){return t.split(" ")}}),vi.contextHash=new vi({perNode:!0}),vi.lookAhead=new vi({perNode:!0}),vi.mounted=new vi({perNode:!0});var vst=Object.create(null),dc=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;ue(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return de(t,[{key:"prop",value:function(n){return this.props[n.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(vi.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):vst,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=_e(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=_e(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(vi.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();dc.none=new dc("",Object.create(null),0,8);var zs,yst=function(){function t(n){ue(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=qk.get(this)||this.topNode,r=new Kk(i);return r.moveTo(n,e),qk.set(this,r._tree),r}},{key:"topNode",get:function(){return new yb(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=_0(qk.get(this)||this.topNode,n,e,!1);return qk.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=_0(_pe.get(this)||this.topNode,n,e,!0);return _pe.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|zs.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:kL(dc.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(dc.none,i,r,o)})}}],[{key:"build",value:function(n){return function wst(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new _st(e,e.length):e,d=i.types,h=0,f=0;function p(k,T,j,B,N){for(var $=u.id,V=u.start,z=u.end,Y=u.size,O=f;Y<0;){if(u.next(),-1==Y)return j.push(a[$]),void B.push(V-k);if(-3==Y)return void(h=$);if(-4==Y)return void(f=$);throw new RangeError("Unrecognized record size: ".concat(Y))}var G,F,Ie,Z=d[$],D=V-k;if(z-V<=o&&(F=function(Ie,R){var J=u.fork(),K=0,pe=0,Te=0,ye=J.end-o,Ue={size:0,start:0,skip:0};e:for(var Je=J.pos-Ie;J.pos>Je;){var _t=J.size;if(J.id==R&&_t>=0)Ue.size=K,Ue.start=pe,Ue.skip=Te,Te+=4,K+=4,J.next();else{var zt=J.pos-_t;if(_t<0||zt=c?4:0,Nn=J.start;for(J.next();J.pos>zt;){if(J.size<0){if(-3!=J.size)break e;ct+=4}else J.id>=c&&(ct+=4);J.next()}pe=Nn,K+=_t,Te+=ct}}return(R<0||K==Ie)&&(Ue.size=K,Ue.start=pe,Ue.skip=Te),Ue.size>4?Ue:void 0}(u.pos-T,N))){for(var E=new Uint16Array(F.size-F.skip),M=u.pos-F.size,U=E.length;u.pos>M;)U=v(F.start,E,U);G=new vb(E,z-F.start,i),D=F.start-k}else{var L=u.pos-Y;u.next();for(var X=[],ne=[],ge=$>=c?$:-1,ae=0,De=z;u.pos>L;)ge>=0&&u.id==ge&&u.size>=0?(u.end<=De-o&&(g(X,ne,V,ae,u.end,De,ge,O),ae=X.length,De=u.end),u.next()):p(V,L,X,ne,ge);if(ge>=0&&ae>0&&ae-1&&ae>0){var be=(Ie=Z,function(R,J,K){var pe,Te,ye=0,Ue=R.length-1;if(Ue>=0&&(pe=R[Ue])instanceof Gs){if(!Ue&&pe.type==Ie&&pe.length==K)return pe;(Te=pe.prop(vi.lookAhead))&&(ye=J[Ue]+pe.length+Te)}return m(Ie,R,J,K,ye)});G=kL(Z,X,ne,0,X.length,0,z-V,be,be)}else G=m(Z,X,ne,z-V,O-z)}j.push(G),B.push(D)}function g(k,T,j,B,N,$,V,z){for(var Y=[],O=[];k.length>B;)Y.push(k.pop()),O.push(T.pop()+j-N);k.push(m(i.types[V],Y,O,$-N,z-$)),T.push(N-j)}function m(k,T,j,B){var N=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,$=arguments.length>5?arguments[5]:void 0;if(h){var V=[vi.contextHash,h];$=$?[V].concat($):[V]}if(N>25){var z=[vi.lookAhead,N];$=$?[z].concat($):[z]}return new Gs(k,T,j,B,$)}function v(k,T,j){var B=u.id,N=u.start,$=u.end,V=u.size;if(u.next(),V>=0&&B4)for(var Y=u.pos-(V-4);u.pos>Y;)j=v(k,T,j);T[--j]=z,T[--j]=$-k,T[--j]=N-k,T[--j]=B}else-3==V?h=B:-4==V&&(f=B);return j}for(var y=[],b=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,b,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?b[0]+y[0].length:0;return new Gs(d[t.topID],y.reverse(),b.reverse(),C)}(n)}}]),t}();Gs.empty=new Gs(dc.none,[],[],0);var _st=function(){function t(n,e){ue(this,t),this.buffer=n,this.index=e}return de(t,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new t(this.buffer,this.index)}}]),t}(),vb=function(){function t(n,e,i){ue(this,t),this.buffer=n,this.length=e,this.set=i}return de(t,[{key:"type",get:function(){return dc.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function wpe(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function _0(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(bpe(r,i,h,h+d.length))if(d instanceof vb){if(o&zs.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new CL(new bst(s,d,n,h),null,f)}else if(o&zs.IncludeAnonymous||!d.type.isAnonymous||SL(d)){var p=void 0;if(!(o&zs.IgnoreMounts)&&d.props&&(p=d.prop(vi.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var g=new t(d,h,n,s);return o&zs.IncludeAnonymous||!g.type.isAnonymous?g:g.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&zs.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._parent)))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this._tree.children.length-1,-1,0,4)}},{key:"childAfter",value:function(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&zs.IgnoreOverlays)&&(i=this._tree.prop(vi.mounted))&&i.overlay){var o,s=n-this.from,a=_e(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new Kk(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return wpe(this,n)}},{key:"getChild",value:function(n){var r=Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return Jk(this,n)}}]),t}();function Yk(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function Jk(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var bst=de(function t(n,e,i,r){ue(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),CL=function(){function t(n,e,i){ue(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return de(t,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&zs.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);return o<0?null:new t(this.context,this,o)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new Kk(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Gs(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return _0(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return wpe(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return Yk(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return Jk(this,n)}}]),t}(),Kk=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(ue(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof yb)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return de(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof yb?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&zs.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&zs.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&zs.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&zs.IncludeAnonymous||u instanceof vb||!u.type.isAnonymous||SL(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return Jk(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function SL(t){return t.children.some(function(n){return n instanceof vb||!n.type.isAnonymous||SL(n)})}var xpe=new WeakMap;function Xk(t,n){if(!t.isAnonymous||n instanceof vb||n.type!=t)return 1;var e=xpe.get(n);if(null==e){e=1;var i,r=_e(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Gs)){e=1;break}e+=Xk(t,o)}}catch(s){r.e(s)}finally{r.f()}xpe.set(n,e)}return e}function kL(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;j+=B}if(C==k+1){if(j>d){var N=g[k];p(N.children,N.positions,0,N.children.length,m[k]+b);continue}h.push(g[k])}else h.push(kL(t,g,m,k,C,T,m[C-1]+g[C-1].length-T,null,l));f.push(T+b-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var Qk=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];ue(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return de(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=_e(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:Spe.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),Sst=0,Spe=function(){function t(){ue(this,t),this.instances=[],this.id=Sst++}return de(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(g){return g.base==n&&(m=e).length==(v=g.modified).length&&m.every(function(y,b){return y==v[b]});var m,v});if(i)return i;var r,o=[],s=new jf(o,n,e),a=_e(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(g){a.e(g)}finally{a.f()}var l,c=kpe(e),u=_e(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=_e(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(g){f.e(g)}finally{f.f()}}}catch(g){u.e(g)}finally{u.f()}return s}}]),t}();function kpe(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var g=new kst(i,l,f>0?a.slice(0,f):null);n[p]=g.sort(n[p])}}}catch(m){o.e(m)}finally{o.f()}}return Dpe.add(n)}var Dpe=new vi,kst=function(){function t(n,e,i,r){ue(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return de(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new Ast(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var TL,Ast=function(){function t(n,e,i){ue(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return de(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function(j){return!j.scope||j.scope(s)}));for(var c=r,u=s.prop(Dpe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=Tst(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(vi.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),g=this.highlighters.filter(function(j){return!j.scope||j.scope(f.tree.type)}),m=n.firstChild(),v=0,y=a;;v++){var b=v=C)&&n.nextSibling()););if(!b||C>i)break;(y=b.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,b.from+a),Math.min(i,y),r,g),this.startSpan(y,c))}m&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),St=jf.define,Zk=St(),Pf=St(),Epe=St(Pf),Mpe=St(Pf),Rf=St(),eT=St(Rf),DL=St(Rf),pd=St(),Cg=St(pd),gd=St(),md=St(),AL=St(),_b=St(AL),tT=St(),yt={comment:Zk,lineComment:St(Zk),blockComment:St(Zk),docComment:St(Zk),name:Pf,variableName:St(Pf),typeName:Epe,tagName:St(Epe),propertyName:Mpe,attributeName:St(Mpe),className:St(Pf),labelName:St(Pf),namespace:St(Pf),macroName:St(Pf),literal:Rf,string:eT,docString:St(eT),character:St(eT),attributeValue:St(eT),number:DL,integer:St(DL),float:St(DL),bool:St(Rf),regexp:St(Rf),escape:St(Rf),color:St(Rf),url:St(Rf),keyword:gd,self:St(gd),null:St(gd),atom:St(gd),unit:St(gd),modifier:St(gd),operatorKeyword:St(gd),controlKeyword:St(gd),definitionKeyword:St(gd),moduleKeyword:St(gd),operator:md,derefOperator:St(md),arithmeticOperator:St(md),logicOperator:St(md),bitwiseOperator:St(md),compareOperator:St(md),updateOperator:St(md),definitionOperator:St(md),typeOperator:St(md),controlOperator:St(md),punctuation:AL,separator:St(AL),bracket:_b,angleBracket:St(_b),squareBracket:St(_b),paren:St(_b),brace:St(_b),content:pd,heading:Cg,heading1:St(Cg),heading2:St(Cg),heading3:St(Cg),heading4:St(Cg),heading5:St(Cg),heading6:St(Cg),contentSeparator:St(pd),list:St(pd),quote:St(pd),emphasis:St(pd),strong:St(pd),link:St(pd),monospace:St(pd),strikethrough:St(pd),inserted:St(),deleted:St(),changed:St(),invalid:St(),meta:tT,documentMeta:St(tT),annotation:St(tT),processingInstruction:St(tT),definition:jf.defineModifier(),constant:jf.defineModifier(),function:jf.defineModifier(),standard:jf.defineModifier(),local:jf.defineModifier(),special:jf.defineModifier()};Ape([{tag:yt.link,class:"tok-link"},{tag:yt.heading,class:"tok-heading"},{tag:yt.emphasis,class:"tok-emphasis"},{tag:yt.strong,class:"tok-strong"},{tag:yt.keyword,class:"tok-keyword"},{tag:yt.atom,class:"tok-atom"},{tag:yt.bool,class:"tok-bool"},{tag:yt.url,class:"tok-url"},{tag:yt.labelName,class:"tok-labelName"},{tag:yt.inserted,class:"tok-inserted"},{tag:yt.deleted,class:"tok-deleted"},{tag:yt.literal,class:"tok-literal"},{tag:yt.string,class:"tok-string"},{tag:yt.number,class:"tok-number"},{tag:[yt.regexp,yt.escape,yt.special(yt.string)],class:"tok-string2"},{tag:yt.variableName,class:"tok-variableName"},{tag:yt.local(yt.variableName),class:"tok-variableName tok-local"},{tag:yt.definition(yt.variableName),class:"tok-variableName tok-definition"},{tag:yt.special(yt.variableName),class:"tok-variableName2"},{tag:yt.definition(yt.propertyName),class:"tok-propertyName tok-definition"},{tag:yt.typeName,class:"tok-typeName"},{tag:yt.namespace,class:"tok-namespace"},{tag:yt.className,class:"tok-className"},{tag:yt.macroName,class:"tok-macroName"},{tag:yt.propertyName,class:"tok-propertyName"},{tag:yt.operator,class:"tok-operator"},{tag:yt.comment,class:"tok-comment"},{tag:yt.meta,class:"tok-meta"},{tag:yt.invalid,class:"tok-invalid"},{tag:yt.punctuation,class:"tok-punctuation"}]);var b0=new vi,Est=new vi,su=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";ue(this,t),this.data=n,this.name=r,Mr.prototype.hasOwnProperty("tree")||Object.defineProperty(Mr.prototype,"tree",{get:function(){return la(this)}}),this.parser=e,this.extension=[Lf.of(this),Mr.languageData.of(function(o,s,a){var l=Ope(o,s,a),c=l.type.prop(b0);if(!c)return[];var u=o.facet(c),d=l.type.prop(Est);if(d){var h,f=l.resolve(s-l.from,a),p=_e(d);try{for(p.s();!(h=p.n()).done;){var g=h.value;if(g.test(f,o)){var m=o.facet(g.facet);return"replace"==g.type?m:m.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return de(t,[{key:"isActiveAt",value:function(n,e){return Ope(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(b0)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(Lf);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(b0)!=e.data){var l=s.prop(vi.mounted);if(l){if(l.tree.prop(b0)==e.data){if(l.overlay){var c,u=_e(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(g){u.e(g)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),bb=null,Ist=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;ue(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return de(t,[{key:"startParse",value:function(){return this.parser.startParse(new Ost(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Gs.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(Qk.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=bb;bb=this;try{return n()}finally{bb=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=Ipe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,g,m,v){return l.push({fromA:p,toA:g,fromB:m,toB:v})}),i=Qk.applyChanges(i,l),r=Gs.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=_e(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=Ipe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Gs.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){We(r,Cpe);var i=qe(r);function r(){return ue(this,r),i.apply(this,arguments)}return de(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=bb;if(u){var d,h=_e(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Gs(dc.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return bb}}]),t}();function Ipe(t,n,e){return Qk.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var EL=function(){function t(n){ue(this,t),this.context=n,this.tree=n.tree}return de(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=Ist.create(n.facet(Lf).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();su.state=Hs.define({create:EL.init,update:function(t,n){var e,i=_e(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(su.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(Lf)!=n.state.facet(Lf)?EL.init(n.state):t.apply(n)}});var Npe=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(Npe=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var ML=typeof navigator<"u"&&null!==(TL=navigator.scheduling)&&void 0!==TL&&TL.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,Nst=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return de(t,[{key:"update",value:function(n){var e=this.view.state.field(su.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(su.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=Npe(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return ML&&ML()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:su.setState.of(new EL(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Il(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),Lf=Zt.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[su.state,Nst,Yt.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),jst=de(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ue(this,t),this.language=n,this.support=e,this.extension=[n,e]}),Pst=Zt.define(),nT=Zt.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function w0(t){var n=t.facet(nT);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function wb(t,n){var e="",i=t.tabSize,r=t.facet(nT)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};ue(this,t),this.state=n,this.options=e,this.unit=w0(n)}return de(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return nb(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),jpe=new vi;function Rst(t){var n=t.type.prop(jpe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(vi.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,g=function(m){var v=m.node,y=v.childAfter(v.from),b=v.lastChild;if(!y)return null;for(var C=m.options.simulateBreak,k=m.state.doc.lineAt(y.from),T=null==C||C<=k.from?k.to:Math.min(k.to,C),j=y.to;;){var B=v.childAfter(j);if(!B||B==b)return null;if(!B.type.isSkipped)return B.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var Bst=Zt.define(),Lpe=new vi;function rT(t,n,e){var i,r=_e(t.facet(Bst));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=la(s);if(c.lengthl)){if(h&&f.from=a&&g.to>l&&(h=g)}}return h}(t,n,e)}function Fpe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var oT=fi.define({map:Fpe}),xb=fi.define({map:Fpe});function $pe(t){var n,e=[],i=_e(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var Sg=Hs.define({create:function(){return _n.none},update:function(t,n){t=t.map(n.changes);var e,i=_e(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(oT)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[zpe.range(a.value.from,a.value.to)]}):a.is(xb)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Yt.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function Bpe(t,n){return t.field(Sg,!1)?n:n.concat(fi.appendConfig.of(Upe()))}function Vpe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Yt.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var Vst=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=_e($pe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=rT(t.state,i.from,i.to);if(r)return t.dispatch({effects:Bpe(t.state,[oT.of(r),Vpe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(Sg,!1))return!1;var n,e=[],i=_e($pe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=sT(t.state,r.from,r.to);o&&e.push(xb.of(o),Vpe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},Ust),t),e=new IL(n,!0),i=new IL(n,!1),r=ks.fromClass(function(){function s(a){ue(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return de(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(Lf)!=a.state.facet(Lf)||a.startState.field(Sg,!1)!=a.state.field(Sg,!1)||la(a.startState)!=la(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new bg,u=_e(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=sT(a.state,d.from,d.to)?i:rT(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,hpe({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Hr.empty},initialSpacer:function(){return new IL(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=sT(s.state,a.from,a.to);if(c)return s.dispatch({effects:xb.of(c)}),!0;var u=rT(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:oT.of(u)}),!0)}})}),Upe()]}var Gst=Yt.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),NL=function(){function t(n,e){var i;function r(a){var l=Mf.newName();return(i||(i=Object.create(null)))["."+l]=a,l}ue(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof su?function(a){return a.prop(b0)==s.data}:s?function(a){return a==s}:void 0,this.style=Ape(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new Mf(i):null,this.themeType=e.themeType}return de(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),jL=Zt.define(),Gpe=Zt.define({combine:function(t){return t.length?[t[0]]:null}});function PL(t){var n=t.facet(jL);return n.length?n:t.facet(Gpe)}function Wpe(t,n){var e,i=[qst];return t instanceof NL&&(t.module&&i.push(Yt.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?Gpe.of(t):e?jL.computeN([Yt.darkTheme],function(r){return r.facet(Yt.darkTheme)==("dark"==e)?[t]:[]}):jL.of(t)),i}var Wst=function(){function t(n){ue(this,t),this.markCache=Object.create(null),this.tree=la(n.state),this.decorations=this.buildDeco(n,PL(n.state))}return de(t,[{key:"update",value:function(n){var e=la(n.state),i=PL(n.state),r=i!=PL(n.startState);e.length0&&vd(n.state,s.head-1,1,r)||r.afterCursor&&(vd(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),eat]}var nat=new vi;function RL(t,n,e){var i=t.prop(n<0?vi.openedBy:vi.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function LL(t){var n=t.type.prop(nat);return n?n(t.node):t}function vd(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=la(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=RL(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return iat(0,0,e,l,u,c,o)}}return function rat(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,g=e>0?0:f.length-1,m=e>0?f.length:-1;g!=m;g+=e){var v=s.indexOf(f[g]);if(!(v<0||i.resolveInner(p+g,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+g,to:p+g+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function iat(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(Jpe.push(t),console.warn(n))}function cat(t,n){var e,i=null,r=_e(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||yt[o];s?"function"==typeof s?i?i=s(i):$L(o,"Modifier ".concat(o," used at start of tag")):i?$L(o,"Tag ".concat(o," used as modifier")):i=s:$L(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=dc.define({id:Ype.length,name:a,props:[Tpe(qa({},a,i))]});return Ype.push(l),l.id}function BL(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var uat=BL(function pat(t,n){var e,r=[],o=-1,s=_e(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=VL(n,f.from).line;if(!p)continue;var g=/^\s*/.exec(f.text)[0].length,m=g==f.length,v=f.text.slice(g,g+p.length)==p?g:-1;g=0})){var Y,O=[],H=_e(r);try{for(H.s();!(Y=H.n()).done;){var G=Y.value,F=G.line,Z=G.comment;if(Z>=0){var E=F.from+Z,M=E+G.token.length;" "==F.text[M-F.from]&&M++,O.push({from:E,to:M})}}}catch(U){H.e(U)}finally{H.f()}return{changes:O}}return null},0),dat=BL(Qpe,0),hat=BL(function(t,n){return Qpe(t,n,function(e){var i,r=[],o=_e(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function VL(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function Qpe(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return VL(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function fat(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,g=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(g,g+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(g-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Yt.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?zL:"historyRedo"==n.inputType?lT:null;return!!i&&(n.preventDefault(),i(e))}})]}function aT(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field(UL,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var zL=aT(0,!1),lT=aT(1,!1),yat=aT(0,!0),_at=aT(1,!0);function ege(t){return function(n){var e=n.field(UL,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var bat=ege(0),wat=ege(1),ph=function(){function t(n,e,i,r,o){ue(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return de(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&iu.fromJSON(n.changes),[],n.mapped&&l0.fromJSON(n.mapped),n.startSelection&<.fromJSON(n.startSelection),n.selectionsAfter.map(lt.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=hc,o=_e(n.startState.facet(mat));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,hc)}},{key:"selection",value:function(n){return new t(void 0,hc,void 0,void 0,n)}}]),t}();function cT(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function tge(t,n){return t.length?n.length?t.concat(n):t:n}var hc=[];function nge(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),cT(t,t.length-1,1e9,e.setSelAfter(i)))}return[ph.selection([n])]}function xat(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function GL(t,n){if(!t.length)return t;for(var e=t.length,i=hc;e;){var r=Cat(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[ph.selection(i)]:hc}function Cat(t,n,e){var i=tge(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):hc,e);if(!t.changes)return ph.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new ph(r,fi.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var Sat=/^(input\.type|delete)($|\.)/,Cb=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;ue(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return de(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||Sat.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?cT(s,s.length-1,r.minDepth,new ph(n.changes.compose(a.changes),tge(n.effects,a.effects),a.mapped,a.startSelection,hc)):cT(s,s.length,r.minDepth,n),hc,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:hc;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function dT(t,n,e){for(var i=la(t).resolveInner(n.head),r=e?vi.closedBy:vi.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;Tat(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?vd(t,i.from,1):vd(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,lt.cursor(l,e?-1:1)}function age(t,n){return au(t,function(e){if(!e.empty)return uT(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var lge=function(t){return age(t,!1)},cge=function(t){return age(t,!0)};function uge(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=fT(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=fT(t,s,!1),a=fT(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:lt.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Yt.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function fT(t,n,e){if(t instanceof Yt){var i,r=_e(t.state.facet(Yt.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var Dge=function(t,n){return hT(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function Ige(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=_e(pT(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=_e(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(lt.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(m){d.e(m)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=_e(a.ranges);try{for(p.s();!(f=p.n()).done;){var g=f.value;o.push(lt.range(g.anchor-c,g.head-c))}}catch(m){p.e(m)}finally{p.f()}}}}}catch(m){s.e(m)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:lt.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Nge(t,n,e){if(t.readOnly)return!1;var i,r=[],o=_e(pT(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var Dat=jge(!1),Aat=jge(!0);function jge(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var g,m=la(f).resolveInner(p),v=m.childBefore(p),y=m.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(g=v.type.prop(vi.closedBy))&&g.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new iT(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=OL(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:lt.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var Pge=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(YL(n,function(i,r){r.push({from:i.from,insert:n.facet(nT)})}),{userEvent:"input.indent"})),!0)},Rge=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(YL(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=nb(o,n.tabSize),a=0,l=wb(n,Math.max(0,s-w0(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:Oge}].concat(Eat.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Oat=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return au(t,function(n){return dT(t.state,n,!ca(t))})},shift:function(t){return fc(t,function(n){return dT(t.state,n,!ca(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return au(t,function(n){return dT(t.state,n,ca(t))})},shift:function(t){return fc(t,function(n){return dT(t.state,n,ca(t))})}},{key:"Alt-ArrowUp",run:function(t){return Ige(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return Nge(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return Ige(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return Nge(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=lt.create([i.main]):i.main.empty||(r=lt.create([lt.cursor(i.main.head)])),!!r&&(e(yd(n,r)),!0)}},{key:"Mod-Enter",run:Aat},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=pT(n).map(function(r){return lt.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:lt.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=x0(n.selection,function(r){for(var o,s=la(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return lt.range(s.to,s.from)});return e(yd(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:Rge},{key:"Mod-]",run:Pge},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new iT(n,{overrideIndentation:function(s){return i[s]??-1}}),o=YL(n,function(s,a,l){var c=OL(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=wb(n,c);(u!=d||l.from0?o--:s0&&vd(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;ue(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(Fge(a))}:Fge,this.query=this.normalize(e)}return de(t,[{key:"peek",value:function(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Vs(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=yR(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=El(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(ue(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=$ge,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Hge(n,e,i,r,o);this.re=new RegExp(e,JL+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=gT(n,r),this.getLine(this.curLineStart)}return de(t,[{key:"getLine",value:function(n){this.iter.next(n),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=gT(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return KL.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=gT(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Vge.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function gT(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function XL(t){var n=Or("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=Wt(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:mT.of(!1),selection:lt.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Or("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:mT.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Or("label",t.state.phrase("Go to line"),": ",n)," ",Or("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(Bge.prototype[Symbol.iterator]=Hge.prototype[Symbol.iterator]=function(){return this});var mT=fi.define(),Uge=Hs.define({create:function(){return!0},update:function(t,n){var e,i=_e(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(mT)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return gb.from(t,function(n){return n?XL:null})}}),Nat=Yt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),jat={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},zge=Zt.define({combine:function(t){return uc(t,jat,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Pat=_n.mark({class:"cm-selectionMatch"}),Rat=_n.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Gge(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==io.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==io.Word)}var Lat=ks.fromClass(function(){function t(n){ue(this,t),this.decorations=this.getDeco(n)}return de(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(zge),i=n.state,r=i.selection;if(r.ranges.length>1)return _n.none;var o,y,b,C,k,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return _n.none;var l=i.wordAt(s.head);if(!l)return _n.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return _n.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!Gge(a=i.charCategorizer(s.head),i,s.from,s.to)||(k=s.to,(y=a)((b=i).sliceDoc(C=s.from,C+1))!=io.Word||y(b.sliceDoc(k-1,k))!=io.Word))return _n.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return _n.none}var u,d=[],h=_e(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new C0(i.doc,o,f.from,f.to);!p.next().done;){var g=p.value,m=g.from,v=g.to;if((!a||Gge(a,i,m,v))&&(s.empty&&m<=s.from&&v>=s.to?d.push(Rat.range(m,v)):(m>=s.to||v<=s.from)&&d.push(Pat.range(m,v)),d.length>e.maxMatches))return _n.none}}catch(y){h.e(y)}finally{h.f()}return _n.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),Fat=Yt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),vT=Zt.define({combine:function(t){return uc(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Yat(n)}})}});function $at(t){return t?[vT.of(t),o4]:o4}var Wge=function(){function t(n){ue(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,JL),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return de(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new Vat(this):new Bat(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:Mr.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?k0(this,r,e,i):S0(this,r,e,i)}}]),t}(),qge=de(function t(n){ue(this,t),this.spec=n});function S0(t,n,e,i){return new C0(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=S0(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function k0(t,n,e,i){return new Bge(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(yT(a.input,a.index))!=io.Word||r(_T(a.input,a.index))!=io.Word)&&(r(_T(a.input,a.index+a[0].length))!=io.Word||r(yT(a.input,a.index+a[0].length))!=io.Word)}):void 0},e,i);var r}function yT(t,n){return t.slice(Aa(t,n,!1),n)}function _T(t,n){return t.slice(n,Aa(t,n))}var Vat=function(t){We(e,qge);var n=qe(e);function e(){return ue(this,e),n.apply(this,arguments)}return de(e,[{key:"nextMatch",value:function(i,r,o){var s=k0(this.spec,i,o,i.doc.length).next();return s.done&&(s=k0(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=k0(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=k0(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),Sb=fi.define(),QL=fi.define(),$f=Hs.define({create:function(t){return new ZL(t4(t).create(),null)},update:function(t,n){var e,i=_e(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(Sb)?t=new ZL(r.value.create(),t.panel):r.is(QL)&&(t=new ZL(t.query,r.value?e4:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return gb.from(t,function(n){return n.panel})}}),ZL=de(function t(n,e){ue(this,t),this.query=n,this.panel=e}),Hat=_n.mark({class:"cm-searchMatch"}),Uat=_n.mark({class:"cm-searchMatch cm-searchMatch-selected"}),zat=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.decorations=this.highlight(n.state.field($f))}return de(t,[{key:"update",value:function(n){var e=n.state.field($f);(e!=n.startState.field($f)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return _n.none;for(var i=this.view,r=new bg,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Uat:Hat)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function kb(t){return function(n){var e=n.state.field($f,!1);return e&&e.query.spec.valid?t(n,e):n4(n)}}var bT=kb(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:r4(t,r),userEvent:"select.search"}),!0)}),wT=kb(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:r4(t,o),userEvent:"select.search"}),!0)}),Gat=kb(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:lt.create(e.map(function(i){return lt.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),Yge=kb(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Yt.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(r4(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),Wat=kb(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Yt.announce.of(r),userEvent:"input.replace.all"}),!0});function e4(t){return t.state.facet(vT).createPanel(t)}function t4(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(vT);return new Wge({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var n4=function(t){var n=t.state.field($f,!1);if(n&&n.panel){var e=pb(t,e4);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=t4(t.state,n.query.spec);r.valid&&t.dispatch({effects:Sb.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[QL.of(!0),n?Sb.of(t4(t.state,n.query.spec)):fi.appendConfig.of(o4)]});return!0},i4=function(t){var n=t.state.field($f,!1);if(!n||!n.panel)return!1;var e=pb(t,e4);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:QL.of(!1)}),!0},qat=[{key:"Mod-f",run:n4,scope:"editor search-panel"},{key:"F3",run:bT,shift:wT,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:bT,shift:wT,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:i4,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new C0(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(lt.range(c.value.from,c.value.to))}return e(n.update({selection:lt.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=pb(t,XL);if(!n){var e=[mT.of(!0)];null==t.state.field(Uge,!1)&&e.push(fi.appendConfig.of([Uge,Nat])),t.dispatch({effects:e}),n=pb(t,XL)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=lt.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||lt.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return g=y,p=v,"continue";if(h){var b=s.wordAt(y.value.from);if(!b||b.from!=y.value.from||b.to!=y.value.to)return g=y,p=v,"continue"}return p=v,g=y,{v:y.value}}if(v)return g=y,p=v,{v:null};y=new C0(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,g=y},p=!1,g=new C0(s.doc,a,u[u.length-1].to);;){var m=f(p,g);if("continue"!==m&&"object"===xt(m))return m.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(lt.range(o.from,o.to),!1),effects:Yt.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Yat=function(){function t(n){var e=this;ue(this,t),this.view=n;var i=this.query=n.state.field($f).query.spec;function r(o,s,a){return Or("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Or("input",{value:i.search,placeholder:Nl(n,"Find"),"aria-label":Nl(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Or("input",{value:i.replace,placeholder:Nl(n,"Replace"),"aria-label":Nl(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Or("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Or("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Or("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Or("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return bT(n)},[Nl(n,"next")]),r("prev",function(){return wT(n)},[Nl(n,"previous")]),r("select",function(){return Gat(n)},[Nl(n,"all")]),Or("label",null,[this.caseField,Nl(n,"match case")]),Or("label",null,[this.reField,Nl(n,"regexp")]),Or("label",null,[this.wordField,Nl(n,"by word")])].concat(sn(n.state.readOnly?[]:[Or("br"),this.replaceField,r("replace",function(){return Yge(n)},[Nl(n,"replace")]),r("replaceAll",function(){return Wat(n)},[Nl(n,"replace all")])]),[Or("button",{name:"close",onclick:function(){return i4(n)},"aria-label":Nl(n,"close"),type:"button"},["\xd7"])]))}return de(t,[{key:"commit",value:function(){var n=new Wge({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:Sb.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return Wfe(Gfe(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?wT:bT)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),Yge(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=_e(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=_e(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(Sb)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(vT).top}}]),t}();function Nl(t,n){return t.state.phrase(n)}var xT=/[\s\.,:;?!]/;function r4(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!xT.test(l[c+1])&&xT.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!xT.test(l[u-1])&&xT.test(l[u])){l=l.slice(0,u);break}return Yt.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var Jat=Yt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),o4=[$f,c0.lowest(zat),Jat],Jge=function(){function t(n,e,i){ue(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return de(t,[{key:"tokenBefore",value:function(n){for(var e=la(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Qge(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Kge(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var Xge=de(function t(n,e,i){ue(this,t),this.completion=n,this.source=e,this.match=i});function Bf(t){return t.selection.main.head}function Qge(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Zge(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:lt.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:lt.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var eme=new WeakMap;function Xat(t){if(!Array.isArray(t))return t;var n=eme.get(t);return n||eme.set(t,n=function Kat(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=Wt(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=_e(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&N<=57||N>=97&&N<=122?2:N>=65&&N<=90?1:0:($=yR(N))!=$.toLowerCase()?1:$!=$.toUpperCase()?2:0;(!T||1==V&&C||0==B&&0!=V)&&(e[g]==N||i[g]==N&&(m=!0)?s[g++]=T:s.length&&(k=!1)),B=V,T+=El(N)}return g==c&&0==s[0]&&k?this.result((m?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,b]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,b]:g==c?this.result((m?-200:0)-100-700+(k?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=_e(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?El(Vs(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),_d=Zt.define({combine:function(t){return uc(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function tme(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Zat=function(){function t(n,e){var i=this;ue(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(_d);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,sn(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var g=d.label,m=0,v=1;vm&&p.appendChild(document.createTextNode(g.slice(m,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(g.slice(y,b))),C.className="cm-completionMatchedText",m=b}return m=this.range.to)&&(this.range=tme(i.options.length,i.selected,this.view.state.facet(_d).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Il(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,ime(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],g=0,m=_e(d);try{for(m.s();!(f=m.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,b=v.result.getMatch,C=_e(v.result.options);try{for(C.s();!(y=C.n()).done;){var k=y.value,T=[1e9-g++];if(b){var j,B=_e(b(k));try{for(B.s();!(j=B.n()).done;)T.push(j.value)}catch(M){B.e(M)}finally{B.f()}}p.push(new Xge(k,v,T))}}catch(M){C.e(M)}finally{C.f()}}else{var $,V=new Qat(h.sliceDoc(v.from,v.to)),z=void 0,Y=_e(v.result.options);try{for(Y.s();!($=Y.n()).done;){var O=$.value;(z=V.match(O.label))&&(null!=O.boost&&(z[0]+=O.boost),p.push(new Xge(O,v,z)))}}catch(M){Y.e(M)}finally{Y.f()}}}}catch(M){m.e(M)}finally{m.f()}var H,G=[],F=null,Z=h.facet(_d).compareCompletions,D=_e(p.sort(function(M,U){return U.match[0]-M.match[0]||Z(M.completion,U.completion)}));try{for(D.s();!(H=D.n()).done;){var E=H.value;!F||F.label!=E.completion.label||F.detail!=E.completion.detail||null!=F.type&&null!=E.completion.type&&F.type!=E.completion.type||F.apply!=E.completion.apply?G.push(E):nme(E.completion)>nme(F)&&(G[G.length-1]=E),F=E.completion}}catch(M){D.e(M)}finally{D.f()}return G}(n,e);if(!s.length)return null;var a,l=e.facet(_d).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var ilt=[];function s4(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var kg=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;ue(this,t),this.source=n,this.state=e,this.explicitPos=i}return de(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=s4(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=_e(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(a4))r=new t(r.source,1,a.value?Bf(n.state):-1);else if(a.is(CT))r=new t(r.source,0);else if(a.is(rme)){var l,c=_e(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(Bf(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),rlt=function(t){We(e,kg);var n=qe(e);function e(i,r,o,s,a){var l;return ue(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return de(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=Bf(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&Bf(i.startState)==this.from)return new kg(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,g){if(!h)return!1;var m=f.sliceDoc(p,g);return"function"==typeof h?h(m,p,g,f):Qge(h,!0).test(m)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new Jge(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:Bf(i.state)):new kg(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new kg(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),a4=fi.define(),CT=fi.define(),rme=fi.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),ome=fi.define(),pc=Hs.define({create:function(){return tlt.start()},update:function(t,n){return t.update(n)},provide:function(t){return[Uk.from(t,function(n){return n.tooltip}),Yt.contentAttributes.from(t,function(n){return n.attrs})]}});function ST(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(pc,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function sst(t,n){var e=t.plugin(ape);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:ome.of(a)}),!0}}var olt=de(function t(n,e){ue(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),slt=ks.fromClass(function(){function t(n){ue(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=_e(n.state.field(pc).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return de(t,[{key:"update",value:function(n){var e=this,i=n.state.field(pc);if(n.selectionSet||n.docChanged||n.startState.field(pc)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!s4(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=_e(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Il(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,sn(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(g){return g.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=_e(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==s4(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=_e(this.view.state.field(pc).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=Bf(i),o=new Jge(i,r,n.explicitPos==r),s=new olt(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:CT.of(null)}),Il(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(_d),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new rlt(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:Bf(l.updates.length?l.updates[0].startState:e.view.state)),d=_e(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(pc).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,g=new kg(l.active.source,0),m=_e(l.updates);try{for(m.s();!(p=m.n()).done;)g=g.update(p.value,r)}catch(y){m.e(y)}finally{m.f()}1!=g.state&&i.push(g)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),kT={brackets:["(","[","{","'",'"'],before:")]}:;>"},Tg=fi.define({map:function(t,n){return n.mapPos(t,-1,Ea.TrackAfter)??void 0}}),l4=fi.define({map:function(t,n){return n.mapPos(t)}}),c4=new(function(t){We(e,_g);var n=qe(e);function e(){return ue(this,e),n.apply(this,arguments)}return de(e)}());c4.startSide=1,c4.endSide=-1;var sme=Hs.define({create:function(){return Hr.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Hr.empty)}t=t.map(n.changes);var r,o=_e(n.effects);try{var s=function(){var a=r.value;a.is(Tg)?t=t.update({add:[c4.range(a.value,a.value+1)]}):a.is(l4)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function ame(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return yR(t<128?t:t+1)}function lme(t,n){return t.languageDataAt("closeBrackets",n)[0]||kT}var llt="object"==(typeof navigator>"u"?"undefined":xt(navigator))&&/Android\b/.test(navigator.userAgent),clt=Yt.inputHandler.of(function(t,n,e,i){if((llt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==El(Vs(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=lme(s,s.selection.main.head),u=c.brackets||kT.brackets,d=_e(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=ame(Vs(h,0));if(a==h)return f==h?flt(s,h,u.indexOf(h+h+h)>-1):dlt(s,h,f,c.before||kT.before);if(a==f&&cme(s,s.selection.main.from))return hlt(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),ult=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=lme(n,n.selection.main.head).brackets||kT.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=El(Vs(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=_e(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&TT(n.doc,s.head)==ame(Vs(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:lt.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function cme(t,n){var e=!1;return t.field(sme).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function TT(t,n){var e=t.sliceString(n,n+2);return e.slice(0,El(Vs(e,0)))}function dlt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:Tg.of(s.to+n.length),range:lt.range(s.anchor+n.length,s.head+n.length)};var a=TT(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:Tg.of(s.head+n.length),range:lt.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function hlt(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&TT(t.doc,o.head)==e?lt.cursor(o.head+e.length):i=o});return i?null:t.update({selection:lt.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return l4.of(o.from)})})}function flt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:Tg.of(o.to+n.length),range:lt.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=TT(t.doc,s);if(a==n){if(ume(t,s))return{changes:{insert:n+n,from:s},effects:Tg.of(s+n.length),range:lt.cursor(s+n.length)};if(cme(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:lt.cursor(s+n.length*(l?3:1)),effects:l4.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&ume(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:Tg.of(s+n.length),range:lt.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=io.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=io.Word&&!function(u,d,h){for(var f=la(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var g=f.firstChild;g&&g.from==f.from&&g.to-g.from>h.length;){if(u.sliceDoc(g.to-h.length,g.to)==h)return!1;g=g.firstChild}return!0}var m=f.to==d&&f.parent;if(!m)break;f=m}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:Tg.of(s+n.length),range:lt.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function ume(t,n){var e=la(t).resolveInner(n+1);return e.parent&&e.from==n}function plt(){return[pc,_d.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),slt,glt,alt]}var dme=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(pc,!1)&&(t.dispatch({effects:a4.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(pc,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:CT.of(null)}),0))}},{key:"ArrowDown",run:ST(!0)},{key:"ArrowUp",run:ST(!1)},{key:"PageDown",run:ST(!0,"page")},{key:"PageUp",run:ST(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(pc,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Zge(t,n.open.options[n.open.selected]),0))}}],glt=c0.highest(Bk.computeN([_d],function(t){return t.facet(_d).defaultKeymap?[dme]:[]})),mlt=de(function t(n,e,i){ue(this,t),this.from=n,this.to=e,this.diagnostic=i}),Tb=function(){function t(n,e,i){ue(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return de(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(Dg).markerFilter;o&&(r=o(r));var s=_n.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?_n.widget({widget:new wlt(a),diagnostic:a}).range(a.from):_n.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,T0(s))}}]),t}();function T0(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new mlt(r,o,a.diagnostic),!1}),i}function hme(t,n){return!(!t.effects.some(function(e){return e.is(DT)})&&!t.changes.touchesRange(n.pos))}function fme(t,n){return t.field(jl,!1)?n:n.concat(fi.appendConfig.of([jl,Yt.decorations.compute([jl],function(e){var i=e.field(jl),r=i.selected;return r&&i.panel&&r.from!=r.to?_n.set([vlt.range(r.from,r.to)]):_n.none}),ost(ylt,{hideOn:hme}),xlt]))}var DT=fi.define(),u4=fi.define(),pme=fi.define(),jl=Hs.define({create:function(){return new Tb(_n.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=T0(e,t.selected.diagnostic,r)||T0(e,null,r)}t=new Tb(e,t.panel,i)}var o,s=_e(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(DT)?t=Tb.init(a.value,t.panel,n.state):a.is(u4)?t=new Tb(t.diagnostics,a.value?bme.open:null,t.selected):a.is(pme)&&(t=new Tb(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[gb.from(t,function(n){return n.panel}),Yt.decorations.from(t,function(n){return n.diagnostics})]}}),vlt=_n.mark({class:"cm-lintRange cm-lintRange-active"});function ylt(t,n,e){var i=t.state.field(jl).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=vme(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=_e(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=T0(this.view.state.field(jl).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:pme.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function AT(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function d4(t){return AT(''),'width="6" height="3"')}var xlt=Yt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:d4("#d11")},".cm-lintRange-warning":{backgroundImage:d4("orange")},".cm-lintRange-info":{backgroundImage:d4("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Clt=function(t){We(e,fd);var n=qe(e);function e(i){var r;return ue(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return de(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(ET).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,g,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:h4.of({pos:f.from,above:!1,create:function(){return{dom:gme(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,g=l,window.addEventListener("mousemove",function v(y){var b=g.getBoundingClientRect();if(!(y.clientX>b.left-10&&y.clientXb.top-10&&y.clientY')},".cm-lint-marker-warning":{content:AT('')},".cm-lint-marker-error":{content:AT('')}}),ET=Zt.define({combine:function(t){return uc(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function Dlt(){return[ET.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),wme,klt,Tlt,xme]}var Cme,Alt=function(){return[fst(),gst,Hot(),vat(),zst(),jot(),[fb,Fot],Mr.allowMultipleSelections.of(!0),Mr.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=_e(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var g=OL(c,p.from);if(null!=g){var m=/^\s*/.exec(p.text)[0],v=wb(c,g);m!=v&&d.push({from:p.from,to:p.from+m.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),Wpe(Yst,{fallback:!0}),tat(),[clt,sme],plt(),Jot(),Qot(),qot,(n=[Fat,Lat],n),Bk.of([].concat(ult,sn(Oat),qat,kat,Vst,dme,_lt))];var n}(),Elt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;ue(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return de(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%3==0}).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Mlt(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new Sme(r,r.start):null,0,null)}}]),t}(),Sme=de(function t(n,e){ue(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(Cme||(Cme={}));var Mlt=function(){function t(n){ue(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return de(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),Olt=function(){function t(n,e,i){ue(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return de(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),MT=de(function t(){ue(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),kme=new MT,Ilt=function(){function t(n,e){ue(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=kme,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return de(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=kme,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=_e(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),OT=function(){function t(n,e){ue(this,t),this.data=n,this.id=e}return de(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,g=0,m=i[a+2];if(!(r.next<0&&m>g&&65535==i[d+3*m-3])){for(;g>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}g=v+1}}break}a=i[d+3*m-1]}}(this.data,n,e,this.id)}}]),t}();function IT(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}OT.prototype.contextual=OT.prototype.fallback=OT.prototype.extend=!1;var Tme,lu=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),f4=null;function Dme(t,n,e){var i=t.cursor(zs.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(Tme||(Tme={}));var Ame,Nlt=function(){function t(n,e){ue(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return de(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?Dme(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?Dme(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Gs){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),jlt=function(){function t(n,e){ue(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new MT})}return de(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new MT).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new MT,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Nlt(i,n.nodeSet):null}return de(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,b=null,C=_e(v);try{for(C.s();!(y=C.n()).done;){var k=y.value,T=k.p.stoppedAt;(k.pos==k.p.stream.end||null!=T&&k.pos>T)&&k.p.parser.stateFlag(k.state,2)&&(!b||b.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&g.buffer.length>500){if(!((f.score-g.score||f.buffer.length-g.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var m=1;m ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(vi.contextHash)||0)==l))return n.useNode(c,u),lu&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Gs)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Gs&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),lu&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(b):i.push(b)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return Eme(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),lu&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(lu&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)lu&&(h=this.stackID(d)+" -> ");var p,g=_e(a.recoverByInsert(l));try{for(g.s();!(p=g.n()).done;){var m=p.value;lu&&console.log(u+this.stackID(m)+" (via recover-insert)"),this.advanceFully(m,i)}}catch(v){g.e(v)}finally{g.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),lu&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),Eme(a,i)):(!r||r.score=0)d(v,g,p[m++]);else{for(var y=p[m+-v],b=-v;b>0;b--)d(p[m++],g,y);m++}}}}catch(T){f.e(T)}finally{f.f()}}o.nodeSet=new yst(s.map(function(T,j){return dc.define({name:j>=o.minRepeatTerm?void 0:T,id:j,props:c[j],top:l.indexOf(j)>-1,error:0==j,skipped:i.skippedNodes&&i.skippedNodes.indexOf(j)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,sn(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=IT(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var k=0;k2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=gh(this.data,o+2)}if(r==gh(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=gh(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=Mme(this.data,this.tokenPrecTable,r);return o<0||Mme(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=_e(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&jme(t);return{c:function(){n=oe("div"),r&&r.c(),e=Me(),o&&o.c(),i=Me(),s&&s.c(),I(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){ve(a,n,l),r&&r.m(n,null),ee(n,e),o&&o.m(n,null),ee(n,i),s&&s.m(n,null)},p:function(a,l){var c=Wt(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=Ime(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=Nme(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=jme(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:tt,o:tt,d:function(a){a&&me(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Ult(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,g,m;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(g=p.selection)||void 0===g||null===(m=g.ranges)||void 0===m?void 0:m.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var zlt=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Ult,Hlt,po,{editorState:3},Vlt),r}return de(e)}(),p4=NL.define([{tag:yt.propertyName,color:"var(--jse-key-color)"},{tag:yt.number,color:"var(--jse-value-color-number)"},{tag:yt.bool,color:"var(--jse-value-color-boolean)"},{tag:yt.string,color:"var(--jse-value-color-string)"},{tag:yt.keyword,color:"var(--jse-value-color-null)"}]),Glt=Wpe(p4),Wlt=p4.style;function g4(t){return t.doc.lineAt(t.selection.main.head)}function Pme(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=Pme(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=Pme(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=g4(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,g=_e(d.visibleRanges);try{for(g.s();!(h=g.n()).done;)for(var m=h.value,y=m.to,b=m.from;b<=y;){var C=f.doc.lineAt(b);p.has(C)||p.add(C),b=C.to+1}}catch(k){g.e(k)}finally{g.f()}return p}(this.view,n),o=new qlt(r,n,this.unitWidth),s=n.facet(NT).hideFirstIndent,a=_e(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=Jlt(c,this.unitWidth,s);i.add(l.from,l.from,_n.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Xlt(){return[NT.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ylt,ks.fromClass(Klt,{decorations:function(n){return n.decorations}})]}function Qlt(t){gn(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function m4(t){var n=t.slice();return n[93]=0===n[10].length,n}function Rme(t){var n,e;return n=new wrt({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Zlt(t){var n;return{c:function(){(n=oe("div")).innerHTML='
    \n
    loading...
    ',I(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function ect(t){var n,e,i,r,o,s=t[92]&&Lme(t),a=!t[92]&&Fme(t);return{c:function(){n=oe("div"),e=Me(),s&&s.c(),i=Me(),a&&a.c(),r=Ci(),I(n,"class","jse-contents svelte-1yqirn0"),Xe(n,"jse-hidden",t[92])},m:function(l,c){ve(l,n,c),t[50](n),ve(l,e,c),s&&s.m(l,c),ve(l,i,c),a&&a.m(l,c),ve(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&Xe(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&W(s,1)):((s=Lme(l)).c(),W(s,1),s.m(i.parentNode,i)):s&&(it(),Q(s,1,1,function(){s=null}),rt()),l[92]?a&&(it(),Q(a,1,1,function(){a=null}),rt()):a?(a.p(l,c),1152&c[0]&&W(a,1)):((a=Fme(l)).c(),W(a,1),a.m(r.parentNode,r))},i:function(l){o||(W(s),W(a),o=!0)},o:function(l){Q(s),Q(a),o=!1},d:function(l){l&&me(n),t[50](null),l&&me(e),s&&s.d(l),l&&me(i),a&&a.d(l),l&&me(r)}}}function Lme(t){var n,e,i,r,o,s=rd(t[10]||"",2e4)+"";return n=new tu({props:{icon:pg,type:"error",message:"The JSON document is larger than ".concat(vk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(vk(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){$e(n.$$.fragment),e=Me(),i=oe("div"),r=ut(s),I(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){Le(n,a,l),ve(a,e,l),ve(a,i,l),ee(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(vk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(vk(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=rd(a[10]||"",2e4)+"")&&Jt(r,s)},i:function(a){o||(W(n.$$.fragment,a),o=!0)},o:function(a){Q(n.$$.fragment,a),o=!1},d:function(a){Fe(n,a),a&&me(e),a&&me(i)}}}function Fme(t){var n,e,i,r,o,s=!t[13]&&t[8]&&$ae(t[10]),a=t[2]&&$me(t),l=t[13]&&Bme(t),c=s&&Vme(t);return r=new tR({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=Me(),l&&l.c(),e=Me(),c&&c.c(),i=Me(),$e(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),ve(u,n,d),l&&l.m(u,d),ve(u,e,d),c&&c.m(u,d),ve(u,i,d),Le(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&W(a,1)):((a=$me(u)).c(),W(a,1),a.m(n.parentNode,n)):a&&(it(),Q(a,1,1,function(){a=null}),rt()),u[13]?l?(l.p(u,d),8192&d[0]&&W(l,1)):((l=Bme(u)).c(),W(l,1),l.m(e.parentNode,e)):l&&(it(),Q(l,1,1,function(){l=null}),rt()),9472&d[0]&&(s=!u[13]&&u[8]&&$ae(u[10])),s?c?(c.p(u,d),9472&d[0]&&W(c,1)):((c=Vme(u)).c(),W(c,1),c.m(i.parentNode,i)):c&&(it(),Q(c,1,1,function(){c=null}),rt());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(W(a),W(l),W(c),W(r.$$.fragment,u),o=!0)},o:function(u){Q(a),Q(l),Q(c),Q(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&me(n),l&&l.d(u),u&&me(e),c&&c.d(u),u&&me(i),Fe(r,u)}}}function $me(t){var n,e;return n=new zlt({props:{editorState:t[6]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Bme(t){var n,e;return n=new tu({props:{type:"error",icon:pg,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Vme(t){var n,e;return n=new tu({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:lR,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:Qv,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:lR,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:Qv,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function tct(t){var n,e,i,r,o,s=t[1]&&Rme(m4(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[ect,Zlt][i](c(t,i)),{c:function(){n=oe("div"),s&&s.c(),e=Me(),r.c(),I(n,"class","jse-text-mode svelte-1yqirn0"),Xe(n,"no-main-menu",!t[1])},m:function(u,d){ve(u,n,d),s&&s.m(n,null),ee(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(m4(u),d),2&d[0]&&W(s,1)):((s=Rme(m4(u))).c(),W(s,1),s.m(n,e)):s&&(it(),Q(s,1,1,function(){s=null}),rt()),r.p(c(u,i),d),(!o||2&d[0])&&Xe(n,"no-main-menu",!u[1])},i:function(u){o||(W(s),W(r),o=!0)},o:function(u){Q(s),Q(r),o=!1},d:function(u){u&&me(n),s&&s.d(),l[i].d(),t[52](null)}}}function Hme(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function nct(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,g=n.escapeUnicodeCharacters,m=n.parser,v=n.validator,y=n.validationParser,b=n.onChange,C=n.onChangeMode,k=n.onError,T=n.onFocus,j=n.onBlur,B=n.onRenderMenu,N=n.onSortModal,$=n.onTransformModal,V=Cs("jsoneditor:TextMode"),z={key:"Mod-i",run:K,shift:pe,preventDefault:!0},Y=typeof window>"u";V("isSSR:",Y);var O=!1,H=!0,G=[],F=new Af,Z=new Af,D=new Af,E=new Af,M=new Af,U=new Af,L=h,X=zS(L,f,m),ne=g;Kl(ni(bt().mark(function Be(){return bt().wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(!Y){jt.next=2;break}return jt.abrupt("return");case 2:try{s=zt({target:o,initialText:Ir(X,O)?"":i.escapeValue(X),readOnly:c,indentation:f})}catch(an){console.error(an)}case 3:case"end":return jt.stop()}},Be)}))),Vc(function(){s&&(V("Destroy CodeMirror editor"),s.destroy())});var ge=!1,ae=!1,De=mf(),be=mf();function Ie(){s&&(V("focus"),s.focus())}var R=!1;function J(Be){V("patch",Be);var jt=m.parse(X),an=Yc(jt,Be),wn=ote(jt,Be);return pi({text:m.stringify(an,null,f)}),{json:an,previousJson:jt,undo:wn,redo:Be}}function K(){if(V("format"),c)return!1;try{var Be=m.parse(X);return pi({text:m.stringify(Be,null,f)}),e(8,H=!0),!0}catch(jt){k(jt)}return!1}function pe(){if(V("compact"),c)return!1;try{var Be=m.parse(X);return pi({text:m.stringify(Be)}),e(8,H=!1),!0}catch(jt){k(jt)}return!1}function Te(){if(V("repair"),!c)try{pi({text:Yu(X)}),e(49,Nt="valid"),e(13,Ge=null)}catch(Be){k(Be)}}function ye(Be){var jt=Be.id,an=Be.rootPath,wn=Be.onTransform,Mi=Be.onClose;try{var Ui=m.parse(X);R=!0,$({id:jt||be,json:Ui,rootPath:an||[],onTransform:function(nr){wn?wn({operations:nr,json:Ui,transformedJson:Yc(Ui,nr)}):(V("onTransform",nr),J(nr))},onClose:function(){R=!1,Ie(),Mi&&Mi()}})}catch(nr){k(nr)}}function Ue(Be,jt){V("setSelection",{anchor:Be,head:jt}),s&&s.dispatch(s.state.update({selection:{anchor:Be,head:jt},scrollIntoView:!0}))}function Je(Be,jt){if(1===jt.state.selection.ranges.length){var an=jt.state.selection.ranges[0],wn=X.slice(an.from,an.to);if("{"===wn||"["===wn){var Mi=G2.parse(X),Ui=Object.keys(Mi.pointers).find(function(Go){var _i;return(null===(_i=Mi.pointers[Go].value)||void 0===_i?void 0:_i.pos)===an.from}),nr=Mi.pointers[Ui];Ui&&nr&&nr.value&&nr.valueEnd&&(V("pointer found, selecting inner contents of path:",Ui,nr),Ue(nr.value.pos+1,nr.valueEnd.pos-1))}}}function _t(){return function(Be){return Dg.of({source:Be,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(cn,{delay:300})}function zt(Be){var jt=Be.target,an=Be.initialText,wn=Be.readOnly,Mi=Be.indentation;V("Create CodeMirror editor",{readOnly:wn,indentation:Mi});var Ui=Mr.create({doc:an,extensions:[Bk.of([Iat,z]),F.of(_t()),Dlt(),Alt,Glt,Xlt({hideFirstIndent:!0}),Yt.domEventHandlers({dblclick:Je}),Yt.updateListener.of(function(nr){e(6,l=nr.state),nr.docChanged&&bn()}),new jst(Blt),$at({top:!0}),D.of(Mr.readOnly.of(wn)),Z.of(Yt.editable.of(!wn)),M.of(Mr.tabSize.of(p)),E.of(ci(Mi)),U.of(Yt.theme({},{dark:ct()})),Yt.lineWrapping]});return s=new Yt({state:Ui,parent:jt})}function ct(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Nn(Be){var jt=Be.path,an=Be.message,wn=function(Mi,Ui){try{var nr=G2.parse(Mi),Go=gt(Ui),_i=nr.pointers[Go];if(_i)return{path:Ui,line:_i.key?_i.key.line:_i.value?_i.value.line:0,column:_i.key?_i.key.column:_i.value?_i.value.column:0,from:_i.key?_i.key.pos:_i.value?_i.value.pos:0,to:_i.keyEnd?_i.keyEnd.pos:_i.valueEnd?_i.valueEnd.pos:0}}catch(Wo){console.error(Wo)}return null}(i.escapeValue(X),jt);return{path:jt,line:wn.line,column:wn.column,from:wn.from,to:wn.to,message:an,severity:qu.warning,actions:[]}}function mt(Be,jt){var Mi=Be.position;return{path:[],line:Be.line,column:Be.column,from:Mi,to:Mi,severity:qu.error,message:Be.message,actions:jt&&!c?[{name:"Auto repair",apply:function(){return Te()}}]:null}}function pi(Be){var jt=arguments.length>1&&void 0!==arguments[1]&&arguments[1],an=zS(Be,f,m),wn=!ai(Be,L),Mi=L;L=Be,e(10,X=an),V("setCodeMirrorContent",{isChanged:wn,forceUpdate:jt}),s&&(wn||jt)&&(Ir(X,O)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(X)}}),yi(),wn&&Hi(L,Mi))}function ki(){if(s){var Be=s?i.unescapeValue(s.state.doc.toString()):"",jt=Be!==X;if(V("onChangeCodeMirrorValue",{isChanged:jt}),jt){var an=L;e(10,X=Be),L={text:X},yi(),Hi(L,an)}}}function ci(Be){return nT.of("number"==typeof Be?" ".repeat(Be):Be)}function yi(){e(11,ge=bat(s.state)>0),e(12,ae=wat(s.state)>0),V({canUndo:ge,canRedo:ae})}eR({onMount:Kl,onDestroy:Vc,getWindow:function(){return $v(a)},hasFocus:function(){return R&&document.hasFocus()||WS(a)},onFocus:T,onBlur:j});var bn=Ov(ki,300);function Hi(Be,jt){b&&b(Be,jt,{contentErrors:Pn(),patchResult:null})}function Ir(Be,jt){return!!Be&&Be.length>10485760&&!jt}var Nt="valid",Ge=null;function cn(){if(Ir(X,O))return[];var Be=Pn();return Zce(Be)?[Hme(mt(Be.parseError,Be.isRepairable))]:function ott(t){return Ar(t)&&Array.isArray(t.validationErrors)}(Be)?Be.validationErrors.map(Nn).map(Hme):[]}function Pn(){V("validate:start"),bn.flush();var Be=Ti(i.escapeValue(X),v,m,y);return Zce(Be)?(e(49,Nt=Be.isRepairable?"repairable":"invalid"),e(13,Ge=Be.parseError),e(9,G=[])):(e(49,Nt="valid"),e(13,Ge=null),e(9,G=Be?.validationErrors||[])),V("validate:end"),Be}var Ti=J_(Uet);function vr(){Ge&&function(Be){V("select parse error",Be);var jt=mt(Be,!1);Ue(jt.from,jt.to),Ie()}(Ge)}var qr={icon:AZe,text:"Show me",title:"Move to the parse error location",onClick:vr};return t.$$set=function(Be){"readOnly"in Be&&e(0,c=Be.readOnly),"mainMenuBar"in Be&&e(1,u=Be.mainMenuBar),"statusBar"in Be&&e(2,d=Be.statusBar),"externalContent"in Be&&e(29,h=Be.externalContent),"indentation"in Be&&e(30,f=Be.indentation),"tabSize"in Be&&e(31,p=Be.tabSize),"escapeUnicodeCharacters"in Be&&e(32,g=Be.escapeUnicodeCharacters),"parser"in Be&&e(33,m=Be.parser),"validator"in Be&&e(34,v=Be.validator),"validationParser"in Be&&e(35,y=Be.validationParser),"onChange"in Be&&e(36,b=Be.onChange),"onChangeMode"in Be&&e(37,C=Be.onChangeMode),"onError"in Be&&e(38,k=Be.onError),"onFocus"in Be&&e(39,T=Be.onFocus),"onBlur"in Be&&e(40,j=Be.onBlur),"onRenderMenu"in Be&&e(3,B=Be.onRenderMenu),"onSortModal"in Be&&e(41,N=Be.onSortModal),"onTransformModal"in Be&&e(42,$=Be.onTransformModal)},t.$$.update=function(){var Be;2&t.$$.dirty[1]&&(i=bP({escapeControlCharacters:!1,escapeUnicodeCharacters:g})),536870912&t.$$.dirty[0]&&pi(h),8&t.$$.dirty[1]&&(V("updateLinter",v),s&&s.dispatch({effects:F.reconfigure(_t())})),1073741824&t.$$.dirty[0]&&(Be=f,s&&(V("updateIndentation",Be),s.dispatch({effects:E.reconfigure(ci(Be))}))),1&t.$$.dirty[1]&&function(Be){s&&(V("updateTabSize",Be),s.dispatch({effects:M.reconfigure(Mr.tabSize.of(Be))}))}(p),1&t.$$.dirty[0]&&function(Be){s&&(V("updateReadOnly",Be),s.dispatch({effects:[D.reconfigure(Mr.readOnly.of(Be)),Z.reconfigure(Yt.editable.of(!Be))]}))}(c),131074&t.$$.dirty[1]&&ne!==g&&(e(48,ne=g),V("forceUpdateText",{escapeUnicodeCharacters:g}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(X)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==Nt||c?[qr]:[{icon:ek,text:"Auto repair",title:"Automatically repair JSON",onClick:Te},qr])},[c,u,d,B,o,a,l,O,H,G,X,ge,ae,Ge,r,Y,K,pe,function(){var Be;if(!c)try{var jt=m.parse(X);R=!0,N({id:De,json:jt,rootPath:[],onSort:(Be=ni(bt().mark(function an(wn){var Mi;return bt().wrap(function(Ui){for(;;)switch(Ui.prev=Ui.next){case 0:V("onSort",Mi=wn.operations),J(Mi);case 3:case"end":return Ui.stop()}},an)})),function(an){return Be.apply(this,arguments)}),onClose:function(){R=!1,Ie()}})}catch(an){k(an)}},function(){c||ye({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?i4(s):n4(s))},function(){c||s&&(zL(s),Ie())},function(){c||s&&(lT(s),Ie())},function(){e(7,O=!0),pi(h,!0)},function(){C(Fr.tree)},function(){ki()},function(Be){V("select validation error",Be);var jt=Nn(Be);Ue(jt.from,jt.to),Ie()},Ir,vr,h,f,p,g,m,v,y,b,C,k,T,j,N,$,Ie,J,ye,function(){V("refresh"),Ya().then(function(){if(s){var Be=ct();V("updateTheme",{dark:Be}),s.dispatch({effects:[U.reconfigure(Yt.theme({},{dark:Be}))]})}})},Pn,ne,Nt,function(Be){qn[Be?"unshift":"push"](function(){e(4,o=Be)})},function(){return e(8,H=!1)},function(Be){qn[Be?"unshift":"push"](function(){e(5,a=Be)})}]}var ict=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,nct,tct,In,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Qlt,[-1,-1,-1,-1]),r}return de(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function rct(t){var n,e;return n=new fk({props:{items:t[0]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};1&Wt(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function oct(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:nk,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:ZS,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:Wle,title:pN,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:UP,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:HP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var sct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,oct,rct,In,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return de(e)}();function Ume(t,n,e){var i=t.slice();return i[9]=n[e],i}function zme(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[m],b=Qn(v);b.length>0&&!Ql(g,b);)y.unshift({op:"add",path:gt(b),value:{}}),b=Qn(b);return y}}return m})),f);var p,g}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Zn(c)&&_f(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var cct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,lct,act,In,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return de(e)}();function uct(t){gn(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function dct(t){var n,e,i,r,o=rd(t[2].stringify(t[1]),50)+"";return{c:function(){n=oe("button"),e=ut(o),I(n,"type","button"),I(n,"class","jse-inline-value svelte-l28mqd"),Xe(n,"jse-selected",t[3])},m:function(s,a){ve(s,n,a),ee(n,e),i||(r=Ze(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=Wt(a,1)[0];6&l&&o!==(o=rd(s[2].stringify(s[1]),50)+"")&&Jt(e,o),8&l&&Xe(n,"jse-selected",s[3])},i:tt,o:tt,d:function(s){s&&me(n),i=!1,r()}}}function hct(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=er(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var fct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,hct,dct,In,{path:0,value:1,parser:2,isSelected:3,onEdit:4},uct),r}return de(e)}();function pct(t){gn(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function Gme(t){var n,e,i,r;return e=new li({props:{data:t[1]===Xl.asc?lc:Gle}}),{c:function(){n=oe("span"),$e(e.$$.fragment),I(n,"class","jse-column-sort-icon svelte-h4fort"),I(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){ve(o,n,s),Le(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===Xl.asc?lc:Gle),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&I(n,"title",i)},i:function(o){r||(W(e.$$.fragment,o),r=!0)},o:function(o){Q(e.$$.fragment,o),r=!1},d:function(o){o&&me(n),Fe(e)}}}function gct(t){var n,e,i,r,o,s,a,l,c=rd(t[3],50)+"",u=void 0!==t[1]&&Gme(t);return{c:function(){n=oe("button"),e=oe("span"),i=ut(c),r=Me(),u&&u.c(),I(e,"class","jse-column-name"),I(n,"type","button"),I(n,"class","jse-column-header svelte-h4fort"),I(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),Xe(n,"jse-readonly",t[0])},m:function(d,h){ve(d,n,h),ee(n,e),ee(e,i),ee(n,r),u&&u.m(n,null),s=!0,a||(l=Ze(n,"click",t[4]),a=!0)},p:function(d,h){var f=Wt(h,1)[0];(!s||8&f)&&c!==(c=rd(d[3],50)+"")&&Jt(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&W(u,1)):((u=Gme(d)).c(),W(u,1),u.m(n,null)):u&&(it(),Q(u,1,1,function(){u=null}),rt()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&I(n,"title",o),(!s||1&f)&&Xe(n,"jse-readonly",d[0])},i:function(d){s||(W(u),s=!0)},o:function(d){Q(u),s=!1},d:function(d){d&&me(n),u&&u.d(),a=!1,l()}}}function mct(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Yn(s)?"values":oc(Xa(s))),96&t.$$.dirty&&e(1,r=ai(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=JWe[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===Xl.asc?Xl.desc:Xl.asc})},s,a,c]}var jT,PT,vct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,mct,gct,In,{path:5,sortedColumn:6,readOnly:0,onSort:7},pct),r}return de(e)}();function Wme(t,n){return jT||(PT=new WeakMap,jT=new ResizeObserver(function(e){var i,r=_e(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=PT.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),PT.set(t,n),jT.observe(t),{destroy:function(){PT.delete(t),jT.unobserve(t)}}}function yct(t){var n,e;return n=new Cue({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function _ct(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,g=n.documentState,m=n.parser,v=n.showTip,y=n.onCloseContextMenu,b=n.onEditValue,C=n.onEditRow,k=n.onToggleEnforceString,T=n.onCut,j=n.onCopy,B=n.onPaste,N=n.onRemove,$=n.onDuplicateRow,V=n.onInsertBeforeRow,z=n.onInsertAfterRow,Y=n.onRemoveRow;function O(){y(),b()}function H(){y(),C()}function G(){y(),k()}function F(){y(),T(!0)}function Z(){y(),T(!1)}function D(){y(),j(!0)}function E(){y(),j(!1)}function M(){y(),B()}function U(){y(),N()}function L(){y(),$()}function X(){y(),V()}function ne(){y(),z()}function ge(){y(),Y()}return t.$$set=function(ae){"json"in ae&&e(2,p=ae.json),"documentState"in ae&&e(3,g=ae.documentState),"parser"in ae&&e(4,m=ae.parser),"showTip"in ae&&e(0,v=ae.showTip),"onCloseContextMenu"in ae&&e(5,y=ae.onCloseContextMenu),"onEditValue"in ae&&e(6,b=ae.onEditValue),"onEditRow"in ae&&e(7,C=ae.onEditRow),"onToggleEnforceString"in ae&&e(8,k=ae.onToggleEnforceString),"onCut"in ae&&e(9,T=ae.onCut),"onCopy"in ae&&e(10,j=ae.onCopy),"onPaste"in ae&&e(11,B=ae.onPaste),"onRemove"in ae&&e(12,N=ae.onRemove),"onDuplicateRow"in ae&&e(13,$=ae.onDuplicateRow),"onInsertBeforeRow"in ae&&e(14,V=ae.onInsertBeforeRow),"onInsertAfterRow"in ae&&e(15,z=ae.onInsertAfterRow),"onRemoveRow"in ae&&e(16,Y=ae.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=g.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Yn(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Dt(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Pi(i)||vo(i)||Zn(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Pi(i)||Zn(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&$_(i)&&!s&&Array.isArray(Dt(p,Qn(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&$_(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!$r(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&hg(i)&&Ar(a),29491200&t.$$.dirty[0]&&d&&hg(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&hg(i)&&$r(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&dh(a,g.enforceStringMap,gt(i.focusPath),m)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:O,icon:Kv,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:Kv,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:O,disabled:!c},{type:"button",icon:h?P_:R_,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:G,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:F,icon:Jv,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:Jv,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:F,disabled:!l},{type:"button",icon:Jv,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:Z,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:D,icon:xf,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:xf,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:D,disabled:!l},{type:"button",icon:xf,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:E,disabled:!l}]},{type:"button",onClick:M,icon:Hle,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:U,icon:VP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:H,icon:Kv,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:L,icon:Jle,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:X,icon:Xv,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:ne,icon:Xv,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:ge,icon:VP,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,g,m,y,b,C,k,T,j,B,N,$,V,z,Y,o,l,u,h,c,i,a,d,r,s]}var bct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,_ct,yct,In,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return de(e)}();function wct(t){gn(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function qme(t,n,e){var i=t.slice();i[12]=n[e];var r=Dt(i[0],i[12]).length;return i[13]=r,i}function xct(t){var n,e;return{c:function(){n=ut(t[5]),e=ut(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){ve(i,n,r),ve(i,e,r)},p:function(i,r){32&r&&Jt(n,i[5])},d:function(i){i&&me(n),i&&me(e)}}}function Cct(t){var n;return{c:function(){n=ut("An object cannot be opened in table mode. You can open a nested array instead, or open the\n document in tree mode.")},m:function(e,i){ve(e,n,i)},p:tt,d:function(e){e&&me(n)}}}function Yme(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=oc(Xa(t[12]))+"",g=t[13]+"",m=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=oe("button"),e=ut(t[6]),i=ut(' "'),r=ut(p),o=ut('"\n '),s=oe("span"),a=ut("("),l=ut(g),c=Me(),u=ut(m),d=ut(")"),I(s,"class","jse-nested-array-count svelte-1te5h1h"),I(n,"type","button"),I(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,b){ve(y,n,b),ee(n,e),ee(n,i),ee(n,r),ee(n,o),ee(n,s),ee(s,a),ee(s,l),ee(s,c),ee(s,u),ee(s,d),h||(f=Ze(n,"click",v),h=!0)},p:function(y,b){t=y,64&b&&Jt(e,t[6]),8&b&&p!==(p=oc(Xa(t[12]))+"")&&Jt(r,p),9&b&&g!==(g=t[13]+"")&&Jt(l,g),9&b&&m!==(m=1!==t[13]?"items":"item")&&Jt(u,m)},d:function(y){y&&me(n),h=!1,f()}}}function Sct(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v;function y(B,N){return B[4]?Cct:xct}for(var b=y(t),C=b(t),k=t[3],T=[],j=0;j1&&void 0!==arguments[1]?arguments[1]:2,g=[];return function m(v,y){Dr(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Yn(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Dr(l)?"An object":er(l)?"An empty array":"A ".concat(jN(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Fr.tree)}]}var Tct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,kct,Sct,In,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},wct),r}return de(e)}();function Dct(t){gn(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function Act(t){var n,e,i,r,o,s;return e=new li({props:{data:jZe}}),{c:function(){n=oe("button"),$e(e.$$.fragment),I(n,"type","button"),I(n,"class","jse-column-header svelte-h4fort"),I(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){ve(a,n,l),Le(e,n,null),r=!0,o||(s=Ze(n,"click",t[3]),o=!0)},p:function(a,l){var c=Wt(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&I(n,"title",i)},i:function(a){r||(W(e.$$.fragment,a),r=!0)},o:function(a){Q(e.$$.fragment,a),r=!1},d:function(a){a&&me(n),Fe(e),o=!1,s()}}}function Ect(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Mct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Ect,Act,In,{count:0,maxSampleCount:1,onRefresh:2},Dct),r}return de(e)}();function Oct(t){gn(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function Jme(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Kme(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Dt(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function Xme(t,n,e){var i=t.slice();return i[125]=n[e],i}function Qme(t){var n,e;return n=new sct({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Ict(t){var n;return{c:function(){(n=oe("div")).innerHTML='
    \n
    loading...
    ',I(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){ve(e,n,i)},p:tt,i:tt,o:tt,d:function(e){e&&me(n)}}}function Nct(t){var n,e,i,r,o,s,a,l,c,u=[Rct,Pct,jct],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=oe("label"),e=oe("input"),i=Me(),o.c(),s=Ci(),I(e,"type","text"),e.readOnly="readonly",I(e,"tabindex","-1"),I(e,"class","jse-hidden-input svelte-hs49xj"),I(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){ve(f,n,p),ee(n,e),t[71](e),ve(f,i,p),d[r].m(f,p),ve(f,s,p),a=!0,l||(c=Ze(e,"paste",t[37]),l=!0)},p:function(f,p){var g=r;(r=h(f))===g?d[r].p(f,p):(it(),Q(d[g],1,1,function(){d[g]=null}),rt(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),W(o,1),o.m(s.parentNode,s))},i:function(f){a||(W(o),a=!0)},o:function(f){Q(o),a=!1},d:function(f){f&&me(n),t[71](null),f&&me(i),d[r].d(f),f&&me(s),l=!1,c()}}}function jct(t){var n,e;return n=new Tct({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function Pct(t){var n,e,i,r;return n=new tu({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:wf,text:"Repair manually",onClick:t[35]}]}}),i=new Ade({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){$e(n.$$.fragment),e=Me(),$e(i.$$.fragment)},m:function(o,s){Le(n,o,s),ve(o,e,s),Le(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:wf,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(W(n.$$.fragment,o),W(i.$$.fragment,o),r=!0)},o:function(o){Q(n.$$.fragment,o),Q(i.$$.fragment,o),r=!1},d:function(o){Fe(n,o),o&&me(e),Fe(i,o)}}}function Rct(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N=!Yn(null===(n=t[21])||void 0===n?void 0:n.root),$=N&&Zme(t),V=t[9],z=[],Y=0;Y"u";a("isSSR:",g);var m,v,y,b,C,k,T=n.readOnly,j=n.externalContent,B=n.mainMenuBar,N=n.escapeControlCharacters,$=n.escapeUnicodeCharacters,V=n.flattenColumns,z=n.parser,Y=n.parseMemoizeOne,O=n.validator,H=n.validationParser,G=n.indentation,F=n.onChange,Z=n.onChangeMode,D=n.onRenderValue,E=n.onRenderMenu,M=n.onFocus,U=n.onBlur,L=n.onSortModal,X=n.onTransformModal,ne=n.onJSONEditorModal;eR({onMount:Kl,onDestroy:Vc,getWindow:function(){return $v(v)},hasFocus:function(){return Ie&&document.hasFocus()||WS(v)},onFocus:function(){M&&M()},onBlur:function(){U&&U()}});var ge,ae=void 0,De=1e4,be=[],Ie=!1,R={},J=600,K=0;function pe(he){a("updateSelection",he);var Ye="function"==typeof he?he(ye.selection):he;ai(Ye,ye.selection)||e(10,ye=Ee(Ee({},ye),{},{selection:Ye}))}function Te(he){void 0!==ye.selection&&void 0!==he&&(ye.selection&&Ql(he,ye.selection.anchorPath)&&Ql(he,ye.selection.focusPath)||(a("clearing selection: path does not exist anymore",ye.selection),e(10,ye=Ee(Ee({},ye),{},{selection:zv(he,ye)}))))}var Je,ye=YS(),Ue=!1,_t=Bce({onChange:function(he){e(19,zt=he)}}),zt=_t.getState();function Nn(he){var Ye=he.previousJson,ot=he.previousState,ht=he.previousText,vt=he.previousTextIsRepaired;void 0===Ye&&void 0===ht||(void 0!==C?_t.add(void 0!==Ye?{undo:{patch:[{op:"replace",path:"",value:Ye}],state:sa(ot),json:void 0,text:ht,textIsRepaired:vt},redo:{patch:[{op:"replace",path:"",value:C}],state:sa(ye),json:void 0,text:k,textIsRepaired:Ue}}:{undo:{patch:void 0,json:void 0,text:ht,state:sa(ot),textIsRepaired:vt},redo:{patch:void 0,json:C,state:sa(ye),text:k,textIsRepaired:Ue}}):void 0!==Ye&&_t.add({undo:{patch:void 0,json:Ye,state:sa(ot),text:ht,textIsRepaired:vt},redo:{patch:void 0,json:void 0,text:k,textIsRepaired:Ue,state:sa(ye)}}))}var mt=[],pi=J_(Vce);function ki(he,Ye,ot,ht){e0(function(){var vt;try{vt=pi(he,Ye,ot,ht)}catch(on){vt=[{path:[],message:"Failed to validate: "+on.message,severity:qu.warning}]}ai(vt,mt)||(a("validationErrors changed:",vt),e(11,mt=vt))},function(vt){return a("validationErrors updated in ".concat(vt," ms"))})}function ci(){return a("validate"),ae?{parseError:ae,isRepairable:!1}:(ki(C,O,z,H),Yn(mt)?null:{validationErrors:mt})}function yi(he,Ye){if(a("patch",he,Ye),void 0===C)throw new Error("Cannot apply patch: no JSON");var ot={json:C},ht=C,vt=ye,on=Ue,Rn=Ile(C,he),Vt=hle(C,ye,he).json,tn=function $it(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=cc(qc(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return ai(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Ee(Ee({},t),{},{sortedColumn:void 0}):t}(ye,he,be),Xt="function"==typeof Ye?Ye(Vt,tn):void 0;e(7,C=Xt&&void 0!==Xt.json?Xt.json:Vt);var wi=Xt&&void 0!==Xt.state?Xt.state:tn;e(10,ye=wi),e(15,k=void 0),e(18,Ue=!1),e(17,ge=void 0),_t.add({undo:{patch:Rn,json:void 0,text:void 0,state:sa(vt),textIsRepaired:on},redo:{patch:he,json:void 0,state:sa(wi),text:void 0,textIsRepaired:Ue}});var Oi={json:C,previousJson:ht,undo:Rn,redo:he};return Hi(ot,Oi),Oi}function bn(he,Ye){if(!T)return yi(he,Ye)}function Hi(he,Ye){(void 0!==he.json||void 0!==he?.text)&&(void 0!==k?F({text:k,json:void 0},he,{contentErrors:ci(),patchResult:Ye}):void 0!==C&&F({text:void 0,json:C},he,{contentErrors:ci(),patchResult:Ye}))}function Ir(he){a("handleFind",he)}function Nt(he){a("pasted json as text",he),e(17,ge=he)}function Ge(he){var Ye=parseInt(he[0]),ot=[String(Ye+1)].concat(sn(he.slice(1)));return Ql(C,ot)?mi(ot,!1):mi(he,!1)}function cn(){b&&(b.focus(),b.select())}function Pn(){ye.selection||pe(function(){if(er(C)&&!Yn(C)&&!Yn(be))return mi(["0"].concat(sn(be[0])),!1)}())}function Ti(he){var Ye=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ot=hR(he,be,R,18),ht=ot-K,vt=Be(he);a("scrollTo",{path:he,top:ot,scrollTop:K,elem:vt});var on=y.getBoundingClientRect();if(vt&&!Ye){var Rn=vt.getBoundingClientRect();if(Rn.bottom>on.top&&Rn.topot.right&&e(13,y.scrollLeft+=ht.right-ot.right,y),ht.left(Vt=K+on.height-18)&&e(13,y.scrollTop+=vt-Vt,y),ht0&&void 0!==ot[0])||ot[0],void 0!==C){ht.next=3;break}return ht.abrupt("return");case 3:return ht.next=5,Sde({json:C,documentState:ye,indentation:Ye?G:void 0,parser:z});case 5:case"end":return ht.stop()}},he)})),Js.apply(this,arguments)}function Pl(){Tde({json:C,text:k,documentState:ye,keepSelection:!0,readOnly:T,onChange:F,onPatch:bn})}function le(){!function Bit(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&qv(e.selection)){var s=cc(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;Da("duplicate row",{rowIndex:a});var c=[String(a)];o(Ele(n,[c]),function(u,d){var h=mi(yg({rowIndex:a0?a-1:void 0,h=void 0!==d?mi(yg({rowIndex:d,columnIndex:l},i),!1):void 0;return Da("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Ee(Ee({},u),{},{selection:h})}})}}({json:C,documentState:ye,columns:be,readOnly:T,onPatch:bn})}function Se(){return(Se=ni(bt().mark(function he(Ye){return bt().wrap(function(ot){for(;;)switch(ot.prev=ot.next){case 0:return ot.next=2,Dde({char:Ye,selectInside:!1,refJsonEditor:v,json:C,documentState:ye,readOnly:T,parser:z,onPatch:bn,onReplaceJson:At,onSelect:pe});case 2:case"end":return ot.stop()}},he)}))).apply(this,arguments)}function At(he,Ye){var ot=ye,ht=C,vt=k,on={json:C,text:k},Rn=Ue,Vt=sc(C,ye,[],od),tn="function"==typeof Ye?Ye(he,Vt):void 0;e(7,C=tn&&void 0!==tn.json?tn.json:he),e(10,ye=tn&&void 0!==tn.state?tn.state:Vt),e(15,k=void 0),e(18,Ue=!1),Te(C),Nn({previousJson:ht,previousState:ot,previousText:vt,previousTextIsRepaired:Rn}),Hi(on,null)}function rn(he,Ye){a("handleChangeText");var ot=ye,ht=C,vt=k,on={json:C,text:k},Rn=Ue;try{e(7,C=Y(he)),e(10,ye=sc(C,ye,[],od)),e(15,k=void 0),e(18,Ue=!1)}catch{try{e(7,C=Y(Yu(he))),e(10,ye=sc(C,ye,[],od)),e(15,k=he),e(18,Ue=!0)}catch{e(7,C=void 0),e(10,ye=YS({json:C,expand:od})),e(15,k=he),e(18,Ue=!1)}}if("function"==typeof Ye){var Vt=Ye(C,ye);e(7,C=Vt&&Vt.json?Vt.json:C),e(10,ye=Vt&&Vt.state?Vt.state:ye)}Te(C),Nn({previousJson:ht,previousState:ot,previousText:vt,previousTextIsRepaired:Rn}),Hi(on,null)}function hn(he){var ot=he.rootPath,ht=he.onTransform,vt=he.onClose;T||void 0===C||(Ie=!0,X({id:he.id||p,json:C,rootPath:ot||[],onTransform:ht?function(on){ht({operations:on,json:C,transformedJson:Yc(C,on)})}:function(on){a("onTransform",ot,on),bn(on)},onClose:function(){Ie=!1,cn(),vt&&vt()}}))}function dn(he){a("openJSONEditorModal",{path:he}),Ie=!0,ne({content:{json:Dt(C,he)},path:he,onPatch:Je.onPatch,onClose:function(){Ie=!1,cn()}})}function Di(he,Ye){l(lue,{text:he,onParse:HS,onRepair:Nae,onApply:Ye},Ee(Ee({},Xp),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return cn()}})}function Yi(){if(!T&&_t.getState().canUndo){var he=_t.undo();if(he){var Ye={json:C,text:k};e(7,C=he.undo.patch?Yc(C,he.undo.patch):he.undo.json),e(10,ye=he.undo.state),e(15,k=he.undo.text),e(18,Ue=he.undo.textIsRepaired),a("undo",{item:he,json:C}),Hi(Ye,{json:C,previousJson:Ye.json,redo:he.undo.patch,undo:he.redo.patch}),cn(),ye.selection&&Ti(ye.selection.focusPath,!1)}}}function vn(){if(!T&&_t.getState().canRedo){var he=_t.redo();if(he){var Ye={json:C,text:k};e(7,C=he.redo.patch?Yc(C,he.redo.patch):he.redo.json),e(10,ye=he.redo.state),e(15,k=he.redo.text),e(18,Ue=he.redo.textIsRepaired),a("redo",{item:he,json:C}),Hi(Ye,{json:C,previousJson:Ye.json,redo:he.redo.patch,undo:he.undo.patch}),cn(),ye.selection&&Ti(ye.selection.focusPath,!1)}}}function bi(he,Ye){e(68,R[Ye]=he.getBoundingClientRect().height,R)}return t.$$set=function(he){"readOnly"in he&&e(0,T=he.readOnly),"externalContent"in he&&e(47,j=he.externalContent),"mainMenuBar"in he&&e(1,B=he.mainMenuBar),"escapeControlCharacters"in he&&e(48,N=he.escapeControlCharacters),"escapeUnicodeCharacters"in he&&e(49,$=he.escapeUnicodeCharacters),"flattenColumns"in he&&e(50,V=he.flattenColumns),"parser"in he&&e(2,z=he.parser),"parseMemoizeOne"in he&&e(51,Y=he.parseMemoizeOne),"validator"in he&&e(52,O=he.validator),"validationParser"in he&&e(53,H=he.validationParser),"indentation"in he&&e(3,G=he.indentation),"onChange"in he&&e(54,F=he.onChange),"onChangeMode"in he&&e(4,Z=he.onChangeMode),"onRenderValue"in he&&e(55,D=he.onRenderValue),"onRenderMenu"in he&&e(5,E=he.onRenderMenu),"onFocus"in he&&e(56,M=he.onFocus),"onBlur"in he&&e(57,U=he.onBlur),"onSortModal"in he&&e(58,L=he.onSortModal),"onTransformModal"in he&&e(59,X=he.onTransformModal),"onJSONEditorModal"in he&&e(60,ne=he.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,m=bP({escapeControlCharacters:N,escapeUnicodeCharacters:$})),65536&t.$$.dirty[1]&&function ct(he){var Ye=C,ot=Fv(he)?he.text!==k:!ai(Ye,he.json);if(a("update external content",{isChanged:ot}),ot){var ht={json:C,text:k},vt=C,on=ye,Rn=k,Vt=Ue;if(Fv(he))try{e(7,C=Y(he.text)),e(15,k=he.text),e(18,Ue=!1),e(16,ae=void 0)}catch(tn){try{e(7,C=Y(Yu(he.text))),e(15,k=he.text),e(18,Ue=!0),e(16,ae=void 0)}catch{e(7,C=void 0),e(15,k=j.text),e(18,Ue=!1),e(16,ae=US(k,tn.message||tn.toString()))}}else e(7,C=he.json),e(15,k=void 0),e(18,Ue=!1),e(16,ae=void 0);Te(C),ye.sortedColumn&&e(10,ye=Ee(Ee({},ye),{},{sortedColumn:void 0})),Nn({previousJson:vt,previousState:on,previousText:Rn,previousTextIsRepaired:Vt}),Hi(ht,null)}}(j),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,be=er(C)?function(he,Ye){var ot,ht=new Set(Ye.map(gt)),vt=new Set(he.map(gt)),on=_e(ht);try{for(on.s();!(ot=on.n()).done;){var Rn=ot.value;vt.has(Rn)||ht.delete(Rn)}}catch(wi){on.e(wi)}finally{on.f()}var Vt,tn=_e(vt);try{for(tn.s();!(Vt=tn.n()).done;){var Xt=Vt.value;ht.has(Xt)||ht.add(Xt)}}catch(wi){tn.e(wi)}finally{tn.f()}return sn(ht).map(qc)}(function(he,Ye){var ot=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,ht={};Array.isArray(he)&&function zXe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rDe),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(he,Ye,ot,ht,vt){for(var on=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Rn=er(ot)?ot.length:0,Vt=function Rit(t,n){var e=Object.values(t);return Yn(e)?n:e.reduce(function(r,o){return r+o})/e.length}(ht,vt),tn=he-on,Xt=Ye+2*on,wi=function(gu){return ht[gu]||vt},Oi=0,Nr=0;Nr0&&(Nr-=wi(--Oi));for(var us=Oi,pu=0;pu0?mi(yg({rowIndex:wi.rowIndex,columnIndex:Nr-1},tn),!1):Xt;pe(ot),qr(ot.focusPath)}if("ArrowRight"===Ye&&(he.preventDefault(),Pn(),ye.selection)){var ht=function(tn,Xt){var wi=cc(Xt.focusPath,tn),Nr=wi.columnIndex;return Nr0?mi(yg({rowIndex:Oi-1,columnIndex:wi.columnIndex},tn),!1):Xt}(be,ye.selection);pe(vt),qr(vt.focusPath)}if("ArrowDown"===Ye&&(he.preventDefault(),Pn(),ye.selection)){var on=function(tn,Xt,wi){var Oi=cc(wi.focusPath,Xt),Nr=Oi.rowIndex;return Nr1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new dve({props:{mode:Rt(t[18]).mode,content:Rt(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:ud,onBlur:ud,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&hve(t),k=t[18].length>1&&fve(t);function T(N,$){return N[0]?Yct:Jct}var j=T(t),B=j(t);return{c:function(){n=oe("div"),$e(e.$$.fragment),i=Me(),r=oe("div"),(o=oe("div")).innerHTML='
    Path
    ',s=Me(),a=oe("input"),l=Me(),(c=oe("div")).innerHTML='
    Contents
    ',u=Me(),d=oe("div"),$e(h.$$.fragment),f=Me(),p=oe("div"),C&&C.c(),g=Me(),k&&k.c(),m=Me(),B.c(),I(o,"class","jse-label svelte-1hibiw3"),I(a,"class","jse-path svelte-1hibiw3"),I(a,"type","text"),a.readOnly=!0,I(a,"title","Selected path"),a.value=t[21],I(c,"class","jse-label svelte-1hibiw3"),I(d,"class","jse-modal-inline-editor svelte-1hibiw3"),I(p,"class","jse-actions svelte-1hibiw3"),I(r,"class","jse-modal-contents svelte-1hibiw3"),I(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(N,$){ve(N,n,$),Le(e,n,null),ee(n,i),ee(n,r),ee(r,o),ee(r,s),ee(r,a),ee(r,l),ee(r,c),ee(r,u),ee(r,d),Le(h,d,null),ee(r,f),ee(r,p),C&&C.m(p,null),ee(p,g),k&&k.m(p,null),ee(p,m),B.m(p,null),v=!0,y||(b=ws(pk.call(null,n,t[23])),y=!0)},p:function(N,$){var V={};262144&$[0]&&(V.title="Edit nested content "+(N[18].length>1?" (".concat(N[18].length,")"):"")),e.$set(V),(!v||2097152&$[0]&&a.value!==N[21])&&(a.value=N[21]);var z={};262144&$[0]&&(z.mode=Rt(N[18]).mode),262144&$[0]&&(z.content=Rt(N[18]).content),1&$[0]&&(z.readOnly=N[0]),2&$[0]&&(z.indentation=N[1]),4&$[0]&&(z.tabSize=N[2]),32&$[0]&&(z.statusBar=N[5]),8&$[0]&&(z.mainMenuBar=N[3]),16&$[0]&&(z.navigationBar=N[4]),64&$[0]&&(z.escapeControlCharacters=N[6]),128&$[0]&&(z.escapeUnicodeCharacters=N[7]),256&$[0]&&(z.flattenColumns=N[8]),512&$[0]&&(z.parser=N[9]),1048576&$[0]&&(z.parseMemoizeOne=N[20]),1024&$[0]&&(z.validator=N[10]),2048&$[0]&&(z.validationParser=N[11]),4096&$[0]&&(z.pathParser=N[12]),8192&$[0]&&(z.onRenderValue=N[13]),16384&$[0]&&(z.onClassName=N[14]),32768&$[0]&&(z.onRenderMenu=N[15]),65536&$[0]&&(z.onSortModal=N[16]),131072&$[0]&&(z.onTransformModal=N[17]),h.$set(z),N[19]?C?C.p(N,$):((C=hve(N)).c(),C.m(p,g)):C&&(C.d(1),C=null),N[18].length>1?k?(k.p(N,$),262144&$[0]&&W(k,1)):((k=fve(N)).c(),W(k,1),k.m(p,m)):k&&(it(),Q(k,1,1,function(){k=null}),rt()),j===(j=T(N))&&B?B.p(N,$):(B.d(1),(B=j(N))&&(B.c(),B.m(p,null)))},i:function(N){v||(W(e.$$.fragment,N),W(h.$$.fragment,N),W(k),v=!0)},o:function(N){Q(e.$$.fragment,N),Q(h.$$.fragment,N),Q(k),v=!1},d:function(N){N&&me(n),Fe(e),Fe(h),C&&C.d(),k&&k.d(),B.d(),y=!1,b()}}}function pve(t){t.focus()}function Xct(t,n,e){var i,r,o,s=Cs("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,g=n.statusBar,m=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,b=n.parser,C=n.validator,k=n.validationParser,T=n.pathParser,j=n.onRenderValue,B=n.onClassName,N=n.onRenderMenu,$=n.onSortModal,V=n.onTransformModal,z=xs("simple-modal").close,Y=[{mode:H(a),content:a,relativePath:l}],O=void 0;function H(F){return _P(F)&&er(F.json)?Fr.table:Fr.tree}function G(F){s("handleChange",F);var Z=Ee(Ee({},Rt(Y)),{},{content:F});e(18,Y=[].concat(sn(Qn(Y)),[Z]))}return t.$$set=function(F){"content"in F&&e(28,a=F.content),"path"in F&&e(29,l=F.path),"onPatch"in F&&e(30,c=F.onPatch),"readOnly"in F&&e(0,u=F.readOnly),"indentation"in F&&e(1,d=F.indentation),"tabSize"in F&&e(2,h=F.tabSize),"mainMenuBar"in F&&e(3,f=F.mainMenuBar),"navigationBar"in F&&e(4,p=F.navigationBar),"statusBar"in F&&e(5,g=F.statusBar),"escapeControlCharacters"in F&&e(6,m=F.escapeControlCharacters),"escapeUnicodeCharacters"in F&&e(7,v=F.escapeUnicodeCharacters),"flattenColumns"in F&&e(8,y=F.flattenColumns),"parser"in F&&e(9,b=F.parser),"validator"in F&&e(10,C=F.validator),"validationParser"in F&&e(11,k=F.validationParser),"pathParser"in F&&e(12,T=F.pathParser),"onRenderValue"in F&&e(13,j=F.onRenderValue),"onClassName"in F&&e(14,B=F.onClassName),"onRenderMenu"in F&&e(15,N=F.onRenderMenu),"onSortModal"in F&&e(16,$=F.onSortModal),"onTransformModal"in F&&e(17,V=F.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=Y.flatMap(function(F){return F.relativePath})),1&t.$$.dirty[1]&&e(21,r=Yn(i)?"(whole document)":oc(Xa(i))),512&t.$$.dirty[0]&&e(20,o=J_(b.parse))},[u,d,h,f,p,g,m,v,y,b,C,k,T,j,B,N,$,V,Y,O,o,r,function(){if(s("handleApply"),!u)try{e(19,O=void 0);var F=[{op:"replace",path:gt(Rt(Y).relativePath),value:Pae(Rt(Y).content,b).json}];if(Y.length>1){var Z={json:Yc(Pae(Y[Y.length-2].content,b).json,F)};e(18,Y=Qn(Y)),G(Z)}else c(F),z()}catch(D){e(19,O=D.toString())}},function(){s("handleClose"),Y.length>1?(e(18,Y=Qn(Y)),e(19,O=void 0)):z()},G,function(F){s("handleChangeMode",F);var Z=Ee(Ee({},Rt(Y)),{},{mode:F});e(18,Y=[].concat(sn(Qn(Y)),[Z]))},function(F){e(19,O=F.toString()),console.error(F)},function(F){var Z=F.content,D=F.path;s("handleJSONEditorModal",{content:Z,path:D});var E={mode:H(Z),content:Z,relativePath:D};e(18,Y=[].concat(sn(Y),[E]))},a,l,c,i]}var Qct=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Xct,Kct,In,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},qct,[-1,-1]),r}return de(e)}();function Zct(t,n,e){var i=xs("simple-modal");return[i.open,i.close]}var eut=function(t){We(e,It);var n=qe(e);function e(i){var r;return ue(this,e),Pt(Ot(r=n.call(this)),i,Zct,null,In,{open:0,close:1}),r}return de(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function tut(t){gn(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function gve(t){var n,e;return n=new dve({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){$e(n.$$.fragment)},m:function(r,o){Le(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(W(n.$$.fragment,r),e=!0)},o:function(r){Q(n.$$.fragment,r),e=!1},d:function(r){t[56](null),Fe(n,r)}}}function nut(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new eut({props:l}),qn.push(function(){return Uc(n,"open",a)});var c=gve(t);return{c:function(){$e(n.$$.fragment),i=Me(),r=oe("div"),c.c(),I(r,"class","jse-main svelte-sxaskb"),Xe(r,"jse-focus",t[20])},m:function(u,d){Le(n,u,d),ve(u,i,d),ve(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],Hc(function(){return e=!1})),n.$set(h),524288&d[0]&&In(s,s=u[19])?(it(),Q(c,1,1,tt),rt(),(c=gve(u)).c(),W(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&Xe(r,"jse-focus",u[20])},i:function(u){o||(W(n.$$.fragment,u),W(c),o=!0)},o:function(u){Q(n.$$.fragment,u),Q(c),o=!1},d:function(u){Fe(n,u),u&&me(i),u&&me(r),c.d(u)}}}function iut(t){var n,e;return n=new Kee({props:{closeOnEsc:!1,$$slots:{default:[nut]},$$scope:{ctx:t}}}),{c:function(){$e(n.$$.fragment)},m:function(i,r){Le(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(W(n.$$.fragment,i),e=!0)},o:function(i){Q(n.$$.fragment,i),e=!1},d:function(i){Fe(n,i)}}}function rut(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},Xee,{closeOnEsc:!1}],o={$$slots:{default:[iut]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(g,m){return"".concat(g).concat(m)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(g,m){return m instanceof e&&(g[m.str]=(g[m.str]||0)+1),g},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,g=new Array(p>1?p-1:0),m=1;m1?p-1:0),m=1;m0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;ue(this,l),this._names={},this._prefixes=u,this._parent=d}return de(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){We(u,l);var c=qe(u);function u(d,h){var f;return ue(this,u),(f=c.call(this,h)).prefix=d,f}return de(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(dJ||(dJ=fe([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)(hJ||(hJ=fe(["\n"],["\\n"]))),a=function(l){We(u,l);var c=qe(u);function u(d){var h;return ue(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Ee(Ee({},d),{},{_n:d.lines?s:e.nil}),h}return de(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),g=p.prefix,m=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[g];if(v){var y=v.get(m);if(y)return y}else v=this._values[g]=new Map;v.set(m,p);var b=this._scope[g]||(this._scope[g]=[]),C=b.length;return b[C]=h.ref,p.setValue(h,{property:g,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(fJ||(fJ=fe(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=arguments.length>3?arguments[3]:void 0,m=e.nil,v=function(b){var C=d[b];if(!C)return"continue";var k=p[b]=p[b]||new Map;C.forEach(function(T){if(!k.has(T)){k.set(T,n.Started);var j=h(T);if(j){var B=f.opts.es5?t.varKinds.var:t.varKinds.const;m=(0,e._)(pJ||(pJ=fe(["",""," "," = ",";",""])),m,B,T,j,f.opts._n)}else{if(!(j=g?.(T)))throw new i(T);m=(0,e._)(gJ||(gJ=fe(["","","",""])),m,j,f.opts._n)}k.set(T,n.Completed)}})};for(var y in d)v(y);return m}}]),u}(r);t.ValueScope=a}(Dve)),Dve}function Si(){return Tve||(Tve=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=LT(),e=Ave(),i=LT();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=Ave();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function M(){ue(this,M)}return de(M,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(U,L){return this}}]),M}(),s=function(M){We(L,M);var U=qe(L);function L(X,ne,ge){var ae;return ue(this,L),(ae=U.call(this)).varKind=X,ae.name=ne,ae.rhs=ge,ae}return de(L,[{key:"render",value:function(X){var ge=X._n,ae=X.es5?e.varKinds.var:this.varKind,De=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(ae," ").concat(this.name).concat(De,";")+ge}},{key:"optimizeNames",value:function(X,ne){if(X[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,X,ne)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),L}(o),a=function(M){We(L,M);var U=qe(L);function L(X,ne,ge){var ae;return ue(this,L),(ae=U.call(this)).lhs=X,ae.rhs=ne,ae.sideEffects=ge,ae}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+ne}},{key:"optimizeNames",value:function(X,ne){if(!(this.lhs instanceof n.Name)||X[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,X,ne),this}},{key:"names",get:function(){return Y(this.lhs instanceof n.Name?{}:Ee({},this.lhs.names),this.rhs)}}]),L}(o),l=function(M){We(L,M);var U=qe(L);function L(X,ne,ge,ae){var De;return ue(this,L),(De=U.call(this,X,ge,ae)).op=ne,De}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+ne}}]),L}(a),c=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).label=X,ne.names={},ne}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.label,":")+ne}}]),L}(o),u=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).label=X,ne.names={},ne}return de(L,[{key:"render",value:function(X){var ne=X._n,ge=this.label?" ".concat(this.label):"";return"break".concat(ge,";")+ne}}]),L}(o),d=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).error=X,ne}return de(L,[{key:"render",value:function(X){var ne=X._n;return"throw ".concat(this.error,";")+ne}},{key:"names",get:function(){return this.error.names}}]),L}(o),h=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).code=X,ne}return de(L,[{key:"render",value:function(X){var ne=X._n;return"".concat(this.code,";")+ne}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(X,ne){return this.code=O(this.code,X,ne),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),L}(o),f=function(M){We(L,M);var U=qe(L);function L(){var X,ne=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return ue(this,L),(X=U.call(this)).nodes=ne,X}return de(L,[{key:"render",value:function(X){return this.nodes.reduce(function(ne,ge){return ne+ge.render(X)},"")}},{key:"optimizeNodes",value:function(){for(var X=this.nodes,ne=X.length;ne--;){var ge=X[ne].optimizeNodes();Array.isArray(ge)?X.splice.apply(X,[ne,1].concat(sn(ge))):ge?X[ne]=ge:X.splice(ne,1)}return X.length>0?this:void 0}},{key:"optimizeNames",value:function(X,ne){for(var ge=this.nodes,ae=ge.length;ae--;){var De=ge[ae];De.optimizeNames(X,ne)||(H(X,De.names),ge.splice(ae,1))}return ge.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(X,ne){return z(X,ne.names)},{})}}]),L}(o),p=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){return"{"+X._n+gi(Xn(L.prototype),"render",this).call(this,X)+"}"+X._n}}]),L}(f),g=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L)}(f),m=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L)}(p);m.kind="else";var v=function(M){We(L,M);var U=qe(L);function L(X,ne){var ge;return ue(this,L),(ge=U.call(this,ne)).condition=X,ge}return de(L,[{key:"render",value:function(X){var ne="if(".concat(this.condition,")")+gi(Xn(L.prototype),"render",this).call(this,X);return this.else&&(ne+="else "+this.else.render(X)),ne}},{key:"optimizeNodes",value:function(){gi(Xn(L.prototype),"optimizeNodes",this).call(this);var X=this.condition;if(!0===X)return this.nodes;var ne=this.else;if(ne){var ge=ne.optimizeNodes();ne=this.else=Array.isArray(ge)?new m(ge):ge}return ne?!1===X?ne instanceof L?ne:ne.nodes:this.nodes.length?this:new L(G(X),ne instanceof L?[ne]:ne.nodes):!1!==X&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(X,ne){var ge;if(this.else=null===(ge=this.else)||void 0===ge?void 0:ge.optimizeNames(X,ne),gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne)||this.else)return this.condition=O(this.condition,X,ne),this}},{key:"names",get:function(){var X=gi(Xn(L.prototype),"names",this);return Y(X,this.condition),this.else&&z(X,this.else.names),X}}]),L}(p);v.kind="if";var y=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L)}(p);y.kind="for";var b=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).iteration=X,ne}return de(L,[{key:"render",value:function(X){return"for(".concat(this.iteration,")")+gi(Xn(L.prototype),"render",this).call(this,X)}},{key:"optimizeNames",value:function(X,ne){if(gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne))return this.iteration=O(this.iteration,X,ne),this}},{key:"names",get:function(){return z(gi(Xn(L.prototype),"names",this),this.iteration.names)}}]),L}(y),C=function(M){We(L,M);var U=qe(L);function L(X,ne,ge,ae){var De;return ue(this,L),(De=U.call(this)).varKind=X,De.name=ne,De.from=ge,De.to=ae,De}return de(L,[{key:"render",value:function(X){var ge=this.name,ae=this.from,De=this.to;return"for(".concat(X.es5?e.varKinds.var:this.varKind," ").concat(ge,"=").concat(ae,"; ").concat(ge,"<").concat(De,"; ").concat(ge,"++)")+gi(Xn(L.prototype),"render",this).call(this,X)}},{key:"names",get:function(){var X=Y(gi(Xn(L.prototype),"names",this),this.from);return Y(X,this.to)}}]),L}(y),k=function(M){We(L,M);var U=qe(L);function L(X,ne,ge,ae){var De;return ue(this,L),(De=U.call(this)).loop=X,De.varKind=ne,De.name=ge,De.iterable=ae,De}return de(L,[{key:"render",value:function(X){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+gi(Xn(L.prototype),"render",this).call(this,X)}},{key:"optimizeNames",value:function(X,ne){if(gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne))return this.iterable=O(this.iterable,X,ne),this}},{key:"names",get:function(){return z(gi(Xn(L.prototype),"names",this),this.iterable.names)}}]),L}(y),T=function(M){We(L,M);var U=qe(L);function L(X,ne,ge){var ae;return ue(this,L),(ae=U.call(this)).name=X,ae.args=ne,ae.async=ge,ae}return de(L,[{key:"render",value:function(X){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(p);T.kind="func";var j=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){return"return "+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(f);j.kind="return";var B=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){var ne="try"+gi(Xn(L.prototype),"render",this).call(this,X);return this.catch&&(ne+=this.catch.render(X)),this.finally&&(ne+=this.finally.render(X)),ne}},{key:"optimizeNodes",value:function(){var X,ne;return gi(Xn(L.prototype),"optimizeNodes",this).call(this),null===(X=this.catch)||void 0===X||X.optimizeNodes(),null===(ne=this.finally)||void 0===ne||ne.optimizeNodes(),this}},{key:"optimizeNames",value:function(X,ne){var ge,ae;return gi(Xn(L.prototype),"optimizeNames",this).call(this,X,ne),null===(ge=this.catch)||void 0===ge||ge.optimizeNames(X,ne),null===(ae=this.finally)||void 0===ae||ae.optimizeNames(X,ne),this}},{key:"names",get:function(){var X=gi(Xn(L.prototype),"names",this);return this.catch&&z(X,this.catch.names),this.finally&&z(X,this.finally.names),X}}]),L}(p),N=function(M){We(L,M);var U=qe(L);function L(X){var ne;return ue(this,L),(ne=U.call(this)).error=X,ne}return de(L,[{key:"render",value:function(X){return"catch(".concat(this.error,")")+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(p);N.kind="catch";var $=function(M){We(L,M);var U=qe(L);function L(){return ue(this,L),U.apply(this,arguments)}return de(L,[{key:"render",value:function(X){return"finally"+gi(Xn(L.prototype),"render",this).call(this,X)}}]),L}(p);$.kind="finally";var V=function(){function M(U){var L=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ue(this,M),this._values={},this._blockStarts=[],this._constants={},this.opts=Ee(Ee({},L),{},{_n:L.lines?"\n":""}),this._extScope=U,this._scope=new e.Scope({parent:U}),this._nodes=[new g]}return de(M,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(U){return this._scope.name(U)}},{key:"scopeName",value:function(U){return this._extScope.name(U)}},{key:"scopeValue",value:function(U,L){var X=this._extScope.value(U,L);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}},{key:"getScopeValue",value:function(U,L){return this._extScope.getValue(U,L)}},{key:"scopeRefs",value:function(U){return this._extScope.scopeRefs(U,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(U,L,X,ne){var ge=this._scope.toName(L);return void 0!==X&&ne&&(this._constants[ge.str]=X),this._leafNode(new s(U,ge,X)),ge}},{key:"const",value:function(U,L,X){return this._def(e.varKinds.const,U,L,X)}},{key:"let",value:function(U,L,X){return this._def(e.varKinds.let,U,L,X)}},{key:"var",value:function(U,L,X){return this._def(e.varKinds.var,U,L,X)}},{key:"assign",value:function(U,L,X){return this._leafNode(new a(U,L,X))}},{key:"add",value:function(U,L){return this._leafNode(new l(U,t.operators.ADD,L))}},{key:"code",value:function(U){return"function"==typeof U?U():U!==n.nil&&this._leafNode(new h(U)),this}},{key:"object",value:function(){for(var U=["{"],L=arguments.length,X=new Array(L),ne=0;ne1&&U.push(","),U.push(be),(be!==Ie||this.opts.es5)&&(U.push(":"),(0,n.addCodeArg)(U,Ie))}return U.push("}"),new n._Code(U)}},{key:"if",value:function(U,L,X){if(this._blockNode(new v(U)),L&&X)this.code(L).else().code(X).endIf();else if(L)this.code(L).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(U){return this._elseNode(new v(U))}},{key:"else",value:function(){return this._elseNode(new m)}},{key:"endIf",value:function(){return this._endBlockNode(v,m)}},{key:"_for",value:function(U,L){return this._blockNode(U),L&&this.code(L).endFor(),this}},{key:"for",value:function(U,L){return this._for(new b(U),L)}},{key:"forRange",value:function(U,L,X,ne){var ge=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,ae=this._scope.toName(U);return this._for(new C(ge,ae,L,X),function(){return ne(ae)})}},{key:"forOf",value:function(U,L,X){var ne=this,ge=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,ae=this._scope.toName(U);if(this.opts.es5){var De=L instanceof n.Name?L:this.var("_arr",L);return this.forRange("_i",0,(0,n._)(mJ||(mJ=fe(["",".length"])),De),function(be){ne.var(ae,(0,n._)(vJ||(vJ=fe(["","[","]"])),De,be)),X(ae)})}return this._for(new k("of",ge,ae,L),function(){return X(ae)})}},{key:"forIn",value:function(U,L,X){var ne=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(U,(0,n._)(yJ||(yJ=fe(["Object.keys(",")"])),L),X);var ge=this._scope.toName(U);return this._for(new k("in",ne,ge,L),function(){return X(ge)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(U){return this._leafNode(new c(U))}},{key:"break",value:function(U){return this._leafNode(new u(U))}},{key:"return",value:function(U){var L=new j;if(this._blockNode(L),this.code(U),1!==L.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(j)}},{key:"try",value:function(U,L,X){if(!L&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');var ne=new B;if(this._blockNode(ne),this.code(U),L){var ge=this.name("e");this._currNode=ne.catch=new N(ge),L(ge)}return X&&(this._currNode=ne.finally=new $,this.code(X)),this._endBlockNode(N,$)}},{key:"throw",value:function(U){return this._leafNode(new d(U))}},{key:"block",value:function(U,L){return this._blockStarts.push(this._nodes.length),U&&this.code(U).endBlock(L),this}},{key:"endBlock",value:function(U){var L=this._blockStarts.pop();if(void 0===L)throw new Error("CodeGen: not in self-balancing block");var X=this._nodes.length-L;if(X<0||void 0!==U&&X!==U)throw new Error("CodeGen: wrong number of nodes: ".concat(X," vs ").concat(U," expected"));return this._nodes.length=L,this}},{key:"func",value:function(U){var ne=arguments.length>3?arguments[3]:void 0;return this._blockNode(new T(U,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),ne&&this.code(ne).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(T)}},{key:"optimize",value:function(){for(var U=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;U-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(U){return this._currNode.nodes.push(U),this}},{key:"_blockNode",value:function(U){this._currNode.nodes.push(U),this._nodes.push(U)}},{key:"_endBlockNode",value:function(U,L){var X=this._currNode;if(X instanceof U||L&&X instanceof L)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(L?"".concat(U.kind,"/").concat(L.kind):U.kind,'"'))}},{key:"_elseNode",value:function(U){var L=this._currNode;if(!(L instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=L.else=U,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var U=this._nodes;return U[U.length-1]},set:function(U){var L=this._nodes;L[L.length-1]=U}}]),M}();function z(M,U){for(var L in U)M[L]=(M[L]||0)+(U[L]||0);return M}function Y(M,U){return U instanceof n._CodeOrName?z(M,U.names):M}function O(M,U,L){return M instanceof n.Name?X(M):(ne=M)instanceof n._Code&&ne._items.some(function(ge){return ge instanceof n.Name&&1===U[ge.str]&&void 0!==L[ge.str]})?new n._Code(M._items.reduce(function(ne,ge){return ge instanceof n.Name&&(ge=X(ge)),ge instanceof n._Code?ne.push.apply(ne,sn(ge._items)):ne.push(ge),ne},[])):M;var ne;function X(ne){var ge=L[ne.str];return void 0===ge||1!==U[ne.str]?ne:(delete U[ne.str],ge)}}function H(M,U){for(var L in U)M[L]=(M[L]||0)-(U[L]||0)}function G(M){return"boolean"==typeof M||"number"==typeof M||null===M?!M:(0,n._)(_J||(_J=fe(["!",""])),E(M))}t.CodeGen=V,t.not=G;var F=D(t.operators.AND);t.and=function(){for(var M=arguments.length,U=new Array(M),L=0;L1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var g in f)if(p[g])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,g=f.mergeToName,m=f.mergeValues,v=f.resultToName;return function(y,b,C,k){var T=void 0===C?b:C instanceof n.Name?(b instanceof n.Name?p(y,b,C):g(y,b,C),C):b instanceof n.Name?(g(y,C,b),b):m(b,C);return k!==n.Name||T instanceof n.Name?T:v(y,T)}}function l(f,p){if(!0===p)return f.var("props",!0);var g=f.var("props",(0,n._)(jJ||(jJ=fe(["{}"]))));return void 0!==p&&c(f,g,p),g}function c(f,p,g){Object.keys(g).forEach(function(m){return f.assign((0,n._)(PJ||(PJ=fe(["","",""])),p,(0,n.getProperty)(m)),!0)})}t.toHash=function(f){var p,g={},m=_e(f);try{for(m.s();!(p=m.n()).done;)g[p.value]=!0}catch(v){m.e(v)}finally{m.f()}return g},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var g in f)if("$ref"!==g&&p.all[g])return!0;return!1},t.schemaRefOrVal=function(f,p,g,m){var v=f.topSchemaRef,y=f.schemaPath;if(!m){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(xJ||(xJ=fe(["",""])),p)}return(0,n._)(CJ||(CJ=fe(["","","",""])),v,y,(0,n.getProperty)(g))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var g,m=_e(f);try{for(m.s();!(g=m.n()).done;)p(g.value)}catch(v){m.e(v)}finally{m.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,g){return f.if((0,n._)(SJ||(SJ=fe([""," !== true && "," !== undefined"])),g,p),function(){f.if((0,n._)(kJ||(kJ=fe([""," === true"])),p),function(){return f.assign(g,!0)},function(){return f.assign(g,(0,n._)(TJ||(TJ=fe([""," || {}"])),g)).code((0,n._)(DJ||(DJ=fe(["Object.assign(",", ",")"])),g,p))})})},mergeToName:function(f,p,g){return f.if((0,n._)(AJ||(AJ=fe([""," !== true"])),g),function(){!0===p?f.assign(g,!0):(f.assign(g,(0,n._)(EJ||(EJ=fe([""," || {}"])),g)),c(f,g,p))})},mergeValues:function(f,p){return!0===f||Ee(Ee({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,g){return f.if((0,n._)(MJ||(MJ=fe([""," !== true && "," !== undefined"])),g,p),function(){return f.assign(g,(0,n._)(OJ||(OJ=fe([""," === true ? true : "," > "," ? "," : ",""])),p,g,p,g,p))})},mergeToName:function(f,p,g){return f.if((0,n._)(IJ||(IJ=fe([""," !== true"])),g),function(){return f.assign(g,!0===p||(0,n._)(NJ||(NJ=fe([""," > "," ? "," : ",""])),g,p,g,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(g){if(p="strict mode: ".concat(p),!0===g)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,g){if(f instanceof n.Name){var m=p===u.Num;return(0,n._)(g?m?RJ||(RJ=fe(['"[" + ',' + "]"'])):LJ||(LJ=fe(['"[\'" + ',' + "\']"'])):m?FJ||(FJ=fe(['"/" + ',""])):$J||($J=fe(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return g?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Bi);var Eve,Mve,Ove,FT={};function Hf(){if(Eve)return FT;Eve=1,Object.defineProperty(FT,"__esModule",{value:!0});var t=Si(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return FT.default=n,FT}function $T(){return Mve||(Mve=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=Si(),e=Bi,i=Hf();function r(d,h){var f=d.const("err",h);d.if((0,n._)(ZJ||(ZJ=fe([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)(eK||(eK=fe(["[","]"])),f))},(0,n._)(tK||(tK=fe(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(nK||(nK=fe(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(iK||(iK=fe(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(rK||(rK=fe(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(BJ||(BJ=fe(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(VJ||(VJ=fe(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(HJ||(HJ=fe(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,g=d.it,m=g.gen,v=g.compositeRule,y=g.allErrors,b=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(m,b):o(g,(0,n._)(UJ||(UJ=fe(["[","]"])),b))},t.reportExtraError=function(d){var p=d.it,m=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),m||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(zJ||(zJ=fe([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(GJ||(GJ=fe(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,g=d.data,m=d.errsCount,v=d.it;if(void 0===m)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",m,i.default.errors,function(b){h.const(y,(0,n._)(WJ||(WJ=fe(["","[","]"])),i.default.vErrors,b)),h.if((0,n._)(qJ||(qJ=fe(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(YJ||(YJ=fe(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(JJ||(JJ=fe(["",".schemaPath"])),y),(0,n.str)(KJ||(KJ=fe(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(XJ||(XJ=fe(["",".schema"])),y),p),h.assign((0,n._)(QJ||(QJ=fe(["",".data"])),y),g))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(oK||(oK=fe(["{}"]))):function(p,g){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,m),c(p,m)];return function u(d,h,f){var p=h.params,g=h.message,v=d.data,y=d.schemaValue,b=d.it,C=b.opts,k=b.propertyName,T=b.topSchemaRef,j=b.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(cK||(cK=fe(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof g?g(d):g]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(uK||(uK=fe(["","",""])),T,j)],[i.default.data,v]),k&&f.push([s.propertyName,k])}(p,g,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,g=p?(0,n.str)(sK||(sK=fe(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,g)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,g=h.schemaPath,m=h.parentSchema?p:(0,n.str)(aK||(aK=fe(["","/",""])),p,f);return g&&(m=(0,n.str)(lK||(lK=fe(["","",""])),m,(0,e.getErrorPath)(g,e.Type.Str))),[s.schemaPath,m]}}(xve)),xve}var Db={},Eg={};Object.defineProperty(Eg,"__esModule",{value:!0}),Eg.getRules=Eg.isJSONType=void 0;var put=new Set(["string","number","integer","boolean","null","object","array"]);Eg.isJSONType=function(t){return"string"==typeof t&&put.has(t)},Eg.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ee(Ee({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var Ive,vh={};function Nve(){if(Ive)return vh;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return Ive=1,Object.defineProperty(vh,"__esModule",{value:!0}),vh.shouldUseRule=vh.shouldUseGroup=vh.schemaHasRulesForType=void 0,vh.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},vh.shouldUseGroup=t,vh.shouldUseRule=n,vh}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=Eg,i=Nve(),r=$T(),o=Si(),s=Bi;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var T,g=f.gen,m=f.data,v=f.opts,y=(T=v.coerceTypes)?p.filter(function(j){return l.has(j)||"array"===T&&"array"===j}):[],b=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(b){var C=u(p,m,v.strictNumbers,n.Wrong);g.if(C,function(){y.length?function(k,T,j){var B=k.gen,N=k.data,$=k.opts,V=B.let("dataType",(0,o._)(hK||(hK=fe(["typeof ",""])),N)),z=B.let("coerced",(0,o._)(fK||(fK=fe(["undefined"]))));"array"===$.coerceTypes&&B.if((0,o._)(pK||(pK=fe([""," == 'object' && Array.isArray(",") && ",".length == 1"])),V,N,N),function(){return B.assign(N,(0,o._)(gK||(gK=fe(["","[0]"])),N)).assign(V,(0,o._)(mK||(mK=fe(["typeof ",""])),N)).if(u(T,N,$.strictNumbers),function(){return B.assign(z,N)})}),B.if((0,o._)(vK||(vK=fe([""," !== undefined"])),z));var Y,O=_e(j);try{for(O.s();!(Y=O.n()).done;){var H=Y.value;(l.has(H)||"array"===H&&"array"===$.coerceTypes)&&G(H)}}catch(F){O.e(F)}finally{O.f()}function G(F){switch(F){case"string":return void B.elseIf((0,o._)(_K||(_K=fe(["",' == "number" || ',' == "boolean"'])),V,V)).assign(z,(0,o._)(bK||(bK=fe(['"" + ',""])),N)).elseIf((0,o._)(wK||(wK=fe([""," === null"])),N)).assign(z,(0,o._)(xK||(xK=fe(['""']))));case"number":return void B.elseIf((0,o._)(CK||(CK=fe(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),V,N,V,N,N,N)).assign(z,(0,o._)(SK||(SK=fe(["+",""])),N));case"integer":return void B.elseIf((0,o._)(kK||(kK=fe(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),V,N,V,N,N,N,N)).assign(z,(0,o._)(TK||(TK=fe(["+",""])),N));case"boolean":return void B.elseIf((0,o._)(DK||(DK=fe(["",' === "false" || '," === 0 || "," === null"])),N,N,N)).assign(z,!1).elseIf((0,o._)(AK||(AK=fe(["",' === "true" || '," === 1"])),N,N)).assign(z,!0);case"null":return B.elseIf((0,o._)(EK||(EK=fe(["",' === "" || '," === 0 || "," === false"])),N,N,N)),void B.assign(z,null);case"array":B.elseIf((0,o._)(MK||(MK=fe(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),V,V,V,N)).assign(z,(0,o._)(OK||(OK=fe(["[","]"])),N))}}B.else(),h(k),B.endIf(),B.if((0,o._)(yK||(yK=fe([""," !== undefined"])),z),function(){var F,Z,D,E,M;B.assign(N,z),Z=z,E=(F=k).parentData,M=F.parentDataProperty,(D=F.gen).if((0,o._)(IK||(IK=fe([""," !== undefined"])),E),function(){return D.assign((0,o._)(NK||(NK=fe(["","[","]"])),E,M),Z)})})}(f,p,y):h(f)})}return b};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,g){var m,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(jK||(jK=fe([""," "," null"])),p,y);case"array":m=(0,o._)(PK||(PK=fe(["Array.isArray(",")"])),p);break;case"object":m=(0,o._)(RK||(RK=fe([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":m=b((0,o._)(LK||(LK=fe(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":m=b();break;default:return(0,o._)(FK||(FK=fe(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?m:(0,o.not)(m);function b(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)($K||($K=fe(["typeof ",' == "number"'])),p),C,g?(0,o._)(BK||(BK=fe(["isFinite(",")"])),p):o.nil)}}function u(f,p,g,m){if(1===f.length)return c(f[0],p,g,m);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var b=(0,o._)(VK||(VK=fe(["typeof ",' != "object"'])),p);v=y.null?b:(0,o._)(HK||(HK=fe(["!"," || ",""])),p,b),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,g,m));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,g=f.schemaValue;return"string"==typeof p?(0,o._)(UK||(UK=fe(["{type: ","}"])),p):(0,o._)(zK||(zK=fe(["{type: ","}"])),g)}};function h(f){var g,m,v,y,b,p=(m=(g=f).gen,v=g.data,b=(0,s.schemaRefOrVal)(g,y=g.schema,"type"),{gen:m,keyword:"type",data:v,schema:y.type,schemaCode:b,schemaValue:b,parentSchema:y,params:{},it:g});(0,r.reportError)(p,d)}t.reportTypeError=h}(Db);var jve,Pve,Rve,Ab={},cu={},sr={};function uu(){if(Pve)return sr;Pve=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.validateUnion=sr.validateArray=sr.usePattern=sr.callValidateCode=sr.schemaProperties=sr.allSchemaProperties=sr.noPropertyInData=sr.propertyInData=sr.isOwnProperty=sr.hasPropFunc=sr.reportMissingProp=sr.checkMissingProp=sr.checkReportMissingProp=void 0;var t=Si(),n=Bi,e=Hf(),i=Bi;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(XK||(XK=fe(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(QK||(QK=fe(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(tX||(tX=fe(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}sr.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(JK||(JK=fe(["",""])),u)},!0),c.error()})},sr.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,sn(u.map(function(g){return(0,t.and)(s(h,f,g,p.ownProperties),(0,t._)(KK||(KK=fe([""," = ",""])),d,g))})))},sr.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},sr.hasPropFunc=r,sr.isOwnProperty=o,sr.propertyInData=function(c,u,d,h){var f=(0,t._)(ZK||(ZK=fe(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)(eX||(eX=fe([""," && ",""])),f,o(c,u,d)):f},sr.noPropertyInData=s,sr.allSchemaProperties=a,sr.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},sr.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,g=c.it,m=g.gen,v=g.topSchemaRef,y=g.schemaPath,b=g.errorPath,C=c.it,k=h?(0,t._)(nX||(nX=fe(["",", ",", ","",""])),f,p,v,y):p,T=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,b)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&T.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var j=(0,t._)(iX||(iX=fe(["",", ",""])),k,m.object.apply(m,T));return d!==t.nil?(0,t._)(rX||(rX=fe(["",".call(",", ",")"])),u,d,j):(0,t._)(oX||(oX=fe(["","(",")"])),u,j)};var l=(0,t._)(sX||(sX=fe(["new RegExp"])));return sr.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,g=p(u,f);return d.scopeValue("pattern",{key:g.toString(),ref:g,code:(0,t._)(aX||(aX=fe(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},sr.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var g=u.let("valid",!0);return m(function(){return u.assign(g,!1)}),g}return u.var(p,!0),m(function(){return u.break()}),p;function m(v){var y=u.const("len",(0,t._)(lX||(lX=fe(["",".length"])),d));u.forRange("i",0,y,function(b){c.subschema({keyword:h,dataProp:b,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},sr.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(m){return(0,n.alwaysValidSchema)(f,m)})||f.opts.unevaluated){var p=u.let("valid",!1),g=u.name("_valid");u.block(function(){return d.forEach(function(m,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},g);u.assign(p,(0,t._)(cX||(cX=fe([""," || ",""])),p,g)),c.mergeValidEvaluated(y,g)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},sr}var Lve,yh={},Ws={},Fve=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==xt(n)&&"object"==xt(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},v4={},mut={get exports(){return v4},set exports(t){v4=t}},Uf=mut.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),BT(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function BT(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==xt(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in Uf.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!y4(t):!!n&&$ve(t)<=n)};var wut=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function y4(t){for(var n in t){if(wut.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(y4)||"object"==xt(e)&&y4(e))return!0}return!1}function $ve(t){var n=0;for(var e in t)if("$ref"===e||(n++,!but.has(e)&&("object"==xt(t[e])&&(0,vut.eachItem)(t[e],function(i){return n+=$ve(i)}),n===1/0)))return 1/0;return n}function Bve(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=A0(n));var i=t.parse(n);return Vve(t,i)}function Vve(t,n){return t.serialize(n).split("#")[0]+"#"}Ws.getFullPath=Bve,Ws._getFullPath=Vve;var xut=/#\/?$/;function A0(t){return t?t.replace(xut,""):""}Ws.normalizeId=A0,Ws.resolveUrl=function(t,n,e){return e=A0(e),t.resolve(n,e)};var Hve,Cut=/^[a-z_][-a-z0-9._]*$/i;function VT(){if(Hve)return mh;Hve=1,Object.defineProperty(mh,"__esModule",{value:!0}),mh.getData=mh.KeywordCxt=mh.validateFunctionCode=void 0;var t=function(){if(Ove)return Ag;Ove=1,Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.boolOrEmptySchema=Ag.topBoolOrEmptySchema=void 0;var O=$T(),H=Si(),G=Hf(),F={message:"boolean schema is false"};function Z(D,E){(0,O.reportError)({gen:D.gen,keyword:"false schema",data:D.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:D},F,void 0,E)}return Ag.topBoolOrEmptySchema=function(D){var E=D.gen,M=D.schema,U=D.validateName;!1===M?Z(D,!1):"object"==xt(M)&&!0===M.$async?E.return(G.default.data):(E.assign((0,H._)(dK||(dK=fe(["",".errors"])),U),null),E.return(!0))},Ag.boolOrEmptySchema=function(D,E){var M=D.gen;!1===D.schema?(M.var(E,!1),Z(D)):M.var(E,!0)},Ag}(),n=Db,e=Nve(),i=Db,r=function(){if(jve)return Ab;jve=1,Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.assignDefaults=void 0;var O=Si(),H=Bi;function G(F,Z,D){var E=F.gen,M=F.compositeRule,U=F.data,L=F.opts;if(void 0!==D){var X=(0,O._)(GK||(GK=fe(["","",""])),U,(0,O.getProperty)(Z));if(M)(0,H.checkStrictMode)(F,"default is ignored for: ".concat(X));else{var ne=(0,O._)(WK||(WK=fe([""," === undefined"])),X);"empty"===L.useDefaults&&(ne=(0,O._)(qK||(qK=fe([""," || "," === null || ",' === ""'])),ne,X,X)),E.if(ne,(0,O._)(YK||(YK=fe([""," = ",""])),X,(0,O.stringify)(D)))}}}return Ab.assignDefaults=function(F,Z){var D=F.schema,E=D.properties,M=D.items;if("object"===Z&&E)for(var U in E)G(F,U,E[U].default);else"array"===Z&&Array.isArray(M)&&M.forEach(function(L,X){return G(F,X,L.default)})},Ab}(),o=function gut(){if(Rve)return cu;Rve=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.validateKeywordUsage=cu.validSchemaType=cu.funcKeywordCode=cu.macroKeywordCode=void 0;var t=Si(),n=Hf(),e=uu(),i=$T();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(mX||(mX=fe(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return cu.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var g=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},g),s.pass(g,function(){return s.error(!0)})},cu.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,k){if(k.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var g=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,m=o(c,u,g),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(pX||(pX=fe(["await "]))):t.nil,k=p.opts.passContext?n.default.this:n.default.self,T=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(gX||(gX=fe(["","",""])),C,(0,e.callValidateCode)(s,m,k,T)),a.modifying)}function b(C){var k;c.if((0,t.not)(null!==(k=a.valid)&&void 0!==k?k:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),b(function(){return s.error()});else{var C=a.async?(T=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(uX||(uX=fe(["await "]))))},function(j){return c.assign(v,!1).if((0,t._)(dX||(dX=fe([""," instanceof ",""])),j,p.ValidationError),function(){return c.assign(T,(0,t._)(hX||(hX=fe(["",".errors"])),j))},function(){return c.throw(j)})}),T):(k=(0,t._)(fX||(fX=fe(["",".errors"])),m),c.assign(k,null),y(t.nil),k);a.modifying&&r(s),b(function(){return function(T,j){var B=T.gen;B.if((0,t._)(vX||(vX=fe(["Array.isArray(",")"])),j),function(){B.assign(n.default.vErrors,(0,t._)(yX||(yX=fe([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,j,n.default.vErrors,j)).assign(n.default.errors,(0,t._)(_X||(_X=fe(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(T)},function(){return T.error()})}(s,C)})}var T,k}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},cu.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==xt(s)&&!Array.isArray(s):xt(s)==c||l&&void 0===s})},cu.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(g){return!Object.prototype.hasOwnProperty.call(c,g)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},cu}(),s=function(){if(Lve)return yh;Lve=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.extendSubschemaMode=yh.extendSubschemaData=yh.getSubschema=void 0;var O=Si(),H=Bi;return yh.getSubschema=function(G,F){var Z=F.keyword,D=F.schemaProp,E=F.schema,M=F.schemaPath,U=F.errSchemaPath,L=F.topSchemaRef;if(void 0!==Z&&void 0!==E)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==Z){var X=G.schema[Z];return void 0===D?{schema:X,schemaPath:(0,O._)(bX||(bX=fe(["","",""])),G.schemaPath,(0,O.getProperty)(Z)),errSchemaPath:"".concat(G.errSchemaPath,"/").concat(Z)}:{schema:X[D],schemaPath:(0,O._)(wX||(wX=fe(["","","",""])),G.schemaPath,(0,O.getProperty)(Z),(0,O.getProperty)(D)),errSchemaPath:"".concat(G.errSchemaPath,"/").concat(Z,"/").concat((0,H.escapeFragment)(D))}}if(void 0!==E){if(void 0===M||void 0===U||void 0===L)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:E,schemaPath:M,topSchemaRef:L,errSchemaPath:U}}throw new Error('either "keyword" or "schema" must be passed')},yh.extendSubschemaData=function(G,F,Z){var D=Z.dataProp,E=Z.dataPropType,M=Z.data,U=Z.dataTypes,L=Z.propertyName;if(void 0!==M&&void 0!==D)throw new Error('both "data" and "dataProp" passed, only one allowed');var X=F.gen;if(void 0!==D){var ne=F.errorPath,ge=F.dataPathArr,ae=F.opts;De(X.let("data",(0,O._)(xX||(xX=fe(["","",""])),F.data,(0,O.getProperty)(D)),!0)),G.errorPath=(0,O.str)(CX||(CX=fe(["","",""])),ne,(0,H.getErrorPath)(D,E,ae.jsPropertySyntax)),G.parentDataProperty=(0,O._)(SX||(SX=fe(["",""])),D),G.dataPathArr=[].concat(sn(ge),[G.parentDataProperty])}function De(be){G.data=be,G.dataLevel=F.dataLevel+1,G.dataTypes=[],F.definedProperties=new Set,G.parentData=F.data,G.dataNames=[].concat(sn(F.dataNames),[be])}void 0!==M&&(De(M instanceof O.Name?M:X.let("data",M,!0)),void 0!==L&&(G.propertyName=L)),U&&(G.dataTypes=U)},yh.extendSubschemaMode=function(G,F){var Z=F.jtdDiscriminator,D=F.jtdMetadata,E=F.compositeRule,M=F.createErrors,U=F.allErrors;void 0!==E&&(G.compositeRule=E),void 0!==M&&(G.createErrors=M),void 0!==U&&(G.allErrors=U),G.jtdDiscriminator=Z,G.jtdMetadata=D},yh}(),a=Si(),l=Hf(),c=Ws,u=Bi,d=$T();function h(O,H){var M,G=O.gen,F=O.validateName,Z=O.schema,D=O.schemaEnv,E=O.opts;E.code.es5?G.func(F,(0,a._)(kX||(kX=fe(["",", ",""])),l.default.data,l.default.valCxt),D.$async,function(){var M,U;G.code((0,a._)(TX||(TX=fe(['"use strict"; ',""])),f(Z,E))),U=E,(M=G).if(l.default.valCxt,function(){M.var(l.default.instancePath,(0,a._)(MX||(MX=fe(["",".",""])),l.default.valCxt,l.default.instancePath)),M.var(l.default.parentData,(0,a._)(OX||(OX=fe(["",".",""])),l.default.valCxt,l.default.parentData)),M.var(l.default.parentDataProperty,(0,a._)(IX||(IX=fe(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),M.var(l.default.rootData,(0,a._)(NX||(NX=fe(["",".",""])),l.default.valCxt,l.default.rootData)),U.dynamicRef&&M.var(l.default.dynamicAnchors,(0,a._)(jX||(jX=fe(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){M.var(l.default.instancePath,(0,a._)(PX||(PX=fe(['""'])))),M.var(l.default.parentData,(0,a._)(RX||(RX=fe(["undefined"])))),M.var(l.default.parentDataProperty,(0,a._)(LX||(LX=fe(["undefined"])))),M.var(l.default.rootData,l.default.data),U.dynamicRef&&M.var(l.default.dynamicAnchors,(0,a._)(FX||(FX=fe(["{}"]))))}),G.code(H)}):G.func(F,(0,a._)(DX||(DX=fe(["",", ",""])),l.default.data,(M=E,(0,a._)(AX||(AX=fe(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,M.dynamicRef?(0,a._)(EX||(EX=fe([", ","={}"])),l.default.dynamicAnchors):a.nil))),D.$async,function(){return G.code(f(Z,E)).code(H)})}function f(O,H){var G="object"==xt(O)&&O[H.schemaId];return G&&(H.code.source||H.code.process)?(0,a._)(WX||(WX=fe(["/*# sourceURL="," */"])),G):a.nil}function g(O){var H=O.schema,G=O.self;if("boolean"==typeof H)return!H;for(var F in H)if(G.RULES.all[F])return!0;return!1}function m(O){return"boolean"!=typeof O.schema}function v(O){var H,G,F,D;(0,u.checkUnknownRules)(O),F=(H=O).errSchemaPath,D=H.self,(G=H.schema).$ref&&H.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(G,D.RULES)&&D.logger.warn('$ref: keywords ignored in schema at path "'.concat(F,'"'))}function y(O,H){if(O.opts.jtd)return C(O,[],!1,H);var G=(0,n.getSchemaTypes)(O.schema);C(O,G,!(0,n.coerceAndCheckDataType)(O,G),H)}function b(O){var H=O.gen,G=O.schemaEnv,Z=O.errSchemaPath,D=O.opts,E=O.schema.$comment;if(!0===D.$comment)H.code((0,a._)(YX||(YX=fe(["",".logger.log(",")"])),l.default.self,E));else if("function"==typeof D.$comment){var M=(0,a.str)(JX||(JX=fe(["","/$comment"])),Z),U=H.scopeValue("root",{ref:G.root});H.code((0,a._)(KX||(KX=fe(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,E,M,U))}}function C(O,H,G,F){var ne,ge,ae,De,Z=O.gen,D=O.schema,E=O.data,M=O.allErrors,U=O.opts,L=O.self.RULES;function X(ne){(0,e.shouldUseGroup)(D,ne)&&(ne.type?(Z.if((0,i.checkDataType)(ne.type,E,U.strictNumbers)),k(O,ne),1===H.length&&H[0]===ne.type&&G&&(Z.else(),(0,i.reportTypeError)(O)),Z.endIf()):k(O,ne),M||Z.if((0,a._)(iQ||(iQ=fe([""," === ",""])),l.default.errors,F||0)))}!D.$ref||!U.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(D,L)?(U.jtd||(ge=H,(ne=O).schemaEnv.meta||!ne.opts.strictTypes||(function(ae,De){if(De.length){if(!ae.dataTypes.length)return void(ae.dataTypes=De);De.forEach(function(be){j(ae.dataTypes,be)||B(ae,'type "'.concat(be,'" not allowed by context "').concat(ae.dataTypes.join(","),'"'))}),function(be,Ie){var R,J=[],K=_e(be.dataTypes);try{for(K.s();!(R=K.n()).done;){var pe=R.value;j(Ie,pe)?J.push(pe):Ie.includes("integer")&&"number"===pe&&J.push("integer")}}catch(Te){K.e(Te)}finally{K.f()}be.dataTypes=J}(ae,De)}}(ne,ge),ne.opts.allowUnionTypes||(ae=ne,(De=ge).length>1&&(2!==De.length||!De.includes("null"))&&B(ae,"use allowUnionTypes to allow union type keyword")),function(ae,De){var be=ae.self.RULES.all;for(var Ie in be){var R=be[Ie];if("object"==xt(R)&&(0,e.shouldUseRule)(ae.schema,R)){var J=R.definition.type;J.length&&!J.some(function(K){return T(De,K)})&&B(ae,'missing type "'.concat(J.join(","),'" for keyword "').concat(Ie,'"'))}}}(ne,ne.dataTypes))),Z.block(function(){var ne,ge=_e(L.rules);try{for(ge.s();!(ne=ge.n()).done;)X(ne.value)}catch(ae){ge.e(ae)}finally{ge.f()}X(L.post)})):Z.block(function(){return $(O,"$ref",L.all.$ref.definition)})}function k(O,H){var G=O.gen,F=O.schema;O.opts.useDefaults&&(0,r.assignDefaults)(O,H.type),G.block(function(){var Z,D=_e(H.rules);try{for(D.s();!(Z=D.n()).done;){var E=Z.value;(0,e.shouldUseRule)(F,E)&&$(O,E.keyword,E.definition,H.type)}}catch(M){D.e(M)}finally{D.f()}})}function T(O,H){return O.includes(H)||"number"===H&&O.includes("integer")}function j(O,H){return O.includes(H)||"integer"===H&&O.includes("number")}function B(O,H){H+=' at "'.concat(O.schemaEnv.baseId+O.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(O,H,O.opts.strictTypes)}mh.validateFunctionCode=function(O){var H,G,F,Z;m(O)&&(v(O),g(O))?(G=(H=O).schema,F=H.opts,Z=H.gen,h(H,function(){var D,M;F.$comment&&G.$comment&&b(H),M=(D=H).opts,void 0!==D.schema.default&&M.useDefaults&&M.strictSchema&&(0,u.checkStrictMode)(D,"default is ignored in the schema root"),Z.let(l.default.vErrors,null),Z.let(l.default.errors,0),F.unevaluated&&function(D){var E=D.gen,M=D.validateName;D.evaluated=E.const("evaluated",(0,a._)($X||($X=fe(["",".evaluated"])),M)),E.if((0,a._)(BX||(BX=fe(["",".dynamicProps"])),D.evaluated),function(){return E.assign((0,a._)(VX||(VX=fe(["",".props"])),D.evaluated),(0,a._)(HX||(HX=fe(["undefined"]))))}),E.if((0,a._)(UX||(UX=fe(["",".dynamicItems"])),D.evaluated),function(){return E.assign((0,a._)(zX||(zX=fe(["",".items"])),D.evaluated),(0,a._)(GX||(GX=fe(["undefined"]))))})}(H),y(H),function(D){var ne,ge,ae,De,be,E=D.gen,U=D.validateName,L=D.ValidationError,X=D.opts;D.schemaEnv.$async?E.if((0,a._)(XX||(XX=fe([""," === 0"])),l.default.errors),function(){return E.return(l.default.data)},function(){return E.throw((0,a._)(QX||(QX=fe(["new ","(",")"])),L,l.default.vErrors))}):(E.assign((0,a._)(ZX||(ZX=fe(["",".errors"])),U),l.default.vErrors),X.unevaluated&&(ge=(ne=D).gen,ae=ne.evaluated,be=ne.items,(De=ne.props)instanceof a.Name&&ge.assign((0,a._)(tQ||(tQ=fe(["",".props"])),ae),De),be instanceof a.Name&&ge.assign((0,a._)(nQ||(nQ=fe(["",".items"])),ae),be)),E.return((0,a._)(eQ||(eQ=fe([""," === 0"])),l.default.errors)))}(H)})):h(O,function(){return(0,t.topBoolOrEmptySchema)(O)})};var N=function(){function O(H,G,F){if(ue(this,O),(0,o.validateKeywordUsage)(H,G,F),this.gen=H.gen,this.allErrors=H.allErrors,this.keyword=F,this.data=H.data,this.schema=H.schema[F],this.$data=G.$data&&H.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(H,this.schema,F,this.$data),this.schemaType=G.schemaType,this.parentSchema=H.schema,this.params={},this.it=H,this.def=G,this.$data)this.schemaCode=H.gen.const("vSchema",Y(this.$data,H));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,G.schemaType,G.allowUndefined))throw new Error("".concat(F," value must be ").concat(JSON.stringify(G.schemaType)));("code"in G?G.trackErrors:!1!==G.errors)&&(this.errsCount=H.gen.const("_errs",l.default.errors))}return de(O,[{key:"result",value:function(H,G,F){this.failResult((0,a.not)(H),G,F)}},{key:"failResult",value:function(H,G,F){this.gen.if(H),F?F():this.error(),G?(this.gen.else(),G(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(H,G){this.failResult((0,a.not)(H),void 0,G)}},{key:"fail",value:function(H){if(void 0===H)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(H),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(H){if(!this.$data)return this.fail(H);var G=this.schemaCode;this.fail((0,a._)(rQ||(rQ=fe([""," !== undefined && (",")"])),G,(0,a.or)(this.invalid$data(),H)))}},{key:"error",value:function(H,G,F){if(G)return this.setParams(G),this._error(H,F),void this.setParams({});this._error(H,F)}},{key:"_error",value:function(H,G){(H?d.reportExtraError:d.reportError)(this,this.def.error,G)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(H){this.allErrors||this.gen.if(H)}},{key:"setParams",value:function(H,G){G?Object.assign(this.params,H):this.params=H}},{key:"block$data",value:function(H,G){var F=this,Z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){F.check$data(H,Z),G()})}},{key:"check$data",value:function(){var H=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,G=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var F=this.gen,Z=this.schemaCode,D=this.schemaType,E=this.def;F.if((0,a.or)((0,a._)(oQ||(oQ=fe([""," === undefined"])),Z),G)),H!==a.nil&&F.assign(H,!0),(D.length||E.validateSchema)&&(F.elseIf(this.invalid$data()),this.$dataError(),H!==a.nil&&F.assign(H,!1)),F.else()}}},{key:"invalid$data",value:function(){var H=this.gen,G=this.schemaCode,F=this.schemaType,Z=this.def,D=this.it;return(0,a.or)(function(){if(F.length){if(!(G instanceof a.Name))throw new Error("ajv implementation error");var E=Array.isArray(F)?F:[F];return(0,a._)(sQ||(sQ=fe(["",""])),(0,i.checkDataTypes)(E,G,D.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(Z.validateSchema){var E=H.scopeValue("validate$data",{ref:Z.validateSchema});return(0,a._)(aQ||(aQ=fe(["!","(",")"])),E,G)}return a.nil}())}},{key:"subschema",value:function(H,G){var F=(0,s.getSubschema)(this.it,H);(0,s.extendSubschemaData)(F,this.it,H),(0,s.extendSubschemaMode)(F,H);var Z=Ee(Ee(Ee({},this.it),F),{},{items:void 0,props:void 0});return function p(O,H){m(O)&&(v(O),g(O))?function(G,F){var M,U,D=G.gen;G.opts.$comment&&G.schema.$comment&&b(G),(U=(M=G).schema[M.opts.schemaId])&&(M.baseId=(0,c.resolveUrl)(M.opts.uriResolver,M.baseId,U)),function(M){if(M.schema.$async&&!M.schemaEnv.$async)throw new Error("async schema in sync schema")}(G);var E=D.const("_errs",l.default.errors);y(G,E),D.var(F,(0,a._)(qX||(qX=fe([""," === ",""])),E,l.default.errors))}(O,H):(0,t.boolOrEmptySchema)(O,H)}(Z,G),Z}},{key:"mergeEvaluated",value:function(H,G){var F=this.it,Z=this.gen;F.opts.unevaluated&&(!0!==F.props&&void 0!==H.props&&(F.props=u.mergeEvaluated.props(Z,H.props,F.props,G)),!0!==F.items&&void 0!==H.items&&(F.items=u.mergeEvaluated.items(Z,H.items,F.items,G)))}},{key:"mergeValidEvaluated",value:function(H,G){var F=this,Z=this.it;if(Z.opts.unevaluated&&(!0!==Z.props||!0!==Z.items))return this.gen.if(G,function(){return F.mergeEvaluated(H,a.Name)}),!0}}]),O}();function $(O,H,G,F){var Z=new N(O,G,H);"code"in G?G.code(Z,F):Z.$data&&G.validate?(0,o.funcKeywordCode)(Z,G):"macro"in G?(0,o.macroKeywordCode)(Z,G):(G.compile||G.validate)&&(0,o.funcKeywordCode)(Z,G)}mh.KeywordCxt=N;var V=/^\/(?:[^~]|~0|~1)*$/,z=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Y(O,H){var G,F,Z=H.dataLevel,D=H.dataNames,E=H.dataPathArr;if(""===O)return l.default.rootData;if("/"===O[0]){if(!V.test(O))throw new Error("Invalid JSON-pointer: ".concat(O));G=O,F=l.default.rootData}else{var M=z.exec(O);if(!M)throw new Error("Invalid JSON-pointer: ".concat(O));var U=+M[1];if("#"===(G=M[2])){if(U>=Z)throw new Error(ae("property/index",U));return E[Z-U]}if(U>Z)throw new Error(ae("data",U));if(F=D[Z-U],!G)return F}var L,X=F,ne=_e(G.split("/"));try{for(ne.s();!(L=ne.n()).done;){var ge=L.value;ge&&(F=(0,a._)(lQ||(lQ=fe(["","",""])),F,(0,a.getProperty)((0,u.unescapeJsonPointer)(ge))),X=(0,a._)(cQ||(cQ=fe([""," && ",""])),X,F))}}catch(De){ne.e(De)}finally{ne.f()}return X;function ae(De,be){return"Cannot access ".concat(De," ").concat(be," levels up, current level is ").concat(Z)}}return mh.getData=Y,mh}Ws.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=A0(t[r]||n),a={"":s},l=Bve(o,s,!1),c={},u=new Set;return _ut(t,{allKeys:!0},function(f,p,g,m){if(void 0!==m){var v=l+p,y=a[m];"string"==typeof f[r]&&(y=b.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function b(k){if(k=A0(y?(0,this.opts.uriResolver.resolve)(y,k):k),u.has(k))throw h(k);u.add(k);var j=this.refs[k];return"string"==typeof j&&(j=this.refs[j]),"object"==xt(j)?d(f,j.schema,k):k!==A0(v)&&("#"===k[0]?(d(f,c[k],k),c[k]=f):this.refs[k]=v),k}function C(k){if("string"==typeof k){if(!Cut.test(k))throw new Error('invalid anchor "'.concat(k,'"'));b.call(this,"#".concat(k))}}}),c;function d(f,p,g){if(void 0!==p&&!yut(f,p))throw h(g)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var Uve,HT={};function _4(){if(Uve)return HT;Uve=1,Object.defineProperty(HT,"__esModule",{value:!0});var t=function(n){We(i,r_(Error));var e=qe(i);function i(r){var o;return ue(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return de(i)}();return HT.default=t,HT}var zve,UT={};function b4(){if(zve)return UT;zve=1,Object.defineProperty(UT,"__esModule",{value:!0});var t=Ws,n=function(e){We(r,r_(Error));var i=qe(r);function r(o,s,a,l){var c;return ue(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return de(r)}();return UT.default=n,UT}var Za={};Object.defineProperty(Za,"__esModule",{value:!0}),Za.resolveSchema=Za.getCompilingSchema=Za.resolveRef=Za.compileSchema=Za.SchemaEnv=void 0;var du=Si(),Sut=_4(),Mg=Hf(),hu=Ws,Gve=Bi,kut=VT(),zT=de(function t(n){var e,i;ue(this,t),this.refs={},this.dynamicAnchors={},"object"==xt(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,hu.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function w4(t){var n=Wve.call(this,t);if(n)return n;var e,i=(0,hu.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new du.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:Sut.default,code:(0,du._)(uQ||(uQ=fe(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:Mg.default.data,parentData:Mg.default.parentData,parentDataProperty:Mg.default.parentDataProperty,dataNames:[Mg.default.data],dataPathArr:[du.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,du.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:du.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,du._)(dQ||(dQ=fe(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,kut.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(Mg.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(Mg.default.self),"".concat(Mg.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,g=d.items;f.evaluated={props:p instanceof du.Name?void 0:p,items:g instanceof du.Name?void 0:g,dynamicProps:p instanceof du.Name,dynamicItems:g instanceof du.Name},f.source&&(f.source.evaluated=(0,du.stringify)(f.evaluated))}return t.validate=f,t}catch(m){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),m}finally{this._compilations.delete(t)}}function Tut(t){return(0,hu.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:w4.call(this,t)}function Wve(t){var n,e,i,r=_e(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function Dut(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||GT.call(this,t,n)}function GT(t,n){var e=this.opts.uriResolver.parse(n),i=(0,hu._getFullPath)(this.opts.uriResolver,e),r=(0,hu.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return x4.call(this,e,t);var o=(0,hu.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=GT.call(this,t,s);return"object"!==xt(a?.schema)?void 0:x4.call(this,e,a)}if("object"===xt(s?.schema)){if(s.validate||w4.call(this,s),o===(0,hu.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,hu.resolveUrl)(this.opts.uriResolver,r,u)),new zT({schema:l,schemaId:c,root:t,baseId:r})}return x4.call(this,e,s)}}Za.SchemaEnv=zT,Za.compileSchema=w4,Za.resolveRef=function(t,n,e){var i;e=(0,hu.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=Dut.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new zT({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=Tut.call(this,o):void 0},Za.getCompilingSchema=Wve,Za.resolveSchema=GT;var Aut=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function x4(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=_e(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,Gve.unescapeFragment)(c)];if(void 0===u)return;var d="object"===xt(r=u)&&r[this.opts.schemaId];!Aut.has(c)&&d&&(i=(0,hu.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,Gve.schemaHasRulesButRef)(r,this.RULES)){var h=(0,hu.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=GT.call(this,o,h)}return(a=a||new zT({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var Eut={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},C4={},qve={};(function(t){function n(){for(var le=arguments.length,Ce=Array(le),ke=0;ke1){Ce[0]=Ce[0].slice(0,-1);for(var Pe=Ce.length-1,Se=1;Se= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=Math.floor,V=String.fromCharCode;function z(le){throw new RangeError(B[le])}function O(le,Ce){var ke=le.split("@"),Pe="";return ke.length>1&&(Pe=ke[0]+"@",le=ke[1]),Pe+function Y(le,Ce){for(var ke=[],Pe=le.length;Pe--;)ke[Pe]=Ce(le[Pe]);return ke}((le=le.replace(j,".")).split("."),Ce).join(".")}function H(le){for(var Ce=[],ke=0,Pe=le.length;ke=55296&&Se<=56319&&ke>1,le+=$(le/Ce);le>455;Pe+=f)le=$(le/35);return $(Pe+36*le/(le+38))},E=function(le){var Ce=[],ke=le.length,Pe=0,Se=128,At=72,rn=le.lastIndexOf("-");rn<0&&(rn=0);for(var hn=0;hn=128&&z("not-basic"),Ce.push(le.charCodeAt(hn));for(var dn=rn>0?rn+1:0;dn=ke&&z("invalid-input");var bi=F(le.charCodeAt(dn++));(bi>=f||bi>$((h-Pe)/Yi))&&z("overflow"),Pe+=bi*Yi;var he=vn<=At?1:vn>=At+26?26:vn-At;if(bi$(h/Ye)&&z("overflow"),Yi*=Ye}var ot=Ce.length+1;At=D(Pe-Di,ot,0==Di),$(Pe/ot)>h-Se&&z("overflow"),Se+=$(Pe/ot),Pe%=ot,Ce.splice(Pe++,0,Se)}return String.fromCodePoint.apply(String,Ce)},M=function(le){var Ce=[],ke=(le=H(le)).length,Pe=128,Se=0,At=72,rn=!0,hn=!1,dn=void 0;try{for(var Di,Yi=le[Symbol.iterator]();!(rn=(Di=Yi.next()).done);rn=!0){var vn=Di.value;vn<128&&Ce.push(V(vn))}}catch(mu){hn=!0,dn=mu}finally{try{!rn&&Yi.return&&Yi.return()}finally{if(hn)throw dn}}var bi=Ce.length,he=bi;for(bi&&Ce.push("-");he=Pe&&Vt$((h-Se)/tn)&&z("overflow"),Se+=(Ye-Pe)*tn,Pe=Ye;var Xt=!0,wi=!1,Oi=void 0;try{for(var Nr,us=le[Symbol.iterator]();!(Xt=(Nr=us.next()).done);Xt=!0){var pu=Nr.value;if(puh&&z("overflow"),pu==Pe){for(var mc=Se,ds=f;;ds+=f){var Ma=ds<=At?1:ds>=At+26?26:ds-At;if(mc>6|192).toString(16).toUpperCase()+"%"+(63&Ce|128).toString(16).toUpperCase():"%"+(Ce>>12|224).toString(16).toUpperCase()+"%"+(Ce>>6&63|128).toString(16).toUpperCase()+"%"+(63&Ce|128).toString(16).toUpperCase()}function ae(le){for(var Ce="",ke=0,Pe=le.length;ke=194&&Se<224){if(Pe-ke>=6){var At=parseInt(le.substr(ke+4,2),16);Ce+=String.fromCharCode((31&Se)<<6|63&At)}else Ce+=le.substr(ke,6);ke+=6}else if(Se>=224){if(Pe-ke>=9){var rn=parseInt(le.substr(ke+4,2),16),hn=parseInt(le.substr(ke+7,2),16);Ce+=String.fromCharCode((15&Se)<<12|(63&rn)<<6|63&hn)}else Ce+=le.substr(ke,9);ke+=9}else Ce+=le.substr(ke,3),ke+=3}return Ce}function De(le,Ce){function ke(Pe){var Se=ae(Pe);return Se.match(Ce.UNRESERVED)?Se:Pe}return le.scheme&&(le.scheme=String(le.scheme).replace(Ce.PCT_ENCODED,ke).toLowerCase().replace(Ce.NOT_SCHEME,"")),void 0!==le.userinfo&&(le.userinfo=String(le.userinfo).replace(Ce.PCT_ENCODED,ke).replace(Ce.NOT_USERINFO,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.host&&(le.host=String(le.host).replace(Ce.PCT_ENCODED,ke).toLowerCase().replace(Ce.NOT_HOST,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.path&&(le.path=String(le.path).replace(Ce.PCT_ENCODED,ke).replace(le.scheme?Ce.NOT_PATH:Ce.NOT_PATH_NOSCHEME,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.query&&(le.query=String(le.query).replace(Ce.PCT_ENCODED,ke).replace(Ce.NOT_QUERY,ge).replace(Ce.PCT_ENCODED,r)),void 0!==le.fragment&&(le.fragment=String(le.fragment).replace(Ce.PCT_ENCODED,ke).replace(Ce.NOT_FRAGMENT,ge).replace(Ce.PCT_ENCODED,r)),le}function be(le){return le.replace(/^0*(.*)/,"$1")||"0"}function Ie(le,Ce){var ke=le.match(Ce.IPV4ADDRESS)||[],Pe=u(ke,2)[1];return Pe?Pe.split(".").map(be).join("."):le}function R(le,Ce){var ke=le.match(Ce.IPV6ADDRESS)||[],Pe=u(ke,3),Se=Pe[1],At=Pe[2];if(Se){for(var rn=Se.toLowerCase().split("::").reverse(),hn=u(rn,2),dn=hn[0],Di=hn[1],Yi=Di?Di.split(":").map(be):[],vn=dn.split(":").map(be),bi=Ce.IPV4ADDRESS.test(vn[vn.length-1]),he=bi?7:8,Ye=vn.length-he,ot=Array(he),ht=0;ht1){var Rn=ot.slice(0,vt.index),Vt=ot.slice(vt.index+vt.length);on=Rn.join(":")+"::"+Vt.join(":")}else on=ot.join(":");return At&&(on+="%"+At),on}return le}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,K=void 0==="".match(/(){0}/)[1];function pe(le){var Ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},ke={},Pe=!1!==Ce.iri?c:l;"suffix"===Ce.reference&&(le=(Ce.scheme?Ce.scheme+":":"")+"//"+le);var Se=le.match(J);if(Se){K?(ke.scheme=Se[1],ke.userinfo=Se[3],ke.host=Se[4],ke.port=parseInt(Se[5],10),ke.path=Se[6]||"",ke.query=Se[7],ke.fragment=Se[8],isNaN(ke.port)&&(ke.port=Se[5])):(ke.scheme=Se[1]||void 0,ke.userinfo=-1!==le.indexOf("@")?Se[3]:void 0,ke.host=-1!==le.indexOf("//")?Se[4]:void 0,ke.port=parseInt(Se[5],10),ke.path=Se[6]||"",ke.query=-1!==le.indexOf("?")?Se[7]:void 0,ke.fragment=-1!==le.indexOf("#")?Se[8]:void 0,isNaN(ke.port)&&(ke.port=le.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Se[4]:void 0)),ke.host&&(ke.host=R(Ie(ke.host,Pe),Pe)),ke.reference=void 0!==ke.scheme||void 0!==ke.userinfo||void 0!==ke.host||void 0!==ke.port||ke.path||void 0!==ke.query?void 0===ke.scheme?"relative":void 0===ke.fragment?"absolute":"uri":"same-document",Ce.reference&&"suffix"!==Ce.reference&&Ce.reference!==ke.reference&&(ke.error=ke.error||"URI is not a "+Ce.reference+" reference.");var At=ne[(Ce.scheme||ke.scheme||"").toLowerCase()];if(Ce.unicodeSupport||At&&At.unicodeSupport)De(ke,Pe);else{if(ke.host&&(Ce.domainHost||At&&At.domainHost))try{ke.host=X.toASCII(ke.host.replace(Pe.PCT_ENCODED,ae).toLowerCase())}catch(rn){ke.error=ke.error||"Host's domain name can not be converted to ASCII via punycode: "+rn}De(ke,l)}At&&At.parse&&At.parse(ke,Ce)}else ke.error=ke.error||"URI can not be parsed.";return ke}var ye=/^\.\.?\//,Ue=/^\/\.(\/|$)/,Je=/^\/\.\.(\/|$)/,_t=/^\/?(?:.|\n)*?(?=\/|$)/;function zt(le){for(var Ce=[];le.length;)if(le.match(ye))le=le.replace(ye,"");else if(le.match(Ue))le=le.replace(Ue,"/");else if(le.match(Je))le=le.replace(Je,"/"),Ce.pop();else if("."===le||".."===le)le="";else{var ke=le.match(_t);if(!ke)throw new Error("Unexpected dot segment condition");var Pe=ke[0];le=le.slice(Pe.length),Ce.push(Pe)}return Ce.join("")}function ct(le){var Ce=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},ke=Ce.iri?c:l,Pe=[],Se=ne[(Ce.scheme||le.scheme||"").toLowerCase()];if(Se&&Se.serialize&&Se.serialize(le,Ce),le.host&&!ke.IPV6ADDRESS.test(le.host)&&(Ce.domainHost||Se&&Se.domainHost))try{le.host=Ce.iri?X.toUnicode(le.host):X.toASCII(le.host.replace(ke.PCT_ENCODED,ae).toLowerCase())}catch(hn){le.error=le.error||"Host's domain name can not be converted to "+(Ce.iri?"Unicode":"ASCII")+" via punycode: "+hn}De(le,ke),"suffix"!==Ce.reference&&le.scheme&&(Pe.push(le.scheme),Pe.push(":"));var At=function Te(le,Ce){var ke=!1!==Ce.iri?c:l,Pe=[];return void 0!==le.userinfo&&(Pe.push(le.userinfo),Pe.push("@")),void 0!==le.host&&Pe.push(R(Ie(String(le.host),ke),ke).replace(ke.IPV6ADDRESS,function(Se,At,rn){return"["+At+(rn?"%25"+rn:"")+"]"})),"number"!=typeof le.port&&"string"!=typeof le.port||(Pe.push(":"),Pe.push(String(le.port))),Pe.length?Pe.join(""):void 0}(le,Ce);if(void 0!==At&&("suffix"!==Ce.reference&&Pe.push("//"),Pe.push(At),le.path&&"/"!==le.path.charAt(0)&&Pe.push("/")),void 0!==le.path){var rn=le.path;Ce.absolutePath||Se&&Se.absolutePath||(rn=zt(rn)),void 0===At&&(rn=rn.replace(/^\/\//,"/%2F")),Pe.push(rn)}return void 0!==le.query&&(Pe.push("?"),Pe.push(le.query)),void 0!==le.fragment&&(Pe.push("#"),Pe.push(le.fragment)),Pe.join("")}function Nn(le,Ce){var ke=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Pe={};return arguments[3]||(le=pe(ct(le,ke),ke),Ce=pe(ct(Ce,ke),ke)),!(ke=ke||{}).tolerant&&Ce.scheme?(Pe.scheme=Ce.scheme,Pe.userinfo=Ce.userinfo,Pe.host=Ce.host,Pe.port=Ce.port,Pe.path=zt(Ce.path||""),Pe.query=Ce.query):(void 0!==Ce.userinfo||void 0!==Ce.host||void 0!==Ce.port?(Pe.userinfo=Ce.userinfo,Pe.host=Ce.host,Pe.port=Ce.port,Pe.path=zt(Ce.path||""),Pe.query=Ce.query):(Ce.path?("/"===Ce.path.charAt(0)?Pe.path=zt(Ce.path):(Pe.path=void 0===le.userinfo&&void 0===le.host&&void 0===le.port||le.path?le.path?le.path.slice(0,le.path.lastIndexOf("/")+1)+Ce.path:Ce.path:"/"+Ce.path,Pe.path=zt(Pe.path)),Pe.query=Ce.query):(Pe.path=le.path,Pe.query=void 0!==Ce.query?Ce.query:le.query),Pe.userinfo=le.userinfo,Pe.host=le.host,Pe.port=le.port),Pe.scheme=le.scheme),Pe.fragment=Ce.fragment,Pe}function yi(le,Ce){return le&&le.toString().replace(Ce&&Ce.iri?c.PCT_ENCODED:l.PCT_ENCODED,ae)}var bn={scheme:"http",domainHost:!0,parse:function(le,Ce){return le.host||(le.error=le.error||"HTTP URIs must have a host."),le},serialize:function(le,Ce){var ke="https"===String(le.scheme).toLowerCase();return le.port!==(ke?443:80)&&""!==le.port||(le.port=void 0),le.path||(le.path="/"),le}},Hi={scheme:"https",domainHost:bn.domainHost,parse:bn.parse,serialize:bn.serialize};function Ir(le){return"boolean"==typeof le.secure?le.secure:"wss"===String(le.scheme).toLowerCase()}var Nt={scheme:"ws",domainHost:!0,parse:function(le,Ce){var ke=le;return ke.secure=Ir(ke),ke.resourceName=(ke.path||"/")+(ke.query?"?"+ke.query:""),ke.path=void 0,ke.query=void 0,ke},serialize:function(le,Ce){if(le.port!==(Ir(le)?443:80)&&""!==le.port||(le.port=void 0),"boolean"==typeof le.secure&&(le.scheme=le.secure?"wss":"ws",le.secure=void 0),le.resourceName){var ke=le.resourceName.split("?"),Pe=u(ke,2),Se=Pe[0],At=Pe[1];le.path=Se&&"/"!==Se?Se:void 0,le.query=At,le.resourceName=void 0}return le.fragment=void 0,le}},Ge={scheme:"wss",domainHost:Nt.domainHost,parse:Nt.parse,serialize:Nt.serialize},cn={},Pn="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ti="[0-9A-Fa-f]",vr=e(e("%[EFef]"+Ti+"%"+Ti+Ti+"%"+Ti+Ti)+"|"+e("%[89A-Fa-f]"+Ti+"%"+Ti+Ti)+"|"+e("%"+Ti+Ti)),Be=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),an=new RegExp(Pn,"g"),wn=new RegExp(vr,"g"),Mi=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Be),"g"),Ui=new RegExp(n("[^]",Pn,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),nr=Ui;function Go(le){var Ce=ae(le);return Ce.match(an)?Ce:le}var _i={scheme:"mailto",parse:function(le,Ce){var ke=le,Pe=ke.to=ke.path?ke.path.split(","):[];if(ke.path=void 0,ke.query){for(var Se=!1,At={},rn=ke.query.split("&"),hn=0,dn=rn.length;hn string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=function(){function D(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ue(this,D),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,E=this.opts=Ee(Ee({},E),function y(D){var E,M,U,L,X,ne,ge,ae,De,be,Ie,R,J,K,pe,Te,ye,Ue,Je,_t,zt,ct,Nn,mt,pi,ki=D.strict,ci=null===(E=D.code)||void 0===E?void 0:E.optimize,yi=!0===ci||void 0===ci?1:ci||0,bn=null!==(U=null===(M=D.code)||void 0===M?void 0:M.regExp)&&void 0!==U?U:f,Hi=null!==(L=D.uriResolver)&&void 0!==L?L:h.default;return{strictSchema:null===(ne=null!==(X=D.strictSchema)&&void 0!==X?X:ki)||void 0===ne||ne,strictNumbers:null===(ae=null!==(ge=D.strictNumbers)&&void 0!==ge?ge:ki)||void 0===ae||ae,strictTypes:null!==(be=null!==(De=D.strictTypes)&&void 0!==De?De:ki)&&void 0!==be?be:"log",strictTuples:null!==(R=null!==(Ie=D.strictTuples)&&void 0!==Ie?Ie:ki)&&void 0!==R?R:"log",strictRequired:null!==(K=null!==(J=D.strictRequired)&&void 0!==J?J:ki)&&void 0!==K&&K,code:D.code?Ee(Ee({},D.code),{},{optimize:yi,regExp:bn}):{optimize:yi,regExp:bn},loopRequired:null!==(pe=D.loopRequired)&&void 0!==pe?pe:200,loopEnum:null!==(Te=D.loopEnum)&&void 0!==Te?Te:200,meta:null===(ye=D.meta)||void 0===ye||ye,messages:null===(Ue=D.messages)||void 0===Ue||Ue,inlineRefs:null===(Je=D.inlineRefs)||void 0===Je||Je,schemaId:null!==(_t=D.schemaId)&&void 0!==_t?_t:"$id",addUsedSchema:null===(zt=D.addUsedSchema)||void 0===zt||zt,validateSchema:null===(ct=D.validateSchema)||void 0===ct||ct,validateFormats:null===(Nn=D.validateFormats)||void 0===Nn||Nn,unicodeRegExp:null===(mt=D.unicodeRegExp)||void 0===mt||mt,int32range:null===(pi=D.int32range)||void 0===pi||pi,uriResolver:Hi}}(E));var M=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:g,es5:M.es5,lines:M.lines}),this.logger=function V(D){if(!1===D)return $;if(void 0===D)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}(E.logger);var X=E.validateFormats;E.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,m,E,"NOT SUPPORTED"),C.call(this,v,E,"DEPRECATED","warn"),this._metaOpts=N.call(this),E.formats&&j.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),E.keywords&&B.call(this,E.keywords),"object"==xt(E.meta)&&this.addMetaSchema(E.meta),T.call(this),E.validateFormats=X}return de(D,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var E=this.opts,M=E.$data,U=E.meta,L=E.schemaId,X=d;"id"===L&&((X=Ee({},d)).id=X.$id,delete X.$id),U&&M&&this.addMetaSchema(X,X[L],!1)}},{key:"defaultMeta",value:function(){var E=this.opts,M=E.meta,U=E.schemaId;return this.opts.defaultMeta="object"==xt(M)?M[U]||M:void 0}},{key:"validate",value:function(E,M){var U;if("string"==typeof E){if(!(U=this.getSchema(E)))throw new Error('no schema with key or ref "'.concat(E,'"'))}else U=this.compile(E);var L=U(M);return"$async"in U||(this.errors=U.errors),L}},{key:"compile",value:function(E,M){var U=this._addSchema(E,M);return U.validate||this._compileSchemaEnv(U)}},{key:"compileAsync",value:function(E,M){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var U=this.opts.loadSchema;return L.call(this,E,M);function L(pe,Te){return X.apply(this,arguments)}function X(){return(X=ni(bt().mark(function pe(Te,ye){var Ue;return bt().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Je.next=2,ne.call(this,Te.$schema);case 2:return Ue=this._addSchema(Te,ye),Je.abrupt("return",Ue.validate||ae.call(this,Ue));case 4:case"end":return Je.stop()}},pe,this)}))).apply(this,arguments)}function ne(pe){return ge.apply(this,arguments)}function ge(){return(ge=ni(bt().mark(function pe(Te){return bt().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(!Te||this.getSchema(Te)){ye.next=3;break}return ye.next=3,L.call(this,{$ref:Te},!0);case 3:case"end":return ye.stop()}},pe,this)}))).apply(this,arguments)}function ae(pe){return De.apply(this,arguments)}function De(){return(De=ni(bt().mark(function pe(Te){return bt().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return ye.prev=0,ye.abrupt("return",this._compileSchemaEnv(Te));case 4:if(ye.prev=4,ye.t0=ye.catch(0),ye.t0 instanceof r.default){ye.next=8;break}throw ye.t0;case 8:return be.call(this,ye.t0),ye.next=11,Ie.call(this,ye.t0.missingSchema);case 11:return ye.abrupt("return",ae.call(this,Te));case 12:case"end":return ye.stop()}},pe,this,[[0,4]])}))).apply(this,arguments)}function be(pe){var Te=pe.missingSchema,ye=pe.missingRef;if(this.refs[Te])throw new Error("AnySchema ".concat(Te," is loaded but ").concat(ye," cannot be resolved"))}function Ie(pe){return R.apply(this,arguments)}function R(){return(R=ni(bt().mark(function pe(Te){var ye;return bt().wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ue.next=2,J.call(this,Te);case 2:if(ye=Ue.sent,this.refs[Te]){Ue.next=6;break}return Ue.next=6,ne.call(this,ye.$schema);case 6:this.refs[Te]||this.addSchema(ye,Te,M);case 7:case"end":return Ue.stop()}},pe,this)}))).apply(this,arguments)}function J(pe){return K.apply(this,arguments)}function K(){return(K=ni(bt().mark(function pe(Te){var ye;return bt().wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:if(!(ye=this._loading[Te])){Ue.next=3;break}return Ue.abrupt("return",ye);case 3:return Ue.prev=3,Ue.next=6,this._loading[Te]=U(Te);case 6:return Ue.abrupt("return",Ue.sent);case 7:return Ue.prev=7,delete this._loading[Te],Ue.finish(7);case 10:case"end":return Ue.stop()}},pe,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(E,M,U){var L,X=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(E)){var ne,ge=_e(E);try{for(ge.s();!(ne=ge.n()).done;)this.addSchema(ne.value,void 0,U,X)}catch(be){ge.e(be)}finally{ge.f()}return this}if("object"===xt(E)){var De=this.opts.schemaId;if(void 0!==(L=E[De])&&"string"!=typeof L)throw new Error("schema ".concat(De," must be string"))}return M=(0,l.normalizeId)(M||L),this._checkUnique(M),this.schemas[M]=this._addSchema(E,U,M,X,!0),this}},{key:"addMetaSchema",value:function(E,M){return this.addSchema(E,M,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(E,M){if("boolean"==typeof E)return!0;var U;if(void 0!==(U=E.$schema)&&"string"!=typeof U)throw new Error("$schema must be a string");if(!(U=U||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var L=this.validate(U,E);if(!L&&M){var X="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(X);this.logger.error(X)}return L}},{key:"getSchema",value:function(E){for(var M;"string"==typeof(M=k.call(this,E));)E=M;if(void 0===M){var L=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(M=s.resolveSchema.call(this,L,E)))return;this.refs[E]=M}return M.validate||this._compileSchemaEnv(M)}},{key:"removeSchema",value:function(E){if(E instanceof RegExp)return this._removeAllSchemas(this.schemas,E),this._removeAllSchemas(this.refs,E),this;switch(xt(E)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var M=k.call(this,E);return"object"==xt(M)&&this._cache.delete(M.schema),delete this.schemas[E],delete this.refs[E],this;case"object":this._cache.delete(E);var L=E[this.opts.schemaId];return L&&(L=(0,l.normalizeId)(L),delete this.schemas[L],delete this.refs[L]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(E){var M,U=_e(E);try{for(U.s();!(M=U.n()).done;)this.addKeyword(M.value)}catch(X){U.e(X)}finally{U.f()}return this}},{key:"addKeyword",value:function(E,M){var U,L=this;if("string"==typeof E)U=E,"object"==xt(M)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=U);else{if("object"!=xt(E)||void 0!==M)throw new Error("invalid addKeywords parameters");if(U=(M=E).keyword,Array.isArray(U)&&!U.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(Y.call(this,U,M),!M)return(0,u.eachItem)(U,function(ne){return O.call(L,ne)}),this;G.call(this,M);var X=Ee(Ee({},M),{},{type:(0,c.getJSONTypes)(M.type),schemaType:(0,c.getJSONTypes)(M.schemaType)});return(0,u.eachItem)(U,0===X.type.length?function(ne){return O.call(L,ne,X)}:function(ne){return X.type.forEach(function(ge){return O.call(L,ne,X,ge)})}),this}},{key:"getKeyword",value:function(E){var M=this.RULES.all[E];return"object"==xt(M)?M.definition:!!M}},{key:"removeKeyword",value:function(E){var M=this.RULES;delete M.keywords[E],delete M.all[E];var U,L=_e(M.rules);try{for(L.s();!(U=L.n()).done;){var X=U.value,ne=X.rules.findIndex(function(ge){return ge.keyword===E});ne>=0&&X.rules.splice(ne,1)}}catch(ge){L.e(ge)}finally{L.f()}return this}},{key:"addFormat",value:function(E,M){return"string"==typeof M&&(M=new RegExp(M)),this.formats[E]=M,this}},{key:"errorsText",value:function(){var E=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,M=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},U=M.separator,L=void 0===U?", ":U,X=M.dataVar,ne=void 0===X?"data":X;return E&&0!==E.length?E.map(function(ge){return"".concat(ne).concat(ge.instancePath," ").concat(ge.message)}).reduce(function(ge,ae){return ge+L+ae}):"No errors"}},{key:"$dataMetaSchema",value:function(E,M){var U=this.RULES.all;E=JSON.parse(JSON.stringify(E));var L,X=_e(M);try{for(X.s();!(L=X.n()).done;){var ne,ge=L.value.split("/").slice(1),ae=E,De=_e(ge);try{for(De.s();!(ne=De.n()).done;)ae=ae[ne.value]}catch(K){De.e(K)}finally{De.f()}for(var be in U){var Ie=U[be];if("object"==xt(Ie)){var J=ae[be];Ie.definition.$data&&J&&(ae[be]=Z(J))}}}}catch(K){X.e(K)}finally{X.f()}return E}},{key:"_removeAllSchemas",value:function(E,M){for(var U in E){var L=E[U];M&&!M.test(U)||("string"==typeof L?delete E[U]:L&&!L.meta&&(this._cache.delete(L.schema),delete E[U]))}}},{key:"_addSchema",value:function(E,M,U){var L,X=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,ne=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,ge=this.opts.schemaId;if("object"==xt(E))L=E[ge];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof E)throw new Error("schema must be object or boolean")}var ae=this._cache.get(E);if(void 0!==ae)return ae;U=(0,l.normalizeId)(L||U);var De=l.getSchemaRefs.call(this,E,U);return ae=new s.SchemaEnv({schema:E,schemaId:ge,meta:M,baseId:U,localRefs:De}),this._cache.set(ae.schema,ae),ne&&!U.startsWith("#")&&(U&&this._checkUnique(U),this.refs[U]=ae),X&&this.validateSchema(E,!0),ae}},{key:"_checkUnique",value:function(E){if(this.schemas[E]||this.refs[E])throw new Error('schema with key or id "'.concat(E,'" already exists'))}},{key:"_compileSchemaEnv",value:function(E){if(E.meta?this._compileMetaSchema(E):s.compileSchema.call(this,E),!E.validate)throw new Error("ajv implementation error");return E.validate}},{key:"_compileMetaSchema",value:function(E){var M=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,E)}finally{this.opts=M}}}]),D}();function C(D,E,M){var U=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var L in D){var X=L;X in E&&this.logger[U]("".concat(M,": option ").concat(L,". ").concat(D[X]))}}function k(D){return D=(0,l.normalizeId)(D),this.schemas[D]||this.refs[D]}function T(){var D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(var E in D)this.addSchema(D[E],E)}function j(){for(var D in this.opts.formats){var E=this.opts.formats[D];E&&this.addFormat(D,E)}}function B(D){if(Array.isArray(D))this.addVocabulary(D);else for(var E in this.logger.warn("keywords option as map is deprecated, pass array"),D){var M=D[E];M.keyword||(M.keyword=E),this.addKeyword(M)}}function N(){var D,E=Ee({},this.opts),M=_e(p);try{for(M.s();!(D=M.n()).done;)delete E[D.value]}catch(U){M.e(U)}finally{M.f()}return E}t.default=b,b.ValidationError=i.default,b.MissingRefError=r.default;var $={log:function(){},warn:function(){},error:function(){}},z=/^[a-z_$][a-z0-9_$:-]*$/i;function Y(D,E){var M=this.RULES;if((0,u.eachItem)(D,function(U){if(M.keywords[U])throw new Error("Keyword ".concat(U," is already defined"));if(!z.test(U))throw new Error("Keyword ".concat(U," has invalid name"))}),E&&E.$data&&!("code"in E)&&!("validate"in E))throw new Error('$data keyword must have "code" or "validate" function')}function O(D,E,M){var U,L=this,X=E?.post;if(M&&X)throw new Error('keyword with "post" flag cannot have "type"');var ne=this.RULES,ge=X?ne.post:ne.rules.find(function(De){return De.type===M});if(ge||ne.rules.push(ge={type:M,rules:[]}),ne.keywords[D]=!0,E){var ae={keyword:D,definition:Ee(Ee({},E),{},{type:(0,c.getJSONTypes)(E.type),schemaType:(0,c.getJSONTypes)(E.schemaType)})};E.before?H.call(this,ge,ae,E.before):ge.rules.push(ae),ne.all[D]=ae,null===(U=E.implements)||void 0===U||U.forEach(function(De){return L.addKeyword(De)})}}function H(D,E,M){var U=D.rules.findIndex(function(L){return L.keyword===M});U>=0?D.rules.splice(U,0,E):(D.rules.push(E),this.logger.warn("rule ".concat(M," is not defined")))}function G(D){var E=D.metaSchema;void 0!==E&&(D.$data&&this.opts.$data&&(E=Z(E)),D.validateSchema=this.compile(E,!0))}var F={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Z(D){return{anyOf:[D,F]}}}(wve);var S4={},k4={},T4={};Object.defineProperty(T4,"__esModule",{value:!0}),T4.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var Og={};Object.defineProperty(Og,"__esModule",{value:!0}),Og.callRef=Og.getValidate=void 0;var Out=b4(),Jve=uu(),el=Si(),E0=Hf(),Kve=Za,WT=Bi,Iut={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return qT(t,s,o,o.$async);var g=n.scopeValue("root",{ref:c});return qT(t,(0,el._)(hQ||(hQ=fe(["",".validate"])),g),c,c.$async)}();var u,d,h,f,g,m,p=Kve.resolveRef.call(l,c,r,e);if(void 0===p)throw new Out.default(i.opts.uriResolver,r,e);return p instanceof Kve.SchemaEnv?(m=Xve(t,g=p),void qT(t,m,g,g.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,el.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:el.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function Xve(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,el._)(fQ||(fQ=fe(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function qT(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?E0.default.this:el.nil;function c(d){var h=(0,el._)(mQ||(mQ=fe(["",".errors"])),d);r.assign(E0.default.vErrors,(0,el._)(vQ||(vQ=fe([""," === null ? "," : ",".concat(",")"])),E0.default.vErrors,h,E0.default.vErrors,h)),r.assign(E0.default.errors,(0,el._)(yQ||(yQ=fe(["",".length"])),E0.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=WT.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,el._)(_Q||(_Q=fe(["",".evaluated.props"])),d));o.props=WT.mergeEvaluated.props(r,p,o.props,el.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=WT.mergeEvaluated.items(r,f.items,o.items));else{var g=r.var("items",(0,el._)(bQ||(bQ=fe(["",".evaluated.items"])),d));o.items=WT.mergeEvaluated.items(r,g,o.items,el.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,el._)(pQ||(pQ=fe(["await ",""])),(0,Jve.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,el._)(gQ||(gQ=fe(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,Jve.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}Og.getValidate=Xve,Og.callRef=qT,Og.default=Iut,Object.defineProperty(k4,"__esModule",{value:!0}),k4.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",T4.default,Og.default];var D4={},A4={};Object.defineProperty(A4,"__esModule",{value:!0});var YT=Si(),zf=YT.operators,JT={maximum:{okStr:"<=",ok:zf.LTE,fail:zf.GT},minimum:{okStr:">=",ok:zf.GTE,fail:zf.LT},exclusiveMaximum:{okStr:"<",ok:zf.LT,fail:zf.GTE},exclusiveMinimum:{okStr:">",ok:zf.GT,fail:zf.LTE}},Put={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,YT.str)(wQ||(wQ=fe(["must be "," ",""])),JT[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,YT._)(xQ||(xQ=fe(["{comparison: ",", limit: ","}"])),JT[n].okStr,e)}},Rut={keyword:Object.keys(JT),type:"number",schemaType:"number",$data:!0,error:Put,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,YT._)(CQ||(CQ=fe([""," "," "," || isNaN(",")"])),e,JT[n].fail,i,e))}};A4.default=Rut;var E4={};Object.defineProperty(E4,"__esModule",{value:!0});var Eb=Si(),Lut={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,Eb.str)(SQ||(SQ=fe(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,Eb._)(kQ||(kQ=fe(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,Eb._)(TQ||(TQ=fe(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,Eb._)(DQ||(DQ=fe([""," !== parseInt(",")"])),o,o);t.fail$data((0,Eb._)(AQ||(AQ=fe(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};E4.default=Lut;var M4={},O4={};function Qve(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(Ib.nil,m);else{var v,y=_e(e);try{for(y.s();!(v=y.n()).done;)(0,Ob.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:b=v}),void n.forOf(b,i,function(){n.assign(C,(0,Ob.propertyInData)(n,r,b,a.ownProperties)),n.if((0,Ib.not)(C),function(){t.error(),n.break()})},Ib.nil);var b,C}),t.ok(y)}else n.if((0,Ob.checkMissingProp)(t,e,v)),(0,Ob.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=_e(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,g='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,Wut.checkStrictMode)(s,g,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function m(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,Ob.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};j4.default=qut;var P4={};Object.defineProperty(P4,"__esModule",{value:!0});var Nb=Si(),Yut={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,Nb.str)(UQ||(UQ=fe(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,Nb._)(zQ||(zQ=fe(["{limit: ","}"])),n)}},Jut={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Yut,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?Nb.operators.GT:Nb.operators.LT;t.fail$data((0,Nb._)(GQ||(GQ=fe(["",".length "," ",""])),e,r,i))}};P4.default=Jut;var R4={},jb={};Object.defineProperty(jb,"__esModule",{value:!0});var Zve=Fve;Zve.code='require("ajv/dist/runtime/equal").default',jb.default=Zve,Object.defineProperty(R4,"__esModule",{value:!0});var L4=Db,qs=Si(),Kut=Bi,Xut=jb,Qut={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,qs.str)(WQ||(WQ=fe(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,qs._)(qQ||(qQ=fe(["{i: ",", j: ","}"])),e,i)}},Zut={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Qut,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,L4.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,qs._)(JQ||(JQ=fe(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,qs._)(KQ||(KQ=fe([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,qs._)(YQ||(YQ=fe([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),g=(0,L4.checkDataTypes)(c,p,a.opts.strictNumbers,L4.DataType.Wrong),m=n.const("indices",(0,qs._)(XQ||(XQ=fe(["{}"]))));n.for((0,qs._)(QQ||(QQ=fe([";","--;"])),h),function(){n.let(p,(0,qs._)(ZQ||(ZQ=fe(["","[","]"])),e,h)),n.if(g,(0,qs._)(eZ||(eZ=fe(["continue"])))),c.length>1&&n.if((0,qs._)(tZ||(tZ=fe(["typeof ",' == "string"'])),p),(0,qs._)(nZ||(nZ=fe(["",' += "_"'])),p)),n.if((0,qs._)(iZ||(iZ=fe(["typeof ","[",'] == "number"'])),m,p),function(){n.assign(f,(0,qs._)(rZ||(rZ=fe(["","[","]"])),m,p)),t.error(),n.assign(l,!1).break()}).code((0,qs._)(oZ||(oZ=fe(["","[","] = ",""])),m,p,h))})}function d(h,f){var p=(0,Kut.useFunc)(n,Xut.default),g=n.name("outer");n.label(g).for((0,qs._)(sZ||(sZ=fe([";","--;"])),h),function(){return n.for((0,qs._)(aZ||(aZ=fe([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,qs._)(lZ||(lZ=fe(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(g)})})})}}};R4.default=Zut;var F4={};Object.defineProperty(F4,"__esModule",{value:!0});var $4=Si(),edt=Bi,tdt=jb,ndt={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,$4._)(cZ||(cZ=fe(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==xt(o)?t.fail$data((0,$4._)(uZ||(uZ=fe(["!","(",", ",")"])),(0,edt.useFunc)(n,tdt.default),e,r)):t.fail((0,$4._)(dZ||(dZ=fe([""," !== ",""])),o,e))}};F4.default=ndt;var B4={};Object.defineProperty(B4,"__esModule",{value:!0});var Pb=Si(),idt=Bi,rdt=jb,odt={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,Pb._)(hZ||(hZ=fe(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,idt.useFunc)(n,rdt.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,Pb._)(fZ||(fZ=fe(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=Pb.or.apply(void 0,sn(r.map(function(h,f){return p=d,"object"===xt(m=r[g=f])&&null!==m?(0,Pb._)(pZ||(pZ=fe(["","(",", ","[","])"])),u(),e,p,g):(0,Pb._)(gZ||(gZ=fe([""," === ",""])),e,m);var p,g,m})))}t.pass(l)}};B4.default=odt,Object.defineProperty(D4,"__esModule",{value:!0}),D4.default=[A4.default,E4.default,M4.default,I4.default,N4.default,j4.default,P4.default,R4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},F4.default,B4.default];var V4={},M0={};Object.defineProperty(M0,"__esModule",{value:!0}),M0.validateAdditionalItems=void 0;var Ng=Si(),H4=Bi,mdt={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Ng.str)(mZ||(mZ=fe(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Ng._)(vZ||(vZ=fe(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?e0e(t,i):(0,H4.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function e0e(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,Ng._)(yZ||(yZ=fe(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,Ng._)(_Z||(_Z=fe([""," <= ",""])),a,n.length));else if("object"==xt(i)&&!(0,H4.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,Ng._)(bZ||(bZ=fe([""," <= ",""])),a,n.length));e.if((0,Ng.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:H4.Type.Num},c),s.allErrors||e.if((0,Ng.not)(c),function(){return e.break()})});var c}),t.ok(l)}}M0.validateAdditionalItems=e0e,M0.default=mdt;var U4={},O0={};Object.defineProperty(O0,"__esModule",{value:!0}),O0.validateTuple=void 0;var t0e=Si(),XT=Bi,vdt=uu(),ydt={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return n0e(t,"additionalItems",n);e.items=!0,(0,XT.alwaysValidSchema)(e,n)||t.ok((0,vdt.validateArray)(t))}};function n0e(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var m='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,XT.checkStrictMode)(a,m,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=XT.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,t0e._)(wZ||(wZ=fe(["",".length"])),o));e.forEach(function(d,h){(0,XT.alwaysValidSchema)(a,d)||(i.if((0,t0e._)(xZ||(xZ=fe([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}O0.validateTuple=n0e,O0.default=ydt,Object.defineProperty(U4,"__esModule",{value:!0});var _dt=O0,bdt={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,_dt.validateTuple)(t,"items")}};U4.default=bdt;var z4={};Object.defineProperty(z4,"__esModule",{value:!0});var i0e=Si(),wdt=Bi,xdt=uu(),Cdt=M0,Sdt={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,i0e.str)(CZ||(CZ=fe(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,i0e._)(SZ||(SZ=fe(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,wdt.alwaysValidSchema)(i,n)||(r?(0,Cdt.validateAdditionalItems)(t,r):t.ok((0,xdt.validateArray)(t)))}};z4.default=Sdt;var G4={};Object.defineProperty(G4,"__esModule",{value:!0});var gc=Si(),QT=Bi,kdt={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,gc.str)(kZ||(kZ=fe(["must contain at least "," valid item(s)"])),e):(0,gc.str)(TZ||(TZ=fe(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,gc._)(DZ||(DZ=fe(["{minContains: ","}"])),e):(0,gc._)(AZ||(AZ=fe(["{minContains: ",", maxContains: ","}"])),e,i)}},Tdt={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:kdt,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,gc._)(EZ||(EZ=fe(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,QT.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,QT.alwaysValidSchema)(a,r)){var d=(0,gc._)(MZ||(MZ=fe([""," >= ",""])),u,n);return void 0!==e&&(d=(0,gc._)(OZ||(OZ=fe([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,gc._)(IZ||(IZ=fe(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,QT.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var g=i.name("_valid"),m=i.let("count",0);p(g,function(){return i.if(g,function(){return v=m,i.code((0,gc._)(NZ||(NZ=fe(["","++"])),v)),void(void 0===e?i.if((0,gc._)(jZ||(jZ=fe([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,gc._)(PZ||(PZ=fe([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,gc._)(RZ||(RZ=fe([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(g,m){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:QT.Type.Num,compositeRule:!0},g),m()})}}};G4.default=Tdt;var r0e={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=Si(),e=Bi,i=uu();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(LZ||(LZ=fe(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(FZ||(FZ=fe(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=Wt(function(d){var h=d.schema,f={},p={};for(var g in h)"__proto__"!==g&&((Array.isArray(h[g])?f:p)[g]=h[g]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(g){var m=l[g];if(0===m.length)return"continue";var v=(0,i.propertyInData)(c,u,g,d.opts.ownProperties);a.setParams({property:g,depsCount:m.length,deps:m.join(", ")}),d.allErrors?c.if(v,function(){var y,b=_e(m);try{for(b.s();!(y=b.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(k){b.e(k)}finally{b.f()}}):(c.if((0,n._)($Z||($Z=fe([""," && (",")"])),v,(0,i.checkMissingProp)(a,m,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(m){if((0,e.alwaysValidSchema)(h,l[m]))return"continue";c.if((0,i.propertyInData)(c,u,m,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:m},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var g in l)p(g)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(r0e);var W4={};Object.defineProperty(W4,"__esModule",{value:!0});var o0e=Si(),Ddt=Bi,Adt={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,o0e._)(BZ||(BZ=fe(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,Ddt.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,o0e.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};W4.default=Adt;var ZT={};Object.defineProperty(ZT,"__esModule",{value:!0});var eD=uu(),fu=Si(),Edt=Hf(),tD=Bi,Mdt={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,fu._)(VZ||(VZ=fe(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,tD.alwaysValidSchema)(s,e)){var c=(0,eD.allSchemaProperties)(i.properties),u=(0,eD.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(g){var m;if(c.length>8){var v=(0,tD.schemaRefOrVal)(s,i.properties,"properties");m=(0,eD.isOwnProperty)(n,v,g)}else m=c.length?fu.or.apply(void 0,sn(c.map(function(y){return(0,fu._)(UZ||(UZ=fe([""," === ",""])),g,y)}))):fu.nil;return u.length&&(m=fu.or.apply(void 0,[m].concat(sn(u.map(function(y){return(0,fu._)(zZ||(zZ=fe(["",".test(",")"])),(0,eD.usePattern)(t,y),g)}))))),(0,fu.not)(m)}(p),function(){return h(p)}):h(p)}),t.ok((0,fu._)(HZ||(HZ=fe([""," === ",""])),o,Edt.default.errors))}function d(p){n.code((0,fu._)(GZ||(GZ=fe(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==xt(e)&&!(0,tD.alwaysValidSchema)(s,e)){var g=n.name("valid");"failing"===l.removeAdditional?(f(p,g,!1),n.if((0,fu.not)(g),function(){t.reset(),d(p)})):(f(p,g),a||n.if((0,fu.not)(g),function(){return n.break()}))}}}function f(p,g,m){var v={keyword:"additionalProperties",dataProp:p,dataPropType:tD.Type.Str};!1===m&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,g)}}};ZT.default=Mdt;var q4={};Object.defineProperty(q4,"__esModule",{value:!0});var Odt=VT(),s0e=uu(),Y4=Bi,a0e=ZT,Idt={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&a0e.default.code(new Odt.KeywordCxt(o,a0e.default,"additionalProperties"));var s,a=(0,s0e.allSchemaProperties)(e),l=_e(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=Y4.mergeEvaluated.props(n,(0,Y4.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,Y4.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=_e(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?m(p):(n.if((0,s0e.propertyInData)(n,r,p,o.opts.ownProperties)),m(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function m(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};q4.default=Idt;var J4={};Object.defineProperty(J4,"__esModule",{value:!0});var l0e=uu(),nD=Si(),c0e=Bi,u0e=Bi,Ndt={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,l0e.allSchemaProperties)(e),l=a.filter(function(p){return(0,c0e.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof nD.Name||(o.props=(0,u0e.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,g=_e(a);try{for(g.s();!(p=g.n()).done;){var m=p.value;c&&h(m),o.allErrors?f(m):(n.var(u,!0),f(m),n.if(u))}}catch(v){g.e(v)}finally{g.f()}}()}function h(p){for(var g in c)new RegExp(p).test(g)&&(0,c0e.checkStrictMode)(o,"property ".concat(g," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(g){n.if((0,nD._)(WZ||(WZ=fe(["",".test(",")"])),(0,l0e.usePattern)(t,p),g),function(){var m=l.includes(p);m||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:g,dataPropType:u0e.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,nD._)(qZ||(qZ=fe(["","[","]"])),d,g),!0):m||o.allErrors||n.if((0,nD.not)(u),function(){return n.break()})})})}}};J4.default=Ndt;var K4={};Object.defineProperty(K4,"__esModule",{value:!0});var jdt=Bi,Pdt={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,jdt.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};K4.default=Pdt;var X4={};Object.defineProperty(X4,"__esModule",{value:!0});var Rdt={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:uu().validateUnion,error:{message:"must match a schema in anyOf"}};X4.default=Rdt;var Q4={};Object.defineProperty(Q4,"__esModule",{value:!0});var iD=Si(),Ldt=Bi,Fdt={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,iD._)(YZ||(YZ=fe(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Ldt.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,iD._)(JZ||(JZ=fe([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,iD._)(KZ||(KZ=fe(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,iD.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};Q4.default=Fdt;var Z4={};Object.defineProperty(Z4,"__esModule",{value:!0});var $dt=Bi,Bdt={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,$dt.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};Z4.default=Bdt;var eF={};Object.defineProperty(eF,"__esModule",{value:!0});var rD=Si(),d0e=Bi,Vdt={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,rD.str)(XZ||(XZ=fe(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,rD._)(QZ||(QZ=fe(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,d0e.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=h0e(i,"then"),o=h0e(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,rD.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,rD._)(ZZ||(ZZ=fe(["",""])),d)):t.setParams({ifClause:d})}}}};function h0e(t,n){var e=t.schema[n];return void 0!==e&&!(0,d0e.alwaysValidSchema)(t,e)}eF.default=Vdt;var tF={};Object.defineProperty(tF,"__esModule",{value:!0});var Hdt=Bi,Udt={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,Hdt.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};tF.default=Udt,Object.defineProperty(V4,"__esModule",{value:!0});var zdt=M0,Gdt=U4,Wdt=O0,qdt=z4,Ydt=G4,Jdt=r0e,Kdt=W4,Xdt=ZT,Qdt=q4,Zdt=J4,eht=K4,tht=X4,nht=Q4,iht=Z4,rht=eF,oht=tF;V4.default=function(){var n=[eht.default,tht.default,nht.default,iht.default,rht.default,oht.default,Kdt.default,Xdt.default,Jdt.default,Qdt.default,Zdt.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Gdt.default,qdt.default):n.push(zdt.default,Wdt.default),n.push(Ydt.default),n};var nF={},iF={};Object.defineProperty(iF,"__esModule",{value:!0});var Mo=Si(),sht={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,Mo.str)(eee||(eee=fe(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,Mo._)(tee||(tee=fe(["{format: ","}"])),n)}},code:function(t,n){var m,v,h,f,p,g,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,Mo._)(nee||(nee=fe(["","[","]"])),h,s)),p=e.let("fType"),g=e.let("format"),e.if((0,Mo._)(iee||(iee=fe(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,Mo._)(ree||(ree=fe(["",'.type || "string"'])),f)).assign(g,(0,Mo._)(oee||(oee=fe(["",".validate"])),f))},function(){return e.assign(p,(0,Mo._)(see||(see=fe(['"string"'])))).assign(g,f)}),t.fail$data((0,Mo.or)(!1===l.strictSchema?Mo.nil:(0,Mo._)(aee||(aee=fe([""," && !",""])),s,g),(m=u.$async?(0,Mo._)(lee||(lee=fe(["(",".async ? await ","(",") : ","(","))"])),f,g,i,g,i):(0,Mo._)(cee||(cee=fe(["","(",")"])),g,i),v=(0,Mo._)(uee||(uee=fe(["(typeof ",' == "function" ? '," : ",".test(","))"])),g,m,g,i),(0,Mo._)(dee||(dee=fe([""," && "," !== true && "," === "," && !",""])),g,g,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=Wt(function(v){var y=v instanceof RegExp?(0,Mo.regexpCode)(v):l.code.formats?(0,Mo._)(hee||(hee=fe(["","",""])),l.code.formats,(0,Mo.getProperty)(o)):void 0,b=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=xt(v)||v instanceof RegExp?["string",v,b]:[v.type||"string",v.validate,(0,Mo._)(fee||(fee=fe(["",".validate"])),b)]}(h),3),g=f[1],m=f[2];f[0]===n&&t.pass(function(){if("object"==xt(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Mo._)(pee||(pee=fe(["await ","(",")"])),m,i)}return(0,Mo._)("function"==typeof g?gee||(gee=fe(["","(",")"])):mee||(mee=fe(["",".test(",")"])),m,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};iF.default=sht,Object.defineProperty(nF,"__esModule",{value:!0}),nF.default=[iF.default];var I0={};Object.defineProperty(I0,"__esModule",{value:!0}),I0.contentVocabulary=I0.metadataVocabulary=void 0,I0.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],I0.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(S4,"__esModule",{value:!0});var uht=nF,f0e=I0,dht=[k4.default,D4.default,(0,V4.default)(),uht.default,f0e.metadataVocabulary,f0e.contentVocabulary];S4.default=dht;var rF={},p0e={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(p0e),Object.defineProperty(rF,"__esModule",{value:!0});var N0=Si(),oF=p0e,g0e=Za,hht=Bi,fht={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===oF.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,N0._)(vee||(vee=fe(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,N0._)(yee||(yee=fe(["","",""])),e,(0,N0.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,N0.Name),h}n.if((0,N0._)(_ee||(_ee=fe(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},g=C(r),m=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",g="Colon",m="Rbrace",v="Number",y="Current",b="Expref",C="Pipe",j="EQ",B="GT",N="LT",$="GTE",V="LTE",z="NE",Y="Flatten",O="Star",H="Filter",G="Dot",Z="Lbrace",D="Lbracket",E="Lparen",M="Literal",U={".":G,"*":O,",":p,":":g,"{":Z,"}":m,"]":h,"(":E,")":f,"@":y},L={"<":!0,">":!0,"=":!0,"!":!0},X={" ":!0,"\t":!0,"\n":!0};function ne(R){return R>="0"&&R<="9"||"-"===R}function ge(){}ge.prototype={tokenize:function(R){var J,K,pe,Te,ye=[];for(this._current=0;this._current="a"&&Te<="z"||Te>="A"&&Te<="Z"||"_"===Te)J=this._current,K=this._consumeUnquotedIdentifier(R),ye.push({type:u,value:K,start:J});else if(void 0!==U[R[this._current]])ye.push({type:U[R[this._current]],value:R[this._current],start:this._current}),this._current++;else if(ne(R[this._current]))pe=this._consumeNumber(R),ye.push(pe);else if("["===R[this._current])pe=this._consumeLBracket(R),ye.push(pe);else if('"'===R[this._current])J=this._current,K=this._consumeQuotedIdentifier(R),ye.push({type:d,value:K,start:J});else if("'"===R[this._current])J=this._current,K=this._consumeRawStringLiteral(R),ye.push({type:M,value:K,start:J});else if("`"===R[this._current]){J=this._current;var Ue=this._consumeLiteral(R);ye.push({type:M,value:Ue,start:J})}else if(void 0!==L[R[this._current]])ye.push(this._consumeOperator(R));else if(void 0!==X[R[this._current]])this._current++;else if("&"===R[this._current])J=this._current,this._current++,"&"===R[this._current]?(this._current++,ye.push({type:"And",value:"&&",start:J})):ye.push({type:b,value:"&",start:J});else{if("|"!==R[this._current]){var Je=new Error("Unknown character:"+R[this._current]);throw Je.name="LexerError",Je}J=this._current,this._current++,"|"===R[this._current]?(this._current++,ye.push({type:"Or",value:"||",start:J})):ye.push({type:C,value:"|",start:J})}return ye},_consumeUnquotedIdentifier:function(R){var J,K=this._current;for(this._current++;this._current="a"&&J<="z"||J>="A"&&J<="Z"||J>="0"&&J<="9"||"_"===J);)this._current++;return R.slice(K,this._current)},_consumeQuotedIdentifier:function(R){var J=this._current;this._current++;for(var K=R.length;'"'!==R[this._current]&&this._current"===K?"="===R[this._current]?(this._current++,{type:$,value:">=",start:J}):{type:B,value:">",start:J}:"="===K&&"="===R[this._current]?(this._current++,{type:j,value:"==",start:J}):void 0},_consumeLiteral:function(R){this._current++;for(var J,K=this._current,pe=R.length;"`"!==R[this._current]&&this._current=0||["true","false","null"].indexOf(R)>=0)return!0;if(!("-0123456789".indexOf(R[0])>=0))return!1;try{return JSON.parse(R),!0}catch{return!1}}};var ae={};function De(){}function be(R){this.runtime=R}function Ie(R){this._interpreter=R,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}ae.EOF=0,ae.UnquotedIdentifier=0,ae.QuotedIdentifier=0,ae.Rbracket=0,ae.Rparen=0,ae.Comma=0,ae.Rbrace=0,ae.Number=0,ae.Current=0,ae.Expref=0,ae.Pipe=1,ae.Or=2,ae.And=3,ae.EQ=5,ae.GT=5,ae.LT=5,ae.GTE=5,ae.LTE=5,ae.NE=5,ae.Flatten=9,ae.Star=20,ae.Filter=21,ae.Dot=40,ae.Not=45,ae.Lbrace=50,ae.Lbracket=55,ae.Lparen=60,De.prototype={parse:function(R){this._loadTokens(R),this.index=0;var J=this.expression(0);if("EOF"!==this._lookahead(0)){var K=this._lookaheadToken(0),pe=new Error("Unexpected token type: "+K.type+", value: "+K.value);throw pe.name="ParserError",pe}return J},_loadTokens:function(R){var J=(new ge).tokenize(R);J.push({type:"EOF",value:"",start:R.length}),this.tokens=J},expression:function(R){var J=this._lookaheadToken(0);this._advance();for(var K=this.nud(J),pe=this._lookahead(0);R=0?this.expression(R):J===D?(this._match(D),this._parseMultiselectList()):J===Z?(this._match(Z),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(R){var J;if(ae[this._lookahead(0)]<10)J={type:"Identity"};else if(this._lookahead(0)===D)J=this.expression(R);else if(this._lookahead(0)===H)J=this.expression(R);else{if(this._lookahead(0)!==G){var K=this._lookaheadToken(0),pe=new Error("Sytanx error, unexpected token: "+K.value+"("+K.type+")");throw pe.name="ParserError",pe}this._match(G),J=this._parseDotRHS(R)}return J},_parseMultiselectList:function(){for(var R=[];this._lookahead(0)!==h;){var J=this.expression(0);if(R.push(J),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:R}},_parseMultiselectHash:function(){for(var R,J,K,pe=[],Te=[u,d];;){if(R=this._lookaheadToken(0),Te.indexOf(R.type)<0)throw new Error("Expecting an identifier token, got: "+R.type);if(J=R.value,this._advance(),this._match(g),K={type:"KeyValuePair",name:J,value:this.expression(0)},pe.push(K),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===m){this._match(m);break}}return{type:"MultiSelectHash",children:pe}}},be.prototype={search:function(R,J){return this.visit(R,J)},visit:function(R,J){var K,pe,Te,ye,Ue,Je,_t,zt,ct;switch(R.type){case"Field":return null!==J&&e(J)?void 0===(Je=J[R.name])?null:Je:null;case"Subexpression":for(Te=this.visit(R.children[0],J),ct=1;ct0)for(ct=ki;ctci;ct+=yi)Te.push(J[ct]);return Te;case"Projection":var bn=this.visit(R.children[0],J);if(!n(bn))return null;for(zt=[],ct=0;ctUe;break;case $:Te=ye>=Ue;break;case N:Te=ye=R&&(J=K<0?R-1:R),J}},Ie.prototype={callFunction:function(R,J){var K=this.functionTable[R];if(void 0===K)throw new Error("Unknown function: "+R+"()");return this._validateArgs(R,J,K._signature),K._func.call(this,J)},_validateArgs:function(R,J,K){var pe,Te,ye,Ue;if(K[K.length-1].variadic){if(J.length=0;pe--)K+=J[pe];return K}var Te=R[0].slice(0);return Te.reverse(),Te},_functionAbs:function(R){return Math.abs(R[0])},_functionCeil:function(R){return Math.ceil(R[0])},_functionAvg:function(R){for(var J=0,K=R[0],pe=0;pe=0},_functionFloor:function(R){return Math.floor(R[0])},_functionLength:function(R){return e(R[0])?Object.keys(R[0]).length:R[0].length},_functionMap:function(R){for(var J=[],K=this._interpreter,pe=R[0],Te=R[1],ye=0;ye0){if(this._getTypeName(R[0][0])===s)return Math.max.apply(Math,R[0]);for(var J=R[0],K=J[0],pe=1;pe0){if(this._getTypeName(R[0][0])===s)return Math.min.apply(Math,R[0]);for(var J=R[0],K=J[0],pe=1;pemt?1:NnUe&&(Ue=K,J=Te[Je]);return J},_functionMinBy:function(R){for(var J,K,Te=R[0],ye=this.createKeyFunction(R[1],[s,a]),Ue=1/0,Je=0;Je1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var yht=function(){function t(n,e,i,r){sF(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=oD(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),g=oD(p,4),b=g[3];void 0===b&&(b=1),o.rgba=[g[0],g[1],g[2],b]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return aF(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return y0e(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return y0e(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=vht[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=oD(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(m-=1),m<.16666666666666666?p+6*(g-p)*m:m<.5?g:m<.6666666666666666?p+(g-p)*(.6666666666666666-m)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),_ht=function(){function t(){sF(this,t),this._events=[]}return aF(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function lF(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,g=c.clientY,m=r(c.clientX-d.left,0,h),v=r(g-d.top,0,f);e(m/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function bd(t,n){return(n||document).querySelector(t)}function _0e(t){t.preventDefault(),t.stopPropagation()}function cF(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&_0e(o),i(o))})}var b0e=function(){function t(n){sF(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new _ht,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return aF(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),cF(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(_0e(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new yht(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=bd(".picker_hue",o),this._domSL=bd(".picker_sl",o),this._domA=bd(".picker_alpha",o),this._domEdit=bd(".picker_editor input",o),this._domSample=bd(".picker_sample",o),this._domOkay=bd(".picker_done button",o),this._domCancel=bd(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),lF(r,this._domH,function(l,c){return e._setHSLA(l)}),lF(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&lF(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),cF(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),cF(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=bd(".picker_selector",this._domH),d=bd(".picker_selector",l),h=bd(".picker_selector",c);b(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,b(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function b(k,T,j){T.style.left=100*j+"%"}function C(k,T,j){T.style.top=100*j+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),uF=document.createElement("style");uF.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(uF),b0e.StyleElement=uF;var bht=Object.freeze({__proto__:null,default:b0e});const wht=["editor"];function xht(t,n){if(1&t&&(_(0,"ngb-alert",38),ie(1,"img",39),_(2,"h6",40),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while modifying storage object: ",e.error,"")}}function Cht(t,n){1&t&&(_(0,"ngb-alert",41),ie(1,"img",42),_(2,"h6",40),A(3,"Storage object was modified successfully."),w()()),2&t&&S("dismissible",!1)}function Sht(t,n){1&t&&(_(0,"span"),A(1,"Save as a copy"),w())}function kht(t,n){1&t&&A(0,"Save")}function Tht(t,n){if(1&t&&(_(0,"button",43),q(1,Sht,2,0,"span",44),q(2,kht,1,0,"ng-template",null,45,lo),w()),2&t){const e=As(3),i=P();S("disabled",i.updating),x(1),S("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const dF=function(){return["/storage"]},Dht=function(t){return{collection:t}},Aht=function(t,n){return{collection:t,key:n}},Eht=function(t,n,e){return{collection:t,key:n,user_id:e}},hF=function(t){return{"is-invalid":t}},Lb=function(t){return{active:t}};let Mht=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;editor;jsonEditor;error="";object;objectForm;updating=!1;updated=!1;ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Sr.required],keyname:["",Sr.required],user_id:["",Sr.required],permission_read:[{value:0,disabled:!1},Sr.required],permission_write:[{value:0,disabled:!1},Sr.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(wht,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:88,vars:60,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["id","permission_read","name","permission_read",1,"btn-group","btn-group-toggle"],[1,"btn","btn-outline-secondary",3,"ngClass"],["formControlName","permission_read","type","radio",3,"value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["id","permission_write","name","permission_write",1,"btn-group","btn-group-toggle"],["formControlName","permission_write","type","radio",3,"value"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Storage Object"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),A(6,"Storage"),w(),_(7,"li",4)(8,"a",5),A(9),w()(),_(10,"li",4)(11,"a",5),A(12),w()(),_(13,"li",4)(14,"a",5),A(15),w()()()()(),q(16,xht,4,2,"ngb-alert",6),q(17,Cht,4,1,"ngb-alert",7),_(18,"form",8),se("ngSubmit",function(){return r.updateObject()}),_(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),A(23,"Collection"),w()(),ie(24,"input",13),_(25,"div",14),A(26,"Collection is required"),w()(),_(27,"div",10)(28,"div",11)(29,"label",15),A(30,"Key"),w()(),ie(31,"input",16),_(32,"div",14),A(33,"Key is required"),w()()(),_(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),A(38,"User ID"),w()(),ie(39,"input",18),_(40,"div",14),A(41,"User ID is required"),w()(),_(42,"div",19)(43,"div",11)(44,"label",20),A(45,"Read Permission"),w()(),_(46,"div",21)(47,"label",22),ie(48,"input",23),A(49," No Read "),w(),_(50,"label",22),ie(51,"input",23),A(52," Owner Read "),w(),_(53,"label",22),ie(54,"input",23),A(55," Public Read "),w()()()(),_(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),A(60,"Version"),w()(),ie(61,"input",25),w(),_(62,"div",19)(63,"div",11)(64,"label",26),A(65,"Write Permission"),w()(),_(66,"div",27)(67,"label",22),ie(68,"input",28),A(69," No Write "),w(),_(70,"label",22),ie(71,"input",28),A(72," Owner Write "),w()()()(),_(73,"div",29)(74,"div",10)(75,"div",11)(76,"label",30),A(77,"Create Time"),w()(),ie(78,"input",31),w(),_(79,"div",10)(80,"div",11)(81,"label",32),A(82,"Update Time"),w()(),ie(83,"input",33),w()(),_(84,"div",34),ie(85,"div",35,36),w(),q(87,Tht,4,3,"button",37),w()),2&i&&(x(8),S("routerLink",ma(32,dF))("queryParams",ui(33,Dht,r.object.collection)),x(1),ze(r.object.collection),x(2),S("routerLink",ma(35,dF))("queryParams",Ni(36,Aht,r.object.collection,r.object.key)),x(1),ze(r.object.key),x(2),S("routerLink",ma(39,dF))("queryParams",C1(40,Eht,r.object.collection,r.object.key,r.object.user_id)),x(1),ze(r.object.user_id),x(1),S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.objectForm),x(6),S("ngClass",ui(44,hF,r.f.collection.dirty&&r.f.collection.errors)),x(1),S("hidden",r.f.collection.disabled||r.f.collection.valid||r.f.collection.pristine),x(6),S("ngClass",ui(46,hF,r.f.keyname.dirty&&r.f.keyname.errors)),x(1),S("hidden",r.f.keyname.disabled||r.f.keyname.valid||r.f.keyname.pristine),x(7),S("ngClass",ui(48,hF,r.f.user_id.dirty&&r.f.user_id.errors)),x(1),S("hidden",r.f.user_id.disabled||r.f.user_id.valid||r.f.user_id.pristine),x(7),S("ngClass",ui(50,Lb,0==r.f.permission_read.value)),x(1),S("value",0),x(2),S("ngClass",ui(52,Lb,1==r.f.permission_read.value)),x(1),S("value",1),x(2),S("ngClass",ui(54,Lb,2==r.f.permission_read.value)),x(1),S("value",2),x(7),S("value",r.object.version),x(6),S("ngClass",ui(56,Lb,0==r.f.permission_write.value)),x(1),S("value",0),x(2),S("ngClass",ui(58,Lb,1==r.f.permission_write.value)),x(1),S("value",1),x(7),S("value",r.object.create_time),x(5),S("value",r.object.update_time),x(4),S("ngIf",r.updateAllowed()))},dependencies:[Mc,dp,Ct,pr,ms,ts,kO,ps,gs,Hh,Lo,ns],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),Oht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Iht(t,n){if(1&t&&(_(0,"ngb-alert",18),ie(1,"img",19),_(2,"h6",20),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while processing request: ",e.error,"")}}function Nht(t,n){1&t&&(_(0,"th",21),A(1,"Remove"),w())}function jht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"Yes"),w()}}function Pht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"No"),w()}}function Rht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"Yes"),w()}}function Lht(t,n){if(1&t){const e=He();_(0,"td",25),se("click",function(){we(e);const r=P().$implicit;return xe(P().viewLeaderboardEntries(r))}),A(1,"No"),w()}}function Fht(t,n){if(1&t){const e=He();_(0,"td",26)(1,"button",27),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteLeaderboard(r,s,a))}),A(2,"Delete"),w()()}}function $ht(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(2),w(),_(3,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(4),w(),_(5,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(6),w(),_(7,"td",22),se("click",function(){const o=we(e).$implicit;return xe(P().viewLeaderboardEntries(o))}),A(8),w(),q(9,jht,2,0,"td",23),q(10,Pht,2,0,"td",23),q(11,Rht,2,0,"td",23),q(12,Lht,2,0,"td",23),q(13,Fht,3,0,"td",24),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.id),x(2),ze(i.orderString[e.sort_order]),x(2),ze(i.operatorString[e.operator]),x(2),ze(""===e.reset_schedule?"-":e.reset_schedule),x(1),S("ngIf",e.authoritative),x(1),S("ngIf",!e.authoritative),x(1),S("ngIf",e.tournament),x(1),S("ngIf",!e.tournament),x(1),S("ngIf",i.deleteAllowed())}}function Bht(t,n){1&t&&(_(0,"tr")(1,"td",28),A(2,"No leaderboards were found."),w()())}let Vht=(()=>{class t{route;router;authService;consoleService;deleteConfirmService;error="";leaderboards=[];nextCursor="";leaderboardsCount=0;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};constructor(e,i,r,o,s){this.route=e,this.router=i,this.authService=r,this.consoleService=o,this.deleteConfirmService=s}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(zr),te(kn),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),A(4,"Leaderboards"),w(),_(5,"h6",4),A(6),w()(),_(7,"div",5)(8,"div",6)(9,"button",7),se("click",function(){return r.search(0)}),ie(10,"img",8),w(),_(11,"button",7),se("click",function(){return r.search(1)}),ie(12,"img",9),w()()()()(),q(13,Iht,4,2,"ngb-alert",10),_(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),A(18,"Leaderboard ID"),w(),_(19,"th",13),A(20,"Sort Order"),w(),_(21,"th",13),A(22,"Operator"),w(),_(23,"th",13),A(24,"Reset Schedule"),w(),_(25,"th",14),A(26,"Authoritative"),w(),_(27,"th",14),A(28,"Tournament"),w(),q(29,Nht,2,0,"th",15),w()(),_(30,"tbody"),q(31,$ht,14,9,"tr",16),q(32,Bht,3,0,"tr",17),w()()),2&i&&(x(6),wt("",r.leaderboardsCount," leaderboards found."),x(3),S("disabled",0===r.leaderboards.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(16),S("ngIf",r.deleteAllowed()),x(2),S("ngForOf",r.leaderboards),x(1),S("ngIf",0===r.leaderboards.length))},dependencies:[Bt,Ct,pr],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Hht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Uht(t,n){if(1&t&&(_(0,"ngb-alert",31),ie(1,"img",32),_(2,"h6",33),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying accounts: ",e.error,"")}}function zht(t,n){if(1&t){const e=He();_(0,"ngb-alert",31),ie(1,"img",32),_(2,"h6",33),A(3,"Query ongoing..."),w(),_(4,"button",34),se("click",function(){return we(e),xe(P().cancelQuery())}),A(5,"Cancel!"),w()()}2&t&&S("dismissible",!1)}function Ght(t,n){1&t&&(_(0,"th",35),A(1,"Remove"),w())}function Wht(t,n){1&t&&(_(0,"tr")(1,"td",36),A(2,"No users found - change the filter criteria or add new user accounts."),w()())}function qht(t,n){1&t&&ie(0,"td")}function Yht(t,n){if(1&t){const e=He();_(0,"td",39)(1,"button",40),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteAccount(r,s,a))}),A(2,"Delete"),w()()}}function Jht(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(2),w(),_(3,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(6),w(),_(7,"td",37),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(8),w(),q(9,qht,1,0,"td",29),q(10,Yht,3,0,"td",38),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.id),x(2),ze(e.username),x(2),ze(e.display_name),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),x(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Kht=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";accountsCount=0;accounts=[];nextCursor="";prevCursor="";searchForm;querySubject;ongoingQuery=!1;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.querySubject=new hr,this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}ngOnDestroy(){this.querySubject.next(),this.querySubject.complete()}search(e){this.ongoingQuery&&this.querySubject.next(),this.ongoingQuery=!0;let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).pipe(Xr(this.querySubject)).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"}),this.ongoingQuery=!1},o=>{this.error=o,this.ongoingQuery=!1})}cancelQuery(){this.querySubject.next(),this.ongoingQuery=!1}deleteAccount(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:46,vars:10,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button",1,"btn","btn-danger",3,"click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Accounts"),w(),_(2,"h6",1),A(3),w(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),se("ngSubmit",function(){return r.search(0)}),_(8,"div",6),ie(9,"input",7),_(10,"div",8)(11,"span",9),se("click",function(){return r.f.filter.setValue(r.systemUserId)}),ie(12,"img",10),w()(),_(13,"div",8)(14,"div",11)(15,"button",12),se("click",function(){return r.f.filter_type.setValue(0),r.search(0)}),A(16,"Search"),w(),_(17,"div",13),ie(18,"button",14),_(19,"div",15)(20,"button",16),se("click",function(){return r.f.filter_type.setValue(1),r.search(0)}),A(21,"Tombstones"),w()()()()()()()(),_(22,"div",17)(23,"div",18)(24,"button",19),se("click",function(){return r.search(0)}),ie(25,"img",20),w(),_(26,"button",19),se("click",function(){return r.search(1)}),ie(27,"img",21),w()()()()(),q(28,Uht,4,2,"ngb-alert",22),q(29,zht,6,1,"ngb-alert",22),_(30,"div",23)(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),A(35,"User ID"),w(),_(36,"th"),A(37,"Username"),w(),_(38,"th"),A(39,"Display Name"),w(),_(40,"th",27),A(41,"Last Update"),w(),q(42,Ght,2,0,"th",28),w()(),_(43,"tbody"),q(44,Wht,3,0,"tr",29),q(45,Jht,11,6,"tr",30),w()()()),2&i&&(x(3),wt("",r.accountsCount," accounts found."),x(4),S("formGroup",r.searchForm),x(11),S("disabled",!r.f.filter.value||""===r.f.filter.value),x(6),S("disabled",0===r.accounts.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(1),S("ngIf",r.ongoingQuery),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.accounts.length),x(1),S("ngForOf",r.accounts))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Xht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qht(t,n){if(1&t){const e=He();_(0,"button",15),se("click",function(r){return we(e),xe(P().exportAccount(r))}),ie(1,"img",16),A(2,"Export"),w()}}function Zht(t,n){1&t&&(_(0,"span"),A(1,"Unban"),w())}function eft(t,n){1&t&&(_(0,"span"),A(1,"Ban"),w())}function tft(t,n){if(1&t){const e=He();_(0,"button",15),se("click",function(r){return we(e),xe(P().banUnbanAccount(r))}),ie(1,"img",17),q(2,Zht,2,0,"span",18),q(3,eft,2,0,"span",18),w()}if(2&t){const e=P();x(2),S("ngIf",e.account.disable_time),x(1),S("ngIf",!e.account.disable_time)}}function nft(t,n){if(1&t){const e=He();_(0,"button",19),se("click",function(r){return we(e),xe(P().deleteAccount(r,!1))}),ie(1,"img",20),A(2,"Delete"),w()}}function ift(t,n){if(1&t){const e=He();_(0,"button",19),se("click",function(r){return we(e),xe(P().deleteAccount(r,!0))}),ie(1,"img",21),A(2,"Recorded delete"),w()}}function rft(t,n){if(1&t&&(_(0,"ngb-alert",22),ie(1,"img",23),_(2,"h6",24),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}const oft=function(t,n){return["/accounts",t,n]};function sft(t,n){if(1&t&&(_(0,"div"),ul(1,25),_(2,"a",26),A(3),w(),dl(),w()),2&t){const e=n.$implicit,i=P();x(1),S("ngbNavItem",e.path),x(1),S("routerLink",Ni(3,oft,i.account.user.id,e.path)),x(1),ze(e.label)}}const aft=function(){return["/accounts"]},lft=function(){return["/storage"]},cft=function(t){return{user_id:t}};let uft=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;account;error="";views=[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,XI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Account"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),A(7,"Account"),w()(),_(8,"li",6),A(9),w()()(),_(10,"div"),q(11,Qht,3,0,"button",7),q(12,tft,4,2,"button",7),q(13,nft,3,0,"button",8),q(14,ift,3,0,"button",8),w()(),q(15,rft,4,2,"ngb-alert",9),_(16,"nav",10,11),q(18,sft,4,6,"div",12),_(19,"div"),ul(20,13),_(21,"a",14),A(22," Storage "),w(),dl(),w()(),ie(23,"router-outlet")),2&i&&(x(6),S("routerLink",ma(10,aft)),x(3),ze(r.account.user.id),x(2),S("ngIf",r.exportAllowed()),x(1),S("ngIf",r.banAllowed()),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.error),x(3),S("ngForOf",r.views),x(3),S("routerLink",ma(11,lft))("queryParams",ui(12,cft,r.account.user.id)))},dependencies:[yp,Mc,ty,Bt,Ct,pr,Bu,Wd,Ty,Yh],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),dft=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const hft=["editor"];function fft(t,n){if(1&t&&(_(0,"ngb-alert",29),ie(1,"img",30),_(2,"h6",31),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function pft(t,n){1&t&&(_(0,"ngb-alert",32),ie(1,"img",33),_(2,"h6",31),A(3,"Account was modified successfully."),w()()),2&t&&S("dismissible",!1)}function gft(t,n){1&t&&(_(0,"button",34),A(1,"Save"),w()),2&t&&S("disabled",P().updating)}const mft=function(t){return{"is-invalid":t}};let vft=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Sr.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(hft,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(q(0,fft,4,2,"ngb-alert",0),q(1,pft,4,1,"ngb-alert",1),_(2,"form",2),se("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),A(7,"User ID"),w()(),ie(8,"input",7),w(),_(9,"div",4)(10,"div",5)(11,"label",8),A(12,"Username"),w()(),ie(13,"input",9),_(14,"div",10),A(15,"Username is required"),w()()(),_(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),A(20,"Display Name"),w()(),ie(21,"input",12),w(),_(22,"div",13)(23,"div",5)(24,"label",14),A(25,"Avatar URL"),w()(),ie(26,"input",15),w()(),_(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),A(31,"Location"),w()(),ie(32,"input",17),w(),_(33,"div",13)(34,"div",5)(35,"label",18),A(36,"Timezone"),w()(),ie(37,"input",19),w()(),_(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),A(42,"Create Time"),w()(),ie(43,"input",22),w(),_(44,"div",4)(45,"div",5)(46,"label",23),A(47,"Update Time"),w()(),ie(48,"input",24),w()(),_(49,"div",25),ie(50,"div",26,27),w(),q(52,gft,2,1,"button",28),w()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.accountForm),x(6),S("value",r.account.user.id),x(5),S("ngClass",ui(9,mft,r.f.username.dirty&&r.f.username.errors)),x(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),x(29),S("value",r.account.user.create_time),x(5),S("value",r.account.user.update_time),x(4),S("ngIf",r.updateAllowed()))},dependencies:[dp,Ct,pr,ms,ts,ps,gs,Hh,Lo,ns]})}return t})();function yft(t,n){if(1&t&&(_(0,"ngb-alert",36),ie(1,"img",37),_(2,"h6",38),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function _ft(t,n){1&t&&(_(0,"ngb-alert",39),ie(1,"img",40),_(2,"h6",38),A(3,"Account was modified successfully."),w()()),2&t&&S("dismissible",!1)}function bft(t,n){if(1&t&&(_(0,"option",41),A(1),w()),2&t){const e=n.$implicit,i=n.index;Nd("value",i),S("selected",0===i),x(1),ze(e.id)}}function wft(t,n){1&t&&(_(0,"button",42),A(1,"Save"),w()),2&t&&S("disabled",P().updating)}let xft=(()=>{class t{route;router;consoleService;authService;formBuilder;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(q(0,yft,4,2,"ngb-alert",0),q(1,_ft,4,1,"ngb-alert",1),_(2,"form",2),se("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),A(7,"Device IDs"),w()(),_(8,"div",7)(9,"button",8),se("click",function(){return r.copyDeviceIdToClipboard(r.f.selected_device_id_index.value)}),ie(10,"img",9),A(11," Copy "),w(),_(12,"select",10),q(13,bft,2,3,"option",11),w(),_(14,"div",12)(15,"button",13),se("click",function(s){return r.unlinkDeviceId(s)}),A(16,"Unlink"),w()()()(),_(17,"div",4)(18,"div",5)(19,"label",14),A(20,"Custom ID"),w()(),_(21,"div",7),ie(22,"input",15),_(23,"div",12)(24,"button",13),se("click",function(s){return r.unlinkCustomID(s)}),A(25,"Unlink"),w()()()()(),_(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),A(30,"Facebook ID"),w()(),_(31,"div",7),ie(32,"input",17),_(33,"div",12)(34,"button",13),se("click",function(s){return r.unlinkFacebook(s)}),A(35,"Unlink"),w()()()(),_(36,"div",18)(37,"div",5)(38,"label",19),A(39,"FB Instant Game ID"),w()(),_(40,"div",7),ie(41,"input",20),_(42,"div",12)(43,"button",13),se("click",function(s){return r.unlinkFacebookInstantGames(s)}),A(44,"Unlink"),w()()()()(),_(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),A(49,"Apple ID"),w()(),_(50,"div",7),ie(51,"input",22),_(52,"div",12)(53,"button",13),se("click",function(s){return r.unlinkApple(s)}),A(54,"Unlink"),w()()()(),_(55,"div",18)(56,"div",5)(57,"label",23),A(58,"GameCenter ID"),w()(),_(59,"div",7),ie(60,"input",24),_(61,"div",12)(62,"button",13),se("click",function(s){return r.unlinkGameCenter(s)}),A(63,"Unlink"),w()()()()(),_(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),A(68,"Google ID"),w()(),_(69,"div",7),ie(70,"input",26),_(71,"div",12)(72,"button",13),se("click",function(s){return r.unlinkGoogle(s)}),A(73,"Unlink"),w()()()(),_(74,"div",4)(75,"div",5)(76,"label",27),A(77,"Steam ID"),w()(),_(78,"div",7),ie(79,"input",28),_(80,"div",12)(81,"button",13),se("click",function(s){return r.unlinkSteam(s)}),A(82,"Unlink"),w()()()()(),_(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),A(87,"Email"),w(),ie(88,"br"),w(),ie(89,"input",30),w(),_(90,"div",4)(91,"div",5)(92,"label",31),A(93,"Password"),w()(),ie(94,"input",32),w()(),_(95,"div",33)(96,"div",4),ie(97,"div",5),_(98,"span",34),A(99),w()(),ie(100,"div",4),w(),q(101,wft,2,1,"button",35),w()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.accountForm),x(11),S("ngForOf",r.account.devices),x(2),S("disabled",!r.updateAllowed()||0===r.account.devices.length),x(7),S("value",r.account.custom_id),x(2),S("disabled",!r.updateAllowed()||!r.account.custom_id||""===r.account.custom_id),x(8),S("value",r.account.user.facebook_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_id||""===r.account.user.facebook_id),x(7),S("value",r.account.user.facebook_instant_game_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_instant_game_id||""===r.account.user.facebook_instant_game_id),x(8),S("value",r.account.user.apple_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.apple_id||""===r.account.user.apple_id),x(7),S("value",r.account.user.gamecenter_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.gamecenter_id||""===r.account.user.gamecenter_id),x(8),S("value",r.account.user.google_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.google_id||""===r.account.user.google_id),x(7),S("value",r.account.user.steam_id),x(2),S("disabled",!r.updateAllowed()||!r.account.user.steam_id||""===r.account.user.steam_id),x(18),wt("Verification Status: ",null===r.account.verify_time?"Not Verified":"Verified",""),x(2),S("ngIf",r.updateAllowed()))},dependencies:[Bt,Ct,pr,ms,_C,bC,ts,Fm,ps,gs,Lo,ns],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})}return t})();const Cft=["editor"];function Sft(t,n){if(1&t&&(_(0,"ngb-alert",24),ie(1,"img",25),_(2,"h6",26),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function kft(t,n){1&t&&(_(0,"ngb-alert",27),ie(1,"img",28),_(2,"h6",26),A(3,"Account was modified successfully."),w()()),2&t&&S("dismissible",!1)}function Tft(t,n){if(1&t){const e=He();_(0,"button",29),se("click",function(){return we(e),xe(P().updateWallet())}),A(1,"Save"),w()}2&t&&S("disabled",P().updating)}function Dft(t,n){1&t&&(_(0,"th",30),A(1,"Remove"),w())}function Aft(t,n){1&t&&(_(0,"tr")(1,"td",31),A(2,"No wallet ledger items found."),w()())}function Eft(t,n){1&t&&ie(0,"div",37)}function Mft(t,n){1&t&&ie(0,"div",38)}function Oft(t,n){if(1&t){const e=He();_(0,"td")(1,"button",39),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteLedgerItem(r,s,a))}),A(2,"Delete"),w()()}}function Ift(t,n){if(1&t&&(_(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),A(4),w()()()()),2&t){const e=P().$implicit;x(4),ze(e.metadata)}}function Nft(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",32),se("click",function(){const o=we(e).index,s=P();return xe(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),q(3,Eft,1,0,"div",33),q(4,Mft,1,0,"div",34),w(),A(5),w(),_(6,"td",35)(7,"pre",36),A(8),w()(),_(9,"td"),A(10),w(),q(11,Oft,3,0,"td",22),w(),q(12,Ift,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.walletLedgerMetadataOpen[e]),x(1),S("ngIf",r.walletLedgerMetadataOpen[e]),x(1),wt(" ",i.id," "),x(3),ze(i.changeset),x(2),ze(i.update_time),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.walletLedgerMetadataOpen[e])}}let jft=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;editor;jsonEditor;error="";account;walletLedger=[];walletLedgerMetadataOpen=[];updating=!1;updated=!1;nextCursor="";prevCursor="";limit=100;userID;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(Cft,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(q(0,Sft,4,2,"ngb-alert",0),q(1,kft,4,1,"ngb-alert",1),_(2,"div",2),ie(3,"div",3,4),w(),q(5,Tft,2,1,"button",5),ie(6,"hr",6),_(7,"div",7)(8,"div",8),ie(9,"div",9),_(10,"div",10)(11,"div",11)(12,"button",12),se("click",function(){return r.loadData("")}),ie(13,"img",13),w(),_(14,"button",12),se("click",function(){return r.loadData(r.prevCursor)}),ie(15,"img",14),w(),_(16,"button",12),se("click",function(){return r.loadData(r.nextCursor)}),ie(17,"img",15),w()()()()(),_(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),A(23,"ID"),w(),_(24,"th"),A(25,"Changeset"),w(),_(26,"th",20),A(27,"Update Time"),w(),q(28,Dft,2,0,"th",21),w()(),_(29,"tbody"),q(30,Aft,3,0,"tr",22),q(31,Nft,13,7,"ng-template",23),w()()()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(4),S("ngIf",r.updateAllowed()),x(7),S("disabled",0===r.walletLedger.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(12),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.walletLedger.length),x(1),S("ngForOf",r.walletLedger))},dependencies:[Bt,Ct,pr],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})}return t})(),Pft=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Rft(t,n){if(1&t&&(_(0,"ngb-alert",10),ie(1,"img",11),_(2,"h6",12),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function Lft(t,n){1&t&&(_(0,"th",13),A(1,"Remove"),w())}function Fft(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No friends found."),w()())}function $ft(t,n){1&t&&(_(0,"span"),A(1,"Friend (0)"),w())}function Bft(t,n){1&t&&(_(0,"span"),A(1,"Invite Sent (1)"),w())}function Vft(t,n){1&t&&(_(0,"span"),A(1,"Invite Received (2)"),w())}function Hft(t,n){1&t&&(_(0,"span"),A(1,"Blocked (3)"),w())}function Uft(t,n){if(1&t){const e=He();_(0,"td",17)(1,"button",18),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteFriend(r,s,a))}),A(2,"Delete"),w()()}}function zft(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o.user))}),A(2),w(),_(3,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o.user))}),A(4),w(),_(5,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o.user))}),q(6,$ft,2,0,"span",8),q(7,Bft,2,0,"span",8),q(8,Vft,2,0,"span",8),q(9,Hft,2,0,"span",8),w(),_(10,"td"),A(11),w(),q(12,Uft,3,0,"td",16),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.user.id),x(2),ze(e.user.username),x(2),S("ngIf",0===e.state),x(1),S("ngIf",1===e.state),x(1),S("ngIf",2===e.state),x(1),S("ngIf",3===e.state),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed())}}let Gft=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;friends=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(q(0,Rft,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),A(6,"User ID"),w(),_(7,"th"),A(8,"Username"),w(),_(9,"th",5),A(10,"State"),w(),_(11,"th",6),A(12,"Update Time"),w(),q(13,Lft,2,0,"th",7),w()(),_(14,"tbody"),q(15,Fft,3,0,"tr",8),q(16,zft,13,8,"tr",9),w()()()),2&i&&(S("ngIf",r.error),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.friends.length),x(1),S("ngForOf",r.friends))},dependencies:[Bt,Ct,pr],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Wft=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function qft(t,n){if(1&t&&(_(0,"ngb-alert",10),ie(1,"img",11),_(2,"h6",12),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function Yft(t,n){1&t&&(_(0,"th",13),A(1,"Remove"),w())}function Jft(t,n){1&t&&(_(0,"tr")(1,"td",14),A(2,"No group membership found."),w()())}function Kft(t,n){1&t&&(_(0,"span"),A(1,"Superadmin (0)"),w())}function Xft(t,n){1&t&&(_(0,"span"),A(1,"Admin (1)"),w())}function Qft(t,n){1&t&&(_(0,"span"),A(1,"Member (2)"),w())}function Zft(t,n){1&t&&(_(0,"span"),A(1,"Join Request (3)"),w())}function ept(t,n){1&t&&(_(0,"span"),A(1,"Banned (4)"),w())}function tpt(t,n){if(1&t){const e=He();_(0,"td")(1,"button",16),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteGroupUser(r,s,a))}),A(2,"Delete"),w()()}}function npt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(2),w(),_(3,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),q(6,Kft,2,0,"span",8),q(7,Xft,2,0,"span",8),q(8,Qft,2,0,"span",8),q(9,Zft,2,0,"span",8),q(10,ept,2,0,"span",8),w(),_(11,"td",15),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(12),w(),q(13,tpt,3,0,"td",8),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.group.id),x(2),ze(e.group.name),x(2),S("ngIf",0===e.state),x(1),S("ngIf",1===e.state),x(1),S("ngIf",2===e.state),x(1),S("ngIf",3===e.state),x(1),S("ngIf",4===e.state),x(2),ze(e.group.update_time),x(1),S("ngIf",i.deleteAllowed())}}let ipt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;groups=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(q(0,qft,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),A(6,"Group ID"),w(),_(7,"th"),A(8,"Name"),w(),_(9,"th",5),A(10,"State"),w(),_(11,"th",6),A(12,"Update Time"),w(),q(13,Yft,2,0,"th",7),w()(),_(14,"tbody"),q(15,Jft,3,0,"tr",8),q(16,npt,14,9,"tr",9),w()()()),2&i&&(S("ngIf",r.error),x(13),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.groups.length),x(1),S("ngForOf",r.groups))},dependencies:[Bt,Ct,pr],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),rpt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const opt=["editor"];function spt(t,n){if(1&t&&(_(0,"ngb-alert",34),ie(1,"img",35),_(2,"h6",36),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function apt(t,n){1&t&&(_(0,"ngb-alert",37),ie(1,"img",38),_(2,"h6",36),A(3,"Group was modified successfully."),w()()),2&t&&S("dismissible",!1)}function lpt(t,n){1&t&&(_(0,"button",39),A(1,"Save"),w()),2&t&&S("disabled",P().updating)}const cpt=function(t){return["/accounts",t]},upt=function(t){return{"is-invalid":t}};let dpt=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";group;groupForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Sr.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=cg(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(opt,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(q(0,spt,4,2,"ngb-alert",0),q(1,apt,4,1,"ngb-alert",1),_(2,"form",2),se("ngSubmit",function(){return r.updateGroup()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),A(7,"Group ID"),w()(),ie(8,"input",7),w(),_(9,"div",4)(10,"div",5)(11,"label",8),A(12,"Creator ID"),w()(),_(13,"a",9),ie(14,"input",10),w()()(),_(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),A(19,"Name"),w()(),ie(20,"input",12),_(21,"div",13),A(22,"Name is required"),w()(),_(23,"div",4)(24,"div",5)(25,"label",14),A(26,"Description"),w()(),ie(27,"input",15),w()(),_(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),A(32,"Avatar URL"),w()(),ie(33,"input",18),w(),_(34,"div",4)(35,"div",5)(36,"label",19),A(37,"Language"),w()(),ie(38,"input",20),w()(),_(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),A(43,"Members"),w()(),ie(44,"input",21),w(),_(45,"div",16)(46,"div",5)(47,"label",22),A(48,"Max Count"),w()(),ie(49,"input",23),w()(),_(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),A(54,"Open"),w()(),ie(55,"input",24),w()(),_(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),A(60,"Create Time"),w()(),ie(61,"input",27),w(),_(62,"div",4)(63,"div",5)(64,"label",28),A(65,"Update Time"),w()(),ie(66,"input",29),w()(),_(67,"div",30),ie(68,"div",31,32),w(),q(70,lpt,2,1,"button",33),w()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",r.updated),x(1),S("formGroup",r.groupForm),x(6),S("value",r.group.id),x(5),S("routerLink",ui(12,cpt,r.group.creator_id)),x(1),S("value",r.group.creator_id),x(6),S("ngClass",ui(14,upt,r.f.name.dirty&&r.f.name.errors)),x(1),S("hidden",r.f.name.disabled||r.f.name.valid||r.f.name.pristine),x(23),S("value",r.group.edge_count),x(17),S("value",r.group.create_time),x(5),S("value",r.group.update_time),x(4),S("ngIf",r.updateAllowed()))},dependencies:[Mc,dp,Ct,pr,ms,ts,lC,ps,gs,Hh,Lo,ns]})}return t})();function hpt(t,n){if(1&t&&(_(0,"ngb-alert",13),ie(1,"img",14),_(2,"h6",15),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function fpt(t,n){1&t&&(_(0,"span"),A(1,"Add by membership state"),w())}function ppt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P(2);x(1),ze(e.activeState)}}function gpt(t,n){if(1&t){const e=He();_(0,"button",20),se("click",function(){const o=we(e).$implicit;return xe(P(2).activeState=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function mpt(t,n){if(1&t&&(_(0,"div",16)(1,"button",17),q(2,fpt,2,0,"span",11),q(3,ppt,2,1,"span",11),w(),_(4,"div",18),q(5,gpt,2,1,"button",19),w()()),2&t){const e=P();x(2),S("ngIf",!e.activeState||""===e.activeState),x(1),S("ngIf",e.activeState&&""!==e.activeState),x(2),S("ngForOf",e.states)}}function vpt(t,n){if(1&t){const e=He();_(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),ie(5,"input",26),_(6,"div",27)(7,"div",28)(8,"button",29),se("click",function(){return we(e),xe(P().add())}),A(9,"Add"),w()()()()()()()()}if(2&t){const e=P();x(3),S("formGroup",e.addForm)}}function ypt(t,n){1&t&&(_(0,"th",30),A(1,"Demote"),w())}function _pt(t,n){1&t&&(_(0,"th",30),A(1,"Promote"),w())}function bpt(t,n){1&t&&(_(0,"th",31),A(1,"Remove"),w())}function wpt(t,n){1&t&&(_(0,"tr")(1,"td",32),A(2,"No group membership found."),w()())}function xpt(t,n){1&t&&(_(0,"span"),A(1,"Superadmin (0)"),w())}function Cpt(t,n){1&t&&(_(0,"span"),A(1,"Admin (1)"),w())}function Spt(t,n){1&t&&(_(0,"span"),A(1,"Member (2)"),w())}function kpt(t,n){1&t&&(_(0,"span"),A(1,"Join Request (3)"),w())}function Tpt(t,n){1&t&&(_(0,"span"),A(1,"Banned (4)"),w())}function Dpt(t,n){if(1&t){const e=He();_(0,"td",36)(1,"button",37),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().demoteGroupUser(r,s,a))}),Ne(),_(2,"svg",38),ie(3,"path",39),w()()()}}function Apt(t,n){if(1&t){const e=He();_(0,"td",36)(1,"button",37),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().promoteGroupUser(r,s,a))}),Ne(),_(2,"svg",40),ie(3,"path",41),w()()()}}function Ept(t,n){if(1&t){const e=He();_(0,"td",42)(1,"button",43),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteGroupUser(r,s,a))}),A(2,"Delete"),w()()}}function Mpt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(2),w(),_(3,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),q(6,xpt,2,0,"span",11),q(7,Cpt,2,0,"span",11),q(8,Spt,2,0,"span",11),q(9,kpt,2,0,"span",11),q(10,Tpt,2,0,"span",11),w(),_(11,"td",33),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(12),w(),q(13,Dpt,4,0,"td",34),q(14,Apt,4,0,"td",34),q(15,Ept,3,0,"td",35),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.user.id),x(2),ze(e.user.username),x(2),S("ngIf",0===e.state),x(1),S("ngIf",1===e.state),x(1),S("ngIf",2===e.state),x(1),S("ngIf",3===e.state),x(1),S("ngIf",4===e.state),x(2),ze(e.user.update_time),x(1),S("ngIf",i.editionAllowed()),x(1),S("ngIf",i.editionAllowed()),x(1),S("ngIf",i.editionAllowed())}}let Opt=(()=>{class t{route;router;consoleService;formBuilder;authService;error="";group;members=[];activeState="Add Member";states=["Add Member","Join"];addForm;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(js),te(zr))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(q(0,hpt,4,2,"ngb-alert",0),q(1,mpt,6,3,"div",1),q(2,vpt,10,1,"div",2),_(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),A(8,"User ID"),w(),_(9,"th"),A(10,"Name"),w(),_(11,"th",7),A(12,"State"),w(),_(13,"th",8),A(14,"Update Time"),w(),q(15,ypt,2,0,"th",9),q(16,_pt,2,0,"th",9),q(17,bpt,2,0,"th",10),w()(),_(18,"tbody"),q(19,wpt,3,0,"tr",11),q(20,Mpt,16,11,"tr",12),w()()()),2&i&&(S("ngIf",r.error),x(1),S("ngIf",!r.group.open&&r.editionAllowed()),x(1),S("ngIf",r.editionAllowed()),x(13),S("ngIf",r.editionAllowed()),x(1),S("ngIf",r.editionAllowed()),x(1),S("ngIf",r.editionAllowed()),x(2),S("ngIf",0===r.members.length),x(1),S("ngForOf",r.members))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Ipt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Npt(t,n){if(1&t&&(_(0,"ngb-alert",28),ie(1,"img",29),_(2,"h6",30),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function jpt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.activeType)}}function Ppt(t,n){if(1&t){const e=He();_(0,"button",31),se("click",function(){const o=we(e).$implicit;return xe(P().activeType=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function Rpt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.activeNode)}}function Lpt(t,n){if(1&t){const e=He();_(0,"button",31),se("click",function(){const o=we(e).$implicit;return xe(P().activeNode=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function Fpt(t,n){1&t&&(_(0,"tr")(1,"td",32),A(2,"No realtime matches were found."),w()())}function $pt(t,n){1&t&&ie(0,"div",40)}function Bpt(t,n){1&t&&ie(0,"div",41)}function Vpt(t,n){if(1&t){const e=He();_(0,"div",37),se("click",function(){we(e);const r=P(),o=r.index,s=r.$implicit,a=P();return a.getMatchState(o,s),xe(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),q(1,$pt,1,0,"div",38),q(2,Bpt,1,0,"div",39),w()}if(2&t){const e=P().index,i=P();x(1),S("ngIf",!i.matchStatesOpen[e]),x(1),S("ngIf",i.matchStatesOpen[e])}}function Hpt(t,n){1&t&&ie(0,"div",42)}function Upt(t,n){1&t&&(_(0,"span"),A(1,"Yes"),w())}function zpt(t,n){1&t&&(_(0,"span"),A(1,"No"),w())}function Gpt(t,n){1&t&&ie(0,"img",51)}function Wpt(t,n){if(1&t&&(_(0,"div")(1,"small")(2,"b"),A(3,"Current Tick"),w()(),_(4,"pre",47)(5,"small"),A(6),w()(),_(7,"small")(8,"b"),A(9,"Match State"),w()(),_(10,"pre",47)(11,"small"),A(12),w()()()),2&t){const e=P(2).index,i=P();x(6),ze(i.matchStates[e].tick),x(6),ze(i.matchStates[e].state)}}function qpt(t,n){1&t&&ie(0,"img",51)}function Ypt(t,n){if(1&t&&(_(0,"pre",47)(1,"small"),A(2),w()()),2&t){const e=P(2).index,i=P();x(2),ze(i.getMatchPresencesString(i.matchStates[e].presences))}}function Jpt(t,n){if(1&t&&(_(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),A(6,"Match Label"),w()(),_(7,"pre",47)(8,"small"),A(9),w()()(),_(10,"div",48),q(11,Gpt,1,0,"img",49),q(12,Wpt,13,2,"div",7),w(),_(13,"div",48)(14,"small")(15,"b"),A(16,"Match Presences"),w()(),q(17,qpt,1,0,"img",49),q(18,Ypt,3,1,"pre",50),w()()()()),2&t){const e=P(),i=e.$implicit,r=e.index,o=P();x(9),ze(i.api_match.label),x(2),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),x(1),S("ngIf",null!==o.matchStates[r]),x(5),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),x(1),S("ngIf",null!==o.matchStates[r])}}function Kpt(t,n){if(1&t&&(_(0,"tr")(1,"td"),q(2,Vpt,3,2,"div",33),q(3,Hpt,1,0,"div",34),A(4),w(),_(5,"td"),A(6),w(),_(7,"td",35),q(8,Upt,2,0,"span",7),q(9,zpt,2,0,"span",7),w(),_(10,"td"),A(11),w(),_(12,"td"),A(13),w(),_(14,"td"),A(15),w()(),q(16,Jpt,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=P();x(2),S("ngIf",i.api_match.authoritative),x(1),S("ngIf",!i.api_match.authoritative),x(1),wt(" ",i.api_match.match_id," "),x(2),ze(i.api_match.size),x(2),S("ngIf",i.api_match.authoritative),x(1),S("ngIf",!i.api_match.authoritative),x(2),ze(i.node),x(2),ze(i.api_match.handler_name),x(2),ze(i.api_match.authoritative?i.api_match.tick_rate:"-"),x(1),S("ngIf",r.matchStatesOpen[e])}}let Xpt=(()=>{class t{route;router;formBuilder;consoleService;error="";matches=[];matchStates=[];matchStatesOpen=[];updated=!1;searchForm1;searchForm2;searchForm3;type;activeType="All";types=["All","Authoritative","Relayed"];activeNode="All Nodes";nodes=["All Nodes"];constructor(e,i,r,o){this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));const i=e.get("type");this.type=Number(i);const r=e.get("node");if(this.route.data.subscribe(o=>{o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1===this.type||2===this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,w0e(this.consoleService,e,0===e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(js),te(kn))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Active Matches"),w(),_(2,"h6",1),A(3),w(),q(4,Npt,4,2,"ngb-alert",2),_(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),q(9,jpt,2,1,"span",7),w(),_(10,"div",8),q(11,Ppt,2,1,"button",9),w()()(),_(12,"div",10)(13,"button",11),se("click",function(){return r.search()}),A(14,"Search"),w()()(),_(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),se("ngSubmit",function(){return r.search()}),_(19,"div",16),ie(20,"input",17),w()(),_(21,"form",15),se("ngSubmit",function(){return r.search()}),_(22,"div",16),ie(23,"input",17),w()(),_(24,"form",15),se("ngSubmit",function(){return r.search()}),_(25,"div",16),ie(26,"input",18),_(27,"div",10)(28,"div",5)(29,"button",19),q(30,Rpt,2,1,"span",7),w(),_(31,"div",8),q(32,Lpt,2,1,"button",9),w()()()()()()()(),_(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),A(39,"Match ID"),w()(),_(40,"th",23),A(41,"Presence Count"),w(),_(42,"th",24),A(43,"Authoritative"),w(),_(44,"th",24),A(45,"Node"),w(),_(46,"th",25),A(47,"Handler Name"),w(),_(48,"th",26),A(49,"Tick Rate"),w()()(),_(50,"tbody"),q(51,Fpt,3,0,"tr",7),q(52,Kpt,17,10,"ng-template",27),w()()()),2&i&&(x(3),wt("",r.matches.length," running matches found."),x(1),S("ngIf",r.error),x(5),S("ngIf",r.activeType&&""!==r.activeType),x(2),S("ngForOf",r.types),x(7),S("hidden","All"!==r.activeType)("formGroup",r.searchForm1),x(3),S("hidden","Relayed"!==r.activeType)("formGroup",r.searchForm2),x(3),S("hidden","Authoritative"!==r.activeType)("formGroup",r.searchForm3),x(6),S("ngIf",r.activeNode&&""!==r.activeNode),x(2),S("ngForOf",r.nodes),x(6),Ft("pl-3",r.matches.length>0),x(13),S("ngIf",0===r.matches.length),x(1),S("ngForOf",r.matches))},dependencies:[Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Qpt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));return w0e(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))))}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function w0e(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return $t(null)}let Zpt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(_o(r=>$t(r.nodes.map(o=>o.name)))).pipe(Va(r=>(e.data={...e.data,error:r},$t([]))))}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function egt(t,n){if(1&t&&(_(0,"ngb-alert",25),ie(1,"img",26),_(2,"h6",27),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying groups: ",e.error,"")}}function tgt(t,n){1&t&&(_(0,"th",28),A(1,"Remove"),w())}function ngt(t,n){1&t&&(_(0,"tr")(1,"td",29),A(2,"No groups found - change the filter criteria or add new user groups."),w()())}function igt(t,n){1&t&&ie(0,"td")}function rgt(t,n){if(1&t){const e=He();_(0,"td",32)(1,"button",33),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteGroup(r,s,a))}),A(2,"Delete"),w()()}}function ogt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td",30),se("click",function(){const o=we(e).$implicit;return xe(P().viewGroup(o))}),A(2),w(),_(3,"td",30),se("click",function(){const o=we(e).$implicit;return xe(P().viewGroup(o))}),A(4),w(),_(5,"td",30),se("click",function(){const o=we(e).$implicit;return xe(P().viewGroup(o))}),A(6),w(),q(7,igt,1,0,"td",23),q(8,rgt,3,0,"td",31),w()}if(2&t){const e=n.$implicit,i=P();x(2),ze(e.id),x(2),ze(e.name),x(2),ze(e.update_time),x(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),x(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let sgt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";groupsCount=0;groups=[];nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Groups"),w(),_(2,"h6",1),A(3),w(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),se("ngSubmit",function(){return r.search(0)}),_(8,"div",6),ie(9,"input",7),_(10,"div",8)(11,"div",9)(12,"button",10),se("click",function(){return r.search(0)}),A(13,"Search"),w()()()()()(),_(14,"div",11)(15,"div",12)(16,"button",13),se("click",function(){return r.search(0)}),ie(17,"img",14),w(),_(18,"button",13),se("click",function(){return r.search(1)}),ie(19,"img",15),w()()()()(),q(20,egt,4,2,"ngb-alert",16),_(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),A(26,"Group ID"),w(),_(27,"th"),A(28,"Name"),w(),_(29,"th",21),A(30,"Last Update"),w(),q(31,tgt,2,0,"th",22),w()(),_(32,"tbody"),q(33,ngt,3,0,"tr",23),q(34,ogt,9,5,"tr",24),w()()()),2&i&&(x(3),wt("",r.groupsCount," groups found."),x(4),S("formGroup",r.searchForm),x(9),S("disabled",0===r.groups.length),x(2),S("disabled",""===r.nextCursor),x(2),S("ngIf",r.error),x(11),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.groups.length),x(1),S("ngForOf",r.groups))},dependencies:[Bt,Ct,pr,ms,ts,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),agt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lgt(t,n){if(1&t){const e=He();_(0,"button",13),se("click",function(r){return we(e),xe(P().exportGroup(r))}),ie(1,"img",14),A(2,"Export"),w()}}function cgt(t,n){if(1&t){const e=He();_(0,"button",15),se("click",function(r){return we(e),xe(P().deleteGroup(r,!1))}),ie(1,"img",16),A(2,"Delete"),w()}}function ugt(t,n){if(1&t&&(_(0,"ngb-alert",17),ie(1,"img",18),_(2,"h6",19),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}const dgt=function(t,n){return["/groups",t,n]};function hgt(t,n){if(1&t&&(_(0,"div"),ul(1,20),_(2,"a",21),A(3),w(),dl(),w()),2&t){const e=n.$implicit,i=P();x(1),S("ngbNavItem",e.path),x(1),S("routerLink",Ni(3,dgt,i.group.id,e.path)),x(1),ze(e.label)}}const fgt=function(){return["/groups"]};let pgt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;group;error="";views=[{label:"Details",path:"details"},{label:"Members",path:"members"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,XI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"User Group"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),A(7,"Group"),w()(),_(8,"li",6),A(9),w()()(),_(10,"div"),q(11,lgt,3,0,"button",7),q(12,cgt,3,0,"button",8),w()(),q(13,ugt,4,2,"ngb-alert",9),_(14,"nav",10,11),q(16,hgt,4,6,"div",12),w(),ie(17,"router-outlet")),2&i&&(x(6),S("routerLink",ma(6,fgt)),x(3),ze(r.group.id),x(2),S("ngIf",r.exportAllowed()),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.error),x(3),S("ngForOf",r.views))},dependencies:[yp,Mc,ty,Bt,Ct,pr,Bu,Wd,Ty,Yh],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),ggt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function mgt(t,n){if(1&t){const e=He();_(0,"button",12),se("click",function(r){return we(e),xe(P().deleteLeaderboard(r))}),ie(1,"img",13),A(2,"Delete Leaderboard"),w()}}function vgt(t,n){if(1&t&&(_(0,"ngb-alert",14),ie(1,"img",15),_(2,"h6",16),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}const ygt=function(t,n){return["/leaderboards",t,n]};function _gt(t,n){if(1&t&&(_(0,"div"),ul(1,17),_(2,"a",18),A(3),w(),dl(),w()),2&t){const e=n.$implicit,i=P();x(1),S("ngbNavItem",e.path),x(1),S("routerLink",Ni(3,ygt,i.leaderboard.id,e.path)),x(1),ze(e.label)}}const bgt=function(){return["/leaderboards"]};let wgt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;leaderboard;error="";views=[{label:"Details",path:"details"},{label:"Records",path:"records"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_DEVELOPER}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Leaderboard"),w(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),A(7,"Leaderboards"),w()(),_(8,"li",6),A(9),w()()(),_(10,"div"),q(11,mgt,3,0,"button",7),w()(),q(12,vgt,4,2,"ngb-alert",8),_(13,"nav",9,10),q(15,_gt,4,6,"div",11),w(),ie(16,"router-outlet")),2&i&&(x(6),S("routerLink",ma(5,bgt)),x(3),ze(r.leaderboard.id),x(2),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.error),x(3),S("ngForOf",r.views))},dependencies:[yp,Mc,ty,Bt,Ct,pr,Bu,Wd,Ty,Yh],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),xgt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Cgt=["editor"];function Sgt(t,n){if(1&t&&(_(0,"ngb-alert",24),ie(1,"img",25),_(2,"h6",26),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function kgt(t,n){if(1&t&&(_(0,"div",27)(1,"h6"),A(2,"Tournament"),w(),ie(3,"hr",28),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),A(8,"Title"),w()(),ie(9,"input",30),w(),_(10,"div",3)(11,"div",4)(12,"label",31),A(13,"Description"),w()(),ie(14,"input",32),w()(),_(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),A(19,"Category"),w()(),ie(20,"input",34),w(),_(21,"div",3)(22,"div",4)(23,"label",35),A(24,"Max Num Score"),w()(),ie(25,"input",36),w()(),_(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),A(30,"Size"),w()(),ie(31,"input",38),w(),_(32,"div",3)(33,"div",4)(34,"label",39),A(35,"Max Size"),w()(),ie(36,"input",40),w()(),_(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),A(41,"Duration"),w()(),ie(42,"input",42),w(),_(43,"div",3)(44,"div",4)(45,"label",43),A(46,"Join Required"),w()(),ie(47,"input",44),w()(),_(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),A(52,"Start Time"),w()(),ie(53,"input",46),w(),_(54,"div",3)(55,"div",4)(56,"label",47),A(57,"End Time"),w()(),ie(58,"input",48),w()(),_(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),A(63,"Start Active"),w()(),ie(64,"input",50),w(),_(65,"div",3)(66,"div",4)(67,"label",51),A(68,"End Active"),w()(),ie(69,"input",52),w()()()),2&t){const e=P();x(9),S("value",e.leaderboard.title),x(5),S("value",e.leaderboard.description),x(6),S("value",e.leaderboard.category),x(5),S("value",e.leaderboard.max_num_score),x(6),S("value",e.leaderboard.size),x(5),S("value",e.leaderboard.max_size),x(6),S("value",e.leaderboard.duration),x(5),S("value",e.leaderboard.join_required),x(6),S("value",e.leaderboard.start_time),x(5),S("value",e.leaderboard.end_time),x(6),S("value",e.leaderboard.start_active),x(5),S("value",e.leaderboard.end_active)}}let Tgt=(()=>{class t{route;editor;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};jsonEditor;leaderboard;error="";constructor(e){this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Vf({target:this.editor.nativeElement,props:{mode:Fr.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}static \u0275fac=function(i){return new(i||t)(te(Li))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xr(Cgt,5),2&i){let o;kt(o=Tt())&&(r.editor=o.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(i,r){1&i&&(q(0,Sgt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),A(6,"ID"),w()(),ie(7,"input",6),w(),_(8,"div",3)(9,"div",4)(10,"label",7),A(11,"Authoritative"),w()(),ie(12,"input",8),w()(),_(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),A(17,"Sort Order"),w()(),ie(18,"input",10),w(),_(19,"div",3)(20,"div",4)(21,"label",11),A(22,"Operator"),w()(),ie(23,"input",12),w()(),_(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),A(28,"Reset Schedule"),w()(),ie(29,"input",14),w(),_(30,"div",3)(31,"div",4)(32,"label",15),A(33,"Create Time"),w()(),ie(34,"input",16),w()(),_(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),A(39,"Prev Reset"),w()(),ie(40,"input",18),w(),_(41,"div",3)(42,"div",4)(43,"label",15),A(44,"Next Reset"),w()(),ie(45,"input",19),w()()(),q(46,kgt,70,12,"div",20),_(47,"div",21),ie(48,"div",22,23),w()),2&i&&(S("ngIf",r.error),x(7),S("value",r.leaderboard.id),x(5),S("value",r.leaderboard.authoritative),x(6),S("value",r.orderString[r.leaderboard.sort_order]),x(5),S("value",r.operatorString[r.leaderboard.operator]),x(6),S("value",r.leaderboard.reset_schedule),x(5),S("value",r.leaderboard.create_time),x(6),S("value",r.leaderboard.prev_reset),x(5),S("value",r.leaderboard.next_reset),x(1),S("ngIf",r.leaderboard.tournament))},dependencies:[Ct,pr],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})();function Dgt(t,n){if(1&t&&(_(0,"ngb-alert",19),ie(1,"img",20),_(2,"h6",21),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("An error occurred: ",e.error,"")}}function Agt(t,n){1&t&&(_(0,"th",22),A(1,"Remove"),w())}function Egt(t,n){1&t&&(_(0,"tr")(1,"td",23),A(2,"No records found."),w()())}function Mgt(t,n){1&t&&ie(0,"div",28)}function Ogt(t,n){1&t&&ie(0,"div",29)}function Igt(t,n){if(1&t){const e=He();_(0,"td",30)(1,"button",31),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteRecord(r,s,a))}),A(2,"Delete"),w()()}}function Ngt(t,n){if(1&t&&(_(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),A(4),w()()()()),2&t){const e=P().$implicit;x(4),ze(e.metadata)}}function jgt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",24),se("click",function(){const o=we(e).index,s=P();return xe(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),q(3,Mgt,1,0,"div",25),q(4,Ogt,1,0,"div",26),w(),A(5),w(),_(6,"td"),A(7),w(),_(8,"td"),A(9),w(),_(10,"td"),A(11),w(),_(12,"td"),A(13),w(),_(14,"td"),A(15),w(),_(16,"td"),A(17),w(),q(18,Igt,3,0,"td",27),w(),q(19,Ngt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.recordsMetadataOpen[e]),x(1),S("ngIf",r.recordsMetadataOpen[e]),x(1),wt(" ",i.owner_id," "),x(2),ze(i.username),x(2),ze(i.score),x(2),ze(i.subscore),x(2),ze(i.rank),x(2),ze(i.num_score),x(2),ze(i.expiry_time?i.expiry_time:"-"),x(1),S("ngIf",r.deleteAllowed()),x(1),S("ngIf",r.recordsMetadataOpen[e])}}let Pgt=(()=>{class t{route;consoleService;authService;deleteConfirmService;error="";leaderboard;records=[];recordsMetadataOpen=[];nextCursor="";prevCursor="";constructor(e,i,r,o){this.route=e,this.consoleService=i,this.authService=r,this.deleteConfirmService=o}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn),te(zr),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(q(0,Dgt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),ie(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),se("click",function(){return r.loadRecords(0)}),ie(7,"img",7),w(),_(8,"button",6),se("click",function(){return r.loadRecords(-1)}),ie(9,"img",8),w(),_(10,"button",6),se("click",function(){return r.loadRecords(1)}),ie(11,"img",9),w()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),A(17,"Owner ID"),w(),_(18,"th"),A(19,"Username"),w(),_(20,"th",14),A(21,"Score"),w(),_(22,"th",14),A(23,"Subscore"),w(),_(24,"th",14),A(25,"Rank"),w(),_(26,"th",14),A(27,"No. of scores"),w(),_(28,"th",15),A(29,"Expiry Time"),w(),q(30,Agt,2,0,"th",16),w()(),_(31,"tbody"),q(32,Egt,3,0,"tr",17),q(33,jgt,20,11,"ng-template",18),w()()()),2&i&&(S("ngIf",r.error),x(6),S("disabled",0===r.records.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(20),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.records.length),x(1),S("ngForOf",r.records))},dependencies:[Bt,Ct,pr]})}return t})(),Rgt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Lgt=["editorReq"],Fgt=["editorVars"],$gt=["editorRes"];function Bgt(t,n){if(1&t&&(_(0,"ngb-alert",27),ie(1,"img",28),_(2,"h6",29),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error invoking RPC call: ",e.error,"")}}function Vgt(t,n){if(1&t&&(_(0,"option",30),A(1),w()),2&t){const e=n.$implicit;Nd("value",e.method),x(1),ze(e.method)}}function Hgt(t,n){if(1&t&&(_(0,"option",30),A(1),w()),2&t){const e=n.$implicit;Nd("value",e.method),x(1),ze(e.method)}}function Ugt(t,n){if(1&t){const e=He();_(0,"button",31),se("click",function(){return we(e),xe(P().addSessionVars())}),A(1,"Add Session Variables"),w()}}let zgt=(()=>{class t{route;router;consoleService;formBuilder;editorReq;editorVars;editorRes;jsonEditorReq;jsonEditorVars;jsonEditorRes;error="";rpcEndpoints=[];endpoints=[];endpointCallForm;addVars=!1;constructor(e,i,r,o){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Sr.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditorReq=new Vf({target:this.editorReq.nativeElement,props:{mode:Fr.text,readOnly:!0}}),this.jsonEditorVars=new Vf({target:this.editorVars.nativeElement,props:{mode:Fr.text}}),this.jsonEditorRes=new Vf({target:this.editorRes.nativeElement,props:{mode:Fr.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=cg(this.jsonEditorReq.get()).text}catch(s){return void(this.error=s)}let i={};try{const s=cg(this.jsonEditorVars.get()).text;if(""!==s){const a=JSON.parse(s);Object.keys(a).forEach(l=>{if("string"!=typeof l)throw new Error(`Invalid session variables: ${l} must be a string`);if("string"!=typeof a[l])throw new Error(`Invalid session variables: ${a[l]} must be a string`)}),i=a}}catch(s){return void(this.error=s)}const r={user_id:this.f.user_id.value,body:e,session_vars:i};let o=null;o=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,r):this.consoleService.callApiEndpoint("",this.f.method.value,r),o.subscribe(s=>{if(s.error_message&&""!==s.error_message)this.jsonEditorRes.set({json:s.error_message});else{e="";try{e=""===s.body?s.body:JSON.stringify(JSON.parse(s.body),null,2)}catch(a){return void(this.error=a)}this.jsonEditorRes.set({text:e})}},s=>{this.jsonEditorRes.set({text:""}),this.error=s})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditorReq){if(!e||""===e)return this.jsonEditorReq.set({text:""}),void this.jsonEditorReq.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditorReq.set({text:i}),this.jsonEditorReq.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}addSessionVars(){this.addVars=!0,this.jsonEditorVars.set({json:{"":"","":""}})}get f(){return this.endpointCallForm.controls}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&(xr(Lgt,5),xr(Fgt,5),xr($gt,5)),2&i){let o;kt(o=Tt())&&(r.editorReq=o.first),kt(o=Tt())&&(r.editorVars=o.first),kt(o=Tt())&&(r.editorRes=o.first)}},decls:43,vars:8,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","btn btn-primary","type","button",3,"click",4,"ngIf"],[1,"row","mb-3",3,"hidden"],[1,"col-md-6","py-3"],[1,"text-muted","pt-2"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","200px"],["editorVars",""],[1,"row","mb-3"],[1,"col-lg-6","py-3"],[2,"height","500px"],["editorReq",""],["editorRes",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"API Explorer"),w(),q(2,Bgt,4,2,"ngb-alert",1),_(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),se("ngSubmit",function(){return r.sendRequest()}),_(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),A(11,"Select Endpoint"),w(),q(12,Vgt,2,2,"option",10),_(13,"option",11),A(14,"----"),w(),q(15,Hgt,2,2,"option",10),w()(),ie(16,"input",12),_(17,"div",13)(18,"button",14),A(19,"Send Request"),w()()()()()()(),q(20,Ugt,2,0,"button",15),_(21,"div",16)(22,"div",17)(23,"h5"),A(24,"Session Vars"),w(),_(25,"div",18),A(26,"Add variables as object of string to string key-value pairs."),w(),_(27,"div",19),ie(28,"div",20,21),w()()(),_(30,"div",22)(31,"div",23)(32,"h5"),A(33,"Request Body"),w(),_(34,"div",19),ie(35,"div",24,25),w()(),_(37,"div",23)(38,"h5"),A(39,"Response"),w(),_(40,"div",19),ie(41,"div",24,26),w()()()),2&i&&(x(2),S("ngIf",r.error),x(4),S("formGroup",r.endpointCallForm),x(4),S("value",""),x(2),S("ngForOf",r.rpcEndpoints),x(3),S("ngForOf",r.endpoints),x(3),S("disabled",r.f.method.invalid),x(2),S("ngIf",!r.addVars),x(1),S("hidden",!r.addVars))},dependencies:[Bt,Ct,pr,ms,_C,bC,ts,Fm,ps,gs,Lo,ns],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})}return t})(),Ggt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Wgt(t,n){if(1&t&&(_(0,"ngb-alert",16),ie(1,"img",17),_(2,"h6",18),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while processing request: ",e.error,"")}}function qgt(t,n){1&t&&(_(0,"th"),A(1,"User ID"),w())}function Ygt(t,n){1&t&&ie(0,"div",23)}function Jgt(t,n){1&t&&ie(0,"div",24)}function Kgt(t,n){if(1&t&&(_(0,"td"),A(1),w()),2&t){const e=P().$implicit;x(1),ze(e.user_id)}}function Xgt(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),A(6,"Provider Response"),w()()(),_(7,"div")(8,"pre",28)(9,"small"),A(10),w()()()()()()),2&t){const e=P().$implicit;x(10),ze(e.provider_response)}}function Qgt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",19),se("click",function(){const o=we(e).index,s=P();return xe(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),q(3,Ygt,1,0,"div",20),q(4,Jgt,1,0,"div",21),w(),A(5),w(),q(6,Kgt,2,1,"td",13),_(7,"td"),A(8),w(),_(9,"td"),A(10),w(),_(11,"td"),A(12),w(),_(13,"td"),A(14),w(),_(15,"td"),A(16),w()(),q(17,Xgt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.purchasesRowsOpen[e]),x(1),S("ngIf",r.purchasesRowsOpen[e]),x(1),wt(" ",i.transaction_id," "),x(1),S("ngIf",!r.userId),x(2),ze(i.product_id),x(2),ze(r.getStoreText(i.store)),x(2),ze(i.purchase_time),x(2),ze(i.create_time),x(2),ze(r.getRefundText(i.refund_time)),x(1),S("ngIf",r.purchasesRowsOpen[e])}}function Zgt(t,n){1&t&&(_(0,"tr")(1,"td",29),A(2,"No purchases were found."),w()())}let x0e=(()=>{class t{route;consoleService;purchases=[];purchasesRowsOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;transactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.route.data.subscribe(i=>{this.purchases=i[0].validated_purchases,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.transactionId.firstChange||(this.transactionId?(this.transactionId=this.transactionId.trim(),this.consoleService.getPurchase("",this.transactionId).subscribe(i=>{this.purchases=[i]},i=>{this.error=i})):""===this.transactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listPurchases("",this.userId,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(hy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn))};static \u0275cmp=nt({type:t,selectors:[["app-purchases"]],inputs:{transactionId:["transaction_id","transactionId"]},features:[Kt],decls:32,vars:7,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[4,"ngIf"],[2,"width","180px"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","6"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","6",1,"text-muted"]],template:function(i,r){1&i&&(q(0,Wgt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),ie(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),se("click",function(){return r.loadData("")}),ie(7,"img",7),w(),_(8,"button",6),se("click",function(){return r.loadData(r.prevCursor)}),ie(9,"img",8),w(),_(10,"button",6),se("click",function(){return r.loadData(r.nextCursor)}),ie(11,"img",9),w()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),A(17,"Transaction ID"),w(),q(18,qgt,2,0,"th",13),_(19,"th"),A(20,"Product ID"),w(),_(21,"th"),A(22,"Store"),w(),_(23,"th",14),A(24,"Purchase Time"),w(),_(25,"th",14),A(26,"Create Time"),w(),_(27,"th",14),A(28,"Refund Time"),w()()(),_(29,"tbody"),q(30,Qgt,18,10,"ng-template",15),q(31,Zgt,3,0,"tr",13),w()()()),2&i&&(S("ngIf",r.error),x(6),S("disabled",0===r.purchases.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(8),S("ngIf",!r.userId),x(12),S("ngForOf",r.purchases),x(1),S("ngIf",0===r.purchases.length))},dependencies:[Bt,Ct,pr]})}return t})(),C0e=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listPurchases("",r,100,"")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function emt(t,n){1&t&&(_(0,"span"),A(1,"Filter by type"),w())}function tmt(t,n){if(1&t&&(_(0,"span"),A(1),w()),2&t){const e=P();x(1),ze(e.activeFilter)}}function nmt(t,n){if(1&t){const e=He();_(0,"button",39),se("click",function(){const o=we(e).$implicit;return xe(P().activeFilter=o)}),A(1),w()}if(2&t){const e=n.$implicit;x(1),ze(e)}}function imt(t,n){if(1&t&&(_(0,"h6"),A(1),w()),2&t){const e=P();x(1),wt("Showing results for chat room label: ",e.f1.label.value,"")}}const rmt=function(t){return["/groups",t]};function omt(t,n){if(1&t&&(_(0,"h6"),A(1,"Showing results for group ID: "),_(2,"a",40),A(3),w()()),2&t){const e=P();x(2),S("routerLink",ui(2,rmt,e.route.snapshot.queryParamMap.get("group_id"))),x(1),ze(e.f2.group_id.value)}}const S0e=function(t){return["/accounts",t]};function smt(t,n){if(1&t&&(_(0,"h6"),A(1,"Showing results for user IDs: "),_(2,"a",40),A(3),w(),A(4,", "),_(5,"a",40),A(6),w()()),2&t){const e=P();x(2),S("routerLink",ui(4,S0e,e.route.snapshot.queryParamMap.get("user_id_one"))),x(1),ze(e.f3.user_id_one.value),x(2),S("routerLink",ui(6,S0e,e.route.snapshot.queryParamMap.get("user_id_two"))),x(1),ze(e.f3.user_id_two.value)}}function amt(t,n){if(1&t&&(_(0,"ngb-alert",41),ie(1,"img",42),_(2,"h6",43),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error when querying messages: ",e.error,"")}}function lmt(t,n){1&t&&(_(0,"th",44),A(1,"Remove"),w())}function cmt(t,n){if(1&t&&(_(0,"tr")(1,"td",45),A(2,"No messages found."),w()()),2&t){const e=P();x(1),Re("colspan",e.deleteAllowed()?6:5)}}function umt(t,n){1&t&&ie(0,"div",54)}function dmt(t,n){1&t&&ie(0,"div",55)}function hmt(t,n){1&t&&ie(0,"td")}function fmt(t,n){if(1&t){const e=He();_(0,"td",56)(1,"button",57),se("click",function(r){we(e);const o=P(),s=o.index,a=o.$implicit;return xe(P().deleteMessage(r,s,a))}),A(2,"Delete"),w()()}}function pmt(t,n){if(1&t&&(_(0,"tr",58)(1,"td"),A(2),w()()),2&t){const e=P().$implicit,i=P();x(1),Re("colspan",i.deleteAllowed()?6:5),x(1),wt(" ",e.content," ")}}function gmt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td"),A(2),w(),_(3,"td",46),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(4),w(),_(5,"td",47),se("click",function(){const o=we(e).$implicit;return xe(P().viewAccount(o))}),A(6),w(),_(7,"td",48)(8,"div",49),se("click",function(){const o=we(e).index,s=P();return xe(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),q(9,umt,1,0,"div",50),q(10,dmt,1,0,"div",51),w(),A(11),w(),_(12,"td"),A(13),w(),q(14,hmt,1,0,"td",3),q(15,fmt,3,0,"td",52),w(),q(16,pmt,3,2,"tr",53)}if(2&t){const e=n.$implicit,i=n.index,r=P();x(2),ze(e.code),x(2),ze(e.sender_id),x(2),ze(e.username),x(3),S("ngIf",!r.messageStatesOpen[i]),x(1),S("ngIf",r.messageStatesOpen[i]),x(1),wt(" ",e.content," "),x(2),ze(e.create_time),x(1),S("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),x(1),S("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),x(1),S("ngIf",r.messageStatesOpen[i])}}function mmt(t,n){if(1&t&&(_(0,"ngb-alert",59),ie(1,"img",42),_(2,"h6",43),A(3,"Failed to delete data."),w(),_(4,"p",60),A(5),w()()),2&t){const e=P();S("dismissible",!1),x(5),ze(e.deleteError)}}function vmt(t,n){if(1&t){const e=He();_(0,"ngb-alert",61),se("close",function(){return we(e),xe(P().deleteSuccess=!1)}),ie(1,"img",62),_(2,"h6",43),A(3),w()()}if(2&t){const e=P();S("dismissible",!0),x(3),Ah("",e.totalDeleted," messages ",e.totalDeleted>0?"successfully":""," deleted.")}}function ymt(t,n){if(1&t){const e=He();_(0,"button",63),se("click",function(){return we(e),xe(P().deleteData())}),A(1,"Delete messages"),w()}2&t&&S("disabled",P().deleting)}let _mt=(()=>{class t{route;router;consoleService;authService;formBuilder;modalService;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";messages=[];nextCursor="";searchForm1;searchForm2;searchForm3;type;confirmDeleteForm;deleteError="";deleteSuccess=!1;deleting=!1;totalDeleted=0;activeFilter="";filters=["Chat Room","Group Chat","Direct Chat"];messageStatesOpen=[];constructor(e,i,r,o,s,a,l){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.deleteConfirmService=l,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Sr.compose([Sr.required,Sr.pattern("DELETE")])],numberValueControl:{title:"Choose how many days to retain:",id:"days"},days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");const i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2===this.type||3===this.type||4===this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=nn.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(e=>{this.deleteError="",this.deleting=!0;const i=new Date,r=Number(e.days);i.setDate(i.getDate()-r),this.consoleService.deleteChannelMessages("",i.toISOString(),null).subscribe(o=>{this.totalDeleted=Number(o.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const s=this.route.snapshot.queryParamMap,a=s.get("type");let l=s.get("label");l||(l="0");const c=s.get("group_id"),u=s.get("user_id_one"),d=s.get("user_id_two");let h=s.get("cursor");h||(h=""),a&&this.updateMessages(Number(a),l,c,u,d,h)},o=>{this.deleting=!1,this.deleteError=o})},this.confirmDeleteForm,"Delete messages","Are you sure you want to delete all messages before retain days?")}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(te(Li),te(xi),te(kn),te(zr),te(js),te(zC),te(Wa))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:68,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Chat Messages"),w(),_(2,"div",1)(3,"button",2),q(4,emt,2,0,"span",3),q(5,tmt,2,1,"span",3),w(),_(6,"div",4),q(7,nmt,2,1,"button",5),w()(),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),ie(13,"input",11),_(14,"div",12)(15,"div",13)(16,"button",14),se("click",function(){return r.type=2,r.search(0)}),A(17,"Search"),w()()()()(),_(18,"form",9)(19,"div",10),ie(20,"input",15),_(21,"div",12)(22,"div",13)(23,"button",14),se("click",function(){return r.type=3,r.search(0)}),A(24,"Search "),w()()()()(),_(25,"form",9)(26,"div",10),ie(27,"input",16),_(28,"div",12)(29,"span",17),se("click",function(){return r.f3.user_id_one.setValue(r.systemUserId)}),ie(30,"img",18),w()(),ie(31,"input",19),_(32,"div",12)(33,"div",13)(34,"button",14),se("click",function(){return r.type=4,r.search(0)}),A(35,"Search "),w()()()()()(),_(36,"div",20)(37,"div",21)(38,"button",22),se("click",function(){return r.search(0)}),ie(39,"img",23),w(),_(40,"button",22),se("click",function(){return r.search(1)}),ie(41,"img",24),w()()()()(),q(42,imt,2,1,"h6",3),q(43,omt,4,4,"h6",3),q(44,smt,7,8,"h6",3),q(45,amt,4,2,"ngb-alert",25),_(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),A(51,"Code"),w(),_(52,"th",30),A(53,"Sender ID"),w(),_(54,"th",31),A(55,"Username"),w(),_(56,"th"),A(57,"Content"),w(),_(58,"th",32),A(59,"Create Time"),w(),q(60,lmt,2,0,"th",33),w()(),_(61,"tbody"),q(62,cmt,3,1,"tr",3),q(63,gmt,17,10,"ng-template",34),w()()(),q(64,mmt,6,2,"ngb-alert",35),q(65,vmt,4,3,"ngb-alert",36),_(66,"div",37),q(67,ymt,2,1,"button",38),w()),2&i&&(x(4),S("ngIf",!r.activeFilter||""===r.activeFilter),x(1),S("ngIf",r.activeFilter&&""!==r.activeFilter),x(2),S("ngForOf",r.filters),x(4),S("hidden","Chat Room"!==r.activeFilter)("formGroup",r.searchForm1),x(7),S("hidden","Group Chat"!==r.activeFilter)("formGroup",r.searchForm2),x(7),S("hidden","Direct Chat"!==r.activeFilter)("formGroup",r.searchForm3),x(13),S("disabled",0===r.messages.length),x(2),S("disabled",""===r.nextCursor||null===r.nextCursor),x(2),S("ngIf",0!=r.messages.length&&""===r.error&&2==r.type),x(1),S("ngIf",0!=r.messages.length&&""===r.error&&3==r.type),x(1),S("ngIf",0!=r.messages.length&&""===r.error&&4==r.type),x(1),S("ngIf",r.error),x(15),S("ngIf",r.deleteAllowed()),x(2),S("ngIf",0===r.messages.length),x(1),S("ngForOf",r.messages),x(1),S("ngIf",r.deleteError),x(1),S("ngIf",r.deleteSuccess),x(2),S("ngIf",r.deleteMessagesAllowed()))},dependencies:[Mc,Bt,Ct,pr,Rc,Op,qh,Wh,ms,ts,ps,gs,Lo,ns],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})}return t})(),bmt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Va(o=>(e.data={...e.data,error:o},$t(null))));default:return $t(null)}}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function wmt(t,n){if(1&t&&(_(0,"ngb-alert",16),ie(1,"img",17),_(2,"h6",18),A(3),w()()),2&t){const e=P();S("dismissible",!1),x(3),wt("Error while processing request: ",e.error,"")}}function xmt(t,n){1&t&&ie(0,"div",23)}function Cmt(t,n){1&t&&ie(0,"div",24)}function Smt(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),A(6,"Provider Response"),w()()(),_(7,"div")(8,"pre",28)(9,"small"),A(10),w()()(),_(11,"div",29)(12,"small")(13,"b"),A(14,"Provider Notification"),w()()(),_(15,"div")(16,"pre",28)(17,"small"),A(18),w()()()()()()),2&t){const e=P().$implicit;x(10),ze(e.provider_response),x(8),ze(e.provider_notification)}}function kmt(t,n){if(1&t){const e=He();_(0,"tr")(1,"td")(2,"div",19),se("click",function(){const o=we(e).index,s=P();return xe(s.subscriptionsRowOpen[o]=!s.subscriptionsRowOpen[o])}),q(3,xmt,1,0,"div",20),q(4,Cmt,1,0,"div",21),w(),A(5),w(),_(6,"td"),A(7),w(),_(8,"td"),A(9),w(),_(10,"td"),A(11),w(),_(12,"td"),A(13),w(),_(14,"td"),A(15),w(),_(16,"td"),A(17),w()(),q(18,Smt,19,2,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=P();x(3),S("ngIf",!r.subscriptionsRowOpen[e]),x(1),S("ngIf",r.subscriptionsRowOpen[e]),x(1),wt(" ",i.product_id," "),x(2),ze(i.original_transaction_id),x(2),ze(r.getStoreText(i.store)),x(2),ze(i.purchase_time),x(2),ze(i.expiry_time),x(2),ze(i.create_time),x(2),ze(r.getRefundText(i.refund_time)),x(1),S("ngIf",r.subscriptionsRowOpen[e])}}function Tmt(t,n){1&t&&(_(0,"tr")(1,"td",30),A(2,"No subscriptions were found."),w()())}let k0e=(()=>{class t{route;consoleService;subscriptions=[];subscriptionsRowOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;originalTransactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.userId=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(i=>{this.subscriptions=i[0].validated_subscriptions,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.originalTransactionId.firstChange||(this.originalTransactionId?(this.originalTransactionId=this.originalTransactionId.trim(),this.consoleService.getSubscription("",this.originalTransactionId).subscribe(i=>{this.subscriptions=[i]},i=>{this.error=i})):""===this.originalTransactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listSubscriptions("",this.userId,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.subscriptionsRowOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(hy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(te(Li),te(kn))};static \u0275cmp=nt({type:t,selectors:[["app-subscriptions"]],inputs:{originalTransactionId:["original_transaction_id","originalTransactionId"]},features:[Kt],decls:33,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],[1,"pt-2"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(q(0,wmt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),ie(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),se("click",function(){return r.loadData("")}),ie(7,"img",7),w(),_(8,"button",6),se("click",function(){return r.loadData(r.prevCursor)}),ie(9,"img",8),w(),_(10,"button",6),se("click",function(){return r.loadData(r.nextCursor)}),ie(11,"img",9),w()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),A(17,"Product ID"),w(),_(18,"th"),A(19,"Original Transaction ID"),w(),_(20,"th"),A(21,"Store"),w(),_(22,"th",13),A(23,"Purchase Time"),w(),_(24,"th",13),A(25,"Expiry Time"),w(),_(26,"th",13),A(27,"Create Time"),w(),_(28,"th",13),A(29,"Refund Time"),w()()(),_(30,"tbody"),q(31,kmt,19,10,"ng-template",14),q(32,Tmt,3,0,"tr",15),w()()()),2&i&&(S("ngIf",r.error),x(6),S("disabled",0===r.subscriptions.length),x(2),S("disabled",""===r.prevCursor),x(2),S("disabled",""===r.nextCursor),x(21),S("ngForOf",r.subscriptions),x(1),S("ngIf",0===r.subscriptions.length))},dependencies:[Bt,Ct,pr]})}return t})(),T0e=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listSubscriptions("",r,100,"")}static \u0275fac=function(i){return new(i||t)(Ve(kn))};static \u0275prov=Ke({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Dmt=[{path:"",component:jLe,canActivate:[eIe],canActivateChild:[PLe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:GHe,resolve:[WHe]},{path:"config",component:VGe,resolve:[HGe]},{path:"users",component:qGe,resolve:[YGe]},{path:"modules",component:lWe,resolve:[cWe]},{path:"storage",component:yWe,resolve:[_We,bWe],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Mht,resolve:[Oht],pathMatch:"full"},{path:"leaderboards",component:Vht,resolve:[Hht]},{path:"leaderboards/:id",component:wgt,resolve:[xgt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:Tgt,resolve:[]},{path:"records",component:Pgt,resolve:[Rgt]}]},{path:"matches",component:Xpt,resolve:[Qpt,Zpt]},{path:"groups",component:sgt,resolve:[agt]},{path:"groups/:id",component:pgt,resolve:[ggt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:dpt,resolve:[]},{path:"members",component:Opt,resolve:[Ipt],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Kht,resolve:[Xht]},{path:"accounts/:id",component:uft,resolve:[dft],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:vft,resolve:[]},{path:"authentication",component:xft,resolve:[]},{path:"wallet",component:jft,resolve:[Pft]},{path:"friends",component:Gft,resolve:[Wft]},{path:"groups",component:ipt,resolve:[rpt]},{path:"purchases",component:x0e,resolve:[C0e]},{path:"subscriptions",component:k0e,resolve:[T0e]}]},{path:"apiexplorer",component:zgt,resolve:[Ggt]},{path:"chat",component:_mt,resolve:[bmt]},{path:"purchases",component:(()=>{class t{formBuilder;transactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({transaction_id:[""]})}search(){this.transactionId=this.f.transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:12,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","transaction_id","placeholder","Search by transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Purchases"),w(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),se("ngSubmit",function(){return r.search()}),_(6,"div",5),ie(7,"input",6),_(8,"div",7)(9,"button",8),se("click",function(){return r.search()}),A(10,"Search"),w()()()()()()(),ie(11,"app-purchases",9)),2&i&&(x(5),S("formGroup",r.searchForm),x(6),S("transaction_id",r.transactionId))},dependencies:[ms,ts,ps,gs,Lo,ns,x0e],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[C0e]},{path:"subscriptions",component:(()=>{class t{formBuilder;originalTransactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({original_transaction_id:[""]})}search(){this.originalTransactionId=this.f.original_transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(te(js))};static \u0275cmp=nt({type:t,selectors:[["ng-component"]],decls:13,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","original_transaction_id","placeholder","Search by original_transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"original_transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),A(1,"Subscriptions"),w(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),se("ngSubmit",function(){return r.search()}),_(6,"div",5),ie(7,"input",6),_(8,"div",7)(9,"div",8)(10,"button",9),se("click",function(){return r.search()}),A(11,"Search"),w()()()()()()()(),ie(12,"app-subscriptions",10)),2&i&&(x(5),S("formGroup",r.searchForm),x(7),S("original_transaction_id",r.originalTransactionId))},dependencies:[ms,ts,ps,gs,Lo,ns,k0e],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[T0e]}]},{path:"login",component:Q3e,canActivate:[Z3e]},{path:"**",redirectTo:""}];let Amt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Mn({type:t});static \u0275inj=Dn({imports:[KV.forRoot(Dmt,{useHash:!0}),KV]})}return t})(),Emt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=nt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(i,r){1&i&&ie(0,"router-outlet")},dependencies:[yp]})}return t})();new class Omt extends Lu{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Nmt=1;const jmt=Promise.resolve(),sD={};function D0e(t){return t in sD&&(delete sD[t],!0)}const A0e={setImmediate(t){const n=Nmt++;return sD[n]=!0,jmt.then(()=>D0e(n)&&t()),n},clearImmediate(t){D0e(t)}};new class Rmt extends Lu{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=A0e.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(A0e.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const hvt=new Ut("ng-select-selection-model");function fvt(){return new pvt}class pvt{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}let gvt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=Mn({type:t}),t.\u0275inj=Dn({providers:[{provide:hvt,useValue:fvt}],imports:[Mh]}),t})(),mvt=(()=>{class t{authenticationService;constructor(e){this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}static \u0275fac=function(i){return new(i||t)(Ve(zr))};static \u0275prov=Ke({token:t,factory:t.\u0275fac})}return t})(),vvt=(()=>{class t{authenticationService;router;constructor(e,i){this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Va(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),gp(r.error.message||r.statusText))))}static \u0275fac=function(i){return new(i||t)(Ve(zr),Ve(xi))};static \u0275prov=Ke({token:t,factory:t.\u0275fac})}return t})(),yvt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Mn({type:t,bootstrap:[Emt]});static \u0275inj=Dn({providers:[J3e,Yz,{provide:LO,useValue:{host:document.location.origin,timeout:15e3}},{provide:PO,useClass:mvt,multi:!0},{provide:PO,useClass:vvt,multi:!0}],imports:[CGe,Amt,lM,SAe,W3e,kLe,SHe,S3e.forRoot({apiKey:"dHl7FTjJ9icepBjEdOCcyMFQYL1BBiQO",debug:!1,loadOnInitialization:!0}),kAe,w3e,b3e,gvt]})}return t})();vTe().bootstrapModule(yvt).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},327:function(Pg,Bb){var Gf,Wf;void 0!==(Wf="function"==typeof(Gf=function(){"use strict";function Rl(pn,zi,ua){var _r=new XMLHttpRequest;_r.open("GET",pn),_r.responseType="blob",_r.onload=function(){Cd(_r.response,zi,ua)},_r.onerror=function(){console.error("could not download file")},_r.send()}function qf(pn){var zi=new XMLHttpRequest;zi.open("HEAD",pn,!1);try{zi.send()}catch{}return 200<=zi.status&&299>=zi.status}function nl(pn){try{pn.dispatchEvent(new MouseEvent("click"))}catch{var zi=document.createEvent("MouseEvents");zi.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),pn.dispatchEvent(zi)}}var Na="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,cD=Na.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Cd=Na.saveAs||("object"!=typeof window||window!==Na?function(){}:"download"in HTMLAnchorElement.prototype&&!cD?function(pn,zi,ua){var _r=Na.URL||Na.webkitURL,Ln=document.createElement("a");Ln.download=zi=zi||pn.name||"download",Ln.rel="noopener","string"==typeof pn?(Ln.href=pn,Ln.origin===location.origin?nl(Ln):qf(Ln.href)?Rl(pn,zi,ua):nl(Ln,Ln.target="_blank")):(Ln.href=_r.createObjectURL(pn),setTimeout(function(){_r.revokeObjectURL(Ln.href)},4e4),setTimeout(function(){nl(Ln)},0))}:"msSaveOrOpenBlob"in navigator?function(pn,zi,ua){if(zi=zi||pn.name||"download","string"!=typeof pn)navigator.msSaveOrOpenBlob(function Ia(pn,zi){return typeof zi>"u"?zi={autoBom:!1}:"object"!=typeof zi&&(console.warn("Deprecated: Expected third argument to be a object"),zi={autoBom:!zi}),zi.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(pn.type)?new Blob(["\ufeff",pn],{type:pn.type}):pn}(pn,ua),zi);else if(qf(pn))Rl(pn,zi,ua);else{var _r=document.createElement("a");_r.href=pn,_r.target="_blank",setTimeout(function(){nl(_r)})}}:function(pn,zi,ua,_r){if((_r=_r||open("","_blank"))&&(_r.document.title=_r.document.body.innerText="downloading..."),"string"==typeof pn)return Rl(pn,zi,ua);var Ln="application/octet-stream"===pn.type,Vb=/constructor/i.test(Na.HTMLElement)||Na.safari,Hb=/CriOS\/[\d]+/.test(navigator.userAgent);if((Hb||Ln&&Vb||cD)&&typeof FileReader<"u"){var j0=new FileReader;j0.onloadend=function(){var Yf=j0.result;Yf=Hb?Yf:Yf.replace(/^data:[^;]*;/,"data:attachment/file;"),_r?_r.location.href=Yf:location=Yf,_r=null},j0.readAsDataURL(pn)}else{var _h=Na.URL||Na.webkitURL,bh=_h.createObjectURL(pn);_r?_r.location=bh:location.href=bh,_r=null,setTimeout(function(){_h.revokeObjectURL(bh)},4e4)}});Na.saveAs=Cd.saveAs=Cd,Pg.exports=Cd})?Gf.apply(Bb,[]):Gf)&&(Pg.exports=Wf)}},Pg=>{Pg(Pg.s=951)}]); \ No newline at end of file diff --git a/console/ui/dist/prod/static/main.9c45889c179d242f.js b/console/ui/dist/prod/static/main.9c45889c179d242f.js deleted file mode 100644 index b230cf58a4..0000000000 --- a/console/ui/dist/prod/static/main.9c45889c179d242f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkui=self.webpackChunkui||[]).push([[179],{378:(Yt,Dn,ke)=>{"use strict";function nt(t){return"function"==typeof t}let Ie=!1;const ct={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Ie&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Ie=t},get useDeprecatedSynchronousErrorHandling(){return Ie}};function ze(t){setTimeout(()=>{throw t},0)}const be={closed:!0,next(t){},error(t){if(ct.useDeprecatedSynchronousErrorHandling)throw t;ze(t)},complete(){}},Ze=Array.isArray||(t=>t&&"number"==typeof t.length);function $e(t){return null!==t&&"object"==typeof t}const oe=(()=>{function t(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return t.prototype=Object.create(Error.prototype),t})();class ce{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ce)e.remove(this);else if(null!==e)for(let s=0;sn.concat(e instanceof oe?e.errors:e),[])}ce.EMPTY=((t=new ce).closed=!0,t);const T="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class F extends ce{constructor(n,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=be;break;case 1:if(!n){this.destination=be;break}if("object"==typeof n){n instanceof F?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new ee(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new ee(this,n,e,i)}}[T](){return this}static create(n,e,i){const r=new F(n,e,i);return r.syncErrorThrowable=!1,r}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class ee extends F{constructor(n,e,i,r){super(),this._parentSubscriber=n;let o,s=this;nt(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==be&&(s=Object.create(e),nt(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;ct.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=ct;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=n,e.syncErrorThrown=!0):ze(n),this.unsubscribe();else{if(this.unsubscribe(),i)throw n;ze(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const e=()=>this._complete.call(this._context);ct.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,e){try{n.call(this._context,e)}catch(i){if(this.unsubscribe(),ct.useDeprecatedSynchronousErrorHandling)throw i;ze(i)}}__tryOrSetError(n,e,i){if(!ct.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return ct.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=r,n.syncErrorThrown=!0,!0):(ze(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const St="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ft(t){return t}function yn(t){return 0===t.length?Ft:1===t.length?t[0]:function(e){return t.reduce((i,r)=>r(i),e)}}let en=(()=>{class t{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new t;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function Je(t,n,e){if(t){if(t instanceof F)return t;if(t[T])return t[T]()}return t||n||e?new F(t,n,e):new F(be)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||ct.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),ct.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){ct.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Ae(t){for(;t;){const{closed:n,destination:e,isStopped:i}=t;if(n||i)return!1;t=e&&e instanceof F?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=Ai(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[St](){return this}pipe(...e){return 0===e.length?this:yn(e)(this)}toPromise(e){return new(e=Ai(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return t.create=n=>new t(n),t})();function Ai(t){if(t||(t=ct.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const Ur=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class ss extends ce{constructor(n,e){super(),this.subject=n,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,e=n.observers;if(this.subject=null,!e||0===e.length||n.isStopped||n.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class Ya extends F{constructor(n){super(n),this.destination=n}}let dr=(()=>{class t extends en{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[T](){return new Ya(this)}lift(e){const i=new vu(this,this);return i.operator=e,i}next(e){if(this.closed)throw new Ur;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew vu(n,e),t})();class vu extends dr{constructor(n,e){super(),this.destination=n,this.source=e}next(n){const{destination:e}=this;e&&e.next&&e.next(n)}error(n){const{destination:e}=this;e&&e.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:e}=this;return e?this.source.subscribe(n):ce.EMPTY}}function Ca(t){return t&&"function"==typeof t.schedule}function _n(t,n){return function(i){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Cd(t,n))}}class Cd{constructor(n,e){this.project=n,this.thisArg=e}call(n,e){return e.subscribe(new Sd(n,this.project,this.thisArg))}}class Sd extends F{constructor(n,e,i){super(n),this.project=e,this.count=0,this.thisArg=i||this}_next(n){let e;try{e=this.project.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Kn=t=>n=>{for(let e=0,i=t.length;et&&"number"==typeof t.length&&"function"!=typeof t;function cl(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const Ql=t=>{if(t&&"function"==typeof t[St])return(t=>n=>{const e=t[St]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(n)})(t);if(Yr(t))return Kn(t);if(cl(t))return(t=>n=>(t.then(e=>{n.closed||(n.next(e),n.complete())},e=>n.error(e)).then(null,ze),n))(t);if(t&&"function"==typeof t[Fo])return(t=>n=>{const e=t[Fo]();for(;;){let i;try{i=e.next()}catch(r){return n.error(r),n}if(i.done){n.complete();break}if(n.next(i.value),n.closed)break}return"function"==typeof e.return&&n.add(()=>{e.return&&e.return()}),n})(t);{const e=`You provided ${$e(t)?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Fc(t,n){return new en(e=>{const i=new ce;let r=0;return i.add(n.schedule(function(){r!==t.length?(e.next(t[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function ro(t,n){return n?function la(t,n){if(null!=t){if(function _u(t){return t&&"function"==typeof t[St]}(t))return function kd(t,n){return new en(e=>{const i=new ce;return i.add(n.schedule(()=>{const r=t[St]();i.add(r.subscribe({next(o){i.add(n.schedule(()=>e.next(o)))},error(o){i.add(n.schedule(()=>e.error(o)))},complete(){i.add(n.schedule(()=>e.complete()))}}))})),i})}(t,n);if(cl(t))return function Nc(t,n){return new en(e=>{const i=new ce;return i.add(n.schedule(()=>t.then(r=>{i.add(n.schedule(()=>{e.next(r),i.add(n.schedule(()=>e.complete()))}))},r=>{i.add(n.schedule(()=>e.error(r)))}))),i})}(t,n);if(Yr(t))return Fc(t,n);if(function Xa(t){return t&&"function"==typeof t[Fo]}(t)||"string"==typeof t)return function Dd(t,n){if(!t)throw new Error("Iterable cannot be null");return new en(e=>{const i=new ce;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(n.schedule(()=>{r=t[Fo](),i.add(n.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(t,n)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,n):t instanceof en?t:new en(Ql(t))}class Ml extends F{constructor(n){super(),this.parent=n}_next(n){this.parent.notifyNext(n)}_error(n){this.parent.notifyError(n),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class Y extends F{notifyNext(n){this.destination.next(n)}notifyError(n){this.destination.error(n)}notifyComplete(){this.destination.complete()}}function Ne(t,n){if(n.closed)return;if(t instanceof en)return t.subscribe(n);let e;try{e=Ql(t)(n)}catch(i){n.error(i)}return e}function et(t,n,e=Number.POSITIVE_INFINITY){return"function"==typeof n?i=>i.pipe(et((r,o)=>ro(t(r,o)).pipe(_n((s,a)=>n(r,s,o,a))),e)):("number"==typeof n&&(e=n),i=>i.lift(new Ht(t,e)))}class Ht{constructor(n,e=Number.POSITIVE_INFINITY){this.project=n,this.concurrent=e}call(n,e){return e.subscribe(new Kt(n,this.project,this.concurrent))}}class Kt extends Y{constructor(n,e,i=Number.POSITIVE_INFINITY){super(n),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(n){this.active0?this._next(n.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function M(t=Number.POSITIVE_INFINITY){return et(Ft,t)}function ot(t,n){return n?Fc(t,n):new en(Kn(t))}function Dt(...t){let n=Number.POSITIVE_INFINITY,e=null,i=t[t.length-1];return Ca(i)?(e=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===e&&1===t.length&&t[0]instanceof en?t[0]:M(n)(ot(t,e))}function Ut(){return function(n){return n.lift(new Bt(n))}}class Bt{constructor(n){this.connectable=n}call(n,e){const{connectable:i}=this;i._refCount++;const r=new hn(n,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class hn extends F{constructor(n,e){super(n),this.connectable=e}_unsubscribe(){const{connectable:n}=this;if(!n)return void(this.connection=null);this.connectable=null;const e=n._refCount;if(e<=0)return void(this.connection=null);if(n._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=n._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class fe extends en{constructor(n,e){super(),this.source=n,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(n){return this.getSubject().subscribe(n)}getSubject(){const n=this._subject;return(!n||n.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let n=this._connection;return n||(this._isComplete=!1,n=this._connection=new ce,n.add(this.source.subscribe(new Ot(this.getSubject(),this))),n.closed&&(this._connection=null,n=ce.EMPTY)),n}refCount(){return Ut()(this)}}const mt=(()=>{const t=fe.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class Ot extends Ya{constructor(n,e){super(n),this.connectable=e}_error(n){this._unsubscribe(),super._error(n)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const n=this.connectable;if(n){this.connectable=null;const e=n._connection;n._refCount=0,n._subject=null,n._connection=null,e&&e.unsubscribe()}}}class cn{constructor(n,e){this.subjectFactory=n,this.selector=e}call(n,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(n);return o.add(e.subscribe(r)),o}}function Wt(){return new dr}function Ge(){return t=>Ut()(function Pt(t,n){return function(i){let r;if(r="function"==typeof t?t:function(){return t},"function"==typeof n)return i.lift(new cn(r,n));const o=Object.create(i,mt);return o.source=i,o.subjectFactory=r,o}}(Wt)(t))}function qe(t){for(let n in t)if(t[n]===qe)return n;throw Error("Could not find renamed property on target object.")}function _t(t,n){for(const e in n)n.hasOwnProperty(e)&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function bn(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(bn).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const n=t.toString();if(null==n)return""+n;const e=n.indexOf("\n");return-1===e?n:n.substring(0,e)}function Nr(t,n){return null==t||""===t?null===n?"":n:null==n||""===n?t:t+" "+n}const g1=qe({__forward_ref__:qe});function Mi(t){return t.__forward_ref__=Mi,t.toString=function(){return bn(this())},t}function xi(t){return DT(t)?t():t}function DT(t){return"function"==typeof t&&t.hasOwnProperty(g1)&&t.__forward_ref__===Mi}function TT(t){return t&&!!t.\u0275providers}const fx="https://g.co/ng/security#xss";class Nt extends Error{constructor(n,e){super(px(n,e)),this.code=n}}function px(t,n){return`NG0${Math.abs(t)}${n?": "+n.trim():""}`}function Li(t){return"string"==typeof t?t:null==t?"":String(t)}function mx(t,n){throw new Nt(-201,!1)}function Jr(t,n,e,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${e} ${i} ${n} <=Actual]`))}function Et(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function wi(t){return{providers:t.providers||[],imports:t.imports||[]}}function gx(t){return cL(t,vx)||cL(t,dL)}function cL(t,n){return t.hasOwnProperty(n)?t[n]:null}function uL(t){return t&&(t.hasOwnProperty(ET)||t.hasOwnProperty(Sve))?t[ET]:null}const vx=qe({\u0275prov:qe}),ET=qe({\u0275inj:qe}),dL=qe({ngInjectableDef:qe}),Sve=qe({ngInjectorDef:qe});var Ci=(()=>((Ci=Ci||{})[Ci.Default=0]="Default",Ci[Ci.Host=1]="Host",Ci[Ci.Self=2]="Self",Ci[Ci.SkipSelf=4]="SkipSelf",Ci[Ci.Optional=8]="Optional",Ci))();let AT;function jc(t){const n=AT;return AT=t,n}function hL(t,n,e){const i=gx(t);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&Ci.Optional?null:void 0!==n?n:void mx(bn(t))}const Po=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),v1={},MT="__NG_DI_FLAG__",yx="ngTempTokenPath",Dve="ngTokenPath",Tve=/\n/gm,Eve="\u0275",fL="__source";let y1;function kg(t){const n=y1;return y1=t,n}function Ave(t,n=Ci.Default){if(void 0===y1)throw new Nt(-203,!1);return null===y1?hL(t,void 0,n):y1.get(t,n&Ci.Optional?null:void 0,n)}function gt(t,n=Ci.Default){return(function kve(){return AT}()||Ave)(xi(t),n)}function Fi(t,n=Ci.Default){return gt(t,_x(n))}function _x(t){return typeof t>"u"||"number"==typeof t?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function OT(t){const n=[];for(let e=0;e((Td=Td||{})[Td.OnPush=0]="OnPush",Td[Td.Default=1]="Default",Td))(),bu=(()=>(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"}(bu||(bu={})),bu))();const Th={},zr=[],bx=qe({\u0275cmp:qe}),IT=qe({\u0275dir:qe}),NT=qe({\u0275pipe:qe}),mL=qe({\u0275mod:qe}),Eh=qe({\u0275fac:qe}),b1=qe({__NG_ELEMENT_ID__:qe});let Nve=0;function Rt(t){return Dh(()=>{const n=vL(t),e={...n,decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Td.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&t.dependencies||null,getStandaloneInjector:null,data:t.data||{},encapsulation:t.encapsulation||bu.Emulated,id:"c"+Nve++,styles:t.styles||zr,_:null,schemas:t.schemas||null,tView:null};yL(e);const i=t.dependencies;return e.directiveDefs=xx(i,!1),e.pipeDefs=xx(i,!0),e})}function Pve(t){return Kr(t)||Ja(t)}function jve(t){return null!==t}function ki(t){return Dh(()=>({type:t.type,bootstrap:t.bootstrap||zr,declarations:t.declarations||zr,imports:t.imports||zr,exports:t.exports||zr,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function gL(t,n){if(null==t)return Th;const e={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,n&&(n[r]=o)}return e}function sn(t){return Dh(()=>{const n=vL(t);return yL(n),n})}function ul(t){return{type:t.type,name:t.name,factory:null,pure:!1!==t.pure,standalone:!0===t.standalone,onDestroy:t.type.prototype.ngOnDestroy||null}}function Kr(t){return t[bx]||null}function Ja(t){return t[IT]||null}function Ol(t){return t[NT]||null}function ec(t,n){const e=t[mL]||null;if(!e&&!0===n)throw new Error(`Type ${bn(t)} does not have '\u0275mod' property.`);return e}function vL(t){const n={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:n,exportAs:t.exportAs||null,standalone:!0===t.standalone,selectors:t.selectors||zr,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:gL(t.inputs,n),outputs:gL(t.outputs)}}function yL(t){t.features?.forEach(n=>n(t))}function xx(t,n){if(!t)return null;const e=n?Ol:Pve;return()=>("function"==typeof t?t():t).map(i=>e(i)).filter(jve)}const Ah=0,Pn=1,Xi=2,as=3,xu=4,Vp=5,Ka=6,Tg=7,_s=8,wx=9,Cx=10,er=11,FT=12,x1=13,_L=14,Eg=15,Qa=16,w1=17,Ag=18,Ed=19,C1=20,bL=21,jo=22,PT=1,xL=2,Sx=7,kx=8,Mg=9,dl=10;function tc(t){return Array.isArray(t)&&"object"==typeof t[PT]}function wu(t){return Array.isArray(t)&&!0===t[PT]}function jT(t){return 0!=(4&t.flags)}function S1(t){return t.componentOffset>-1}function Dx(t){return 1==(1&t.flags)}function Cu(t){return!!t.template}function Lve(t){return 0!=(256&t[Xi])}function Hp(t,n){return t.hasOwnProperty(Eh)?t[Eh]:null}class Vve{constructor(n,e,i){this.previousValue=n,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Yn(){return SL}function SL(t){return t.type.prototype.ngOnChanges&&(t.setInput=Uve),Hve}function Hve(){const t=DL(this),n=t?.current;if(n){const e=t.previous;if(e===Th)t.previous=n;else for(let i in n)e[i]=n[i];t.current=null,this.ngOnChanges(n)}}function Uve(t,n,e,i){const r=this.declaredInputs[e],o=DL(t)||function zve(t,n){return t[kL]=n}(t,{previous:Th,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new Vve(l&&l.currentValue,n,a===Th),t[i]=n}Yn.ngInherit=!0;const kL="__ngSimpleChanges__";function DL(t){return t[kL]||null}const Rc=function(t,n,e){},TL="svg";function ka(t){for(;Array.isArray(t);)t=t[Ah];return t}function Tx(t,n){return ka(n[t])}function nc(t,n){return ka(n[t.index])}function AL(t,n){return t.data[n]}function Og(t,n){return t[n]}function Il(t,n){const e=n[t];return tc(e)?e:e[Ah]}function Ex(t){return 64==(64&t[Xi])}function Cf(t,n){return null==n?null:t[n]}function ML(t){t[Ag]=0}function LT(t,n){t[Vp]+=n;let e=t,i=t[as];for(;null!==i&&(1===n&&1===e[Vp]||-1===n&&0===e[Vp]);)i[Vp]+=n,e=i,i=i[as]}const $i={lFrame:BL(null),bindingsEnabled:!0};function IL(){return $i.bindingsEnabled}function zt(){return $i.lFrame.lView}function Fr(){return $i.lFrame.tView}function Be(t){return $i.lFrame.contextLView=t,t[_s]}function Ve(t){return $i.lFrame.contextLView=null,t}function Da(){let t=NL();for(;null!==t&&64===t.type;)t=t.parent;return t}function NL(){return $i.lFrame.currentTNode}function k1(){const t=$i.lFrame,n=t.currentTNode;return t.isParent?n:n.parent}function Ad(t,n){const e=$i.lFrame;e.currentTNode=t,e.isParent=n}function $T(){return $i.lFrame.isParent}function BT(){$i.lFrame.isParent=!1}function hl(){const t=$i.lFrame;let n=t.bindingRootIndex;return-1===n&&(n=t.bindingRootIndex=t.tView.bindingStartIndex),n}function Mh(){return $i.lFrame.bindingIndex}function Ig(){return $i.lFrame.bindingIndex++}function Oh(t){const n=$i.lFrame,e=n.bindingIndex;return n.bindingIndex=n.bindingIndex+t,e}function jL(t){$i.lFrame.inI18n=t}function i0e(t,n){const e=$i.lFrame;e.bindingIndex=e.bindingRootIndex=t,VT(n)}function VT(t){$i.lFrame.currentDirectiveIndex=t}function RL(){return $i.lFrame.currentQueryIndex}function UT(t){$i.lFrame.currentQueryIndex=t}function o0e(t){const n=t[Pn];return 2===n.type?n.declTNode:1===n.type?t[Ka]:null}function LL(t,n,e){if(e&Ci.SkipSelf){let r=n,o=t;for(;!(r=r.parent,null!==r||e&Ci.Host||(r=o0e(o),null===r||(o=o[Eg],10&r.type))););if(null===r)return!1;n=r,t=o}const i=$i.lFrame=$L();return i.currentTNode=n,i.lView=t,!0}function zT(t){const n=$L(),e=t[Pn];$i.lFrame=n,n.currentTNode=e.firstChild,n.lView=t,n.tView=e,n.contextLView=t,n.bindingIndex=e.bindingStartIndex,n.inI18n=!1}function $L(){const t=$i.lFrame,n=null===t?null:t.child;return null===n?BL(t):n}function BL(t){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=n),n}function VL(){const t=$i.lFrame;return $i.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const HL=VL;function GT(){const t=VL();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function fl(){return $i.lFrame.selectedIndex}function Up(t){$i.lFrame.selectedIndex=t}function Xo(){const t=$i.lFrame;return AL(t.tView,t.selectedIndex)}function st(){$i.lFrame.currentNamespace=TL}function zp(){!function c0e(){$i.lFrame.currentNamespace=null}()}function Ax(t,n){for(let e=n.directiveStart,i=n.directiveEnd;e=i)break}else n[l]<0&&(t[Ag]+=65536),(a>11>16&&(3&t[Xi])===n){t[Xi]+=2048,Rc(4,a,o);try{o.call(a)}finally{Rc(5,a,o)}}}else{Rc(4,a,o);try{o.call(a)}finally{Rc(5,a,o)}}}const Ng=-1;class D1{constructor(n,e,i){this.factory=n,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function YT(t,n,e){let i=0;for(;in){s=o-1;break}}}for(;o>16}(t),i=n;for(;e>0;)i=i[Eg],e--;return i}let XT=!0;function Fx(t){const n=XT;return XT=t,n}const YL=255,XL=5;let v0e=0;const Md={};function Px(t,n){const e=JL(t,n);if(-1!==e)return e;const i=n[Pn];i.firstCreatePass&&(t.injectorIndex=n.length,JT(i.data,t),JT(n,null),JT(i.blueprint,null));const r=KT(t,n),o=t.injectorIndex;if(qL(r)){const s=Ix(r),a=Nx(r,n),l=a[Pn].data;for(let c=0;c<8;c++)n[o+c]=a[s+c]|l[s+c]}return n[o+8]=r,o}function JT(t,n){t.push(0,0,0,0,0,0,0,0,n)}function JL(t,n){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===n[t.injectorIndex+8]?-1:t.injectorIndex}function KT(t,n){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let e=0,i=null,r=n;for(;null!==r;){if(i=i5(r),null===i)return Ng;if(e++,r=r[Eg],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return Ng}function QT(t,n,e){!function y0e(t,n,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(b1)&&(i=e[b1]),null==i&&(i=e[b1]=v0e++);const r=i&YL;n.data[t+(r>>XL)]|=1<=0?n&YL:w0e:n}(e);if("function"==typeof o){if(!LL(n,t,i))return i&Ci.Host?KL(r,0,i):QL(n,e,i,r);try{const s=o(i);if(null!=s||i&Ci.Optional)return s;mx()}finally{HL()}}else if("number"==typeof o){let s=null,a=JL(t,n),l=Ng,c=i&Ci.Host?n[Qa][Ka]:null;for((-1===a||i&Ci.SkipSelf)&&(l=-1===a?KT(t,n):n[a+8],l!==Ng&&n5(i,!1)?(s=n[Pn],a=Ix(l),n=Nx(l,n)):a=-1);-1!==a;){const u=n[Pn];if(t5(o,a,u.data)){const d=b0e(a,n,e,s,i,c);if(d!==Md)return d}l=n[a+8],l!==Ng&&n5(i,n[Pn].data[a+8]===c)&&t5(o,a,n)?(s=u,a=Ix(l),n=Nx(l,n)):a=-1}}return r}function b0e(t,n,e,i,r,o){const s=n[Pn],a=s.data[t+8],u=jx(a,s,e,null==i?S1(a)&&XT:i!=s&&0!=(3&a.type),r&Ci.Host&&o===a);return null!==u?Gp(n,s,u,a):Md}function jx(t,n,e,i,r){const o=t.providerIndexes,s=n.data,a=1048575&o,l=t.directiveStart,u=o>>20,h=r?a+u:t.directiveEnd;for(let f=i?a:a+u;f=l&&p.type===e)return f}if(r){const f=s[l];if(f&&Cu(f)&&f.type===e)return l}return null}function Gp(t,n,e,i){let r=t[e];const o=n.data;if(function f0e(t){return t instanceof D1}(r)){const s=r;s.resolving&&function vve(t,n){const e=n?`. Dependency path: ${n.join(" > ")} > ${t}`:"";throw new Nt(-200,`Circular dependency in DI detected for ${t}${e}`)}(function Xr(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():Li(t)}(o[e]));const a=Fx(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?jc(s.injectImpl):null;LL(t,i,Ci.Default);try{r=t[e]=s.factory(void 0,o,t,i),n.firstCreatePass&&e>=i.directiveStart&&function d0e(t,n,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=n.type.prototype;if(i){const s=SL(n);(e.preOrderHooks??(e.preOrderHooks=[])).push(t,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,s)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-t,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(t,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(t,o))}(e,o[e],n)}finally{null!==l&&jc(l),Fx(a),s.resolving=!1,HL()}}return r}function t5(t,n,e){return!!(e[n+(t>>XL)]&1<{const n=t.prototype.constructor,e=n[Eh]||ZT(n),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const o=r[Eh]||ZT(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function ZT(t){return DT(t)?()=>{const n=ZT(xi(t));return n&&n()}:Hp(t)}function i5(t){const n=t[Pn],e=n.type;return 2===e?n.declTNode:1===e?t[Ka]:null}function Sf(t){return function _0e(t,n){if("class"===n)return t.classes;if("style"===n)return t.styles;const e=t.attrs;if(e){const i=e.length;let r=0;for(;r{const i=function eE(t){return function(...e){if(t){const i=t(...e);for(const r in i)this[r]=i[r]}}}(n);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(jg)?l[jg]:Object.defineProperty(l,jg,{value:[]})[jg];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}class Vn{constructor(n,e){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=Et({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Wp(t,n){t.forEach(e=>Array.isArray(e)?Wp(e,n):n(e))}function o5(t,n,e){n>=t.length?t.push(e):t.splice(n,0,e)}function Rx(t,n){return n>=t.length-1?t.pop():t.splice(n,1)[0]}function M1(t,n){const e=[];for(let i=0;i=0?t[1|i]=e:(i=~i,function T0e(t,n,e,i){let r=t.length;if(r==n)t.push(e,i);else if(1===r)t.push(i,t[0]),t[0]=e;else{for(r--,t.push(t[r-1],t[r]);r>n;)t[r]=t[r-2],r--;t[n]=e,t[n+1]=i}}(t,i,n,e)),i}function nE(t,n){const e=$g(t,n);if(e>=0)return t[1|e]}function $g(t,n){return function s5(t,n,e){let i=0,r=t.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=t[o<n?r=o:i=o+1}return~(r<((Nl=Nl||{})[Nl.Important=1]="Important",Nl[Nl.DashCase=2]="DashCase",Nl))();const W0e=/^>|^->||--!>|)/,Y0e="\u200b$1\u200b";const lE=new Map;let X0e=0;const uE="__ngContext__";function Za(t,n){tc(n)?(t[uE]=n[C1],function K0e(t){lE.set(t[C1],t)}(n)):t[uE]=n}let dE;function hE(t,n){return dE(t,n)}function j1(t){const n=t[as];return wu(n)?n[as]:n}function fE(t){return D5(t[x1])}function pE(t){return D5(t[xu])}function D5(t){for(;null!==t&&!wu(t);)t=t[xu];return t}function Vg(t,n,e,i,r){if(null!=i){let o,s=!1;wu(i)?o=i:tc(i)&&(s=!0,i=i[Ah]);const a=ka(i);0===t&&null!==e?null==r?I5(n,e,a):qp(n,e,a,r||null,!0):1===t&&null!==e?qp(n,e,a,r||null,!0):2===t?xE(n,a,s):3===t&&n.destroyNode(a),null!=o&&function b1e(t,n,e,i,r){const o=e[Sx];o!==ka(e)&&Vg(n,t,i,o,r);for(let a=dl;an.replace(q0e,Y0e))}(n))}function gE(t,n,e){return t.createElement(n,e)}function E5(t,n){const e=t[Mg],i=e.indexOf(n),r=n[as];512&n[Xi]&&(n[Xi]&=-513,LT(r,-1)),e.splice(i,1)}function vE(t,n){if(t.length<=dl)return;const e=dl+n,i=t[e];if(i){const r=i[w1];null!==r&&r!==t&&E5(r,i),n>0&&(t[e-1][xu]=i[xu]);const o=Rx(t,dl+n);!function c1e(t,n){R1(t,n,n[er],2,null,null),n[Ah]=null,n[Ka]=null}(i[Pn],i);const s=o[Ed];null!==s&&s.detachView(o[Pn]),i[as]=null,i[xu]=null,i[Xi]&=-65}return i}function A5(t,n){if(!(128&n[Xi])){const e=n[er];e.destroyNode&&R1(t,n,e,3,null,null),function h1e(t){let n=t[x1];if(!n)return yE(t[Pn],t);for(;n;){let e=null;if(tc(n))e=n[x1];else{const i=n[dl];i&&(e=i)}if(!e){for(;n&&!n[xu]&&n!==t;)tc(n)&&yE(n[Pn],n),n=n[as];null===n&&(n=t),tc(n)&&yE(n[Pn],n),e=n&&n[xu]}n=e}}(n)}}function yE(t,n){if(!(128&n[Xi])){n[Xi]&=-65,n[Xi]|=128,function g1e(t,n){let e;if(null!=t&&null!=(e=t.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=t.data[i.directiveStart+r];if(o===bu.None||o===bu.Emulated)return null}return nc(i,e)}}function qp(t,n,e,i,r){t.insertBefore(n,e,i,r)}function I5(t,n,e){t.appendChild(n,e)}function N5(t,n,e,i,r){null!==i?qp(t,n,e,i,r):I5(t,n,e)}function Vx(t,n){return t.parentNode(n)}function F5(t,n,e){return j5(t,n,e)}function P5(t,n,e){return 40&t.type?nc(t,e):null}let _E,zx,SE,Gx,j5=P5;function R5(t,n){j5=t,_E=n}function Hx(t,n,e,i){const r=M5(t,i,n),o=n[er],a=F5(i.parent||n[Ka],i,n);if(null!=r)if(Array.isArray(e))for(let l=0;lt,createScript:t=>t,createScriptURL:t=>t})}catch{}return zx}()?.createHTML(t)||t}function H5(){return void 0!==SE?SE:typeof document<"u"?document:void 0}function kE(){if(void 0===Gx&&(Gx=null,Po.trustedTypes))try{Gx=Po.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Gx}function U5(t){return kE()?.createHTML(t)||t}function G5(t){return kE()?.createScriptURL(t)||t}class Yp{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${fx})`}}class T1e extends Yp{getTypeName(){return"HTML"}}class E1e extends Yp{getTypeName(){return"Style"}}class A1e extends Yp{getTypeName(){return"Script"}}class M1e extends Yp{getTypeName(){return"URL"}}class O1e extends Yp{getTypeName(){return"ResourceURL"}}function rc(t){return t instanceof Yp?t.changingThisBreaksApplicationSecurity:t}function Od(t,n){const e=function I1e(t){return t instanceof Yp&&t.getTypeName()||null}(t);if(null!=e&&e!==n){if("ResourceURL"===e&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${e} (see ${fx})`)}return e===n}function W5(t){const n=new $1e(t);return function B1e(){try{return!!(new window.DOMParser).parseFromString(Hg(""),"text/html")}catch{return!1}}()?new L1e(n):n}class L1e{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const e=(new window.DOMParser).parseFromString(Hg(n),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(n):(e.removeChild(e.firstChild),e)}catch{return null}}}class $1e{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const e=this.inertDocument.createElement("template");return e.innerHTML=Hg(n),e}}const V1e=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Wx(t){return(t=String(t)).match(V1e)?t:"unsafe:"+t}function Ih(t){const n={};for(const e of t.split(","))n[e]=!0;return n}function L1(...t){const n={};for(const e of t)for(const i in e)e.hasOwnProperty(i)&&(n[i]=!0);return n}const q5=Ih("area,br,col,hr,img,wbr"),Y5=Ih("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),X5=Ih("rp,rt"),DE=L1(q5,L1(Y5,Ih("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),L1(X5,Ih("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),L1(X5,Y5)),TE=Ih("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),J5=L1(TE,Ih("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Ih("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),H1e=Ih("script,style,template");class U1e{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let e=n.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(n){const e=n.nodeName.toLowerCase();if(!DE.hasOwnProperty(e))return this.sanitizedSomething=!0,!H1e.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const i=n.attributes;for(let r=0;r"),!0}endElement(n){const e=n.nodeName.toLowerCase();DE.hasOwnProperty(e)&&!q5.hasOwnProperty(e)&&(this.buf.push(""))}chars(n){this.buf.push(K5(n))}checkClobberedElement(n,e){if(e&&(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`);return e}}const z1e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,G1e=/([^\#-~ |!])/g;function K5(t){return t.replace(/&/g,"&").replace(z1e,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(G1e,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let qx;function Q5(t,n){let e=null;try{qx=qx||W5(t);let i=n?String(n):"";e=qx.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=qx.getInertBodyElement(i)}while(i!==o);return Hg((new U1e).sanitizeChildren(EE(e)||e))}finally{if(e){const i=EE(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function EE(t){return"content"in t&&function W1e(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var bo=(()=>((bo=bo||{})[bo.NONE=0]="NONE",bo[bo.HTML=1]="HTML",bo[bo.STYLE=2]="STYLE",bo[bo.SCRIPT=3]="SCRIPT",bo[bo.URL=4]="URL",bo[bo.RESOURCE_URL=5]="RESOURCE_URL",bo))();function Yx(t){const n=B1();return n?U5(n.sanitize(bo.HTML,t)||""):Od(t,"HTML")?U5(rc(t)):Q5(H5(),Li(t))}function $1(t){const n=B1();return n?n.sanitize(bo.URL,t)||"":Od(t,"URL")?rc(t):Wx(Li(t))}function Z5(t){const n=B1();if(n)return G5(n.sanitize(bo.RESOURCE_URL,t)||"");if(Od(t,"ResourceURL"))return G5(rc(t));throw new Nt(904,!1)}function B1(){const t=zt();return t&&t[FT]}const Xx=new Vn("ENVIRONMENT_INITIALIZER"),t8=new Vn("INJECTOR",-1),n8=new Vn("INJECTOR_DEF_TYPES");class i8{get(n,e=v1){if(e===v1){const i=new Error(`NullInjectorError: No provider for ${bn(n)}!`);throw i.name="NullInjectorError",i}return e}}function Z1e(...t){return{\u0275providers:r8(0,t),\u0275fromNgModule:!0}}function r8(t,...n){const e=[],i=new Set;let r;return Wp(n,o=>{const s=o;AE(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&o8(r,e),e}function o8(t,n){for(let e=0;e{n.push(o)})}}function AE(t,n,e,i){if(!(t=xi(t)))return!1;let r=null,o=uL(t);const s=!o&&Kr(t);if(o||s){if(s&&!s.standalone)return!1;r=t}else{const l=t.ngModule;if(o=uL(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)AE(c,n,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Wp(o.imports,u=>{AE(u,n,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&o8(c,n)}if(!a){const c=Hp(r)||(()=>new r);n.push({provide:r,useFactory:c,deps:zr},{provide:n8,useValue:r,multi:!0},{provide:Xx,useValue:()=>gt(r),multi:!0})}const l=o.providers;null==l||a||ME(l,u=>{n.push(u)})}}return r!==t&&void 0!==t.providers}function ME(t,n){for(let e of t)TT(e)&&(e=e.\u0275providers),Array.isArray(e)?ME(e,n):n(e)}const eye=qe({provide:String,useValue:qe});function OE(t){return null!==t&&"object"==typeof t&&eye in t}function Xp(t){return"function"==typeof t}const IE=new Vn("Set Injector scope."),Jx={},nye={};let NE;function Kx(){return void 0===NE&&(NE=new i8),NE}class $c{}class l8 extends $c{get destroyed(){return this._destroyed}constructor(n,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,PE(n,s=>this.processProvider(s)),this.records.set(t8,Ug(void 0,this)),r.has("environment")&&this.records.set($c,Ug(void 0,this));const o=this.records.get(IE);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(n8.multi,zr,Ci.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();for(const n of this._onDestroyHooks)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(n){this._onDestroyHooks.push(n)}runInContext(n){this.assertNotDestroyed();const e=kg(this),i=jc(void 0);try{return n()}finally{kg(e),jc(i)}}get(n,e=v1,i=Ci.Default){this.assertNotDestroyed(),i=_x(i);const r=kg(this),o=jc(void 0);try{if(!(i&Ci.SkipSelf)){let a=this.records.get(n);if(void 0===a){const l=function aye(t){return"function"==typeof t||"object"==typeof t&&t instanceof Vn}(n)&&gx(n);a=l&&this.injectableDefInScope(l)?Ug(FE(n),Jx):null,this.records.set(n,a)}if(null!=a)return this.hydrate(n,a)}return(i&Ci.Self?Kx():this.parent).get(n,e=i&Ci.Optional&&e===v1?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[yx]=s[yx]||[]).unshift(bn(n)),r)throw s;return function Ove(t,n,e,i){const r=t[yx];throw n[fL]&&r.unshift(n[fL]),t.message=function Ive(t,n,e,i=null){t=t&&"\n"===t.charAt(0)&&t.charAt(1)==Eve?t.slice(2):t;let r=bn(n);if(Array.isArray(n))r=n.map(bn).join(" -> ");else if("object"==typeof n){let o=[];for(let s in n)if(n.hasOwnProperty(s)){let a=n[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):bn(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${t.replace(Tve,"\n ")}`}("\n"+t.message,r,e,i),t[Dve]=r,t[yx]=null,t}(s,n,"R3InjectorError",this.source)}throw s}finally{jc(o),kg(r)}}resolveInjectorInitializers(){const n=kg(this),e=jc(void 0);try{const i=this.get(Xx.multi,zr,Ci.Self);for(const r of i)r()}finally{kg(n),jc(e)}}toString(){const n=[],e=this.records;for(const i of e.keys())n.push(bn(i));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Nt(205,!1)}processProvider(n){let e=Xp(n=xi(n))?n:xi(n&&n.provide);const i=function rye(t){return OE(t)?Ug(void 0,t.useValue):Ug(c8(t),Jx)}(n);if(Xp(n)||!0!==n.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Ug(void 0,Jx,!0),r.factory=()=>OT(r.multi),this.records.set(e,r)),e=n,r.multi.push(n)}this.records.set(e,i)}hydrate(n,e){return e.value===Jx&&(e.value=nye,e.value=e.factory()),"object"==typeof e.value&&e.value&&function sye(t){return null!==t&&"object"==typeof t&&"function"==typeof t.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(n){if(!n.providedIn)return!1;const e=xi(n.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function FE(t){const n=gx(t),e=null!==n?n.factory:Hp(t);if(null!==e)return e;if(t instanceof Vn)throw new Nt(204,!1);if(t instanceof Function)return function iye(t){const n=t.length;if(n>0)throw M1(n,"?"),new Nt(204,!1);const e=function Cve(t){return t&&(t[vx]||t[dL])||null}(t);return null!==e?()=>e.factory(t):()=>new t}(t);throw new Nt(204,!1)}function c8(t,n,e){let i;if(Xp(t)){const r=xi(t);return Hp(r)||FE(r)}if(OE(t))i=()=>xi(t.useValue);else if(function a8(t){return!(!t||!t.useFactory)}(t))i=()=>t.useFactory(...OT(t.deps||[]));else if(function s8(t){return!(!t||!t.useExisting)}(t))i=()=>gt(xi(t.useExisting));else{const r=xi(t&&(t.useClass||t.provide));if(!function oye(t){return!!t.deps}(t))return Hp(r)||FE(r);i=()=>new r(...OT(t.deps))}return i}function Ug(t,n,e=!1){return{factory:t,value:n,multi:e?[]:void 0}}function PE(t,n){for(const e of t)Array.isArray(e)?PE(e,n):e&&TT(e)?PE(e.\u0275providers,n):n(e)}class lye{}class u8{}class uye{resolveComponentFactory(n){throw function cye(t){const n=Error(`No component factory found for ${bn(t)}. Did you add it to @NgModule.entryComponents?`);return n.ngComponent=t,n}(n)}}let zg=(()=>{class t{}return t.NULL=new uye,t})();function dye(){return Gg(Da(),zt())}function Gg(t,n){return new Si(nc(t,n))}let Si=(()=>{class t{constructor(e){this.nativeElement=e}}return t.__NG_ELEMENT_ID__=dye,t})();function hye(t){return t instanceof Si?t.nativeElement:t}class Wg{}let ca=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>function fye(){const t=zt(),e=Il(Da().index,t);return(tc(e)?e:t)[er]}(),t})(),pye=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>null}),t})();class V1{constructor(n){this.full=n,this.major=n.split(".")[0],this.minor=n.split(".")[1],this.patch=n.split(".").slice(2).join(".")}}const mye=new V1("15.2.9"),jE={},RE="ngOriginalError";function LE(t){return t[RE]}class qg{constructor(){this._console=console}handleError(n){const e=this._findOriginalError(n);this._console.error("ERROR",n),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(n){let e=n&&LE(n);for(;e&&LE(e);)e=LE(e);return e||null}}function h8(t){return t.ownerDocument.defaultView}function Nh(t){return t instanceof Function?t():t}function p8(t,n,e){let i=t.length;for(;;){const r=t.indexOf(n,e);if(-1===r)return r;if(0===r||t.charCodeAt(r-1)<=32){const o=n.length;if(r+o===i||t.charCodeAt(r+o)<=32)return r}e=r+1}}const m8="ng-template";function kye(t,n,e){let i=0,r=!0;for(;io?"":r[d+1].toLowerCase();const f=8&i?h:null;if(f&&-1!==p8(f,c,0)||2&i&&c!==h){if(Su(i))return!1;s=!0}}}}else{if(!s&&!Su(i)&&!Su(l))return!1;if(s&&Su(l))continue;s=!1,i=l|1&i}}return Su(i)||s}function Su(t){return 0==(1&t)}function Eye(t,n,e,i){if(null===n)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!Su(s)&&(n+=y8(o,r),r=""),i=s,o=o||!Su(i);e++}return""!==r&&(n+=y8(o,r)),n}const Bi={};function w(t){_8(Fr(),zt(),fl()+t,!1)}function _8(t,n,e,i){if(!i)if(3==(3&n[Xi])){const o=t.preOrderCheckHooks;null!==o&&Mx(n,o,e)}else{const o=t.preOrderHooks;null!==o&&Ox(n,o,0,e)}Up(e)}function C8(t,n=null,e=null,i){const r=S8(t,n,e,i);return r.resolveInjectorInitializers(),r}function S8(t,n=null,e=null,i,r=new Set){const o=[e||zr,Z1e(t)];return i=i||("object"==typeof t?void 0:bn(t)),new l8(o,n||Kx(),i||null,r)}let ua=(()=>{class t{static create(e,i){if(Array.isArray(e))return C8({name:""},i,e,"");{const r=e.name??"";return C8({name:r},e.parent,e.providers,r)}}}return t.THROW_IF_NOT_FOUND=v1,t.NULL=new i8,t.\u0275prov=Et({token:t,providedIn:"any",factory:()=>gt(t8)}),t.__NG_ELEMENT_ID__=-1,t})();function de(t,n=Ci.Default){const e=zt();return null===e?gt(t,n):ZL(Da(),e,xi(t),n)}function I8(t,n){const e=t.contentQueries;if(null!==e)for(let i=0;ijo&&_8(t,n,jo,!1),Rc(s?2:0,r),e(i,r)}finally{Up(o),Rc(s?3:1,r)}}function GE(t,n,e){if(jT(n)){const r=n.directiveEnd;for(let o=n.directiveStart;o0;){const e=t[--n];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(t,n,i,H1(t,e,r.hostVars,Bi),r)}function KE(t,n,e,i,r,o,s){if(null==o)t.removeAttribute(n,r,e);else{const a=null==s?Li(o):s(o,i||"",r);t.setAttribute(n,r,a,e)}}function b_e(t,n,e,i,r,o){const s=o[n];if(null!==s){const a=i.setInput;for(let l=0;l0&&QE(e)}}function QE(t){for(let i=fE(t);null!==i;i=pE(i))for(let r=dl;r0&&QE(o)}const e=t[Pn].components;if(null!==e)for(let i=0;i0&&QE(r)}}function k_e(t,n){const e=Il(n,t),i=e[Pn];(function D_e(t,n){for(let e=n.length;e-1&&(vE(n,i),Rx(e,i))}this._attachedToViewContainer=!1}A5(this._lView[Pn],this._lView)}onDestroy(n){P8(this._lView[Pn],this._lView,null,n)}markForCheck(){nw(this._cdRefInjectingView||this._lView)}detach(){this._lView[Xi]&=-65}reattach(){this._lView[Xi]|=64}detectChanges(){iw(this._lView[Pn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Nt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function d1e(t,n){R1(t,n,n[er],2,null,null)}(this._lView[Pn],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new Nt(902,!1);this._appRef=n}}class T_e extends U1{constructor(n){super(n),this._view=n}detectChanges(){const n=this._view;iw(n[Pn],n,n[_s],!1)}checkNoChanges(){}get context(){return null}}class G8 extends zg{constructor(n){super(),this.ngModule=n}resolveComponentFactory(n){const e=Kr(n);return new z1(e,this.ngModule)}}function W8(t){const n=[];for(let e in t)t.hasOwnProperty(e)&&n.push({propName:t[e],templateName:e});return n}class A_e{constructor(n,e){this.injector=n,this.parentInjector=e}get(n,e,i){i=_x(i);const r=this.injector.get(n,jE,i);return r!==jE||e===jE?r:this.parentInjector.get(n,e,i)}}class z1 extends u8{get inputs(){return W8(this.componentDef.inputs)}get outputs(){return W8(this.componentDef.outputs)}constructor(n,e){super(),this.componentDef=n,this.ngModule=e,this.componentType=n.type,this.selector=function Fye(t){return t.map(Nye).join(",")}(n.selectors),this.ngContentSelectors=n.ngContentSelectors?n.ngContentSelectors:[],this.isBoundToModule=!!e}create(n,e,i,r){let o=(r=r||this.ngModule)instanceof $c?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new A_e(n,o):n,a=s.get(Wg,null);if(null===a)throw new Nt(407,!1);const l=s.get(pye,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function r_e(t,n,e){return t.selectRootElement(n,e===bu.ShadowDom)}(c,i,this.componentDef.encapsulation):gE(c,u,function E_e(t){const n=t.toLowerCase();return"svg"===n?TL:"math"===n?"math":null}(u)),h=this.componentDef.onPush?288:272,f=YE(0,null,null,1,0,null,null,null,null,null),p=Zx(null,f,null,h,null,null,a,c,l,s,null);let m,g;zT(p);try{const v=this.componentDef;let y,b=null;v.findHostDirectiveDefs?(y=[],b=new Map,v.findHostDirectiveDefs(v,y,b),y.push(v)):y=[v];const C=function O_e(t,n){const e=t[Pn],i=jo;return t[i]=n,Jg(e,i,2,"#host",null)}(p,d),k=function I_e(t,n,e,i,r,o,s,a){const l=r[Pn];!function N_e(t,n,e,i){for(const r of t)n.mergedAttrs=T1(n.mergedAttrs,r.hostAttrs);null!==n.mergedAttrs&&(rw(n,n.mergedAttrs,!0),null!==e&&V5(i,e,n))}(i,t,n,s);const c=o.createRenderer(n,e),u=Zx(r,F8(e),null,e.onPush?32:16,r[t.index],t,o,c,a||null,null,null);return l.firstCreatePass&&JE(l,t,i.length-1),tw(r,u),r[t.index]=u}(C,d,v,y,p,a,c);g=AL(f,jo),d&&function P_e(t,n,e,i){if(i)YT(t,e,["ng-version",mye.full]);else{const{attrs:r,classes:o}=function Pye(t){const n=[],e=[];let i=1,r=2;for(;i0&&B5(t,e,o.join(" "))}}(c,v,d,i),void 0!==e&&function j_e(t,n,e){const i=t.projection=[];for(let r=0;r=0;i--){const r=t[i];r.hostVars=n+=r.hostVars,r.hostAttrs=T1(r.hostAttrs,e=T1(e,r.hostAttrs))}}(i)}function tA(t){return t===Th?{}:t===zr?[]:t}function $_e(t,n){const e=t.viewQuery;t.viewQuery=e?(i,r)=>{n(i,r),e(i,r)}:n}function B_e(t,n){const e=t.contentQueries;t.contentQueries=e?(i,r,o)=>{n(i,r,o),e(i,r,o)}:n}function V_e(t,n){const e=t.hostBindings;t.hostBindings=e?(i,r)=>{n(i,r),e(i,r)}:n}function G1(t){return n=>{n.findHostDirectiveDefs=Y8,n.hostDirectives=(Array.isArray(t)?t:t()).map(e=>"function"==typeof e?{directive:xi(e),inputs:Th,outputs:Th}:{directive:xi(e.directive),inputs:X8(e.inputs),outputs:X8(e.outputs)})}}function Y8(t,n,e){if(null!==t.hostDirectives)for(const i of t.hostDirectives){const r=Ja(i.directive);G_e(r.declaredInputs,i.inputs),Y8(r,n,e),e.set(r,i),n.push(r)}}function X8(t){if(void 0===t||0===t.length)return Th;const n={};for(let e=0;es(ka(C[i.index])):i.index;let b=null;if(!s&&a&&(b=function ebe(t,n,e,i){const r=t.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(t,n,r,i.index)),null!==b)(b.__ngLastListenerFn__||b).__ngNextListenerFn__=o,b.__ngLastListenerFn__=o,h=!1;else{o=d6(i,n,u,o,!1);const C=e.listen(g,r,o);d.push(o,C),c&&c.push(r,y,v,v+1)}}else o=d6(i,n,u,o,!1);const f=i.outputs;let p;if(h&&null!==f&&(p=f[r])){const m=p.length;if(m)for(let g=0;g-1?Il(t.index,n):n);let l=u6(n,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=u6(n,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function $(t=1){return function s0e(t){return($i.lFrame.contextLView=function a0e(t,n){for(;t>0;)n=n[Eg],t--;return n}(t,$i.lFrame.contextLView))[_s]}(t)}function tbe(t,n){let e=null;const i=function Aye(t){const n=t.attrs;if(null!=n){const e=n.indexOf(5);if(!(1&e))return n[e+1]}return null}(t);for(let r=0;r>17&32767}function oA(t){return 2|t}function Qp(t){return(131068&t)>>2}function sA(t,n){return-131069&t|n<<2}function aA(t){return 1|t}function b6(t,n,e,i,r){const o=t[e+1],s=null===n;let a=i?Tf(o):Qp(o),l=!1;for(;0!==a&&(!1===l||s);){const u=t[a+1];abe(t[a],n)&&(l=!0,t[a+1]=i?aA(u):oA(u)),a=i?Tf(u):Qp(u)}l&&(t[e+1]=i?oA(o):aA(o))}function abe(t,n){return null===t||null==n||(Array.isArray(t)?t[1]:t)===n||!(!Array.isArray(t)||"string"!=typeof n)&&$g(t,n)>=0}const Ys={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function x6(t){return t.substring(Ys.key,Ys.keyEnd)}function w6(t,n){const e=Ys.textEnd;return e===n?-1:(n=Ys.keyEnd=function dbe(t,n,e){for(;n32;)n++;return n}(t,Ys.key=n,e),sv(t,n,e))}function sv(t,n,e){for(;n=0;e=w6(n,e))ic(t,x6(n),!0)}function ku(t,n,e,i){const r=zt(),o=Fr(),s=Oh(2);o.firstUpdatePass&&E6(o,t,s,i),n!==Bi&&el(r,s,n)&&M6(o,o.data[fl()],r,r[er],t,r[s+1]=function wbe(t,n){return null==t||""===t||("string"==typeof n?t+=n:"object"==typeof t&&(t=bn(rc(t)))),t}(n,e),i,s)}function Du(t,n,e,i){const r=Fr(),o=Oh(2);r.firstUpdatePass&&E6(r,null,o,i);const s=zt();if(e!==Bi&&el(s,o,e)){const a=r.data[fl()];if(I6(a,i)&&!T6(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=Nr(l,e||"")),iA(r,a,s,e,i)}else!function xbe(t,n,e,i,r,o,s,a){r===Bi&&(r=zr);let l=0,c=0,u=0=t.expandoStartIndex}function E6(t,n,e,i){const r=t.data;if(null===r[e+1]){const o=r[fl()],s=T6(t,e);I6(o,i)&&null===n&&!s&&(n=!1),n=function mbe(t,n,e,i){const r=function HT(t){const n=$i.lFrame.currentDirectiveIndex;return-1===n?null:t[n]}(t);let o=i?n.residualClasses:n.residualStyles;if(null===r)0===(i?n.classBindings:n.styleBindings)&&(e=Y1(e=lA(null,t,n,e,i),n.attrs,i),o=null);else{const s=n.directiveStylingLast;if(-1===s||t[s]!==r)if(e=lA(r,t,n,e,i),null===o){let l=function gbe(t,n,e){const i=e?n.classBindings:n.styleBindings;if(0!==Qp(i))return t[Tf(i)]}(t,n,i);void 0!==l&&Array.isArray(l)&&(l=lA(null,t,n,l[1],i),l=Y1(l,n.attrs,i),function vbe(t,n,e,i){t[Tf(e?n.classBindings:n.styleBindings)]=i}(t,n,i,l))}else o=function ybe(t,n,e){let i;const r=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=Tf(t[a+1]);t[i+1]=lw(h,a),0!==h&&(t[h+1]=sA(t[h+1],i)),t[a+1]=function ibe(t,n){return 131071&t|n<<17}(t[a+1],i)}else t[i+1]=lw(a,0),0!==a&&(t[a+1]=sA(t[a+1],i)),a=i;else t[i+1]=lw(l,0),0===a?a=i:t[l+1]=sA(t[l+1],i),l=i;c&&(t[i+1]=oA(t[i+1])),b6(t,u,i,!0),b6(t,u,i,!1),function sbe(t,n,e,i,r){const o=r?t.residualClasses:t.residualStyles;null!=o&&"string"==typeof n&&$g(o,n)>=0&&(e[i+1]=aA(e[i+1]))}(n,u,t,i,o),s=lw(a,l),o?n.classBindings=s:n.styleBindings=s}(r,o,n,e,s,i)}}function lA(t,n,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=t[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Bi&&(h=d?zr:void 0);let f=d?nE(h,i):u===i?h:void 0;if(c&&!cw(f)&&(f=nE(l,i)),cw(f)&&(a=f,s))return a;const p=t[r+1];r=s?Tf(p):Qp(p)}if(null!==n){let l=o?n.residualClasses:n.residualStyles;null!=l&&(a=nE(l,i))}return a}function cw(t){return void 0!==t}function I6(t,n){return 0!=(t.flags&(n?8:16))}function O(t,n=""){const e=zt(),i=Fr(),r=t+jo,o=i.firstCreatePass?Jg(i,r,1,n,null):i.data[r],s=e[r]=mE(e[er],n);Hx(i,e,s,o),Ad(o,!1)}function bt(t){return mn("",t,""),bt}function mn(t,n,e){const i=zt(),r=Qg(i,t,n,e);return r!==Bi&&Fh(i,fl(),r),mn}function Ef(t,n,e,i,r){const o=zt(),s=Zg(o,t,n,e,i,r);return s!==Bi&&Fh(o,fl(),s),Ef}function Pl(t,n,e){const i=zt();return el(i,Ig(),n)&&oc(Fr(),Xo(),i,t,n,i[er],e,!0),Pl}const Zp=void 0;var Bbe=["en",[["a","p"],["AM","PM"],Zp],[["AM","PM"],Zp,Zp],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Zp,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Zp,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Zp,"{1} 'at' {0}",Zp],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function $be(t){const e=Math.floor(Math.abs(t)),i=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let av={};function pl(t){const n=function Vbe(t){return t.toLowerCase().replace(/_/g,"-")}(t);let e=Z6(n);if(e)return e;const i=n.split("-")[0];if(e=Z6(i),e)return e;if("en"===i)return Bbe;throw new Nt(701,!1)}function Z6(t){return t in av||(av[t]=Po.ng&&Po.ng.common&&Po.ng.common.locales&&Po.ng.common.locales[t]),av[t]}var Tn=(()=>((Tn=Tn||{})[Tn.LocaleId=0]="LocaleId",Tn[Tn.DayPeriodsFormat=1]="DayPeriodsFormat",Tn[Tn.DayPeriodsStandalone=2]="DayPeriodsStandalone",Tn[Tn.DaysFormat=3]="DaysFormat",Tn[Tn.DaysStandalone=4]="DaysStandalone",Tn[Tn.MonthsFormat=5]="MonthsFormat",Tn[Tn.MonthsStandalone=6]="MonthsStandalone",Tn[Tn.Eras=7]="Eras",Tn[Tn.FirstDayOfWeek=8]="FirstDayOfWeek",Tn[Tn.WeekendRange=9]="WeekendRange",Tn[Tn.DateFormat=10]="DateFormat",Tn[Tn.TimeFormat=11]="TimeFormat",Tn[Tn.DateTimeFormat=12]="DateTimeFormat",Tn[Tn.NumberSymbols=13]="NumberSymbols",Tn[Tn.NumberFormats=14]="NumberFormats",Tn[Tn.CurrencyCode=15]="CurrencyCode",Tn[Tn.CurrencySymbol=16]="CurrencySymbol",Tn[Tn.CurrencyName=17]="CurrencyName",Tn[Tn.Currencies=18]="Currencies",Tn[Tn.Directionality=19]="Directionality",Tn[Tn.PluralCase=20]="PluralCase",Tn[Tn.ExtraData=21]="ExtraData",Tn))();const Hbe=["zero","one","two","few","many"],lv="en-US",uw={marker:"element"},dw={marker:"ICU"};var ls=(()=>((ls=ls||{})[ls.SHIFT=2]="SHIFT",ls[ls.APPEND_EAGERLY=1]="APPEND_EAGERLY",ls[ls.COMMENT=2]="COMMENT",ls))();let e$=lv;function t$(t){(function Pc(t,n){null==t&&Jr(n,t,null,"!=")})(t,"Expected localeId to be defined"),"string"==typeof t&&(e$=t.toLowerCase().replace(/_/g,"-"))}function n$(t,n,e){const i=n.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?P5(t,0,e):ka(e[r])}function i$(t,n,e,i,r){const o=n.insertBeforeIndex;if(Array.isArray(o)){let s=i,a=null;if(3&n.type||(a=s,s=r),null!==s&&-1===n.componentOffset)for(let l=1;l1)for(let e=t.length-2;e>=0;e--){const i=t[e];o$(i)||Wbe(i,n)&&null===qbe(i)&&Ybe(i,n.index)}}function o$(t){return!(64&t.type)}function Wbe(t,n){return o$(n)||t.index>n.index}function qbe(t){const n=t.insertBeforeIndex;return Array.isArray(n)?n[0]:n}function Ybe(t,n){const e=t.insertBeforeIndex;Array.isArray(e)?e[0]=n:(R5(n$,i$),t.insertBeforeIndex=n)}function X1(t,n){const e=t.data[n];return null===e||"string"==typeof e?null:e.hasOwnProperty("currentCaseLViewIndex")?e:e.value}function Kbe(t,n,e){const i=UE(t,e,64,null,null);return r$(n,i),i}function hw(t,n){const e=n[t.currentCaseLViewIndex];return null===e?e:e<0?~e:e}function s$(t){return t>>>17}function a$(t){return(131070&t)>>>1}let J1=0,K1=0;function c$(t,n,e,i){const r=e[er];let s,o=null;for(let a=0;a>>1,e),null,null,f,p,null)}else switch(l){case dw:const c=n[++a],u=n[++a];null===e[u]&&Za(e[u]=l1e(r,c),e);break;case uw:const d=n[++a],h=n[++a];null===e[h]&&Za(e[h]=gE(r,d,null),e)}}}function u$(t,n,e,i,r){for(let o=0;o>>2;switch(3&u){case 1:const h=e[++c],f=e[++c],p=t.data[d];"string"==typeof p?KE(n[er],n[d],null,p,h,l,f):oc(t,p,n,h,l,n[er],f,!1);break;case 0:const m=n[d];null!==m&&T5(n[er],m,l);break;case 2:nxe(t,X1(t,d),n,l);break;case 3:d$(t,X1(t,d),i,n)}}}}else{const l=e[o+1];if(l>0&&3==(3&l)){const u=X1(t,l>>>2);n[u.currentCaseLViewIndex]<0&&d$(t,u,i,n)}}o+=a}}function d$(t,n,e,i){let r=i[n.currentCaseLViewIndex];if(null!==r){let o=J1;r<0&&(r=i[n.currentCaseLViewIndex]=~r,o=-1),u$(t,i,n.update[r],e,o)}}function nxe(t,n,e,i){const r=function ixe(t,n){let e=t.cases.indexOf(n);if(-1===e)switch(t.type){case 1:{const i=function Ube(t,n){const e=function Q6(t){return pl(t)[Tn.PluralCase]}(n)(parseInt(t,10)),i=Hbe[e];return void 0!==i?i:"other"}(n,function Gbe(){return e$}());e=t.cases.indexOf(i),-1===e&&"other"!==i&&(e=t.cases.indexOf("other"));break}case 0:e=t.cases.indexOf("other")}return-1===e?null:e}(n,i);if(hw(n,e)!==r&&(h$(t,n,e),e[n.currentCaseLViewIndex]=null===r?null:~r,null!==r)){const s=e[n.anchorIdx];s&&c$(t,n.create[r],e,s)}}function h$(t,n,e){let i=hw(n,e);if(null!==i){const r=n.remove[i];for(let o=0;o0){const a=Tx(s,e);null!==a&&xE(e[er],a)}else h$(t,X1(t,~s),e)}}}function rxe(){const t=[];let e,i,n=-1;function o(a,l){n=0;const c=hw(a,l);i=null!==c?a.remove[c]:zr}function s(){if(n0?e[a]:(t.push(n,i),o(e[Pn].data[~a],e),s())}return 0===t.length?null:(i=t.pop(),n=t.pop(),s())}return function r(a,l){for(e=l;t.length;)t.pop();return o(a.value,l),s}}const fw=/\ufffd(\d+):?\d*\ufffd/gi,sxe=/\ufffd(\d+)\ufffd/,p$=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,Q1="\ufffd",axe=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,lxe=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,cxe=/\uE500/g;function m$(t,n,e,i,r,o,s){const a=H1(t,i,1,null);let l=a<e.length&&e.push(l)}return{type:i,mainBinding:r,cases:n,values:e}}function cA(t){if(!t)return[];let n=0;const e=[],i=[],r=/[{}]/g;let o;for(r.lastIndex=0;o=r.exec(t);){const a=o.index;if("}"==o[0]){if(e.pop(),0==e.length){const l=t.substring(n,a);p$.test(l)?i.push(vxe(l)):i.push(l),n=a+1}}else{if(0==e.length){const l=t.substring(n,a);i.push(l),n=a+1}e.push("{")}}const s=t.substring(n);return i.push(s),i}function yxe(t,n,e,i,r,o,s,a){const l=[],c=[],u=[];n.cases.push(o),n.create.push(l),n.remove.push(c),n.update.push(u);const h=W5(H5()).getInertBodyElement(s),f=EE(h)||h;return f?_$(t,n,e,i,l,c,u,f,r,a,0):0}function _$(t,n,e,i,r,o,s,a,l,c,u){let d=0,h=a.firstChild;for(;h;){const f=H1(t,e,1,null);switch(h.nodeType){case Node.ELEMENT_NODE:const p=h,m=p.tagName.toLowerCase();if(DE.hasOwnProperty(m)){uA(r,uw,m,l,f),t.data[f]=m;const b=p.attributes;for(let C=0;C>>ls.SHIFT;let d=t[u];null===d&&(d=t[u]=(s&ls.COMMENT)===ls.COMMENT?r.createComment(a):mE(r,a)),c&&null!==e&&qp(r,e,d,i,!1)}})(r,l.create,u,a&&8&a.type?r[a.index]:null),jL(!0)}function Ea(t,n,e){w$(t,n,e),function C$(){jL(!1)}()}function cv(t){return function Zbe(t){t&&(J1|=1<0){const i=t.data[e];u$(t,n,Array.isArray(i)?i:i.update,Mh()-K1-1,J1)}J1=0,K1=0}(Fr(),zt(),t+jo)}function dA(t,n,e,i,r){if(t=xi(t),Array.isArray(t))for(let o=0;o>20;if(Xp(t)||!t.multi){const f=new D1(l,r,de),p=fA(a,n,r?u:u+h,d);-1===p?(QT(Px(c,s),o,a),hA(o,t,n.length),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[p]=f,s[p]=f)}else{const f=fA(a,n,u+h,d),p=fA(a,n,u,u+h),g=p>=0&&e[p];if(r&&!g||!r&&!(f>=0&&e[f])){QT(Px(c,s),o,a);const v=function jxe(t,n,e,i,r){const o=new D1(t,e,de);return o.multi=[],o.index=n,o.componentProviders=0,S$(o,r,i&&!e),o}(r?Pxe:Fxe,e.length,r,i,l);!r&&g&&(e[p].providerFactory=v),hA(o,t,n.length,0),n.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(v),s.push(v)}else hA(o,t,f>-1?f:p,S$(e[r?p:f],l,!r&&i));!r&&i&&g&&e[p].componentProviders++}}}function hA(t,n,e,i){const r=Xp(n),o=function tye(t){return!!t.useClass}(n);if(r||o){const l=(o?xi(n.useClass):n).prototype.ngOnDestroy;if(l){const c=t.destroyHooks||(t.destroyHooks=[]);if(!r&&n.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function S$(t,n,e){return e&&t.componentProviders++,t.multi.push(n)-1}function fA(t,n,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function Nxe(t,n,e){const i=Fr();if(i.firstCreatePass){const r=Cu(t);dA(e,i.data,i.blueprint,r,!0),dA(n,i.data,i.blueprint,r,!1)}}(i,r?r(t):t,n)}}class uv{}class k${}class D$ extends uv{constructor(n,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new G8(this);const i=ec(n);this._bootstrapComponents=Nh(i.bootstrap),this._r3Injector=S8(n,e,[{provide:uv,useValue:this},{provide:zg,useValue:this.componentFactoryResolver}],bn(n),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(n)}get injector(){return this._r3Injector}destroy(){const n=this._r3Injector;!n.destroyed&&n.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(n){this.destroyCbs.push(n)}}class mA extends k${constructor(n){super(),this.moduleType=n}create(n){return new D$(this.moduleType,n)}}class Lxe extends uv{constructor(n,e,i){super(),this.componentFactoryResolver=new G8(this),this.instance=null;const r=new l8([...n,{provide:uv,useValue:this},{provide:zg,useValue:this.componentFactoryResolver}],e||Kx(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function pw(t,n,e=null){return new Lxe(t,n,e).injector}let $xe=(()=>{class t{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=r8(0,e.type),r=i.length>0?pw([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return t.\u0275prov=Et({token:t,providedIn:"environment",factory:()=>new t(gt($c))}),t})();function Is(t){t.getStandaloneInjector=n=>n.get($xe).getOrCreateStandaloneInjector(t)}function ml(t,n,e){const i=hl()+t,r=zt();return r[i]===Bi?Nd(r,i,e?n.call(e):n()):function W1(t,n){return t[n]}(r,i)}function sr(t,n,e,i){return N$(zt(),hl(),t,n,e,i)}function Mr(t,n,e,i,r){return function F$(t,n,e,i,r,o,s){const a=n+e;return Jp(t,a,r,o)?Nd(t,a+2,s?i.call(s,r,o):i(r,o)):ny(t,a+2)}(zt(),hl(),t,n,e,i,r)}function ty(t,n,e,i,r,o){return function P$(t,n,e,i,r,o,s,a){const l=n+e;return function aw(t,n,e,i,r){const o=Jp(t,n,e,i);return el(t,n+2,r)||o}(t,l,r,o,s)?Nd(t,l+3,a?i.call(a,r,o,s):i(r,o,s)):ny(t,l+3)}(zt(),hl(),t,n,e,i,r,o)}function ny(t,n){const e=t[n];return e===Bi?void 0:e}function N$(t,n,e,i,r,o){const s=n+e;return el(t,s,r)?Nd(t,s+1,o?i.call(o,r):i(r)):ny(t,s+1)}function vA(t,n){const e=Fr();let i;const r=t+jo;e.firstCreatePass?(i=function ewe(t,n){if(n)for(let e=n.length-1;e>=0;e--){const i=n[e];if(t===i.name)return i}}(n,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Hp(i.type)),s=jc(de);try{const a=Fx(!1),l=o();return Fx(a),function K_e(t,n,e,i){e>=t.data.length&&(t.data[e]=null,t.blueprint[e]=null),n[e]=i}(e,zt(),r,l),l}finally{jc(s)}}function yA(t,n,e){const i=t+jo,r=zt(),o=Og(r,i);return function iy(t,n){return t[Pn].data[n].pure}(r,i)?N$(r,hl(),n,o.transform,e,o):o.transform(e)}function _A(t){return n=>{setTimeout(t,void 0,n)}}const it=class owe extends dr{constructor(n=!1){super(),this.__isAsync=n}emit(n){super.next(n)}subscribe(n,e,i){let r=n,o=e||(()=>null),s=i;if(n&&"object"==typeof n){const l=n;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=_A(o),r&&(r=_A(r)),s&&(s=_A(s)));const a=super.subscribe({next:r,error:o,complete:s});return n instanceof ce&&n.add(a),a}};function swe(){return this._results[Symbol.iterator]()}class bA{get changes(){return this._changes||(this._changes=new it)}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=bA.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=swe)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,e){return this._results.reduce(n,e)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,e){const i=this;i.dirty=!1;const r=function Lc(t){return t.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function k0e(t,n,e){if(t.length!==n.length)return!1;for(let i=0;i{class t{}return t.__NG_ELEMENT_ID__=cwe,t})();const awe=oo,lwe=class extends awe{constructor(n,e,i){super(),this._declarationLView=n,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(n,e){const i=this._declarationTContainer.tView,r=Zx(this._declarationLView,i,n,16,null,i.declTNode,null,null,null,null,e||null);r[w1]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[Ed];return null!==s&&(r[Ed]=s.createEmbeddedView(i)),zE(i,r,n),new U1(r)}};function cwe(){return mw(Da(),zt())}function mw(t,n){return 4&t.type?new lwe(n,t,Gg(t,n)):null}let jl=(()=>{class t{}return t.__NG_ELEMENT_ID__=uwe,t})();function uwe(){return B$(Da(),zt())}const dwe=jl,L$=class extends dwe{constructor(n,e,i){super(),this._lContainer=n,this._hostTNode=e,this._hostLView=i}get element(){return Gg(this._hostTNode,this._hostLView)}get injector(){return new Fg(this._hostTNode,this._hostLView)}get parentInjector(){const n=KT(this._hostTNode,this._hostLView);if(qL(n)){const e=Nx(n,this._hostLView),i=Ix(n);return new Fg(e[Pn].data[i+8],e)}return new Fg(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const e=$$(this._lContainer);return null!==e&&e[n]||null}get length(){return this._lContainer.length-dl}createEmbeddedView(n,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=n.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(n,e,i,r,o){const s=n&&!function A1(t){return"function"==typeof t}(n);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?n:new z1(Kr(n)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get($c,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(n,e){const i=n._lView,r=i[Pn];if(function Xve(t){return wu(t[as])}(i)){const u=this.indexOf(n);if(-1!==u)this.detach(u);else{const d=i[as],h=new L$(d,d[Ka],d[as]);h.detach(h.indexOf(n))}}const o=this._adjustIndex(e),s=this._lContainer;!function f1e(t,n,e,i){const r=dl+i,o=e.length;i>0&&(e[r-1][xu]=n),i0)i.push(s[a/2]);else{const c=o[a+1],u=n[-l];for(let d=dl;d{class t{constructor(e){this.appInits=e,this.resolve=vw,this.reject=vw,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(gt(yw,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oy=new Vn("AppId",{providedIn:"root",factory:function cB(){return`${IA()}${IA()}${IA()}`}});function IA(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const uB=new Vn("Platform Initializer"),sy=new Vn("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),dB=new Vn("AnimationModuleType");let Rwe=(()=>{class t{log(e){console.log(e)}warn(e){console.warn(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const lc=new Vn("LocaleId",{providedIn:"root",factory:()=>Fi(lc,Ci.Optional|Ci.SkipSelf)||function Lwe(){return typeof $localize<"u"&&$localize.locale||lv}()});class Bwe{constructor(n,e){this.ngModuleFactory=n,this.componentFactories=e}}let hB=(()=>{class t{compileModuleSync(e){return new mA(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){const i=this.compileModuleSync(e),o=Nh(ec(e).declarations).reduce((s,a)=>{const l=Kr(a);return l&&s.push(new z1(l)),s},[]);return new Bwe(i,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const Uwe=(()=>Promise.resolve(0))();function NA(t){typeof Zone>"u"?Uwe.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class nr{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new it(!1),this.onMicrotaskEmpty=new it(!1),this.onStable=new it(!1),this.onError=new it(!1),typeof Zone>"u")throw new Nt(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function zwe(){let t=Po.requestAnimationFrame,n=Po.cancelAnimationFrame;if(typeof Zone<"u"&&t&&n){const e=t[Zone.__symbol__("OriginalDelegate")];e&&(t=e);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function qwe(t){const n=()=>{!function Wwe(t){t.isCheckStableRunning||-1!==t.lastRequestAnimationFrameId||(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Po,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,PA(t),t.isCheckStableRunning=!0,FA(t),t.isCheckStableRunning=!1},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),PA(t))}(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return mB(t),e.invokeTask(r,o,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||t.shouldCoalesceRunChangeDetection)&&n(),gB(t)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return mB(t),e.invoke(r,o,s,a,l)}finally{t.shouldCoalesceRunChangeDetection&&n(),gB(t)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(t._hasPendingMicrotasks=o.microTask,PA(t),FA(t)):"macroTask"==o.change&&(t.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),t.runOutsideAngular(()=>t.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!nr.isInAngularZone())throw new Nt(909,!1)}static assertNotInAngularZone(){if(nr.isInAngularZone())throw new Nt(909,!1)}run(n,e,i){return this._inner.run(n,e,i)}runTask(n,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,n,Gwe,vw,vw);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(n,e,i){return this._inner.runGuarded(n,e,i)}runOutsideAngular(n){return this._outer.run(n)}}const Gwe={};function FA(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function PA(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&-1!==t.lastRequestAnimationFrameId)}function mB(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function gB(t){t._nesting--,FA(t)}class Ywe{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new it,this.onMicrotaskEmpty=new it,this.onStable=new it,this.onError=new it}run(n,e,i){return n.apply(e,i)}runGuarded(n,e,i){return n.apply(e,i)}runOutsideAngular(n){return n()}runTask(n,e,i,r){return n.apply(e,i)}}const vB=new Vn(""),bw=new Vn("");let LA,jA=(()=>{class t{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,LA||(function Xwe(t){LA=t}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{nr.assertNotInAngularZone(),NA(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())NA(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return t.\u0275fac=function(e){return new(e||t)(gt(nr),gt(RA),gt(bw))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),RA=(()=>{class t{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return LA?.findTestabilityInTree(this,e,i)??null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();const jh=!1;let Af=null;const yB=new Vn("AllowMultipleToken"),$A=new Vn("PlatformDestroyListeners"),_B=new Vn("appBootstrapListener");class bB{constructor(n,e){this.name=n,this.token=e}}function wB(t,n,e=[]){const i=`Platform: ${n}`,r=new Vn(i);return(o=[])=>{let s=BA();if(!s||s.injector.get(yB,!1)){const a=[...e,...o,{provide:r,useValue:!0}];t?t(a):function Qwe(t){if(Af&&!Af.get(yB,!1))throw new Nt(400,!1);Af=t;const n=t.get(SB);(function xB(t){const n=t.get(uB,null);n&&n.forEach(e=>e())})(t)}(function CB(t=[],n){return ua.create({name:n,providers:[{provide:IE,useValue:"platform"},{provide:$A,useValue:new Set([()=>Af=null])},...t]})}(a,i))}return function eCe(t){const n=BA();if(!n)throw new Nt(401,!1);return n}()}}function BA(){return Af?.get(SB)??null}let SB=(()=>{class t{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function DB(t,n){let e;return e="noop"===t?new Ywe:("zone.js"===t?void 0:t)||new nr(n),e}(i?.ngZone,function kB(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!t||!t.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!t||!t.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:nr,useValue:r}];return r.run(()=>{const s=ua.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(qg,null);if(!l)throw new Nt(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{xw(this._modules,a),c.unsubscribe()})}),function TB(t,n,e){try{const i=e();return q1(i)?i.catch(r=>{throw n.runOutsideAngular(()=>t.handleError(r)),r}):i}catch(i){throw n.runOutsideAngular(()=>t.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(_w);return c.runInitializers(),c.donePromise.then(()=>(t$(a.injector.get(lc,lv)||lv),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=EB({},i);return function Jwe(t,n,e){const i=new mA(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Rh);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new Nt(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Nt(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get($A,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(gt(ua))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"platform"}),t})();function EB(t,n){return Array.isArray(n)?n.reduce(EB,t):{...t,...n}}let Rh=(()=>{class t{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new en(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new en(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{nr.assertNotInAngularZone(),NA(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{nr.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=Dt(o,s.pipe(Ge()))}bootstrap(e,i){const r=e instanceof u8;if(!this._injector.get(_w).done){!r&&function Dg(t){const n=Kr(t)||Ja(t)||Ol(t);return null!==n&&n.standalone}(e);throw new Nt(405,jh)}let s;s=r?e:this._injector.get(zg).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function Kwe(t){return t.isBoundToModule}(s)?void 0:this._injector.get(uv),c=s.create(ua.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(vB,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),xw(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new Nt(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;xw(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(_B,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>xw(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new Nt(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return t.\u0275fac=function(e){return new(e||t)(gt(nr),gt($c),gt(qg))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function xw(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}let Ns=(()=>{class t{}return t.__NG_ELEMENT_ID__=nCe,t})();function nCe(t){return function iCe(t,n,e){if(S1(t)&&!e){const i=Il(t.index,n);return new U1(i,i)}return 47&t.type?new U1(n[Qa],n):null}(Da(),zt(),16==(16&t))}class NB{constructor(){}supports(n){return sw(n)}create(n){return new cCe(n)}}const lCe=(t,n)=>n;class cCe{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||lCe}forEachItem(n){let e;for(e=this._itHead;null!==e;e=e._next)n(e)}forEachOperation(n){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,e,i,r){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._reinsertAfter(n,o,r)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(n.item,e)||this._addIdentityChange(n,e),this._moveAfter(n,o,r)):n=this._addAfter(new uCe(e,i),o,r),n}_verifyReinsertion(n,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?n=this._reinsertAfter(o,n._prev,r):n.currentIndex!=r&&(n.currentIndex=r,this._addToMoves(n,r)),n}_truncate(n){for(;null!==n;){const e=n._next;this._addToRemovals(this._unlink(n)),n=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const r=n._prevRemoved,o=n._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(n,e,i),this._addToMoves(n,i),n}_moveAfter(n,e,i){return this._unlink(n),this._insertAfter(n,e,i),this._addToMoves(n,i),n}_addAfter(n,e,i){return this._insertAfter(n,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,e,i){const r=null===e?this._itHead:e._next;return n._next=r,n._prev=e,null===r?this._itTail=n:r._prev=n,null===e?this._itHead=n:e._next=n,null===this._linkedRecords&&(this._linkedRecords=new FB),this._linkedRecords.put(n),n.currentIndex=i,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const e=n._prev,i=n._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,n}_addToMoves(n,e){return n.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new FB),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,e){return n.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class uCe{constructor(n,e){this.item=n,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class dCe{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,n))return i;return null}remove(n){const e=n._prevDup,i=n._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class FB{constructor(){this.map=new Map}put(n){const e=n.trackById;let i=this.map.get(e);i||(i=new dCe,this.map.set(e,i)),i.add(n)}get(n,e){const r=this.map.get(n);return r?r.get(n,e):null}remove(n){const e=n.trackById;return this.map.get(e).remove(n)&&this.map.delete(e),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function PB(t,n,e){const i=t.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(n,e){if(n){const i=n._prev;return e._next=n,e._prev=i,n._prev=e,i&&(i._next=e),n===this._mapHead&&(this._mapHead=e),this._appendAfter=n,n}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(n,e){if(this._records.has(n)){const r=this._records.get(n);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new fCe(n);return this._records.set(n,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let n;for(this._previousMapHead=this._mapHead,n=this._previousMapHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._changesHead;null!==n;n=n._nextChanged)n.previousValue=n.currentValue;for(n=this._additionsHead;null!=n;n=n._nextAdded)n.previousValue=n.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(n,e){Object.is(e,n.currentValue)||(n.previousValue=n.currentValue,n.currentValue=e,this._addToChanges(n))}_addToAdditions(n){null===this._additionsHead?this._additionsHead=this._additionsTail=n:(this._additionsTail._nextAdded=n,this._additionsTail=n)}_addToChanges(n){null===this._changesHead?this._changesHead=this._changesTail=n:(this._changesTail._nextChanged=n,this._changesTail=n)}_forEach(n,e){n instanceof Map?n.forEach(e):Object.keys(n).forEach(i=>e(n[i],i))}}class fCe{constructor(n){this.key=n,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}function RB(){return new Sw([new NB])}let Sw=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||RB()),deps:[[t,new I1,new O1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new Nt(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:RB}),t})();function LB(){return new ay([new jB])}let ay=(()=>{class t{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new t(e)}static extend(e){return{provide:t,useFactory:i=>t.create(e,i||LB()),deps:[[t,new I1,new O1]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new Nt(901,!1)}}return t.\u0275prov=Et({token:t,providedIn:"root",factory:LB}),t})();const gCe=wB(null,"core",[]);let vCe=(()=>{class t{constructor(e){}}return t.\u0275fac=function(e){return new(e||t)(gt(Rh))},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();function fv(t){return"boolean"==typeof t?t:null!=t&&"false"!==t}function GA(t,n){const e=Kr(t),i=n.elementInjector||Kx();return new z1(e).create(i,n.projectableNodes,n.hostElement,n.environmentInjector)}let WA=null;function Lh(){return WA}class bCe{}const co=new Vn("DocumentToken");let qA=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function xCe(){return gt($B)}()},providedIn:"platform"}),t})();const wCe=new Vn("Location Initialized");let $B=(()=>{class t extends qA{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Lh().getBaseHref(this._doc)}onPopState(e){const i=Lh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){const i=Lh().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){BB()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){BB()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:function(){return function CCe(){return new $B(gt(co))}()},providedIn:"platform"}),t})();function BB(){return!!window.history.pushState}function YA(t,n){if(0==t.length)return n;if(0==n.length)return t;let e=0;return t.endsWith("/")&&e++,n.startsWith("/")&&e++,2==e?t+n.substring(1):1==e?t+n:t+"/"+n}function VB(t){const n=t.match(/#|\?|$/),e=n&&n.index||t.length;return t.slice(0,e-("/"===t[e-1]?1:0))+t.slice(e)}function $h(t){return t&&"?"!==t[0]?"?"+t:t}let tm=(()=>{class t{historyGo(e){throw new Error("Not implemented")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(UB)},providedIn:"root"}),t})();const HB=new Vn("appBaseHref");let UB=(()=>{class t extends tm{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??Fi(co).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return YA(this._baseHref,e)}path(e=!1){const i=this._platformLocation.pathname+$h(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){const s=this.prepareExternalUrl(r+$h(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){const s=this.prepareExternalUrl(r+$h(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(gt(qA),gt(HB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),SCe=(()=>{class t extends tm{constructor(e,i){super(),this._platformLocation=e,this._baseHref="",this._removeListenerFns=[],null!=i&&(this._baseHref=i)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}path(e=!1){let i=this._platformLocation.hash;return null==i&&(i="#"),i.length>0?i.substring(1):i}prepareExternalUrl(e){const i=YA(this._baseHref,e);return i.length>0?"#"+i:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+$h(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+$h(o));0==s.length&&(s=this._platformLocation.pathname),this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return t.\u0275fac=function(e){return new(e||t)(gt(qA),gt(HB,8))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),XA=(()=>{class t{constructor(e){this._subject=new it,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;const i=this._locationStrategy.getBaseHref();this._basePath=function TCe(t){if(new RegExp("^(https?:)?//").test(t)){const[,e]=t.split(/\/\/[^\/]+/);return e}return t}(VB(zB(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+$h(i))}normalize(e){return t.stripTrailingSlash(function DCe(t,n){if(!t||!n.startsWith(t))return n;const e=n.substring(t.length);return""===e||["/",";","?","#"].includes(e[0])?e:n}(this._basePath,zB(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+$h(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+$h(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{const i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return t.normalizeQueryParams=$h,t.joinWithSlash=YA,t.stripTrailingSlash=VB,t.\u0275fac=function(e){return new(e||t)(gt(tm))},t.\u0275prov=Et({token:t,factory:function(){return function kCe(){return new XA(gt(tm))}()},providedIn:"root"}),t})();function zB(t){return t.replace(/\/index.html$/,"")}var Rl=(()=>((Rl=Rl||{})[Rl.Decimal=0]="Decimal",Rl[Rl.Percent=1]="Percent",Rl[Rl.Currency=2]="Currency",Rl[Rl.Scientific=3]="Scientific",Rl))(),Ro=(()=>((Ro=Ro||{})[Ro.Format=0]="Format",Ro[Ro.Standalone=1]="Standalone",Ro))(),Vi=(()=>((Vi=Vi||{})[Vi.Narrow=0]="Narrow",Vi[Vi.Abbreviated=1]="Abbreviated",Vi[Vi.Wide=2]="Wide",Vi[Vi.Short=3]="Short",Vi))(),Jo=(()=>((Jo=Jo||{})[Jo.Short=0]="Short",Jo[Jo.Medium=1]="Medium",Jo[Jo.Long=2]="Long",Jo[Jo.Full=3]="Full",Jo))(),_i=(()=>((_i=_i||{})[_i.Decimal=0]="Decimal",_i[_i.Group=1]="Group",_i[_i.List=2]="List",_i[_i.PercentSign=3]="PercentSign",_i[_i.PlusSign=4]="PlusSign",_i[_i.MinusSign=5]="MinusSign",_i[_i.Exponential=6]="Exponential",_i[_i.SuperscriptingExponent=7]="SuperscriptingExponent",_i[_i.PerMille=8]="PerMille",_i[_i.Infinity=9]="Infinity",_i[_i.NaN=10]="NaN",_i[_i.TimeSeparator=11]="TimeSeparator",_i[_i.CurrencyDecimal=12]="CurrencyDecimal",_i[_i.CurrencyGroup=13]="CurrencyGroup",_i))();function WB(t,n,e){const i=pl(t),o=Hc([i[Tn.DayPeriodsFormat],i[Tn.DayPeriodsStandalone]],n);return Hc(o,e)}function qB(t,n,e){const i=pl(t),o=Hc([i[Tn.DaysFormat],i[Tn.DaysStandalone]],n);return Hc(o,e)}function JA(t,n,e){const i=pl(t),o=Hc([i[Tn.MonthsFormat],i[Tn.MonthsStandalone]],n);return Hc(o,e)}function kw(t,n){return Hc(pl(t)[Tn.DateFormat],n)}function Dw(t,n){return Hc(pl(t)[Tn.TimeFormat],n)}function Tw(t,n){return Hc(pl(t)[Tn.DateTimeFormat],n)}function Vc(t,n){const e=pl(t),i=e[Tn.NumberSymbols][n];if(typeof i>"u"){if(n===_i.CurrencyDecimal)return e[Tn.NumberSymbols][_i.Decimal];if(n===_i.CurrencyGroup)return e[Tn.NumberSymbols][_i.Group]}return i}function YB(t){if(!t[Tn.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[Tn.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Hc(t,n){for(let e=n;e>-1;e--)if(typeof t[e]<"u")return t[e];throw new Error("Locale data API: locale data undefined")}function QA(t){const[n,e]=t.split(":");return{hours:+n,minutes:+e}}const RCe=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ly={},LCe=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var Xs=(()=>((Xs=Xs||{})[Xs.Short=0]="Short",Xs[Xs.ShortGMT=1]="ShortGMT",Xs[Xs.Long=2]="Long",Xs[Xs.Extended=3]="Extended",Xs))(),Di=(()=>((Di=Di||{})[Di.FullYear=0]="FullYear",Di[Di.Month=1]="Month",Di[Di.Date=2]="Date",Di[Di.Hours=3]="Hours",Di[Di.Minutes=4]="Minutes",Di[Di.Seconds=5]="Seconds",Di[Di.FractionalSeconds=6]="FractionalSeconds",Di[Di.Day=7]="Day",Di))(),Ji=(()=>((Ji=Ji||{})[Ji.DayPeriods=0]="DayPeriods",Ji[Ji.Days=1]="Days",Ji[Ji.Months=2]="Months",Ji[Ji.Eras=3]="Eras",Ji))();function XB(t,n,e,i){let r=function qCe(t){if(QB(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){const[r,o=1,s=1]=t.split("-").map(a=>+a);return Ew(r,o-1,s)}const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);let i;if(i=t.match(RCe))return function YCe(t){const n=new Date(0);let e=0,i=0;const r=t[8]?n.setUTCFullYear:n.setFullYear,o=t[8]?n.setUTCHours:n.setHours;t[9]&&(e=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(n,Number(t[1]),Number(t[2])-1,Number(t[3]));const s=Number(t[4]||0)-e,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return o.call(n,s,a,l,c),n}(i)}const n=new Date(t);if(!QB(n))throw new Error(`Unable to convert "${t}" into a date`);return n}(t);n=Bh(e,n)||n;let a,s=[];for(;n;){if(a=LCe.exec(n),!a){s.push(n);break}{s=s.concat(a.slice(1));const u=s.pop();if(!u)break;n=u}}let l=r.getTimezoneOffset();i&&(l=KB(i,l),r=function WCe(t,n,e){const i=e?-1:1,r=t.getTimezoneOffset();return function GCe(t,n){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+n),t}(t,i*(KB(n,r)-r))}(r,i,!0));let c="";return s.forEach(u=>{const d=function zCe(t){if(eM[t])return eM[t];let n;switch(t){case"G":case"GG":case"GGG":n=wo(Ji.Eras,Vi.Abbreviated);break;case"GGGG":n=wo(Ji.Eras,Vi.Wide);break;case"GGGGG":n=wo(Ji.Eras,Vi.Narrow);break;case"y":n=Ps(Di.FullYear,1,0,!1,!0);break;case"yy":n=Ps(Di.FullYear,2,0,!0,!0);break;case"yyy":n=Ps(Di.FullYear,3,0,!1,!0);break;case"yyyy":n=Ps(Di.FullYear,4,0,!1,!0);break;case"Y":n=Iw(1);break;case"YY":n=Iw(2,!0);break;case"YYY":n=Iw(3);break;case"YYYY":n=Iw(4);break;case"M":case"L":n=Ps(Di.Month,1,1);break;case"MM":case"LL":n=Ps(Di.Month,2,1);break;case"MMM":n=wo(Ji.Months,Vi.Abbreviated);break;case"MMMM":n=wo(Ji.Months,Vi.Wide);break;case"MMMMM":n=wo(Ji.Months,Vi.Narrow);break;case"LLL":n=wo(Ji.Months,Vi.Abbreviated,Ro.Standalone);break;case"LLLL":n=wo(Ji.Months,Vi.Wide,Ro.Standalone);break;case"LLLLL":n=wo(Ji.Months,Vi.Narrow,Ro.Standalone);break;case"w":n=ZA(1);break;case"ww":n=ZA(2);break;case"W":n=ZA(1,!0);break;case"d":n=Ps(Di.Date,1);break;case"dd":n=Ps(Di.Date,2);break;case"c":case"cc":n=Ps(Di.Day,1);break;case"ccc":n=wo(Ji.Days,Vi.Abbreviated,Ro.Standalone);break;case"cccc":n=wo(Ji.Days,Vi.Wide,Ro.Standalone);break;case"ccccc":n=wo(Ji.Days,Vi.Narrow,Ro.Standalone);break;case"cccccc":n=wo(Ji.Days,Vi.Short,Ro.Standalone);break;case"E":case"EE":case"EEE":n=wo(Ji.Days,Vi.Abbreviated);break;case"EEEE":n=wo(Ji.Days,Vi.Wide);break;case"EEEEE":n=wo(Ji.Days,Vi.Narrow);break;case"EEEEEE":n=wo(Ji.Days,Vi.Short);break;case"a":case"aa":case"aaa":n=wo(Ji.DayPeriods,Vi.Abbreviated);break;case"aaaa":n=wo(Ji.DayPeriods,Vi.Wide);break;case"aaaaa":n=wo(Ji.DayPeriods,Vi.Narrow);break;case"b":case"bb":case"bbb":n=wo(Ji.DayPeriods,Vi.Abbreviated,Ro.Standalone,!0);break;case"bbbb":n=wo(Ji.DayPeriods,Vi.Wide,Ro.Standalone,!0);break;case"bbbbb":n=wo(Ji.DayPeriods,Vi.Narrow,Ro.Standalone,!0);break;case"B":case"BB":case"BBB":n=wo(Ji.DayPeriods,Vi.Abbreviated,Ro.Format,!0);break;case"BBBB":n=wo(Ji.DayPeriods,Vi.Wide,Ro.Format,!0);break;case"BBBBB":n=wo(Ji.DayPeriods,Vi.Narrow,Ro.Format,!0);break;case"h":n=Ps(Di.Hours,1,-12);break;case"hh":n=Ps(Di.Hours,2,-12);break;case"H":n=Ps(Di.Hours,1);break;case"HH":n=Ps(Di.Hours,2);break;case"m":n=Ps(Di.Minutes,1);break;case"mm":n=Ps(Di.Minutes,2);break;case"s":n=Ps(Di.Seconds,1);break;case"ss":n=Ps(Di.Seconds,2);break;case"S":n=Ps(Di.FractionalSeconds,1);break;case"SS":n=Ps(Di.FractionalSeconds,2);break;case"SSS":n=Ps(Di.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":n=Mw(Xs.Short);break;case"ZZZZZ":n=Mw(Xs.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":n=Mw(Xs.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":n=Mw(Xs.Long);break;default:return null}return eM[t]=n,n}(u);c+=d?d(r,e,l):"''"===u?"'":u.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function Ew(t,n,e){const i=new Date(0);return i.setFullYear(t,n,e),i.setHours(0,0,0),i}function Bh(t,n){const e=function ECe(t){return pl(t)[Tn.LocaleId]}(t);if(ly[e]=ly[e]||{},ly[e][n])return ly[e][n];let i="";switch(n){case"shortDate":i=kw(t,Jo.Short);break;case"mediumDate":i=kw(t,Jo.Medium);break;case"longDate":i=kw(t,Jo.Long);break;case"fullDate":i=kw(t,Jo.Full);break;case"shortTime":i=Dw(t,Jo.Short);break;case"mediumTime":i=Dw(t,Jo.Medium);break;case"longTime":i=Dw(t,Jo.Long);break;case"fullTime":i=Dw(t,Jo.Full);break;case"short":const r=Bh(t,"shortTime"),o=Bh(t,"shortDate");i=Aw(Tw(t,Jo.Short),[r,o]);break;case"medium":const s=Bh(t,"mediumTime"),a=Bh(t,"mediumDate");i=Aw(Tw(t,Jo.Medium),[s,a]);break;case"long":const l=Bh(t,"longTime"),c=Bh(t,"longDate");i=Aw(Tw(t,Jo.Long),[l,c]);break;case"full":const u=Bh(t,"fullTime"),d=Bh(t,"fullDate");i=Aw(Tw(t,Jo.Full),[u,d])}return i&&(ly[e][n]=i),i}function Aw(t,n){return n&&(t=t.replace(/\{([^}]+)}/g,function(e,i){return null!=n&&i in n?n[i]:e})),t}function Eu(t,n,e="-",i,r){let o="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,o=e));let s=String(t);for(;s.length0||a>-e)&&(a+=e),t===Di.Hours)0===a&&-12===e&&(a=12);else if(t===Di.FractionalSeconds)return function $Ce(t,n){return Eu(t,3).substring(0,n)}(a,n);const l=Vc(s,_i.MinusSign);return Eu(a,n,l,i,r)}}function wo(t,n,e=Ro.Format,i=!1){return function(r,o){return function VCe(t,n,e,i,r,o){switch(e){case Ji.Months:return JA(n,r,i)[t.getMonth()];case Ji.Days:return qB(n,r,i)[t.getDay()];case Ji.DayPeriods:const s=t.getHours(),a=t.getMinutes();if(o){const c=function ICe(t){const n=pl(t);return YB(n),(n[Tn.ExtraData][2]||[]).map(i=>"string"==typeof i?QA(i):[QA(i[0]),QA(i[1])])}(n),u=function NCe(t,n,e){const i=pl(t);YB(i);const o=Hc([i[Tn.ExtraData][0],i[Tn.ExtraData][1]],n)||[];return Hc(o,e)||[]}(n,r,i),d=c.findIndex(h=>{if(Array.isArray(h)){const[f,p]=h,m=s>=f.hours&&a>=f.minutes,g=s0?Math.floor(r/60):Math.ceil(r/60);switch(t){case Xs.Short:return(r>=0?"+":"")+Eu(s,2,o)+Eu(Math.abs(r%60),2,o);case Xs.ShortGMT:return"GMT"+(r>=0?"+":"")+Eu(s,1,o);case Xs.Long:return"GMT"+(r>=0?"+":"")+Eu(s,2,o)+":"+Eu(Math.abs(r%60),2,o);case Xs.Extended:return 0===i?"Z":(r>=0?"+":"")+Eu(s,2,o)+":"+Eu(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${t}"`)}}}const HCe=0,Ow=4;function JB(t){return Ew(t.getFullYear(),t.getMonth(),t.getDate()+(Ow-t.getDay()))}function ZA(t,n=!1){return function(e,i){let r;if(n){const o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{const o=JB(e),s=function UCe(t){const n=Ew(t,HCe,1).getDay();return Ew(t,0,1+(n<=Ow?Ow:Ow+7)-n)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return Eu(r,t,Vc(i,_i.MinusSign))}}function Iw(t,n=!1){return function(e,i){return Eu(JB(e).getFullYear(),t,Vc(i,_i.MinusSign),n)}}const eM={};function KB(t,n){t=t.replace(/:/g,"");const e=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(e)?n:e}function QB(t){return t instanceof Date&&!isNaN(t.valueOf())}const XCe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ZB=22,Nw=".",cy="0",JCe=";",KCe=",",tM="#";function rM(t){const n=parseInt(t);if(isNaN(n))throw new Error("Invalid integer literal when parsing "+t);return n}function n7(t,n){n=encodeURIComponent(n);for(const e of t.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===n)return decodeURIComponent(o)}return null}const sM=/\s+/,i7=[];let nm=(()=>{class t{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=i7,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(sM):i7}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(sM):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(sM).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return t.\u0275fac=function(e){return new(e||t)(de(Sw),de(ay),de(Si),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),t})();class a2e{constructor(n,e,i,r){this.$implicit=n,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Ln=(()=>{class t{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new a2e(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),s7(a,r)}});for(let r=0,o=i.length;r{s7(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(de(jl),de(oo),de(Sw))},t.\u0275dir=sn({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),t})();function s7(t,n){t.context.$implicit=n.item}let vn=(()=>{class t{constructor(e,i){this._viewContainer=e,this._context=new c2e,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){a7("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){a7("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return t.\u0275fac=function(e){return new(e||t)(de(jl),de(oo))},t.\u0275dir=sn({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),t})();class c2e{constructor(){this.$implicit=null,this.ngIf=null}}function a7(t,n){if(n&&!n.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bn(n)}'.`)}class aM{constructor(n,e){this._viewContainerRef=n,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(n){n&&!this._created?this.create():!n&&this._created&&this.destroy()}}let Fw=(()=>{class t{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),t})(),l7=(()=>{class t{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new aM(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return t.\u0275fac=function(e){return new(e||t)(de(jl),de(oo),de(Fw,9))},t.\u0275dir=sn({type:t,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),t})(),u7=(()=>{class t{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Nl.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ay),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),t})(),Au=(()=>{class t{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return t.\u0275fac=function(e){return new(e||t)(de(jl))},t.\u0275dir=sn({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Yn]}),t})();let h7=(()=>{class t{constructor(e){this._locale=e}transform(e,i,r){if(!function lM(t){return!(null==t||""===t||t!=t)}(e))return null;r=r||this._locale;try{return function e2e(t,n,e){return function nM(t,n,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(t)){let c=function i2e(t){let i,r,o,s,a,n=Math.abs(t)+"",e=0;for((r=n.indexOf(Nw))>-1&&(n=n.replace(Nw,"")),(o=n.search(/e/i))>0?(r<0&&(r=o),r+=+n.slice(o+1),n=n.substring(0,o)):r<0&&(r=n.length),o=0;n.charAt(o)===cy;o++);if(o===(a=n.length))i=[0],r=1;else{for(a--;n.charAt(a)===cy;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(n.charAt(o))}return r>ZB&&(i=i.splice(0,ZB-1),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(t);s&&(c=function n2e(t){if(0===t.digits[0])return t;const n=t.digits.length-t.integerLen;return t.exponent?t.exponent+=2:(0===n?t.digits.push(0,0):1===n&&t.digits.push(0),t.integerLen+=2),t}(c));let u=n.minInt,d=n.minFrac,h=n.maxFrac;if(o){const y=o.match(XCe);if(null===y)throw new Error(`${o} is not a valid digit info`);const b=y[1],C=y[3],k=y[5];null!=b&&(u=rM(b)),null!=C&&(d=rM(C)),null!=k?h=rM(k):null!=C&&d>h&&(h=d)}!function r2e(t,n,e){if(n>e)throw new Error(`The minimum number of digits after fraction (${n}) is higher than the maximum (${e}).`);let i=t.digits,r=i.length-t.integerLen;const o=Math.min(Math.max(n,r),e);let s=o+t.integerLen,a=i[s];if(s>0){i.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),t.integerLen++;i.unshift(1),t.integerLen++}else i[s-1]++;for(;r=c?p.pop():l=!1),h>=10?1:0},0);u&&(i.unshift(u),t.integerLen++)}(c,d,h);let f=c.digits,p=c.integerLen;const m=c.exponent;let g=[];for(l=f.every(y=>!y);p0?g=f.splice(p,f.length):(g=f,f=[0]);const v=[];for(f.length>=n.lgSize&&v.unshift(f.splice(-n.lgSize,f.length).join(""));f.length>n.gSize;)v.unshift(f.splice(-n.gSize,f.length).join(""));f.length&&v.unshift(f.join("")),a=v.join(Vc(e,i)),g.length&&(a+=Vc(e,r)+g.join("")),m&&(a+=Vc(e,_i.Exponential)+"+"+m)}else a=Vc(e,_i.Infinity);return a=t<0&&!l?n.negPre+a+n.negSuf:n.posPre+a+n.posSuf,a}(t,function iM(t,n="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=t.split(JCe),r=i[0],o=i[1],s=-1!==r.indexOf(Nw)?r.split(Nw):[r.substring(0,r.lastIndexOf(cy)+1),r.substring(r.lastIndexOf(cy)+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf(tM));for(let u=0;u{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();const f7="browser";function p7(t){return t===f7}let j2e=(()=>{class t{}return t.\u0275prov=Et({token:t,providedIn:"root",factory:()=>new R2e(gt(co),window)}),t})();class R2e{constructor(n,e){this.document=n,this.window=e,this.offset=()=>[0,0]}setOffset(n){this.offset=Array.isArray(n)?()=>n:n}getScrollPosition(){return this.supportsScrolling()?[this.window.pageXOffset,this.window.pageYOffset]:[0,0]}scrollToPosition(n){this.supportsScrolling()&&this.window.scrollTo(n[0],n[1])}scrollToAnchor(n){if(!this.supportsScrolling())return;const e=function L2e(t,n){const e=t.getElementById(n)||t.getElementsByName(n)[0];if(e)return e;if("function"==typeof t.createTreeWalker&&t.body&&(t.body.createShadowRoot||t.body.attachShadow)){const i=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT);let r=i.currentNode;for(;r;){const o=r.shadowRoot;if(o){const s=o.getElementById(n)||o.querySelector(`[name="${n}"]`);if(s)return s}r=i.nextNode()}}return null}(this.document,n);e&&(this.scrollToElement(e),e.focus())}setHistoryScrollRestoration(n){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=n)}}scrollToElement(n){const e=n.getBoundingClientRect(),i=e.left+this.window.pageXOffset,r=e.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}supportScrollRestoration(){try{if(!this.supportsScrolling())return!1;const n=m7(this.window.history)||m7(Object.getPrototypeOf(this.window.history));return!(!n||!n.writable&&!n.set)}catch{return!1}}supportsScrolling(){try{return!!this.window&&!!this.window.scrollTo&&"pageXOffset"in this.window}catch{return!1}}}function m7(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class g7{}class dSe extends bCe{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class hM extends dSe{static makeCurrent(){!function _Ce(t){WA||(WA=t)}(new hM)}onAndCancel(n,e,i){return n.addEventListener(e,i,!1),()=>{n.removeEventListener(e,i,!1)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.parentNode&&n.parentNode.removeChild(n)}createElement(n,e){return(e=e||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return"window"===e?window:"document"===e?n:"body"===e?n.body:null}getBaseHref(n){const e=function hSe(){return dy=dy||document.querySelector("base"),dy?dy.getAttribute("href"):null}();return null==e?null:function fSe(t){Rw=Rw||document.createElement("a"),Rw.setAttribute("href",t);const n=Rw.pathname;return"/"===n.charAt(0)?n:`/${n}`}(e)}resetBaseElement(){dy=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return n7(document.cookie,n)}}let Rw,dy=null;const x7=new Vn("TRANSITION_ID"),mSe=[{provide:yw,useFactory:function pSe(t,n,e){return()=>{e.get(_w).donePromise.then(()=>{const i=Lh(),r=n.querySelectorAll(`style[ng-transition="${t}"]`);for(let o=0;o{class t{build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const Lw=new Vn("EventManagerPlugins");let $w=(()=>{class t{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class t{constructor(){this.usageCount=new Map}addStyles(e){for(const i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(const i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){const r=this.usageCount;let o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(const e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),hy=(()=>{class t extends C7{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(const i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){const i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(const i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){const r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);const o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){const e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const fM={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},pM=/%COMP%/g,D7=new Vn("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function T7(t,n){return n.flat(100).map(e=>e.replace(pM,t))}function E7(t){return n=>{if("__ngUnwrap__"===n)return t;!1===t(n)&&(n.preventDefault(),n.returnValue=!1)}}let Bw=(()=>{class t{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new mM(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;const r=this.getOrCreateRenderer(e,i);return r instanceof O7?r.applyToHost(e):r instanceof gM&&r.applyStyles(),r}getOrCreateRenderer(e,i){const r=this.rendererByCompId;let o=r.get(i.id);if(!o){const s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case bu.Emulated:o=new O7(s,a,i,this.appId,l);break;case bu.ShadowDom:return new SSe(s,a,e,i);default:o=new gM(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(gt($w),gt(hy),gt(oy),gt(D7))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class mM{constructor(n){this.eventManager=n,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(n,e){return e?document.createElementNS(fM[e]||e,n):document.createElement(n)}createComment(n){return document.createComment(n)}createText(n){return document.createTextNode(n)}appendChild(n,e){(M7(n)?n.content:n).appendChild(e)}insertBefore(n,e,i){n&&(M7(n)?n.content:n).insertBefore(e,i)}removeChild(n,e){n&&n.removeChild(e)}selectRootElement(n,e){let i="string"==typeof n?document.querySelector(n):n;if(!i)throw new Error(`The selector "${n}" did not match any elements`);return e||(i.textContent=""),i}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,i,r){if(r){e=r+":"+e;const o=fM[r];o?n.setAttributeNS(o,e,i):n.setAttribute(e,i)}else n.setAttribute(e,i)}removeAttribute(n,e,i){if(i){const r=fM[i];r?n.removeAttributeNS(r,e):n.removeAttribute(`${i}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,i,r){r&(Nl.DashCase|Nl.Important)?n.style.setProperty(e,i,r&Nl.Important?"important":""):n.style[e]=i}removeStyle(n,e,i){i&Nl.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,i){n[e]=i}setValue(n,e){n.nodeValue=e}listen(n,e,i){return"string"==typeof n?this.eventManager.addGlobalEventListener(n,e,E7(i)):this.eventManager.addEventListener(n,e,E7(i))}}function M7(t){return"TEMPLATE"===t.tagName&&void 0!==t.content}class SSe extends mM{constructor(n,e,i,r){super(n),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=T7(r.id,r.styles);for(const s of o){const a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,i){return super.insertBefore(this.nodeOrShadowRoot(n),e,i)}removeChild(n,e){return super.removeChild(this.nodeOrShadowRoot(n),e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class gM extends mM{constructor(n,e,i,r,o=i.id){super(n),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=T7(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){this.removeStylesOnCompDestory&&(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}}class O7 extends gM{constructor(n,e,i,r,o){const s=r+"-"+i.id;super(n,e,i,o,s),this.contentAttr=function xSe(t){return"_ngcontent-%COMP%".replace(pM,t)}(s),this.hostAttr=function wSe(t){return"_nghost-%COMP%".replace(pM,t)}(s)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){const i=super.createElement(n,e);return super.setAttribute(i,this.contentAttr,""),i}}let kSe=(()=>{class t extends w7{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const I7=["alt","control","meta","shift"],DSe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},TSe={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let ESe=(()=>{class t extends w7{constructor(e){super(e)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,i,r){const o=t.parseEventName(i),s=t.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Lh().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=t._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),I7.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=DSe[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),I7.forEach(s=>{s!==r&&(0,TSe[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{t.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const F7=[{provide:sy,useValue:f7},{provide:uB,useValue:function ASe(){hM.makeCurrent()},multi:!0},{provide:co,useFactory:function OSe(){return function D1e(t){SE=t}(document),document},deps:[]}],ISe=wB(gCe,"browser",F7),P7=new Vn(""),j7=[{provide:bw,useClass:class gSe{addToWindow(n){Po.getAngularTestability=(i,r=!0)=>{const o=n.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},Po.getAllAngularTestabilities=()=>n.getAllTestabilities(),Po.getAllAngularRootElements=()=>n.getAllRootElements(),Po.frameworkStabilizers||(Po.frameworkStabilizers=[]),Po.frameworkStabilizers.push(i=>{const r=Po.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(n,e,i){return null==e?null:n.getTestability(e)??(i?Lh().isShadowRoot(e)?this.findTestabilityInTree(n,e.host,!0):this.findTestabilityInTree(n,e.parentElement,!0):null)}},deps:[]},{provide:vB,useClass:jA,deps:[nr,RA,bw]},{provide:jA,useClass:jA,deps:[nr,RA,bw]}],R7=[{provide:IE,useValue:"root"},{provide:qg,useFactory:function MSe(){return new qg},deps:[]},{provide:Lw,useClass:kSe,multi:!0,deps:[co,nr,sy]},{provide:Lw,useClass:ESe,multi:!0,deps:[co]},{provide:Bw,useClass:Bw,deps:[$w,hy,oy,D7]},{provide:Wg,useExisting:Bw},{provide:C7,useExisting:hy},{provide:hy,useClass:hy,deps:[co]},{provide:$w,useClass:$w,deps:[Lw,nr]},{provide:g7,useClass:vSe,deps:[]},[]];let yM=(()=>{class t{constructor(e){}static withServerTransition(e){return{ngModule:t,providers:[{provide:oy,useValue:e.appId},{provide:x7,useExisting:oy},mSe]}}}return t.\u0275fac=function(e){return new(e||t)(gt(P7,12))},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[...R7,...j7],imports:[Mf,vCe]}),t})(),L7=(()=>{class t{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function FSe(){return new L7(gt(co))}(),i},providedIn:"root"}),t})();typeof window<"u"&&window;let V7=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new(e||t):gt(H7),i},providedIn:"root"}),t})(),H7=(()=>{class t extends V7{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case bo.NONE:return i;case bo.HTML:return Od(i,"HTML")?rc(i):Q5(this._doc,String(i)).toString();case bo.STYLE:return Od(i,"Style")?rc(i):i;case bo.SCRIPT:if(Od(i,"Script"))return rc(i);throw new Error("unsafe value used in a script context");case bo.URL:return Od(i,"URL")?rc(i):Wx(String(i));case bo.RESOURCE_URL:if(Od(i,"ResourceURL"))return rc(i);throw new Error(`unsafe value used in a resource URL context (see ${fx})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${fx})`)}}bypassSecurityTrustHtml(e){return function N1e(t){return new T1e(t)}(e)}bypassSecurityTrustStyle(e){return function F1e(t){return new E1e(t)}(e)}bypassSecurityTrustScript(e){return function P1e(t){return new A1e(t)}(e)}bypassSecurityTrustUrl(e){return function j1e(t){return new M1e(t)}(e)}bypassSecurityTrustResourceUrl(e){return function R1e(t){return new O1e(t)}(e)}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function $Se(t){return new H7(t.get(co))}(gt(ua)),i},providedIn:"root"}),t})();class U7{}class BSe{}const Vh="*";function tl(t,n){return{type:7,name:t,definitions:n,options:{}}}function Aa(t,n=null){return{type:4,styles:n,timings:t}}function z7(t,n=null){return{type:2,steps:t,options:n}}function kr(t){return{type:6,styles:t,offset:null}}function Ma(t,n,e=null){return{type:1,expr:t,animation:n,options:e}}function G7(t){Promise.resolve().then(t)}class fy{constructor(n=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=n+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){G7(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class W7{constructor(n){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=n;let e=0,i=0,r=0;const o=this.players.length;0==o?G7(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){const e=n*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const n=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=n?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){const e="start"==n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}const bM="!";function q7(t){return new Nt(3e3,!1)}function xke(){return typeof window<"u"&&typeof window.document<"u"}function xM(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function If(t){switch(t.length){case 0:return new fy;case 1:return t[0];default:return new W7(t)}}function Y7(t,n,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,f=h&&c||new Map;u.forEach((p,m)=>{let g=m,v=p;if("offset"!==m)switch(g=n.normalizePropertyName(g,s),v){case bM:v=r.get(m);break;case Vh:v=o.get(m);break;default:v=n.normalizeStyleValue(m,g,v,s)}f.set(g,v)}),h||a.push(f),c=f,l=d}),s.length)throw function cke(t){return new Nt(3502,!1)}();return a}function wM(t,n,e,i){switch(n){case"start":t.onStart(()=>i(e&&CM(e,"start",t)));break;case"done":t.onDone(()=>i(e&&CM(e,"done",t)));break;case"destroy":t.onDestroy(()=>i(e&&CM(e,"destroy",t)))}}function CM(t,n,e){const o=SM(t.element,t.triggerName,t.fromState,t.toState,n||t.phaseName,e.totalTime??t.totalTime,!!e.disabled),s=t._data;return null!=s&&(o._data=s),o}function SM(t,n,e,i,r="",o=0,s){return{element:t,triggerName:n,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function cc(t,n,e){let i=t.get(n);return i||t.set(n,i=e),i}function X7(t){const n=t.indexOf(":");return[t.substring(1,n),t.slice(n+1)]}let kM=(t,n)=>!1,J7=(t,n,e)=>[],K7=null;function DM(t){const n=t.parentNode||t.host;return n===K7?null:n}(xM()||typeof Element<"u")&&(xke()?(K7=(()=>document.documentElement)(),kM=(t,n)=>{for(;n;){if(n===t)return!0;n=DM(n)}return!1}):kM=(t,n)=>t.contains(n),J7=(t,n,e)=>{if(e)return Array.from(t.querySelectorAll(n));const i=t.querySelector(n);return i?[i]:[]});let im=null,Q7=!1;const Z7=kM,e9=J7;let t9=(()=>{class t{validateStyleProperty(e){return function Cke(t){im||(im=function Ske(){return typeof document<"u"?document.body:null}()||{},Q7=!!im.style&&"WebkitAppearance"in im.style);let n=!0;return im.style&&!function wke(t){return"ebkit"==t.substring(1,6)}(t)&&(n=t in im.style,!n&&Q7&&(n="Webkit"+t.charAt(0).toUpperCase()+t.slice(1)in im.style)),n}(e)}matchesElement(e,i){return!1}containsElement(e,i){return Z7(e,i)}getParentElement(e){return DM(e)}query(e,i,r){return e9(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new fy(r,o)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),TM=(()=>{class t{}return t.NOOP=new t9,t})();const kke=1e3,EM="ng-enter",Vw="ng-leave",Hw="ng-trigger",Uw=".ng-trigger",i9="ng-animating",AM=".ng-animating";function Hh(t){if("number"==typeof t)return t;const n=t.match(/^(-?[\.\d]+)(m?s)/);return!n||n.length<2?0:MM(parseFloat(n[1]),n[2])}function MM(t,n){return"s"===n?t*kke:t}function zw(t,n,e){return t.hasOwnProperty("duration")?t:function Tke(t,n,e){let r,o=0,s="";if("string"==typeof t){const a=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return n.push(q7()),{duration:0,delay:0,easing:""};r=MM(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=MM(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=t;if(!e){let a=!1,l=n.length;r<0&&(n.push(function VSe(){return new Nt(3100,!1)}()),a=!0),o<0&&(n.push(function HSe(){return new Nt(3101,!1)}()),a=!0),a&&n.splice(l,0,q7())}return{duration:r,delay:o,easing:s}}(t,n,e)}function py(t,n={}){return Object.keys(t).forEach(e=>{n[e]=t[e]}),n}function r9(t){const n=new Map;return Object.keys(t).forEach(e=>{n.set(e,t[e])}),n}function Nf(t,n=new Map,e){if(e)for(let[i,r]of e)n.set(i,r);for(let[i,r]of t)n.set(i,r);return n}function s9(t,n,e){return e?n+":"+e+";":""}function a9(t){let n="";for(let e=0;e{const o=IM(r);e&&!e.has(r)&&e.set(r,t.style[o]),t.style[o]=i}),xM()&&a9(t))}function rm(t,n){t.style&&(n.forEach((e,i)=>{const r=IM(i);t.style[r]=""}),xM()&&a9(t))}function my(t){return Array.isArray(t)?1==t.length?t[0]:z7(t):t}const OM=new RegExp("{{\\s*(.+?)\\s*}}","g");function l9(t){let n=[];if("string"==typeof t){let e;for(;e=OM.exec(t);)n.push(e[1]);OM.lastIndex=0}return n}function gy(t,n,e){const i=t.toString(),r=i.replace(OM,(o,s)=>{let a=n[s];return null==a&&(e.push(function zSe(t){return new Nt(3003,!1)}()),a=""),a.toString()});return r==i?t:r}function Gw(t){const n=[];let e=t.next();for(;!e.done;)n.push(e.value),e=t.next();return n}const Mke=/-+([a-z0-9])/g;function IM(t){return t.replace(Mke,(...n)=>n[1].toUpperCase())}function Oke(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function uc(t,n,e){switch(n.type){case 7:return t.visitTrigger(n,e);case 0:return t.visitState(n,e);case 1:return t.visitTransition(n,e);case 2:return t.visitSequence(n,e);case 3:return t.visitGroup(n,e);case 4:return t.visitAnimate(n,e);case 5:return t.visitKeyframes(n,e);case 6:return t.visitStyle(n,e);case 8:return t.visitReference(n,e);case 9:return t.visitAnimateChild(n,e);case 10:return t.visitAnimateRef(n,e);case 11:return t.visitQuery(n,e);case 12:return t.visitStagger(n,e);default:throw function GSe(t){return new Nt(3004,!1)}()}}function c9(t,n){return window.getComputedStyle(t)[n]}const Yw="*";function Rke(t,n){const e=[];return"string"==typeof t?t.split(/\s*,\s*/).forEach(i=>function Lke(t,n,e){if(":"==t[0]){const l=function $ke(t,n){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(t,e);if("function"==typeof l)return void n.push(l);t=l}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function rke(t){return new Nt(3015,!1)}()),n;const r=i[1],o=i[2],s=i[3];n.push(u9(r,s));"<"==o[0]&&!(r==Yw&&s==Yw)&&n.push(u9(s,r))}(i,e,n)):e.push(t),e}const Xw=new Set(["true","1"]),Jw=new Set(["false","0"]);function u9(t,n){const e=Xw.has(t)||Jw.has(t),i=Xw.has(n)||Jw.has(n);return(r,o)=>{let s=t==Yw||t==r,a=n==Yw||n==o;return!s&&e&&"boolean"==typeof r&&(s=r?Xw.has(t):Jw.has(t)),!a&&i&&"boolean"==typeof o&&(a=o?Xw.has(n):Jw.has(n)),s&&a}}const Bke=new RegExp("s*:selfs*,?","g");function NM(t,n,e,i){return new Vke(t).build(n,e,i)}class Vke{constructor(n){this._driver=n}build(n,e,i){const r=new zke(e);return this._resetContextStyleTimingState(r),uc(this,my(n),r)}_resetContextStyleTimingState(n){n.currentQuerySelector="",n.collectedStyles=new Map,n.collectedStyles.set("",new Map),n.currentTime=0}visitTrigger(n,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==n.name.charAt(0)&&e.errors.push(function qSe(){return new Nt(3006,!1)}()),n.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function YSe(){return new Nt(3007,!1)}())}),{type:7,name:n.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(n,e){const i=this.visitStyle(n.styles,e),r=n.options&&n.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{l9(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(Gw(o.values()),e.errors.push(function XSe(t,n){return new Nt(3008,!1)}()))}return{type:0,name:n.name,style:i,options:r?{params:r}:null}}visitTransition(n,e){e.queryCount=0,e.depCount=0;const i=uc(this,my(n.animation),e);return{type:1,matchers:Rke(n.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:om(n.options)}}visitSequence(n,e){return{type:2,steps:n.steps.map(i=>uc(this,i,e)),options:om(n.options)}}visitGroup(n,e){const i=e.currentTime;let r=0;const o=n.steps.map(s=>{e.currentTime=i;const a=uc(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:om(n.options)}}visitAnimate(n,e){const i=function Wke(t,n){if(t.hasOwnProperty("duration"))return t;if("number"==typeof t)return FM(zw(t,n).duration,0,"");const e=t;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=FM(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=zw(e,n);return FM(r.duration,r.delay,r.easing)}(n.timings,e.errors);e.currentAnimateTimings=i;let r,o=n.styles?n.styles:kr({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=n.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=kr(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(n,e){const i=this._makeStyleAst(n,e);return this._validateStyleAst(i,e),i}_makeStyleAst(n,e){const i=[],r=Array.isArray(n.styles)?n.styles:[n.styles];for(let a of r)"string"==typeof a?a===Vh?i.push(a):e.errors.push(new Nt(3002,!1)):i.push(r9(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:n.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(n,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),n.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function KSe(t,n,e,i,r){return new Nt(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function Ake(t,n,e){const i=n.params||{},r=l9(t);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function USe(t){return new Nt(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(n,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function QSe(){return new Nt(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=n.steps.map(v=>{const y=this._makeStyleAst(v,e);let b=null!=y.offset?y.offset:function Gke(t){if("string"==typeof t)return null;let n=null;if(Array.isArray(t))t.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;n=parseFloat(i.get("offset")),i.delete("offset")}});else if(t instanceof Map&&t.has("offset")){const e=t;n=parseFloat(e.get("offset")),e.delete("offset")}return n}(y.styles),C=0;return null!=b&&(o++,C=y.offset=b),l=l||C<0||C>1,a=a||C0&&o{const b=h>0?y==f?1:h*y:s[y],C=b*g;e.currentTime=p+m.delay+C,m.duration=C,this._validateStyleAst(v,e),v.offset=b,i.styles.push(v)}),i}visitReference(n,e){return{type:8,animation:uc(this,my(n.animation),e),options:om(n.options)}}visitAnimateChild(n,e){return e.depCount++,{type:9,options:om(n.options)}}visitAnimateRef(n,e){return{type:10,animation:this.visitReference(n.animation,e),options:om(n.options)}}visitQuery(n,e){const i=e.currentQuerySelector,r=n.options||{};e.queryCount++,e.currentQuery=n;const[o,s]=function Hke(t){const n=!!t.split(/\s*,\s*/).find(e=>":self"==e);return n&&(t=t.replace(Bke,"")),t=t.replace(/@\*/g,Uw).replace(/@\w+/g,e=>Uw+"-"+e.slice(1)).replace(/:animating/g,AM),[t,n]}(n.selector);e.currentQuerySelector=i.length?i+" "+o:o,cc(e.collectedStyles,e.currentQuerySelector,new Map);const a=uc(this,my(n.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:n.selector,options:om(n.options)}}visitStagger(n,e){e.currentQuery||e.errors.push(function nke(){return new Nt(3013,!1)}());const i="full"===n.timings?{duration:0,delay:0,easing:"full"}:zw(n.timings,e.errors,!0);return{type:12,animation:uc(this,my(n.animation),e),timings:i,options:null}}}class zke{constructor(n){this.errors=n,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function om(t){return t?(t=py(t)).params&&(t.params=function Uke(t){return t?py(t):null}(t.params)):t={},t}function FM(t,n,e){return{duration:t,delay:n,easing:e}}function PM(t,n,e,i,r,o,s=null,a=!1){return{type:1,element:t,keyframes:n,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Kw{constructor(){this._map=new Map}get(n){return this._map.get(n)||[]}append(n,e){let i=this._map.get(n);i||this._map.set(n,i=[]),i.push(...e)}has(n){return this._map.has(n)}clear(){this._map.clear()}}const Xke=new RegExp(":enter","g"),Kke=new RegExp(":leave","g");function jM(t,n,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new Qke).buildKeyframes(t,n,e,i,r,o,s,a,l,c)}class Qke{buildKeyframes(n,e,i,r,o,s,a,l,c,u=[]){c=c||new Kw;const d=new RM(n,e,c,r,o,u,[]);d.options=l;const h=l.delay?Hh(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),uc(this,i,d);const f=d.timelines.filter(p=>p.containsAnimation());if(f.length&&a.size){let p;for(let m=f.length-1;m>=0;m--){const g=f[m];if(g.element===e){p=g;break}}p&&!p.allowOnlyTimelineStyles()&&p.setStyles([a],null,d.errors,l)}return f.length?f.map(p=>p.buildKeyframes()):[PM(e,[],[],[],0,h,"",!1)]}visitTrigger(n,e){}visitState(n,e){}visitTransition(n,e){}visitAnimateChild(n,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(n.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=n}visitAnimateRef(n,e){const i=e.createSubContext(n.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([n.options,n.animation.options],e,i),this.visitReference(n.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=n}_applyAnimationRefDelays(n,e,i){for(const r of n){const o=r?.delay;if(o){const s="number"==typeof o?o:Hh(gy(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(n,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Hh(i.duration):null,a=null!=i.delay?Hh(i.delay):null;return 0!==s&&n.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(n,e){e.updateOptions(n.options,!0),uc(this,n.animation,e),e.previousNode=n}visitSequence(n,e){const i=e.subContextCount;let r=e;const o=n.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Qw);const s=Hh(o.delay);r.delayNextStep(s)}n.steps.length&&(n.steps.forEach(s=>uc(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=n}visitGroup(n,e){const i=[];let r=e.currentTimeline.currentTime;const o=n.options&&n.options.delay?Hh(n.options.delay):0;n.steps.forEach(s=>{const a=e.createSubContext(n.options);o&&a.delayNextStep(o),uc(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=n}_visitTiming(n,e){if(n.dynamic){const i=n.strValue;return zw(e.params?gy(i,e.params,e.errors):i,e.errors)}return{duration:n.duration,delay:n.delay,easing:n.easing}}visitAnimate(n,e){const i=e.currentAnimateTimings=this._visitTiming(n.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=n.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=n}visitStyle(n,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||n.easing;n.isEmptyStep?i.applyEmptyStep(o):i.setStyles(n.styles,o,e.errors,e.options),e.previousNode=n}visitKeyframes(n,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,n.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=n}visitQuery(n,e){const i=e.currentTimeline.currentTime,r=n.options||{},o=r.delay?Hh(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Qw);let s=i;const a=e.invokeQuery(n.selector,n.originalSelector,n.limit,n.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(n.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),uc(this,n.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=n}visitStagger(n,e){const i=e.parentContext,r=e.currentTimeline,o=n.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;uc(this,n.animation,e),e.previousNode=n,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Qw={};class RM{constructor(n,e,i,r,o,s,a,l){this._driver=n,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Qw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Zw(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(n,e){if(!n)return;const i=n;let r=this.options;null!=i.duration&&(r.duration=Hh(i.duration)),null!=i.delay&&(r.delay=Hh(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=gy(o[a],s,this.errors))})}}_copyOptions(){const n={};if(this.options){const e=this.options.params;if(e){const i=n.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return n}createSubContext(n=null,e,i){const r=e||this.element,o=new RM(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(n),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(n){return this.previousNode=Qw,this.currentTimeline=this.currentTimeline.fork(this.element,n),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(n,e,i){const r={duration:e??n.duration,delay:this.currentTimeline.currentTime+(i??0)+n.delay,easing:""},o=new Zke(this._driver,n.element,n.keyframes,n.preStyleProps,n.postStyleProps,r,n.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(n){this.currentTimeline.forwardTime(this.currentTimeline.duration+n)}delayNextStep(n){n>0&&this.currentTimeline.delayNextStep(n)}invokeQuery(n,e,i,r,o,s){let a=[];if(r&&a.push(this.element),n.length>0){n=(n=n.replace(Xke,"."+this._enterClassName)).replace(Kke,"."+this._leaveClassName);let c=this._driver.query(this.element,n,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function ike(t){return new Nt(3014,!1)}()),a}}class Zw{constructor(n,e,i,r){this._driver=n,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(n){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+n),e&&this.snapshotCurrentStyles()):this.startTime+=n}fork(n,e){return this.applyStylesToKeyframe(),new Zw(this._driver,n,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(n){this.applyStylesToKeyframe(),this.duration=n,this._loadKeyframe()}_updateStyle(n,e){this._localTimelineStyles.set(n,e),this._globalTimelineStyles.set(n,e),this._styleSummary.set(n,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(n){n&&this._previousKeyframe.set("easing",n);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Vh),this._currentKeyframe.set(e,Vh);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(n,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function eDe(t,n){const e=new Map;let i;return t.forEach(r=>{if("*"===r){i=i||n.keys();for(let o of i)e.set(o,Vh)}else Nf(r,e)}),e}(n,this._globalTimelineStyles);for(let[a,l]of s){const c=gy(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Vh),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((n,e)=>{this._currentKeyframe.set(e,n)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((n,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,n)}))}snapshotCurrentStyles(){for(let[n,e]of this._localTimelineStyles)this._pendingStyles.set(n,e),this._updateStyle(n,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const n=[];for(let e in this._currentKeyframe)n.push(e);return n}mergeTimelineCollectedStyles(n){n._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const n=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Nf(a,new Map,this._backFill);c.forEach((u,d)=>{u===bM?n.add(d):u===Vh&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=n.size?Gw(n.values()):[],s=e.size?Gw(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return PM(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class Zke extends Zw{constructor(n,e,i,r,o,s,a=!1){super(n,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let n=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Nf(n[0]);l.set("offset",0),o.push(l);const c=Nf(n[0]);c.set("offset",f9(a)),o.push(c);const u=n.length-1;for(let d=1;d<=u;d++){let h=Nf(n[d]);const f=h.get("offset");h.set("offset",f9((e+f*i)/s)),o.push(h)}i=s,e=0,r="",n=o}return PM(this.element,n,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function f9(t,n=3){const e=Math.pow(10,n-1);return Math.round(t*e)/e}class LM{}const tDe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class nDe extends LM{normalizePropertyName(n,e){return IM(n)}normalizeStyleValue(n,e,i,r){let o="";const s=i.toString().trim();if(tDe.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function WSe(t,n){return new Nt(3005,!1)}())}return s+o}}function p9(t,n,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:t,triggerName:n,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const $M={};class m9{constructor(n,e,i){this._triggerName=n,this.ast=e,this._stateStyles=i}match(n,e,i,r){return function iDe(t,n,e,i,r){return t.some(o=>o(n,e,i,r))}(this.ast.matchers,n,e,i,r)}buildStyles(n,e,i){let r=this._stateStyles.get("*");return void 0!==n&&(r=this._stateStyles.get(n?.toString())||r),r?r.buildStyles(e,i):new Map}build(n,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||$M,p=this.buildStyles(i,a&&a.params||$M,d),m=l&&l.params||$M,g=this.buildStyles(r,m,d),v=new Set,y=new Map,b=new Map,C="void"===r,k={params:rDe(m,h),delay:this.ast.options?.delay},D=u?[]:jM(n,e,this.ast.animation,o,s,p,g,k,c,d);let L=0;if(D.forEach(R=>{L=Math.max(R.duration+R.delay,L)}),d.length)return p9(e,this._triggerName,i,r,C,p,g,[],[],y,b,L,d);D.forEach(R=>{const U=R.element,G=cc(y,U,new Set);R.preStyleProps.forEach(te=>G.add(te));const X=cc(b,U,new Set);R.postStyleProps.forEach(te=>X.add(te)),U!==e&&v.add(U)});const z=Gw(v.values());return p9(e,this._triggerName,i,r,C,p,g,D,z,y,b,L)}}function rDe(t,n){const e=py(n);for(const i in t)t.hasOwnProperty(i)&&null!=t[i]&&(e[i]=t[i]);return e}class oDe{constructor(n,e,i){this.styles=n,this.defaultParams=e,this.normalizer=i}buildStyles(n,e){const i=new Map,r=py(this.defaultParams);return Object.keys(n).forEach(o=>{const s=n[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=gy(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class aDe{constructor(n,e,i){this.name=n,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new oDe(r.style,r.options&&r.options.params||{},i))}),g9(this.states,"true","1"),g9(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new m9(n,r,this.states))}),this.fallbackTransition=function lDe(t,n,e){return new m9(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},n)}(n,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(n,e,i,r){return this.transitionFactories.find(s=>s.match(n,e,i,r))||null}matchStyles(n,e,i){return this.fallbackTransition.buildStyles(n,e,i)}}function g9(t,n,e){t.has(n)?t.has(e)||t.set(e,t.get(n)):t.has(e)&&t.set(n,t.get(e))}const cDe=new Kw;class uDe{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(n,e){const i=[],r=[],o=NM(this._driver,e,i,r);if(i.length)throw function uke(t){return new Nt(3503,!1)}();this._animations.set(n,o)}_buildPlayer(n,e,i){const r=n.element,o=Y7(0,this._normalizer,0,n.keyframes,e,i);return this._driver.animate(r,o,n.duration,n.delay,n.easing,[],!0)}create(n,e,i={}){const r=[],o=this._animations.get(n);let s;const a=new Map;if(o?(s=jM(this._driver,e,o,EM,Vw,new Map,new Map,i,cDe,r),s.forEach(u=>{const d=cc(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function dke(){return new Nt(3300,!1)}()),s=[]),r.length)throw function hke(t){return new Nt(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,f)=>{u.set(f,this._driver.computeStyle(d,f,Vh))})});const c=If(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(n,c),c.onDestroy(()=>this.destroy(n)),this.players.push(c),c}destroy(n){const e=this._getPlayer(n);e.destroy(),this._playersById.delete(n);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(n){const e=this._playersById.get(n);if(!e)throw function fke(t){return new Nt(3301,!1)}();return e}listen(n,e,i,r){const o=SM(e,"","","");return wM(this._getPlayer(n),i,o,r),()=>{}}command(n,e,i,r){if("register"==i)return void this.register(n,r[0]);if("create"==i)return void this.create(n,e,r[0]||{});const o=this._getPlayer(n);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(n)}}}const v9="ng-animate-queued",BM="ng-animate-disabled",mDe=[],y9={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},gDe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Uc="__ng_removed";class VM{get params(){return this.options.params}constructor(n,e=""){this.namespaceId=e;const i=n&&n.hasOwnProperty("value");if(this.value=function bDe(t){return t??null}(i?n.value:n),i){const o=py(n);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(n){const e=n.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const vy="void",HM=new VM(vy);class vDe{constructor(n,e,i){this.id=n,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+n,zc(e,this._hostClassName)}listen(n,e,i,r){if(!this._triggers.has(e))throw function pke(t,n){return new Nt(3302,!1)}();if(null==i||0==i.length)throw function mke(t){return new Nt(3303,!1)}();if(!function xDe(t){return"start"==t||"done"==t}(i))throw function gke(t,n){return new Nt(3400,!1)}();const o=cc(this._elementListeners,n,[]),s={name:e,phase:i,callback:r};o.push(s);const a=cc(this._engine.statesByElement,n,new Map);return a.has(e)||(zc(n,Hw),zc(n,Hw+"-"+e),a.set(e,HM)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(n,e){return!this._triggers.has(n)&&(this._triggers.set(n,e),!0)}_getTrigger(n){const e=this._triggers.get(n);if(!e)throw function vke(t){return new Nt(3401,!1)}();return e}trigger(n,e,i,r=!0){const o=this._getTrigger(e),s=new UM(this.id,e,n);let a=this._engine.statesByElement.get(n);a||(zc(n,Hw),zc(n,Hw+"-"+e),this._engine.statesByElement.set(n,a=new Map));let l=a.get(e);const c=new VM(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=HM),c.value!==vy&&l.value===c.value){if(!function SDe(t,n){const e=Object.keys(t),i=Object.keys(n);if(e.length!=i.length)return!1;for(let r=0;r{rm(n,g),Rd(n,v)})}return}const h=cc(this._engine.playersByElement,n,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let f=o.matchTransition(l.value,c.value,n,c.params),p=!1;if(!f){if(!r)return;f=o.fallbackTransition,p=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:p}),p||(zc(n,v9),s.onStart(()=>{pv(n,v9)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const g=this._engine.playersByElement.get(n);if(g){let v=g.indexOf(s);v>=0&&g.splice(v,1)}}),this.players.push(s),h.push(s),s}deregister(n){this._triggers.delete(n),this._engine.statesByElement.forEach(e=>e.delete(n)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=n))})}clearElementCache(n){this._engine.statesByElement.delete(n),this._elementListeners.delete(n);const e=this._engine.playersByElement.get(n);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(n))}_signalRemovalForInnerTriggers(n,e){const i=this._engine.driver.query(n,Uw,!0);i.forEach(r=>{if(r[Uc])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(n,e,i,r){const o=this._engine.statesByElement.get(n),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(n,c,vy,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,n,!0,e,s),i&&If(a).onDone(()=>this._engine.processLeaveNode(n)),!0}return!1}prepareLeaveAnimationListeners(n){const e=this._elementListeners.get(n),i=this._engine.statesByElement.get(n);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||HM,u=new VM(vy),d=new UM(this.id,s,n);this._engine.totalQueuedPlayers++,this._queue.push({element:n,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(n,e){const i=this._engine;if(n.childElementCount&&this._signalRemovalForInnerTriggers(n,e),this.triggerLeaveAnimation(n,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(n):[];if(o&&o.length)r=!0;else{let s=n;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(n),r)i.markElementAsRemoved(this.id,n,!1,e);else{const o=n[Uc];(!o||o===y9)&&(i.afterFlush(()=>this.clearElementCache(n)),i.destroyInnerAnimations(n),i._onRemovalComplete(n,e))}}insertNode(n,e){zc(n,this._hostClassName)}drainQueuedTransitions(n){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=SM(o,i.triggerName,i.fromState.value,i.toState.value);l._data=n,wM(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(n){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,n)}elementContainsData(n){let e=!1;return this._elementListeners.has(n)&&(e=!0),e=!!this._queue.find(i=>i.element===n)||e,e}}class yDe{_onRemovalComplete(n,e){this.onRemovalComplete(n,e)}constructor(n,e,i){this.bodyNode=n,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const n=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&n.push(i)})}),n}createNamespace(n,e){const i=new vDe(n,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[n]=i}_balanceNamespaceList(n,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,n),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(n)}else i.push(n);return r.set(e,n),n}register(n,e){let i=this._namespaceLookup[n];return i||(i=this.createNamespace(n,e)),i}registerTrigger(n,e,i){let r=this._namespaceLookup[n];r&&r.register(e,i)&&this.totalAnimations++}destroy(n,e){if(!n)return;const i=this._fetchNamespace(n);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[n];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(n){return this._namespaceLookup[n]}fetchNamespacesByElement(n){const e=new Set,i=this.statesByElement.get(n);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(n,e,i,r){if(eC(e)){const o=this._fetchNamespace(n);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(n,e,i,r){if(!eC(e))return;const o=e[Uc];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(n){const s=this._fetchNamespace(n);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(n){this.collectedEnterElements.push(n)}markElementAsDisabled(n,e){e?this.disabledNodes.has(n)||(this.disabledNodes.add(n),zc(n,BM)):this.disabledNodes.has(n)&&(this.disabledNodes.delete(n),pv(n,BM))}removeNode(n,e,i,r){if(eC(e)){const o=n?this._fetchNamespace(n):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(n,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==n&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(n,e,i,r,o){this.collectedLeaveElements.push(e),e[Uc]={namespaceId:n,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(n,e,i,r,o){return eC(e)?this._fetchNamespace(n).listen(e,i,r,o):()=>{}}_buildInstruction(n,e,i,r,o){return n.transition.build(this.driver,n.element,n.fromState.value,n.toState.value,i,r,n.fromState.options,n.toState.options,e,o)}destroyInnerAnimations(n){let e=this.driver.query(n,Uw,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(n,AM,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(n){const e=this.playersByElement.get(n);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(n){const e=this.playersByQueriedElement.get(n);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(n=>{if(this.players.length)return If(this.players).onDone(()=>n());n()})}processLeaveNode(n){const e=n[Uc];if(e&&e.setForRemoval){if(n[Uc]=y9,e.namespaceId){this.destroyInnerAnimations(n);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(n)}this._onRemovalComplete(n,e.setForRemoval)}n.classList?.contains(BM)&&this.markElementAsDisabled(n,!1),this.driver.query(n,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(n=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?If(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(n){throw function yke(t){return new Nt(3402,!1)}()}_flushAnimations(n,e){const i=new Kw,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(J=>{u.add(J);const H=this.driver.query(J,".ng-animate-queued",!0);for(let le=0;le{const le=EM+m++;p.set(H,le),J.forEach(E=>zc(E,le))});const g=[],v=new Set,y=new Set;for(let J=0;Jv.add(E)):y.add(H))}const b=new Map,C=x9(h,Array.from(v));C.forEach((J,H)=>{const le=Vw+m++;b.set(H,le),J.forEach(E=>zc(E,le))}),n.push(()=>{f.forEach((J,H)=>{const le=p.get(H);J.forEach(E=>pv(E,le))}),C.forEach((J,H)=>{const le=b.get(H);J.forEach(E=>pv(E,le))}),g.forEach(J=>{this.processLeaveNode(J)})});const k=[],D=[];for(let J=this._namespaceList.length-1;J>=0;J--)this._namespaceList[J].drainQueuedTransitions(e).forEach(le=>{const E=le.player,I=le.element;if(k.push(E),this.collectedEnterElements.length){const _e=I[Uc];if(_e&&_e.setForMove){if(_e.previousTriggersValues&&_e.previousTriggersValues.has(le.triggerName)){const Xe=_e.previousTriggersValues.get(le.triggerName),Le=this.statesByElement.get(le.element);if(Le&&Le.has(le.triggerName)){const rt=Le.get(le.triggerName);rt.value=Xe,Le.set(le.triggerName,rt)}}return void E.destroy()}}const N=!d||!this.driver.containsElement(d,I),q=b.get(I),V=p.get(I),re=this._buildInstruction(le,i,V,q,N);if(re.errors&&re.errors.length)return void D.push(re);if(N)return E.onStart(()=>rm(I,re.fromStyles)),E.onDestroy(()=>Rd(I,re.toStyles)),void r.push(E);if(le.isFallbackTransition)return E.onStart(()=>rm(I,re.fromStyles)),E.onDestroy(()=>Rd(I,re.toStyles)),void r.push(E);const he=[];re.timelines.forEach(_e=>{_e.stretchStartingKeyframe=!0,this.disabledNodes.has(_e.element)||he.push(_e)}),re.timelines=he,i.append(I,re.timelines),s.push({instruction:re,player:E,element:I}),re.queriedElements.forEach(_e=>cc(a,_e,[]).push(E)),re.preStyleProps.forEach((_e,Xe)=>{if(_e.size){let Le=l.get(Xe);Le||l.set(Xe,Le=new Set),_e.forEach((rt,B)=>Le.add(B))}}),re.postStyleProps.forEach((_e,Xe)=>{let Le=c.get(Xe);Le||c.set(Xe,Le=new Set),_e.forEach((rt,B)=>Le.add(B))})});if(D.length){const J=[];D.forEach(H=>{J.push(function _ke(t,n){return new Nt(3505,!1)}())}),k.forEach(H=>H.destroy()),this.reportError(J)}const L=new Map,z=new Map;s.forEach(J=>{const H=J.element;i.has(H)&&(z.set(H,H),this._beforeAnimationBuild(J.player.namespaceId,J.instruction,L))}),r.forEach(J=>{const H=J.element;this._getPreviousPlayers(H,!1,J.namespaceId,J.triggerName,null).forEach(E=>{cc(L,H,[]).push(E),E.destroy()})});const R=g.filter(J=>C9(J,l,c)),U=new Map;b9(U,this.driver,y,c,Vh).forEach(J=>{C9(J,l,c)&&R.push(J)});const X=new Map;f.forEach((J,H)=>{b9(X,this.driver,new Set(J),l,bM)}),R.forEach(J=>{const H=U.get(J),le=X.get(J);U.set(J,new Map([...Array.from(H?.entries()??[]),...Array.from(le?.entries()??[])]))});const te=[],P=[],W={};s.forEach(J=>{const{element:H,player:le,instruction:E}=J;if(i.has(H)){if(u.has(H))return le.onDestroy(()=>Rd(H,E.toStyles)),le.disabled=!0,le.overrideTotalTime(E.totalTime),void r.push(le);let I=W;if(z.size>1){let q=H;const V=[];for(;q=q.parentNode;){const re=z.get(q);if(re){I=re;break}V.push(q)}V.forEach(re=>z.set(re,I))}const N=this._buildAnimation(le.namespaceId,E,L,o,X,U);if(le.setRealPlayer(N),I===W)te.push(le);else{const q=this.playersByElement.get(I);q&&q.length&&(le.parentPlayer=If(q)),r.push(le)}}else rm(H,E.fromStyles),le.onDestroy(()=>Rd(H,E.toStyles)),P.push(le),u.has(H)&&r.push(le)}),P.forEach(J=>{const H=o.get(J.element);if(H&&H.length){const le=If(H);J.setRealPlayer(le)}}),r.forEach(J=>{J.parentPlayer?J.syncPlayerEvents(J.parentPlayer):J.destroy()});for(let J=0;J!N.destroyed);I.length?wDe(this,H,I):this.processLeaveNode(H)}return g.length=0,te.forEach(J=>{this.players.push(J),J.onDone(()=>{J.destroy();const H=this.players.indexOf(J);this.players.splice(H,1)}),J.play()}),te}elementContainsData(n,e){let i=!1;const r=e[Uc];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(n).elementContainsData(e)||i}afterFlush(n){this._flushFns.push(n)}afterFlushAnimationsDone(n){this._whenQuietFns.push(n)}_getPreviousPlayers(n,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(n);a&&(s=a)}else{const a=this.playersByElement.get(n);if(a){const l=!o||o==vy;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(n,e,i){const o=e.element,s=e.isRemovalTransition?void 0:n,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=cc(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(f=>{const p=f.getRealPlayer();p.beforeDestroy&&p.beforeDestroy(),f.destroy(),d.push(f)})}rm(o,e.fromStyles)}_buildAnimation(n,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(p=>{const m=p.element;u.add(m);const g=m[Uc];if(g&&g.removedBeforeQueried)return new fy(p.duration,p.delay);const v=m!==l,y=function CDe(t){const n=[];return w9(t,n),n}((i.get(m)||mDe).map(L=>L.getRealPlayer())).filter(L=>!!L.element&&L.element===m),b=o.get(m),C=s.get(m),k=Y7(0,this._normalizer,0,p.keyframes,b,C),D=this._buildPlayer(p,k,y);if(p.subTimeline&&r&&d.add(m),v){const L=new UM(n,a,m);L.setRealPlayer(D),c.push(L)}return D});c.forEach(p=>{cc(this.playersByQueriedElement,p.element,[]).push(p),p.onDone(()=>function _De(t,n,e){let i=t.get(n);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&t.delete(n)}return i}(this.playersByQueriedElement,p.element,p))}),u.forEach(p=>zc(p,i9));const f=If(h);return f.onDestroy(()=>{u.forEach(p=>pv(p,i9)),Rd(l,e.toStyles)}),d.forEach(p=>{cc(r,p,[]).push(f)}),f}_buildPlayer(n,e,i){return e.length>0?this.driver.animate(n.element,e,n.duration,n.delay,n.easing,i):new fy(n.duration,n.delay)}}class UM{constructor(n,e,i){this.namespaceId=n,this.triggerName=e,this.element=i,this._player=new fy,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(n){this._containsRealPlayer||(this._player=n,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>wM(n,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(n.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(n){this.totalTime=n}syncPlayerEvents(n){const e=this._player;e.triggerCallback&&n.onStart(()=>e.triggerCallback("start")),n.onDone(()=>this.finish()),n.onDestroy(()=>this.destroy())}_queueEvent(n,e){cc(this._queuedCallbacks,n,[]).push(e)}onDone(n){this.queued&&this._queueEvent("done",n),this._player.onDone(n)}onStart(n){this.queued&&this._queueEvent("start",n),this._player.onStart(n)}onDestroy(n){this.queued&&this._queueEvent("destroy",n),this._player.onDestroy(n)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(n){this.queued||this._player.setPosition(n)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(n){const e=this._player;e.triggerCallback&&e.triggerCallback(n)}}function eC(t){return t&&1===t.nodeType}function _9(t,n){const e=t.style.display;return t.style.display=n??"none",e}function b9(t,n,e,i,r){const o=[];e.forEach(l=>o.push(_9(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=n.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Uc]=gDe,s.push(c))}),t.set(c,u)});let a=0;return e.forEach(l=>_9(l,o[a++])),s}function x9(t,n){const e=new Map;if(t.forEach(a=>e.set(a,[])),0==n.length)return e;const i=1,r=new Set(n),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return n.forEach(a=>{const l=s(a);l!==i&&e.get(l).push(a)}),e}function zc(t,n){t.classList?.add(n)}function pv(t,n){t.classList?.remove(n)}function wDe(t,n,e){If(e).onDone(()=>t.processLeaveNode(n))}function w9(t,n){for(let e=0;er.add(o)):n.set(t,i),e.delete(t),!0}class tC{constructor(n,e,i){this.bodyNode=n,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new yDe(n,e,i),this._timelineEngine=new uDe(n,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(n,e,i,r,o){const s=n+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],c=[],u=NM(this._driver,o,l,c);if(l.length)throw function lke(t,n){return new Nt(3404,!1)}();a=function sDe(t,n,e){return new aDe(t,n,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(n,e){this._transitionEngine.register(n,e)}destroy(n,e){this._transitionEngine.destroy(n,e)}onInsert(n,e,i,r){this._transitionEngine.insertNode(n,e,i,r)}onRemove(n,e,i,r){this._transitionEngine.removeNode(n,e,r||!1,i)}disableAnimations(n,e){this._transitionEngine.markElementAsDisabled(n,e)}process(n,e,i,r){if("@"==i.charAt(0)){const[o,s]=X7(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(n,e,i,r)}listen(n,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=X7(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(n,e,i,r,o)}flush(n=-1){this._transitionEngine.flush(n)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let DDe=(()=>{class t{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=t.initialStylesByElement.get(e);o||t.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Rd(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Rd(this._element,this._initialStyles),this._endStyles&&(Rd(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(rm(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(rm(this._element,this._endStyles),this._endStyles=null),Rd(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function zM(t){let n=null;return t.forEach((e,i)=>{(function TDe(t){return"display"===t||"position"===t})(i)&&(n=n||new Map,n.set(i,e))}),n}class S9{constructor(n,e,i,r){this.element=n,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const n=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,n,this.options),this._finalKeyframe=n.length?n[n.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(n){const e=[];return n.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(n,e,i){return n.animate(this._convertKeyframesToObject(e),i)}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(n=>n()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}setPosition(n){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=n*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const n=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&n.set(r,this._finished?i:c9(this.element,r))}),this.currentSnapshot=n}triggerCallback(n){const e="start"===n?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class EDe{validateStyleProperty(n){return!0}validateAnimatableStyleProperty(n){return!0}matchesElement(n,e){return!1}containsElement(n,e){return Z7(n,e)}getParentElement(n){return DM(n)}query(n,e,i){return e9(n,e,i)}computeStyle(n,e,i){return window.getComputedStyle(n)[e]}animate(n,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(f=>f instanceof S9);(function Ike(t,n){return 0===t||0===n})(i,r)&&u.forEach(f=>{f.currentSnapshot.forEach((p,m)=>c.set(m,p))});let d=function Eke(t){return t.length?t[0]instanceof Map?t:t.map(n=>r9(n)):[]}(e).map(f=>Nf(f));d=function Nke(t,n,e){if(e.size&&n.length){let i=n[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,c9(t,a)))}}return n}(n,d,c);const h=function kDe(t,n){let e=null,i=null;return Array.isArray(n)&&n.length?(e=zM(n[0]),n.length>1&&(i=zM(n[n.length-1]))):n instanceof Map&&(e=zM(n)),e||i?new DDe(t,e,i):null}(n,d);return new S9(n,d,l,h)}}let ADe=(()=>{class t extends U7{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:bu.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?z7(e):e;return k9(this._renderer,null,i,"register",[r]),new MDe(i,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(gt(Wg),gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class MDe extends BSe{constructor(n,e){super(),this._id=n,this._renderer=e}create(n,e){return new ODe(this._id,n,e||{},this._renderer)}}class ODe{constructor(n,e,i,r){this.id=n,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(n,e){return this._renderer.listen(this.element,`@@${this.id}:${n}`,e)}_command(n,...e){return k9(this._renderer,this.element,this.id,n,e)}onDone(n){this._listen("done",n)}onStart(n){this._listen("start",n)}onDestroy(n){this._listen("destroy",n)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(n){this._command("setPosition",n)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function k9(t,n,e,i,r){return t.setProperty(n,`@@${e}:${i}`,r)}const D9="@.disabled";let IDe=(()=>{class t{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new T9("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new NDe(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(gt(Wg),gt(tC),gt(nr))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();class T9{constructor(n,e,i,r){this.namespaceId=n,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(n,e){return this.delegate.createElement(n,e)}createComment(n){return this.delegate.createComment(n)}createText(n){return this.delegate.createText(n)}appendChild(n,e){this.delegate.appendChild(n,e),this.engine.onInsert(this.namespaceId,e,n,!1)}insertBefore(n,e,i,r=!0){this.delegate.insertBefore(n,e,i),this.engine.onInsert(this.namespaceId,e,n,r)}removeChild(n,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(n,e){return this.delegate.selectRootElement(n,e)}parentNode(n){return this.delegate.parentNode(n)}nextSibling(n){return this.delegate.nextSibling(n)}setAttribute(n,e,i,r){this.delegate.setAttribute(n,e,i,r)}removeAttribute(n,e,i){this.delegate.removeAttribute(n,e,i)}addClass(n,e){this.delegate.addClass(n,e)}removeClass(n,e){this.delegate.removeClass(n,e)}setStyle(n,e,i,r){this.delegate.setStyle(n,e,i,r)}removeStyle(n,e,i){this.delegate.removeStyle(n,e,i)}setProperty(n,e,i){"@"==e.charAt(0)&&e==D9?this.disableAnimations(n,!!i):this.delegate.setProperty(n,e,i)}setValue(n,e){this.delegate.setValue(n,e)}listen(n,e,i){return this.delegate.listen(n,e,i)}disableAnimations(n,e){this.engine.disableAnimations(n,e)}}class NDe extends T9{constructor(n,e,i,r,o){super(e,i,r,o),this.factory=n,this.namespaceId=e}setProperty(n,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==D9?this.disableAnimations(n,i=void 0===i||!!i):this.engine.process(this.namespaceId,n,e.slice(1),i):this.delegate.setProperty(n,e,i)}listen(n,e,i){if("@"==e.charAt(0)){const r=function FDe(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(n);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function PDe(t){const n=t.indexOf(".");return[t.substring(0,n),t.slice(n+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(n,e,i)}}let jDe=(()=>{class t extends tC{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return t.\u0275fac=function(e){return new(e||t)(gt(co),gt(TM),gt(LM),gt(Rh))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const E9=[{provide:U7,useClass:ADe},{provide:LM,useFactory:function RDe(){return new nDe}},{provide:tC,useClass:jDe},{provide:Wg,useFactory:function LDe(t,n,e){return new IDe(t,n,e)},deps:[Bw,tC,nr]}],GM=[{provide:TM,useFactory:()=>new EDe},{provide:dB,useValue:"BrowserAnimations"},...E9],WM=[{provide:TM,useClass:t9},{provide:dB,useValue:"NoopAnimations"},...E9];let $De=(()=>{class t{static withConfig(e){return{ngModule:t,providers:e.disableAnimations?WM:GM}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:GM,imports:[yM]}),t})(),BDe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:WM,imports:[yM]}),t})();function Rn(...t){let n=t[t.length-1];return Ca(n)?(t.pop(),Fc(t,n)):ot(t)}class Js extends dr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const e=super._subscribe(n);return e&&!e.closed&&n.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ur;return this._value}next(n){super.next(this._value=n)}}const iC=(()=>{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})();class qM extends F{notifyNext(n,e,i,r,o){this.destination.next(e)}notifyError(n,e){this.destination.error(n)}notifyComplete(n){this.destination.complete()}}class VDe extends F{constructor(n,e,i){super(),this.parent=n,this.outerValue=e,this.outerIndex=i,this.index=0}_next(n){this.parent.notifyNext(this.outerValue,n,this.outerIndex,this.index++,this)}_error(n){this.parent.notifyError(n,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function YM(t,n,e,i,r=new VDe(t,e,i)){if(!r.closed)return n instanceof en?n.subscribe(r):Ql(n)(r)}const A9={};function rC(...t){let n,e;return Ca(t[t.length-1])&&(e=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Ze(t[0])&&(t=t[0]),ot(t,e).lift(new HDe(n))}class HDe{constructor(n){this.resultSelector=n}call(n,e){return e.subscribe(new UDe(n,this.resultSelector))}}class UDe extends qM{constructor(n,e){super(n),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(n){this.values.push(A9),this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;it.complete());function sC(t){return t?function GDe(t){return new en(n=>t.schedule(()=>n.complete()))}(t):Uh}function M9(t){return new en(n=>{let e;try{e=t()}catch(r){return void n.error(r)}return(e?ro(e):sC()).subscribe(n)})}function sm(t,n){return new en(n?e=>n.schedule(WDe,0,{error:t,subscriber:e}):e=>e.error(t))}function WDe({error:t,subscriber:n}){n.error(t)}function dc(t,n){return"function"==typeof n?e=>e.pipe(dc((i,r)=>ro(t(i,r)).pipe(_n((o,s)=>n(i,o,r,s))))):e=>e.lift(new qDe(t))}class qDe{constructor(n){this.project=n}call(n,e){return e.subscribe(new YDe(n,this.project))}}class YDe extends Y{constructor(n,e){super(n),this.project=e,this.index=0}_next(n){let e;const i=this.index++;try{e=this.project(n,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(n){const e=this.innerSubscription;e&&e.unsubscribe();const i=new Ml(this),r=this.destination;r.add(i),this.innerSubscription=Ne(n,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:n}=this;(!n||n.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(n){this.destination.next(n)}}const O9=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function Ks(t){return n=>0===t?sC():n.lift(new XDe(t))}class XDe{constructor(n){if(this.total=n,this.total<0)throw new O9}call(n,e){return e.subscribe(new JDe(n,this.total))}}class JDe extends F{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){const e=this.total,i=++this.count;i<=e&&(this.destination.next(n),i===e&&(this.destination.complete(),this.unsubscribe()))}}function aC(...t){const n=t[t.length-1];return Ca(n)?(t.pop(),e=>oC(t,e,n)):e=>oC(t,e)}function us(t,n){return function(i){return i.lift(new KDe(t,n))}}class KDe{constructor(n,e){this.predicate=n,this.thisArg=e}call(n,e){return e.subscribe(new QDe(n,this.predicate,this.thisArg))}}class QDe extends F{constructor(n,e,i){super(n),this.predicate=e,this.thisArg=i,this.count=0}_next(n){let e;try{e=this.predicate.call(this.thisArg,n,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(n)}}function lC(t=null){return n=>n.lift(new ZDe(t))}class ZDe{constructor(n){this.defaultValue=n}call(n,e){return e.subscribe(new eTe(n,this.defaultValue))}}class eTe extends F{constructor(n,e){super(n),this.defaultValue=e,this.isEmpty=!0}_next(n){this.isEmpty=!1,this.destination.next(n)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function I9(t=iTe){return n=>n.lift(new tTe(t))}class tTe{constructor(n){this.errorFactory=n}call(n,e){return e.subscribe(new nTe(n,this.errorFactory))}}class nTe extends F{constructor(n,e){super(n),this.errorFactory=e,this.hasValue=!1}_next(n){this.hasValue=!0,this.destination.next(n)}_complete(){if(this.hasValue)return this.destination.complete();{let n;try{n=this.errorFactory()}catch(e){n=e}this.destination.error(n)}}}function iTe(){return new iC}function Ff(t,n){const e=arguments.length>=2;return i=>i.pipe(t?us((r,o)=>t(r,o,i)):Ft,Ks(1),e?lC(n):I9(()=>new iC))}function Pf(t,n){return et(t,n,1)}function zh(){}function xs(t,n,e){return function(r){return r.lift(new rTe(t,n,e))}}class rTe{constructor(n,e,i){this.nextOrObserver=n,this.error=e,this.complete=i}call(n,e){return e.subscribe(new oTe(n,this.nextOrObserver,this.error,this.complete))}}class oTe extends F{constructor(n,e,i,r){super(n),this._tapNext=zh,this._tapError=zh,this._tapComplete=zh,this._tapError=i||zh,this._tapComplete=r||zh,nt(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||zh,this._tapError=e.error||zh,this._tapComplete=e.complete||zh)}_next(n){try{this._tapNext.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.next(n)}_error(n){try{this._tapError.call(this._context,n)}catch(e){return void this.destination.error(e)}this.destination.error(n)}_complete(){try{this._tapComplete.call(this._context)}catch(n){return void this.destination.error(n)}return this.destination.complete()}}function Ll(t){return function(e){const i=new sTe(t),r=e.lift(i);return i.caught=r}}class sTe{constructor(n){this.selector=n}call(n,e){return e.subscribe(new aTe(n,this.selector,this.caught))}}class aTe extends Y{constructor(n,e,i){super(n),this.selector=e,this.caught=i}error(n){if(!this.isStopped){let e;try{e=this.selector(n,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new Ml(this);this.add(i);const r=Ne(e,i);r!==i&&this.add(r)}}}function N9(t,n){let e=!1;return arguments.length>=2&&(e=!0),function(r){return r.lift(new lTe(t,n,e))}}class lTe{constructor(n,e,i=!1){this.accumulator=n,this.seed=e,this.hasSeed=i}call(n,e){return e.subscribe(new cTe(n,this.accumulator,this.seed,this.hasSeed))}}class cTe extends F{constructor(n,e,i,r){super(n),this.accumulator=e,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(n){this.hasSeed=!0,this._seed=n}_next(n){if(this.hasSeed)return this._tryNext(n);this.seed=n,this.destination.next(n)}_tryNext(n){const e=this.index++;let i;try{i=this.accumulator(this.seed,n,e)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}}function XM(t){return function(e){return 0===t?sC():e.lift(new uTe(t))}}class uTe{constructor(n){if(this.total=n,this.total<0)throw new O9}call(n,e){return e.subscribe(new dTe(n,this.total))}}class dTe extends F{constructor(n,e){super(n),this.total=e,this.ring=new Array,this.count=0}_next(n){const e=this.ring,i=this.total,r=this.count++;e.length0){const i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(t?us((r,o)=>t(r,o,i)):Ft,XM(1),e?lC(n):I9(()=>new iC))}class fTe{constructor(n,e){this.predicate=n,this.inclusive=e}call(n,e){return e.subscribe(new pTe(n,this.predicate,this.inclusive))}}class pTe extends F{constructor(n,e,i){super(n),this.predicate=e,this.inclusive=i,this.index=0}_next(n){const e=this.destination;let i;try{i=this.predicate(n,this.index++)}catch(r){return void e.error(r)}this.nextOrComplete(n,i)}nextOrComplete(n,e){const i=this.destination;Boolean(e)?i.next(n):(this.inclusive&&i.next(n),i.complete())}}class gTe{constructor(n){this.value=n}call(n,e){return e.subscribe(new vTe(n,this.value))}}class vTe extends F{constructor(n,e){super(n),this.value=e}_next(n){this.destination.next(this.value)}}function JM(t){return n=>n.lift(new yTe(t))}class yTe{constructor(n){this.callback=n}call(n,e){return e.subscribe(new _Te(n,this.callback))}}class _Te extends F{constructor(n,e){super(n),this.add(new ce(e))}}const zi="primary",yy=Symbol("RouteTitle");class bTe{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){const e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function mv(t){return new bTe(t)}function xTe(t,n,e){const i=e.path.split("/");if(i.length>t.length||"full"===e.pathMatch&&(n.hasChildren()||i.lengthi[o]===r)}return t===n}function j9(t){return Array.prototype.concat.apply([],t)}function R9(t){return t.length>0?t[t.length-1]:null}function Oa(t,n){for(const e in t)t.hasOwnProperty(e)&&n(t[e],e)}function jf(t){return rA(t)?t:q1(t)?ro(Promise.resolve(t)):Rn(t)}const cC=!1,CTe={exact:function B9(t,n,e){if(!am(t.segments,n.segments)||!uC(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children)if(!t.children[i]||!B9(t.children[i],n.children[i],e))return!1;return!0},subset:V9},L9={exact:function STe(t,n){return Ld(t,n)},subset:function kTe(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>P9(t[e],n[e]))},ignored:()=>!0};function $9(t,n,e){return CTe[e.paths](t.root,n.root,e.matrixParams)&&L9[e.queryParams](t.queryParams,n.queryParams)&&!("exact"===e.fragment&&t.fragment!==n.fragment)}function V9(t,n,e){return H9(t,n,n.segments,e)}function H9(t,n,e,i){if(t.segments.length>e.length){const r=t.segments.slice(0,e.length);return!(!am(r,e)||n.hasChildren()||!uC(r,e,i))}if(t.segments.length===e.length){if(!am(t.segments,e)||!uC(t.segments,e,i))return!1;for(const r in n.children)if(!t.children[r]||!V9(t.children[r],n.children[r],i))return!1;return!0}{const r=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!!(am(t.segments,r)&&uC(t.segments,r,i)&&t.children[zi])&&H9(t.children[zi],n,o,i)}}function uC(t,n,e){return n.every((i,r)=>L9[e](t[r].parameters,i.parameters))}class Rf{constructor(n=new ar([],{}),e={},i=null){this.root=n,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=mv(this.queryParams)),this._queryParamMap}toString(){return ETe.serialize(this)}}class ar{constructor(n,e){this.segments=n,this.children=e,this.parent=null,Oa(e,(i,r)=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return dC(this)}}class _y{constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=mv(this.parameters)),this._parameterMap}toString(){return G9(this)}}function am(t,n){return t.length===n.length&&t.every((e,i)=>e.path===n[i].path)}let by=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return new KM},providedIn:"root"}),t})();class KM{parse(n){const e=new RTe(n);return new Rf(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){const e=`/${xy(n.root,!0)}`,i=function OTe(t){const n=Object.keys(t).map(e=>{const i=t[e];return Array.isArray(i)?i.map(r=>`${hC(e)}=${hC(r)}`).join("&"):`${hC(e)}=${hC(i)}`}).filter(e=>!!e);return n.length?`?${n.join("&")}`:""}(n.queryParams),r="string"==typeof n.fragment?`#${function ATe(t){return encodeURI(t)}(n.fragment)}`:"";return`${e}${i}${r}`}}const ETe=new KM;function dC(t){return t.segments.map(n=>G9(n)).join("/")}function xy(t,n){if(!t.hasChildren())return dC(t);if(n){const e=t.children[zi]?xy(t.children[zi],!1):"",i=[];return Oa(t.children,(r,o)=>{o!==zi&&i.push(`${o}:${xy(r,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}{const e=function TTe(t,n){let e=[];return Oa(t.children,(i,r)=>{r===zi&&(e=e.concat(n(i,r)))}),Oa(t.children,(i,r)=>{r!==zi&&(e=e.concat(n(i,r)))}),e}(t,(i,r)=>r===zi?[xy(t.children[zi],!1)]:[`${r}:${xy(i,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children[zi]?`${dC(t)}/${e[0]}`:`${dC(t)}/(${e.join("//")})`}}function U9(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function hC(t){return U9(t).replace(/%3B/gi,";")}function QM(t){return U9(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function fC(t){return decodeURIComponent(t)}function z9(t){return fC(t.replace(/\+/g,"%20"))}function G9(t){return`${QM(t.path)}${function MTe(t){return Object.keys(t).map(n=>`;${QM(n)}=${QM(t[n])}`).join("")}(t.parameters)}`}const ITe=/^[^\/()?;=#]+/;function pC(t){const n=t.match(ITe);return n?n[0]:""}const NTe=/^[^=?&#]+/,PTe=/^[^&#]+/;class RTe{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new ar([],{}):new ar([],this.parseChildren())}parseQueryParams(){const n={};if(this.consumeOptional("?"))do{this.parseQueryParam(n)}while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(i[zi]=new ar(n,e)),i}parseSegment(){const n=pC(this.remaining);if(""===n&&this.peekStartsWith(";"))throw new Nt(4009,cC);return this.capture(n),new _y(fC(n),this.parseMatrixParams())}parseMatrixParams(){const n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){const e=pC(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const r=pC(this.remaining);r&&(i=r,this.capture(i))}n[fC(e)]=fC(i)}parseQueryParam(n){const e=function FTe(t){const n=t.match(NTe);return n?n[0]:""}(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){const s=function jTe(t){const n=t.match(PTe);return n?n[0]:""}(this.remaining);s&&(i=s,this.capture(i))}const r=z9(e),o=z9(i);if(n.hasOwnProperty(r)){let s=n[r];Array.isArray(s)||(s=[s],n[r]=s),s.push(o)}else n[r]=o}parseParens(n){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const i=pC(this.remaining),r=this.remaining[i.length];if("/"!==r&&")"!==r&&";"!==r)throw new Nt(4010,cC);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=zi);const s=this.parseChildren();e[o]=1===Object.keys(s).length?s[zi]:new ar([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return!!this.peekStartsWith(n)&&(this.remaining=this.remaining.substring(n.length),!0)}capture(n){if(!this.consumeOptional(n))throw new Nt(4011,cC)}}function ZM(t){return t.segments.length>0?new ar([],{[zi]:t}):t}function mC(t){const n={};for(const i of Object.keys(t.children)){const o=mC(t.children[i]);(o.segments.length>0||o.hasChildren())&&(n[i]=o)}return function LTe(t){if(1===t.numberOfChildren&&t.children[zi]){const n=t.children[zi];return new ar(t.segments.concat(n.segments),n.children)}return t}(new ar(t.segments,n))}function lm(t){return t instanceof Rf}const e3=!1;function $Te(t,n,e,i,r){if(0===e.length)return gv(n.root,n.root,n.root,i,r);const o=function J9(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new X9(!0,0,t);let n=0,e=!1;const i=t.reduce((r,o,s)=>{if("object"==typeof o&&null!=o){if(o.outlets){const a={};return Oa(o.outlets,(l,c)=>{a[c]="string"==typeof l?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return"string"!=typeof o?[...r,o]:0===s?(o.split("/").forEach((a,l)=>{0==l&&"."===a||(0==l&&""===a?e=!0:".."===a?n++:""!=a&&r.push(a))}),r):[...r,o]},[]);return new X9(e,n,i)}(e);return o.toRoot()?gv(n.root,n.root,new ar([],{}),i,r):function s(l){const c=function VTe(t,n,e,i){if(t.isAbsolute)return new vv(n.root,!0,0);if(-1===i)return new vv(e,e===n.root,0);return function K9(t,n,e){let i=t,r=n,o=e;for(;o>r;){if(o-=r,i=i.parent,!i)throw new Nt(4005,e3&&"Invalid number of '../'");r=i.segments.length}return new vv(i,!1,r-o)}(e,i+(wy(t.commands[0])?0:1),t.numberOfDoubleDots)}(o,n,t.snapshot?._urlSegment,l),u=c.processChildren?yv(c.segmentGroup,c.index,o.commands):t3(c.segmentGroup,c.index,o.commands);return gv(n.root,c.segmentGroup,u,i,r)}(t.snapshot?._lastPathIndex)}function wy(t){return"object"==typeof t&&null!=t&&!t.outlets&&!t.segmentPath}function Cy(t){return"object"==typeof t&&null!=t&&t.outlets}function gv(t,n,e,i,r){let s,o={};i&&Oa(i,(l,c)=>{o[c]=Array.isArray(l)?l.map(u=>`${u}`):`${l}`}),s=t===n?e:Y9(t,n,e);const a=ZM(mC(s));return new Rf(a,o,r)}function Y9(t,n,e){const i={};return Oa(t.children,(r,o)=>{i[o]=r===n?e:Y9(r,n,e)}),new ar(t.segments,i)}class X9{constructor(n,e,i){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=i,n&&i.length>0&&wy(i[0]))throw new Nt(4003,e3&&"Root segment cannot have matrix parameters");const r=i.find(Cy);if(r&&r!==R9(i))throw new Nt(4004,e3&&"{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class vv{constructor(n,e,i){this.segmentGroup=n,this.processChildren=e,this.index=i}}function t3(t,n,e){if(t||(t=new ar([],{})),0===t.segments.length&&t.hasChildren())return yv(t,n,e);const i=function UTe(t,n,e){let i=0,r=n;const o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;const s=t.segments[r],a=e[i];if(Cy(a))break;const l=`${a}`,c=i0&&void 0===l)break;if(l&&c&&"object"==typeof c&&void 0===c.outlets){if(!Z9(l,c,s))return o;i+=2}else{if(!Z9(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,n,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndex{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=t3(t.children[s],n,o))}),Oa(t.children,(o,s)=>{void 0===i[s]&&(r[s]=o)}),new ar(t.segments,r)}}function n3(t,n,e){const i=t.segments.slice(0,n);let r=0;for(;r{"string"==typeof e&&(e=[e]),null!==e&&(n[i]=n3(new ar([],{}),0,e))}),n}function Q9(t){const n={};return Oa(t,(e,i)=>n[i]=`${e}`),n}function Z9(t,n,e){return t==e.path&&Ld(n,e.parameters)}const Sy="imperative";class $d{constructor(n,e){this.id=n,this.url=e}}class gC extends $d{constructor(n,e,i="imperative",r=null){super(n,e),this.type=0,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Gh extends $d{constructor(n,e,i){super(n,e),this.urlAfterRedirects=i,this.type=1}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class ky extends $d{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=2}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class vC extends $d{constructor(n,e,i,r){super(n,e),this.reason=i,this.code=r,this.type=16}}class yC extends $d{constructor(n,e,i,r){super(n,e),this.error=i,this.target=r,this.type=3}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class GTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=4}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class WTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=7}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class qTe extends $d{constructor(n,e,i,r,o){super(n,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=8}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class YTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=5}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class XTe extends $d{constructor(n,e,i,r){super(n,e),this.urlAfterRedirects=i,this.state=r,this.type=6}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class JTe{constructor(n){this.route=n,this.type=9}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class KTe{constructor(n){this.route=n,this.type=10}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class QTe{constructor(n){this.snapshot=n,this.type=11}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ZTe{constructor(n){this.snapshot=n,this.type=12}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class eEe{constructor(n){this.snapshot=n,this.type=13}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class tEe{constructor(n){this.snapshot=n,this.type=14}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class eV{constructor(n,e,i){this.routerEvent=n,this.position=e,this.anchor=i,this.type=15}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}let rEe=(()=>{class t{createUrlTree(e,i,r,o,s,a){return $Te(e||i.root,r,o,s,a)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),sEe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(n){return rEe.\u0275fac(n)},providedIn:"root"}),t})();class tV{constructor(n){this._root=n}get root(){return this._root.value}parent(n){const e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){const e=r3(n,this._root);return e?e.children.map(i=>i.value):[]}firstChild(n){const e=r3(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){const e=o3(n,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==n)}pathFromRoot(n){return o3(n,this._root).map(e=>e.value)}}function r3(t,n){if(t===n.value)return n;for(const e of n.children){const i=r3(t,e);if(i)return i}return null}function o3(t,n){if(t===n.value)return[n];for(const e of n.children){const i=o3(t,e);if(i.length)return i.unshift(n),i}return[]}class Wh{constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}}function _v(t){const n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}class nV extends tV{constructor(n,e){super(n),this.snapshot=e,s3(this,n)}toString(){return this.snapshot.toString()}}function iV(t,n){const e=function aEe(t,n){const s=new _C([],{},{},"",{},zi,n,null,t.root,-1,{});return new oV("",new Wh(s,[]))}(t,n),i=new Js([new _y("",{})]),r=new Js({}),o=new Js({}),s=new Js({}),a=new Js(""),l=new Pr(i,r,s,a,o,zi,n,e.root);return l.snapshot=e.root,new nV(new Wh(l,[]),e)}class Pr{constructor(n,e,i,r,o,s,a,l){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.title=this.data?.pipe(_n(c=>c[yy]))??Rn(void 0),this._futureSnapshot=l}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(_n(n=>mv(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(_n(n=>mv(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function rV(t,n="emptyOnly"){const e=t.pathFromRoot;let i=0;if("always"!==n)for(i=e.length-1;i>=1;){const r=e[i],o=e[i-1];if(r.routeConfig&&""===r.routeConfig.path)i--;else{if(o.component)break;i--}}return function lEe(t){return t.reduce((n,e)=>({params:{...n.params,...e.params},data:{...n.data,...e.data},resolve:{...e.data,...n.resolve,...e.routeConfig?.data,...e._resolvedData}}),{params:{},data:{},resolve:{}})}(e.slice(i))}class _C{get title(){return this.data?.[yy]}constructor(n,e,i,r,o,s,a,l,c,u,d){this.url=n,this.params=e,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._urlSegment=c,this._lastPathIndex=u,this._resolve=d}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=mv(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=mv(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(i=>i.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class oV extends tV{constructor(n,e){super(e),this.url=n,s3(this,e)}toString(){return sV(this._root)}}function s3(t,n){n.value._routerState=t,n.children.forEach(e=>s3(t,e))}function sV(t){const n=t.children.length>0?` { ${t.children.map(sV).join(", ")} } `:"";return`${t.value}${n}`}function a3(t){if(t.snapshot){const n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,Ld(n.queryParams,e.queryParams)||t.queryParams.next(e.queryParams),n.fragment!==e.fragment&&t.fragment.next(e.fragment),Ld(n.params,e.params)||t.params.next(e.params),function wTe(t,n){if(t.length!==n.length)return!1;for(let e=0;eLd(e.parameters,n[i].parameters))}(t.url,n.url);return e&&!(!t.parent!=!n.parent)&&(!t.parent||l3(t.parent,n.parent))}function Dy(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){const i=e.value;i._futureSnapshot=n.value;const r=function uEe(t,n,e){return n.children.map(i=>{for(const r of e.children)if(t.shouldReuseRoute(i.value,r.value.snapshot))return Dy(t,i,r);return Dy(t,i)})}(t,n,e);return new Wh(i,r)}{if(t.shouldAttach(n.value)){const o=t.retrieve(n.value);if(null!==o){const s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Dy(t,a)),s}}const i=function dEe(t){return new Pr(new Js(t.url),new Js(t.params),new Js(t.queryParams),new Js(t.fragment),new Js(t.data),t.outlet,t.component,t)}(n.value),r=n.children.map(o=>Dy(t,o));return new Wh(i,r)}}const c3="ngNavigationCancelingError";function aV(t,n){const{redirectTo:e,navigationBehaviorOptions:i}=lm(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,r=lV(!1,0,n);return r.url=e,r.navigationBehaviorOptions=i,r}function lV(t,n,e){const i=new Error("NavigationCancelingError: "+(t||""));return i[c3]=!0,i.cancellationCode=n,e&&(i.url=e),i}function cV(t){return uV(t)&&lm(t.url)}function uV(t){return t&&t[c3]}class hEe{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.injector=null,this.children=new Ty,this.attachRef=null}}let Ty=(()=>{class t{constructor(){this.contexts=new Map}onChildOutletCreated(e,i){const r=this.getOrCreateContext(e);r.outlet=i,this.contexts.set(e,r)}onChildOutletDestroyed(e){const i=this.getContext(e);i&&(i.outlet=null,i.attachRef=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let i=this.getContext(e);return i||(i=new hEe,this.contexts.set(e,i)),i}getContext(e){return this.contexts.get(e)||null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const bC=!1;let cm=(()=>{class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=zi,this.activateEvents=new it,this.deactivateEvents=new it,this.attachEvents=new it,this.detachEvents=new it,this.parentContexts=Fi(Ty),this.location=Fi(jl),this.changeDetector=Fi(Ns),this.environmentInjector=Fi($c)}ngOnChanges(e){if(e.name){const{firstChange:i,previousValue:r}=e.name;if(i)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Nt(4012,bC);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Nt(4012,bC);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Nt(4012,bC);this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,i){this.activated=e,this._activatedRoute=i,this.location.insert(e.hostView),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,i){if(this.isActivated)throw new Nt(4013,bC);this._activatedRoute=e;const r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new fEe(e,a,r.injector);if(i&&function pEe(t){return!!t.resolveComponentFactory}(i)){const c=i.resolveComponentFactory(s);this.activated=r.createComponent(c,r.length,l)}else this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:i??this.environmentInjector});this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Yn]}),t})();class fEe{constructor(n,e,i){this.route=n,this.childContexts=e,this.parent=i}get(n,e){return n===Pr?this.route:n===Ty?this.childContexts:this.parent.get(n,e)}}let u3=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ng-component"]],standalone:!0,features:[Is],decls:1,vars:0,template:function(e,i){1&e&&pe(0,"router-outlet")},dependencies:[cm],encapsulation:2}),t})();function dV(t,n){return t.providers&&!t._injector&&(t._injector=pw(t.providers,n,`Route: ${t.path}`)),t._injector??n}function h3(t){const n=t.children&&t.children.map(h3),e=n?{...t,children:n}:{...t};return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==zi&&(e.component=u3),e}function Gc(t){return t.outlet||zi}function hV(t,n){const e=t.filter(i=>Gc(i)===n);return e.push(...t.filter(i=>Gc(i)!==n)),e}function Ey(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){const e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}class _Ee{constructor(n,e,i,r){this.routeReuseStrategy=n,this.futureState=e,this.currState=i,this.forwardEvent=r}activate(n){const e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,n),a3(this.futureState.root),this.activateChildRoutes(e,i,n)}deactivateChildRoutes(n,e,i){const r=_v(e);n.children.forEach(o=>{const s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Oa(r,(o,s)=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(r===o)if(r.component){const s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,i);else o&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=_v(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);if(i&&i.outlet){const s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){const i=e.getContext(n.value.outlet),r=i&&n.value.component?i.children:e,o=_v(n);for(const s of Object.keys(o))this.deactivateRouteAndItsChildren(o[s],r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.resolver=null,i.route=null)}activateChildRoutes(n,e,i){const r=_v(e);n.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new tEe(o.value.snapshot))}),n.children.length&&this.forwardEvent(new ZTe(n.value.snapshot))}activateRoutes(n,e,i){const r=n.value,o=e?e.value:null;if(a3(r),r===o)if(r.component){const s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,i);else if(r.component){const s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),a3(a.route.value),this.activateChildRoutes(n,null,s.children)}else{const a=Ey(r.snapshot),l=a?.get(zg)??null;s.attachRef=null,s.route=r,s.resolver=l,s.injector=a,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}}class fV{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}}class xC{constructor(n,e){this.component=n,this.route=e}}function bEe(t,n,e){const i=t._root;return Ay(i,n?n._root:null,e,[i.value])}function bv(t,n){const e=Symbol(),i=n.get(t,e);return i===e?"function"!=typeof t||function wve(t){return null!==gx(t)}(t)?n.get(t):t:i}function Ay(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=_v(n);return t.children.forEach(s=>{(function wEe(t,n,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){const l=function CEe(t,n,e){if("function"==typeof e)return e(t,n);switch(e){case"pathParamsChange":return!am(t.url,n.url);case"pathParamsOrQueryParamsChange":return!am(t.url,n.url)||!Ld(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!l3(t,n)||!Ld(t.queryParams,n.queryParams);default:return!l3(t,n)}}(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new fV(i)):(o.data=s.data,o._resolvedData=s._resolvedData),Ay(t,n,o.component?a?a.children:null:e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new xC(a.outlet.component,s))}else s&&My(n,a,r),r.canActivateChecks.push(new fV(i)),Ay(t,null,o.component?a?a.children:null:e,i,r)})(s,o[s.value.outlet],e,i.concat([s.value]),r),delete o[s.value.outlet]}),Oa(o,(s,a)=>My(s,e.getContext(a),r)),r}function My(t,n,e){const i=_v(t),r=t.value;Oa(i,(o,s)=>{My(o,r.component?n?n.children.getContext(s):null:n,e)}),e.canDeactivateChecks.push(new xC(r.component&&n&&n.outlet&&n.outlet.isActivated?n.outlet.component:null,r))}function Oy(t){return"function"==typeof t}function f3(t){return t instanceof iC||"EmptyError"===t?.name}const wC=Symbol("INITIAL_VALUE");function xv(){return dc(t=>rC(t.map(n=>n.pipe(Ks(1),aC(wC)))).pipe(_n(n=>{for(const e of n)if(!0!==e){if(e===wC)return wC;if(!1===e||e instanceof Rf)return e}return!0}),us(n=>n!==wC),Ks(1)))}function pV(t){return function Gt(...t){return yn(t)}(xs(n=>{if(lm(n))throw aV(0,n)}),_n(n=>!0===n))}const p3={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function mV(t,n,e,i,r){const o=m3(t,n,e);return o.matched?function BEe(t,n,e,i){const r=n.canMatch;return r&&0!==r.length?Rn(r.map(s=>{const a=bv(s,t);return jf(function AEe(t){return t&&Oy(t.canMatch)}(a)?a.canMatch(n,e):t.runInContext(()=>a(n,e)))})).pipe(xv(),pV()):Rn(!0)}(i=dV(n,i),n,e).pipe(_n(s=>!0===s?o:{...p3})):Rn(o)}function m3(t,n,e){if(""===n.path)return"full"===n.pathMatch&&(t.hasChildren()||e.length>0)?{...p3}:{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};const r=(n.matcher||xTe)(e,t,n);if(!r)return{...p3};const o={};Oa(r.posParams,(a,l)=>{o[l]=a.path});const s=r.consumed.length>0?{...o,...r.consumed[r.consumed.length-1].parameters}:o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function CC(t,n,e,i){if(e.length>0&&function UEe(t,n,e){return e.some(i=>SC(t,n,i)&&Gc(i)!==zi)}(t,e,i)){const o=new ar(n,function HEe(t,n,e,i){const r={};r[zi]=i,i._sourceSegment=t,i._segmentIndexShift=n.length;for(const o of e)if(""===o.path&&Gc(o)!==zi){const s=new ar([],{});s._sourceSegment=t,s._segmentIndexShift=n.length,r[Gc(o)]=s}return r}(t,n,i,new ar(e,t.children)));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:[]}}if(0===e.length&&function zEe(t,n,e){return e.some(i=>SC(t,n,i))}(t,e,i)){const o=new ar(t.segments,function VEe(t,n,e,i,r){const o={};for(const s of i)if(SC(t,e,s)&&!r[Gc(s)]){const a=new ar([],{});a._sourceSegment=t,a._segmentIndexShift=n.length,o[Gc(s)]=a}return{...r,...o}}(t,n,e,i,t.children));return o._sourceSegment=t,o._segmentIndexShift=n.length,{segmentGroup:o,slicedSegments:e}}const r=new ar(t.segments,t.children);return r._sourceSegment=t,r._segmentIndexShift=n.length,{segmentGroup:r,slicedSegments:e}}function SC(t,n,e){return(!(t.hasChildren()||n.length>0)||"full"!==e.pathMatch)&&""===e.path}function gV(t,n,e,i){return!!(Gc(t)===i||i!==zi&&SC(n,e,t))&&("**"===t.path||m3(n,t,e).matched)}function vV(t,n,e){return 0===n.length&&!t.children[e]}const kC=!1;class DC{constructor(n){this.segmentGroup=n||null}}class yV{constructor(n){this.urlTree=n}}function Iy(t){return sm(new DC(t))}function _V(t){return sm(new yV(t))}function GEe(t){return sm(new Nt(4e3,kC&&`Only absolute redirects can have named outlets. redirectTo: '${t}'`))}class YEe{constructor(n,e,i,r,o){this.injector=n,this.configLoader=e,this.urlSerializer=i,this.urlTree=r,this.config=o,this.allowRedirects=!0}apply(){const n=CC(this.urlTree.root,[],[],this.config).segmentGroup,e=new ar(n.segments,n.children);return this.expandSegmentGroup(this.injector,this.config,e,zi).pipe(_n(o=>this.createUrlTree(mC(o),this.urlTree.queryParams,this.urlTree.fragment))).pipe(Ll(o=>{if(o instanceof yV)return this.allowRedirects=!1,this.match(o.urlTree);throw o instanceof DC?this.noMatchError(o):o}))}match(n){return this.expandSegmentGroup(this.injector,this.config,n.root,zi).pipe(_n(r=>this.createUrlTree(mC(r),n.queryParams,n.fragment))).pipe(Ll(r=>{throw r instanceof DC?this.noMatchError(r):r}))}noMatchError(n){return new Nt(4002,kC&&`Cannot match any routes. URL Segment: '${n.segmentGroup}'`)}createUrlTree(n,e,i){const r=ZM(n);return new Rf(r,e,i)}expandSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.expandChildren(n,e,i).pipe(_n(o=>new ar([],o))):this.expandSegment(n,i,e,i.segments,r,!0)}expandChildren(n,e,i){const r=[];for(const o of Object.keys(i.children))"primary"===o?r.unshift(o):r.push(o);return ro(r).pipe(Pf(o=>{const s=i.children[o],a=hV(e,o);return this.expandSegmentGroup(n,a,s,o).pipe(_n(l=>({segment:l,outlet:o})))}),N9((o,s)=>(o[s.outlet]=s.segment,o),{}),F9())}expandSegment(n,e,i,r,o,s){return ro(i).pipe(Pf(a=>this.expandSegmentAgainstRoute(n,e,i,a,r,o,s).pipe(Ll(c=>{if(c instanceof DC)return Rn(null);throw c}))),Ff(a=>!!a),Ll((a,l)=>{if(f3(a))return vV(e,r,o)?Rn(new ar([],{})):Iy(e);throw a}))}expandSegmentAgainstRoute(n,e,i,r,o,s,a){return gV(r,e,o,s)?void 0===r.redirectTo?this.matchSegmentAgainstRoute(n,e,r,o,s):a&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s):Iy(e):Iy(e)}expandSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){return"**"===r.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(n,i,r,s):this.expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(n,e,i,r){const o=this.applyRedirectCommands([],i.redirectTo,{});return i.redirectTo.startsWith("/")?_V(o):this.lineralizeSegments(i,o).pipe(et(s=>{const a=new ar(s,{});return this.expandSegment(n,a,e,s,r,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(n,e,i,r,o,s){const{matched:a,consumedSegments:l,remainingSegments:c,positionalParamSegments:u}=m3(e,r,o);if(!a)return Iy(e);const d=this.applyRedirectCommands(l,r.redirectTo,u);return r.redirectTo.startsWith("/")?_V(d):this.lineralizeSegments(r,d).pipe(et(h=>this.expandSegment(n,e,i,h.concat(c),s,!1)))}matchSegmentAgainstRoute(n,e,i,r,o){return"**"===i.path?(n=dV(i,n),i.loadChildren?(i._loadedRoutes?Rn({routes:i._loadedRoutes,injector:i._loadedInjector}):this.configLoader.loadChildren(n,i)).pipe(_n(a=>(i._loadedRoutes=a.routes,i._loadedInjector=a.injector,new ar(r,{})))):Rn(new ar(r,{}))):mV(e,i,r,n).pipe(dc(({matched:s,consumedSegments:a,remainingSegments:l})=>s?this.getChildConfig(n=i._injector??n,i,r).pipe(et(u=>{const d=u.injector??n,h=u.routes,{segmentGroup:f,slicedSegments:p}=CC(e,a,l,h),m=new ar(f.segments,f.children);if(0===p.length&&m.hasChildren())return this.expandChildren(d,h,m).pipe(_n(b=>new ar(a,b)));if(0===h.length&&0===p.length)return Rn(new ar(a,{}));const g=Gc(i)===o;return this.expandSegment(d,m,h,p,g?zi:o,!0).pipe(_n(y=>new ar(a.concat(y.segments),y.children)))})):Iy(e)))}getChildConfig(n,e,i){return e.children?Rn({routes:e.children,injector:n}):e.loadChildren?void 0!==e._loadedRoutes?Rn({routes:e._loadedRoutes,injector:e._loadedInjector}):function $Ee(t,n,e,i){const r=n.canLoad;return void 0===r||0===r.length?Rn(!0):Rn(r.map(s=>{const a=bv(s,t);return jf(function kEe(t){return t&&Oy(t.canLoad)}(a)?a.canLoad(n,e):t.runInContext(()=>a(n,e)))})).pipe(xv(),pV())}(n,e,i).pipe(et(r=>r?this.configLoader.loadChildren(n,e).pipe(xs(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):function WEe(t){return sm(lV(kC&&`Cannot load children because the guard of the route "path: '${t.path}'" returned false`,3))}(e))):Rn({routes:[],injector:n})}lineralizeSegments(n,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),0===r.numberOfChildren)return Rn(i);if(r.numberOfChildren>1||!r.children[zi])return GEe(n.redirectTo);r=r.children[zi]}}applyRedirectCommands(n,e,i){return this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),n,i)}applyRedirectCreateUrlTree(n,e,i,r){const o=this.createSegmentGroup(n,e.root,i,r);return new Rf(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){const i={};return Oa(n,(r,o)=>{if("string"==typeof r&&r.startsWith(":")){const a=r.substring(1);i[o]=e[a]}else i[o]=r}),i}createSegmentGroup(n,e,i,r){const o=this.createSegments(n,e.segments,i,r);let s={};return Oa(e.children,(a,l)=>{s[l]=this.createSegmentGroup(n,a,i,r)}),new ar(o,s)}createSegments(n,e,i,r){return e.map(o=>o.path.startsWith(":")?this.findPosParam(n,o,r):this.findOrReturn(o,i))}findPosParam(n,e,i){const r=i[e.path.substring(1)];if(!r)throw new Nt(4001,kC&&`Cannot redirect to '${n}'. Cannot find '${e.path}'.`);return r}findOrReturn(n,e){let i=0;for(const r of e){if(r.path===n.path)return e.splice(i),r;i++}return n}}class JEe{}class ZEe{constructor(n,e,i,r,o,s,a){this.injector=n,this.rootComponentType=e,this.config=i,this.urlTree=r,this.url=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a}recognize(){const n=CC(this.urlTree.root,[],[],this.config.filter(e=>void 0===e.redirectTo)).segmentGroup;return this.processSegmentGroup(this.injector,this.config,n,zi).pipe(_n(e=>{if(null===e)return null;const i=new _C([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},zi,this.rootComponentType,null,this.urlTree.root,-1,{}),r=new Wh(i,e),o=new oV(this.url,r);return this.inheritParamsAndData(o._root),o}))}inheritParamsAndData(n){const e=n.value,i=rV(e,this.paramsInheritanceStrategy);e.params=Object.freeze(i.params),e.data=Object.freeze(i.data),n.children.forEach(r=>this.inheritParamsAndData(r))}processSegmentGroup(n,e,i,r){return 0===i.segments.length&&i.hasChildren()?this.processChildren(n,e,i):this.processSegment(n,e,i,i.segments,r)}processChildren(n,e,i){return ro(Object.keys(i.children)).pipe(Pf(r=>{const o=i.children[r],s=hV(e,r);return this.processSegmentGroup(n,s,o,r)}),N9((r,o)=>r&&o?(r.push(...o),r):null),function hTe(t,n=!1){return e=>e.lift(new fTe(t,n))}(r=>null!==r),lC(null),F9(),_n(r=>{if(null===r)return null;const o=xV(r);return function eAe(t){t.sort((n,e)=>n.value.outlet===zi?-1:e.value.outlet===zi?1:n.value.outlet.localeCompare(e.value.outlet))}(o),o}))}processSegment(n,e,i,r,o){return ro(e).pipe(Pf(s=>this.processSegmentAgainstRoute(s._injector??n,s,i,r,o)),Ff(s=>!!s),Ll(s=>{if(f3(s))return vV(i,r,o)?Rn([]):Rn(null);throw s}))}processSegmentAgainstRoute(n,e,i,r,o){if(e.redirectTo||!gV(e,i,r,o))return Rn(null);let s;if("**"===e.path){const a=r.length>0?R9(r).parameters:{},l=CV(i)+r.length;s=Rn({snapshot:new _C(r,a,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,SV(e),Gc(e),e.component??e._loadedComponent??null,e,wV(i),l,kV(e)),consumedSegments:[],remainingSegments:[]})}else s=mV(i,e,r,n).pipe(_n(({matched:a,consumedSegments:l,remainingSegments:c,parameters:u})=>{if(!a)return null;const d=CV(i)+l.length;return{snapshot:new _C(l,u,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,SV(e),Gc(e),e.component??e._loadedComponent??null,e,wV(i),d,kV(e)),consumedSegments:l,remainingSegments:c}}));return s.pipe(dc(a=>{if(null===a)return Rn(null);const{snapshot:l,consumedSegments:c,remainingSegments:u}=a;n=e._injector??n;const d=e._loadedInjector??n,h=function tAe(t){return t.children?t.children:t.loadChildren?t._loadedRoutes:[]}(e),{segmentGroup:f,slicedSegments:p}=CC(i,c,u,h.filter(g=>void 0===g.redirectTo));if(0===p.length&&f.hasChildren())return this.processChildren(d,h,f).pipe(_n(g=>null===g?null:[new Wh(l,g)]));if(0===h.length&&0===p.length)return Rn([new Wh(l,[])]);const m=Gc(e)===o;return this.processSegment(d,h,f,p,m?zi:o).pipe(_n(g=>null===g?null:[new Wh(l,g)]))}))}}function nAe(t){const n=t.value.routeConfig;return n&&""===n.path&&void 0===n.redirectTo}function xV(t){const n=[],e=new Set;for(const i of t){if(!nAe(i)){n.push(i);continue}const r=n.find(o=>i.value.routeConfig===o.value.routeConfig);void 0!==r?(r.children.push(...i.children),e.add(r)):n.push(i)}for(const i of e){const r=xV(i.children);n.push(new Wh(i.value,r))}return n.filter(i=>!e.has(i))}function wV(t){let n=t;for(;n._sourceSegment;)n=n._sourceSegment;return n}function CV(t){let n=t,e=n._segmentIndexShift??0;for(;n._sourceSegment;)n=n._sourceSegment,e+=n._segmentIndexShift??0;return e-1}function SV(t){return t.data||{}}function kV(t){return t.resolve||{}}function DV(t){return"string"==typeof t.title||null===t.title}function g3(t){return dc(n=>{const e=t(n);return e?ro(e).pipe(_n(()=>n)):Rn(n)})}const wv=new Vn("ROUTES");let v3=(()=>{class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=Fi(hB)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return Rn(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);const i=jf(e.loadComponent()).pipe(_n(EV),xs(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),JM(()=>{this.componentLoaders.delete(e)})),r=new fe(i,()=>new dr).pipe(Ut());return this.componentLoaders.set(e,r),r}loadChildren(e,i){if(this.childrenLoaders.get(i))return this.childrenLoaders.get(i);if(i._loadedRoutes)return Rn({routes:i._loadedRoutes,injector:i._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(i);const o=this.loadModuleFactoryOrRoutes(i.loadChildren).pipe(_n(a=>{this.onLoadEndListener&&this.onLoadEndListener(i);let l,c,u=!1;Array.isArray(a)?c=a:(l=a.create(e).injector,c=j9(l.get(wv,[],Ci.Self|Ci.Optional)));return{routes:c.map(h3),injector:l}}),JM(()=>{this.childrenLoaders.delete(i)})),s=new fe(o,()=>new dr).pipe(Ut());return this.childrenLoaders.set(i,s),s}loadModuleFactoryOrRoutes(e){return jf(e()).pipe(_n(EV),et(i=>i instanceof k$||Array.isArray(i)?Rn(i):ro(this.compiler.compileModuleAsync(i))))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function EV(t){return function uAe(t){return t&&"object"==typeof t&&"default"in t}(t)?t.default:t}let EC=(()=>{class t{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.lastSuccessfulNavigation=null,this.events=new dr,this.configLoader=Fi(v3),this.environmentInjector=Fi($c),this.urlSerializer=Fi(by),this.rootContexts=Fi(Ty),this.navigationId=0,this.afterPreactivation=()=>Rn(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new KTe(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new JTe(r))}complete(){this.transitions?.complete()}handleNavigationRequest(e){const i=++this.navigationId;this.transitions?.next({...this.transitions.value,...e,id:i})}setupNavigations(e){return this.transitions=new Js({id:0,targetPageId:0,currentUrlTree:e.currentUrlTree,currentRawUrl:e.currentUrlTree,extractedUrl:e.urlHandlingStrategy.extract(e.currentUrlTree),urlAfterRedirects:e.urlHandlingStrategy.extract(e.currentUrlTree),rawUrl:e.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Sy,restoredState:null,currentSnapshot:e.routerState.snapshot,targetSnapshot:null,currentRouterState:e.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(us(i=>0!==i.id),_n(i=>({...i,extractedUrl:e.urlHandlingStrategy.extract(i.rawUrl)})),dc(i=>{let r=!1,o=!1;return Rn(i).pipe(xs(s=>{this.currentNavigation={id:s.id,initialUrl:s.rawUrl,extractedUrl:s.extractedUrl,trigger:s.source,extras:s.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null}}),dc(s=>{const a=e.browserUrlTree.toString(),l=!e.navigated||s.extractedUrl.toString()!==a||a!==e.currentUrlTree.toString();if(!l&&"reload"!==(s.extras.onSameUrlNavigation??e.onSameUrlNavigation)){const u="";return this.events.next(new vC(s.id,e.serializeUrl(i.rawUrl),u,0)),e.rawUrlTree=s.rawUrl,s.resolve(null),Uh}if(e.urlHandlingStrategy.shouldProcessUrl(s.rawUrl))return AV(s.source)&&(e.browserUrlTree=s.extractedUrl),Rn(s).pipe(dc(u=>{const d=this.transitions?.getValue();return this.events.next(new gC(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),d!==this.transitions?.getValue()?Uh:Promise.resolve(u)}),function XEe(t,n,e,i){return dc(r=>function qEe(t,n,e,i,r){return new YEe(t,n,e,i,r).apply()}(t,n,e,r.extractedUrl,i).pipe(_n(o=>({...r,urlAfterRedirects:o}))))}(this.environmentInjector,this.configLoader,this.urlSerializer,e.config),xs(u=>{this.currentNavigation={...this.currentNavigation,finalUrl:u.urlAfterRedirects},i.urlAfterRedirects=u.urlAfterRedirects}),function rAe(t,n,e,i,r){return et(o=>function QEe(t,n,e,i,r,o,s="emptyOnly"){return new ZEe(t,n,e,i,r,s,o).recognize().pipe(dc(a=>null===a?function KEe(t){return new en(n=>n.error(t))}(new JEe):Rn(a)))}(t,n,e,o.urlAfterRedirects,i.serialize(o.urlAfterRedirects),i,r).pipe(_n(s=>({...o,targetSnapshot:s}))))}(this.environmentInjector,this.rootComponentType,e.config,this.urlSerializer,e.paramsInheritanceStrategy),xs(u=>{if(i.targetSnapshot=u.targetSnapshot,"eager"===e.urlUpdateStrategy){if(!u.extras.skipLocationChange){const h=e.urlHandlingStrategy.merge(u.urlAfterRedirects,u.rawUrl);e.setBrowserUrl(h,u)}e.browserUrlTree=u.urlAfterRedirects}const d=new GTe(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}));if(l&&e.urlHandlingStrategy.shouldProcessUrl(e.rawUrlTree)){const{id:u,extractedUrl:d,source:h,restoredState:f,extras:p}=s,m=new gC(u,this.urlSerializer.serialize(d),h,f);this.events.next(m);const g=iV(d,this.rootComponentType).snapshot;return Rn(i={...s,targetSnapshot:g,urlAfterRedirects:d,extras:{...p,skipLocationChange:!1,replaceUrl:!1}})}{const u="";return this.events.next(new vC(s.id,e.serializeUrl(i.extractedUrl),u,1)),e.rawUrlTree=s.rawUrl,s.resolve(null),Uh}}),xs(s=>{const a=new WTe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),_n(s=>i={...s,guards:bEe(s.targetSnapshot,s.currentSnapshot,this.rootContexts)}),function OEe(t,n){return et(e=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return 0===s.length&&0===o.length?Rn({...e,guardsResult:!0}):function IEe(t,n,e,i){return ro(t).pipe(et(r=>function LEe(t,n,e,i,r){const o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;return o&&0!==o.length?Rn(o.map(a=>{const l=Ey(n)??r,c=bv(a,l);return jf(function EEe(t){return t&&Oy(t.canDeactivate)}(c)?c.canDeactivate(t,n,e,i):l.runInContext(()=>c(t,n,e,i))).pipe(Ff())})).pipe(xv()):Rn(!0)}(r.component,r.route,e,n,i)),Ff(r=>!0!==r,!0))}(s,i,r,t).pipe(et(a=>a&&function SEe(t){return"boolean"==typeof t}(a)?function NEe(t,n,e,i){return ro(n).pipe(Pf(r=>oC(function PEe(t,n){return null!==t&&n&&n(new QTe(t)),Rn(!0)}(r.route.parent,i),function FEe(t,n){return null!==t&&n&&n(new eEe(t)),Rn(!0)}(r.route,i),function REe(t,n,e){const i=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>function xEe(t){const n=t.routeConfig?t.routeConfig.canActivateChild:null;return n&&0!==n.length?{node:t,guards:n}:null}(s)).filter(s=>null!==s).map(s=>M9(()=>Rn(s.guards.map(l=>{const c=Ey(s.node)??e,u=bv(l,c);return jf(function TEe(t){return t&&Oy(t.canActivateChild)}(u)?u.canActivateChild(i,t):c.runInContext(()=>u(i,t))).pipe(Ff())})).pipe(xv())));return Rn(o).pipe(xv())}(t,r.path,e),function jEe(t,n,e){const i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||0===i.length)return Rn(!0);const r=i.map(o=>M9(()=>{const s=Ey(n)??e,a=bv(o,s);return jf(function DEe(t){return t&&Oy(t.canActivate)}(a)?a.canActivate(n,t):s.runInContext(()=>a(n,t))).pipe(Ff())}));return Rn(r).pipe(xv())}(t,r.route,e))),Ff(r=>!0!==r,!0))}(i,o,t,n):Rn(a)),_n(a=>({...e,guardsResult:a})))})}(this.environmentInjector,s=>this.events.next(s)),xs(s=>{if(i.guardsResult=s.guardsResult,lm(s.guardsResult))throw aV(0,s.guardsResult);const a=new qTe(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot,!!s.guardsResult);this.events.next(a)}),us(s=>!!s.guardsResult||(e.restoreHistory(s),this.cancelNavigationTransition(s,"",3),!1)),g3(s=>{if(s.guards.canActivateChecks.length)return Rn(s).pipe(xs(a=>{const l=new YTe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}),dc(a=>{let l=!1;return Rn(a).pipe(function oAe(t,n){return et(e=>{const{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return Rn(e);let o=0;return ro(r).pipe(Pf(s=>function sAe(t,n,e,i){const r=t.routeConfig,o=t._resolve;return void 0!==r?.title&&!DV(r)&&(o[yy]=r.title),function aAe(t,n,e,i){const r=function lAe(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}(t);if(0===r.length)return Rn({});const o={};return ro(r).pipe(et(s=>function cAe(t,n,e,i){const r=Ey(n)??i,o=bv(t,r);return jf(o.resolve?o.resolve(n,e):r.runInContext(()=>o(n,e)))}(t[s],n,e,i).pipe(Ff(),xs(a=>{o[s]=a}))),XM(1),function mTe(t){return n=>n.lift(new gTe(t))}(o),Ll(s=>f3(s)?Uh:sm(s)))}(o,t,n,i).pipe(_n(s=>(t._resolvedData=s,t.data=rV(t,e).resolve,r&&DV(r)&&(t.data[yy]=r.title),null)))}(s.route,i,t,n)),xs(()=>o++),XM(1),et(s=>o===r.length?Rn(e):Uh))})}(e.paramsInheritanceStrategy,this.environmentInjector),xs({next:()=>l=!0,complete:()=>{l||(e.restoreHistory(a),this.cancelNavigationTransition(a,"",2))}}))}),xs(a=>{const l=new XTe(a.id,this.urlSerializer.serialize(a.extractedUrl),this.urlSerializer.serialize(a.urlAfterRedirects),a.targetSnapshot);this.events.next(l)}))}),g3(s=>{const a=l=>{const c=[];l.routeConfig?.loadComponent&&!l.routeConfig._loadedComponent&&c.push(this.configLoader.loadComponent(l.routeConfig).pipe(xs(u=>{l.component=u}),_n(()=>{})));for(const u of l.children)c.push(...a(u));return c};return rC(a(s.targetSnapshot.root)).pipe(lC(),Ks(1))}),g3(()=>this.afterPreactivation()),_n(s=>{const a=function cEe(t,n,e){const i=Dy(t,n._root,e?e._root:void 0);return new nV(i,n)}(e.routeReuseStrategy,s.targetSnapshot,s.currentRouterState);return i={...s,targetRouterState:a}}),xs(s=>{e.currentUrlTree=s.urlAfterRedirects,e.rawUrlTree=e.urlHandlingStrategy.merge(s.urlAfterRedirects,s.rawUrl),e.routerState=s.targetRouterState,"deferred"===e.urlUpdateStrategy&&(s.extras.skipLocationChange||e.setBrowserUrl(e.rawUrlTree,s),e.browserUrlTree=s.urlAfterRedirects)}),((t,n,e)=>_n(i=>(new _Ee(n,i.targetRouterState,i.currentRouterState,e).activate(t),i)))(this.rootContexts,e.routeReuseStrategy,s=>this.events.next(s)),Ks(1),xs({next:s=>{r=!0,this.lastSuccessfulNavigation=this.currentNavigation,e.navigated=!0,this.events.next(new Gh(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(e.currentUrlTree))),e.titleStrategy?.updateTitle(s.targetRouterState.snapshot),s.resolve(!0)},complete:()=>{r=!0}}),JM(()=>{r||o||this.cancelNavigationTransition(i,"",1),this.currentNavigation?.id===i.id&&(this.currentNavigation=null)}),Ll(s=>{if(o=!0,uV(s)){cV(s)||(e.navigated=!0,e.restoreHistory(i,!0));const a=new ky(i.id,this.urlSerializer.serialize(i.extractedUrl),s.message,s.cancellationCode);if(this.events.next(a),cV(s)){const l=e.urlHandlingStrategy.merge(s.url,e.rawUrlTree),c={skipLocationChange:i.extras.skipLocationChange,replaceUrl:"eager"===e.urlUpdateStrategy||AV(i.source)};e.scheduleNavigation(l,Sy,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}else i.resolve(!1)}else{e.restoreHistory(i,!0);const a=new yC(i.id,this.urlSerializer.serialize(i.extractedUrl),s,i.targetSnapshot??void 0);this.events.next(a);try{i.resolve(e.errorHandler(s))}catch(l){i.reject(l)}}return Uh}))}))}cancelNavigationTransition(e,i,r){const o=new ky(e.id,this.urlSerializer.serialize(e.extractedUrl),i,r);this.events.next(o),e.resolve(!1)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function AV(t){return t!==Sy}let MV=(()=>{class t{buildTitle(e){let i,r=e.root;for(;void 0!==r;)i=this.getResolvedTitleForRoute(r)??i,r=r.children.find(o=>o.outlet===zi);return i}getResolvedTitleForRoute(e){return e.data[yy]}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(dAe)},providedIn:"root"}),t})(),dAe=(()=>{class t extends MV{constructor(e){super(),this.title=e}updateTitle(e){const i=this.buildTitle(e);void 0!==i&&this.title.setTitle(i)}}return t.\u0275fac=function(e){return new(e||t)(gt(L7))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),hAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(pAe)},providedIn:"root"}),t})();class fAe{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}}let pAe=(()=>{class t extends fAe{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const AC=new Vn("",{providedIn:"root",factory:()=>({})});let gAe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return Fi(vAe)},providedIn:"root"}),t})(),vAe=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,i){return e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function yAe(t){throw t}function _Ae(t,n,e){return n.parse("/")}const bAe={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},xAe={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let _r=(()=>{class t{get navigationId(){return this.navigationTransitions.navigationId}get browserPageId(){if("computed"===this.canceledNavigationResolution)return this.location.getState()?.\u0275routerPageId}get events(){return this.navigationTransitions.events}constructor(){this.disposed=!1,this.currentPageId=0,this.console=Fi(Rwe),this.isNgZoneEnabled=!1,this.options=Fi(AC,{optional:!0})||{},this.errorHandler=this.options.errorHandler||yAe,this.malformedUriErrorHandler=this.options.malformedUriErrorHandler||_Ae,this.navigated=!1,this.lastSuccessfulId=-1,this.urlHandlingStrategy=Fi(gAe),this.routeReuseStrategy=Fi(hAe),this.urlCreationStrategy=Fi(sEe),this.titleStrategy=Fi(MV),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.config=j9(Fi(wv,{optional:!0})??[]),this.navigationTransitions=Fi(EC),this.urlSerializer=Fi(by),this.location=Fi(XA),this.isNgZoneEnabled=Fi(nr)instanceof nr&&nr.isInAngularZone(),this.resetConfig(this.config),this.currentUrlTree=new Rf,this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.routerState=iV(this.currentUrlTree,null),this.navigationTransitions.setupNavigations(this).subscribe(e=>{this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId??0},e=>{this.console.warn(`Unhandled Navigation Error: ${e}`)})}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){if(this.setUpLocationChangeListener(),!this.navigationTransitions.hasRequestedNavigation){const e=this.location.getState();this.navigateToSyncWithBrowser(this.location.path(!0),Sy,e)}}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const i="popstate"===e.type?"popstate":"hashchange";"popstate"===i&&setTimeout(()=>{this.navigateToSyncWithBrowser(e.url,i,e.state)},0)}))}navigateToSyncWithBrowser(e,i,r){const o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){const l={...r};delete l.navigationId,delete l.\u0275routerPageId,0!==Object.keys(l).length&&(o.state=l)}const a=this.parseUrl(e);this.scheduleNavigation(a,i,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}resetConfig(e){this.config=e.map(h3),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0),this.disposed=!0}createUrlTree(e,i={}){const{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=i,c=l?this.currentUrlTree.fragment:s;let u=null;switch(a){case"merge":u={...this.currentUrlTree.queryParams,...o};break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=o||null}return null!==u&&(u=this.removeEmptyProps(u)),this.urlCreationStrategy.createUrlTree(r,this.routerState,this.currentUrlTree,e,u,c??null)}navigateByUrl(e,i={skipLocationChange:!1}){const r=lm(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,Sy,null,i)}navigate(e,i={skipLocationChange:!1}){return function wAe(t){for(let n=0;n{const o=e[r];return null!=o&&(i[r]=o),i},{})}scheduleNavigation(e,i,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c,u;return s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((d,h)=>{a=d,l=h}),u="computed"===this.canceledNavigationResolution?r&&r.\u0275routerPageId?r.\u0275routerPageId:(this.browserPageId??0)+1:0,this.navigationTransitions.handleNavigationRequest({targetPageId:u,source:i,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(d=>Promise.reject(d))}setBrowserUrl(e,i){const r=this.urlSerializer.serialize(e);if(this.location.isCurrentPathEqualTo(r)||i.extras.replaceUrl){const s={...i.extras.state,...this.generateNgRouterState(i.id,this.browserPageId)};this.location.replaceState(r,"",s)}else{const o={...i.extras.state,...this.generateNgRouterState(i.id,i.targetPageId)};this.location.go(r,"",o)}}restoreHistory(e,i=!1){if("computed"===this.canceledNavigationResolution){const o=this.currentPageId-(this.browserPageId??this.currentPageId);0!==o?this.location.historyGo(o):this.currentUrlTree===this.getCurrentNavigation()?.finalUrl&&0===o&&(this.resetState(e),this.browserUrlTree=e.currentUrlTree,this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(i&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=e.currentRouterState,this.currentUrlTree=e.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,i){return"computed"===this.canceledNavigationResolution?{navigationId:e,\u0275routerPageId:i}:{navigationId:e}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Ou=(()=>{class t{constructor(e,i,r,o,s,a){this.router=e,this.route=i,this.tabIndexAttribute=r,this.renderer=o,this.el=s,this.locationStrategy=a,this._preserveFragment=!1,this._skipLocationChange=!1,this._replaceUrl=!1,this.href=null,this.commands=null,this.onChanges=new dr;const l=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement="a"===l||"area"===l,this.isAnchorElement?this.subscription=e.events.subscribe(c=>{c instanceof Gh&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}set preserveFragment(e){this._preserveFragment=fv(e)}get preserveFragment(){return this._preserveFragment}set skipLocationChange(e){this._skipLocationChange=fv(e)}get skipLocationChange(){return this._skipLocationChange}set replaceUrl(e){this._replaceUrl=fv(e)}get replaceUrl(){return this._replaceUrl}setTabIndexIfNotOnNativeEl(e){null!=this.tabIndexAttribute||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(e){null!=e?(this.commands=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(e,i,r,o,s){return!!(null===this.urlTree||this.isAnchorElement&&(0!==e||i||r||o||s||"string"==typeof this.target&&"_self"!=this.target))||(this.router.navigateByUrl(this.urlTree,{skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state}),!this.isAnchorElement)}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){this.href=null!==this.urlTree&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(this.urlTree)):null;const e=null===this.href?null:function e8(t,n,e){return function K1e(t,n){return"src"===n&&("embed"===t||"frame"===t||"iframe"===t||"media"===t||"script"===t)||"href"===n&&("base"===t||"link"===t)?Z5:$1}(n,e)(t)}(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",e)}applyAttributeValue(e,i){const r=this.renderer,o=this.el.nativeElement;null!==i?r.setAttribute(o,e,i):r.removeAttribute(o,e)}get urlTree(){return null===this.commands?null:this.router.createUrlTree(this.commands,{relativeTo:void 0!==this.relativeTo?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}}return t.\u0275fac=function(e){return new(e||t)(de(_r),de(Pr),Sf("tabindex"),de(ca),de(Si),de(tm))},t.\u0275dir=sn({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(o){return i.onClick(o.button,o.ctrlKey,o.shiftKey,o.altKey,o.metaKey)}),2&e&&ut("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",relativeTo:"relativeTo",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",routerLink:"routerLink"},standalone:!0,features:[Yn]}),t})(),Ny=(()=>{class t{get isActive(){return this._isActive}constructor(e,i,r,o,s){this.router=e,this.element=i,this.renderer=r,this.cdr=o,this.link=s,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new it,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof Gh&&this.update()})}ngAfterContentInit(){Rn(this.links.changes,Rn(null)).pipe(M()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();const e=[...this.links.toArray(),this.link].filter(i=>!!i).map(i=>i.onChanges);this.linkInputChangesSubscription=ro(e).pipe(M()).subscribe(i=>{this._isActive!==this.isLinkActive(this.router)(i)&&this.update()})}set routerLinkActive(e){const i=Array.isArray(e)?e:e.split(" ");this.classes=i.filter(r=>!!r)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||Promise.resolve().then(()=>{const e=this.hasActiveLinks();this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.classes.forEach(i=>{e?this.renderer.addClass(this.element.nativeElement,i):this.renderer.removeClass(this.element.nativeElement,i)}),e&&void 0!==this.ariaCurrentWhenActive?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this.isActiveChange.emit(e))})}isLinkActive(e){const i=function CAe(t){return!!t.paths}(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return r=>!!r.urlTree&&e.isActive(r.urlTree,i)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}}return t.\u0275fac=function(e){return new(e||t)(de(_r),de(Si),de(ca),de(Ns),de(Ou,8))},t.\u0275dir=sn({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(e,i,r){if(1&e&&yi(r,Ou,5),2&e){let o;wn(o=Cn())&&(i.links=o)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[Yn]}),t})();class OV{}let SAe=(()=>{class t{constructor(e,i,r,o,s){this.router=e,this.injector=r,this.preloadingStrategy=o,this.loader=s}setUpPreloading(){this.subscription=this.router.events.pipe(us(e=>e instanceof Gh),Pf(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,i){const r=[];for(const o of i){o.providers&&!o._injector&&(o._injector=pw(o.providers,e,`Route: ${o.path}`));const s=o._injector??e,a=o._loadedInjector??s;(o.loadChildren&&!o._loadedRoutes&&void 0===o.canLoad||o.loadComponent&&!o._loadedComponent)&&r.push(this.preloadConfig(s,o)),(o.children||o._loadedRoutes)&&r.push(this.processRoutes(a,o.children??o._loadedRoutes))}return ro(r).pipe(M())}preloadConfig(e,i){return this.preloadingStrategy.preload(i,()=>{let r;r=i.loadChildren&&void 0===i.canLoad?this.loader.loadChildren(e,i):Rn(null);const o=r.pipe(et(s=>null===s?Rn(void 0):(i._loadedRoutes=s.routes,i._loadedInjector=s.injector,this.processRoutes(s.injector??e,s.routes))));return i.loadComponent&&!i._loadedComponent?ro([o,this.loader.loadComponent(i)]).pipe(M()):o})}}return t.\u0275fac=function(e){return new(e||t)(gt(_r),gt(hB),gt($c),gt(OV),gt(v3))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const _3=new Vn("");let IV=(()=>{class t{constructor(e,i,r,o,s={}){this.urlSerializer=e,this.transitions=i,this.viewportScroller=r,this.zone=o,this.options=s,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},s.scrollPositionRestoration=s.scrollPositionRestoration||"disabled",s.anchorScrolling=s.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof gC?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof Gh&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.urlSerializer.parse(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(e=>{e instanceof eV&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,i){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new eV(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,i))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}}return t.\u0275fac=function(e){!function O8(){throw new Error("invalid")}()},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();var hc=(()=>((hc=hc||{})[hc.COMPLETE=0]="COMPLETE",hc[hc.FAILED=1]="FAILED",hc[hc.REDIRECTING=2]="REDIRECTING",hc))();const Cv=!1;function Lf(t,n){return{\u0275kind:t,\u0275providers:n}}const b3=new Vn("",{providedIn:"root",factory:()=>!1});function FV(){const t=Fi(ua);return n=>{const e=t.get(Rh);if(n!==e.components[0])return;const i=t.get(_r),r=t.get(PV);1===t.get(x3)&&i.initialNavigation(),t.get(jV,null,Ci.Optional)?.setUpPreloading(),t.get(_3,null,Ci.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const PV=new Vn(Cv?"bootstrap done indicator":"",{factory:()=>new dr}),x3=new Vn(Cv?"initial navigation":"",{providedIn:"root",factory:()=>1});function AAe(){let t=[];return t=Cv?[{provide:Xx,multi:!0,useFactory:()=>{const n=Fi(_r);return()=>n.events.subscribe(e=>{console.group?.(`Router Event: ${e.constructor.name}`),console.log(function nEe(t){if(!("type"in t))return`Unknown Router Event: ${t.constructor.name}`;switch(t.type){case 14:return`ActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 13:return`ActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 12:return`ChildActivationEnd(path: '${t.snapshot.routeConfig?.path||""}')`;case 11:return`ChildActivationStart(path: '${t.snapshot.routeConfig?.path||""}')`;case 8:return`GuardsCheckEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state}, shouldActivate: ${t.shouldActivate})`;case 7:return`GuardsCheckStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 2:return`NavigationCancel(id: ${t.id}, url: '${t.url}')`;case 16:return`NavigationSkipped(id: ${t.id}, url: '${t.url}')`;case 1:return`NavigationEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}')`;case 3:return`NavigationError(id: ${t.id}, url: '${t.url}', error: ${t.error})`;case 0:return`NavigationStart(id: ${t.id}, url: '${t.url}')`;case 6:return`ResolveEnd(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 5:return`ResolveStart(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 10:return`RouteConfigLoadEnd(path: ${t.route.path})`;case 9:return`RouteConfigLoadStart(path: ${t.route.path})`;case 4:return`RoutesRecognized(id: ${t.id}, url: '${t.url}', urlAfterRedirects: '${t.urlAfterRedirects}', state: ${t.state})`;case 15:return`Scroll(anchor: '${t.anchor}', position: '${t.position?`${t.position[0]}, ${t.position[1]}`:null}')`}}(e)),console.log(e),console.groupEnd?.()})}}]:[],Lf(1,t)}const jV=new Vn(Cv?"router preloader":"");function MAe(t){return Lf(0,[{provide:jV,useExisting:SAe},{provide:OV,useExisting:t}])}const Fy=!1,RV=new Vn(Fy?"router duplicate forRoot guard":"ROUTER_FORROOT_GUARD"),OAe=[XA,{provide:by,useClass:KM},_r,Ty,{provide:Pr,useFactory:function NV(t){return t.routerState.root},deps:[_r]},v3,Fy?{provide:b3,useValue:!0}:[]];function IAe(){return new bB("Router",_r)}let LV=(()=>{class t{constructor(e){}static forRoot(e,i){return{ngModule:t,providers:[OAe,Fy&&i?.enableTracing?AAe().\u0275providers:[],{provide:wv,multi:!0,useValue:e},{provide:RV,useFactory:jAe,deps:[[_r,new O1,new I1]]},{provide:AC,useValue:i||{}},i?.useHash?{provide:tm,useClass:SCe}:{provide:tm,useClass:UB},{provide:_3,useFactory:()=>{const t=Fi(j2e),n=Fi(nr),e=Fi(AC),i=Fi(EC),r=Fi(by);return e.scrollOffset&&t.setOffset(e.scrollOffset),new IV(r,i,t,n,e)}},i?.preloadingStrategy?MAe(i.preloadingStrategy).\u0275providers:[],{provide:bB,multi:!0,useFactory:IAe},i?.initialNavigation?RAe(i):[],[{provide:$V,useFactory:FV},{provide:_B,multi:!0,useExisting:$V}]]}}static forChild(e){return{ngModule:t,providers:[{provide:wv,multi:!0,useValue:e}]}}}return t.\u0275fac=function(e){return new(e||t)(gt(RV,8))},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[u3]}),t})();function jAe(t){if(Fy&&t)throw new Nt(4007,"The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function RAe(t){return["disabled"===t.initialNavigation?Lf(3,[{provide:yw,multi:!0,useFactory:()=>{const n=Fi(_r);return()=>{n.setUpLocationChangeListener()}}},{provide:x3,useValue:2}]).\u0275providers:[],"enabledBlocking"===t.initialNavigation?Lf(2,[{provide:x3,useValue:0},{provide:yw,multi:!0,deps:[ua],useFactory:n=>{const e=n.get(wCe,Promise.resolve());return()=>e.then(()=>new Promise(i=>{const r=n.get(_r),o=n.get(PV);(function kAe(t,n){t.events.pipe(us(e=>e instanceof Gh||e instanceof ky||e instanceof yC||e instanceof vC),_n(e=>e instanceof Gh||e instanceof vC?hc.COMPLETE:e instanceof ky&&(0===e.code||1===e.code)?hc.REDIRECTING:hc.FAILED),us(e=>e!==hc.REDIRECTING),Ks(1)).subscribe(()=>{n()})})(r,()=>{i(!0)}),n.get(EC).afterPreactivation=()=>(i(!0),o.closed?Rn(void 0):o),r.initialNavigation()}))}}]).\u0275providers:[]]}const $V=new Vn(Fy?"Router Initializer":"");function MC(t,n){return new en(e=>{const i=t.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(n?n.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let BV=(()=>{class t{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return t.\u0275fac=function(e){return new(e||t)(de(ca),de(Si))},t.\u0275dir=sn({type:t}),t})(),um=(()=>{class t extends BV{}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,features:[pi]}),t})();const $l=new Vn("NgValueAccessor"),BAe={provide:$l,useExisting:Mi(()=>OC),multi:!0};let OC=(()=>{class t extends um{writeValue(e){this.setProperty("checked",e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Qr([BAe]),pi]}),t})();const VAe={provide:$l,useExisting:Mi(()=>Qs),multi:!0},UAe=new Vn("CompositionEventMode");let Qs=(()=>{class t extends BV{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function HAe(){const t=Lh()?Lh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return t.\u0275fac=function(e){return new(e||t)(de(ca),de(Si),de(UAe,8))},t.\u0275dir=sn({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Qr([VAe]),pi]}),t})();const zAe=!1;function $f(t){return null==t||("string"==typeof t||Array.isArray(t))&&0===t.length}function VV(t){return null!=t&&"number"==typeof t.length}const Ia=new Vn("NgValidators"),Bf=new Vn("NgAsyncValidators"),GAe=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Co{static min(n){return HV(n)}static max(n){return function UV(t){return n=>{if($f(n.value)||$f(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e>t?{max:{max:t,actual:n.value}}:null}}(n)}static required(n){return zV(n)}static requiredTrue(n){return function GV(t){return!0===t.value?null:{required:!0}}(n)}static email(n){return function WV(t){return $f(t.value)||GAe.test(t.value)?null:{email:!0}}(n)}static minLength(n){return function qV(t){return n=>$f(n.value)||!VV(n.value)?null:n.value.lengthVV(n.value)&&n.value.length>t?{maxlength:{requiredLength:t,actualLength:n.value.length}}:null}(n)}static pattern(n){return function XV(t){if(!t)return IC;let n,e;return"string"==typeof t?(e="","^"!==t.charAt(0)&&(e+="^"),e+=t,"$"!==t.charAt(t.length-1)&&(e+="$"),n=new RegExp(e)):(e=t.toString(),n=t),i=>{if($f(i.value))return null;const r=i.value;return n.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(n)}static nullValidator(n){return null}static compose(n){return tH(n)}static composeAsync(n){return nH(n)}}function HV(t){return n=>{if($f(n.value)||$f(t))return null;const e=parseFloat(n.value);return!isNaN(e)&&e{n=null!=e?{...n,...e}:n}),0===Object.keys(n).length?null:n}function ZV(t,n){return n.map(e=>e(t))}function eH(t){return t.map(n=>function WAe(t){return!t.validate}(n)?n:e=>n.validate(e))}function tH(t){if(!t)return null;const n=t.filter(JV);return 0==n.length?null:function(e){return QV(ZV(e,n))}}function w3(t){return null!=t?tH(eH(t)):null}function nH(t){if(!t)return null;const n=t.filter(JV);return 0==n.length?null:function(e){return function $Ae(...t){if(1===t.length){const n=t[0];if(Ze(n))return MC(n,null);if($e(n)&&Object.getPrototypeOf(n)===Object.prototype){const e=Object.keys(n);return MC(e.map(i=>n[i]),e)}}if("function"==typeof t[t.length-1]){const n=t.pop();return MC(t=1===t.length&&Ze(t[0])?t[0]:t,null).pipe(_n(e=>n(...e)))}return MC(t,null)}(ZV(e,n).map(KV)).pipe(_n(QV))}}function C3(t){return null!=t?nH(eH(t)):null}function iH(t,n){return null===t?[n]:Array.isArray(t)?[...t,n]:[t,n]}function rH(t){return t._rawValidators}function oH(t){return t._rawAsyncValidators}function S3(t){return t?Array.isArray(t)?t:[t]:[]}function NC(t,n){return Array.isArray(t)?t.includes(n):t===n}function sH(t,n){const e=S3(n);return S3(t).forEach(r=>{NC(e,r)||e.push(r)}),e}function aH(t,n){return S3(n).filter(e=>!NC(t,e))}class lH{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=w3(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=C3(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n){this.control&&this.control.reset(n)}hasError(n,e){return!!this.control&&this.control.hasError(n,e)}getError(n,e){return this.control?this.control.getError(n,e):null}}class vl extends lH{get formDirective(){return null}get path(){return null}}class Vf extends lH{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class cH{constructor(n){this._cd=n}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let da=(()=>{class t extends cH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(de(Vf,2))},t.\u0275dir=sn({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&jn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[pi]}),t})(),ha=(()=>{class t extends cH{constructor(e){super(e)}}return t.\u0275fac=function(e){return new(e||t)(de(vl,10))},t.\u0275dir=sn({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&jn("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[pi]}),t})();function uH(t,n){return t?`with name: '${n}'`:`at index: ${n}`}const T3=!1,Py="VALID",PC="INVALID",Sv="PENDING",jy="DISABLED";function E3(t){return(jC(t)?t.validators:t)||null}function A3(t,n){return(jC(n)?n.asyncValidators:t)||null}function jC(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}function dH(t,n,e){const i=t.controls;if(!(n?Object.keys(i):i).length)throw new Nt(1e3,T3?function JAe(t){return`\n There are no form controls registered with this ${t?"group":"array"} yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `}(n):"");if(!i[e])throw new Nt(1001,T3?function KAe(t,n){return`Cannot find form control ${uH(t,n)}`}(n,e):"")}function hH(t,n,e){t._forEachChild((i,r)=>{if(void 0===e[r])throw new Nt(1002,T3?function QAe(t,n){return`Must supply a value for form control ${uH(t,n)}`}(n,r):"")})}class RC{constructor(n,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get valid(){return this.status===Py}get invalid(){return this.status===PC}get pending(){return this.status==Sv}get disabled(){return this.status===jy}get enabled(){return this.status!==jy}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(sH(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(sH(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(aH(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(aH(n,this._rawAsyncValidators))}hasValidator(n){return NC(this._rawValidators,n)}hasAsyncValidator(n){return NC(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){this.touched=!0,this._parent&&!n.onlySelf&&this._parent.markAsTouched(n)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(n=>n.markAllAsTouched())}markAsUntouched(n={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}markAsDirty(n={}){this.pristine=!1,this._parent&&!n.onlySelf&&this._parent.markAsDirty(n)}markAsPristine(n={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}markAsPending(n={}){this.status=Sv,!1!==n.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!n.onlySelf&&this._parent.markAsPending(n)}disable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=jy,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue(),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const e=this._parentMarkedDirty(n.onlySelf);this.status=Py,this._forEachChild(i=>{i.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(n){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Py||this.status===Sv)&&this._runAsyncValidator(n.emitEvent)),!1!==n.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity(n)}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?jy:Py}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n){if(this.asyncValidator){this.status=Sv,this._hasOwnPendingAsyncValidator=!0;const e=KV(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:n})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(n,e={}){this.errors=n,this._updateControlsErrors(!1!==e.emitEvent)}get(n){let e=n;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(n,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[n]:null}hasError(n,e){return!!this.getError(n,e)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(n)}_initObservables(){this.valueChanges=new it,this.statusChanges=new it}_calculateStatus(){return this._allControlsDisabled()?jy:this.errors?PC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Sv)?Sv:this._anyControlsHaveStatus(PC)?PC:Py}_anyControlsHaveStatus(n){return this._anyControls(e=>e.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n={}){this.pristine=!this._anyControlsDirty(),this._parent&&!n.onlySelf&&this._parent._updatePristine(n)}_updateTouched(n={}){this.touched=this._anyControlsTouched(),this._parent&&!n.onlySelf&&this._parent._updateTouched(n)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){jC(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function ZAe(t){return Array.isArray(t)?w3(t):t||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function eMe(t){return Array.isArray(t)?C3(t):t||null}(this._rawAsyncValidators)}}class Ry extends RC{constructor(n,e,i){super(E3(e),A3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,e){return this.controls[n]?this.controls[n]:(this.controls[n]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(n,e,i={}){this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(n,e={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(n,e,i={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],e&&this.registerControl(n,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,e={}){hH(this,!0,n),Object.keys(n).forEach(i=>{dH(this,!0,i),this.controls[i].setValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(Object.keys(n).forEach(i=>{const r=this.controls[i];r&&r.patchValue(n[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n={},e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(n,e,i)=>(n[i]=e.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&n(i,e)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&n(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(n,e){let i=n;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class fH extends Ry{}const dm=new Vn("CallSetDisabledState",{providedIn:"root",factory:()=>Ly}),Ly="always";function $y(t,n,e=Ly){M3(t,n),n.valueAccessor.writeValue(t.value),(t.disabled||"always"===e)&&n.valueAccessor.setDisabledState?.(t.disabled),function nMe(t,n){n.valueAccessor.registerOnChange(e=>{t._pendingValue=e,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&pH(t,n)})}(t,n),function rMe(t,n){const e=(i,r)=>{n.valueAccessor.writeValue(i),r&&n.viewToModelUpdate(i)};t.registerOnChange(e),n._registerOnDestroy(()=>{t._unregisterOnChange(e)})}(t,n),function iMe(t,n){n.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&pH(t,n),"submit"!==t.updateOn&&t.markAsTouched()})}(t,n),function tMe(t,n){if(n.valueAccessor.setDisabledState){const e=i=>{n.valueAccessor.setDisabledState(i)};t.registerOnDisabledChange(e),n._registerOnDestroy(()=>{t._unregisterOnDisabledChange(e)})}}(t,n)}function $C(t,n,e=!0){const i=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(i),n.valueAccessor.registerOnTouched(i)),VC(t,n),t&&(n._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function BC(t,n){t.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(n)})}function M3(t,n){const e=rH(t);null!==n.validator?t.setValidators(iH(e,n.validator)):"function"==typeof e&&t.setValidators([e]);const i=oH(t);null!==n.asyncValidator?t.setAsyncValidators(iH(i,n.asyncValidator)):"function"==typeof i&&t.setAsyncValidators([i]);const r=()=>t.updateValueAndValidity();BC(n._rawValidators,r),BC(n._rawAsyncValidators,r)}function VC(t,n){let e=!1;if(null!==t){if(null!==n.validator){const r=rH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.validator);o.length!==r.length&&(e=!0,t.setValidators(o))}}if(null!==n.asyncValidator){const r=oH(t);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==n.asyncValidator);o.length!==r.length&&(e=!0,t.setAsyncValidators(o))}}}const i=()=>{};return BC(n._rawValidators,i),BC(n._rawAsyncValidators,i),e}function pH(t,n){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function vH(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}function yH(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}const Vy=class extends RC{constructor(n=null,e,i){super(E3(e),A3(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),jC(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=yH(n)?n.value:n)}setValue(n,e={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(n,e={}){this.setValue(n,e)}reset(n=this.defaultValue,e={}){this._applyFormState(n),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){vH(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){vH(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){yH(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};let fa=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const fMe={provide:$l,useExisting:Mi(()=>P3),multi:!0};let P3=(()=>{class t extends um{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&ye("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Qr([fMe]),pi]}),t})();const pMe={provide:$l,useExisting:Mi(()=>j3),multi:!0};let CH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})(),mMe=(()=>{class t{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e)return void this._accessors.splice(i,1)}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return!!e[0].control&&e[0]._parent===i._control._parent&&e[1].name===i.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:CH}),t})(),j3=(()=>{class t extends um{constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=Fi(dm,{optional:!0})??Ly}ngOnInit(){this._control=this._injector.get(Vf),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(de(ca),de(Si),de(mMe),de(ua))},t.\u0275dir=sn({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,i){1&e&&ye("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Qr([pMe]),pi]}),t})();const R3=new Vn("NgModelWithFormControlWarning"),yMe={provide:vl,useExisting:Mi(()=>js)};let js=(()=>{class t extends vl{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new it,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(VC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return $y(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){$C(e.control||null,e,!1),function lMe(t,n){const e=t.indexOf(n);e>-1&&t.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function gH(t,n){t._syncPendingControls(),n.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&($C(i||null,e),(t=>t instanceof Vy)(r)&&($y(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function mH(t,n){M3(t,n)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function oMe(t,n){return VC(t,n)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){M3(this.form,this),this._oldForm&&VC(this._oldForm,this)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(de(Ia,10),de(Bf,10),de(dm,8))},t.\u0275dir=sn({type:t,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&ye("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Qr([yMe]),pi,Yn]}),t})();const xMe={provide:Vf,useExisting:Mi(()=>Zs)};let Zs=(()=>{class t extends Vf{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new it,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=function N3(t,n){if(!n)return null;let e,i,r;return Array.isArray(n),n.forEach(o=>{o.constructor===Qs?e=o:function aMe(t){return Object.getPrototypeOf(t.constructor)===um}(o)?i=o:r=o}),r||i||e||null}(0,o)}ngOnChanges(e){this._added||this._setUpControl(),function I3(t,n){if(!t.hasOwnProperty("model"))return!1;const e=t.model;return!!e.isFirstChange()||!Object.is(n,e.currentValue)}(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return function LC(t,n){return[...n.path,t]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return t._ngModelWarningSentOnce=!1,t.\u0275fac=function(e){return new(e||t)(de(vl,13),de(Ia,10),de(Bf,10),de($l,10),de(R3,8))},t.\u0275dir=sn({type:t,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Qr([xMe]),pi,Yn]}),t})();const wMe={provide:$l,useExisting:Mi(()=>kv),multi:!0};function TH(t,n){return null==t?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let kv=(()=>{class t extends um{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const r=TH(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){const i=function CMe(t){return t.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&ye("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Qr([wMe]),pi]}),t})(),HC=(()=>{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(TH(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca),de(kv,9))},t.\u0275dir=sn({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const SMe={provide:$l,useExisting:Mi(()=>B3),multi:!0};function EH(t,n){return null==t?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${t}: ${n}`.slice(0,50))}let B3=(()=>{class t extends um{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){const r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{const r=[],o=i.selectedOptions;if(void 0!==o){const s=o;for(let a=0;a{class t{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(EH(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(EH(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca),de(B3,9))},t.\u0275dir=sn({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();let hm=(()=>{class t{constructor(){this._validator=IC}ngOnChanges(e){if(this.inputName in e){const i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):IC,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,features:[Yn]}),t})();const TMe={provide:Ia,useExisting:Mi(()=>V3),multi:!0};let V3=(()=>{class t extends hm{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>function MH(t){return"number"==typeof t?t:parseFloat(t)}(e),this.createValidator=e=>HV(e)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&ut("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Qr([TMe]),pi]}),t})();const EMe={provide:Ia,useExisting:Mi(()=>Hf),multi:!0};let Hf=(()=>{class t extends hm{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=fv,this.createValidator=e=>zV}enabled(e){return e}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275dir=sn({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&ut("required",i._enabled?"":null)},inputs:{required:"required"},features:[Qr([EMe]),pi]}),t})(),RH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[CH]}),t})();class LH extends RC{constructor(n,e,i){super(E3(e),A3(i,e)),this.controls=n,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,e={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(n,e,i={}){this.controls.splice(n,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(n,e={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(n,e,i={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,e={}){hH(this,!1,n),n.forEach((i,r)=>{dH(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(n,e={}){null!=n&&(n.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(n=[],e={}){this._forEachChild((i,r)=>{i.reset(n[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((e,i)=>{n(e,i)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(e=>e.enabled&&n(e))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function $H(t){return!!t&&(void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn)}let FMe=(()=>{class t{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new t;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return $H(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Ry(r,o)}record(e,i=null){const r=this._reduceControls(e);return new fH(r,i)}control(e,i,r){let o={};return this.useNonNullable?($H(i)?o=i:(o.validators=i,o.asyncValidators=r),new Vy(e,{...o,nonNullable:!0})):new Vy(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new LH(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Vy||e instanceof RC?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Na=(()=>{class t extends FMe{group(e,i=null){return super.group(e,i)}control(e,i,r){return super.control(e,i,r)}array(e,i,r){return super.array(e,i,r)}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),PMe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:dm,useValue:e.callSetDisabledState??Ly}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[RH]}),t})(),jMe=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:R3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:dm,useValue:e.callSetDisabledState??Ly}]}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[RH]}),t})();const BH=new Vn("ngx-segment-analytics.config"),RMe={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js",plugins:[]};let VH=(()=>{class t{analytics;static \u0275fac=function(i){return new(i||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac})}return t})(),zC=(()=>{class t{_w;_doc;_config;constructor(e,i,r){if(this._w=e,this._doc=i,this._config={...RMe,...r},this._config.loadOnInitialization&&(typeof this._config.apiKey>"u"||""===this._config.apiKey))console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.");else if(typeof this._w.analytics>"u"||typeof this._w.analytics.initialize>"u"||!1===this._w.analytics.initialize){if(typeof this._w.analytics<"u"&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");!0===this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"],this._w.analytics.factory=o=>(...s)=>(s.unshift(o),this._w.analytics.push(s),this._w.analytics),this._w.analytics.methods.forEach(o=>{this._w.analytics[o]=this._w.analytics.factory(o)}),this._w.analytics.load=(o,s)=>{const a=this._doc.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",o);const l=this._doc.getElementsByTagName("script")[0];l.parentNode.insertBefore(a,l),this._w.analytics._loadOptions=s},this._w.analytics._writeKey=this._config.apiKey,this._w.analytics.SNIPPET_VERSION="4.15.3",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}load(e,i){this._w.analytics.load(e,i),!0===this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(e,i,r){return new Promise(o=>{this._w.analytics.identify(e,i,r,s=>o(this))})}track(e,i,r){return new Promise(o=>{this._w.analytics.track(e,i,r,s=>o(this))})}page(e,i,r,o){return new Promise(s=>{this._w.analytics.page(e,i,r,o,a=>s(this))})}group(e,i){return new Promise(r=>{this._w.analytics.group(e,i,o=>r(this))})}alias(e,i,r){return new Promise(o=>{this._w.analytics.alias(e,i,r,s=>o(this))})}ready(){return new Promise(e=>{this._w.analytics.ready(i=>e(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}setAnonymousId(e){this._w.analytics.setAnonymousId(e)}traits(){return this._w.analytics.user().traits()}reset(){this._w.analytics.reset()}debug(e){this._w.analytics.debug(e)}on(e,i){this._w.analytics.on(e,i)}trackLink(e,i,r){this._w.analytics.trackLink(e,i,r)}trackForm(e,i,r){this._w.analytics.trackForm(e,i,r)}timeout(e){this._w.analytics.timeout(e)}addSourceMiddleware(e){this._w.analytics.addSourceMiddleware(e)}addDestinationMiddleware(e,...i){this._w.analytics.addDestinationMiddleware(e,...i)}register(...e){return this._w.analytics.register(...e)}get plugins(){return this._w.analytics.plugins}static \u0275fac=function(i){return new(i||t)(gt(VH),gt(co),gt(BH))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function LMe(t){return p7(t)?window:{}}let $Me=(()=>{class t{static forRoot(e){return{ngModule:t,providers:[{provide:BH,useValue:e},zC]}}constructor(e){if(e)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static \u0275fac=function(i){return new(i||t)(gt(t,12))};static \u0275mod=ki({type:t});static \u0275inj=wi({providers:[{provide:VH,useFactory:LMe,deps:[sy]}],imports:[Mf]})}return t})();class GC{}class H3{}class Iu{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?this.lazyInit="string"==typeof n?()=>{this.headers=new Map,n.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.entries(n).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){const o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const e=this.headers.get(n.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,e){return this.clone({name:n,value:e,op:"a"})}set(n,e){return this.clone({name:n,value:e,op:"s"})}delete(n,e){return this.clone({name:n,value:e,op:"d"})}maybeSetNormalizedName(n,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,n)}init(){this.lazyInit&&(this.lazyInit instanceof Iu?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(e=>{this.headers.set(e,n.headers.get(e)),this.normalizedNames.set(e,n.normalizedNames.get(e))})}clone(n){const e=new Iu;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Iu?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([n]),e}applyUpdate(n){const e=n.name.toLowerCase();switch(n.op){case"a":case"s":let i=n.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(n.name,e);const r=("a"===n.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=n.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>n(this.normalizedNames.get(e),this.headers.get(e)))}}class BMe{encodeKey(n){return HH(n)}encodeValue(n){return HH(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const HMe=/%(\d[a-f0-9])/gi,UMe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function HH(t){return encodeURIComponent(t).replace(HMe,(n,e)=>UMe[e]??n)}function WC(t){return`${t}`}class En{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new BMe,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function VMe(t,n){const e=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[n.decodeKey(r),""]:[n.decodeKey(r.slice(0,o)),n.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(e=>{const i=n.fromObject[e],r=Array.isArray(i)?i.map(WC):[WC(i)];this.map.set(e,r)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const e=this.map.get(n);return e?e[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,e){return this.clone({param:n,value:e,op:"a"})}appendAll(n){const e=[];return Object.keys(n).forEach(i=>{const r=n[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(n,e){return this.clone({param:n,value:e,op:"s"})}delete(n,e){return this.clone({param:n,value:e,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const e=this.encoder.encodeKey(n);return this.map.get(n).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const e=new En({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(n),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const e=("a"===n.op?this.map.get(n.param):void 0)||[];e.push(WC(n.value)),this.map.set(n.param,e);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let i=this.map.get(n.param)||[];const r=i.indexOf(WC(n.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(n.param,i):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class zMe{constructor(){this.map=new Map}set(n,e){return this.map.set(n,e),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function UH(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function zH(t){return typeof Blob<"u"&&t instanceof Blob}function GH(t){return typeof FormData<"u"&&t instanceof FormData}class Hy{constructor(n,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function GMe(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Iu),this.context||(this.context=new zMe),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,n.setHeaders[h]),l)),n.setParams&&(c=Object.keys(n.setParams).reduce((d,h)=>d.set(h,n.setParams[h]),c)),new Hy(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var Rs=(()=>((Rs=Rs||{})[Rs.Sent=0]="Sent",Rs[Rs.UploadProgress=1]="UploadProgress",Rs[Rs.ResponseHeader=2]="ResponseHeader",Rs[Rs.DownloadProgress=3]="DownloadProgress",Rs[Rs.Response=4]="Response",Rs[Rs.User=5]="User",Rs))();class U3{constructor(n,e=200,i="OK"){this.headers=n.headers||new Iu,this.status=void 0!==n.status?n.status:e,this.statusText=n.statusText||i,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class z3 extends U3{constructor(n={}){super(n),this.type=Rs.ResponseHeader}clone(n={}){return new z3({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class qC extends U3{constructor(n={}){super(n),this.type=Rs.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new qC({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class WH extends U3{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function G3(t,n){return{body:n,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let YC=(()=>{class t{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Hy)o=e;else{let l,c;l=r.headers instanceof Iu?r.headers:new Iu(r.headers),r.params&&(c=r.params instanceof En?r.params:new En({fromObject:r.params})),o=new Hy(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=Rn(o).pipe(Pf(l=>this.handler.handle(l)));if(e instanceof Hy||"events"===r.observe)return s;const a=s.pipe(us(l=>l instanceof qC));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(_n(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(_n(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(_n(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(_n(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new En).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,G3(r,i))}post(e,i,r={}){return this.request("POST",e,G3(r,i))}put(e,i,r={}){return this.request("PUT",e,G3(r,i))}}return t.\u0275fac=function(e){return new(e||t)(gt(GC))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function qH(t,n){return n(t)}function qMe(t,n){return(e,i)=>n.intercept(e,{handle:r=>t(r,i)})}const W3=new Vn("HTTP_INTERCEPTORS"),Uy=new Vn("HTTP_INTERCEPTOR_FNS");function XMe(){let t=null;return(n,e)=>(null===t&&(t=(Fi(W3,{optional:!0})??[]).reduceRight(qMe,qH)),t(n,e))}let YH=(()=>{class t extends GC{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(Uy)));this.chain=i.reduceRight((r,o)=>function YMe(t,n,e){return(i,r)=>e.runInContext(()=>n(i,o=>t(o,r)))}(r,o,this.injector),qH)}return this.chain(e,i=>this.backend.handle(i))}}return t.\u0275fac=function(e){return new(e||t)(gt(H3),gt($c))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const ZMe=/^\)\]\}',?\n/;let JH=(()=>{class t{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new en(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,p)=>r.setRequestHeader(f,p.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){const f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const f=r.statusText||"OK",p=new Iu(r.getAllResponseHeaders()),m=function e3e(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new z3({headers:p,status:r.status,statusText:f,url:m}),s},l=()=>{let{headers:f,status:p,statusText:m,url:g}=a(),v=null;204!==p&&(v=typeof r.response>"u"?r.responseText:r.response),0===p&&(p=v?200:0);let y=p>=200&&p<300;if("json"===e.responseType&&"string"==typeof v){const b=v;v=v.replace(ZMe,"");try{v=""!==v?JSON.parse(v):null}catch(C){v=b,y&&(y=!1,v={error:C,text:v})}}y?(i.next(new qC({body:v,headers:f,status:p,statusText:m,url:g||void 0})),i.complete()):i.error(new WH({error:v,headers:f,status:p,statusText:m,url:g||void 0}))},c=f=>{const{url:p}=a(),m=new WH({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:p||void 0});i.error(m)};let u=!1;const d=f=>{u||(i.next(a()),u=!0);let p={type:Rs.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),"text"===e.responseType&&r.responseText&&(p.partialText=r.responseText),i.next(p)},h=f=>{let p={type:Rs.UploadProgress,loaded:f.loaded};f.lengthComputable&&(p.total=f.total),i.next(p)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:Rs.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(gt(g7))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const q3=new Vn("XSRF_ENABLED"),KH=new Vn("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),QH=new Vn("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class ZH{}let i3e=(()=>{class t{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=n7(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(gt(co),gt(sy),gt(KH))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();function r3e(t,n){const e=t.url.toLowerCase();if(!Fi(q3)||"GET"===t.method||"HEAD"===t.method||e.startsWith("http://")||e.startsWith("https://"))return n(t);const i=Fi(ZH).getToken(),r=Fi(QH);return null!=i&&!t.headers.has(r)&&(t=t.clone({headers:t.headers.set(r,i)})),n(t)}var ws=(()=>((ws=ws||{})[ws.Interceptors=0]="Interceptors",ws[ws.LegacyInterceptors=1]="LegacyInterceptors",ws[ws.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",ws[ws.NoXsrfProtection=3]="NoXsrfProtection",ws[ws.JsonpSupport=4]="JsonpSupport",ws[ws.RequestsMadeViaParent=5]="RequestsMadeViaParent",ws))();function Dv(t,n){return{\u0275kind:t,\u0275providers:n}}function o3e(...t){const n=[YC,JH,YH,{provide:GC,useExisting:YH},{provide:H3,useExisting:JH},{provide:Uy,useValue:r3e,multi:!0},{provide:q3,useValue:!0},{provide:ZH,useClass:i3e}];for(const e of t)n.push(...e.\u0275providers);return function Q1e(t){return{\u0275providers:t}}(n)}const eU=new Vn("LEGACY_INTERCEPTOR_FN");let a3e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[o3e(Dv(ws.LegacyInterceptors,[{provide:eU,useFactory:XMe},{provide:Uy,useExisting:eU,multi:!0}]))]}),t})();var ti=(()=>(function(t){t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY"}(ti||(ti={})),ti))(),zy=(()=>(function(t){t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY",t[t.FACEBOOK_INSTANT_STORE=3]="FACEBOOK_INSTANT_STORE"}(zy||(zy={})),zy))();class Y3{host;timeoutMs}let bi=(()=>{class t{httpClient;config;constructor(e,i){this.httpClient=e,this.config=i||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}deleteAccounts(e){let r=new En({encoder:new Un});return this.httpClient.delete(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(e)})}listAccounts(e,i,r,o){let a=new En({encoder:new Un});return i&&(a=a.set("filter",i)),(r||!1===r)&&(a=a.set("tombstones",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/account",{params:a,headers:this.getTokenAuthHeaders(e)})}getWalletLedger(e,i,r,o){const s=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet`;let a=new En({encoder:new Un});return r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}deleteAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return(r||!1===r)&&(s=s.set("record_deletion",String(r))),this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateAccount(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}banAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/ban`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}exportAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/export`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getFriends(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteFriend(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/friend/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}getGroups(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/group`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteGroupUser(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/group/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}unbanAccount(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unban`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkApple(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/apple`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkCustom(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/custom`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkDevice(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/device`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}unlinkEmail(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/email`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebook(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebook`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkFacebookInstantGame(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/facebookinstantgame`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGameCenter(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/gamecenter`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkGoogle(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/google`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}unlinkSteam(e,i){const r=`/v2/console/account/${i=encodeURIComponent(String(i))}/unlink/steam`;let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteWalletLedger(e,i,r){const o=`/v2/console/account/${i=encodeURIComponent(String(i))}/wallet/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteAllData(e){let r=new En({encoder:new Un});return this.httpClient.delete(this.config.host+"/v2/console/all",{params:r,headers:this.getTokenAuthHeaders(e)})}listApiEndpoints(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:r,headers:this.getTokenAuthHeaders(e)})}callRpcEndpoint(e,i,r){const o=`/v2/console/api/endpoints/rpc/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}callApiEndpoint(e,i,r){const o=`/v2/console/api/endpoints/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}authenticate(e){let r=new En({encoder:new Un});return this.httpClient.post(this.config.host+"/v2/console/authenticate",e,{params:r})}authenticateLogout(e,i){let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+"/v2/console/authenticate/logout",i,{params:o,headers:this.getTokenAuthHeaders(e)})}listChannelMessages(e,i,r,o,s,a,l){let u=new En({encoder:new Un});return i&&(u=u.set("type",i)),r&&(u=u.set("label",r)),o&&(u=u.set("group_id",o)),s&&(u=u.set("user_id_one",s)),a&&(u=u.set("user_id_two",a)),l&&(u=u.set("cursor",l)),this.httpClient.get(this.config.host+"/v2/console/channel",{params:u,headers:this.getTokenAuthHeaders(e)})}getConfig(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/config",{params:r,headers:this.getTokenAuthHeaders(e)})}listGroups(e,i,r){let s=new En({encoder:new Un});return i&&(s=s.set("filter",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/group",{params:s,headers:this.getTokenAuthHeaders(e)})}demoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/demote`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}promoteGroupMember(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/account/${r=encodeURIComponent(String(r))}/promote`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}addGroupUsers(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}/add`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}deleteGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}updateGroup(e,i,r){const o=`/v2/console/group/${i=encodeURIComponent(String(i))}`;let s=new En({encoder:new Un});return this.httpClient.post(this.config.host+o,r,{params:s,headers:this.getTokenAuthHeaders(e)})}exportGroup(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/export`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getMembers(e,i){const r=`/v2/console/group/${i=encodeURIComponent(String(i))}/member`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getPurchase(e,i){const r=`/v2/console/iap/purchase/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getSubscription(e,i){const r=`/v2/console/iap/subscription/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}listLeaderboards(e,i){let o=new En({encoder:new Un});return i&&(o=o.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.delete(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}getLeaderboard(e,i){const r=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteLeaderboardRecord(e,i,r){const o=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/owner/${r=encodeURIComponent(String(r))}`;let s=new En({encoder:new Un});return this.httpClient.delete(this.config.host+o,{params:s,headers:this.getTokenAuthHeaders(e)})}listLeaderboardRecords(e,i,r,o,s,a){const l=`/v2/console/leaderboard/${i=encodeURIComponent(String(i))}/records`;let c=new En({encoder:new Un});return r&&r.forEach(u=>c=c.append("owner_ids",String(u))),o&&(c=c.set("limit",String(o))),s&&(c=c.set("cursor",s)),a&&(c=c.set("expiry",a)),this.httpClient.get(this.config.host+l,{params:c,headers:this.getTokenAuthHeaders(e)})}listMatches(e,i,r,o,s,a,l,c,u){let h=new En({encoder:new Un});return i&&(h=h.set("limit",String(i))),(r||!1===r)&&(h=h.set("authoritative",String(r))),o&&(h=h.set("label",o)),s&&(h=h.set("min_size",String(s))),a&&(h=h.set("max_size",String(a))),l&&(h=h.set("match_id",l)),c&&(h=h.set("query",c)),u&&(h=h.set("node",u)),this.httpClient.get(this.config.host+"/v2/console/match",{params:h,headers:this.getTokenAuthHeaders(e)})}getMatchState(e,i){const r=`/v2/console/match/${i=encodeURIComponent(String(i))}/state`;let o=new En({encoder:new Un});return this.httpClient.get(this.config.host+r,{params:o,headers:this.getTokenAuthHeaders(e)})}deleteChannelMessages(e,i,r){let s=new En({encoder:new Un});return i&&(s=s.set("before",i)),r&&r.forEach(a=>s=s.append("ids",String(a))),this.httpClient.delete(this.config.host+"/v2/console/message",{params:s,headers:this.getTokenAuthHeaders(e)})}listPurchases(e,i,r,o){let a=new En({encoder:new Un});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:a,headers:this.getTokenAuthHeaders(e)})}getRuntime(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:r,headers:this.getTokenAuthHeaders(e)})}getStatus(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/status",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorage(e){let r=new En({encoder:new Un});return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:r,headers:this.getTokenAuthHeaders(e)})}listStorage(e,i,r,o,s){let l=new En({encoder:new Un});return i&&(l=l.set("user_id",i)),r&&(l=l.set("key",r)),o&&(l=l.set("collection",o)),s&&(l=l.set("cursor",s)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:l,headers:this.getTokenAuthHeaders(e)})}listStorageCollections(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:r,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new En({encoder:new Un});return s&&(l=l.set("version",s)),this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}getStorage(e,i,r,o){const s=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let a=new En({encoder:new Un});return this.httpClient.get(this.config.host+s,{params:a,headers:this.getTokenAuthHeaders(e)})}writeStorageObject(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}`;let l=new En({encoder:new Un});return this.httpClient.put(this.config.host+a,s,{params:l,headers:this.getTokenAuthHeaders(e)})}deleteStorageObject2(e,i,r,o,s){const a=`/v2/console/storage/${i=encodeURIComponent(String(i))}/${r=encodeURIComponent(String(r))}/${o=encodeURIComponent(String(o))}/${s=encodeURIComponent(String(s))}`;let l=new En({encoder:new Un});return this.httpClient.delete(this.config.host+a,{params:l,headers:this.getTokenAuthHeaders(e)})}listSubscriptions(e,i,r,o){let a=new En({encoder:new Un});return i&&(a=a.set("user_id",i)),r&&(a=a.set("limit",String(r))),o&&(a=a.set("cursor",o)),this.httpClient.get(this.config.host+"/v2/console/subscription",{params:a,headers:this.getTokenAuthHeaders(e)})}deleteUser(e,i){let o=new En({encoder:new Un});return i&&(o=o.set("username",i)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:o,headers:this.getTokenAuthHeaders(e)})}listUsers(e){let r=new En({encoder:new Un});return this.httpClient.get(this.config.host+"/v2/console/user",{params:r,headers:this.getTokenAuthHeaders(e)})}addUser(e,i){let o=new En({encoder:new Un});return this.httpClient.post(this.config.host+"/v2/console/user",i,{params:o,headers:this.getTokenAuthHeaders(e)})}getTokenAuthHeaders(e){return(new Iu).set("Authorization","Bearer "+e)}getBasicAuthHeaders(e,i){return(new Iu).set("Authorization","Basic "+btoa(e+":"+i))}static \u0275fac=function(i){return new(i||t)(gt(YC),gt(Y3,8))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class Un{encodeKey(n){return encodeURIComponent(n)}encodeValue(n){return encodeURIComponent(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const tU=new Vn("window"),u3e=[{provide:tU,useFactory:()=>window}],X3="currentSession";let zo=(()=>{class t{window;segment;http;consoleService;currentSessionSubject;currentSession;constructor(e,i,r,o){this.window=e,this.segment=i,this.http=r,this.consoleService=o;const s=JSON.parse(localStorage.getItem(X3));s&&this.segmentIdentify(s),this.currentSessionSubject=new Js(s),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const e=this.currentSessionSubject.getValue().token;return JSON.parse(atob(e.split(".")[1])).usn}get sessionRole(){const e=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(e.split(".")[1])).rol){case 1:return ti.USER_ROLE_ADMIN;case 2:return ti.USER_ROLE_DEVELOPER;case 3:return ti.USER_ROLE_MAINTAINER;case 4:return ti.USER_ROLE_READONLY;default:return ti.USER_ROLE_UNKNOWN}}login(e,i){return this.consoleService.authenticate({username:e,password:i}).pipe(xs(r=>{localStorage.setItem(X3,JSON.stringify(r)),this.currentSessionSubject.next(r),this.segmentIdentify(r)}))}logout(){return this.currentSessionSubject.getValue()?this.consoleService.authenticateLogout("",{token:this.currentSessionSubject.getValue()?.token}).pipe(xs(()=>{localStorage.removeItem(X3),this.currentSessionSubject.next(null)})):Uh}segmentIdentify(e){const r=JSON.parse(atob(e.token.split(".")[1]));this.segment.identify(null,{username:r.usn,email:r.ema,cookie:r.cki})}static \u0275fac=function(i){return new(i||t)(gt(tU),gt(zC),gt(YC),gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function d3e(t,n){if(1&t&&(_(0,"div",27),O(1),x()),2&t){const e=$();w(1),mn(" ",e.error," ")}}const h3e=function(t){return{"was-validated":t}},nU=function(t){return{"is-invalid":t}};let f3e=(()=>{class t{segment;formBuilder;route;router;authenticationService;error="";loginForm;submitted;returnUrl;constructor(e,i,r,o,s){this.segment=e,this.formBuilder=i,this.route=r,this.router=o,this.authenticationService=s}ngOnInit(){this.segment.page("/login"),this.loginForm=this.formBuilder.group({username:["",Co.compose([Co.required])],password:["",Co.compose([Co.required,Co.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",!this.loginForm.invalid&&this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(e=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},e=>{this.error=e,this.submitted=!1})}get f(){return this.loginForm.controls}static \u0275fac=function(i){return new(i||t)(de(zC),de(Na),de(Pr),de(_r),de(zo))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:53,vars:14,consts:[[1,"d-flex","flex-column","flex-lg-row","h-100","relative"],["src","/static/svg/logo-white.svg","alt","Nakama Logo","width","175","height","43",1,"logo"],[1,"login-panel"],[1,"align-self-center","login-form"],[1,"px-4"],[1,"login-title","mb-4"],["class","alert alert-warning","role","alert",4,"ngIf"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],[1,"heroic-stack"],[1,""],["src","/static/svg/hiro-logo.svg","alt","Hiro Logo","width","110","height","50",1,"mb-3"],["href","https://www.youtube.com/playlist?list=PLOAExZcDNj9sWny_J8J5ARkxDTwAV0i6f&utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Reconstructing%20Fun%20Sign-In","target","_blank"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Sign-In","target","_blank",1,"login-link"],["src","/static/svg/satori-logo.svg","alt","Satori Logo","width","134","height","50",1,"mb-3"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Sign-In","target","_blank",1,"login-link"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/calendar.svg","alt","Calendar"],[1,"font-weight-bold","ml-2",2,"font-size","20px"],["href","https://heroiclabs.com/bookademo?utm_source=NOSS%20Sign-In&utm_medium=Banner&utm_campaign=NOSS%20Book%20a%20Demo%20Sign-In","target","_blank",1,"login-link-pink"],["src","/static/svg/phone.svg","alt","Phone"],["role","alert",1,"alert","alert-warning"]],template:function(i,r){1&i&&(_(0,"div",0),pe(1,"img",1),_(2,"div",2)(3,"div",3)(4,"div",4)(5,"h3",5),O(6,"Sign in to continue to the Nakama Dashboard"),x(),Z(7,d3e,2,1,"div",6),_(8,"form",7),ye("ngSubmit",function(){return r.onSubmit()}),_(9,"div",8)(10,"label",9),O(11,"Username"),x(),pe(12,"input",10),_(13,"div",11),O(14,"Please enter a username."),x()(),_(15,"div",8)(16,"label",12),O(17,"Password"),x(),pe(18,"input",13),_(19,"div",11),O(20,"Password must be at least 8 characters."),x()(),_(21,"button",14),O(22,"Login"),x()()()()(),_(23,"div",2)(24,"div",15)(25,"div",16),pe(26,"img",17),_(27,"p"),O(28,"A metagame framework built on Nakama to add virtual store, rewards, event leaderboards and much more rapidly and flexibly to your game. "),_(29,"a",18),O(30,"RECONSTRUCTING FUN"),x(),O(31," on YouTube shows you how."),x(),_(32,"a",19),O(33,"Explore Hiro"),x()(),pe(34,"hr"),_(35,"div",16),pe(36,"img",20),_(37,"p"),O(38,"LiveOps for your live services game. Live events, Experiments, Feature Flags, Audience Segmentation and Analytics built to work independently but beautifully with Nakama."),x(),_(39,"a",21),O(40,"Explore Satori"),x()(),pe(41,"hr"),_(42,"div")(43,"div",22),pe(44,"img",23),_(45,"span",24),O(46,"Working at a Game Studio?"),x()(),_(47,"p"),O(48,"Ready to take your game development to the next level? Contact us for a free 45 minute demo call."),x(),_(49,"a",25),pe(50,"img",26),_(51,"span"),O(52,"Schedule a call with us"),x()()()()()()),2&i&&(w(7),S("ngIf",r.error),w(1),S("formGroup",r.loginForm)("ngClass",sr(8,h3e,r.submitted)),w(4),S("ngClass",sr(10,nU,r.f.username.dirty&&r.f.username.errors)),w(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),w(5),S("ngClass",sr(12,nU,r.f.password.dirty&&r.f.password.errors)),w(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),w(2),S("disabled",!r.loginForm.valid||r.submitted))},dependencies:[nm,vn,fa,Qs,da,ha,Hf,js,Zs],styles:[".logo[_ngcontent-%COMP%]{position:absolute;top:10px;left:15px}@media (min-width: 992px){.logo[_ngcontent-%COMP%]{top:40px;left:30px}}.login-form[_ngcontent-%COMP%]{margin:100px auto auto;max-width:600px}@media (min-width: 992px){.login-form[_ngcontent-%COMP%]{width:485px;margin:auto}}.login-title[_ngcontent-%COMP%]{font-size:28px;font-weight:300}.login-panel[_ngcontent-%COMP%]{flex:1 1 0;display:flex}.login-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-weight:300;font-size:20px}.heroic-stack[_ngcontent-%COMP%]{padding:0 1.5rem;max-width:600px;margin:70px auto 40px}@media (min-width: 992px){.heroic-stack[_ngcontent-%COMP%]{max-width:660px;padding:0 15px;margin:auto}}.login-link[_ngcontent-%COMP%], .login-link-pink[_ngcontent-%COMP%]{display:inline-flex;padding:15px;font-size:15px;border:1px;border-radius:5px;border:1px solid}.login-link[_ngcontent-%COMP%]{color:#4739c5;border-color:#4739c51a}hr[_ngcontent-%COMP%]{border:2px solid rgba(217,217,217,.2);margin-top:20px;margin-bottom:40px}.login-link-pink[_ngcontent-%COMP%]{border-color:#b421b41a;background:#FFF6FF;color:#b421b4}.login-link-pink[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-right:15px}"]})}return t})(),p3e=(()=>{class t{authService;router;constructor(e,i){this.authService=e,this.router=i}canActivate(e,i){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}static \u0275fac=function(i){return new(i||t)(gt(zo),gt(_r))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),m3e=(()=>{class t{router;authenticationService;constructor(e,i){this.router=e,this.authenticationService=i}canActivate(e,i){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:i.url}}),!1)}canActivateChild(e,i){return this.canActivate(e,i)}static \u0275fac=function(i){return new(i||t)(gt(_r),gt(zo))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();class g3e extends ce{constructor(n,e){super()}schedule(n,e=0){return this}}class J3 extends g3e{constructor(n,e){super(n,e),this.scheduler=n,this.work=e,this.pending=!1}schedule(n,e=0){if(this.closed)return this;this.state=n;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(n,e,i=0){return setInterval(n.flush.bind(n,this),i)}recycleAsyncId(n,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(n,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(n,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,e){let r,i=!1;try{this.work(n)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const n=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null}}let iU=(()=>{class t{constructor(e,i=t.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return t.now=()=>Date.now(),t})();class Vd extends iU{constructor(n,e=iU.now){super(n,()=>Vd.delegate&&Vd.delegate!==this?Vd.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,e=0,i){return Vd.delegate&&Vd.delegate!==this?Vd.delegate.schedule(n,e,i):super.schedule(n,e,i)}flush(n){const{actions:e}=this;if(this.active)return void e.push(n);let i;this.active=!0;do{if(i=n.execute(n.state,n.delay))break}while(n=e.shift());if(this.active=!1,i){for(;n=e.shift();)n.unsubscribe();throw i}}}const XC=new Vd(J3);class y3e{constructor(n,e,i,r){this.bufferTimeSpan=n,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r}call(n,e){return e.subscribe(new b3e(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class _3e{constructor(){this.buffer=[]}}class b3e extends F{constructor(n,e,i,r,o){super(n),this.bufferTimeSpan=e,this.bufferCreationInterval=i,this.maxBufferSize=r,this.scheduler=o,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==i||i<0,this.timespanOnly)this.add(s.closeAction=o.schedule(rU,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const l={bufferTimeSpan:e,bufferCreationInterval:i,subscriber:this,scheduler:o};this.add(s.closeAction=o.schedule(oU,e,{subscriber:this,context:s})),this.add(o.schedule(x3e,i,l))}}_next(n){const e=this.contexts,i=e.length;let r;for(let o=0;o0;){const i=n.shift();e.next(i.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const e=n.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){n=this.openContext();const i=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(rU,i,{subscriber:this,context:n,bufferTimeSpan:i}))}}openContext(){const n=new _3e;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const e=this.contexts;(e?e.indexOf(n):-1)>=0&&e.splice(e.indexOf(n),1)}}function rU(t){const n=t.subscriber,e=t.context;e&&n.closeContext(e),n.closed||(t.context=n.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function x3e(t){const{bufferCreationInterval:n,bufferTimeSpan:e,subscriber:i,scheduler:r}=t,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(oU,e,{subscriber:i,context:o})),this.schedule(t,n))}function oU(t){const{subscriber:n,context:e}=t;n.closeContext(e)}function JC(t,n){return e=>e.lift(new w3e(t,n))}class w3e{constructor(n,e){this.compare=n,this.keySelector=e}call(n,e){return e.subscribe(new C3e(n,this.compare,this.keySelector))}}class C3e extends F{constructor(n,e,i){super(n),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(n,e){return n===e}_next(n){let e;try{const{keySelector:r}=this;e=r?r(n):n}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(n))}}function Fa(t,n,e,i){return nt(e)&&(i=e,e=void 0),i?Fa(t,n,e).pipe(_n(r=>Ze(r)?i(...r):i(r))):new en(r=>{sU(t,n,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function sU(t,n,e,i,r){let o;if(function D3e(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const s=t;t.addEventListener(n,e,r),o=()=>s.removeEventListener(n,e,r)}else if(function k3e(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const s=t;t.on(n,e),o=()=>s.off(n,e)}else if(function S3e(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const s=t;t.addListener(n,e),o=()=>s.removeListener(n,e)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,a=t.length;s=0}function Gy(t=0,n,e){let i=-1;return aU(n)?i=Number(n)<1?1:Number(n):Ca(n)&&(e=n),Ca(e)||(e=XC),new en(r=>{const o=aU(t)?t:+t-e.now();return e.schedule(T3e,o,{index:0,period:i,subscriber:r})})}function T3e(t){const{index:n,period:e,subscriber:i}=t;if(i.next(n),!i.closed){if(-1===e)return i.complete();t.index=n+1,this.schedule(t,e)}}function lU(...t){if(1===t.length){if(!Ze(t[0]))return t[0];t=t[0]}return ot(t,void 0).lift(new E3e)}class E3e{call(n,e){return e.subscribe(new A3e(n))}}class A3e extends qM{constructor(n){super(n),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(n){this.observables.push(n)}_complete(){const n=this.observables,e=n.length;if(0===e)this.destination.complete();else{for(let i=0;ithis.index}hasCompleted(){return this.array.length===this.index}}class F3e extends Y{constructor(n,e,i){super(n),this.parent=e,this.observable=i,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}[Fo](){return this}next(){const n=this.buffer;return 0===n.length&&this.isComplete?{value:null,done:!0}:{value:n.shift(),done:!1}}hasValue(){return this.buffer.length>0}hasCompleted(){return 0===this.buffer.length&&this.isComplete}notifyComplete(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()}notifyNext(n){this.buffer.push(n),this.parent.checkIterators()}subscribe(){return Ne(this.observable,new Ml(this))}}function Ko(t){return n=>n.lift(new j3e(t))}class j3e{constructor(n){this.notifier=n}call(n,e){const i=new R3e(n),r=Ne(this.notifier,new Ml(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class R3e extends Y{constructor(n){super(n),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function K3(...t){return n=>{let e;return"function"==typeof t[t.length-1]&&(e=t.pop()),n.lift(new L3e(t,e))}}class L3e{constructor(n,e){this.observables=n,this.project=e}call(n,e){return e.subscribe(new $3e(n,this.observables,this.project))}}class $3e extends qM{constructor(n,e,i){super(n),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(n){if(0===this.toRespond.length){const e=[n,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(n){let e;try{e=this.project.apply(this,n)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class Nu{constructor(n,e,i){this.kind=n,this.value=e,this.error=i,this.hasValue="N"===n}observe(n){switch(this.kind){case"N":return n.next&&n.next(this.value);case"E":return n.error&&n.error(this.error);case"C":return n.complete&&n.complete()}}do(n,e,i){switch(this.kind){case"N":return n&&n(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(n,e,i){return n&&"function"==typeof n.next?this.observe(n):this.do(n,e,i)}toObservable(){switch(this.kind){case"N":return Rn(this.value);case"E":return sm(this.error);case"C":return sC()}throw new Error("unexpected notification kind value")}static createNext(n){return typeof n<"u"?new Nu("N",n):Nu.undefinedValueNotification}static createError(n){return new Nu("E",void 0,n)}static createComplete(){return Nu.completeNotification}}function Q3(t,n=XC){const i=function B3e(t){return t instanceof Date&&!isNaN(+t)}(t)?+t-n.now():Math.abs(t);return r=>r.lift(new V3e(i,n))}Nu.completeNotification=new Nu("C"),Nu.undefinedValueNotification=new Nu("N",void 0);class V3e{constructor(n,e){this.delay=n,this.scheduler=e}call(n,e){return e.subscribe(new Z3(n,this.delay,this.scheduler))}}class Z3 extends F{constructor(n,e,i){super(n),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(n){const e=n.source,i=e.queue,r=n.scheduler,o=n.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(n,s)}else this.unsubscribe(),e.active=!1}_schedule(n){this.active=!0,this.destination.add(n.schedule(Z3.dispatch,this.delay,{source:this,destination:this.destination,scheduler:n}))}scheduleNotification(n){if(!0===this.errored)return;const e=this.scheduler,i=new H3e(e.now()+this.delay,n);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(n){this.scheduleNotification(Nu.createNext(n))}_error(n){this.errored=!0,this.queue=[],this.destination.error(n),this.unsubscribe()}_complete(){this.scheduleNotification(Nu.createComplete()),this.unsubscribe()}}class H3e{constructor(n,e){this.time=n,this.notification=e}}class z3e{constructor(n){this.total=n}call(n,e){return e.subscribe(new G3e(n,this.total))}}class G3e extends F{constructor(n,e){super(n),this.total=e,this.count=0}_next(n){++this.count>this.total&&this.destination.next(n)}}var W3e={left:"right",right:"left",bottom:"top",top:"bottom"};function QC(t){return t.replace(/left|right|bottom|top/g,function(n){return W3e[n]})}function Hd(t){return t.split("-")[0]}var q3e={start:"end",end:"start"};function uU(t){return t.replace(/start|end/g,function(n){return q3e[n]})}var fc="top",Fu="bottom",Pu="right",pc="left",eO="auto",Wy=[fc,Fu,Pu,pc],Tv="start",qy="end",Y3e="clippingParents",dU="viewport",Yy="popper",X3e="reference",hU=Wy.reduce(function(t,n){return t.concat([n+"-"+Tv,n+"-"+qy])},[]),fU=[].concat(Wy,[eO]).reduce(function(t,n){return t.concat([n,n+"-"+Tv,n+"-"+qy])},[]),oOe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function mc(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function fm(t){return t instanceof mc(t).Element||t instanceof Element}function Wc(t){return t instanceof mc(t).HTMLElement||t instanceof HTMLElement}function tO(t){return!(typeof ShadowRoot>"u")&&(t instanceof mc(t).ShadowRoot||t instanceof ShadowRoot)}function Uf(t){return((fm(t)?t.ownerDocument:t.document)||window.document).documentElement}var pm=Math.max,ZC=Math.min,Ev=Math.round;function nO(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function pU(){return!/^((?!chrome|android).)*safari/i.test(nO())}function Av(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),r=1,o=1;n&&Wc(t)&&(r=t.offsetWidth>0&&Ev(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ev(i.height)/t.offsetHeight||1);var a=(fm(t)?mc(t):window).visualViewport,l=!pU()&&e,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function iO(t){var n=mc(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function rO(t){return Av(Uf(t)).left+iO(t).scrollLeft}function qh(t){return mc(t).getComputedStyle(t)}function Ud(t){return t?(t.nodeName||"").toLowerCase():null}function e2(t){return"html"===Ud(t)?t:t.assignedSlot||t.parentNode||(tO(t)?t.host:null)||Uf(t)}function oO(t){var n=qh(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function mU(t){return["html","body","#document"].indexOf(Ud(t))>=0?t.ownerDocument.body:Wc(t)&&oO(t)?t:mU(e2(t))}function Xy(t,n){var e;void 0===n&&(n=[]);var i=mU(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=mc(i),s=r?[o].concat(o.visualViewport||[],oO(i)?i:[]):i,a=n.concat(s);return r?a:a.concat(Xy(e2(s)))}function lOe(t){return["table","td","th"].indexOf(Ud(t))>=0}function gU(t){return Wc(t)&&"fixed"!==qh(t).position?t.offsetParent:null}function Jy(t){for(var n=mc(t),e=gU(t);e&&lOe(e)&&"static"===qh(e).position;)e=gU(e);return e&&("html"===Ud(e)||"body"===Ud(e)&&"static"===qh(e).position)?n:e||function cOe(t){var n=/firefox/i.test(nO());if(/Trident/i.test(nO())&&Wc(t)&&"fixed"===qh(t).position)return null;var r=e2(t);for(tO(r)&&(r=r.host);Wc(r)&&["html","body"].indexOf(Ud(r))<0;){var o=qh(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||n&&"filter"===o.willChange||n&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(t)||n}function vU(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&tO(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function sO(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function yU(t,n,e){return n===dU?sO(function sOe(t,n){var e=mc(t),i=Uf(t),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=pU();(c||!c&&"fixed"===n)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+rO(t),y:l}}(t,e)):fm(n)?function uOe(t,n){var e=Av(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):sO(function aOe(t){var n,e=Uf(t),i=iO(t),r=null==(n=t.ownerDocument)?void 0:n.body,o=pm(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=pm(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+rO(t),l=-i.scrollTop;return"rtl"===qh(r||e).direction&&(a+=pm(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Uf(t)))}function Mv(t){return t.split("-")[1]}function aO(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function _U(t){var l,n=t.reference,e=t.element,i=t.placement,r=i?Hd(i):null,o=i?Mv(i):null,s=n.x+n.width/2-e.width/2,a=n.y+n.height/2-e.height/2;switch(r){case fc:l={x:s,y:n.y-e.height};break;case Fu:l={x:s,y:n.y+n.height};break;case Pu:l={x:n.x+n.width,y:a};break;case pc:l={x:n.x-e.width,y:a};break;default:l={x:n.x,y:n.y}}var c=r?aO(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Tv:l[c]=l[c]-(n[u]/2-e[u]/2);break;case qy:l[c]=l[c]+(n[u]/2-e[u]/2)}}return l}function xU(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function wU(t,n){return n.reduce(function(e,i){return e[i]=t,e},{})}function lO(t,n){void 0===n&&(n={});var i=n.placement,r=void 0===i?t.placement:i,o=n.strategy,s=void 0===o?t.strategy:o,a=n.boundary,l=void 0===a?Y3e:a,c=n.rootBoundary,u=void 0===c?dU:c,d=n.elementContext,h=void 0===d?Yy:d,f=n.altBoundary,p=void 0!==f&&f,m=n.padding,g=void 0===m?0:m,v=xU("number"!=typeof g?g:wU(g,Wy)),b=t.rects.popper,C=t.elements[p?h===Yy?X3e:Yy:h],k=function hOe(t,n,e,i){var r="clippingParents"===n?function dOe(t){var n=Xy(e2(t)),i=["absolute","fixed"].indexOf(qh(t).position)>=0&&Wc(t)?Jy(t):t;return fm(i)?n.filter(function(r){return fm(r)&&vU(r,i)&&"body"!==Ud(r)}):[]}(t):[].concat(n),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=yU(t,c,i);return l.top=pm(u.top,l.top),l.right=ZC(u.right,l.right),l.bottom=ZC(u.bottom,l.bottom),l.left=pm(u.left,l.left),l},yU(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(fm(C)?C:C.contextElement||Uf(t.elements.popper),l,u,s),D=Av(t.elements.reference),L=_U({reference:D,element:b,strategy:"absolute",placement:r}),z=sO(Object.assign({},b,L)),R=h===Yy?z:D,U={top:k.top-R.top+v.top,bottom:R.bottom-k.bottom+v.bottom,left:k.left-R.left+v.left,right:R.right-k.right+v.right},G=t.modifiersData.offset;if(h===Yy&&G){var X=G[r];Object.keys(U).forEach(function(te){var P=[Pu,Fu].indexOf(te)>=0?1:-1,W=[fc,Fu].indexOf(te)>=0?"y":"x";U[te]+=X[W]*P})}return U}const gOe={name:"flip",enabled:!0,phase:"main",fn:function mOe(t){var n=t.state,e=t.options,i=t.name;if(!n.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,f=e.flipVariations,p=void 0===f||f,m=e.allowedAutoPlacements,g=n.options.placement,v=Hd(g),b=l||(v!==g&&p?function pOe(t){if(Hd(t)===eO)return[];var n=QC(t);return[uU(t),n,uU(n)]}(g):[QC(g)]),C=[g].concat(b).reduce(function(re,he){return re.concat(Hd(he)===eO?function fOe(t,n){void 0===n&&(n={});var r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?fU:l,u=Mv(n.placement),d=u?a?hU:hU.filter(function(p){return Mv(p)===u}):Wy,h=d.filter(function(p){return c.indexOf(p)>=0});0===h.length&&(h=d);var f=h.reduce(function(p,m){return p[m]=lO(t,{placement:m,boundary:r,rootBoundary:o,padding:s})[Hd(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}(n,{placement:he,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):he)},[]),k=n.rects.reference,D=n.rects.popper,L=new Map,z=!0,R=C[0],U=0;U=0,W=P?"width":"height",J=lO(n,{placement:G,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),H=P?te?Pu:pc:te?Fu:fc;k[W]>D[W]&&(H=QC(H));var le=QC(H),E=[];if(o&&E.push(J[X]<=0),a&&E.push(J[H]<=0,J[le]<=0),E.every(function(re){return re})){R=G,z=!1;break}L.set(G,E)}if(z)for(var N=function(he){var Oe=C.find(function(_e){var Xe=L.get(_e);if(Xe)return Xe.slice(0,he).every(function(Le){return Le})});if(Oe)return R=Oe,"break"},q=p?3:1;q>0&&"break"!==N(q);q--);n.placement!==R&&(n.modifiersData[i]._skip=!0,n.placement=R,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Ky(t,n,e){return pm(t,ZC(n,e))}function cO(t){var n=Av(t),e=t.offsetWidth,i=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}const bOe={name:"preventOverflow",enabled:!0,phase:"main",fn:function _Oe(t){var n=t.state,e=t.options,i=t.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,f=void 0===h||h,p=e.tetherOffset,m=void 0===p?0:p,g=lO(n,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),v=Hd(n.placement),y=Mv(n.placement),b=!y,C=aO(v),k=function vOe(t){return"x"===t?"y":"x"}(C),D=n.modifiersData.popperOffsets,L=n.rects.reference,z=n.rects.popper,R="function"==typeof m?m(Object.assign({},n.rects,{placement:n.placement})):m,U="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),G=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,X={x:0,y:0};if(D){if(o){var te,P="y"===C?fc:pc,W="y"===C?Fu:Pu,J="y"===C?"height":"width",H=D[C],le=H+g[P],E=H-g[W],I=f?-z[J]/2:0,N=y===Tv?L[J]:z[J],q=y===Tv?-z[J]:-L[J],V=n.elements.arrow,re=f&&V?cO(V):{width:0,height:0},he=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Oe=he[P],_e=he[W],Xe=Ky(0,L[J],re[J]),Le=b?L[J]/2-I-Xe-Oe-U.mainAxis:N-Xe-Oe-U.mainAxis,rt=b?-L[J]/2+I+Xe+_e+U.mainAxis:q+Xe+_e+U.mainAxis,B=n.elements.arrow&&Jy(n.elements.arrow),ie=null!=(te=G?.[C])?te:0,Ye=H+rt-ie,je=Ky(f?ZC(le,H+Le-ie-(B?"y"===C?B.clientTop||0:B.clientLeft||0:0)):le,H,f?pm(E,Ye):E);D[C]=je,X[C]=je-H}if(a){var yt,Hn=D[k],Zt="y"===k?"height":"width",Ei=Hn+g["x"===C?fc:pc],ln=Hn-g["x"===C?Fu:Pu],ur=-1!==[fc,pc].indexOf(v),wr=null!=(yt=G?.[k])?yt:0,or=ur?Ei:Hn-L[Zt]-z[Zt]-wr+U.altAxis,mr=ur?Hn+L[Zt]+z[Zt]-wr-U.altAxis:ln,gi=f&&ur?function yOe(t,n,e){var i=Ky(t,n,e);return i>e?e:i}(or,Hn,mr):Ky(f?or:Ei,Hn,f?mr:ln);D[k]=gi,X[k]=gi-Hn}n.modifiersData[i]=X}},requiresIfExists:["offset"]};const SOe={name:"arrow",enabled:!0,phase:"main",fn:function wOe(t){var n,e=t.state,i=t.name,r=t.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=Hd(e.placement),l=aO(a),u=[pc,Pu].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(n,e){return xU("number"!=typeof(n="function"==typeof n?n(Object.assign({},e.rects,{placement:e.placement})):n)?n:wU(n,Wy))}(r.padding,e),h=cO(o),f="y"===l?fc:pc,p="y"===l?Fu:Pu,m=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],g=s[l]-e.rects.reference[l],v=Jy(o),y=v?"y"===l?v.clientHeight||0:v.clientWidth||0:0,D=y/2-h[u]/2+(m/2-g/2),L=Ky(d[f],D,y-h[u]-d[p]);e.modifiersData[i]=((n={})[l]=L,n.centerOffset=L-D,n)}},effect:function COe(t){var n=t.state,i=t.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=n.elements.popper.querySelector(r))||vU(n.elements.popper,r)&&(n.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function EOe(t,n,e){void 0===e&&(e=!1);var i=Wc(n),r=Wc(n)&&function TOe(t){var n=t.getBoundingClientRect(),e=Ev(n.width)/t.offsetWidth||1,i=Ev(n.height)/t.offsetHeight||1;return 1!==e||1!==i}(n),o=Uf(n),s=Av(t,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==Ud(n)||oO(o))&&(a=function DOe(t){return t!==mc(t)&&Wc(t)?function kOe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}(t):iO(t)}(n)),Wc(n)?((l=Av(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):o&&(l.x=rO(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function AOe(t){var n=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=n.get(a);l&&r(l)}}),i.push(o)}return t.forEach(function(o){n.set(o.name,o)}),t.forEach(function(o){e.has(o.name)||r(o)}),i}function OOe(t){var n;return function(){return n||(n=new Promise(function(e){Promise.resolve().then(function(){n=void 0,e(t())})})),n}}var CU={placement:"bottom",modifiers:[],strategy:"absolute"};function SU(){for(var t=arguments.length,n=new Array(t),e=0;e=0?-1:1,o="function"==typeof e?e(Object.assign({},n,{placement:t})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[pc,Pu].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,n.rects,o),u},{}),a=s[n.placement],c=a.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=a.x,n.modifiersData.popperOffsets.y+=c),n.modifiersData[i]=s}};function XOe(t,n){}function JOe(t,n){if(1&t&&(_(0,"button",3),O(1),Z(2,XOe,0,0,"ng-template",4),x()),2&t){const e=n.$implicit;S("ngbPanelToggle",e),w(1),mn(" ",e.title," "),w(1),S("ngTemplateOutlet",null==e.titleTpl?null:e.titleTpl.templateRef)}}function KOe(t,n){}function QOe(t,n){}function ZOe(t,n){if(1&t){const e=vt();_(0,"div",8),ye("ngbRef",function(r){return Be(e),Ve($().$implicit.panelDiv=r)}),_(1,"div",9),Z(2,QOe,0,0,"ng-template",4),x()()}if(2&t){const e=$().$implicit;Ph("id",e.id),ut("aria-labelledby",e.id+"-header"),w(2),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)}}const eIe=function(t,n){return{$implicit:t,opened:n}};function tIe(t,n){if(1&t&&(_(0,"div")(1,"div",5),Z(2,KOe,0,0,"ng-template",6),x(),Z(3,ZOe,3,3,"div",7),x()),2&t){const e=n.$implicit,i=$(),r=Ta(1);Pd("accordion-item "+(e.cardClass||"")),w(1),Pd("accordion-header "+(e.type?"bg-"+e.type:i.type?"bg-"+i.type:"")),Kp("id","",e.id,"-header"),w(1),S("ngTemplateOutlet",(null==e.headerTpl?null:e.headerTpl.templateRef)||r)("ngTemplateOutletContext",Mr(8,eIe,e,e.isOpen)),w(1),S("ngIf",!i.destroyOnHide||e.isOpen||e.transitionRunning)}}function nIe(t,n){if(1&t){const e=vt();_(0,"button",1),ye("click",function(){return Be(e),Ve($().close())}),x()}}const Qy=["*"];function iIe(t,n){if(1&t){const e=vt();_(0,"button",6),ye("click",function(){const o=Be(e).$implicit,s=$();return s.focus(),Ve(s.select(o.id,s.NgbSlideEventSource.INDICATOR))}),x()}if(2&t){const e=n.$implicit,i=$();jn("active",e.id===i.activeId),ut("aria-labelledby","slide-"+e.id)("aria-controls","slide-"+e.id)("aria-selected",e.id===i.activeId)}}function rIe(t,n){}function oIe(t,n){if(1&t&&(_(0,"div",7)(1,"span",8),Ea(2,9),x(),Z(3,rIe,0,0,"ng-template",10),x()),2&t){const e=n.$implicit,i=n.index,r=n.count;S("id","slide-"+e.id),w(2),cv(i+1)(r),ey(2),w(1),S("ngTemplateOutlet",e.tplRef)}}function sIe(t,n){if(1&t){const e=vt();_(0,"button",11),ye("click",function(){return Be(e),Ve($().arrowLeft())}),pe(1,"span",12),_(2,"span",8),Ea(3,13),x()()}}function aIe(t,n){if(1&t){const e=vt();_(0,"button",14),ye("click",function(){return Be(e),Ve($().arrowRight())}),pe(1,"span",15),_(2,"span",8),Ea(3,16),x()()}}const lIe=["ngbDatepickerDayView",""],cIe=["month"],uIe=["year"];function dIe(t,n){if(1&t&&(_(0,"option",5),O(1),x()),2&t){const e=n.$implicit,i=$();S("value",e),ut("aria-label",i.i18n.getMonthFullName(e,i.date.year)),w(1),bt(i.i18n.getMonthShortName(e,i.date.year))}}function hIe(t,n){if(1&t&&(_(0,"option",5),O(1),x()),2&t){const e=n.$implicit,i=$();S("value",e),w(1),bt(i.i18n.getYearNumerals(e))}}function fIe(t,n){if(1&t){const e=vt();_(0,"ngb-datepicker-navigation-select",7),ye("select",function(r){return Be(e),Ve($().select.emit(r))}),x()}if(2&t){const e=$();S("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function pIe(t,n){1&t&&pe(0,"div",0)}function mIe(t,n){1&t&&pe(0,"div",0)}function gIe(t,n){if(1&t&&(Z(0,pIe,1,0,"div",9),_(1,"div",10),O(2),x(),Z(3,mIe,1,0,"div",9)),2&t){const e=n.$implicit,i=n.index,r=$(2);S("ngIf",i>0),w(2),mn(" ",r.i18n.getMonthLabel(e.firstDate)," "),w(1),S("ngIf",i!==r.months.length-1)}}function vIe(t,n){1&t&&Z(0,gIe,4,3,"ng-template",8),2&t&&S("ngForOf",$().months)}function yIe(t,n){if(1&t&&(_(0,"div",5),O(1),x()),2&t){const e=$(2);w(1),bt(e.i18n.getWeekLabel())}}function _Ie(t,n){if(1&t&&(_(0,"div",6),O(1),x()),2&t){const e=n.$implicit;w(1),bt(e)}}function bIe(t,n){if(1&t&&(_(0,"div",2),Z(1,yIe,2,1,"div",3),Z(2,_Ie,2,1,"div",4),x()),2&t){const e=$();w(1),S("ngIf",e.datepicker.showWeekNumbers),w(1),S("ngForOf",e.viewModel.weekdays)}}function xIe(t,n){if(1&t&&(_(0,"div",11),O(1),x()),2&t){const e=$(2).$implicit,i=$();w(1),bt(i.i18n.getWeekNumerals(e.number))}}function wIe(t,n){}function CIe(t,n){if(1&t&&Z(0,wIe,0,0,"ng-template",14),2&t){const e=$().$implicit;S("ngTemplateOutlet",$(3).datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function SIe(t,n){if(1&t){const e=vt();_(0,"div",12),ye("click",function(r){const s=Be(e).$implicit;return $(3).doSelect(s),Ve(r.preventDefault())}),Z(1,CIe,1,2,"ng-template",13),x()}if(2&t){const e=n.$implicit;jn("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),S("tabindex",e.tabindex),ut("aria-label",e.ariaLabel),w(1),S("ngIf",!e.hidden)}}function kIe(t,n){if(1&t&&(_(0,"div",8),Z(1,xIe,2,1,"div",9),Z(2,SIe,2,9,"div",10),x()),2&t){const e=$().$implicit,i=$();w(1),S("ngIf",i.datepicker.showWeekNumbers),w(1),S("ngForOf",e.days)}}function DIe(t,n){1&t&&Z(0,kIe,3,2,"div",7),2&t&&S("ngIf",!n.$implicit.collapsed)}const TIe=["defaultDayTemplate"],EIe=["content"];function AIe(t,n){if(1&t&&pe(0,"div",8),2&t){const i=n.currentMonth,r=n.selected,o=n.disabled,s=n.focused;S("date",n.date)("currentMonth",i)("selected",r)("disabled",o)("focused",s)}}function MIe(t,n){if(1&t&&(_(0,"div",13),O(1),x()),2&t){const e=$().$implicit,i=$(2);w(1),mn(" ",i.i18n.getMonthLabel(e.firstDate)," ")}}function OIe(t,n){if(1&t&&(_(0,"div",10),Z(1,MIe,2,1,"div",11),pe(2,"ngb-datepicker-month",12),x()),2&t){const e=n.$implicit,i=$(2);w(1),S("ngIf","none"===i.navigation||i.displayMonths>1&&"select"===i.navigation),w(1),S("month",e.firstDate)}}function IIe(t,n){1&t&&Z(0,OIe,3,2,"div",9),2&t&&S("ngForOf",$().model.months)}function NIe(t,n){if(1&t){const e=vt();_(0,"ngb-datepicker-navigation",14),ye("navigate",function(r){return Be(e),Ve($().onNavigateEvent(r))})("select",function(r){return Be(e),Ve($().onNavigateDateSelect(r))}),x()}if(2&t){const e=$();S("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect","select"===e.model.navigation)("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function FIe(t,n){}function PIe(t,n){}const DU=function(t){return{$implicit:t}},jIe=["dialog"],RIe=["ngbNavOutlet",""];function LIe(t,n){}function $Ie(t,n){if(1&t&&(_(0,"div",2),Z(1,LIe,0,0,"ng-template",3),x()),2&t){const e=$().$implicit,i=$();S("item",e)("nav",i.nav)("role",i.paneRole),w(1),S("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",sr(5,DU,e.active||i.isPanelTransitioning(e)))}}function BIe(t,n){if(1&t&&Z(0,$Ie,2,7,"div",1),2&t){const e=n.$implicit,i=$();S("ngIf",e.isPanelInDom()||i.isPanelTransitioning(e))}}function VIe(t,n){1&t&&(_(0,"span",9),Ea(1,10),x())}function HIe(t,n){1&t&&(_(0,"span",9),Ea(1,11),x())}function UIe(t,n){1&t&&(_(0,"span",9),Ea(1,12),x())}function zIe(t,n){1&t&&(_(0,"span",9),Ea(1,13),x())}function GIe(t,n){1&t&&O(0,"...")}function WIe(t,n){1&t&&O(0),2&t&&bt(n.$implicit)}function qIe(t,n){}const YIe=function(t){return{disabled:!0,currentPage:t}};function XIe(t,n){if(1&t&&(_(0,"a",18),Z(1,qIe,0,0,"ng-template",8),x()),2&t){const e=$(2).$implicit,i=$(),r=Ta(9);w(1),S("ngTemplateOutlet",(null==i.tplEllipsis?null:i.tplEllipsis.templateRef)||r)("ngTemplateOutletContext",sr(2,YIe,e))}}function JIe(t,n){}const KIe=function(t,n,e){return{disabled:t,$implicit:n,currentPage:e}};function QIe(t,n){if(1&t){const e=vt();_(0,"a",19),ye("click",function(r){Be(e);const o=$().$implicit;return $(2).selectPage(o),Ve(r.preventDefault())}),Z(1,JIe,0,0,"ng-template",8),x()}if(2&t){const e=$().$implicit,i=$(),r=i.disabled,o=i.$implicit,s=$(),a=Ta(11);ut("tabindex",r?"-1":null)("aria-disabled",r?"true":null),w(1),S("ngTemplateOutlet",(null==s.tplNumber?null:s.tplNumber.templateRef)||a)("ngTemplateOutletContext",ty(4,KIe,r,e,o))}}function ZIe(t,n){if(1&t&&(_(0,"li",15),Z(1,XIe,2,4,"a",16),Z(2,QIe,2,8,"a",17),x()),2&t){const e=n.$implicit,i=$(),r=i.$implicit,o=i.disabled,s=$();jn("active",e===r)("disabled",s.isEllipsis(e)||o),ut("aria-current",e===r?"page":null),w(1),S("ngIf",s.isEllipsis(e)),w(1),S("ngIf",!s.isEllipsis(e))}}function eNe(t,n){1&t&&Z(0,ZIe,3,7,"li",14),2&t&&S("ngForOf",n.pages)}function tNe(t,n){}const uO=function(t,n){return{disabled:t,currentPage:n}};function nNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",20),ye("click",function(r){return Be(e),$().selectPage(1),Ve(r.preventDefault())}),Z(2,tNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(1);jn("disabled",e.previousDisabled()),w(1),ut("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplFirst?null:e.tplFirst.templateRef)||i)("ngTemplateOutletContext",Mr(6,uO,e.previousDisabled(),e.page))}}function iNe(t,n){}const rNe=function(t){return{disabled:t}};function oNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",21),ye("click",function(r){Be(e);const o=$();return o.selectPage(o.page-1),Ve(r.preventDefault())}),Z(2,iNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(3);jn("disabled",e.previousDisabled()),w(1),ut("tabindex",e.previousDisabled()?"-1":null)("aria-disabled",e.previousDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplPrevious?null:e.tplPrevious.templateRef)||i)("ngTemplateOutletContext",sr(6,rNe,e.previousDisabled()))}}function sNe(t,n){}function aNe(t,n){}function lNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",22),ye("click",function(r){Be(e);const o=$();return o.selectPage(o.page+1),Ve(r.preventDefault())}),Z(2,aNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(5);jn("disabled",e.nextDisabled()),w(1),ut("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplNext?null:e.tplNext.templateRef)||i)("ngTemplateOutletContext",Mr(6,uO,e.nextDisabled(),e.page))}}function cNe(t,n){}function uNe(t,n){if(1&t){const e=vt();_(0,"li",15)(1,"a",23),ye("click",function(r){Be(e);const o=$();return o.selectPage(o.pageCount),Ve(r.preventDefault())}),Z(2,cNe,0,0,"ng-template",8),x()()}if(2&t){const e=$(),i=Ta(7);jn("disabled",e.nextDisabled()),w(1),ut("tabindex",e.nextDisabled()?"-1":null)("aria-disabled",e.nextDisabled()?"true":null),w(1),S("ngTemplateOutlet",(null==e.tplLast?null:e.tplLast.templateRef)||i)("ngTemplateOutletContext",Mr(6,uO,e.nextDisabled(),e.page))}}const dNe=function(t,n,e){return{$implicit:t,pages:n,disabled:e}};function pNe(t,n){if(1&t&&(_(0,"span"),Ea(1,1),vA(2,"percent"),x()),2&t){const e=$();w(2),cv(yA(2,1,e.getValue()/e.max)),ey(1)}}function mNe(t,n){1&t&&O(0),2&t&&bt(100===n.fill?"\u2605":"\u2606")}function gNe(t,n){}function vNe(t,n){if(1&t){const e=vt();_(0,"span",2),O(1),x(),_(2,"span",3),ye("mouseenter",function(){const o=Be(e).index;return Ve($().enter(o+1))})("click",function(){const o=Be(e).index;return Ve($().handleClick(o+1))}),Z(3,gNe,0,0,"ng-template",4),x()}if(2&t){const e=n.index,i=$(),r=Ta(1);w(1),mn("(",e=12)("ngIfElse",e)}}function MNe(t,n){if(1&t&&(_(0,"strong",3),O(1),x()),2&t){const e=$();w(1),bt(e.header)}}function ONe(t,n){}function INe(t,n){if(1&t){const e=vt();_(0,"div",4),Z(1,ONe,0,0,"ng-template",5),_(2,"button",6),ye("click",function(){return Be(e),Ve($().hide())}),x()()}if(2&t){const e=$(),i=Ta(1);w(1),S("ngTemplateOutlet",e.contentHeaderTpl||i)}}function NNe(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$().$implicit;Pd($().highlightClass),w(1),bt(e)}}function FNe(t,n){1&t&&O(0),2&t&&bt($().$implicit)}function PNe(t,n){if(1&t&&(Z(0,NNe,2,3,"span",1),Z(1,FNe,1,1,"ng-template",null,2,cs)),2&t){const e=n.odd,i=Ta(2);S("ngIf",e)("ngIfElse",i)}}function Pa(t){return parseInt(`${t}`,10)}function TU(t){return null!=t?`${t}`:""}function n2(t,n,e=0){return Math.max(Math.min(t,n),e)}function mm(t){return"string"==typeof t}function ds(t){return!isNaN(Pa(t))}function Qo(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function gm(t){return null!=t}function Ov(t){return ds(t)?`0${t}`.slice(-2):""}function AU(t,n){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(n)>=0}function Iv(t){return(t||document.body).getBoundingClientRect()}function MU(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}const OU={animation:!0,transitionTimerDelayMs:5},HNe=()=>{},{transitionTimerDelayMs:UNe}=OU,Zy=new Map,ea=(t,n,e,i)=>{let r=i.context||{};const o=Zy.get(n);if(o)switch(i.runningTransition){case"continue":return Uh;case"stop":t.run(()=>o.transition$.complete()),r=Object.assign(o.context,r),Zy.delete(n)}const s=e(n,i.animation,r)||HNe;if(!i.animation||"none"===window.getComputedStyle(n).transitionProperty)return t.run(()=>s()),Rn(void 0).pipe(function BNe(t){return n=>new en(e=>n.subscribe({next:s=>t.run(()=>e.next(s)),error:s=>t.run(()=>e.error(s)),complete:()=>t.run(()=>e.complete())}))}(t));const a=new dr,l=new dr,c=a.pipe(function P3e(...t){return n=>oC(n,Rn(...t))}(!0));Zy.set(n,{transition$:a,complete:()=>{l.next(),l.complete()},context:r});const u=function VNe(t){const{transitionDelay:n,transitionDuration:e}=window.getComputedStyle(t);return 1e3*(parseFloat(n)+parseFloat(e))}(n);return t.runOutsideAngular(()=>{const d=Fa(n,"transitionend").pipe(Ko(c),us(({target:f})=>f===n));lU(Gy(u+UNe).pipe(Ko(c)),d,l).pipe(Ko(c)).subscribe(()=>{Zy.delete(n),t.run(()=>{s(),a.next(),a.complete()})})}),a.asObservable()},dO=(t,n,e)=>{let{direction:i,maxSize:r,dimension:o}=e;const{classList:s}=t;function a(){s.add("collapse"),"show"===i?s.add("show"):s.remove("show")}if(n)return r||(r=function GNe(t,n){if(typeof navigator>"u")return"0px";const{classList:e}=t,i=e.contains("show");i||e.add("show"),t.style[n]="";const r=t.getBoundingClientRect()[n]+"px";return i||e.remove("show"),r}(t,o),e.maxSize=r,t.style[o]="show"!==i?r:"0px",s.remove("collapse"),s.remove("collapsing"),s.remove("show"),Iv(t),s.add("collapsing")),t.style[o]="show"===i?r:"0px",()=>{a(),s.remove("collapsing"),t.style[o]=""};a()};let zf=(()=>{class t{constructor(){this.animation=OU.animation}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IU=(()=>{class t{constructor(e){this._ngbConfig=e,this.closeOthers=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),WNe=0,hO=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPanelHeader",""]],standalone:!0}),t})(),NU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPanelTitle",""]],standalone:!0}),t})(),FU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPanelContent",""]],standalone:!0}),t})(),fO=(()=>{class t{constructor(){this.disabled=!1,this.id="ngb-panel-"+WNe++,this.isOpen=!1,this.initClassDone=!1,this.transitionRunning=!1,this.shown=new it,this.hidden=new it}ngAfterContentChecked(){this.titleTpl=this.titleTpls.first,this.headerTpl=this.headerTpls.first,this.contentTpl=this.contentTpls.first}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["ngb-panel"]],contentQueries:function(e,i,r){if(1&e&&(yi(r,NU,4),yi(r,hO,4),yi(r,FU,4)),2&e){let o;wn(o=Cn())&&(i.titleTpls=o),wn(o=Cn())&&(i.headerTpls=o),wn(o=Cn())&&(i.contentTpls=o)}},inputs:{disabled:"disabled",id:"id",title:"title",type:"type",cardClass:"cardClass"},outputs:{shown:"shown",hidden:"hidden"},standalone:!0}),t})(),qNe=(()=>{class t{constructor(e){this._El=e,this.ngbRef=new it}ngOnInit(){this.ngbRef.emit(this._El.nativeElement)}ngOnDestroy(){this.ngbRef.emit(null)}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbRef",""]],outputs:{ngbRef:"ngbRef"},standalone:!0}),t})(),PU=(()=>{class t{constructor(e,i){this.accordion=e,this.panel=i}set ngbPanelToggle(e){e&&(this.panel=e)}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>pO)),de(fO,9))},t.\u0275dir=sn({type:t,selectors:[["button","ngbPanelToggle",""]],hostAttrs:["type","button"],hostVars:5,hostBindings:function(e,i){1&e&&ye("click",function(){return i.accordion.toggle(i.panel.id)}),2&e&&(Pl("disabled",i.panel.disabled),ut("aria-expanded",i.panel.isOpen)("aria-controls",i.panel.id),jn("collapsed",!i.panel.isOpen))},inputs:{ngbPanelToggle:"ngbPanelToggle"},standalone:!0}),t})(),pO=(()=>{class t{constructor(e,i,r){this._ngZone=i,this._changeDetector=r,this.activeIds=[],this.destroyOnHide=!0,this.panelChange=new it,this.shown=new it,this.hidden=new it,this.animation=e.animation,this.type=e.type,this.closeOtherPanels=e.closeOthers}isExpanded(e){return this.activeIds.indexOf(e)>-1}expand(e){this._changeOpenState(this._findPanelById(e),!0)}expandAll(){this.closeOtherPanels?0===this.activeIds.length&&this.panels.length&&this._changeOpenState(this.panels.first,!0):this.panels.forEach(e=>this._changeOpenState(e,!0))}collapse(e){this._changeOpenState(this._findPanelById(e),!1)}collapseAll(){this.panels.forEach(e=>{this._changeOpenState(e,!1)})}toggle(e){const i=this._findPanelById(e);i&&this._changeOpenState(i,!i.isOpen)}ngAfterContentChecked(){mm(this.activeIds)&&(this.activeIds=this.activeIds.split(/\s*,\s*/)),this.panels.forEach(e=>{e.isOpen=!e.disabled&&this.activeIds.indexOf(e.id)>-1}),this.activeIds.length>1&&this.closeOtherPanels&&(this._closeOthers(this.activeIds[0],!1),this._updateActiveIds()),this._ngZone.onStable.pipe(Ks(1)).subscribe(()=>{this.panels.forEach(e=>{const i=e.panelDiv;i?e.initClassDone||(e.initClassDone=!0,ea(this._ngZone,i,dO,{animation:!1,runningTransition:"continue",context:{direction:e.isOpen?"show":"hide",dimension:"height"}})):e.initClassDone=!1})})}_changeOpenState(e,i){if(null!=e&&!e.disabled&&e.isOpen!==i){let r=!1;this.panelChange.emit({panelId:e.id,nextState:i,preventDefault:()=>{r=!0}}),r||(e.isOpen=i,e.transitionRunning=!0,i&&this.closeOtherPanels&&this._closeOthers(e.id),this._updateActiveIds(),this._runTransitions(this.animation))}}_closeOthers(e,i=!0){this.panels.forEach(r=>{r.id!==e&&r.isOpen&&(r.isOpen=!1,r.transitionRunning=i)})}_findPanelById(e){return this.panels.find(i=>i.id===e)||null}_updateActiveIds(){this.activeIds=this.panels.filter(e=>e.isOpen&&!e.disabled).map(e=>e.id)}_runTransitions(e){this._changeDetector.detectChanges(),this.panels.forEach(i=>{i.transitionRunning&&ea(this._ngZone,i.panelDiv,dO,{animation:e,runningTransition:"stop",context:{direction:i.isOpen?"show":"hide",dimension:"height"}}).subscribe(()=>{i.transitionRunning=!1;const{id:o}=i;i.isOpen?(i.shown.emit(),this.shown.emit(o)):(i.hidden.emit(),this.hidden.emit(o))})})}}return t.\u0275fac=function(e){return new(e||t)(de(IU),de(nr),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-accordion"]],contentQueries:function(e,i,r){if(1&e&&yi(r,fO,4),2&e){let o;wn(o=Cn())&&(i.panels=o)}},hostAttrs:["role","tablist",1,"accordion"],hostVars:1,hostBindings:function(e,i){2&e&&ut("aria-multiselectable",!i.closeOtherPanels)},inputs:{animation:"animation",activeIds:"activeIds",closeOtherPanels:["closeOthers","closeOtherPanels"],destroyOnHide:"destroyOnHide",type:"type"},outputs:{panelChange:"panelChange",shown:"shown",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0,features:[Is],decls:3,vars:1,consts:[["ngbPanelHeader",""],["t",""],["ngFor","",3,"ngForOf"],[1,"accordion-button",3,"ngbPanelToggle"],[3,"ngTemplateOutlet"],["role","tab",3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","tabpanel",3,"id","ngbRef",4,"ngIf"],["role","tabpanel",3,"id","ngbRef"],[1,"accordion-body"]],template:function(e,i){1&e&&(Z(0,JOe,3,3,"ng-template",0,1,cs),Z(2,tIe,4,11,"ng-template",2)),2&e&&(w(2),S("ngForOf",i.panels))},dependencies:[Ln,Au,PU,qNe,hO,vn],encapsulation:2}),t})(),$U=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[pO]}),t})();const ZNe=({classList:t})=>{t.remove("show")};let eFe=(()=>{class t{constructor(e){this._ngbConfig=e,this.dismissible=!0,this.type="warning"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),po=(()=>{class t{constructor(e,i,r,o){this._renderer=i,this._element=r,this._zone=o,this.closed=new it,this.dismissible=e.dismissible,this.type=e.type,this.animation=e.animation}close(){const e=ea(this._zone,this._element.nativeElement,ZNe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>this.closed.emit()),e}ngOnChanges(e){const i=e.type;i&&!i.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${i.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${i.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}}return t.\u0275fac=function(e){return new(e||t)(de(eFe),de(ca),de(Si),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert","show"],hostVars:4,hostBindings:function(e,i){2&e&&jn("fade",i.animation)("alert-dismissible",i.dismissible)},inputs:{animation:"animation",dismissible:"dismissible",type:"type"},outputs:{closed:"closed"},exportAs:["ngbAlert"],standalone:!0,features:[Yn,Is],ngContentSelectors:Qy,decls:2,vars:1,consts:function(){let n;return n=$localize`:@@ngb.alert.close:Close`,[["type","button","class","btn-close","aria-label",n,3,"click",4,"ngIf"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kf(),Df(0),Z(1,nIe,1,0,"button",0)),2&e&&(w(1),S("ngIf",i.dismissible))},dependencies:[vn],styles:["ngb-alert{display:block}\n"],encapsulation:2,changeDetection:0}),t})(),BU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[po]}),t})();var Gf=(()=>(function(t){t.START="start",t.END="end"}(Gf||(Gf={})),Gf))();const VU=({classList:t})=>t.contains("carousel-item-start")||t.contains("carousel-item-end"),e_=t=>{t.remove("carousel-item-start"),t.remove("carousel-item-end")},i2=t=>{e_(t),t.remove("carousel-item-prev"),t.remove("carousel-item-next")},tFe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(VU(t)?e_(i):(i.add("carousel-item-"+(e===Gf.START?"next":"prev")),Iv(t),i.add("carousel-item-"+e)),()=>{i2(i),i.add("active")}):(e_(i),i2(i),void i.add("active"))},nFe=(t,n,{direction:e})=>{const{classList:i}=t;return n?(VU(t)?e_(i):i.add("carousel-item-"+e),()=>{i2(i),i.remove("active")}):(e_(i),i2(i),void i.remove("active"))};let iFe=(()=>{class t{constructor(e){this._ngbConfig=e,this.interval=5e3,this.wrap=!0,this.keyboard=!0,this.pauseOnHover=!0,this.pauseOnFocus=!0,this.showNavigationArrows=!0,this.showNavigationIndicators=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),rFe=0,oFe=(()=>{class t{constructor(e){this.tplRef=e,this.id="ngb-slide-"+rFe++,this.slid=new it}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbSlide",""]],inputs:{id:"id"},outputs:{slid:"slid"},standalone:!0}),t})(),sFe=(()=>{class t{constructor(e,i,r,o,s){this._platformId=i,this._ngZone=r,this._cd=o,this._container=s,this.NgbSlideEventSource=ym,this._destroy$=new dr,this._interval$=new Js(0),this._mouseHover$=new Js(!1),this._focused$=new Js(!1),this._pauseOnHover$=new Js(!1),this._pauseOnFocus$=new Js(!1),this._pause$=new Js(!1),this._wrap$=new Js(!1),this.slide=new it,this.slid=new it,this._transitionIds=null,this.animation=e.animation,this.interval=e.interval,this.wrap=e.wrap,this.keyboard=e.keyboard,this.pauseOnHover=e.pauseOnHover,this.pauseOnFocus=e.pauseOnFocus,this.showNavigationArrows=e.showNavigationArrows,this.showNavigationIndicators=e.showNavigationIndicators}set interval(e){this._interval$.next(e)}get interval(){return this._interval$.value}set wrap(e){this._wrap$.next(e)}get wrap(){return this._wrap$.value}set pauseOnHover(e){this._pauseOnHover$.next(e)}get pauseOnHover(){return this._pauseOnHover$.value}set pauseOnFocus(e){this._pauseOnFocus$.next(e)}get pauseOnFocus(){return this._pauseOnFocus$.value}set mouseHover(e){this._mouseHover$.next(e)}get mouseHover(){return this._mouseHover$.value}set focused(e){this._focused$.next(e)}get focused(){return this._focused$.value}arrowLeft(){this.focus(),this.prev(ym.ARROW_LEFT)}arrowRight(){this.focus(),this.next(ym.ARROW_RIGHT)}ngAfterContentInit(){p7(this._platformId)&&this._ngZone.runOutsideAngular(()=>{const e=rC([this.slide.pipe(_n(i=>i.current),aC(this.activeId)),this._wrap$,this.slides.changes.pipe(aC(null))]).pipe(_n(([i,r])=>{const o=this.slides.toArray(),s=this._getSlideIdxById(i);return r?o.length>1:si||r&&o||s&&a||!c?0:l),JC(),dc(i=>i>0?Gy(i,i):cU),Ko(this._destroy$)).subscribe(()=>this._ngZone.run(()=>this.next(ym.TIMER)))}),this.slides.changes.pipe(Ko(this._destroy$)).subscribe(()=>{this._transitionIds?.forEach(e=>(t=>{Zy.get(t)?.complete()})(this._getSlideElement(e))),this._transitionIds=null,this._cd.markForCheck(),this._ngZone.onStable.pipe(Ks(1)).subscribe(()=>{for(const{id:e}of this.slides){const i=this._getSlideElement(e);e===this.activeId?i.classList.add("active"):i.classList.remove("active")}})})}ngAfterContentChecked(){let e=this._getSlideById(this.activeId);this.activeId=e?e.id:this.slides.length?this.slides.first.id:""}ngAfterViewInit(){if(this.activeId){const e=this._getSlideElement(this.activeId);e&&e.classList.add("active")}}ngOnDestroy(){this._destroy$.next()}select(e,i){this._cycleToSelected(e,this._getSlideEventDirection(this.activeId,e),i)}prev(e){this._cycleToSelected(this._getPrevSlide(this.activeId),Gf.END,e)}next(e){this._cycleToSelected(this._getNextSlide(this.activeId),Gf.START,e)}pause(){this._pause$.next(!0)}cycle(){this._pause$.next(!1)}focus(){this._container.nativeElement.focus()}_cycleToSelected(e,i,r){const o=this._transitionIds;if(o&&(o[0]!==e||o[1]!==this.activeId))return;let s=this._getSlideById(e);if(s&&s.id!==this.activeId){this._transitionIds=[this.activeId,e],this.slide.emit({prev:this.activeId,current:s.id,direction:i,paused:this._pause$.value,source:r});const a={animation:this.animation,runningTransition:"stop",context:{direction:i}},l=[],c=this._getSlideById(this.activeId);if(c){const f=ea(this._ngZone,this._getSlideElement(c.id),nFe,a);f.subscribe(()=>{c.slid.emit({isShown:!1,direction:i,source:r})}),l.push(f)}const u=this.activeId;this.activeId=s.id;const d=this._getSlideById(this.activeId),h=ea(this._ngZone,this._getSlideElement(s.id),tFe,a);h.subscribe(()=>{d?.slid.emit({isShown:!0,direction:i,source:r})}),l.push(h),KC(...l).pipe(Ks(1)).subscribe(()=>{this._transitionIds=null,this.slid.emit({prev:u,current:s.id,direction:i,paused:this._pause$.value,source:r})})}this._cd.markForCheck()}_getSlideEventDirection(e,i){return this._getSlideIdxById(e)>this._getSlideIdxById(i)?Gf.END:Gf.START}_getSlideById(e){return this.slides.find(i=>i.id===e)||null}_getSlideIdxById(e){const i=this._getSlideById(e);return null!=i?this.slides.toArray().indexOf(i):-1}_getNextSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return r===i.length-1?this.wrap?i[0].id:i[i.length-1].id:i[r+1].id}_getPrevSlide(e){const i=this.slides.toArray(),r=this._getSlideIdxById(e);return 0===r?this.wrap?i[i.length-1].id:i[0].id:i[r-1].id}_getSlideElement(e){return this._container.nativeElement.querySelector(`#slide-${e}`)}}return t.\u0275fac=function(e){return new(e||t)(de(iFe),de(sy),de(nr),de(Ns),de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-carousel"]],contentQueries:function(e,i,r){if(1&e&&yi(r,oFe,4),2&e){let o;wn(o=Cn())&&(i.slides=o)}},hostAttrs:["tabIndex","0",1,"carousel","slide"],hostVars:3,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(){return i.keyboard&&i.arrowLeft()})("keydown.arrowRight",function(){return i.keyboard&&i.arrowRight()})("mouseenter",function(){return i.mouseHover=!0})("mouseleave",function(){return i.mouseHover=!1})("focusin",function(){return i.focused=!0})("focusout",function(){return i.focused=!1}),2&e&&(ut("aria-activedescendant","slide-"+i.activeId),tr("display","block"))},inputs:{animation:"animation",activeId:"activeId",interval:"interval",wrap:"wrap",keyboard:"keyboard",pauseOnHover:"pauseOnHover",pauseOnFocus:"pauseOnFocus",showNavigationArrows:"showNavigationArrows",showNavigationIndicators:"showNavigationIndicators"},outputs:{slide:"slide",slid:"slid"},exportAs:["ngbCarousel"],standalone:!0,features:[Is],decls:6,vars:6,consts:function(){let n,e,i;return n=$localize`:Currently selected slide number read by screen reader@@ngb.carousel.slide-number: Slide ${"\ufffd0\ufffd"}:INTERPOLATION: of ${"\ufffd1\ufffd"}:INTERPOLATION_1: `,e=$localize`:@@ngb.carousel.previous:Previous`,i=$localize`:@@ngb.carousel.next:Next`,[["role","tablist",1,"carousel-indicators"],["type","button","data-bs-target","","role","tab",3,"active","click",4,"ngFor","ngForOf"],[1,"carousel-inner"],["class","carousel-item","role","tabpanel",3,"id",4,"ngFor","ngForOf"],["class","carousel-control-prev","type","button",3,"click",4,"ngIf"],["class","carousel-control-next","type","button",3,"click",4,"ngIf"],["type","button","data-bs-target","","role","tab",3,"click"],["role","tabpanel",1,"carousel-item",3,"id"],[1,"visually-hidden"],n,[3,"ngTemplateOutlet"],["type","button",1,"carousel-control-prev",3,"click"],["aria-hidden","true",1,"carousel-control-prev-icon"],e,["type","button",1,"carousel-control-next",3,"click"],["aria-hidden","true",1,"carousel-control-next-icon"],i]},template:function(e,i){1&e&&(_(0,"div",0),Z(1,iIe,1,5,"button",1),x(),_(2,"div",2),Z(3,oIe,4,4,"div",3),x(),Z(4,sIe,4,0,"button",4),Z(5,aIe,4,0,"button",5)),2&e&&(jn("visually-hidden",!i.showNavigationIndicators),w(1),S("ngForOf",i.slides),w(2),S("ngForOf",i.slides),w(1),S("ngIf",i.showNavigationArrows),w(1),S("ngIf",i.showNavigationArrows))},dependencies:[Ln,Au,vn],encapsulation:2,changeDetection:0}),t})();var ym=(()=>(function(t){t.TIMER="timer",t.ARROW_LEFT="arrowLeft",t.ARROW_RIGHT="arrowRight",t.INDICATOR="indicator"}(ym||(ym={})),ym))();let HU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[sFe]}),t})(),UU=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();class ta{constructor(n,e,i){this.year=Qo(n)?n:null,this.month=Qo(e)?e:null,this.day=Qo(i)?i:null}static from(n){return n instanceof ta?n:n?new ta(n.year,n.month,n.day):null}equals(n){return null!=n&&this.year===n.year&&this.month===n.month&&this.day===n.day}before(n){return!!n&&(this.year===n.year?this.month===n.month?this.day!==n.day&&this.dayn.day:this.month>n.month:this.year>n.year)}}function Nv(t,n){return!function aFe(t,n){return!t&&!n||!!t&&!!n&&t.equals(n)}(t,n)}function zU(t,n){return!(!t&&!n||t&&n&&t.year===n.year&&t.month===n.month)}function r2(t,n,e){return t&&n&&t.before(n)?n:t&&e&&t.after(e)?e:t||null}function gO(t,n){const{minDate:e,maxDate:i,disabled:r,markDisabled:o}=n;return!(null==t||r||o&&o(t,{year:t.year,month:t.month})||e&&t.before(e)||i&&t.after(i))}function GU(t){return new ta(t.getFullYear(),t.getMonth()+1,t.getDate())}function o2(t){const n=new Date(t.year,t.month-1,t.day,12);return isNaN(n.getTime())||n.setFullYear(t.year),n}let s2=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function gFe(){return new vFe}()},providedIn:"root"}),t})(),vFe=(()=>{class t extends s2{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",r=1){let o=o2(e),s=!0,a=o.getMonth();switch(i){case"y":o.setFullYear(o.getFullYear()+r);break;case"m":a+=r,o.setMonth(a),a%=12,a<0&&(a+=12);break;case"d":o.setDate(o.getDate()+r),s=!1;break;default:return e}return s&&o.getMonth()!==a&&o.setDate(0),GU(o)}getPrev(e,i="d",r=1){return this.getNext(e,i,-r)}getWeekday(e){let r=o2(e).getDay();return 0===r?7:r}getWeekNumber(e,i){7===i&&(i=0);const s=o2(e[(11-i)%7]);s.setDate(s.getDate()+4-(s.getDay()||7));const a=s.getTime();return s.setMonth(0),s.setDate(1),Math.floor(Math.round((a-s.getTime())/864e5)/7)+1}getToday(){return GU(new Date)}isValid(e){if(!(e&&Qo(e.year)&&Qo(e.month)&&Qo(e.day)&&0!==e.year))return!1;const i=o2(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),_m=(()=>{class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function yFe(t){return new _Fe(t)}(gt(lc)),i},providedIn:"root"}),t})(),_Fe=(()=>{class t extends _m{constructor(e){super(),this._locale=e,this._monthsShort=JA(e,Ro.Standalone,Vi.Abbreviated),this._monthsFull=JA(e,Ro.Standalone,Vi.Wide)}getWeekdayLabel(e,i){const r=qB(this._locale,Ro.Standalone,void 0===i?Vi.Short:i);return r.map((s,a)=>r[(a+1)%7])[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){return XB(new Date(e.year,e.month-1,e.day),"fullDate",this._locale)}}return t.\u0275fac=function(e){return new(e||t)(gt(lc))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),vO=(()=>{class t{constructor(e,i){this._calendar=e,this._i18n=i,this._VALIDATORS={dayTemplateData:r=>{if(this._state.dayTemplateData!==r)return{dayTemplateData:r}},displayMonths:r=>{if(Qo(r=Pa(r))&&r>0&&this._state.displayMonths!==r)return{displayMonths:r}},disabled:r=>{if(this._state.disabled!==r)return{disabled:r}},firstDayOfWeek:r=>{if(Qo(r=Pa(r))&&r>=0&&this._state.firstDayOfWeek!==r)return{firstDayOfWeek:r}},focusVisible:r=>{if(this._state.focusVisible!==r&&!this._state.disabled)return{focusVisible:r}},markDisabled:r=>{if(this._state.markDisabled!==r)return{markDisabled:r}},maxDate:r=>{const o=this.toValidDate(r,null);if(Nv(this._state.maxDate,o))return{maxDate:o}},minDate:r=>{const o=this.toValidDate(r,null);if(Nv(this._state.minDate,o))return{minDate:o}},navigation:r=>{if(this._state.navigation!==r)return{navigation:r}},outsideDays:r=>{if(this._state.outsideDays!==r)return{outsideDays:r}},weekdays:r=>{const o=!0===r||!1===r?Vi.Short:r,s=!0!==r&&!1!==r||r;if(this._state.weekdayWidth!==o||this._state.weekdaysVisible!==s)return{weekdayWidth:o,weekdaysVisible:s}}},this._model$=new dr,this._dateSelect$=new dr,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:Vi.Short,weekdaysVisible:!0}}get model$(){return this._model$.pipe(us(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(us(e=>null!==e))}set(e){let i=Object.keys(e).map(r=>this._VALIDATORS[r](e[r])).reduce((r,o)=>({...r,...o}),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){const i=this.toValidDate(e,null);null!=i&&!this._state.disabled&&Nv(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){gO(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){const i=this.toValidDate(e,this._calendar.getToday());null!=i&&!this._state.disabled&&(!this._state.firstDate||zU(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){const r=this.toValidDate(e,null);null!=r&&!this._state.disabled&&(Nv(this._state.selectedDate,r)&&this._nextState({selectedDate:r}),i.emitEvent&&gO(r,this._state)&&this._dateSelect$.next(r))}toValidDate(e,i){const r=ta.from(e);return void 0===i&&(i=this._calendar.getToday()),this._calendar.isValid(r)?r:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){const i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){const{months:i,displayMonths:r,selectedDate:o,focusDate:s,focusVisible:a,disabled:l,outsideDays:c}=e;e.months.forEach(u=>{u.weeks.forEach(d=>{d.days.forEach(h=>{s&&(h.context.focused=s.equals(h.date)&&a),h.tabindex=!l&&s&&h.date.equals(s)&&s.month===u.number?0:-1,!0===l&&(h.context.disabled=!0),void 0!==o&&(h.context.selected=null!==o&&o.equals(h.date)),u.number!==h.date.month&&(h.hidden="hidden"===c||"collapsed"===c||r>1&&h.date.after(i[0].firstDate)&&h.date.before(i[r-1].lastDate))})})})}_updateState(e){const i=Object.assign({},this._state,e);let r=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(function lFe(t,n){if(n&&t&&n.before(t))throw new Error(`'maxDate' ${n} should be greater than 'minDate' ${t}`)}(i.minDate,i.maxDate),i.focusDate=r2(i.focusDate,i.minDate,i.maxDate),i.firstDate=r2(i.firstDate,i.minDate,i.maxDate),r=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(r=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=r2(i.focusDate,i.minDate,i.maxDate),r=i.focusDate,0!==i.months.length&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=r2(i.firstDate,i.minDate,i.maxDate),r=i.firstDate),r){const s=function fFe(t,n,e,i,r){const{displayMonths:o,months:s}=e,a=s.splice(0,s.length);return Array.from({length:o},(c,u)=>{const d=Object.assign(t.getNext(n,"m",u),{day:1});if(s[u]=null,!r){const h=a.findIndex(f=>f.firstDate.equals(d));-1!==h&&(s[u]=a.splice(h,1)[0])}return d}).forEach((c,u)=>{null===s[u]&&(s[u]=function pFe(t,n,e,i,r={}){const{dayTemplateData:o,minDate:s,maxDate:a,firstDayOfWeek:l,markDisabled:c,outsideDays:u,weekdayWidth:d,weekdaysVisible:h}=e,f=t.getToday();r.firstDate=null,r.lastDate=null,r.number=n.month,r.year=n.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],n=function mFe(t,n,e){const i=t.getDaysPerWeek(),r=new ta(n.year,n.month,1),o=t.getWeekday(r)%i;return t.getPrev(r,"d",(i+o-e)%i)}(t,n,l),h||(r.weekdays.length=0);for(let p=0;pv.date),l),m.collapsed="collapsed"===u&&g[0].date.month!==r.number&&g[g.length-1].date.month!==r.number}return r}(t,c,e,i,a.shift()||{}))}),s}(this._calendar,r,i,this._i18n,"dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e);i.months=s,i.firstDate=s[0].firstDate,i.lastDate=s[s.length-1].lastDate,"selectedDate"in e&&!gO(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=r);const a=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,l=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;"select"===i.navigation?(("minDate"in e||"maxDate"in e||0===i.selectBoxes.years.length||a)&&(i.selectBoxes.years=function uFe(t,n,e){if(!t)return[];const i=n?Math.max(n.year,t.year-500):t.year-10,o=(e?Math.min(e.year,t.year+500):t.year+10)-i+1,s=Array(o);for(let a=0;as===e.month);r=r.slice(o)}if(i&&n.year===i.year){const o=r.findIndex(s=>s===i.month);r=r.slice(0,o+1)}return r}(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},("arrows"===i.navigation||"select"===i.navigation)&&(l||a||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||function hFe(t,n,e){const i=Object.assign(t.getPrev(n,"m"),{day:1});return null!=e&&(i.year===e.year&&i.month(function(t){t[t.PREV=0]="PREV",t[t.NEXT=1]="NEXT"}(Fv||(Fv={})),Fv))();let bFe=(()=>{class t{constructor(e){this.i18n=e}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}}return t.\u0275fac=function(e){return new(e||t)(de(_m))},t.\u0275cmp=Rt({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(e,i){2&e&&jn("bg-primary",i.selected)("text-white",i.selected)("text-muted",i.isMuted())("outside",i.isMuted())("active",i.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},standalone:!0,features:[Is],attrs:lIe,decls:1,vars:1,template:function(e,i){1&e&&O(0),2&e&&bt(i.i18n.getDayNumerals(i.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-btn-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5}\n"],encapsulation:2,changeDetection:0}),t})(),xFe=(()=>{class t{constructor(e,i){this.i18n=e,this._renderer=i,this.select=new it,this._month=-1,this._year=-1}changeMonth(e){this.select.emit(new ta(this.date.year,Pa(e),1))}changeYear(e){this.select.emit(new ta(Pa(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}}return t.\u0275fac=function(e){return new(e||t)(de(_m),de(ca))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(e,i){if(1&e&&(xo(cIe,7,Si),xo(uIe,7,Si)),2&e){let r;wn(r=Cn())&&(i.monthSelect=r.first),wn(r=Cn())&&(i.yearSelect=r.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},standalone:!0,features:[Is],decls:6,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.select-month:Select month`,e=$localize`:@@ngb.datepicker.select-month:Select month`,i=$localize`:@@ngb.datepicker.select-year:Select year`,r=$localize`:@@ngb.datepicker.select-year:Select year`,[["aria-label",n,"title",e,1,"form-select",3,"disabled","change"],["month",""],[3,"value",4,"ngFor","ngForOf"],["aria-label",i,"title",r,1,"form-select",3,"disabled","change"],["year",""],[3,"value"]]},template:function(e,i){1&e&&(_(0,"select",0,1),ye("change",function(o){return i.changeMonth(o.target.value)}),Z(2,dIe,2,3,"option",2),x(),_(3,"select",3,4),ye("change",function(o){return i.changeYear(o.target.value)}),Z(5,hIe,2,2,"option",2),x()),2&e&&(S("disabled",i.disabled),w(2),S("ngForOf",i.months),w(1),S("disabled",i.disabled),w(2),S("ngForOf",i.years))},dependencies:[Ln],styles:["ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important}\n"],encapsulation:2,changeDetection:0}),t})(),wFe=(()=>{class t{constructor(e){this.i18n=e,this.navigation=Fv,this.months=[],this.navigate=new it,this.select=new it}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}}return t.\u0275fac=function(e){return new(e||t)(de(_m))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},standalone:!0,features:[Is],decls:8,vars:4,consts:function(){let n,e,i,r;return n=$localize`:@@ngb.datepicker.previous-month:Previous month`,e=$localize`:@@ngb.datepicker.previous-month:Previous month`,i=$localize`:@@ngb.datepicker.next-month:Next month`,r=$localize`:@@ngb.datepicker.next-month:Next month`,[[1,"ngb-dp-arrow"],["type","button","aria-label",n,"title",e,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["type","button","aria-label",i,"title",r,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(e,i){1&e&&(_(0,"div",0)(1,"button",1),ye("click",function(o){return i.onClickPrev(o)}),pe(2,"span",2),x()(),Z(3,fIe,1,4,"ngb-datepicker-navigation-select",3),Z(4,vIe,1,1,null,4),_(5,"div",5)(6,"button",6),ye("click",function(o){return i.onClickNext(o)}),pe(7,"span",2),x()()),2&e&&(w(1),S("disabled",i.prevDisabled),w(2),S("ngIf",i.showSelect),w(1),S("ngIf",!i.showSelect),w(2),S("disabled",i.nextDisabled))},dependencies:[vn,Ln,xFe],styles:["ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{justify-content:flex-end}.ngb-dp-arrow.right .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem}\n"],encapsulation:2,changeDetection:0}),t})();var Or=(()=>(function(t){t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown"}(Or||(Or={})),Or))();let CFe=(()=>{class t{processKey(e,i){const{state:r,calendar:o}=i;switch(e.which){case Or.PageUp:i.focusDate(o.getPrev(r.focusedDate,e.shiftKey?"y":"m",1));break;case Or.PageDown:i.focusDate(o.getNext(r.focusedDate,e.shiftKey?"y":"m",1));break;case Or.End:i.focusDate(e.shiftKey?r.maxDate:r.lastDate);break;case Or.Home:i.focusDate(e.shiftKey?r.minDate:r.firstDate);break;case Or.ArrowLeft:i.focusDate(o.getPrev(r.focusedDate,"d",1));break;case Or.ArrowUp:i.focusDate(o.getPrev(r.focusedDate,"d",o.getDaysPerWeek()));break;case Or.ArrowRight:i.focusDate(o.getNext(r.focusedDate,"d",1));break;case Or.ArrowDown:i.focusDate(o.getNext(r.focusedDate,"d",o.getDaysPerWeek()));break;case Or.Enter:case Or.Space:i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yO=(()=>{class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays=Vi.Short}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),_O=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function SFe(){return new kFe}()},providedIn:"root"}),t})(),kFe=(()=>{class t extends _O{fromModel(e){return e&&Qo(e.year)&&Qo(e.month)&&Qo(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&Qo(e.year)&&Qo(e.month)&&Qo(e.day)?{year:e.year,month:e.month,day:e.day}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),WU=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbDatepickerContent",""]],standalone:!0}),t})(),bO=(()=>{class t{constructor(e,i,r,o){this.i18n=e,this.datepicker=i,this._keyboardService=r,this._service=o}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){!e.context.disabled&&!e.hidden&&this.datepicker.onDateSelect(e.date)}}return t.\u0275fac=function(e){return new(e||t)(de(_m),de(Mi(()=>a2)),de(CFe),de(vO))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(e,i){1&e&&ye("keydown",function(o){return i.onKeyDown(o)})},inputs:{month:"month"},standalone:!0,features:[Is],decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek small",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(Z(0,bIe,3,2,"div",0),Z(1,DIe,1,1,"ng-template",1)),2&e&&(S("ngIf",i.viewModel.weekdays.length>0),w(1),S("ngForOf",i.viewModel.weeks))},dependencies:[vn,Ln,Au],styles:['ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-light)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}\n'],encapsulation:2}),t})(),a2=(()=>{class t{constructor(e,i,r,o,s,a,l,c){this._service=e,this._calendar=i,this._i18n=r,this._elementRef=a,this._ngbDateAdapter=l,this._ngZone=c,this.injector=Fi(ua),this._controlValue=null,this._destroyed$=new dr,this._publicState={},this.navigate=new it,this.dateSelect=new it,this.onChange=u=>{},this.onTouched=()=>{},["contentTemplate","dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekNumbers","startDate","weekdays"].forEach(u=>this[u]=o[u]),e.dateSelect$.pipe(Ko(this._destroyed$)).subscribe(u=>{this.dateSelect.emit(u)}),e.model$.pipe(Ko(this._destroyed$)).subscribe(u=>{const d=u.firstDate,h=this.model?this.model.firstDate:null;this._publicState={maxDate:u.maxDate,minDate:u.minDate,firstDate:u.firstDate,lastDate:u.lastDate,focusedDate:u.focusDate,months:u.months.map(v=>v.firstDate)};let f=!1;if(!d.equals(h)&&(this.navigate.emit({current:h?{year:h.year,month:h.month}:null,next:{year:d.year,month:d.month},preventDefault:()=>f=!0}),f&&null!==h))return void this._service.open(h);const p=u.selectedDate,m=u.focusDate,g=this.model?this.model.focusDate:null;this.model=u,Nv(p,this._controlValue)&&(this._controlValue=p,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(p))),Nv(m,g)&&g&&u.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}get i18n(){return this._i18n}focusDate(e){this._service.focus(ta.from(e))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()})}navigateTo(e){this._service.open(ta.from(e?e.day?e:{...e,day:1}:null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const e=Fa(this._contentEl.nativeElement,"focusin"),i=Fa(this._contentEl.nativeElement,"focusout"),{nativeElement:r}=this._elementRef;Dt(e,i).pipe(us(({target:o,relatedTarget:s})=>!(AU(o,"ngb-dp-day")&&AU(s,"ngb-dp-day")&&r.contains(o)&&r.contains(s))),Ko(this._destroyed$)).subscribe(({type:o})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===o})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].forEach(i=>e[i]=this[i]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(e){const i={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays","weekdays"].filter(r=>r in e).forEach(r=>i[r]=this[r]),this._service.set(i),"startDate"in e){const{currentValue:r,previousValue:o}=e.startDate;zU(o,r)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case Fv.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Fv.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=ta.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}}return t.\u0275fac=function(e){return new(e||t)(de(vO),de(s2),de(_m),de(yO),de(Ns),de(Si),de(_O),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-datepicker"]],contentQueries:function(e,i,r){if(1&e&&yi(r,WU,7),2&e){let o;wn(o=Cn())&&(i.contentTemplateFromContent=o.first)}},viewQuery:function(e,i){if(1&e&&(xo(TIe,7),xo(EIe,7)),2&e){let r;wn(r=Cn())&&(i._defaultDayTemplate=r.first),wn(r=Cn())&&(i._contentEl=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("disabled",i.model.disabled)},inputs:{contentTemplate:"contentTemplate",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",weekdays:"weekdays"},outputs:{navigate:"navigate",dateSelect:"dateSelect"},exportAs:["ngbDatepicker"],standalone:!0,features:[Qr([{provide:$l,useExisting:Mi(()=>t),multi:!0},vO]),Yn,Is],decls:10,vars:9,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet","ngTemplateOutletContext","ngTemplateOutletInjector"],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(e,i){if(1&e&&(Z(0,AIe,1,5,"ng-template",null,0,cs),Z(2,IIe,1,1,"ng-template",null,1,cs),_(4,"div",2),Z(5,NIe,1,7,"ngb-datepicker-navigation",3),x(),_(6,"div",4,5),Z(8,FIe,0,0,"ng-template",6),x(),Z(9,PIe,0,0,"ng-template",7)),2&e){const r=Ta(3);w(5),S("ngIf","none"!==i.navigation),w(1),jn("ngb-dp-months",!i.contentTemplate),w(2),S("ngTemplateOutlet",i.contentTemplate||(null==i.contentTemplateFromContent?null:i.contentTemplateFromContent.templateRef)||r)("ngTemplateOutletContext",sr(7,DU,i))("ngTemplateOutletInjector",i.injector),w(1),S("ngTemplateOutlet",i.footerTemplate)}},dependencies:[vn,Ln,Au,bFe,bO,wFe],styles:["ngb-datepicker{border:1px solid var(--bs-border-color);border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}ngb-datepicker.disabled .ngb-dp-weekday,ngb-datepicker.disabled .ngb-dp-week-number,ngb-datepicker.disabled .ngb-dp-month-name{color:var(--bs-text-muted)}.ngb-dp-body{z-index:1055}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:var(--bs-light)}.ngb-dp-months{display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:var(--bs-light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}\n"],encapsulation:2,changeDetection:0}),t})();const l2=(t,n)=>!!n&&n.some(e=>e.contains(t)),qU=(t,n)=>!n||null!=function $Ne(t,n){return!n||typeof t.closest>"u"?null:t.closest(n)}(t,n),DFe=typeof navigator<"u"&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)),TFe=t=>DFe?()=>setTimeout(()=>t(),100):t;function xO(t,n,e,i,r,o,s,a){e&&t.runOutsideAngular(TFe(()=>{const c=Fa(n,"keydown").pipe(Ko(r),us(h=>h.which===Or.Escape),xs(h=>h.preventDefault())),u=Fa(n,"mousedown").pipe(_n(h=>{const f=h.target;return 2!==h.button&&!l2(f,s)&&("inside"===e?l2(f,o)&&qU(f,a):"outside"===e?!l2(f,o):qU(f,a)||!l2(f,o))}),Ko(r)),d=Fa(n,"mouseup").pipe(K3(u),us(([h,f])=>f),Q3(0),Ko(r));lU([c.pipe(_n(h=>0)),d.pipe(_n(h=>1))]).subscribe(h=>t.run(()=>i(h)))}))}const YU=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function XU(t){const n=Array.from(t.querySelectorAll(YU)).filter(e=>-1!==e.tabIndex);return[n[0],n[n.length-1]]}let EFe=(()=>{class t{constructor(e){this._element=e.documentElement}isRTL(){return"rtl"===(this._element.getAttribute("dir")||"").toLowerCase()}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const AFe=/\s+/,MFe=/ +/gi,OFe={top:["top"],bottom:["bottom"],start:["left","right"],left:["left"],end:["right","left"],right:["right"],"top-start":["top-start","top-end"],"top-left":["top-start"],"top-end":["top-end","top-start"],"top-right":["top-end"],"bottom-start":["bottom-start","bottom-end"],"bottom-left":["bottom-start"],"bottom-end":["bottom-end","bottom-start"],"bottom-right":["bottom-end"],"start-top":["left-start","right-start"],"left-top":["left-start"],"start-bottom":["left-end","right-end"],"left-bottom":["left-end"],"end-top":["right-start","left-start"],"right-top":["right-start"],"end-bottom":["right-end","left-end"],"right-bottom":["right-end"]},NFe=/^left/,FFe=/^right/,PFe=/^start/,jFe=/^end/;function KU({placement:t,baseClass:n},e){let i=Array.isArray(t)?t:t.split(AFe),o=i.findIndex(c=>"auto"===c);o>=0&&["top","bottom","start","end","top-start","top-end","bottom-start","bottom-end","start-top","start-bottom","end-top","end-bottom"].forEach(function(c){null==i.find(u=>-1!==u.search("^"+c))&&i.splice(o++,1,c)});const s=i.map(c=>function IFe(t,n){const[e,i]=OFe[t];return n&&i||e}(c,e.isRTL()));return{placement:s.shift(),modifiers:[{name:"bootstrapClasses",enabled:!!n,phase:"write",fn({state:c}){const u=new RegExp(n+"(-[a-z]+)*","gi"),d=c.elements.popper,h=c.placement;let f=d.className;f=f.replace(u,""),f+=` ${function RFe(t,n){let[e,i]=n.split("-");const r=e.replace(NFe,"start").replace(FFe,"end");let o=[r];if(i){let s=i;("left"===e||"right"===e)&&(s=s.replace(PFe,"top").replace(jFe,"bottom")),o.push(`${r}-${s}`)}return t&&(o=o.map(s=>`${t}-${s}`)),o.join(" ")}(n,h)}`,f=f.trim().replace(MFe," "),d.className=f}},gOe,bOe,SOe,{enabled:!0,name:"flip",options:{fallbackPlacements:s}},{enabled:!0,name:"preventOverflow",phase:"main",fn:function(){}}]}}function QU(t){return t}function wO(){const t=Fi(EFe);let n=null;return{createPopper(e){if(!n){let r=(e.updatePopperOptions||QU)(KU(e,t));n=GOe(e.hostElement,e.targetElement,r)}},update(){n&&n.update()},setOptions(e){if(n){let r=(e.updatePopperOptions||QU)(KU(e,t));n.setOptions(r)}},destroy(){n&&(n.destroy(),n=null)}}}new Date(1882,10,12),new Date(2174,10,25);let az=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[a2,bO]}),t})(),YFe=(()=>{class t{constructor(){this.autoClose=!0,this.placement=["bottom-start","bottom-end","top-start","top-end"],this.popperOptions=e=>e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Wf=(()=>{class t{constructor(e,i){this.elementRef=e,this._renderer=i,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e,this._renderer.setProperty(this.elementRef.nativeElement,"disabled",this._disabled)}get disabled(){return this._disabled}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:3,hostBindings:function(e,i){2&e&&(Pl("tabIndex",i.disabled?-1:0),jn("disabled",i.disabled))},inputs:{disabled:"disabled"},standalone:!0}),t})(),qf=(()=>{class t{constructor(e,i){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>Ru)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,i,r){if(1&e&&yi(r,Wf,4),2&e){let o;wn(o=Cn())&&(i.menuItems=o)}},hostVars:4,hostBindings:function(e,i){1&e&&ye("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Enter",function(o){return i.dropdown.onKeyDown(o)})("keydown.Space",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&jn("dropdown-menu",!0)("show",i.dropdown.isOpen())},standalone:!0}),t})(),h2=(()=>{class t{constructor(e,i){this.dropdown=e,this.nativeElement=i.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>Ru)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){2&e&&ut("aria-expanded",i.dropdown.isOpen())},standalone:!0}),t})(),wm=(()=>{class t extends h2{constructor(e,i){super(e,i)}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>Ru)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,i){1&e&&ye("click",function(){return i.dropdown.toggle()})("keydown.ArrowUp",function(o){return i.dropdown.onKeyDown(o)})("keydown.ArrowDown",function(o){return i.dropdown.onKeyDown(o)})("keydown.Home",function(o){return i.dropdown.onKeyDown(o)})("keydown.End",function(o){return i.dropdown.onKeyDown(o)})("keydown.Tab",function(o){return i.dropdown.onKeyDown(o)})("keydown.Shift.Tab",function(o){return i.dropdown.onKeyDown(o)}),2&e&&ut("aria-expanded",i.dropdown.isOpen())},standalone:!0,features:[Qr([{provide:h2,useExisting:Mi(()=>t)}]),pi]}),t})(),Ru=(()=>{class t{constructor(e,i,r,o,s,a){this._changeDetector=e,this._document=r,this._ngZone=o,this._elementRef=s,this._renderer=a,this._destroyCloseHandlers$=new dr,this._bodyContainer=null,this._open=!1,this.openChange=new it,this.placement=i.placement,this.popperOptions=i.popperOptions,this.container=i.container,this.autoClose=i.autoClose,this._positioning=wO(),this.display=this._elementRef.nativeElement.closest(".navbar")?"static":"dynamic"}ngAfterContentInit(){this._ngZone.onStable.pipe(Ks(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){if(e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.firstChange&&(this._positioning.setOptions({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container}),this._applyPlacementClasses()),e.dropdownClass){const{currentValue:i,previousValue:r}=e.dropdownClass;this._applyCustomDropdownClass(i,r)}e.autoClose&&this._open&&(this.autoClose=e.autoClose.currentValue,this._setCloseHandlers())}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&(this._anchor.nativeElement.focus(),"dynamic"===this.display&&this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._anchor.nativeElement,targetElement:this._bodyContainer||this._menu.nativeElement,placement:this.placement,appendToBody:"body"===this.container,updatePopperOptions:e=>this.popperOptions(function ez(t){return n=>(n.modifiers.push(YOe,{name:"offset",options:{offset:()=>t}}),n)}([0,2])(e))}),this._applyPlacementClasses(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positionMenu())})))}_setCloseHandlers(){this._destroyCloseHandlers$.next(),xO(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._destroyCloseHandlers$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this._destroyCloseHandlers$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this.close()}onKeyDown(e){const i=e.which,r=this._getMenuElements();let o=-1,s=null;const a=this._isEventFromToggle(e);if(!a&&r.length&&r.forEach((l,c)=>{l.contains(e.target)&&(s=l),l===this._document.activeElement&&(o=c)}),i!==Or.Space&&i!==Or.Enter){if(i!==Or.Tab){if(a||s){if(this.open(),r.length){switch(i){case Or.ArrowDown:o=Math.min(o+1,r.length-1);break;case Or.ArrowUp:if(this._isDropup()&&-1===o){o=r.length-1;break}o=Math.max(o-1,0);break;case Or.Home:o=0;break;case Or.End:o=r.length-1}r[o].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const l=this._menu.nativeElement.querySelectorAll(YU);e.shiftKey&&e.target===l[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):!e.shiftKey&&e.target===l[l.length-1]&&(this._anchor.nativeElement.focus(),this.close())}else Fa(e.target,"focusout").pipe(Ks(1)).subscribe(({relatedTarget:l})=>{this._elementRef.nativeElement.contains(l)||this.close()})}}else s&&(!0===this.autoClose||"inside"===this.autoClose)&&Fa(s,"click").pipe(Ks(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(i=>!i.disabled).map(i=>i.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&("dynamic"===this.display?(this._positioning.update(),this._applyPlacementClasses()):this._applyPlacementClasses(this._getFirstPlacement(this.placement)))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;this._menu&&e.appendChild(this._elementRef.nativeElement,this._menu.nativeElement),this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const i=this._renderer,r=this._menu.nativeElement,o=this._bodyContainer=this._bodyContainer||i.createElement("div");i.setStyle(o,"position","absolute"),i.setStyle(r,"position","static"),i.setStyle(o,"z-index","1055"),i.appendChild(o,r),i.appendChild(this._document.body,o)}this._applyCustomDropdownClass(this.dropdownClass)}_applyCustomDropdownClass(e,i){const r="body"===this.container?this._bodyContainer:this._elementRef.nativeElement;r&&(i&&this._renderer.removeClass(r,i),e&&this._renderer.addClass(r,e))}_applyPlacementClasses(e){const i=this._menu;if(i){e||(e=this._getFirstPlacement(this.placement));const r=this._renderer,o=this._elementRef.nativeElement;r.removeClass(o,"dropup"),r.removeClass(o,"dropdown");const{nativeElement:s}=i;"static"===this.display?(i.placement=null,r.setAttribute(s,"data-bs-popper","static")):(i.placement=e,r.removeAttribute(s,"data-bs-popper"));const a=-1!==e.search("^top")?"dropup":"dropdown";r.addClass(o,a);const l=this._bodyContainer;l&&(r.removeClass(l,"dropup"),r.removeClass(l,"dropdown"),r.addClass(l,a))}}}return t.\u0275fac=function(e){return new(e||t)(de(Ns),de(YFe),de(co),de(nr),de(Si),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(e,i,r){if(1&e&&(yi(r,qf,5),yi(r,h2,5)),2&e){let o;wn(o=Cn())&&(i._menu=o.first),wn(o=Cn())&&(i._anchor=o.first)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("show",i.isOpen())},inputs:{autoClose:"autoClose",dropdownClass:"dropdownClass",_open:["open","_open"],placement:"placement",popperOptions:"popperOptions",container:"container",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],standalone:!0,features:[Yn]}),t})(),lz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();class Cm{constructor(n,e,i){this.nodes=n,this.viewRef=e,this.componentRef=i}}class XFe{constructor(n,e,i,r,o,s){this._componentType=n,this._injector=e,this._viewContainerRef=i,this._renderer=r,this._ngZone=o,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(n,e,i=!1){this._windowRef||(this._contentRef=this._getContentRef(n,e),this._windowRef=this._viewContainerRef.createComponent(this._componentType,{injector:this._injector,projectableNodes:this._contentRef.nodes}));const{nativeElement:r}=this._windowRef.location,o=this._ngZone.onStable.pipe(Ks(1),et(()=>ea(this._ngZone,r,({classList:s})=>s.add("show"),{animation:i,runningTransition:"continue"})));return{windowRef:this._windowRef,transition$:o}}close(n=!1){return this._windowRef?ea(this._ngZone,this._windowRef.location.nativeElement,({classList:e})=>e.remove("show"),{animation:n,runningTransition:"stop"}).pipe(xs(()=>{this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null),this._contentRef?.viewRef&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null)})):Rn(void 0)}_getContentRef(n,e){if(n){if(n instanceof oo){const i=n.createEmbeddedView(e);return this._applicationRef.attachView(i),new Cm([i.rootNodes],i)}return new Cm([[this._renderer.createText(`${n}`)]])}return new Cm([])}}let JFe=(()=>{class t{constructor(e,i){this._el=e,this._zone=i}ngOnInit(){this._zone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{ea(this._zone,this._el.nativeElement,(e,i)=>{i&&Iv(e),e.classList.add("show")},{animation:this.animation,runningTransition:"continue"})})}hide(){return ea(this._zone,this._el.nativeElement,({classList:e})=>e.remove("show"),{animation:this.animation,runningTransition:"stop"})}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1055"],hostVars:6,hostBindings:function(e,i){2&e&&(Pd("modal-backdrop"+(i.backdropClass?" "+i.backdropClass:"")),jn("show",!i.animation)("fade",i.animation))},inputs:{animation:"animation",backdropClass:"backdropClass"},standalone:!0,features:[Is],decls:0,vars:0,template:function(e,i){},encapsulation:2}),t})();class cz{update(n){}close(n){}dismiss(n){}}const KFe=["animation","ariaLabelledBy","ariaDescribedBy","backdrop","centered","fullscreen","keyboard","scrollable","size","windowClass","modalDialogClass"],QFe=["animation","backdropClass"];class ZFe{constructor(n,e,i,r){this._windowCmptRef=n,this._contentRef=e,this._backdropCmptRef=i,this._beforeDismiss=r,this._closed=new dr,this._dismissed=new dr,this._hidden=new dr,n.instance.dismissEvent.subscribe(o=>{this.dismiss(o)}),this.result=new Promise((o,s)=>{this._resolve=o,this._reject=s}),this.result.then(null,()=>{})}_applyWindowOptions(n,e){KFe.forEach(i=>{gm(e[i])&&(n[i]=e[i])})}_applyBackdropOptions(n,e){QFe.forEach(i=>{gm(e[i])&&(n[i]=e[i])})}update(n){this._applyWindowOptions(this._windowCmptRef.instance,n),this._backdropCmptRef&&this._backdropCmptRef.instance&&this._applyBackdropOptions(this._backdropCmptRef.instance,n)}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}get closed(){return this._closed.asObservable().pipe(Ko(this._hidden))}get dismissed(){return this._dismissed.asObservable().pipe(Ko(this._hidden))}get hidden(){return this._hidden.asObservable()}get shown(){return this._windowCmptRef.instance.shown.asObservable()}close(n){this._windowCmptRef&&(this._closed.next(n),this._resolve(n),this._removeModalElements())}_dismiss(n){this._dismissed.next(n),this._reject(n),this._removeModalElements()}dismiss(n){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();!function EU(t){return t&&t.then}(e)?!1!==e&&this._dismiss(n):e.then(i=>{!1!==i&&this._dismiss(n)},()=>{})}else this._dismiss(n)}_removeModalElements(){const n=this._windowCmptRef.instance.hide(),e=this._backdropCmptRef?this._backdropCmptRef.instance.hide():Rn(void 0);n.subscribe(()=>{const{nativeElement:i}=this._windowCmptRef.location;i.parentNode.removeChild(i),this._windowCmptRef.destroy(),this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._contentRef=null}),e.subscribe(()=>{if(this._backdropCmptRef){const{nativeElement:i}=this._backdropCmptRef.location;i.parentNode.removeChild(i),this._backdropCmptRef.destroy(),this._backdropCmptRef=null}}),KC(n,e).subscribe(()=>{this._hidden.next(),this._hidden.complete()})}}var i_=(()=>(function(t){t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC"}(i_||(i_={})),i_))();let ePe=(()=>{class t{constructor(e,i,r){this._document=e,this._elRef=i,this._zone=r,this._closed$=new dr,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new it,this.shown=new dr,this.hidden=new dr}get fullscreenClass(){return!0===this.fullscreen?" modal-fullscreen":mm(this.fullscreen)?` modal-fullscreen-${this.fullscreen}-down`:""}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement,this._zone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{this._show()})}ngOnDestroy(){this._disableEventHandling()}hide(){const{nativeElement:e}=this._elRef,i={animation:this.animation,runningTransition:"stop"},s=KC(ea(this._zone,e,()=>e.classList.remove("show"),i),ea(this._zone,this._dialogEl.nativeElement,()=>{},i));return s.subscribe(()=>{this.hidden.next(),this.hidden.complete()}),this._disableEventHandling(),this._restoreFocus(),s}_show(){const e={animation:this.animation,runningTransition:"continue"};KC(ea(this._zone,this._elRef.nativeElement,(o,s)=>{s&&Iv(o),o.classList.add("show")},e),ea(this._zone,this._dialogEl.nativeElement,()=>{},e)).subscribe(()=>{this.shown.next(),this.shown.complete()}),this._enableEventHandling(),this._setFocus()}_enableEventHandling(){const{nativeElement:e}=this._elRef;this._zone.runOutsideAngular(()=>{Fa(e,"keydown").pipe(Ko(this._closed$),us(r=>r.which===Or.Escape)).subscribe(r=>{this.keyboard?requestAnimationFrame(()=>{r.defaultPrevented||this._zone.run(()=>this.dismiss(i_.ESC))}):"static"===this.backdrop&&this._bumpBackdrop()});let i=!1;Fa(this._dialogEl.nativeElement,"mousedown").pipe(Ko(this._closed$),xs(()=>i=!1),dc(()=>Fa(e,"mouseup").pipe(Ko(this._closed$),Ks(1))),us(({target:r})=>e===r)).subscribe(()=>{i=!0}),Fa(e,"click").pipe(Ko(this._closed$)).subscribe(({target:r})=>{e===r&&("static"===this.backdrop?this._bumpBackdrop():!0===this.backdrop&&!i&&this._zone.run(()=>this.dismiss(i_.BACKDROP_CLICK))),i=!1})})}_disableEventHandling(){this._closed$.next()}_setFocus(){const{nativeElement:e}=this._elRef;if(!e.contains(document.activeElement)){const i=e.querySelector("[ngbAutofocus]"),r=XU(e)[0];(i||r||e).focus()}}_restoreFocus(){const e=this._document.body,i=this._elWithFocus;let r;r=i&&i.focus&&e.contains(i)?i:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>r.focus()),this._elWithFocus=null})}_bumpBackdrop(){"static"===this.backdrop&&ea(this._zone,this._elRef.nativeElement,({classList:e})=>(e.add("modal-static"),()=>e.remove("modal-static")),{animation:this.animation,runningTransition:"continue"})}}return t.\u0275fac=function(e){return new(e||t)(de(co),de(Si),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(e,i){if(1&e&&xo(jIe,7),2&e){let r;wn(r=Cn())&&(i._dialogEl=r.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:7,hostBindings:function(e,i){2&e&&(ut("aria-modal",!0)("aria-labelledby",i.ariaLabelledBy)("aria-describedby",i.ariaDescribedBy),Pd("modal d-block"+(i.windowClass?" "+i.windowClass:"")),jn("fade",i.animation))},inputs:{animation:"animation",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",backdrop:"backdrop",centered:"centered",fullscreen:"fullscreen",keyboard:"keyboard",scrollable:"scrollable",size:"size",windowClass:"windowClass",modalDialogClass:"modalDialogClass"},outputs:{dismissEvent:"dismiss"},standalone:!0,features:[Is],ngContentSelectors:Qy,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,i){1&e&&(kf(),_(0,"div",0,1)(2,"div",2),Df(3),x()()),2&e&&Pd("modal-dialog"+(i.size?" modal-"+i.size:"")+(i.centered?" modal-dialog-centered":"")+i.fullscreenClass+(i.scrollable?" modal-dialog-scrollable":"")+(i.modalDialogClass?" "+i.modalDialogClass:""))},styles:["ngb-modal-window .component-host-scrollable{display:flex;flex-direction:column;overflow:hidden}\n"],encapsulation:2}),t})(),tPe=(()=>{class t{constructor(e){this._document=e}hide(){const e=Math.abs(window.innerWidth-this._document.documentElement.clientWidth),i=this._document.body,r=i.style,{overflow:o,paddingRight:s}=r;if(e>0){const a=parseFloat(window.getComputedStyle(i).paddingRight);r.paddingRight=`${a+e}px`}return r.overflow="hidden",()=>{e>0&&(r.paddingRight=s),r.overflow=o}}}return t.\u0275fac=function(e){return new(e||t)(gt(co))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),nPe=(()=>{class t{constructor(e,i,r,o,s,a,l){this._applicationRef=e,this._injector=i,this._environmentInjector=r,this._document=o,this._scrollBar=s,this._rendererFactory=a,this._ngZone=l,this._activeWindowCmptHasChanged=new dr,this._ariaHiddenValues=new Map,this._scrollBarRestoreFn=null,this._modalRefs=[],this._windowCmpts=[],this._activeInstances=new it,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const c=this._windowCmpts[this._windowCmpts.length-1];((t,n,e,i=!1)=>{t.runOutsideAngular(()=>{const r=Fa(n,"focusin").pipe(Ko(e),_n(o=>o.target));Fa(n,"keydown").pipe(Ko(e),us(o=>o.which===Or.Tab),K3(r)).subscribe(([o,s])=>{const[a,l]=XU(n);(s===a||s===n)&&o.shiftKey&&(l.focus(),o.preventDefault()),s===l&&!o.shiftKey&&(a.focus(),o.preventDefault())}),i&&Fa(n,"click").pipe(Ko(e),K3(r),_n(o=>o[1])).subscribe(o=>o.focus())})})(this._ngZone,c.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(c.location.nativeElement)}})}_restoreScrollBar(){const e=this._scrollBarRestoreFn;e&&(this._scrollBarRestoreFn=null,e())}_hideScrollBar(){this._scrollBarRestoreFn||(this._scrollBarRestoreFn=this._scrollBar.hide())}open(e,i,r){const o=r.container instanceof HTMLElement?r.container:gm(r.container)?this._document.querySelector(r.container):this._document.body,s=this._rendererFactory.createRenderer(null,null);if(!o)throw new Error(`The specified modal container "${r.container||"body"}" was not found in the DOM.`);this._hideScrollBar();const a=new cz,l=(e=r.injector||e).get($c,null)||this._environmentInjector,c=this._getContentRef(e,l,i,a,r);let u=!1!==r.backdrop?this._attachBackdrop(o):void 0,d=this._attachWindowComponent(o,c.nodes),h=new ZFe(d,c,u,r.beforeDismiss);return this._registerModalRef(h),this._registerWindowCmpt(d),h.hidden.pipe(Ks(1)).subscribe(()=>Promise.resolve(!0).then(()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._restoreScrollBar(),this._revertAriaHidden())})),a.close=f=>{h.close(f)},a.dismiss=f=>{h.dismiss(f)},a.update=f=>{h.update(f)},h.update(r),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&u.changeDetectorRef.detectChanges(),d.changeDetectorRef.detectChanges(),h}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(i=>i.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e){let i=GA(JFe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector});return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_attachWindowComponent(e,i){let r=GA(ePe,{environmentInjector:this._applicationRef.injector,elementInjector:this._injector,projectableNodes:i});return this._applicationRef.attachView(r.hostView),e.appendChild(r.location.nativeElement),r}_getContentRef(e,i,r,o,s){return r?r instanceof oo?this._createFromTemplateRef(r,o):mm(r)?this._createFromString(r):this._createFromComponent(e,i,r,o,s):new Cm([])}_createFromTemplateRef(e,i){const o=e.createEmbeddedView({$implicit:i,close(s){i.close(s)},dismiss(s){i.dismiss(s)}});return this._applicationRef.attachView(o),new Cm([o.rootNodes],o)}_createFromString(e){const i=this._document.createTextNode(`${e}`);return new Cm([[i]])}_createFromComponent(e,i,r,o,s){const l=GA(r,{environmentInjector:i,elementInjector:ua.create({providers:[{provide:cz,useValue:o}],parent:e})}),c=l.location.nativeElement;return s.scrollable&&c.classList.add("component-host-scrollable"),this._applicationRef.attachView(l.hostView),new Cm([[c]],l.hostView,l)}_setAriaHidden(e){const i=e.parentElement;i&&e!==this._document.body&&(Array.from(i.children).forEach(r=>{r!==e&&"SCRIPT"!==r.nodeName&&(this._ariaHiddenValues.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}),this._setAriaHidden(i))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,i)=>{e?i.setAttribute("aria-hidden",e):i.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const i=()=>{const r=this._modalRefs.indexOf(e);r>-1&&(this._modalRefs.splice(r,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(i,i)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const i=this._windowCmpts.indexOf(e);i>-1&&(this._windowCmpts.splice(i,1),this._activeWindowCmptHasChanged.next())})}}return t.\u0275fac=function(e){return new(e||t)(gt(Rh),gt(ua),gt($c),gt(co),gt(tPe),gt(Wg),gt(nr))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),iPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.backdrop=!0,this.fullscreen=!1,this.keyboard=!0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),f2=(()=>{class t{constructor(e,i,r){this._injector=e,this._modalStack=i,this._config=r}open(e,i={}){const r={...this._config,animation:this._config.animation,...i};return this._modalStack.open(this._injector,e,r)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}}return t.\u0275fac=function(e){return new(e||t)(gt(ua),gt(nPe),gt(iPe))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),uz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[f2]}),t})(),rPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const dz=t=>gm(t)&&""!==t;let oPe=0,hz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbNavContent",""]],standalone:!0}),t})(),Yh=(()=>{class t{constructor(e,i){this._nav=e,this.elementRef=i,this.disabled=!1,this.shown=new it,this.hidden=new it}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){gm(this.domId)||(this.domId="ngb-nav-"+oPe++)}get active(){return this._nav.activeId===this.id}get id(){return dz(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(gm(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}}return t.\u0275fac=function(e){return new(e||t)(de(Mi(()=>zd)),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(e,i,r){if(1&e&&yi(r,hz,4),2&e){let o;wn(o=Cn())&&(i.contentTpls=o)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("nav-item",!0)},inputs:{destroyOnHide:"destroyOnHide",disabled:"disabled",domId:"domId",_id:["ngbNavItem","_id"]},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbNavItem"],standalone:!0}),t})(),zd=(()=>{class t{constructor(e,i,r,o){this.role=e,this._cd=r,this._document=o,this.activeIdChange=new it,this.shown=new it,this.hidden=new it,this.destroy$=new dr,this.navItemChange$=new dr,this.navChange=new it,this.animation=i.animation,this.destroyOnHide=i.destroyOnHide,this.orientation=i.orientation,this.roles=i.roles,this.keyboard=i.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const i=e.which,r=this.links.filter(a=>!a.navItem.disabled),{length:o}=r;let s=-1;if(r.forEach((a,l)=>{a.elRef.nativeElement===this._document.activeElement&&(s=l)}),o){switch(i){case Or.ArrowLeft:if("vertical"===this.orientation)return;s=(s-1+o)%o;break;case Or.ArrowRight:if("vertical"===this.orientation)return;s=(s+1)%o;break;case Or.ArrowDown:if("horizontal"===this.orientation)return;s=(s+1)%o;break;case Or.ArrowUp:if("horizontal"===this.orientation)return;s=(s-1+o)%o;break;case Or.Home:s=0;break;case Or.End:s=o-1}"changeWithArrows"===this.keyboard&&this.select(r[s].navItem.id),r[s].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!gm(this.activeId)){const e=this.items.first?this.items.first.id:null;dz(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}this.items.changes.pipe(Ko(this.destroy$)).subscribe(()=>this._notifyItemChanged(this.activeId))}ngOnChanges({activeId:e}){e&&!e.firstChange&&this._notifyItemChanged(e.currentValue)}ngOnDestroy(){this.destroy$.next()}_updateActiveId(e,i=!0){if(this.activeId!==e){let r=!1;i&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{r=!0}}),r||(this.activeId=e,this.activeIdChange.emit(e),this._notifyItemChanged(e))}}_notifyItemChanged(e){this.navItemChange$.next(this._getItemById(e))}_getItemById(e){return this.items&&this.items.find(i=>i.id===e)||null}}return t.\u0275fac=function(e){return new(e||t)(Sf("role"),de(rPe),de(Ns),de(co))},t.\u0275dir=sn({type:t,selectors:[["","ngbNav",""]],contentQueries:function(e,i,r){if(1&e&&(yi(r,Yh,4),yi(r,Yf,5)),2&e){let o;wn(o=Cn())&&(i.items=o),wn(o=Cn())&&(i.links=o)}},hostVars:6,hostBindings:function(e,i){1&e&&ye("keydown.arrowLeft",function(o){return i.onKeyDown(o)})("keydown.arrowRight",function(o){return i.onKeyDown(o)})("keydown.arrowDown",function(o){return i.onKeyDown(o)})("keydown.arrowUp",function(o){return i.onKeyDown(o)})("keydown.Home",function(o){return i.onKeyDown(o)})("keydown.End",function(o){return i.onKeyDown(o)}),2&e&&(ut("aria-orientation","vertical"===i.orientation&&"tablist"===i.roles?"vertical":void 0)("role",i.role?i.role:i.roles?"tablist":void 0),jn("nav",!0)("flex-column","vertical"===i.orientation))},inputs:{activeId:"activeId",animation:"animation",destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard"},outputs:{activeIdChange:"activeIdChange",shown:"shown",hidden:"hidden",navChange:"navChange"},exportAs:["ngbNav"],standalone:!0,features:[Yn]}),t})(),Yf=(()=>{class t{constructor(e,i,r,o){this.role=e,this.navItem=i,this.nav=r,this.elRef=o}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}}return t.\u0275fac=function(e){return new(e||t)(Sf("role"),de(Yh),de(zd),de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbNavLink",""]],hostVars:14,hostBindings:function(e,i){2&e&&(Pl("id",i.navItem.domId),ut("role",i.role?i.role:i.nav.roles?"tab":void 0)("tabindex",i.navItem.disabled?-1:void 0)("aria-controls",i.navItem.isPanelInDom()?i.navItem.panelDomId:null)("aria-selected",i.navItem.active)("aria-disabled",i.navItem.disabled),jn("nav-link",!0)("nav-item",i.hasNavItemClass())("active",i.navItem.active)("disabled",i.navItem.disabled))},standalone:!0}),t})(),r_=(()=>{class t{constructor(e,i){this.navItem=e,this.nav=i}}return t.\u0275fac=function(e){return new(e||t)(de(Yh),de(zd))},t.\u0275dir=sn({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostBindings:function(e,i){1&e&&ye("click",function(o){return i.nav.click(i.navItem),o.preventDefault()})},standalone:!0,features:[G1([Yf])]}),t})();const lPe=({classList:t})=>(t.remove("show"),()=>t.remove("active")),cPe=(t,n)=>{n&&Iv(t),t.classList.add("show")};let DO=(()=>{class t{constructor(e){this.elRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275dir=sn({type:t,selectors:[["","ngbNavPane",""]],hostAttrs:[1,"tab-pane"],hostVars:5,hostBindings:function(e,i){2&e&&(Pl("id",i.item.panelDomId),ut("role",i.role?i.role:i.nav.roles?"tabpanel":void 0)("aria-labelledby",i.item.domId),jn("fade",i.nav.animation))},inputs:{item:"item",nav:"nav",role:"role"},standalone:!0}),t})(),fz=(()=>{class t{constructor(e,i){this._cd=e,this._ngZone=i,this._activePane=null}isPanelTransitioning(e){return this._activePane?.item===e}ngAfterViewInit(){this._updateActivePane(),this.nav.navItemChange$.pipe(Ko(this.nav.destroy$),aC(this._activePane?.item||null),JC(),function U3e(t){return n=>n.lift(new z3e(t))}(1)).subscribe(e=>{const i={animation:this.nav.animation,runningTransition:"stop"};this._cd.detectChanges(),this._activePane?ea(this._ngZone,this._activePane.elRef.nativeElement,lPe,i).subscribe(()=>{const r=this._activePane?.item;this._activePane=this._getPaneForItem(e),this._cd.markForCheck(),this._activePane&&(this._activePane.elRef.nativeElement.classList.add("active"),ea(this._ngZone,this._activePane.elRef.nativeElement,cPe,i).subscribe(()=>{e&&(e.shown.emit(),this.nav.shown.emit(e.id))})),r&&(r.hidden.emit(),this.nav.hidden.emit(r.id))}):this._updateActivePane()})}_updateActivePane(){this._activePane=this._getActivePane(),this._activePane?.elRef.nativeElement.classList.add("show"),this._activePane?.elRef.nativeElement.classList.add("active")}_getPaneForItem(e){return this._panes&&this._panes.find(i=>i.item===e)||null}_getActivePane(){return this._panes&&this._panes.find(e=>e.item.active)||null}}return t.\u0275fac=function(e){return new(e||t)(de(Ns),de(nr))},t.\u0275cmp=Rt({type:t,selectors:[["","ngbNavOutlet",""]],viewQuery:function(e,i){if(1&e&&xo(DO,5),2&e){let r;wn(r=Cn())&&(i._panes=r)}},hostVars:2,hostBindings:function(e,i){2&e&&jn("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},standalone:!0,features:[Is],attrs:RIe,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["ngbNavPane","",3,"item","nav","role",4,"ngIf"],["ngbNavPane","",3,"item","nav","role"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&Z(0,BIe,1,1,"ng-template",0),2&e&&S("ngForOf",i.nav.items)},dependencies:[DO,Ln,vn,Au],encapsulation:2,changeDetection:0}),t})(),pz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[fz]}),t})(),uPe=(()=>{class t{constructor(){this.disabled=!1,this.boundaryLinks=!1,this.directionLinks=!0,this.ellipses=!0,this.maxSize=0,this.pageSize=10,this.rotate=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),mz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationEllipsis",""]],standalone:!0}),t})(),gz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationFirst",""]],standalone:!0}),t})(),vz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationLast",""]],standalone:!0}),t})(),yz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationNext",""]],standalone:!0}),t})(),_z=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationNumber",""]],standalone:!0}),t})(),bz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationPrevious",""]],standalone:!0}),t})(),xz=(()=>{class t{constructor(e){this.templateRef=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["ng-template","ngbPaginationPages",""]],standalone:!0}),t})(),wz=(()=>{class t{constructor(e){this.pageCount=0,this.pages=[],this.page=1,this.pageChange=new it(!0),this.disabled=e.disabled,this.boundaryLinks=e.boundaryLinks,this.directionLinks=e.directionLinks,this.ellipses=e.ellipses,this.maxSize=e.maxSize,this.pageSize=e.pageSize,this.rotate=e.rotate,this.size=e.size}hasPrevious(){return this.page>1}hasNext(){return this.page0&&(e>2?this.pages.unshift(-1):2===e&&this.pages.unshift(2),this.pages.unshift(1)),i0&&this.pageCount>this.maxSize){let i=0,r=this.pageCount;[i,r]=this.rotate?this._applyRotation():this._applyPagination(),this.pages=this.pages.slice(i,r),this._applyEllipses(i,r)}}}return t.\u0275fac=function(e){return new(e||t)(de(uPe))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-pagination"]],contentQueries:function(e,i,r){if(1&e&&(yi(r,mz,5),yi(r,gz,5),yi(r,vz,5),yi(r,yz,5),yi(r,_z,5),yi(r,bz,5),yi(r,xz,5)),2&e){let o;wn(o=Cn())&&(i.tplEllipsis=o.first),wn(o=Cn())&&(i.tplFirst=o.first),wn(o=Cn())&&(i.tplLast=o.first),wn(o=Cn())&&(i.tplNext=o.first),wn(o=Cn())&&(i.tplNumber=o.first),wn(o=Cn())&&(i.tplPrevious=o.first),wn(o=Cn())&&(i.tplPages=o.first)}},hostAttrs:["role","navigation"],inputs:{disabled:"disabled",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",ellipses:"ellipses",rotate:"rotate",collectionSize:"collectionSize",maxSize:"maxSize",page:"page",pageSize:"pageSize",size:"size"},outputs:{pageChange:"pageChange"},standalone:!0,features:[Yn,Is],decls:20,vars:12,consts:function(){let n,e,i,r,o,s,a,l;return n=$localize`:@@ngb.pagination.first:««`,e=$localize`:@@ngb.pagination.previous:«`,i=$localize`:@@ngb.pagination.next:»`,r=$localize`:@@ngb.pagination.last:»»`,o=$localize`:@@ngb.pagination.first-aria:First`,s=$localize`:@@ngb.pagination.previous-aria:Previous`,a=$localize`:@@ngb.pagination.next-aria:Next`,l=$localize`:@@ngb.pagination.last-aria:Last`,[["first",""],["previous",""],["next",""],["last",""],["ellipsis",""],["defaultNumber",""],["defaultPages",""],["class","page-item",3,"disabled",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true"],n,e,i,r,["class","page-item",3,"active","disabled",4,"ngFor","ngForOf"],[1,"page-item"],["class","page-link","tabindex","-1","aria-disabled","true",4,"ngIf"],["class","page-link","href","",3,"click",4,"ngIf"],["tabindex","-1","aria-disabled","true",1,"page-link"],["href","",1,"page-link",3,"click"],["aria-label",o,"href","",1,"page-link",3,"click"],["aria-label",s,"href","",1,"page-link",3,"click"],["aria-label",a,"href","",1,"page-link",3,"click"],["aria-label",l,"href","",1,"page-link",3,"click"]]},template:function(e,i){if(1&e&&(Z(0,VIe,2,0,"ng-template",null,0,cs),Z(2,HIe,2,0,"ng-template",null,1,cs),Z(4,UIe,2,0,"ng-template",null,2,cs),Z(6,zIe,2,0,"ng-template",null,3,cs),Z(8,GIe,1,0,"ng-template",null,4,cs),Z(10,WIe,1,1,"ng-template",null,5,cs),Z(12,eNe,1,1,"ng-template",null,6,cs),_(14,"ul"),Z(15,nNe,3,9,"li",7),Z(16,oNe,3,8,"li",7),Z(17,sNe,0,0,"ng-template",8),Z(18,lNe,3,9,"li",7),Z(19,uNe,3,9,"li",7),x()),2&e){const r=Ta(13);w(14),Pd("pagination"+(i.size?" pagination-"+i.size:"")),w(1),S("ngIf",i.boundaryLinks),w(1),S("ngIf",i.directionLinks),w(1),S("ngTemplateOutlet",(null==i.tplPages?null:i.tplPages.templateRef)||r)("ngTemplateOutletContext",ty(8,dNe,i.page,i.pages,i.disabled)),w(1),S("ngIf",i.directionLinks),w(1),S("ngIf",i.boundaryLinks)}},dependencies:[vn,Ln,Au],encapsulation:2,changeDetection:0}),t})(),Cz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[wz]}),t})();class dPe{constructor(n,e){this.open=n,this.close=e,e||(this.close=n)}isManual(){return"manual"===this.open||"manual"===this.close}}const hPe={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},Sz=t=>t>0?Q3(t):n=>n;let kz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})(),vPe=(()=>{class t{constructor(){this.max=100,this.animated=!1,this.ariaLabel="progress bar",this.striped=!1,this.showValue=!1}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),yPe=(()=>{class t{constructor(e){this.value=0,this.max=e.max,this.animated=e.animated,this.ariaLabel=e.ariaLabel,this.striped=e.striped,this.textType=e.textType,this.type=e.type,this.showValue=e.showValue,this.height=e.height}set max(e){this._max=!ds(e)||e<=0?100:e}get max(){return this._max}getValue(){return n2(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}}return t.\u0275fac=function(e){return new(e||t)(de(vPe))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-progressbar"]],hostAttrs:["role","progressbar","aria-valuemin","0",1,"progress"],hostVars:5,hostBindings:function(e,i){2&e&&(ut("aria-valuenow",i.getValue())("aria-valuemax",i.max)("aria-label",i.ariaLabel),tr("height",i.height))},inputs:{max:"max",animated:"animated",ariaLabel:"ariaLabel",striped:"striped",showValue:"showValue",textType:"textType",type:"type",value:"value",height:"height"},standalone:!0,features:[Is],ngContentSelectors:Qy,decls:3,vars:11,consts:function(){let n;return n=$localize`:@@ngb.progressbar.value:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[4,"ngIf"],n]},template:function(e,i){1&e&&(kf(),_(0,"div"),Z(1,pNe,3,3,"span",0),Df(2),x()),2&e&&(function V6(t,n,e,i,r){Du(ic,jd,Zg(zt(),t,n,e,i,r),!0)}("progress-bar",i.type?i.textType?" bg-"+i.type:" text-bg-"+i.type:"","",i.textType?" text-"+i.textType:"",""),tr("width",i.getPercentValue(),"%"),jn("progress-bar-animated",i.animated)("progress-bar-striped",i.striped),w(1),S("ngIf",i.showValue))},dependencies:[vn,h7],encapsulation:2,changeDetection:0}),t})(),Dz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[yPe]}),t})(),_Pe=(()=>{class t{constructor(){this.max=10,this.readonly=!1,this.resettable=!1,this.tabindex=0}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),bPe=(()=>{class t{constructor(e,i){this._changeDetectorRef=i,this.contexts=[],this.disabled=!1,this.hover=new it,this.leave=new it,this.rateChange=new it(!0),this.onChange=r=>{},this.onTouched=()=>{},this.max=e.max,this.readonly=e.readonly,this.tabindex=e.tabindex}ariaValueText(e,i){return`${e} out of ${i}`}isInteractive(){return!this.readonly&&!this.disabled}enter(e){this.isInteractive()&&this._updateState(e),this.hover.emit(e)}handleBlur(){this.onTouched()}handleClick(e){this.isInteractive()&&this.update(this.resettable&&this.rate===e?0:e)}handleKeyDown(e){switch(e.which){case Or.ArrowDown:case Or.ArrowLeft:this.update(this.rate-1);break;case Or.ArrowUp:case Or.ArrowRight:this.update(this.rate+1);break;case Or.Home:this.update(0);break;case Or.End:this.update(this.max);break;default:return}e.preventDefault()}ngOnChanges(e){e.rate&&this.update(this.rate),e.max&&this._updateMax()}ngOnInit(){this._setupContexts(),this._updateState(this.rate)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(e){this.disabled=e}update(e,i=!0){const r=n2(e,this.max,0);this.isInteractive()&&this.rate!==r&&(this.rate=r,this.rateChange.emit(this.rate)),i&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(e){this.update(e,!1),this._changeDetectorRef.markForCheck()}_updateState(e){this.nextRate=e,this.contexts.forEach((i,r)=>i.fill=Math.round(100*n2(e-r,1,0)))}_updateMax(){this.max>0&&(this._setupContexts(),this.update(this.rate))}_setupContexts(){this.contexts=Array.from({length:this.max},(e,i)=>({fill:0,index:i}))}}return t.\u0275fac=function(e){return new(e||t)(de(_Pe),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-rating"]],contentQueries:function(e,i,r){if(1&e&&yi(r,oo,5),2&e){let o;wn(o=Cn())&&(i.starTemplateFromContent=o.first)}},hostAttrs:["role","slider","aria-valuemin","0",1,"d-inline-flex"],hostVars:5,hostBindings:function(e,i){1&e&&ye("blur",function(){return i.handleBlur()})("keydown",function(o){return i.handleKeyDown(o)})("mouseleave",function(){return i.reset()}),2&e&&(Pl("tabindex",i.disabled?-1:i.tabindex),ut("aria-valuemax",i.max)("aria-valuenow",i.nextRate)("aria-valuetext",i.ariaValueText(i.nextRate,i.max))("aria-disabled",!!i.readonly||null))},inputs:{max:"max",rate:"rate",readonly:"readonly",resettable:"resettable",starTemplate:"starTemplate",tabindex:"tabindex",ariaValueText:"ariaValueText"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},standalone:!0,features:[Qr([{provide:$l,useExisting:Mi(()=>t),multi:!0}]),Yn,Is],decls:3,vars:1,consts:[["t",""],["ngFor","",3,"ngForOf"],[1,"visually-hidden"],[3,"mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(Z(0,mNe,1,1,"ng-template",null,0,cs),Z(2,vNe,4,5,"ng-template",1)),2&e&&(w(2),S("ngForOf",i.contexts))},dependencies:[Ln,Au],encapsulation:2,changeDetection:0}),t})(),Tz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[bPe]}),t})();class Ez{constructor(n,e,i){this.hour=Pa(n),this.minute=Pa(e),this.second=Pa(i)}changeHour(n=1){this.updateHour((isNaN(this.hour)?0:this.hour)+n)}updateHour(n){this.hour=ds(n)?(n<0?24+n:n)%24:NaN}changeMinute(n=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+n)}updateMinute(n){ds(n)?(this.minute=n%60<0?60+n%60:n%60,this.changeHour(Math.floor(n/60))):this.minute=NaN}changeSecond(n=1){this.updateSecond((isNaN(this.second)?0:this.second)+n)}updateSecond(n){ds(n)?(this.second=n<0?60+n%60:n%60,this.changeMinute(Math.floor(n/60))):this.second=NaN}isValid(n=!0){return ds(this.hour)&&ds(this.minute)&&(!n||ds(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let xPe=(()=>{class t{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),Az=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(){return function wPe(){return new CPe}()},providedIn:"root"}),t})(),CPe=(()=>{class t extends Az{fromModel(e){return e&&Qo(e.hour)&&Qo(e.minute)?{hour:e.hour,minute:e.minute,second:Qo(e.second)?e.second:null}:null}toModel(e){return e&&Qo(e.hour)&&Qo(e.minute)?{hour:e.hour,minute:e.minute,second:Qo(e.second)?e.second:null}:null}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),Mz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=Et({token:t,factory:function(e){let i=null;return i=e?new e:function SPe(t){return new kPe(t)}(gt(lc)),i},providedIn:"root"}),t})(),kPe=(()=>{class t extends Mz{constructor(e){super(),this._periods=WB(e,Ro.Standalone,Vi.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}}return t.\u0275fac=function(e){return new(e||t)(gt(lc))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})();const DPe=/[^0-9]/g;let TPe=(()=>{class t{constructor(e,i,r,o){this._config=e,this._ngbTimeAdapter=i,this._cd=r,this.i18n=o,this.onChange=s=>{},this.onTouched=()=>{},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}set hourStep(e){this._hourStep=Qo(e)?e:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(e){this._minuteStep=Qo(e)?e:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(e){this._secondStep=Qo(e)?e:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(e){const i=this._ngbTimeAdapter.fromModel(e);this.model=i?new Ez(i.hour,i.minute,i.second):new Ez,!this.seconds&&(!i||!ds(i.second))&&(this.model.second=0),this._cd.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}changeHour(e){this.model?.changeHour(e),this.propagateModelChange()}changeMinute(e){this.model?.changeMinute(e),this.propagateModelChange()}changeSecond(e){this.model?.changeSecond(e),this.propagateModelChange()}updateHour(e){const i=!!this.model&&this.model.hour>=12,r=Pa(e);this.model?.updateHour(this.meridian&&(i&&r<12||!i&&12===r)?r+12:r),this.propagateModelChange()}updateMinute(e){this.model?.updateMinute(Pa(e)),this.propagateModelChange()}updateSecond(e){this.model?.updateSecond(Pa(e)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(e){e.value=e.value.replace(DPe,"")}formatHour(e){return ds(e)?Ov(this.meridian?e%12==0?12:e%12:e%24):Ov(NaN)}formatMinSec(e){return Ov(ds(e)?e:NaN)}handleBlur(){this.onTouched()}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(e){e.seconds&&!this.seconds&&this.model&&!ds(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(e=!0){e&&this.onTouched(),this.model?.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}}return t.\u0275fac=function(e){return new(e||t)(de(xPe),de(Az),de(Ns),de(Mz))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},exportAs:["ngbTimepicker"],standalone:!0,features:[Qr([{provide:$l,useExisting:Mi(()=>t),multi:!0}]),Yn,Is],decls:16,vars:25,consts:function(){let n,e,i,r,o,s,a,l,c,u,d,h,f,p;return n=$localize`:@@ngb.timepicker.HH:HH`,e=$localize`:@@ngb.timepicker.hours:Hours`,i=$localize`:@@ngb.timepicker.MM:MM`,r=$localize`:@@ngb.timepicker.minutes:Minutes`,o=$localize`:@@ngb.timepicker.increment-hours:Increment hours`,s=$localize`:@@ngb.timepicker.decrement-hours:Decrement hours`,a=$localize`:@@ngb.timepicker.increment-minutes:Increment minutes`,l=$localize`:@@ngb.timepicker.decrement-minutes:Decrement minutes`,c=$localize`:@@ngb.timepicker.SS:SS`,u=$localize`:@@ngb.timepicker.seconds:Seconds`,d=$localize`:@@ngb.timepicker.increment-seconds:Increment seconds`,h=$localize`:@@ngb.timepicker.decrement-seconds:Decrement seconds`,f=$localize`:@@ngb.timepicker.PM:${"\ufffd0\ufffd"}:INTERPOLATION:`,p=$localize`:@@ngb.timepicker.AM:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric","placeholder",n,"aria-label",e,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["type","text","maxlength","2","inputmode","numeric","placeholder",i,"aria-label",r,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"visually-hidden"],o,[1,"chevron","ngb-tp-chevron","bottom"],s,a,l,[1,"ngb-tp-input-container","ngb-tp-second"],["type","text","maxlength","2","inputmode","numeric","placeholder",c,"aria-label",u,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","blur","input","keydown.ArrowUp","keydown.ArrowDown"],d,h,[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],f,p]},template:function(e,i){1&e&&(_(0,"fieldset",0)(1,"div",1)(2,"div",2),Z(3,yNe,4,7,"button",3),_(4,"input",4),ye("change",function(o){return i.updateHour(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeHour(i.hourStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeHour(-i.hourStep),o.preventDefault()}),x(),Z(5,_Ne,4,7,"button",3),x(),_(6,"div",5),O(7,":"),x(),_(8,"div",6),Z(9,bNe,4,7,"button",3),_(10,"input",7),ye("change",function(o){return i.updateMinute(o.target.value)})("blur",function(){return i.handleBlur()})("input",function(o){return i.formatInput(o.target)})("keydown.ArrowUp",function(o){return i.changeMinute(i.minuteStep),o.preventDefault()})("keydown.ArrowDown",function(o){return i.changeMinute(-i.minuteStep),o.preventDefault()}),x(),Z(11,xNe,4,7,"button",3),x(),Z(12,wNe,2,0,"div",8),Z(13,kNe,4,9,"div",9),Z(14,DNe,1,0,"div",8),Z(15,ANe,5,9,"div",10),x()()),2&e&&(jn("disabled",i.disabled),S("disabled",i.disabled),w(3),S("ngIf",i.spinners),w(1),jn("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatHour(null==i.model?null:i.model.hour))("readOnly",i.readonlyInputs)("disabled",i.disabled),w(1),S("ngIf",i.spinners),w(4),S("ngIf",i.spinners),w(1),jn("form-control-sm",i.isSmallSize)("form-control-lg",i.isLargeSize),S("value",i.formatMinSec(null==i.model?null:i.model.minute))("readOnly",i.readonlyInputs)("disabled",i.disabled),w(1),S("ngIf",i.spinners),w(1),S("ngIf",i.seconds),w(1),S("ngIf",i.seconds),w(1),S("ngIf",i.meridian),w(1),S("ngIf",i.meridian))},dependencies:[vn],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:flex;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron:before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-minute,.ngb-tp-second,.ngb-tp-meridian{display:flex;flex-direction:column;align-items:center;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}\n'],encapsulation:2}),t})(),Oz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[TPe]}),t})();const EPe=(t,n)=>{const{classList:e}=t;if(n)return e.add("fade"),Iv(t),e.add("show","showing"),()=>{e.remove("showing")};e.add("show")},APe=({classList:t})=>(t.add("showing"),()=>{t.remove("show","showing")});let MPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autohide=!0,this.delay=5e3,this.ariaLive="polite"}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),OPe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=sn({type:t,selectors:[["","ngbToastHeader",""]],standalone:!0}),t})(),IPe=(()=>{class t{constructor(e,i,r,o){this.ariaLive=e,this._zone=r,this._element=o,this.contentHeaderTpl=null,this.shown=new it,this.hidden=new it,null==this.ariaLive&&(this.ariaLive=i.ariaLive),this.delay=i.delay,this.autohide=i.autohide,this.animation=i.animation}ngAfterContentInit(){this._zone.onStable.asObservable().pipe(Ks(1)).subscribe(()=>{this._init(),this.show()})}ngOnChanges(e){"autohide"in e&&(this._clearTimeout(),this._init())}hide(){this._clearTimeout();const e=ea(this._zone,this._element.nativeElement,APe,{animation:this.animation,runningTransition:"stop"});return e.subscribe(()=>{this.hidden.emit()}),e}show(){const e=ea(this._zone,this._element.nativeElement,EPe,{animation:this.animation,runningTransition:"continue"});return e.subscribe(()=>{this.shown.emit()}),e}_init(){this.autohide&&!this._timeoutID&&(this._timeoutID=setTimeout(()=>this.hide(),this.delay))}_clearTimeout(){this._timeoutID&&(clearTimeout(this._timeoutID),this._timeoutID=null)}}return t.\u0275fac=function(e){return new(e||t)(Sf("aria-live"),de(MPe),de(nr),de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["ngb-toast"]],contentQueries:function(e,i,r){if(1&e&&yi(r,OPe,7,oo),2&e){let o;wn(o=Cn())&&(i.contentHeaderTpl=o.first)}},hostAttrs:["role","alert","aria-atomic","true",1,"toast"],hostVars:3,hostBindings:function(e,i){2&e&&(ut("aria-live",i.ariaLive),jn("fade",i.animation))},inputs:{animation:"animation",delay:"delay",autohide:"autohide",header:"header"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbToast"],standalone:!0,features:[Yn,Is],ngContentSelectors:Qy,decls:5,vars:1,consts:function(){let n;return n=$localize`:@@ngb.toast.close-aria:Close`,[["headerTpl",""],[3,"ngIf"],[1,"toast-body"],[1,"me-auto"],[1,"toast-header"],[3,"ngTemplateOutlet"],["type","button","aria-label",n,1,"btn-close",3,"click"]]},template:function(e,i){1&e&&(kf(),Z(0,MNe,2,1,"ng-template",null,0,cs),Z(2,INe,3,1,"ng-template",1),_(3,"div",2),Df(4),x()),2&e&&(w(2),S("ngIf",i.contentHeaderTpl||i.header))},dependencies:[vn,Au],styles:["ngb-toast{display:block}ngb-toast .toast-header .close{margin-left:auto;margin-bottom:.25rem}\n"],encapsulation:2}),t})(),Iz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[IPe]}),t})(),NPe=(()=>{class t{constructor(e){this._ngbConfig=e,this.autoClose=!0,this.placement="auto",this.popperOptions=i=>i,this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}get animation(){return void 0===this._animation?this._ngbConfig.animation:this._animation}set animation(e){this._animation=e}}return t.\u0275fac=function(e){return new(e||t)(gt(zf))},t.\u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),FPe=0,PPe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip",2,"position","absolute"],hostVars:5,hostBindings:function(e,i){2&e&&(Pl("id",i.id),Pd("tooltip"+(i.tooltipClass?" "+i.tooltipClass:"")),jn("fade",i.animation))},inputs:{animation:"animation",id:"id",tooltipClass:"tooltipClass"},standalone:!0,features:[Is],ngContentSelectors:Qy,decls:3,vars:0,consts:[["data-popper-arrow","",1,"tooltip-arrow"],[1,"tooltip-inner"]],template:function(e,i){1&e&&(kf(),pe(0,"div",0),_(1,"div",1),Df(2),x())},encapsulation:2,changeDetection:0}),t})(),jPe=(()=>{class t{constructor(e,i,r,o,s,a,l,c,u){this._elementRef=e,this._renderer=i,this._ngZone=a,this._document=l,this._changeDetector=c,this.shown=new it,this.hidden=new it,this._ngbTooltipWindowId="ngb-tooltip-"+FPe++,this._windowRef=null,this.animation=s.animation,this.autoClose=s.autoClose,this.placement=s.placement,this.popperOptions=s.popperOptions,this.triggers=s.triggers,this.container=s.container,this.disableTooltip=s.disableTooltip,this.tooltipClass=s.tooltipClass,this.openDelay=s.openDelay,this.closeDelay=s.closeDelay,this._popupService=new XFe(PPe,r,o,i,this._ngZone,u),this._positioning=wO()}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){if(!this._windowRef&&this._ngbTooltip&&!this.disableTooltip){const{windowRef:i,transition$:r}=this._popupService.open(this._ngbTooltip,e,this.animation);this._windowRef=i,this._windowRef.setInput("animation",this.animation),this._windowRef.setInput("tooltipClass",this.tooltipClass),this._windowRef.setInput("id",this._ngbTooltipWindowId),this._renderer.setAttribute(this._getPositionTargetElement(),"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),this._ngZone.runOutsideAngular(()=>{this._positioning.createPopper({hostElement:this._getPositionTargetElement(),targetElement:this._windowRef.location.nativeElement,placement:this.placement,appendToBody:"body"===this.container,baseClass:"bs-tooltip",updatePopperOptions:o=>this.popperOptions(o)}),Promise.resolve().then(()=>{this._positioning.update(),this._zoneSubscription=this._ngZone.onStable.subscribe(()=>this._positioning.update())})}),xO(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),r.subscribe(()=>this.shown.emit())}}close(e=this.animation){null!=this._windowRef&&(this._renderer.removeAttribute(this._getPositionTargetElement(),"aria-describedby"),this._popupService.close(e).subscribe(()=>{this._windowRef=null,this._positioning.destroy(),this._zoneSubscription?.unsubscribe(),this.hidden.emit(),this._changeDetector.markForCheck()}))}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=function gPe(t,n,e,i,r,o,s=0,a=0){const l=function fPe(t,n=hPe){const e=(t||"").trim();if(0===e.length)return[];const i=e.split(/\s+/).map(o=>o.split(":")).map(o=>{let s=n[o[0]]||o;return new dPe(s[0],s[1])}),r=i.filter(o=>o.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(e);if(1===l.length&&l[0].isManual())return()=>{};const c=function pPe(t,n,e,i){return new en(r=>{const o=[],s=()=>r.next(!0),a=()=>r.next(!1),l=()=>r.next(!i());return e.forEach(c=>{c.open===c.close?o.push(t.listen(n,c.open,l)):o.push(t.listen(n,c.open,s),t.listen(n,c.close,a))}),()=>{o.forEach(c=>c())}})}(t,n,l,i).pipe(function mPe(t,n,e){return i=>{let r=null;const o=i.pipe(_n(l=>({open:l})),us(l=>{const c=e();return c===l.open||r&&r.open!==c?(r&&r.open!==l.open&&(r=null),!1):(r=l,!0)}),Ge());return Dt(o.pipe(us(l=>l.open),Sz(t)),o.pipe(us(l=>!l.open),Sz(n))).pipe(us(l=>l===r&&(r=null,l.open!==e())),_n(l=>l.open))}}(s,a,i)).subscribe(u=>u?r():o());return()=>c.unsubscribe()}(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(!1),this._unregisterListenersFn?.()}_getPositionTargetElement(){return(mm(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget)||this._elementRef.nativeElement}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca),de(ua),de(jl),de(NPe),de(nr),de(co),de(Ns),de(Rh))},t.\u0275dir=sn({type:t,selectors:[["","ngbTooltip",""]],inputs:{animation:"animation",autoClose:"autoClose",placement:"placement",popperOptions:"popperOptions",triggers:"triggers",positionTarget:"positionTarget",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],standalone:!0,features:[Yn]}),t})(),Nz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})(),RPe=(()=>{class t{constructor(){this.highlightClass="ngb-highlight",this.accentSensitive=!0}ngOnChanges(e){!this.accentSensitive&&!String.prototype.normalize&&(console.warn("The `accentSensitive` input in `ngb-highlight` cannot be set to `false` in a browser that does not implement the `String.normalize` function. You will have to include a polyfill in your application to use this feature in the current browser."),this.accentSensitive=!0);const i=TU(this.result),r=Array.isArray(this.term)?this.term:[this.term],o=c=>this.accentSensitive?c:MU(c),s=r.map(c=>function LNe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(o(TU(c)))).filter(c=>c),a=this.accentSensitive?i:MU(i),l=s.length?a.split(new RegExp(`(${s.join("|")})`,"gmi")):[i];if(this.accentSensitive)this.parts=l;else{let c=0;this.parts=l.map(u=>i.substring(c,c+=u.length))}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term",accentSensitive:"accentSensitive"},standalone:!0,features:[Yn,Is],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(e,i){1&e&&Z(0,PNe,3,2,"ng-template",0),2&e&&S("ngForOf",i.parts)},dependencies:[vn,Ln],styles:[".ngb-highlight{font-weight:700}\n"],encapsulation:2,changeDetection:0}),t})();new Vn("live announcer delay",{providedIn:"root",factory:function LPe(){return 100}});let Fz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[RPe]}),t})(),Pz=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({}),t})();const $Pe=[$U,BU,HU,UU,az,lz,uz,pz,Pz,Cz,kz,Dz,Tz,Oz,Iz,Nz,Fz];let BPe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[$Pe,$U,BU,HU,UU,az,lz,uz,pz,Pz,Cz,kz,Dz,Tz,Oz,Iz,Nz,Fz]}),t})(),jz=(()=>{class t{restrictedPages=new Map([["users",ti.USER_ROLE_ADMIN],["config",ti.USER_ROLE_DEVELOPER],["modules",ti.USER_ROLE_DEVELOPER],["apiexplorer",ti.USER_ROLE_DEVELOPER]]);static \u0275fac=function(i){return new(i||t)};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function VPe(t,n){if(1&t&&(sc(0,5),_(1,"a",31),pe(2,"img",32),_(3,"span",12),O(4),x()(),ac()),2&t){const e=$().$implicit;S("ngbNavItem",e.navItem),w(1),S("routerLink",e.routerLink),w(1),Kp("src","/static/svg/",e.icon,".svg",$1),w(2),bt(e.label)}}function HPe(t,n){1&t&&pe(0,"hr")}function UPe(t,n){if(1&t&&(Z(0,VPe,5,4,"ng-container",30),Z(1,HPe,1,0,"hr",29)),2&t){const e=n.$implicit;S("ngIf",$().getSessionRole()<=e.minRole),w(1),S("ngIf",e.separator)}}function zPe(t,n){if(1&t&&(_(0,"div",33)(1,"h2",34),pe(2,"img",35),O(3,"An error has occurred!"),x(),_(4,"h6",36),O(5),x(),_(6,"p"),O(7,"Please refresh the page to try again."),x()()),2&t){const e=$();w(5),bt(e.error)}}function GPe(t,n){1&t&&(_(0,"div",37),pe(1,"img",38),x())}function WPe(t,n){1&t&&pe(0,"router-outlet")}const qPe=function(){return["/"]},YPe=function(){return["/login"]};let XPe=(()=>{class t{route;router;segment;consoleService;authService;routerSub;segmentRouterSub;loading=!0;error="";routes=[{navItem:"status",routerLink:["/status"],label:"Status",minRole:ti.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:ti.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:ti.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:ti.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:ti.USER_ROLE_READONLY,icon:"accounts"},{navItem:"groups",routerLink:["/groups"],label:"Groups",minRole:ti.USER_ROLE_READONLY,icon:"groups"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:ti.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:ti.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"chat",routerLink:["/chat"],label:"Chat Messages",minRole:ti.USER_ROLE_READONLY,icon:"chat"},{navItem:"purchases",routerLink:["/purchases"],label:"Purchases",minRole:ti.USER_ROLE_READONLY,icon:""},{navItem:"subscriptions",routerLink:["/subscriptions"],label:"Subscriptions",minRole:ti.USER_ROLE_READONLY,icon:""},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:ti.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:ti.USER_ROLE_DEVELOPER,icon:"api-explorer"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.segment=r,this.consoleService=o,this.authService=s,this.loading=!1,this.routerSub=this.router.events.pipe(function v3e(t){let n=arguments.length,e=XC;Ca(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],n--);let i=null;n>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return n>=3&&(r=arguments[2]),function(s){return s.lift(new y3e(t,i,r,e))}}(2e3)).subscribe(a=>{if(0===a.length)return;const l=a[a.length-1];l instanceof gC&&(this.loading=!0),l instanceof Gh&&(this.loading=!1),l instanceof ky&&(this.loading=!1),l instanceof yC&&(this.loading=!1,this.error=l.error)}),this.segmentRouterSub=i.events.pipe(JC((a,l)=>!(l instanceof Gh)||a.url===l.url)).subscribe(a=>{a&&r.page(a.url)})}ngOnInit(){this.route.data.subscribe(e=>{this.error=e.error?e.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout().subscribe(()=>{this.router.navigate(["/login"])})}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(e){}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(zC),de(bi),de(zo))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:49,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","http://heroiclabs.com/cloud?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Heroic%20Cloud%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/hiro/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Hiro%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/hiro.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/satori/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Satori%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/satori.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/docs/nakama/getting-started/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Documentation%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog/?utm_source=NOSS%20Secure&utm_medium=Banner&utm_campaign=NOSS%20Blog%20Secure","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"nav",2,3),ye("navChange",function(s){return r.onSidebarNavChange(s)}),_(4,"div",4),sc(5,5),_(6,"a",6),pe(7,"img",7)(8,"img",8),x(),ac(),pe(9,"hr"),Z(10,UPe,2,2,"ng-template",9),pe(11,"hr"),_(12,"a",10),pe(13,"img",11),_(14,"span",12),O(15,"Heroic Cloud"),x()(),_(16,"a",13),pe(17,"img",14),_(18,"span",12),O(19,"Hiro"),x()(),_(20,"a",15),pe(21,"img",16),_(22,"span",12),O(23,"Satori"),x()(),pe(24,"hr"),_(25,"a",17),pe(26,"img",18),_(27,"span",12),O(28,"Documentation"),x()(),_(29,"a",19),pe(30,"img",20),_(31,"span",12),O(32,"Forum"),x()(),_(33,"a",21),pe(34,"img",22),_(35,"span",12),O(36,"Heroic Labs Blog"),x()(),pe(37,"hr"),_(38,"div",23),O(39),x(),sc(40,5),_(41,"a",24),ye("click",function(){return r.logout()}),pe(42,"img",25),_(43,"span",12),O(44,"Logout"),x()(),ac(),x()(),_(45,"main",26),Z(46,zPe,8,1,"div",27),Z(47,GPe,2,0,"div",28),Z(48,WPe,1,0,"router-outlet",29),x()()()),2&i&&(w(5),S("ngbNavItem","logo"),w(1),S("routerLink",ml(9,qPe)),w(4),S("ngForOf",r.routes),w(29),mn("Logged in as: ",r.getUsername(),""),w(1),S("ngbNavItem","logout"),w(1),S("routerLink",ml(10,YPe)),w(5),S("ngIf",r.error),w(1),S("ngIf",!r.error&&r.loading),w(1),S("ngIf",!r.error&&!r.loading))},dependencies:[cm,Ou,Ny,Ln,vn,zd,Yh,r_,Yf],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:transparent!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:#e1e1e11a}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width: 1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px;color:#fff}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]})}return t})(),JPe=(()=>{class t{authService;router;globals;constructor(e,i,r){this.authService=e,this.router=i,this.globals=r}canActivate(e,i){return!0}canActivateChild(e,i){const r=this.globals.restrictedPages.get(e.url[0].path);return!(null!==r&&r{const a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(n){const i=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component);let r;return n.viewContainerRef?(r=n.viewContainerRef.createComponent(i,n.viewContainerRef.length,n.injector||n.viewContainerRef.injector),this.setDisposeFn(()=>r.destroy())):(r=i.create(n.injector||this._defaultInjector||ua.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=n,r}attachTemplatePortal(n){let e=n.viewContainerRef,i=e.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=n,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(n){return n.hostView.rootNodes[0]}}class tje extends eje{}"function"==typeof SuppressedError&&SuppressedError;class Dje{constructor(n,e){this.dueTime=n,this.scheduler=e}call(n,e){return e.subscribe(new Tje(n,this.dueTime,this.scheduler))}}class Tje extends F{constructor(n,e,i){super(n),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(n){this.clearDebounce(),this.lastValue=n,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Eje,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:n}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(n)}}clearDebounce(){const n=this.debouncedSubscription;null!==n&&(this.remove(n),n.unsubscribe(),this.debouncedSubscription=null)}}function Eje(t){t.debouncedNext()}function Aje(){}function IO(t){return null==t?Aje:function(){return this.querySelector(t)}}function Oje(){return[]}function Bz(t){return null==t?Oje:function(){return this.querySelectorAll(t)}}function Vz(t){return function(){return this.matches(t)}}function Hz(t){return new Array(t.length)}function p2(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}p2.prototype={constructor:p2,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Uz="$";function jje(t,n,e,i,r,o){for(var a,s=0,l=n.length,c=o.length;sn?1:t>=n?0:NaN}var NO="http://www.w3.org/1999/xhtml";const zz={svg:"http://www.w3.org/2000/svg",xhtml:NO,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function m2(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),zz.hasOwnProperty(n)?{space:zz[n],local:t}:t}function Kje(t){return function(){this.removeAttribute(t)}}function Qje(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Zje(t,n){return function(){this.setAttribute(t,n)}}function e4e(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function t4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function n4e(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Gz(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function r4e(t){return function(){this.style.removeProperty(t)}}function o4e(t,n,e){return function(){this.style.setProperty(t,n,e)}}function s4e(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function jv(t,n){return t.style.getPropertyValue(n)||Gz(t).getComputedStyle(t,null).getPropertyValue(n)}function l4e(t){return function(){delete this[t]}}function c4e(t,n){return function(){this[t]=n}}function u4e(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Wz(t){return t.trim().split(/^|\s+/)}function FO(t){return t.classList||new qz(t)}function qz(t){this._node=t,this._names=Wz(t.getAttribute("class")||"")}function Yz(t,n){for(var e=FO(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Kz={},Rr=null;function B4e(t,n,e){return t=Qz(t,n,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&t.call(this,i)}}function Qz(t,n,e){return function(i){var r=Rr;Rr=i;try{t.call(this,this.__data__,n,e)}finally{Rr=r}}}function H4e(t){return function(){var n=this.__on;if(n){for(var o,e=0,i=-1,r=n.length;e=b&&(b=y+1);!(k=g[b])&&++b=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function Uje(t){function n(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}t||(t=zje);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?r4e:"function"==typeof n?s4e:o4e)(t,n,e??"")):jv(this.node(),t)},property:function d4e(t,n){return arguments.length>1?this.each((null==n?l4e:"function"==typeof n?u4e:c4e)(t,n)):this.node()[t]},classed:function m4e(t,n){var e=Wz(t+"");if(arguments.length<2){for(var i=FO(this.node()),r=-1,o=e.length;++r=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}(t+""),o=i.length;if(!(arguments.length<2)){for(a=n?U4e:H4e,null==e&&(e=!1),r=0;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(t+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var r,o,e=new Array(r),i=0;i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?y2(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?y2(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=tRe.exec(t))?new vc(n[1],n[2],n[3],1):(n=nRe.exec(t))?new vc(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=iRe.exec(t))?y2(n[1],n[2],n[3],n[4]):(n=rRe.exec(t))?y2(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=oRe.exec(t))?hG(n[1],n[2]/100,n[3]/100,1):(n=sRe.exec(t))?hG(n[1],n[2]/100,n[3]/100,n[4]):sG.hasOwnProperty(t)?cG(sG[t]):"transparent"===t?new vc(NaN,NaN,NaN,0):null}function cG(t){return new vc(t>>16&255,t>>8&255,255&t,1)}function y2(t,n,e,i){return i<=0&&(t=n=e=NaN),new vc(t,n,e,i)}function u_(t,n,e,i){return 1===arguments.length?function lRe(t){return t instanceof a_||(t=Sm(t)),t?new vc((t=t.rgb()).r,t.g,t.b,t.opacity):new vc}(t):new vc(t,n,e,i??1)}function vc(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function uG(){return"#"+RO(this.r)+RO(this.g)+RO(this.b)}function dG(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function RO(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hG(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Wd(t,n,e,i)}function fG(t){if(t instanceof Wd)return new Wd(t.h,t.s,t.l,t.opacity);if(t instanceof a_||(t=Sm(t)),!t)return new Wd;if(t instanceof Wd)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&l<1?0:s,new Wd(s,a,l,t.opacity)}function Wd(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function LO(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function pG(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}function $O(t){return function(){return t}}function gG(t,n){var e=n-t;return e?function mG(t,n){return function(e){return t+e*n}}(t,e):$O(isNaN(t)?n:t)}jO(a_,Sm,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:aG,formatHex:aG,formatHsl:function aRe(){return fG(this).formatHsl()},formatRgb:lG,toString:lG}),jO(vc,u_,oG(a_,{brighter:function(t){return t=null==t?v2:Math.pow(v2,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vc(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uG,formatHex:uG,formatRgb:dG,toString:dG})),jO(Wd,function cRe(t,n,e,i){return 1===arguments.length?fG(t):new Wd(t,n,e,i??1)},oG(a_,{brighter:function(t){return t=null==t?v2:Math.pow(v2,t),new Wd(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Wd(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new vc(LO(t>=240?t-240:t+120,r,i),LO(t,r,i),LO(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const _2=function t(n){var e=function fRe(t){return 1==(t=+t)?gG:function(n,e){return e-n?function hRe(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):$O(isNaN(n)?e:n)}}(n);function i(r,o){var s=e((r=u_(r)).r,(o=u_(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=gG(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function vG(t){return function(n){var s,a,e=n.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1];return pG((e-i/n)*n,i>0?t[i-1]:2*r-o,r,o,ie&&(o=n.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Lu(i,r)})),e=VO.lastIndex;return e=0&&t._call.call(null,n),t=t._next;--Lv}()}finally{Lv=0,function kRe(){for(var t,e,n=b2,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:b2=e);f_=t,HO(i)}(),Dm=0}}function SRe(){var t=p_.now(),n=t-x2;n>wG&&(w2-=n,x2=t)}function HO(t){Lv||(d_&&(d_=clearTimeout(d_)),t-Dm>24?(t<1/0&&(d_=setTimeout(kG,t-p_.now()-w2)),h_&&(h_=clearInterval(h_))):(h_||(x2=p_.now(),h_=setInterval(SRe,wG)),Lv=1,CG(kG)))}function DG(t,n,e){var i=new S2;return i.restart(function(r){i.stop(),t(r+n)},n=null==n?0:+n,e),i}S2.prototype=SG.prototype={constructor:S2,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?C2():+e)+(null==n?0:+n),!this._next&&f_!==this&&(f_?f_._next=this:b2=this,f_=this),this._call=t,this._time=e,HO()},stop:function(){this._call&&(this._call=null,this._time=1/0,HO())}};var DRe=rG("start","end","cancel","interrupt"),TRe=[],TG=0,EG=1,UO=2,k2=3,AG=4,zO=5,D2=6;function T2(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function ERe(t,n,e){var r,i=t.__transition;function s(c){var u,d,h,f;if(e.state!==EG)return l();for(u in i)if((f=i[u]).name===e.name){if(f.state===k2)return DG(s);f.state===AG?(f.state=D2,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+uTG)throw new Error("too late; already scheduled");return e}function Xh(t,n){var e=$u(t,n);if(e.state>k2)throw new Error("too late; already running");return e}function $u(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function WO(t,n){var i,r,s,e=t.__transition,o=!0;if(e){for(s in n=null==n?null:n+"",e)(i=e[s]).name===n?(r=i.state>UO&&i.state180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:Lu(c,u)})):u&&d.push(r(d)+"rotate("+u+i)}(c.rotate,u.rotate,d,h),function a(c,u,d,h){c!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:Lu(c,u)}):u&&d.push(r(d)+"skewX("+u+i)}(c.skewX,u.skewX,d,h),function l(c,u,d,h,f,p){if(c!==d||u!==h){var m=f.push(r(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Lu(c,d)},{i:m-2,x:Lu(u,h)})}else(1!==d||1!==h)&&f.push(r(f)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var g,p=-1,m=h.length;++p=0&&(n=n.slice(0,e)),!n||"start"===n})}(n)?GO:Xh;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function URe(t,n){var e=m2(t),i="transform"===e?NRe:FG;return this.attrTween(t,"function"==typeof n?(e.local?HRe:VRe)(e,i,XO(this,"attr."+t,n)):null==n?(e.local?LRe:RRe)(e):(e.local?BRe:$Re)(e,i,n))},attrTween:function YRe(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=m2(t);return this.tween(e,(i.local?WRe:qRe)(i,n))},style:function yLe(t,n,e){var i="transform"==(t+="")?IRe:FG;return null==n?this.styleTween(t,function pLe(t,n){var e,i,r;return function(){var o=jv(this,t),s=(this.style.removeProperty(t),jv(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,PG(t)):"function"==typeof n?this.styleTween(t,function gLe(t,n,e){var i,r,o;return function(){var s=jv(this,t),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=jv(this,t)),s===l?null:s===i&&l===r?o:(r=l,o=n(i=s,a))}}(t,i,XO(this,"style."+t,n))).each(function vLe(t,n){var e,i,r,a,o="style."+n,s="end."+o;return function(){var l=Xh(this,t),c=l.on,u=null==l.value[o]?a||(a=PG(n)):void 0;(c!==e||r!==u)&&(i=(e=c).copy()).on(s,r=u),l.on=i}}(this._id,t)):this.styleTween(t,function mLe(t,n,e){var i,o,r=e+"";return function(){var s=jv(this,t);return s===r?null:s===i?o:o=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function xLe(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function bLe(t,n,e){var i,r;function o(){var s=n.apply(this,arguments);return s!==r&&(i=(r=s)&&function _Le(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,s,e)),i}return o._value=n,o}(t,n,e??""))},text:function SLe(t){return this.tween("text","function"==typeof t?function CLe(t){return function(){var n=t(this);this.textContent=n??""}}(XO(this,"text",t)):function wLe(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function TLe(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function DLe(t){var n,e;function i(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function kLe(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return i._value=t,i}(t))},remove:function cLe(){return this.on("end.remove",function lLe(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function jRe(t,n){var e=this._id;if(t+="",arguments.length<2){for(var s,i=$u(this.node(),e).tween,r=0,o=i.length;r0&&(R=U-I),C<0?le=E-N:C>0&&(X=te-N),y=ZO,B.attr("cursor",Kh.selection),Me());break;default:return}QO()},!0).on("keyup.brush",function yt(){switch(Rr.keyCode){case 16:V&&(re=he=V=!1,Me());break;case 18:y===Vv&&(b<0?W=J:b>0&&(R=U),C<0?le=E:C>0&&(X=te),y=Bv,Me());break;case 32:y===ZO&&(Rr.altKey?(b&&(W=J-I*b,R=U+I*b),C&&(le=E-N*C,X=te+N*C),y=Vv):(b<0?W=J:b>0&&(R=U),C<0?le=E:C>0&&(X=te),y=Bv),B.attr("cursor",Kh[v]),Me());break;default:return}QO()},!0),function Q4e(t){var n=t.document.documentElement,e=pa(t).on("dragstart.drag",PO,!0);"onselectstart"in n?e.on("selectstart.drag",PO,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}(Rr.view)}RG(),WO(g),c.call(g),Le.start()}function ie(){var Tt=Oe(g);V&&!re&&!he&&(Math.abs(Tt[0]-Xe[0])>Math.abs(Tt[1]-Xe[1])?he=!0:re=!0),Xe=Tt,q=!0,QO(),Me()}function Me(){var Tt;switch(I=Xe[0]-_e[0],N=Xe[1]-_e[1],y){case ZO:case LG:b&&(I=Math.max(z-R,Math.min(P-W,I)),U=R+I,J=W+I),C&&(N=Math.max(G-X,Math.min(H-le,N)),te=X+N,E=le+N);break;case Bv:b<0?(I=Math.max(z-R,Math.min(P-R,I)),U=R+I,J=W):b>0&&(I=Math.max(z-W,Math.min(P-W,I)),U=R,J=W+I),C<0?(N=Math.max(G-X,Math.min(H-X,N)),te=X+N,E=le):C>0&&(N=Math.max(G-le,Math.min(H-le,N)),te=X,E=le+N);break;case Vv:b&&(U=Math.max(z,Math.min(P,R-I*b)),J=Math.max(z,Math.min(P,W+I*b))),C&&(te=Math.max(G,Math.min(H,X-N*C)),E=Math.max(G,Math.min(H,le+N*C)))}Jn?1:t>=n?0:NaN}function rI(t){let n=t,e=t;function i(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)<0?l=u+1:c=u}return l}return 1===t.length&&(n=(s,a)=>t(s)-a,e=function WLe(t){return(n,e)=>iI(t(n),e)}(t)),{left:i,center:function o(s,a,l,c){null==l&&(l=0),null==c&&(c=s.length);const u=i(s,a,l,c-1);return u>l&&n(s[u-1],a)>-n(s[u],a)?u-1:u},right:function r(s,a,l,c){for(null==l&&(l=0),null==c&&(c=s.length);l>>1;e(s[u],a)>0?c=u:l=u+1}return l}}}var oI=Math.sqrt(50),sI=Math.sqrt(10),aI=Math.sqrt(2);function HG(t,n,e){var i=(n-t)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=oI?10:o>=sI?5:o>=aI?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=oI?10:o>=sI?5:o>=aI?2:1)}function lI(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=oI?r*=10:o>=sI?r*=5:o>=aI&&(r*=2),n0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return dI.setTime(+o),hI.setTime(+s),t(dI),t(hI),Math.floor(e(dI,hI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var O2=ma(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});O2.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ma(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):O2:null};const YLe=O2;var zG=ma(function(t){t.setTime(t-t.getMilliseconds())},function(t,n){t.setTime(+t+n*Qh)},function(t,n){return(n-t)/Qh},function(t){return t.getUTCSeconds()});const v_=zG;var GG=ma(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qh)},function(t,n){t.setTime(+t+n*qc)},function(t,n){return(n-t)/qc},function(t){return t.getMinutes()});const WG=GG;var qG=ma(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qh-t.getMinutes()*qc)},function(t,n){t.setTime(+t+n*Zh)},function(t,n){return(n-t)/Zh},function(t){return t.getHours()});const YG=qG;var XG=ma(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qc)/Tm,t=>t.getDate()-1);const JG=XG;function Em(t){return ma(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*qc)/cI})}var fI=Em(0),KG=(Em(1),Em(2),Em(3),Em(4),Em(5),Em(6),ma(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}));const QG=KG;var pI=ma(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});pI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ma(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const ZG=pI;var eW=ma(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*qc)},function(t,n){return(n-t)/qc},function(t){return t.getUTCMinutes()});const t5e=eW;var tW=ma(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*Zh)},function(t,n){return(n-t)/Zh},function(t){return t.getUTCHours()});const n5e=tW;var nW=ma(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/Tm},function(t){return t.getUTCDate()-1});const i5e=nW;function Am(t){return ma(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/cI})}var iW=Am(0),rW=(Am(1),Am(2),Am(3),Am(4),Am(5),Am(6),ma(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}));const u5e=rW;var mI=ma(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});mI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ma(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const d5e=mI;function oW(t,n,e,i,r,o){const s=[[v_,1,Qh],[v_,5,5*Qh],[v_,15,15*Qh],[v_,30,30*Qh],[o,1,qc],[o,5,5*qc],[o,15,15*qc],[o,30,30*qc],[r,1,Zh],[r,3,3*Zh],[r,6,6*Zh],[r,12,12*Zh],[i,1,Tm],[i,2,2*Tm],[e,1,cI],[n,1,UG],[n,3,3*UG],[t,1,uI]];function l(c,u,d){const h=Math.abs(u-c)/d,f=rI(([,,g])=>g).right(s,h);if(f===s.length)return t.every(lI(c/uI,u/uI,d));if(0===f)return YLe.every(Math.max(lI(c,u,d),1));const[p,m]=s[h/s[f-1][2]0))return l;do{l.push(c=new Date(+o)),n(o,a),t(o)}while(c=s)for(;t(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;n(s,-1),!o(s););else for(;--a>=0;)for(;n(s,1),!o(s););})},e&&(r.count=function(o,s){return gI.setTime(+o),vI.setTime(+s),t(gI),t(vI),Math.floor(e(gI,vI))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var sW=6e4,lW=6048e5;function Mm(t){return ef(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCDate(n.getUTCDate()+7*e)},function(n,e){return(e-n)/lW})}var cW=Mm(0),I2=Mm(1),Hv=(Mm(2),Mm(3),Mm(4)),uW=(Mm(5),Mm(6),ef(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}));const dW=uW;function Om(t){return ef(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(n,e){n.setDate(n.getDate()+7*e)},function(n,e){return(e-n-(e.getTimezoneOffset()-n.getTimezoneOffset())*sW)/lW})}var hW=Om(0),N2=Om(1),Uv=(Om(2),Om(3),Om(4)),fW=(Om(5),Om(6),ef(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*sW)/864e5},function(t){return t.getDate()-1}));const pW=fW;var yI=ef(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});yI.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ef(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};const y_=yI;var _I=ef(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});_I.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ef(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};const __=_I;function bI(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function xI(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function b_(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var zv,AW,mW={"-":"",_:" ",0:"0"},ga=/^\s*\d+/,C5e=/^%/,S5e=/[\\^$*+?|[\]().{}]/g;function Br(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function O5e(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function I5e(t,n,e){var i=ga.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function N5e(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function yW(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function F5e(t,n,e){var i=ga.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function _W(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function P5e(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function j5e(t,n,e){var i=ga.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function R5e(t,n,e){var i=ga.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function L5e(t,n,e){var i=ga.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function $5e(t,n,e){var i=C5e.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function B5e(t,n,e){var i=ga.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function V5e(t,n,e){var i=ga.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function bW(t,n){return Br(t.getDate(),n,2)}function H5e(t,n){return Br(t.getHours(),n,2)}function U5e(t,n){return Br(t.getHours()%12||12,n,2)}function z5e(t,n){return Br(1+pW.count(y_(t),t),n,3)}function xW(t,n){return Br(t.getMilliseconds(),n,3)}function G5e(t,n){return xW(t,n)+"000"}function W5e(t,n){return Br(t.getMonth()+1,n,2)}function q5e(t,n){return Br(t.getMinutes(),n,2)}function Y5e(t,n){return Br(t.getSeconds(),n,2)}function X5e(t){var n=t.getDay();return 0===n?7:n}function J5e(t,n){return Br(hW.count(y_(t)-1,t),n,2)}function wW(t){var n=t.getDay();return n>=4||0===n?Uv(t):Uv.ceil(t)}function K5e(t,n){return t=wW(t),Br(Uv.count(y_(t),t)+(4===y_(t).getDay()),n,2)}function Q5e(t){return t.getDay()}function Z5e(t,n){return Br(N2.count(y_(t)-1,t),n,2)}function e8e(t,n){return Br(t.getFullYear()%100,n,2)}function t8e(t,n){return Br((t=wW(t)).getFullYear()%100,n,2)}function n8e(t,n){return Br(t.getFullYear()%1e4,n,4)}function i8e(t,n){var e=t.getDay();return Br((t=e>=4||0===e?Uv(t):Uv.ceil(t)).getFullYear()%1e4,n,4)}function r8e(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Br(n/60|0,"0",2)+Br(n%60,"0",2)}function CW(t,n){return Br(t.getUTCDate(),n,2)}function o8e(t,n){return Br(t.getUTCHours(),n,2)}function s8e(t,n){return Br(t.getUTCHours()%12||12,n,2)}function a8e(t,n){return Br(1+dW.count(__(t),t),n,3)}function SW(t,n){return Br(t.getUTCMilliseconds(),n,3)}function l8e(t,n){return SW(t,n)+"000"}function c8e(t,n){return Br(t.getUTCMonth()+1,n,2)}function u8e(t,n){return Br(t.getUTCMinutes(),n,2)}function d8e(t,n){return Br(t.getUTCSeconds(),n,2)}function h8e(t){var n=t.getUTCDay();return 0===n?7:n}function f8e(t,n){return Br(cW.count(__(t)-1,t),n,2)}function kW(t){var n=t.getUTCDay();return n>=4||0===n?Hv(t):Hv.ceil(t)}function p8e(t,n){return t=kW(t),Br(Hv.count(__(t),t)+(4===__(t).getUTCDay()),n,2)}function m8e(t){return t.getUTCDay()}function g8e(t,n){return Br(I2.count(__(t)-1,t),n,2)}function v8e(t,n){return Br(t.getUTCFullYear()%100,n,2)}function y8e(t,n){return Br((t=kW(t)).getUTCFullYear()%100,n,2)}function _8e(t,n){return Br(t.getUTCFullYear()%1e4,n,4)}function b8e(t,n){var e=t.getUTCDay();return Br((t=e>=4||0===e?Hv(t):Hv.ceil(t)).getUTCFullYear()%1e4,n,4)}function x8e(){return"+0000"}function DW(){return"%"}function TW(t){return+t}function EW(t){return Math.floor(+t/1e3)}function MW(t){return null===t?NaN:+t}!function k8e(t){zv=function w5e(t){var n=t.dateTime,e=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=x_(r),u=w_(r),d=x_(o),h=w_(o),f=x_(s),p=w_(s),m=x_(a),g=w_(a),v=x_(l),y=w_(l),b={a:function H(Le){return s[Le.getDay()]},A:function le(Le){return o[Le.getDay()]},b:function E(Le){return l[Le.getMonth()]},B:function I(Le){return a[Le.getMonth()]},c:null,d:bW,e:bW,f:G5e,g:t8e,G:i8e,H:H5e,I:U5e,j:z5e,L:xW,m:W5e,M:q5e,p:function N(Le){return r[+(Le.getHours()>=12)]},q:function q(Le){return 1+~~(Le.getMonth()/3)},Q:TW,s:EW,S:Y5e,u:X5e,U:J5e,V:K5e,w:Q5e,W:Z5e,x:null,X:null,y:e8e,Y:n8e,Z:r8e,"%":DW},C={a:function V(Le){return s[Le.getUTCDay()]},A:function re(Le){return o[Le.getUTCDay()]},b:function he(Le){return l[Le.getUTCMonth()]},B:function Oe(Le){return a[Le.getUTCMonth()]},c:null,d:CW,e:CW,f:l8e,g:y8e,G:b8e,H:o8e,I:s8e,j:a8e,L:SW,m:c8e,M:u8e,p:function _e(Le){return r[+(Le.getUTCHours()>=12)]},q:function Xe(Le){return 1+~~(Le.getUTCMonth()/3)},Q:TW,s:EW,S:d8e,u:h8e,U:f8e,V:p8e,w:m8e,W:g8e,x:null,X:null,y:v8e,Y:_8e,Z:x8e,"%":DW},k={a:function U(Le,rt,B){var ne=f.exec(rt.slice(B));return ne?(Le.w=p[ne[0].toLowerCase()],B+ne[0].length):-1},A:function G(Le,rt,B){var ne=d.exec(rt.slice(B));return ne?(Le.w=h[ne[0].toLowerCase()],B+ne[0].length):-1},b:function X(Le,rt,B){var ne=v.exec(rt.slice(B));return ne?(Le.m=y[ne[0].toLowerCase()],B+ne[0].length):-1},B:function te(Le,rt,B){var ne=m.exec(rt.slice(B));return ne?(Le.m=g[ne[0].toLowerCase()],B+ne[0].length):-1},c:function P(Le,rt,B){return z(Le,n,rt,B)},d:yW,e:yW,f:L5e,g:vW,G:gW,H:_W,I:_W,j:F5e,L:R5e,m:N5e,M:P5e,p:function R(Le,rt,B){var ne=c.exec(rt.slice(B));return ne?(Le.p=u[ne[0].toLowerCase()],B+ne[0].length):-1},q:I5e,Q:B5e,s:V5e,S:j5e,u:T5e,U:E5e,V:A5e,w:D5e,W:M5e,x:function W(Le,rt,B){return z(Le,e,rt,B)},X:function J(Le,rt,B){return z(Le,i,rt,B)},y:vW,Y:gW,Z:O5e,"%":$5e};function D(Le,rt){return function(B){var je,yt,Tt,ne=[],ie=-1,Me=0,Ye=Le.length;for(B instanceof Date||(B=new Date(+B));++ie53)return null;"w"in ne||(ne.w=1),"Z"in ne?(Ye=(Me=xI(b_(ne.y,0,1))).getUTCDay(),Me=Ye>4||0===Ye?I2.ceil(Me):I2(Me),Me=dW.offset(Me,7*(ne.V-1)),ne.y=Me.getUTCFullYear(),ne.m=Me.getUTCMonth(),ne.d=Me.getUTCDate()+(ne.w+6)%7):(Ye=(Me=bI(b_(ne.y,0,1))).getDay(),Me=Ye>4||0===Ye?N2.ceil(Me):N2(Me),Me=pW.offset(Me,7*(ne.V-1)),ne.y=Me.getFullYear(),ne.m=Me.getMonth(),ne.d=Me.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ye="Z"in ne?xI(b_(ne.y,0,1)).getUTCDay():bI(b_(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+7*ne.W-(Ye+5)%7:ne.w+7*ne.U-(Ye+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,xI(ne)):bI(ne)}}function z(Le,rt,B,ne){for(var je,yt,ie=0,Me=rt.length,Ye=B.length;ie=Ye)return-1;if(37===(je=rt.charCodeAt(ie++))){if(je=rt.charAt(ie++),!(yt=k[je in mW?rt.charAt(ie++):je])||(ne=yt(Le,B,ne))<0)return-1}else if(je!=B.charCodeAt(ne++))return-1}return ne}return b.x=D(e,b),b.X=D(i,b),b.c=D(n,b),C.x=D(e,C),C.X=D(i,C),C.c=D(n,C),{format:function(Le){var rt=D(Le+="",b);return rt.toString=function(){return Le},rt},parse:function(Le){var rt=L(Le+="",!1);return rt.toString=function(){return Le},rt},utcFormat:function(Le){var rt=D(Le+="",C);return rt.toString=function(){return Le},rt},utcParse:function(Le){var rt=L(Le+="",!0);return rt.toString=function(){return Le},rt}}}(t),AW=zv.format}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const D8e=rI(iI).right,IW=(rI(MW),D8e);function T8e(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}function A8e(t){return+t}var NW=[0,1];function Gv(t){return t}function wI(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function E8e(t){return function(){return t}}(isNaN(n)?NaN:.5)}function O8e(t,n,e){var i=t[0],r=t[1],o=n[0],s=n[1];return rn&&(e=t,t=n,n=e),function(i){return Math.max(t,Math.min(n,i))}}(t[0],t[h-1])),a=h>2?I8e:O8e,l=c=null,d}function d(h){return null==h||isNaN(h=+h)?o:(l||(l=a(t.map(i),n,e)))(i(s(h)))}return d.invert=function(h){return s(r((c||(c=a(n,t.map(i),Lu)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,A8e),u()):t.slice()},d.range=function(h){return arguments.length?(n=Array.from(h),u()):n.slice()},d.rangeRound=function(h){return n=Array.from(h),e=T8e,u()},d.clamp=function(h){return arguments.length?(s=!!h||Gv,u()):s!==Gv},d.interpolate=function(h){return arguments.length?(e=h,u()):e},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,f){return i=h,r=f,u()}}()(Gv,Gv)}function C_(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function P8e(t){return new Date(t)}function j8e(t){return t instanceof Date?+t:+new Date(+t)}function jW(t,n,e,i,r,o,s,a,l,c){var u=PW(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),m=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),C=c("%Y");function k(D){return(l(D)=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function F2(t){if(!(n=R8e.exec(t)))throw new Error("invalid format: "+t);var n;return new CI({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function CI(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function P2(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]}function Wv(t){return(t=P2(Math.abs(t)))?t[1]:NaN}function LW(t,n){var e=P2(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}F2.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const $W={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function L8e(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return LW(100*t,n)},r:LW,s:function U8e(t,n){var e=P2(t,n);if(!e)return t+"";var i=e[0],r=e[1],o=r-(RW=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+P2(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function BW(t){return t}var j2,SI,UW,VW=Array.prototype.map,HW=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function X8e(t){var n=t.domain;return t.ticks=function(e){var i=n();return function qLe(t,n,e){var i,o,s,a,r=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((i=n0){let l=Math.round(t/a),c=Math.round(n/a);for(l*an&&--c,s=new Array(o=c-l+1);++rn&&--c,s=new Array(o=c-l+1);++r0;){if((c=HG(s,a,e))===l)return i[r]=s,i[o]=a,n(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else{if(!(c<0))break;s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c}l=c}return t},t}function mo(){var t=PW();return t.copy=function(){return FW(t,mo())},C_.apply(t,arguments),X8e(t)}function zW(t,n,e){t=+t,n=+n,e=(r=arguments.length)<2?(n=t,t=0,1):r<3?1:+e;for(var i=-1,r=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(r);++i0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(n)}}(VW.call(t.grouping,Number),t.thousands+""),e=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?BW:function V8e(t){return function(n){return n.replace(/[0-9]/g,function(e){return t[+e]})}}(VW.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",a=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function c(d){var h=(d=F2(d)).fill,f=d.align,p=d.sign,m=d.symbol,g=d.zero,v=d.width,y=d.comma,b=d.precision,C=d.trim,k=d.type;"n"===k?(y=!0,k="g"):$W[k]||(void 0===b&&(b=12),C=!0,k="g"),(g||"0"===h&&"="===f)&&(g=!0,h="0",f="=");var D="$"===m?e:"#"===m&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",L="$"===m?i:/[%p]/.test(k)?s:"",z=$W[k],R=/[defgprs%]/.test(k);function U(G){var P,W,J,X=D,te=L;if("c"===k)te=z(G)+te,G="";else{var H=(G=+G)<0||1/G<0;if(G=isNaN(G)?l:z(Math.abs(G),b),C&&(G=function H8e(t){e:for(var r,n=t.length,e=1,i=-1;e0&&(i=0)}return i>0?t.slice(0,i)+t.slice(r+1):t}(G)),H&&0==+G&&"+"!==p&&(H=!1),X=(H?"("===p?p:a:"-"===p||"("===p?"":p)+X,te=("s"===k?HW[8+RW/3]:"")+te+(H&&"("===p?")":""),R)for(P=-1,W=G.length;++P(J=G.charCodeAt(P))||J>57){te=(46===J?r+G.slice(P+1):G.slice(P))+te,G=G.slice(0,P);break}}y&&!g&&(G=n(G,1/0));var le=X.length+G.length+te.length,E=le>1)+X+G+te+E.slice(le);break;default:G=E+X+G+te}return o(G)}return b=void 0===b?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),U.toString=function(){return d+""},U}return{format:c,formatPrefix:function u(d,h){var f=c(((d=F2(d)).type="f",d)),p=3*Math.max(-8,Math.min(8,Math.floor(Wv(h)/3))),m=Math.pow(10,-p),g=HW[8+p/3];return function(v){return f(m*v)+g}}}}(t),SI=j2.format,UW=j2.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});const GW=Symbol("implicit");function kI(){var t=new Map,n=[],e=[],i=GW;function r(o){var s=o+"",a=t.get(s);if(!a){if(i!==GW)return i;t.set(s,a=n.push(o))}return e[(a-1)%e.length]}return r.domain=function(o){if(!arguments.length)return n.slice();n=[],t=new Map;for(const s of o){const a=s+"";t.has(a)||t.set(a,n.push(s))}return r},r.range=function(o){return arguments.length?(e=Array.from(o),r):e.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return kI(n,e).unknown(i)},C_.apply(r,arguments),r}function ja(){var o,s,t=kI().unknown(void 0),n=t.domain,e=t.range,i=0,r=1,a=!1,l=0,c=0,u=.5;function d(){var h=n().length,f=r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),s=+e(t[o],o,t);return s+(+e(t[o+1],o+1,t)-s)*(r-o)}}function qW(){var i,t=[],n=[],e=[];function r(){var s=0,a=Math.max(1,n.length);for(e=new Array(a-1);++s0?e[a-1]:t[0],aPm)if(Math.abs(u*a-l*c)>Pm&&r){var h=e-o,f=i-s,p=a*a+l*l,m=h*h+f*f,g=Math.sqrt(p),v=Math.sqrt(d),y=r*Math.tan((DI-Math.acos((p+d-m)/(2*g*v)))/2),b=y/v,C=y/g;Math.abs(b-1)>Pm&&(this._+="L"+(t+b*c)+","+(n+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*f)+","+(this._x1=t+C*a)+","+(this._y1=n+C*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,r,o){t=+t,n=+n,o=!!o;var s=(e=+e)*Math.cos(i),a=e*Math.sin(i),l=t+s,c=n+a,u=1^o,d=o?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Pm||Math.abs(this._y1-c)>Pm)&&(this._+="L"+l+","+c),e&&(d<0&&(d=d%TI+TI),d>K8e?this._+="A"+e+","+e+",0,1,"+u+","+(t-s)+","+(n-a)+"A"+e+","+e+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Pm&&(this._+="A"+e+","+e+",0,"+ +(d>=DI)+","+u+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const AI=XW;function uo(t){return function(){return t}}function JW(t){return t[0]}function KW(t){return t[1]}function R2(){var t=JW,n=KW,e=uo(!0),i=null,r=Fm,o=null;function s(a){var l,u,h,c=a.length,d=!1;for(null==i&&(o=r(h=AI())),l=0;l<=c;++l)!(l=h;--f)a.point(y[f],b[f]);a.lineEnd(),a.areaEnd()}g&&(y[d]=+t(m,d,u),b[d]=+e(m,d,u),a.point(n?+n(m,d,u):y[d],i?+i(m,d,u):b[d]))}if(v)return a=null,v+""||null}function c(){return R2().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t="function"==typeof u?u:uo(+u),n=null,l):t},l.x0=function(u){return arguments.length?(t="function"==typeof u?u:uo(+u),l):t},l.x1=function(u){return arguments.length?(n=null==u?null:"function"==typeof u?u:uo(+u),l):n},l.y=function(u){return arguments.length?(e="function"==typeof u?u:uo(+u),i=null,l):e},l.y0=function(u){return arguments.length?(e="function"==typeof u?u:uo(+u),l):e},l.y1=function(u){return arguments.length?(i=null==u?null:"function"==typeof u?u:uo(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(e)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(n).y(e)},l.defined=function(u){return arguments.length?(r="function"==typeof u?u:uo(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,null!=o&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(null==u?o=a=null:a=s(o=u),l):o},l}function QW(){}function MI(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ZW(t,n){this._context=t,this._k=(1-n)/6}function eq(t,n){this._context=t,this._k=(1-n)/6}function tq(t){this._curve=t}function m6e(t,n,e,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-n)/t.value;++a=0;)n+=e[i].value;else n=1;t.value=n}function sq(t,n){var r,s,a,l,c,e=new T_(t),i=+t.value&&(e.value=t.value),o=[e];for(null==n&&(n=P6e);r=o.pop();)if(i&&(r.value=+r.data.value),(a=n(r.data))&&(c=a.length))for(r.children=new Array(c),l=c-1;l>=0;--l)o.push(s=r.children[l]=new T_(a[l])),s.parent=r,s.depth=r.depth+1;return e.eachBefore(aq)}function P6e(t){return t.children}function j6e(t){t.data=t.data.data}function aq(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function T_(t){this.data=t,this.depth=this.height=0,this.parent=null}ZW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:MI(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:MI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new ZW(i,n)}return e.tension=function(i){return t(+i)},e}(0),eq.prototype={areaStart:QW,areaEnd:QW,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:MI(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}},function t(n){function e(i){return new eq(i,n)}return e.tension=function(i){return t(+i)},e}(0),function nq(t){function n(e){return new tq(t(e))}return n._curve=t,n}(Fm),tq.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math,function t(n){function e(i,r,o,s,a){!function y6e(t,n,e,i,r,o){for(var l,c,f,p,g,v,y,b,C,k,D,s=[],a=n.children,u=0,d=0,h=a.length,m=n.value;uy&&(y=c),D=g*g*k,(b=Math.max(y/D,D/v))>C){g-=c;break}C=b}s.push(l={value:g,dice:f1?i:1)},e}((1+Math.sqrt(5))/2),T_.prototype=sq.prototype={constructor:T_,count:function w6e(){return this.eachAfter(x6e)},each:function C6e(t){var e,r,o,s,n=this,i=[n];do{for(e=i.reverse(),i=[];n=e.pop();)if(t(n),r=n.children)for(o=0,s=r.length;o=0;--r)e.push(i[r]);return this},sum:function D6e(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function T6e(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function E6e(t){for(var n=this,e=function A6e(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;for(t=e.pop(),n=i.pop();t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)i.push(n=n.parent);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function M6e(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function O6e(){var t=[];return this.each(function(n){t.push(n)}),t},leaves:function I6e(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function N6e(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function F6e(){return sq(this).eachBefore(j6e)}};const V6e=["caretElm"];function H6e(t,n){}const U6e=function(t){return{model:t}};function z6e(t,n){if(1&t&&(_(0,"span"),Z(1,H6e,0,0,"ng-template",5),x()),2&t){const e=$();w(1),S("ngTemplateOutlet",e.template)("ngTemplateOutletContext",sr(2,U6e,e.context))}}function G6e(t,n){1&t&&pe(0,"span",6),2&t&&S("innerHTML",$().title,Yx)}function W6e(t,n){if(1&t&&(st(),zp(),pe(0,"ngx-charts-scale-legend",4)),2&t){const e=$();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("valueRange",e.legendOptions.domain)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)}}function q6e(t,n){if(1&t){const e=vt();st(),zp(),_(0,"ngx-charts-legend",5),ye("labelClick",function(r){return Be(e),Ve($().legendLabelClick.emit(r))})("labelActivate",function(r){return Be(e),Ve($().legendLabelActivate.emit(r))})("labelDeactivate",function(r){return Be(e),Ve($().legendLabelDeactivate.emit(r))}),x()}if(2&t){const e=$();S("horizontal",e.legendOptions&&"below"===e.legendOptions.position)("data",e.legendOptions.domain)("title",e.legendOptions.title)("colors",e.legendOptions.colors)("height",e.view[1])("width",e.legendWidth)("activeEntries",e.activeEntries)}}const uq=["*"],Y6e=["ngx-charts-axis-label",""],dq=["ticksel"],X6e=["ngx-charts-x-axis-ticks",""];function J6e(t,n){if(1&t&&(st(),_(0,"g",3)(1,"title"),O(2),x(),_(3,"text",4),O(4),x()()),2&t){const e=n.$implicit,i=$();ut("transform",i.tickTransform(e)),w(2),bt(i.tickFormat(e)),w(1),tr("font-size","12px"),ut("text-anchor",i.textAnchor)("transform",i.textTransform),w(1),mn(" ",i.tickTrim(i.tickFormat(e))," ")}}function K6e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"line",6),x()),2&t){const e=$(2);ut("transform",e.gridLineTransform()),w(1),ut("y1",-e.gridLineHeight)}}function Q6e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,K6e,2,2,"g",5),x()),2&t){const e=n.$implicit,i=$();ut("transform",i.tickTransform(e)),w(1),S("ngIf",i.showGridLines)}}const Z6e=["ngx-charts-x-axis",""];function e$e(t,n){if(1&t){const e=vt();st(),_(0,"g",2),ye("dimensionsChanged",function(r){return Be(e),Ve($().emitTicksHeight(r))}),x()}if(2&t){const e=$();S("trimTicks",e.trimTicks)("rotateTicks",e.rotateTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickStroke",e.tickStroke)("scale",e.xScale)("orient",e.xOrient)("showGridLines",e.showGridLines)("gridLineHeight",e.dims.height)("width",e.dims.width)("tickValues",e.ticks)}}function t$e(t,n){if(1&t&&(st(),pe(0,"g",3)),2&t){const e=$();S("label",e.labelText)("offset",e.labelOffset)("orient","bottom")("height",e.dims.height)("width",e.dims.width)}}const n$e=["ngx-charts-y-axis-ticks",""];function i$e(t,n){if(1&t&&(st(),_(0,"g",4)(1,"title"),O(2),x(),_(3,"text",5),O(4),x()()),2&t){const e=n.$implicit,i=$();ut("transform",i.transform(e)),w(2),bt(i.tickFormat(e)),w(1),tr("font-size","12px"),ut("dy",i.dy)("x",i.x1)("y",i.y1)("text-anchor",i.textAnchor),w(1),mn(" ",i.tickTrim(i.tickFormat(e))," ")}}function r$e(t,n){if(1&t&&(st(),pe(0,"path",6)),2&t){const e=$();ut("d",e.referenceAreaPath)("transform",e.gridLineTransform())}}function o$e(t,n){1&t&&(st(),pe(0,"line",9)),2&t&&ut("x2",$(3).gridLineWidth)}function s$e(t,n){1&t&&(st(),pe(0,"line",9)),2&t&&ut("x2",-$(3).gridLineWidth)}function a$e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,o$e,1,1,"line",8),Z(2,s$e,1,1,"line",8),x()),2&t){const e=$(2);ut("transform",e.gridLineTransform()),w(1),S("ngIf","left"===e.orient),w(1),S("ngIf","right"===e.orient)}}function l$e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,a$e,3,3,"g",7),x()),2&t){const e=n.$implicit,i=$();ut("transform",i.transform(e)),w(1),S("ngIf",i.showGridLines)}}function c$e(t,n){if(1&t&&(st(),_(0,"g")(1,"title"),O(2),x(),_(3,"text",11),O(4),x()()),2&t){const e=$(2).$implicit,i=$();w(2),bt(i.tickTrim(i.tickFormat(e.value))),w(1),ut("dy",i.dy)("y",-6)("x",i.gridLineWidth)("text-anchor",i.textAnchor),w(1),mn(" ",e.name," ")}}function u$e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"line",10),Z(2,c$e,5,6,"g",7),x()),2&t){const e=$().$implicit,i=$();ut("transform",i.transform(e.value)),w(1),ut("x2",i.gridLineWidth)("transform",i.gridLineTransform()),w(1),S("ngIf",i.showRefLabels)}}function d$e(t,n){if(1&t&&(st(),_(0,"g"),Z(1,u$e,3,4,"g",7),x()),2&t){const e=$();w(1),S("ngIf",e.showRefLines)}}const h$e=["ngx-charts-y-axis",""];function f$e(t,n){if(1&t){const e=vt();st(),_(0,"g",2),ye("dimensionsChanged",function(r){return Be(e),Ve($().emitTicksWidth(r))}),x()}if(2&t){const e=$();S("trimTicks",e.trimTicks)("maxTickLength",e.maxTickLength)("tickFormatting",e.tickFormatting)("tickArguments",e.tickArguments)("tickValues",e.ticks)("tickStroke",e.tickStroke)("scale",e.yScale)("orient",e.yOrient)("showGridLines",e.showGridLines)("gridLineWidth",e.dims.width)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)("height",e.dims.height)}}function p$e(t,n){if(1&t&&(st(),pe(0,"g",3)),2&t){const e=$();S("label",e.labelText)("offset",e.labelOffset)("orient",e.yOrient)("height",e.dims.height)("width",e.dims.width)}}const m$e=["ngx-charts-circle-series",""];function g$e(t,n){if(1&t&&(st(),pe(0,"rect",4)),2&t){const e=$(2);S("@animationState","active"),ut("x",e.circle.cx-e.circle.radius)("y",e.circle.cy)("width",2*e.circle.radius)("height",e.circle.height)("fill",e.gradientFill)}}const v$e=function(t){return{name:t}};function y$e(t,n){if(1&t){const e=vt();st(),_(0,"g")(1,"defs"),pe(2,"g",1),x(),Z(3,g$e,1,6,"rect",2),_(4,"g",3),ye("select",function(){Be(e);const r=$();return Ve(r.onClick(r.circle.data))})("activate",function(){return Be(e),Ve($().activateCircle())})("deactivate",function(){return Be(e),Ve($().deactivateCircle())}),x()()}if(2&t){const e=$();w(2),S("name",e.gradientId)("stops",e.circle.gradientStops),w(1),S("ngIf",e.barVisible&&"standard"===e.type),w(1),jn("active",e.isActive(sr(18,v$e,e.circle.seriesName))),S("cx",e.circle.cx)("cy",e.circle.cy)("r",e.circle.radius)("fill",e.circle.color)("pointerEvents",0===e.circle.value?"none":"all")("data",e.circle.value)("classNames",e.circle.classNames)("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","top")("tooltipType","tooltip")("tooltipTitle",e.tooltipTemplate?void 0:e.getTooltipText(e.circle))("tooltipTemplate",e.tooltipTemplate)("tooltipContext",e.circle.data)}}const _$e=["ngx-charts-circle",""],C$e=["ngx-charts-svg-linear-gradient",""];function S$e(t,n){if(1&t&&(st(),pe(0,"stop")),2&t){const e=n.$implicit;tr("stop-color",e.color)("stop-opacity",e.opacity),ut("offset",e.offset+"%")}}const T$e=["ngx-charts-area",""];function E$e(t,n){if(1&t&&(st(),_(0,"defs"),pe(1,"g",2),x()),2&t){const e=$();w(1),S("name",e.gradientId)("stops",e.gradientStops)}}const M$e=["tooltipAnchor"],O$e=["ngx-charts-tooltip-area",""];function I$e(t,n){if(1&t&&(_(0,"div",6),pe(1,"span",7),O(2),x()),2&t){const e=n.$implicit,i=$(2);w(1),tr("background-color",e.color),w(1),mn(" ",i.getToolTipText(e)," ")}}function N$e(t,n){if(1&t&&(st(),zp(),_(0,"div",4),Z(1,I$e,3,3,"div",5),x()),2&t){const e=n.model;w(1),S("ngForOf",e)}}const F$e=["ngx-charts-timeline",""];function P$e(t,n){if(1&t&&(_(0,"header",4)(1,"span",5),O(2),x()()),2&t){const e=$();w(2),bt(e.title)}}function j$e(t,n){if(1&t){const e=vt();_(0,"li",6)(1,"ngx-charts-legend-entry",7),ye("select",function(r){return Be(e),Ve($().labelClick.emit(r))})("activate",function(r){return Be(e),Ve($().activate(r))})("deactivate",function(r){return Be(e),Ve($().deactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=$();w(1),S("label",e.label)("formattedLabel",e.formattedLabel)("color",e.color)("isActive",i.isActive(e))}}const Ls=["tooltipTemplate"],H2=["seriesTooltipTemplate"],So=function(t,n){return[t,n]},r7e=["ngx-charts-line",""];function o7e(t,n){if(1&t){const e=vt();st(),_(0,"g",7),ye("dimensionsChanged",function(r){return Be(e),Ve($().updateXAxisHeight(r))}),x()}if(2&t){const e=$();S("xScale",e.xScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showXAxisLabel)("labelText",e.xAxisLabel)("trimTicks",e.trimXAxisTicks)("rotateTicks",e.rotateXAxisTicks)("maxTickLength",e.maxXAxisTickLength)("tickFormatting",e.xAxisTickFormatting)("ticks",e.xAxisTicks)}}function s7e(t,n){if(1&t){const e=vt();st(),_(0,"g",8),ye("dimensionsChanged",function(r){return Be(e),Ve($().updateYAxisWidth(r))}),x()}if(2&t){const e=$();S("yScale",e.yScale)("dims",e.dims)("showGridLines",e.showGridLines)("showLabel",e.showYAxisLabel)("labelText",e.yAxisLabel)("trimTicks",e.trimYAxisTicks)("maxTickLength",e.maxYAxisTickLength)("tickFormatting",e.yAxisTickFormatting)("ticks",e.yAxisTicks)("referenceLines",e.referenceLines)("showRefLines",e.showRefLines)("showRefLabels",e.showRefLabels)}}function a7e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"g",9),x()),2&t){const e=n.$implicit,i=$();S("@animationState","active"),w(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("activeEntries",i.activeEntries)("scaleType",i.scaleType)("curve",i.curve)("rangeFillOpacity",i.rangeFillOpacity)("hasRange",i.hasRange)("animations",i.animations)}}function l7e(t,n){if(1&t){const e=vt();st(),_(0,"g")(1,"g",13),ye("select",function(r){return Be(e),Ve($(2).onClick(r))})("activate",function(r){return Be(e),Ve($(2).onActivate(r))})("deactivate",function(r){return Be(e),Ve($(2).onDeactivate(r))}),x()()}if(2&t){const e=n.$implicit,i=$(2);w(1),S("xScale",i.xScale)("yScale",i.yScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("visibleValue",i.hoveredVertical)("activeEntries",i.activeEntries)("tooltipDisabled",i.tooltipDisabled)("tooltipTemplate",i.tooltipTemplate)}}function c7e(t,n){if(1&t){const e=vt();st(),_(0,"g",10),ye("mouseleave",function(){return Be(e),Ve($().hideCircles())}),_(1,"g",11),ye("hover",function(r){return Be(e),Ve($().updateHoveredVertical(r))}),x(),Z(2,l7e,2,9,"g",12),x()}if(2&t){const e=$();w(1),S("dims",e.dims)("xSet",e.xSet)("xScale",e.xScale)("yScale",e.yScale)("results",e.results)("colors",e.colors)("tooltipDisabled",e.tooltipDisabled)("tooltipTemplate",e.seriesTooltipTemplate),w(1),S("ngForOf",e.results)}}function u7e(t,n){if(1&t&&(st(),_(0,"g"),pe(1,"g",15),x()),2&t){const e=n.$implicit,i=$(2);w(1),S("xScale",i.timelineXScale)("yScale",i.timelineYScale)("colors",i.colors)("data",e)("scaleType",i.scaleType)("curve",i.curve)("hasRange",i.hasRange)("animations",i.animations)}}function d7e(t,n){if(1&t){const e=vt();st(),_(0,"g",14),ye("onDomainChange",function(r){return Be(e),Ve($().updateDomain(r))}),Z(1,u7e,2,8,"g",4),x()}if(2&t){const e=$();S("results",e.results)("view",Mr(10,So,e.timelineWidth,e.height))("height",e.timelineHeight)("scheme",e.scheme)("customColors",e.customColors)("scaleType",e.scaleType)("legend",e.legend),ut("transform",e.timelineTransform),w(1),S("ngForOf",e.results)("ngForTrackBy",e.trackBy)}}const h7e=["ngx-charts-line-series",""];function f7e(t,n){if(1&t&&(st(),pe(0,"g",4)),2&t){const e=$();S("name",e.gradientId)("stops",e.gradientStops)}}function p7e(t,n){if(1&t&&(st(),pe(0,"g",5)),2&t){const e=$();jn("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),S("data",e.data)("path",e.outerPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",e.rangeFillOpacity)("animations",e.animations)}}let mq=(()=>{class t{constructor(e,i,r){this.applicationRef=e,this.componentFactoryResolver=i,this.injector=r}static setGlobalRootViewContainer(e){t.globalRootViewContainer=e}getRootViewContainer(){if(this._container)return this._container;if(t.globalRootViewContainer)return t.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(e){this._container=e}getComponentRootNode(e){return function c9e(t){return t.element}(e)?e.element.nativeElement:e.hostView&&e.hostView.rootNodes.length>0?e.hostView.rootNodes[0]:e.location.nativeElement}getRootViewContainerNode(e){return this.getComponentRootNode(e)}projectComponentBindings(e,i){if(i){if(void 0!==i.inputs){const r=Object.getOwnPropertyNames(i.inputs);for(const o of r)e.instance[o]=i.inputs[o]}if(void 0!==i.outputs){const r=Object.getOwnPropertyNames(i.outputs);for(const o of r)e.instance[o]=i.outputs[o]}}return e}appendComponent(e,i={},r){r||(r=this.getRootViewContainer());const o=this.getComponentRootNode(r),s=new tje(o,this.componentFactoryResolver,this.applicationRef,this.injector),a=new Rz(e),l=s.attach(a);return this.projectComponentBindings(l,i),l}}return t.\u0275fac=function(e){return new(e||t)(gt(Rh),gt(zg),gt(ua))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t.globalRootViewContainer=null,t})();function u9e(t,n,e){e=e||{};let i,r,o,s=null,a=0;function l(){a=!1===e.leading?0:+new Date,s=null,o=t.apply(i,r)}return function(){const c=+new Date;!a&&!1===e.leading&&(a=c);const u=n-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):!s&&!1!==e.trailing&&(s=setTimeout(l,u)),o}}function d9e(t,n){return function(i,r,o){return{configurable:!0,enumerable:o.enumerable,get:function(){return Object.defineProperty(this,r,{configurable:!0,enumerable:o.enumerable,value:u9e(o.value,t,n)}),this[r]}}}}var $s=(()=>(function(t){t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right"}($s||($s={})),$s))();const Xf=7;function gq(t,n,e){return"top"===e?t.top-Xf:"bottom"===e?t.top+t.height-n.height+Xf:"center"===e?t.top+t.height/2-n.height/2:void 0}function vq(t,n,e){return"left"===e?t.left-Xf:"right"===e?t.left+t.width-n.width+Xf:"center"===e?t.left+t.width/2-n.width/2:void 0}class yc{static calculateVerticalAlignment(n,e,i){let r=gq(n,e,i);return r+e.height>window.innerHeight&&(r=window.innerHeight-e.height),r}static calculateVerticalCaret(n,e,i,r){let o;"top"===r&&(o=n.height/2-i.height/2+Xf),"bottom"===r&&(o=e.height-n.height/2-i.height/2-Xf),"center"===r&&(o=e.height/2-i.height/2);const s=gq(n,e,r);return s+e.height>window.innerHeight&&(o+=s+e.height-window.innerHeight),o}static calculateHorizontalAlignment(n,e,i){let r=vq(n,e,i);return r+e.width>window.innerWidth&&(r=window.innerWidth-e.width),r}static calculateHorizontalCaret(n,e,i,r){let o;"left"===r&&(o=n.width/2-i.width/2+Xf),"right"===r&&(o=e.width-n.width/2-i.width/2-Xf),"center"===r&&(o=e.width/2-i.width/2);const s=vq(n,e,r);return s+e.width>window.innerWidth&&(o+=s+e.width-window.innerWidth),o}static shouldFlip(n,e,i,r){let o=!1;return"right"===i&&n.left+n.width+e.width+r>window.innerWidth&&(o=!0),"left"===i&&n.left-e.width-r<0&&(o=!0),"top"===i&&n.top-e.height-r<0&&(o=!0),"bottom"===i&&n.top+n.height+e.height+r>window.innerHeight&&(o=!0),o}static positionCaret(n,e,i,r,o){let s=0,a=0;return n===$s.right?(a=-7,s=yc.calculateVerticalCaret(i,e,r,o)):n===$s.left?(a=e.width,s=yc.calculateVerticalCaret(i,e,r,o)):n===$s.top?(s=e.height,a=yc.calculateHorizontalCaret(i,e,r,o)):n===$s.bottom&&(s=-7,a=yc.calculateHorizontalCaret(i,e,r,o)),{top:s,left:a}}static positionContent(n,e,i,r,o){let s=0,a=0;return n===$s.right?(a=i.left+i.width+r,s=yc.calculateVerticalAlignment(i,e,o)):n===$s.left?(a=i.left-e.width-r,s=yc.calculateVerticalAlignment(i,e,o)):n===$s.top?(s=i.top-e.height-r,a=yc.calculateHorizontalAlignment(i,e,o)):n===$s.bottom&&(s=i.top+i.height+r,a=yc.calculateHorizontalAlignment(i,e,o)),{top:s,left:a}}static determinePlacement(n,e,i,r){if(yc.shouldFlip(i,e,n,r)){if(n===$s.right)return $s.left;if(n===$s.left)return $s.right;if(n===$s.top)return $s.bottom;if(n===$s.bottom)return $s.top}return n}}let h9e=(()=>{class t{constructor(e,i){this.element=e,this.renderer=i}get cssClasses(){let e="ngx-charts-tooltip-content";return e+=` position-${this.placement}`,e+=` type-${this.type}`,e+=` ${this.cssClass}`,e}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const e=this.element.nativeElement,i=this.host.nativeElement.getBoundingClientRect();if(!i.height&&!i.width)return;const r=e.getBoundingClientRect();this.checkFlip(i,r),this.positionContent(e,i,r),this.showCaret&&this.positionCaret(i,r),setTimeout(()=>this.renderer.addClass(e,"animate"),1)}positionContent(e,i,r){const{top:o,left:s}=yc.positionContent(this.placement,r,i,this.spacing,this.alignment);this.renderer.setStyle(e,"top",`${o}px`),this.renderer.setStyle(e,"left",`${s}px`)}positionCaret(e,i){const r=this.caretElm.nativeElement,o=r.getBoundingClientRect(),{top:s,left:a}=yc.positionCaret(this.placement,i,e,o,this.alignment);this.renderer.setStyle(r,"top",`${s}px`),this.renderer.setStyle(r,"left",`${a}px`)}checkFlip(e,i){this.placement=yc.determinePlacement(this.placement,i,e,this.spacing)}onWindowResize(){this.position()}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(ca))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(e,i){if(1&e&&xo(V6e,5),2&e){let r;wn(r=Cn())&&(i.caretElm=r.first)}},hostVars:2,hostBindings:function(e,i){1&e&&ye("resize",function(){return i.onWindowResize()},0,h8),2&e&&Pd(i.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(e,i){1&e&&(_(0,"div"),pe(1,"span",0,1),_(3,"div",2),Z(4,z6e,2,4,"span",3),Z(5,G6e,1,1,"span",4),x()()),2&e&&(w(1),function B6(t,n,e){Du(ic,jd,Qg(zt(),t,n,e),!0)}("tooltip-caret position-",i.placement,""),S("hidden",!i.showCaret),w(3),S("ngIf",!i.title),w(1),S("ngIf",i.title))},dependencies:[vn,Au],styles:[".ngx-charts-tooltip-content{border-radius:3px;display:block;font-weight:400;opacity:0;pointer-events:none!important;position:fixed;z-index:5000}.ngx-charts-tooltip-content.type-popover{background:#fff;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);color:#060709;font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid #fff;border-top:7px solid transparent}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-bottom:7px solid #fff;border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip{background:rgba(0,0,0,.75);color:#fff;font-size:12px;padding:0 10px;pointer-events:auto;text-align:center}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75);border-top:7px solid transparent}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-bottom:7px solid rgba(0,0,0,.75);border-left:7px solid transparent;border-right:7px solid transparent}.ngx-charts-tooltip-content .tooltip-label{display:block;font-size:1em;line-height:1em;padding:8px 5px 5px}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{height:0;position:absolute;width:0;z-index:5001}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;pointer-events:auto;transform:translateZ(0);transition:opacity .3s,transform .3s}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{line-height:1.2em;padding:5px 0;text-align:left}.tooltip-item .tooltip-item-color{border-radius:3px;color:#5b646b;display:inline-block;height:12px;margin-right:5px;width:12px}"],encapsulation:2}),function Lz(t,n,e,i){var s,r=arguments.length,o=r<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,n,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(o=(r<3?s(o):r>3?s(n,e,o):s(n,e))||o);return r>3&&o&&Object.defineProperty(n,e,o),o}([d9e(100)],t.prototype,"onWindowResize",null),t})();class f9e{constructor(n){this.injectionService=n,this.defaults={},this.components=new Map}getByType(n=this.type){return this.components.get(n)}create(n){return this.createByType(this.type,n)}createByType(n,e){e=this.assignDefaults(e);const i=this.injectComponent(n,e);return this.register(n,i),i}destroy(n){const e=this.components.get(n.componentType);if(e&&e.length){const i=e.indexOf(n);i>-1&&(e[i].destroy(),e.splice(i,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(n){const e=this.components.get(n);if(e&&e.length){let i=e.length-1;for(;i>=0;)this.destroy(e[i--])}}injectComponent(n,e){return this.injectionService.appendComponent(n,e)}assignDefaults(n){const e=Object.assign({},this.defaults.inputs),i=Object.assign({},this.defaults.outputs);return!n.inputs&&!n.outputs&&(n={inputs:n}),e&&(n.inputs=Object.assign(Object.assign({},e),n.inputs)),i&&(n.outputs=Object.assign(Object.assign({},i),n.outputs)),n}register(n,e){this.components.has(n)||this.components.set(n,[]),this.components.get(n).push(e)}}let NI=(()=>{class t extends f9e{constructor(e){super(e),this.type=h9e}}return t.\u0275fac=function(e){return new(e||t)(gt(mq))},t.\u0275prov=Et({token:t,factory:t.\u0275fac}),t})(),Zo=(()=>{class t{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new it,this.legendLabelActivate=new it,this.legendLabelDeactivate=new it}ngOnChanges(e){this.update()}update(){let e=0;this.showLegend&&(this.legendType=this.getLegendType(),(!this.legendOptions||"right"===this.legendOptions.position)&&(e="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-e)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*e/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[Qr([NI]),Yn],ngContentSelectors:uq,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(e,i){1&e&&(kf(),_(0,"div",0),st(),_(1,"svg",1),Df(2),x(),Z(3,W6e,1,5,"ngx-charts-scale-legend",2),Z(4,q6e,1,7,"ngx-charts-legend",3),x()),2&e&&(tr("width",i.view[0],"px"),S("@animationState","active")("@.disabled",!i.animations),w(1),ut("width",i.chartWidth)("height",i.view[1]),w(2),S("ngIf",i.showLegend&&"scaleLegend"===i.legendType),w(1),S("ngIf",i.showLegend&&"legend"===i.legendType))},dependencies:function(){return[vn,Aq,Oq]},encapsulation:2,data:{animation:[tl("animationState",[Ma(":enter",[kr({opacity:0}),Aa("500ms 100ms",kr({opacity:1}))])])]},changeDetection:0}),t})(),p9e=(()=>{class t{constructor(e,i){this.element=e,this.zone=i,this.visible=new it,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{if(!this.element)return;const{offsetHeight:i,offsetWidth:r}=this.element.nativeElement;i&&r?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e())})}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(nr))},t.\u0275dir=sn({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),es=(()=>{class t{constructor(e,i,r){this.chartElement=e,this.zone=i,this.cd=r,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new it}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new p9e(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(e){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const e=this.getContainerDims();e&&(this.width=e.width,this.height=e.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let e,i;const r=this.chartElement.nativeElement;if(null!==r.parentNode){const o=r.parentNode.getBoundingClientRect();e=o.width,i=o.height}return e&&i?{width:e,height:i}:null}formatDates(){for(let e=0;ee.lift(new Dje(t,n))}(200)).subscribe(r=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=i}cloneData(e){const i=[];for(const r of e){const o={name:r.name};if(void 0!==r.value&&(o.value=r.value),void 0!==r.series){o.series=[];for(const s of r.series){const a=Object.assign({},s);o.series.push(a)}}void 0!==r.extra&&(o.extra=JSON.parse(JSON.stringify(r.extra))),i.push(o)}return i}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(nr),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Yn],decls:1,vars:0,template:function(e,i){1&e&&pe(0,"div")},encapsulation:2}),t})(),FI=(()=>{class t{constructor(e){this.textHeight=25,this.margin=5,this.element=e.nativeElement}ngOnChanges(e){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Yn],attrs:Y6e,decls:2,vars:6,template:function(e,i){1&e&&(st(),_(0,"text"),O(1),x()),2&e&&(ut("stroke-width",i.strokeWidth)("x",i.x)("y",i.y)("text-anchor",i.textAnchor)("transform",i.transform),w(1),mn(" ",i.label," "))},encapsulation:2,changeDetection:0}),t})();function Jf(t,n=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=n?t:`${t.slice(0,n)}...`}function yq(t,n){if(t.length>n){const e=[],i=Math.floor(t.length/n);for(let r=0;r{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new it,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);e!==this.height&&(this.height=e,this.dimensionsChanged.emit({height:e}),setTimeout(()=>this.updateDims()))}update(){const e=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()};const i=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(r){return this.scale(r)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",i&&0!==i?(this.textTransform=`rotate(${i})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(e){let i=0;this.maxTicksLength=0;for(let c=0;cthis.maxTicksLength&&(this.maxTicksLength=d)}const s=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let a=s;const l=Math.floor(this.width/e.length);for(;a>l&&i>-90;)i-=30,a=Math.cos(i*(Math.PI/180))*s;return i}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(100);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=yq(e,i)),e}getMaxTicks(e){return Math.floor(this.width/e)}tickTransform(e){return"translate("+this.adjustedScale(e)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(e){return this.trimTicks?Jf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xo(dq,5),2&e){let r;wn(r=Cn())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:X6e,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(e,i){1&e&&(st(),_(0,"g",null,0),Z(2,J6e,5,7,"g",1),x(),Z(3,Q6e,2,2,"g",2)),2&e&&(w(2),S("ngForOf",i.ticks),w(1),S("ngForOf",i.ticks))},dependencies:[Ln,vn],encapsulation:2,changeDetection:0}),t})(),Vl=(()=>{class t{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new it,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(e){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,typeof this.xAxisTickCount<"u"&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:e}){const i=e+25+5;i!==this.labelOffset&&(this.labelOffset=i,setTimeout(()=>{this.dimensionsChanged.emit({height:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(e,i){if(1&e&&xo(_q,5),2&e){let r;wn(r=Cn())&&(i.ticksComponent=r.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:Z6e,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(st(),_(0,"g"),Z(1,e$e,1,12,"g",0),Z(2,t$e,1,5,"g",1),x()),2&e&&(ut("class",i.xAxisClassName)("transform",i.transform),w(1),S("ngIf",i.xScale),w(1),S("ngIf",i.showLabel))},dependencies:[vn,FI,_q],encapsulation:2,changeDetection:0}),t})();let bq=(()=>{class t{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new it,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(e){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const e=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);e!==this.width&&(this.width=e,this.dimensionsChanged.emit({width:e}),setTimeout(()=>this.updateDims()))}update(){let e;const i="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,e=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:e.tickFormat?e.tickFormat.apply(e,this.tickArguments):function(r){return"Date"===r.constructor.name?r.toLocaleDateString():r.toLocaleString()},this.adjustedScale=e.bandwidth?function(r){return e(r)+.5*e.bandwidth()}:e,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(r){return"translate("+this.adjustedScale(r)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*i,this.y1=this.tickSpacing*i,this.dy=i<0?"0em":".71em";break;case"left":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em";break;case"right":this.transform=function(r){return"translate(0,"+this.adjustedScale(r)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-i,this.x1=this.tickSpacing*-i,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(e=>e.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(e=>e.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function tf(t,n,e,i,r,[o,s,a,l]){let c="";return c=`M${[t+r,n]}`,c+="h"+((e=0===(e=Math.floor(e))?1:e)-2*r),c+=s?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-e),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=o?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let e;const i=this.getMaxTicks(20),r=this.getMaxTicks(50);return this.tickValues?e=this.tickValues:this.scale.ticks?e=this.scale.ticks.apply(this.scale,[r]):(e=this.scale.domain(),e=yq(e,i)),e}getMaxTicks(e){return Math.floor(this.height/e)}tickTransform(e){return`translate(${this.adjustedScale(e)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(e){return this.trimTicks?Jf(e,this.maxTickLength):e}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(e,i){if(1&e&&xo(dq,5),2&e){let r;wn(r=Cn())&&(i.ticksElement=r.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:n$e,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(e,i){1&e&&(st(),_(0,"g",null,0),Z(2,i$e,5,9,"g",1),x(),Z(3,r$e,1,2,"path",2),Z(4,l$e,2,2,"g",3),Z(5,d$e,2,1,"g",3)),2&e&&(w(2),S("ngForOf",i.ticks),w(1),S("ngIf",i.referenceLineLength>1&&i.refMax&&i.refMin&&i.showRefLines),w(1),S("ngForOf",i.ticks),w(1),S("ngForOf",i.referenceLines))},dependencies:[Ln,vn],encapsulation:2,changeDetection:0}),t})(),yl=(()=>{class t{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new it,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(e){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:e}){e!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=e+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0)):e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({width:e})},0))}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(e,i){if(1&e&&xo(bq,5),2&e){let r;wn(r=Cn())&&(i.ticksComponent=r.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Yn],attrs:h$e,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(e,i){1&e&&(st(),_(0,"g"),Z(1,f$e,1,14,"g",0),Z(2,p$e,1,5,"g",1),x()),2&e&&(ut("class",i.yAxisClassName)("transform",i.transform),w(1),S("ngIf",i.yScale),w(1),S("ngIf",i.showLabel))},dependencies:[vn,FI,bq],encapsulation:2,changeDetection:0}),t})(),xq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Mf]}),t})();var U2=(()=>(function(t){t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip"}(U2||(U2={})),U2))(),z2=(()=>(function(t){t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right"}(z2||(z2={})),z2))(),Kf=(()=>(function(t){t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover"}(Kf||(Kf={})),Kf))();let Bu=(()=>{class t{constructor(e,i,r){this.tooltipService=e,this.viewContainerRef=i,this.renderer=r,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=$s.top,this.tooltipAlignment=z2.center,this.tooltipType=U2.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=Kf.all,this.tooltipImmediateExit=!1,this.show=new it,this.hide=new it}get listensForFocus(){return this.tooltipShowEvent===Kf.all||this.tooltipShowEvent===Kf.focus}get listensForHover(){return this.tooltipShowEvent===Kf.all||this.tooltipShowEvent===Kf.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(e){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(e))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(e){if(this.component||this.tooltipDisabled)return;const i=e?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const r=this.createBoundOptions();this.component=this.tooltipService.create(r),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},i)}addHideListeners(e){this.mouseEnterContentEvent=this.renderer.listen(e,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(e,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",i=>{e.contains(i.target)||this.hideTooltip()}))}hideTooltip(e=!1){if(!this.component)return;const i=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),e?i():this.timeout=setTimeout(i,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}}return t.\u0275fac=function(e){return new(e||t)(de(NI),de(jl),de(ca))},t.\u0275dir=sn({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(e,i){1&e&&ye("focusin",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(o){return i.onMouseLeave(o.target)})("click",function(){return i.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),wq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[mq,NI],imports:[Mf]}),t})();function Ra(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function na(t){return t.toLocaleString().replace(/[&'`"<>]/g,n=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[n]))}const Cq={};function _l(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,Cq[t]?_l():(Cq[t]=!0,t)}let LI,E_=(()=>{class t{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new it,this.activate=new it,this.deactivate=new it,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+_l().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(e){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const e=this.data.series.findIndex(i=>{const r=i.name;return r&&this.visibleValue&&r.toString()===this.visibleValue.toString()&&void 0!==i.value});if(-1!==e)return this.mapDataPointToCircle(this.data.series[e],e)}mapDataPointToCircle(e,i){const r=this.data.name,o=e.value,s=e.name,a=Ra(s);let l;l=this.xScale("time"===this.scaleType?s:"linear"===this.scaleType?Number(s):s);const c=this.yScale("standard"===this.type?o:e.d1),d=this.yScale.range()[0]-c;let f;return f=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?o:e.d1:r),{classNames:[`circle-data-${i}`],value:o,label:s,data:Object.assign({},e,{series:r,value:o,name:s}),cx:l,cy:c,radius:5,height:d,tooltipLabel:a,color:f,opacity:1,seriesName:r,gradientStops:this.getGradientStops(f),min:e.min,max:e.max}}getTooltipText({tooltipLabel:e,value:i,seriesName:r,min:o,max:s}){return`\n ${na(r)} \u2022 ${na(e)}\n ${i.toLocaleString()}${this.getTooltipMinMaxText(o,s)}\n `}getTooltipMinMaxText(e,i){if(void 0!==e||void 0!==i){let r=" (";return void 0!==e?(void 0===i&&(r+="\u2265"),r+=e.toLocaleString(),void 0!==i&&(r+=" - ")):void 0!==i&&(r+="\u2264"),void 0!==i&&(r+=i.toLocaleString()),r+=")",r}return""}getGradientStops(e){return[{offset:0,color:e,opacity:.2},{offset:100,color:e,opacity:1}]}onClick(e){this.select.emit(e)}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Yn],attrs:m$e,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(e,i){1&e&&Z(0,y$e,5,20,"g",0),2&e&&S("ngIf",i.circle)},dependencies:function(){return[vn,Bu,G2,Rm]},encapsulation:2,data:{animation:[tl("animationState",[Ma(":enter",[kr({opacity:0}),Aa(250,kr({opacity:1}))])])]},changeDetection:0}),t})(),G2=(()=>{class t{constructor(){this.select=new it,this.activate=new it,this.deactivate=new it}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(e){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(e,i){1&e&&ye("click",function(){return i.onClick()})("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Yn],attrs:_$e,decls:1,vars:8,template:function(e,i){1&e&&(st(),pe(0,"circle")),2&e&&ut("cx",i.cx)("cy",i.cy)("r",i.r)("fill",i.fill)("stroke",i.stroke)("opacity",i.circleOpacity)("class",i.classNames)("pointer-events",i.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),Rm=(()=>{class t{constructor(){this.orientation="vertical"}ngOnChanges(e){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Yn],attrs:C$e,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(e,i){1&e&&(st(),_(0,"linearGradient",0),Z(1,S$e,1,5,"stop",1),x()),2&e&&(S("id",i.name),ut("x1",i.x1)("y1",i.y1)("x2",i.x2)("y2",i.y2),w(1),S("ngForOf",i.stops))},dependencies:[Ln],encapsulation:2,changeDetection:0}),t})(),RI=(()=>{class t{constructor(e){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new it,this.initialized=!1,this.hasGradient=!1,this.element=e.nativeElement}ngOnChanges(e){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+_l().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const e=pa(this.element).select(".area");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Yn],attrs:T$e,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(e,i){1&e&&(Z(0,E$e,2,2,"defs",0),st(),pe(1,"path",1)),2&e&&(S("ngIf",i.gradient),w(1),tr("opacity",i.opacity),ut("d",i.areaPath)("fill",i.gradient?i.gradientFill:i.fill))},dependencies:[vn,Rm],encapsulation:2,changeDetection:0}),t})();typeof window<"u"?LI=window:typeof global<"u"&&(LI=global);const Eq=LI.MouseEvent;function $I(t,n=!1,e=!0){if("function"==typeof Eq)return new Eq(t,{bubbles:n,cancelable:e});{const i=document.createEvent("MouseEvent");return i.initEvent(t,n,e),i}}let A_=(()=>{class t{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new it}getValues(e){const i=[];for(const r of this.results){const o=r.series.find(a=>a.name.toString()===e.toString());let s=r.name;if(s instanceof Date&&(s=s.toLocaleDateString()),o){const a=o.name;let c,l=o.value;if(this.showPercentage&&(l=(o.d1-o.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let d=l;o.d1&&(d=o.d1),c=this.colors.getColor(d)}else c=this.colors.getColor(r.name);const u=Object.assign({},o,{value:l,name:a,series:s,min:o.min,max:o.max,color:c});i.push(u)}}return i}mouseMove(e){const i=e.pageX-e.target.getBoundingClientRect().left,r=this.findClosestPointIndex(i),o=this.xSet[r];if(this.anchorPos=this.xScale(o),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(o),this.anchorPos!==this.lastAnchorPos){const s=$I("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(s),this.anchorOpacity=.7,this.hover.emit({value:o}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(e){let i=0,r=this.xSet.length-1,o=Number.MAX_VALUE,s=0;for(;i<=r;){const a=(i+r)/2|0,l=this.xScale(this.xSet[a]),c=Math.abs(l-e);if(ce)){o=0,s=a;break}r=a-1}}return s}showTooltip(){const e=$I("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(e)}hideTooltip(){const e=$I("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(e),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(e){let i="";return i+=void 0!==e.series?e.series:"???",i+=": ",void 0!==e.value&&(i+=e.value.toLocaleString()),(void 0!==e.min||void 0!==e.max)&&(i+=" (",void 0!==e.min?(void 0===e.max&&(i+="\u2265"),i+=e.min.toLocaleString(),void 0!==e.max&&(i+=" - ")):void 0!==e.max&&(i+="\u2264"),void 0!==e.max&&(i+=e.max.toLocaleString()),i+=")"),i}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(e,i){if(1&e&&xo(M$e,5),2&e){let r;wn(r=Cn())&&(i.tooltipAnchor=r.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:O$e,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","'auto'",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(e,i){if(1&e&&(st(),_(0,"g")(1,"rect",0),ye("mousemove",function(o){return i.mouseMove(o)})("mouseleave",function(){return i.hideTooltip()}),x(),Z(2,N$e,2,1,"ng-template",null,1,cs),pe(4,"rect",2,3),x()),2&e){const r=Ta(3);w(1),ut("x",0)("width",i.dims.width)("height",i.dims.height),w(3),tr("opacity",i.anchorOpacity)("pointer-events","none"),S("@animationState",0!==i.anchorOpacity?"active":"inactive")("tooltipDisabled",i.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",i.tooltipTemplate?i.tooltipTemplate:r)("tooltipContext",i.anchorValues)("tooltipImmediateExit",!0),ut("x",i.anchorPos)("width",1)("height",i.dims.height)}},dependencies:[Ln,Bu],encapsulation:2,data:{animation:[tl("animationState",[Ma("inactive => active",[kr({opacity:0}),Aa(250,kr({opacity:.7}))]),Ma("active => inactive",[kr({opacity:.7}),Aa(250,kr({opacity:0}))])])]},changeDetection:0}),t})(),M_=(()=>{class t{constructor(e,i){this.cd=i,this.height=50,this.select=new it,this.onDomainChange=new it,this.initialized=!1,this.element=e.nativeElement}ngOnChanges(e){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const e=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${e})`,this.filterId="filter"+_l().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let e=[];for(const r of this.results)for(const o of r.series)e.includes(o.name)||e.push(o.name);let i=[];return"time"===this.scaleType?i=[Math.min(...e),Math.max(...e)]:"linear"===this.scaleType?(e=e.map(s=>Number(s)),i=[Math.min(...e),Math.max(...e)]):i=e,i}getXScale(){let e;return"time"===this.scaleType?e=Im().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?e=mo().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(e=Nm().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),e}addBrush(){if(this.brush)return;const e=this.height,i=this.view[0];this.brush=function GLe(){return nI(A2)}().extent([[0,0],[i,e]]).on("brush end",()=>{const o=(Rr.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(o),this.cd.markForCheck()}),pa(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),pa(this.element).select(".brush").call(this.brush),pa(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}}return t.\u0275fac=function(e){return new(e||t)(de(Si),de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Yn],attrs:F$e,ngContentSelectors:uq,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(e,i){1&e&&(kf(),st(),_(0,"g",0)(1,"filter"),pe(2,"feColorMatrix",1),x(),_(3,"g",2),Df(4),x(),pe(5,"rect",3)(6,"g",4),x()),2&e&&(ut("transform",i.transform),w(1),ut("id",i.filterId),w(4),ut("width",i.view[0])("height",i.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke:#888;stroke-width:1px}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),Aq=(()=>{class t{constructor(e){this.cd=e,this.horizontal=!1,this.labelClick=new it,this.labelActivate=new it,this.labelDeactivate=new it,this.legendEntries=[]}ngOnChanges(e){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const e=[];for(const i of this.data){const r=Ra(i);-1===e.findIndex(s=>s.label===r)&&e.push({label:i,formattedLabel:r,color:this.colors.getColor(i)})}return e}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.label===r.name)}activate(e){this.labelActivate.emit(e)}deactivate(e){this.labelDeactivate.emit(e)}trackBy(e,i){return i.label}}return t.\u0275fac=function(e){return new(e||t)(de(Ns))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Yn],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(e,i){1&e&&(_(0,"div"),Z(1,P$e,3,1,"header",0),_(2,"div",1)(3,"ul",2),Z(4,j$e,2,4,"li",3),x()()()),2&e&&(tr("width",i.width,"px"),w(1),S("ngIf",(null==i.title?null:i.title.length)>0),w(2),tr("max-height",i.height-45,"px"),jn("horizontal-legend",i.horizontal),w(1),S("ngForOf",i.legendEntries)("ngForTrackBy",i.trackBy))},dependencies:function(){return[Ln,vn,Mq]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{font-size:14px;font-weight:700;margin-bottom:5px;margin-left:10px;overflow:hidden;white-space:nowrap}.chart-legend li,.chart-legend ul{list-style:none;margin:0;padding:0}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{background:rgba(0,0,0,.05);border-radius:3px;float:left;line-height:85%;list-style:none;overflow-x:hidden;overflow-y:auto;text-align:left;white-space:nowrap;width:100%}.chart-legend .legend-label{color:#afb7c8;cursor:pointer;font-size:90%;margin:8px}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{border-radius:3px;color:#5b646b;display:inline-block;height:15px;margin-right:5px;width:15px}.chart-legend .legend-label-text{font-size:12px;line-height:15px;vertical-align:top;width:calc(100% - 20px)}.chart-legend .legend-label-text,.chart-legend .legend-title-text{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chart-legend .legend-title-text{line-height:16px;vertical-align:bottom}"],encapsulation:2,changeDetection:0}),t})(),Mq=(()=>{class t{constructor(){this.isActive=!1,this.select=new it,this.activate=new it,this.deactivate=new it,this.toggle=new it}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(e,i){1&e&&ye("mouseenter",function(){return i.onMouseEnter()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(e,i){1&e&&(_(0,"span",0),ye("click",function(){return i.select.emit(i.formattedLabel)}),_(1,"span",1),ye("click",function(){return i.toggle.emit(i.formattedLabel)}),x(),_(2,"span",2),O(3),x()()),2&e&&(jn("active",i.isActive),S("title",i.formattedLabel),w(1),tr("background-color",i.color),w(2),mn(" ",i.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),Oq=(()=>{class t{constructor(e){this.sanitizer=e,this.horizontal=!1}ngOnChanges(e){const i=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${i})`)}gradientString(e,i){i.push(1);const r=[];return e.reverse().forEach((o,s)=>{r.push(`${o} ${Math.round(100*i[s])}%`)}),r.join(", ")}}return t.\u0275fac=function(e){return new(e||t)(de(V7))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Yn],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(e,i){1&e&&(_(0,"div",0)(1,"div",1)(2,"span"),O(3),x()(),pe(4,"div",2),_(5,"div",1)(6,"span"),O(7),x()()()),2&e&&(tr("height",i.horizontal?void 0:i.height,"px")("width",i.width,"px"),jn("horizontal-legend",i.horizontal),w(3),bt(i.valueRange[1].toLocaleString()),w(1),tr("background",i.gradient),w(3),bt(i.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{display:flex;flex-direction:column;text-align:center}.chart-legend .scale-legend-wrap{border-radius:5px;display:inline-block;flex:1;margin:0 auto;width:30px}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{height:30px;margin:0 16px;width:auto}"],encapsulation:2,changeDetection:0}),t})(),Vu=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Mf,xq,wq,Mf,xq,wq]}),t})();let Nq=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class fs{constructor(n,e,i,r){"string"==typeof n&&(n=Nq.find(o=>o.name===n)),this.colorDomain=n.domain,this.scaleType=e,this.domain=i,this.customColors=r,this.scale=this.generateColorScheme(n,e,this.domain)}generateColorScheme(n,e,i){let r;if("string"==typeof n&&(n=Nq.find(o=>o.name===n)),"quantile"===e)r=qW().range(n.domain).domain(i);else if("ordinal"===e)r=kI().range(n.domain).domain(i);else if("linear"===e){const o=[...n.domain];1===o.length&&(o.push(o[0]),this.colorDomain=o);const s=zW(0,1,1/o.length);r=mo().domain(s).range(o)}return r}getColor(n){if(null==n)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=mo().domain(this.domain).range([0,1]);return this.scale(e(n))}{if("function"==typeof this.customColors)return this.customColors(n);const e=n.toString();let i;return this.customColors&&this.customColors.length>0&&(i=this.customColors.find(r=>r.name.toLowerCase()===e.toLowerCase())),i?i.value:this.scale(n)}}getLinearGradientStops(n,e){void 0===e&&(e=this.domain[0]);const i=mo().domain(this.domain).range([0,1]),r=ja().domain(this.colorDomain).range([0,1]),o=this.getColor(n),s=i(e),a=this.getColor(e),l=i(n);let c=1,u=s;const d=[];for(d.push({color:a,offset:s,originalOffset:s,opacity:1});u=(l-r.bandwidth()).toFixed(4))break;d.push({color:h,offset:f,opacity:1}),u=f,c++}}if(d[d.length-1].offset<100&&d.push({color:o,offset:l,opacity:1}),l===s)d[0].offset=0,d[1].offset=100;else if(100!==d[d.length-1].offset)for(const h of d)h.offset=(h.offset-s)/(l-s)*100;return d}}let m9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),Pq=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),v9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),b9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),Lq=(()=>{class t{constructor(e){this.element=e,this.fill="none",this.animations=!0,this.select=new it,this.initialized=!1}ngOnChanges(e){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const e=pa(this.element.nativeElement).select(".line");this.animations?e.transition().duration(750).attr("d",this.path):e.attr("d",this.path)}}return t.\u0275fac=function(e){return new(e||t)(de(Si))},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Yn],attrs:r7e,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(e,i){1&e&&(st(),pe(0,"path",0)),2&e&&(S("@animationState","active"),ut("d",i.initialPath)("fill",i.fill)("stroke",i.stroke))},encapsulation:2,data:{animation:[tl("animationState",[Ma(":enter",[kr({strokeDasharray:2e3,strokeDashoffset:2e3}),Aa(1e3,kr({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),x9e=(()=>{class t extends es{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=Fm,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new it,this.deactivate=new it,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function hs({width:t,height:n,margins:e,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:o=0,yAxisWidth:s=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:d="right",columns:h=12}){let f=e[3],p=t,m=n-e[0]-e[2];return c&&"right"===d&&(h-="ordinal"===u?2:1),p=p*h/12,p=p-e[1]-e[3],i&&(m-=5,m-=o,a&&(m-=30)),r&&(p-=5,p-=s,f+=s,f+=10,l&&(p-=30,f+=30)),p=Math.max(0,p),m=Math.max(0,m),{width:Math.floor(p),height:Math.floor(m),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+_l().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let e=function q2(t){const n=new Set;for(const e of t)for(const i of e.series)n.add(i.name);return Array.from(n)}(this.results);this.scaleType=function Qf(t,n=!0){return n&&t.every(r=>r instanceof Date)?"time":t.every(i=>"number"==typeof i)?"linear":"ordinal"}(e);let r,o,i=[];return"linear"===this.scaleType&&(e=e.map(s=>Number(s))),("time"===this.scaleType||"linear"===this.scaleType)&&(r=this.xScaleMin?this.xScaleMin:Math.min(...e),o=this.xScaleMax?this.xScaleMax:Math.max(...e)),"time"===this.scaleType?(i=[new Date(r),new Date(o)],this.xSet=[...e].sort((s,a)=>{const l=s.getTime(),c=a.getTime();return l>c?1:c>l?-1:0})):"linear"===this.scaleType?(i=[r,o],this.xSet=[...e].sort((s,a)=>s-a)):(i=e,this.xSet=e),i}getYDomain(){const e=[];for(const s of this.results)for(const a of s.series)e.indexOf(a.value)<0&&e.push(a.value),void 0!==a.min&&(this.hasRange=!0,e.indexOf(a.min)<0&&e.push(a.min)),void 0!==a.max&&(this.hasRange=!0,e.indexOf(a.max)<0&&e.push(a.max));const i=[...e];return this.autoScale||i.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...i),this.yScaleMax?this.yScaleMax:Math.max(...i)]}getSeriesDomain(){return this.results.map(e=>e.name)}getXScale(e,i){let r;return"time"===this.scaleType?r=Im().range([0,i]).domain(e):"linear"===this.scaleType?(r=mo().range([0,i]).domain(e),this.roundDomains&&(r=r.nice())):"ordinal"===this.scaleType&&(r=Nm().range([0,i]).padding(.1).domain(e)),r}getYScale(e,i){const r=mo().range([i,0]).domain(e);return this.roundDomains?r.nice():r}updateDomain(e){this.filteredDomain=e,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(e){this.hoveredVertical=e.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(e){this.select.emit(e)}trackBy(e,i){return i.name}setColors(){let e;e="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new fs(this.scheme,this.schemeType,e,this.customColors)}getLegendOptions(){const e={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===e.scaleType?(e.domain=this.seriesDomain,e.colors=this.colors,e.title=this.legendTitle):(e.domain=this.yDomain,e.colors=this.colors.scale),e}updateYAxisWidth({width:e}){this.yAxisWidth=e,this.update()}updateXAxisHeight({height:e}){this.xAxisHeight=e,this.update()}onActivate(e){this.deactivateAll(),!(this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value)>-1)&&(this.activeEntries=[e],this.activate.emit({value:e,entries:this.activeEntries}))}onDeactivate(e){const i=this.activeEntries.findIndex(r=>r.name===e.name&&r.value===e.value);this.activeEntries.splice(i,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:e,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const e of this.activeEntries)this.deactivate.emit({value:e,entries:[]});this.activeEntries=[]}}return t.\u0275fac=function(){let n;return function(i){return(n||(n=Pi(t)))(i||t)}}(),t.\u0275cmp=Rt({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(e,i,r){if(1&e&&(yi(r,Ls,5),yi(r,H2,5)),2&e){let o;wn(o=Cn())&&(i.tooltipTemplate=o.first),wn(o=Cn())&&(i.seriesTooltipTemplate=o.first)}},hostBindings:function(e,i){1&e&&ye("mouseleave",function(){return i.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[pi],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(e,i){1&e&&(_(0,"ngx-charts-chart",0),ye("legendLabelClick",function(o){return i.onClick(o)})("legendLabelActivate",function(o){return i.onActivate(o)})("legendLabelDeactivate",function(o){return i.onDeactivate(o)}),st(),_(1,"defs")(2,"clipPath"),pe(3,"rect"),x()(),_(4,"g",1),Z(5,o7e,1,10,"g",2),Z(6,s7e,1,12,"g",3),_(7,"g"),Z(8,a7e,2,11,"g",4),Z(9,c7e,3,9,"g",5),x()(),Z(10,d7e,2,13,"g",6),x()),2&e&&(S("view",Mr(17,So,i.width,i.height))("showLegend",i.legend)("legendOptions",i.legendOptions)("activeEntries",i.activeEntries)("animations",i.animations),w(2),ut("id",i.clipPathId),w(1),ut("width",i.dims.width+10)("height",i.dims.height+10)("transform","translate(-5, -5)"),w(1),ut("transform",i.transform),w(1),S("ngIf",i.xAxis),w(1),S("ngIf",i.yAxis),w(1),ut("clip-path",i.clipPath),w(1),S("ngForOf",i.results)("ngForTrackBy",i.trackBy),w(1),S("ngIf",!i.tooltipDisabled),w(1),S("ngIf",i.timeline&&"ordinal"!=i.scaleType))},dependencies:function(){return[Ln,vn,Vl,yl,A_,Zo,E_,M_,w9e]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:none}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:none}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{opacity:.2;transition:opacity .1s ease-in-out}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{fill:none;stroke:#ddd;stroke-width:1}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-dasharray:5;stroke-dashoffset:5;stroke-width:1}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill:#000;fill-opacity:.05}.ngx-charts .gridline-path-dotted{fill:none;stroke:#ddd;stroke-dasharray:1,20;stroke-dashoffset:3;stroke-width:1}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[tl("animationState",[Ma(":leave",[kr({opacity:1}),Aa(500,kr({opacity:0}))])])]},changeDetection:0}),t})(),w9e=(()=>{class t{constructor(){this.animations=!0}ngOnChanges(e){this.update()}update(){this.updateGradients();const e=this.sortData(this.data.series),i=this.getLineGenerator();this.path=i(e)||"";const r=this.getAreaGenerator();if(this.areaPath=r(e)||"",this.hasRange){const o=this.getRangeGenerator();this.outerPath=o(e)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const o=this.data.series.map(l=>l.value),s=Math.max(...o);s===Math.min(...o)&&(this.stroke=this.colors.getColor(s))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return R2().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y(e=>this.yScale(e.value)).curve(this.curve)}getRangeGenerator(){return qv().x(e=>{const i=e.name;let r;return r=this.xScale("time"===this.scaleType?i:"linear"===this.scaleType?Number(i):i),r}).y0(e=>this.yScale("number"==typeof e.min?e.min:e.value)).y1(e=>this.yScale("number"==typeof e.max?e.max:e.value)).curve(this.curve)}getAreaGenerator(){return qv().x(i=>this.xScale(i.name)).y0(()=>this.yScale.range()[0]).y1(i=>this.yScale(i.value)).curve(this.curve)}sortData(e){return"linear"===this.scaleType?function BI(t,n,e="asc"){return t.sort((i,r)=>"asc"===e?i[n]-r[n]:r[n]-i[n])}(e,"name"):"time"===this.scaleType?function HI(t,n,e="asc"){return t.sort((i,r)=>{const o=i[n].getTime(),s=r[n].getTime();return"asc"===e?o>s?1:s>o?-1:0:o>s?-1:s>o?1:0})}(e,"name"):function VI(t,n,e="asc",i){return t.sort((r,o)=>{const a=o[n],l=i.indexOf(r[n]),c=i.indexOf(a);return"asc"===e?l-c:c-l})}(e,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+_l().toString(),this.gradientUrl=`url(#${this.gradientId})`;const e=this.data.series.map(o=>o.value),i=Math.max(...e),r=Math.min(...e);this.gradientStops=this.colors.getLinearGradientStops(i,r),this.areaGradientStops=this.colors.getLinearGradientStops(i)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(e){return!!this.activeEntries&&void 0!==this.activeEntries.find(r=>e.name===r.name)}isInactive(e){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(r=>e.name===r.name)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=Rt({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Yn],attrs:h7e,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(e,i){1&e&&(st(),_(0,"g")(1,"defs"),Z(2,f7e,1,2,"g",0),x(),pe(3,"g",1)(4,"g",2),Z(5,p7e,1,9,"g",3),x()),2&e&&(w(2),S("ngIf",i.hasGradient),w(1),jn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.areaPath)("fill",i.hasGradient?i.gradientUrl:i.colors.getColor(i.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",i.areaGradientStops)("animations",i.animations),w(1),jn("active",i.isActive(i.data))("inactive",i.isInactive(i.data)),S("data",i.data)("path",i.path)("stroke",i.stroke)("animations",i.animations),w(1),S("ngIf",i.hasRange))},dependencies:[vn,RI,Rm,Lq],encapsulation:2,changeDetection:0}),t})(),$q=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})();Math;let WI=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),T9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu,WI,$q]}),t})(),O9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),F9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu]}),t})(),R9e=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu,WI,Pq]}),t})(),$9e=(()=>{class t{constructor(){!function L9e(){typeof SVGElement<"u"&&typeof SVGElement.prototype.contains>"u"&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}()}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({imports:[Vu,m9e,Pq,v9e,b9e,$q,T9e,O9e,WI,F9e,R9e]}),t})();function B9e(t,n){if(1&t&&(_(0,"ngb-alert",19),pe(1,"img",20),_(2,"h6",21),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function V9e(t,n){1&t&&pe(0,"img",31)}function H9e(t,n){1&t&&pe(0,"img",32)}function U9e(t,n){1&t&&pe(0,"img",33)}function z9e(t,n){1&t&&pe(0,"img",34)}function G9e(t,n){if(1&t&&(_(0,"tr",24)(1,"td"),sc(2,25),Z(3,V9e,1,0,"img",26),Z(4,H9e,1,0,"img",27),Z(5,U9e,1,0,"img",28),Z(6,z9e,1,0,"img",29),ac(),_(7,"span"),O(8),x()(),_(9,"td"),O(10),_(11,"span",30),O(12),x()(),_(13,"td"),O(14),_(15,"span",30),O(16),x()(),_(17,"td"),O(18),_(19,"span",30),O(20),x()(),_(21,"td"),O(22),_(23,"span",30),O(24),x()()()),2&t){const e=n.$implicit,i=$(2);w(2),S("ngSwitch",e.health),w(1),S("ngSwitchCase",0),w(1),S("ngSwitchCase",1),w(1),S("ngSwitchCase",2),w(1),S("ngSwitchCase",3),w(2),bt(e.name),w(2),mn("",e.session_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxSessionCount()-e.session_count," delta)"),w(2),mn("",e.presence_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxPresenceCount()-e.presence_count," delta)"),w(2),mn("",e.match_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxMatchCount()-e.match_count," delta)"),w(2),mn("",e.goroutine_count," "),w(1),S("hidden",!i.showDelta),w(1),mn("(",i.getMaxGoroutineCount()-e.goroutine_count," delta)")}}function W9e(t,n){if(1&t&&(_(0,"tbody"),Z(1,G9e,25,18,"tr",22),_(2,"tr",3),pe(3,"td",23),_(4,"th",3),O(5),x(),_(6,"th",3),O(7),x(),_(8,"th",3),O(9),x(),_(10,"th",3),O(11),x()()()),2&t){const e=$();w(1),S("ngForOf",e.statusData.nodes),w(4),bt(e.getTotalSessionCount()),w(2),bt(e.getMaxPresenceCount()),w(2),bt(e.getTotalMatchCount()),w(2),bt(e.getTotalGorountineCount())}}function q9e(t,n){if(1&t&&(_(0,"option",35),O(1),x()),2&t){const e=n.$implicit,i=$();Ph("value",e),w(1),bt(i.ranges[e])}}const J2=function(t){return{"background-color":t}};function Y9e(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function X9e(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,Y9e,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function J9e(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",37),Z(2,X9e,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.latencyGraphData)}}function K9e(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function Q9e(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,K9e,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function Z9e(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",43),Z(2,Q9e,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.rateGraphData)}}function eVe(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function tVe(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,eVe,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function nVe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",44),Z(2,tVe,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.inputGraphData)}}function iVe(t,n){if(1&t&&(_(0,"span"),pe(1,"br")(2,"span",41),_(3,"span",42),O(4),x()()),2&t){const e=n.$implicit;w(2),S("ngStyle",sr(3,J2,e.color)),w(2),Ef("",e.series,": ",e.value,"")}}function rVe(t,n){if(1&t&&(_(0,"div",39),O(1),Z(2,iVe,5,5,"span",40),x()),2&t){const e=n.model;w(1),mn(" ",e[0].name.toLocaleString()," "),w(1),S("ngForOf",e)}}function oVe(t,n){if(1&t&&(_(0,"div",36)(1,"ngx-charts-line-chart",45),Z(2,rVe,3,2,"ng-template",null,38,cs),x()()),2&t){const e=$();w(1),S("scheme",e.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",e.outputGraphData)}}let sVe=(()=>{class t{route;consoleService;formBuilder;error="";showDelta=!1;statusData;rateGraphData=[];latencyGraphData=[];inputGraphData=[];outputGraphData=[];rangeForm;ranges={1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"};rangesKeys=Object.keys(this.ranges).map(e=>+e);colorScheme={domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]};samples=60;refreshTimer;$refreshTimer;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(e=>{this.initData(e[0]),this.refresh(),this.refreshTimer=Gy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(r=>this.refresh())},e=>{this.error=e})}refresh(){this.consoleService.getStatus("").subscribe(e=>{this.statusData=e,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",e),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",e),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",e),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",e)})}generateSeries(){let e=new Date;e.setMilliseconds(0);const i=[];for(let r=0;r({name:r,value:0}))}initData(e){const i=this.generateSeries();this.latencyGraphData=e.map(r=>({name:r,series:i})),this.rateGraphData=e.map(r=>({name:r,series:i})),this.inputGraphData=e.map(r=>({name:r,series:i})),this.outputGraphData=e.map(r=>({name:r,series:i}))}updateData(e,i,r){const o=r.nodes,s=[],a=r.timestamp,l=e.map(d=>d.name),c=o.map(d=>d.name),u=this.diff(l,c);for(const d of e)u.includes(d.name)&&s.push({name:d.name,series:this.shiftData(d.series,0,a)});for(const d of o){let h=[],f={};const p=e.find(m=>m.name===d.name)?.series;h=this.shiftData(p||this.generateSeries(),d[i],a),f={name:d.name,series:h},s.push(f)}return s}shiftData(e,i,r){const o=e.slice(1);return o.push({name:new Date(r),value:i}),o}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(e){this.rangeForm.reset({rangeMinutes:+e.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(e=>{this.initData(e.nodes.map(i=>i.name)),this.$refreshTimer?.unsubscribe(),this.refreshTimer=Gy(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(i=>this.refresh())},e=>{this.error=e})}diff(e,i){const r=new Set(e);for(const o of i)r.delete(o);return Array.from(r)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((e,i)=>e+i.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(e=>e.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(e=>e.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(e=>e.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((e,i)=>e+i.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(e=>e.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((e,i)=>e+i.goroutine_count,0)}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[3,"ngSwitch"],["class","mr-2","src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",4,"ngSwitchCase"],["class","mr-2","src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",4,"ngSwitchCase"],["class","mr-2","src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",4,"ngSwitchCase"],["class","mr-2","src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",4,"ngSwitchCase"],[1,"text-muted","small",3,"hidden"],["src","/static/svg/green-tick.svg","alt","","width","15","height","","ngbTooltip","OK",1,"mr-2"],["src","/static/svg/red-triangle.svg","alt","","width","15","height","","ngbTooltip","Error",1,"mr-2"],["src","/static/blue-spinner.svg","alt","","width","15","height","","ngbTooltip","Connecting",1,"mr-2"],["src","/static/red-spinner.svg","alt","","width","15","height","","ngbTooltip","Disconnecting",1,"mr-2"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Status"),x(),Z(2,B9e,4,2,"ngb-alert",1),_(3,"table",2),ye("mouseover",function(){return r.showDelta=!0})("mouseout",function(){return r.showDelta=!1}),_(4,"thead",3)(5,"tr")(6,"th",4),O(7,"Node name"),x(),_(8,"th",4),O(9,"Sessions"),x(),_(10,"th",4),O(11,"Presences"),x(),_(12,"th",4),O(13,"Authoritative Matches"),x(),_(14,"th",4),O(15,"Goroutines"),x()()(),Z(16,W9e,12,5,"tbody",5),x(),_(17,"form",6)(18,"div",7)(19,"div",8)(20,"span"),O(21,"View:"),x(),_(22,"div",9)(23,"select",10),ye("change",function(s){return r.setRange(s)}),Z(24,q9e,2,2,"option",11),vA(25,"sortNumbers"),x()()()()(),_(26,"div",12)(27,"div",13)(28,"div",14)(29,"h5",15),O(30,"Processing Latency"),x(),_(31,"small"),O(32," (ms)"),x()()(),_(33,"div",13)(34,"div",14)(35,"h5",15),O(36,"Rate"),x(),_(37,"small"),O(38," (rpc/s)"),x()()()(),_(39,"div",12)(40,"div",16),Z(41,J9e,4,12,"div",17),x(),_(42,"div",16),Z(43,Z9e,4,12,"div",17),x()(),_(44,"div",18)(45,"div",13)(46,"div",14)(47,"h5",15),O(48,"Input"),x(),_(49,"small"),O(50," (kb/s)"),x()()(),_(51,"div",13)(52,"div",14)(53,"h5",15),O(54,"Output"),x(),_(55,"small"),O(56," (kb/s)"),x()()()(),_(57,"div",12)(58,"div",16),Z(59,nVe,4,12,"div",17),x(),_(60,"div",16),Z(61,oVe,4,12,"div",17),x()()),2&i&&(w(2),S("ngIf",r.error),w(14),S("ngIf",r.statusData),w(1),S("formGroup",r.rangeForm),w(7),S("ngForOf",yA(25,8,r.rangesKeys)),w(17),S("ngIf",r.latencyGraphData.length>0),w(2),S("ngIf",r.rateGraphData.length>0),w(16),S("ngIf",r.inputGraphData.length>0),w(2),S("ngIf",r.outputGraphData.length>0))},dependencies:function(){return[Ln,vn,u7,Fw,l7,po,Ru,jPe,x9e,fa,HC,UC,kv,da,ha,js,Zs,lVe]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:solid 1px #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em;font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:solid 2px #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 2px #dadae9}"]})}return t})(),aVe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(et(r=>Rn(r.nodes.map(o=>o.name)))).pipe(Ll(r=>(e.data={...e.data,error:r},Rn([]))))}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),lVe=(()=>{class t{transform(e){return e.sort((i,r)=>i-r)}static \u0275fac=function(i){return new(i||t)};static \u0275pipe=ul({name:"sortNumbers",type:t,pure:!1})}return t})();var cVe=ke(870),qI=ke(327);function uVe(t,n){if(1&t&&(_(0,"div",13)(1,"p")(2,"b"),O(3),x(),pe(4,"input",14),x()()),2&t){const e=$(2);w(3),bt(e.confirmDeleteForm.controls.numberValueControl.value.title),w(1),Ph("formControlName",e.confirmDeleteForm.controls.numberValueControl.value.id)}}const dVe=function(t){return{"is-invalid":t}};function hVe(t,n){if(1&t&&pe(0,"input",15),2&t){const e=$(2);S("ngClass",sr(1,dVe,e.f.delete.touched&&e.f.delete.invalid))}}function fVe(t,n){if(1&t&&(_(0,"div",9)(1,"form",10),Z(2,uVe,5,2,"div",11),Z(3,hVe,1,3,"input",12),x()()),2&t){const e=$();w(1),S("formGroup",e.confirmDeleteForm),w(1),S("ngIf",e.confirmDeleteForm.controls.numberValueControl),w(1),S("ngIf",e.confirmDeleteForm.controls.delete)}}let pVe=(()=>{class t{confirmed=new it;canceled=new it;title="Delete Confirmation";message="Are you sure you want to delete this item?";confirmDeleteForm;closeModal(){this.canceled.emit()}cancel(){this.canceled.emit()}confirm(){(!this.confirmDeleteForm||this.confirmDeleteForm.valid)&&this.confirmed.emit()}get f(){return this.confirmDeleteForm.controls}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Rt({type:t,selectors:[["app-delete-confirm-dialog"]],inputs:{confirmDeleteForm:"confirmDeleteForm"},outputs:{confirmed:"confirmed",canceled:"canceled"},decls:14,vars:3,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","Close","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],["class","d-flex flex-column justify-content-center",4,"ngIf"],[1,"modal-footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","button",1,"btn","btn-danger",3,"click"],[1,"d-flex","flex-column","justify-content-center"],["autocomplete","off",3,"formGroup"],["class","mt-2",4,"ngIf"],["type","text","class","form-control","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",3,"ngClass",4,"ngIf"],[1,"mt-2"],["type","number","value","30","min","0",2,"width","80px",3,"formControlName"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"h4",1),O(2),x(),_(3,"button",2),ye("click",function(){return r.closeModal()}),_(4,"span",3),O(5,"\xd7"),x()()(),_(6,"div",4),O(7),Z(8,fVe,4,3,"div",5),x(),_(9,"div",6)(10,"button",7),ye("click",function(){return r.cancel()}),O(11,"Cancel"),x(),_(12,"button",8),ye("click",function(){return r.confirm()}),O(13,"Delete"),x()()),2&i&&(w(2),bt(r.title),w(5),mn(" ",r.message," "),w(1),S("ngIf",r.confirmDeleteForm))},dependencies:[nm,vn,fa,Qs,P3,da,ha,V3,js,Zs]})}return t})(),Hl=(()=>{class t{modalService;constructor(e){this.modalService=e}openDeleteConfirmModal(e,i=null,r="",o=""){const a=this.modalService.open(pVe,{backdrop:!1,centered:!0});i&&(a.componentInstance.confirmDeleteForm=i),r&&(a.componentInstance.title=r),o&&(a.componentInstance.message=o),a.componentInstance.confirmed.subscribe(()=>{e(i?.value),a.close()}),a.componentInstance.canceled.subscribe(()=>{a.close()})}static \u0275fac=function(i){return new(i||t)(gt(f2))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const mVe=["fileSelector"];function gVe(t,n){if(1&t&&(_(0,"div",8),O(1),x()),2&t){const e=$(2);w(1),bt(e.dropZoneLabel)}}function vVe(t,n){if(1&t){const e=vt();_(0,"div")(1,"input",9),ye("click",function(r){return Be(e),Ve($(2).openFileSelector(r))}),x()()}if(2&t){const e=$(2);w(1),Ph("value",e.browseBtnLabel),S("className",e.browseBtnClassName)}}function yVe(t,n){if(1&t&&(Z(0,gVe,2,1,"div",6),Z(1,vVe,2,2,"div",7)),2&t){const e=$();S("ngIf",e.dropZoneLabel),w(1),S("ngIf",e.showBrowseBtn)}}function _Ve(t,n){}const bVe=function(t){return{openFileSelector:t}};class K2{constructor(n,e){this.relativePath=n,this.fileEntry=e}}let Wq=(()=>{class t{constructor(e){this.template=e}}return t.\u0275fac=function(e){return new(e||t)(de(oo))},t.\u0275dir=sn({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),qq=(()=>{class t{constructor(e,i){this.zone=e,this.renderer=i,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new it,this.onFileOver=new it,this.onFileLeave=new it,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=r=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",r=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",r=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(e){this._disabled=null!=e&&"false"!=`${e}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(e){this.useDragEnter?(this.preventAndStop(e),e.dataTransfer&&(e.dataTransfer.dropEffect="copy")):!this.isDropzoneDisabled()&&!this.useDragEnter&&e.dataTransfer&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e),e.dataTransfer.dropEffect="copy")}onDragEnter(e){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(e)),this.preventAndStop(e))}onDragLeave(e){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(e)),this.preventAndStop(e))}dropFiles(e){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,e.dataTransfer)){let i;i=e.dataTransfer.items?e.dataTransfer.items:e.dataTransfer.files,this.preventAndStop(e),this.checkFiles(i)}}uploadFiles(e){!this.isDropzoneDisabled()&&e.target&&(this.checkFiles(e.target.files||[]),this.resetFileInput())}checkFiles(e){for(let i=0;il(r)},a=new K2(s.name,s);this.addToQueue(a)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=Gy(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const i=this.files;this.files=[],this.onFileDrop.emit(i)}})}traverseFileTree(e,i){if(e.isFile){const r=new K2(i,e);this.files.push(r)}else{i+="/";const r=e.createReader();let o=[];const s=()=>{this.numOfActiveReadEntries++,r.readEntries(a=>{if(a.length)o=o.concat(a),s();else if(0===o.length){const l=new K2(i,e);this.zone.run(()=>{this.addToQueue(l)})}else for(let l=0;l{this.traverseFileTree(o[l],i+o[l].name)});this.numOfActiveReadEntries--})};s()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const e=this.fileSelector.nativeElement,i=e.parentElement,r=this.getHelperFormElement(),o=this.getFileInputPlaceholderElement();i!==r&&(this.renderer.insertBefore(i,o,e),this.renderer.appendChild(r,e),r.reset(),this.renderer.insertBefore(i,e,o),this.renderer.removeChild(i,o))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(e){return!!e.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(e){this.files.push(e)}preventAndStop(e){e.stopPropagation(),e.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(de(nr),de(ca))},t.\u0275cmp=Rt({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(e,i,r){if(1&e&&yi(r,Wq,5,oo),2&e){let o;wn(o=Cn())&&(i.contentTemplate=o.first)}},viewQuery:function(e,i){if(1&e&&xo(mVe,7),2&e){let r;wn(r=Cn())&&(i.fileSelector=r.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(e,i){if(1&e&&(_(0,"div",0),ye("drop",function(o){return i.dropFiles(o)})("dragover",function(o){return i.onDragOver(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragleave",function(o){return i.onDragLeave(o)}),_(1,"div",1)(2,"input",2,3),ye("change",function(o){return i.uploadFiles(o)}),x(),Z(4,yVe,2,2,"ng-template",null,4,cs),Z(6,_Ve,0,0,"ng-template",5),x()()),2&e){const r=Ta(5);jn("ngx-file-drop__drop-zone--over",i.isDraggingOverDropZone),S("className",i.dropZoneClassName),w(1),S("className",i.contentClassName),w(1),S("accept",i.accept)("multiple",i.multiple),ut("directory",i.directory||void 0)("webkitdirectory",i.directory||void 0)("mozdirectory",i.directory||void 0)("msdirectory",i.directory||void 0)("odirectory",i.directory||void 0),w(4),S("ngTemplateOutlet",i.contentTemplate||r)("ngTemplateOutletContext",sr(13,bVe,i.openFileSelector))}},dependencies:[vn,Au],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),xVe=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t,bootstrap:function(){return[qq]}}),t.\u0275inj=wi({imports:[Mf]}),t})();function wVe(t,n){1&t&&(_(0,"ngb-alert",21),pe(1,"img",22),_(2,"h6",23),O(3,"Failed to retrieve configuration."),x()()),2&t&&S("dismissible",!1)}function CVe(t,n){if(1&t&&(_(0,"span",32),O(1),x()),2&t){const e=$(2).$implicit;S("id",e.name),w(1),bt(e.value)}}function SVe(t,n){1&t&&(_(0,"span",33),O(1,"(empty)"),x()),2&t&&S("id",$(2).$implicit.name)}function kVe(t,n){if(1&t&&(_(0,"div",34)(1,"b"),O(2),x(),_(3,"label",26)(4,"a",27),pe(5,"img",10),x()()()),2&t){const e=$(2).index,i=$();w(2),bt(i.flatConfig[e+1].name),w(1),S("for",i.flatConfig[e+1].name),w(1),Kp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",i.flatConfig[e+1].name,"",$1)}}function DVe(t,n){if(1&t&&(_(0,"span",32),O(1),x()),2&t){const e=$(3).index,i=$();S("id",i.flatConfig[e+1].name),w(1),bt(i.flatConfig[e+1].value)}}function TVe(t,n){if(1&t&&(_(0,"span",33),O(1,"(empty)"),x()),2&t){const e=$(3).index;S("id",$().flatConfig[e+1].name)}}function EVe(t,n){if(1&t&&(_(0,"div",35),Z(1,DVe,2,2,"span",28),Z(2,TVe,2,1,"span",29),x()),2&t){const e=$(2).index,i=$();w(1),S("ngIf",!i.isEmpty(i.flatConfig[e+1].value)),w(1),S("ngIf",i.isEmpty(i.flatConfig[e+1].value))}}function AVe(t,n){if(1&t&&(_(0,"div",25)(1,"div",7)(2,"b"),O(3),x(),_(4,"label",26)(5,"a",27),pe(6,"img",10),x()()(),_(7,"div",7),Z(8,CVe,2,2,"span",28),Z(9,SVe,2,1,"span",29),x(),Z(10,kVe,6,3,"div",30),Z(11,EVe,3,2,"div",31),x()),2&t){const e=$(),i=e.index,r=e.$implicit,o=$();jn("border-top-0",i>0),w(3),bt(r.name),w(1),S("for",r.name),w(1),Kp("href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#",r.value.name,"",$1),w(3),S("ngIf",!o.isEmpty(r.value)),w(1),S("ngIf",o.isEmpty(r.value)),w(1),S("ngIf",i{class t{config;route;httpClient;modalService;consoleService;formBuilder;deleteConfirmService;configError="";uploadError="";deleteError="";jsonConfig;flatConfig;nakamaVersion;file;uploading=!1;uploadSuccess=!1;deleteSuccess=!1;deleting=!1;confirmDeleteForm;apiConfig;constructor(e,i,r,o,s,a,l){this.config=e,this.route=i,this.httpClient=r,this.modalService=o,this.consoleService=s,this.formBuilder=a,this.deleteConfirmService=l,this.apiConfig=e}ngOnInit(){this.route.data.subscribe(e=>{this.nakamaVersion=e[0].server_version;const i=JSON.parse(e[0].config);this.jsonConfig=i,this.flatConfig=this.flattenConfig(i)},e=>{this.configError=e}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Co.compose([Co.required,Co.pattern("DELETE")])]})}flattenConfig(e){const i=[];return this.traverseConfig("",e,i),i.sort((o,s)=>o.name.localeCompare(s.name))}traverseConfig(e,i,r){for(const o in i)"env"!==o&&(Array.isArray(i[o])?r.push({name:e+o,value:i[o].join(", ")}):"object"==typeof i[o]?this.traverseConfig(o+".",i[o],r):r.push({name:e+o,value:i[o]}))}isEmpty(e){return""===e||0===e}exportYaml(){const e=new Blob([(0,cVe.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});qI.saveAs(e,"config.yaml")}dropped(e){this.uploadError="",this.uploadSuccess=!1;for(const i of e)if(i.fileEntry.isFile){const r=i.fileEntry.name.split(".");r.length>1&&["json","csv"].includes(r[r.length-1].toLowerCase())?i.fileEntry.file(a=>{this.uploadFile(a)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(e){const i=new FormData;i.append(e.name,e),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",i,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},o=>{this.uploading=!1,this.uploadError=o})}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(()=>{this.deleteError="",this.deleting=!0,this.consoleService.deleteAllData("").pipe(Q3(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},e=>{this.deleting=!1,this.deleteError=e})},this.confirmDeleteForm,"Delete All Data","Are you sure you want to delete all the database data?")}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(de(Y3),de(Pr),de(YC),de(f2),de(bi),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:41,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/nakama/getting-started/configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height","16"],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(Z(0,wVe,4,1,"ngb-alert",0),_(1,"h2",1),O(2,"Server Configuration"),x(),_(3,"div",2)(4,"h5")(5,"b"),O(6,"Server version:"),x(),O(7),x(),_(8,"button",3),ye("click",function(){return r.exportYaml()}),O(9,"Export Configuration"),x()(),_(10,"div",4),Z(11,MVe,2,1,"ng-container",5),_(12,"div",6)(13,"div",7)(14,"b"),O(15,"runtime.env"),x(),_(16,"label",8)(17,"a",9),pe(18,"img",10),x()()(),_(19,"div",11),Z(20,IVe,2,1,"div",12),Z(21,NVe,3,0,"div",12),x()()(),_(22,"h5",13),O(23,"Import storage data"),x(),_(24,"p"),O(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),x(),Z(26,FVe,6,2,"ngb-alert",0),Z(27,PVe,4,1,"ngb-alert",14),_(28,"ngx-file-drop",15),ye("onFileDrop",function(s){return r.dropped(s)}),Z(29,jVe,2,0,"ng-template",16),x(),_(30,"h5",13),O(31,"Delete all data"),x(),Z(32,RVe,6,2,"ngb-alert",0),Z(33,LVe,4,1,"ngb-alert",14),_(34,"div",17)(35,"div"),pe(36,"img",18),_(37,"small",19),O(38,"Warning - this operation is not reversible!"),x()(),_(39,"button",20),ye("click",function(){return r.deleteData()}),O(40,"Delete all"),x()()),2&i&&(S("ngIf",r.configError),w(7),mn(" ",r.nakamaVersion,""),w(4),S("ngForOf",r.flatConfig),w(9),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&r.jsonConfig.runtime.env.length>0),w(1),S("ngIf",r.jsonConfig.runtime&&r.jsonConfig.runtime.env&&0===r.jsonConfig.runtime.env.length),w(5),S("ngIf",r.uploadError),w(1),S("ngIf",r.uploadSuccess),w(1),S("disabled",r.uploading),w(4),S("ngIf",r.deleteError),w(1),S("ngIf",r.deleteSuccess),w(6),S("disabled",r.deleting))},dependencies:[qq,Wq,Ln,vn,po],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(even){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:solid 1px #dadae9}"]})}return t})(),BVe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getConfig("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function VVe(t,n){if(1&t&&(_(0,"ngb-alert",48),pe(1,"img",49),_(2,"h6",50),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function HVe(t,n){1&t&&(_(0,"tr")(1,"td",51),O(2,"No additional users are setup. Create a new user below."),x()()),2&t&&(w(1),S("colSpan",4))}function UVe(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td"),O(2),x(),_(3,"td"),O(4),x(),_(5,"td")(6,"span",36),O(7,"Administrator"),x(),_(8,"span",36),O(9,"Developer"),x(),_(10,"span",36),O(11,"Maintainer"),x(),_(12,"span",36),O(13,"View Only"),x()(),_(14,"td")(15,"button",52),ye("click",function(){const o=Be(e).$implicit;return Ve($().deleteUser(o.username))}),O(16,"Delete"),x()()()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.username),w(2),bt(e.email),w(2),S("hidden",e.role!==i.adminRole),w(2),S("hidden",e.role!==i.developerRole),w(2),S("hidden",e.role!==i.maintainerRole),w(2),S("hidden",e.role!==i.readonlyRole)}}function zVe(t,n){if(1&t&&(_(0,"ngb-alert",48),pe(1,"img",49),_(2,"h6",50),O(3,"An error occurred:"),x(),_(4,"p",53),O(5),x()()),2&t){const e=$();S("dismissible",!1),w(5),bt(e.userCreateError)}}const YI=function(t){return{"is-invalid":t}};let GVe=(()=>{class t{route;consoleService;formBuilder;error="";userCreateError="";users=[];createUserForm;adminRole=ti.USER_ROLE_ADMIN;developerRole=ti.USER_ROLE_DEVELOPER;maintainerRole=ti.USER_ROLE_MAINTAINER;readonlyRole=ti.USER_ROLE_READONLY;constructor(e,i,r){this.route=e,this.consoleService=i,this.formBuilder=r}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Co.required],email:["",[Co.required,Co.email]],password:["",Co.compose([Co.required,Co.minLength(8)])],role:[+this.readonlyRole,Co.required],newsletter:[!1]}),this.route.data.subscribe(e=>{const i=e[0];this.users.length=0,this.users.push(...i.users)},e=>{this.error=e})}deleteUser(e){this.error="",this.consoleService.deleteUser("",e).pipe(et(()=>this.consoleService.listUsers(""))).subscribe(i=>{this.error="",this.users.length=0,this.users.push(...i.users)},i=>{this.error=i})}addUser(){this.userCreateError="",this.createUserForm.disable();let e=ti.USER_ROLE_READONLY;switch(this.f.role.value){case 1:e=ti.USER_ROLE_ADMIN;break;case 2:e=ti.USER_ROLE_DEVELOPER;break;case 3:e=ti.USER_ROLE_MAINTAINER;break;case 4:e=ti.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:e,newsletter_subscription:this.f.newsletter.value}).pipe(et(()=>this.consoleService.listUsers(""))).subscribe(r=>{this.userCreateError="",this.createUserForm.reset({role:+e}),this.createUserForm.enable(),this.users.length=0,this.users.push(...r.users)},r=>{this.userCreateError=r,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["app-users"]],decls:121,vars:25,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type","dismissible"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Management"),x(),Z(2,VVe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th",4),O(7,"Username"),x(),_(8,"th"),O(9,"Email"),x(),_(10,"th",5),O(11,"Role"),x(),_(12,"th",6),O(13,"Action"),x()()(),_(14,"tbody"),Z(15,HVe,3,1,"tr",7),Z(16,UVe,17,6,"tr",8),x()(),_(17,"h5",9),O(18,"Add new user"),x(),_(19,"ngb-alert",10)(20,"h6",11),O(21,"User roles"),x(),_(22,"div",12)(23,"div",13)(24,"div",14),pe(25,"img",15),_(26,"h6",16),O(27,"Administrator"),x()(),_(28,"small"),O(29," Owners have complete control over the server, its users and resources. "),x()(),_(30,"div",13)(31,"div",14),pe(32,"img",17),_(33,"h6",16),O(34,"Developer"),x()(),_(35,"small"),O(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),x()(),_(37,"div",13)(38,"div",14),pe(39,"img",18),_(40,"h6",16),O(41,"Maintainer"),x()(),_(42,"small"),O(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),x()(),_(44,"div",13)(45,"div",14),pe(46,"img",19),_(47,"h6",16),O(48,"View Only"),x()(),_(49,"small"),O(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),x()()()(),Z(51,zVe,6,2,"ngb-alert",1),_(52,"div",20)(53,"form",21),ye("ngSubmit",function(){return r.addUser()}),_(54,"div",22)(55,"div",23)(56,"div",24)(57,"label",25),O(58,"Email"),x()(),_(59,"div",26),pe(60,"input",27),_(61,"div",28),O(62,"Email is required"),x()()()(),_(63,"div",22)(64,"div",23)(65,"div",24)(66,"label",29),O(67,"Username"),x()(),_(68,"div",26),pe(69,"input",30),_(70,"div",28),O(71,"Username is required"),x()()()(),_(72,"div",22)(73,"div",23)(74,"div",24)(75,"label",31),O(76,"Password"),x()(),_(77,"div",26),pe(78,"input",32),_(79,"div",28),O(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),x()()()(),_(81,"div",22)(82,"div",23)(83,"div",24)(84,"label",33),O(85,"Role"),x()(),_(86,"div",26)(87,"div",34)(88,"button",35)(89,"span",36),O(90,"Administrator"),x(),_(91,"span",36),O(92,"Developer"),x(),_(93,"span",36),O(94,"Maintainer"),x(),_(95,"span",36),O(96,"View Only"),x()(),_(97,"div",37),pe(98,"button",38),_(99,"div",39)(100,"button",40),ye("click",function(){return r.f.role.setValue(+r.adminRole)}),O(101,"Administrator"),x(),_(102,"button",40),ye("click",function(){return r.f.role.setValue(+r.developerRole)}),O(103,"Developer"),x(),_(104,"button",40),ye("click",function(){return r.f.role.setValue(+r.maintainerRole)}),O(105,"Maintainer"),x(),_(106,"button",40),ye("click",function(){return r.f.role.setValue(+r.readonlyRole)}),O(107,"View Only"),x()()()(),_(108,"div",28),O(109,"Role is required"),x()()()(),_(110,"div",41)(111,"div",42),pe(112,"div",24),_(113,"div",26)(114,"div",43),pe(115,"input",44),_(116,"label",45),O(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),x()()()()(),_(118,"div",46)(119,"button",47),O(120,"Save"),x()()()()),2&i&&(w(2),S("ngIf",r.error),w(13),S("ngIf",0===r.users.length),w(1),S("ngForOf",r.users),w(3),S("type","secondary")("dismissible",!1),w(32),S("ngIf",r.userCreateError),w(2),S("formGroup",r.createUserForm),w(7),S("ngClass",sr(19,YI,r.f.email.dirty&&r.f.email.errors)),w(1),S("hidden",r.f.email.disabled||r.f.email.valid||r.f.email.pristine),w(8),S("ngClass",sr(21,YI,r.f.username.dirty&&r.f.username.errors)),w(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),w(8),S("ngClass",sr(23,YI,r.f.password.dirty&&r.f.password.errors)),w(1),S("hidden",r.f.password.disabled||r.f.password.valid||r.f.password.pristine),w(10),S("hidden",r.f.role.value!==+r.adminRole),w(2),S("hidden",r.f.role.value!==+r.developerRole),w(2),S("hidden",r.f.role.value!==+r.maintainerRole),w(2),S("hidden",r.f.role.value!==+r.readonlyRole),w(13),S("hidden",r.f.role.disabled||r.f.role.valid||r.f.role.pristine),w(11),S("disabled",r.createUserForm.invalid))},dependencies:[nm,Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,OC,da,ha,Hf,js,Zs],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:solid 1px #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:solid 1px #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]})}return t})(),WVe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listUsers("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function qVe(t,n){if(1&t&&(_(0,"ngb-alert",10),pe(1,"img",11),_(2,"h6",12),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Failed to retrieve runtime information: ",e.error,"")}}function YVe(t,n){if(1&t&&(_(0,"tr")(1,"td"),O(2),x(),_(3,"td",13),O(4),x()()),2&t){const e=n.$implicit;w(2),bt(e.path),w(2),bt(e.mod_time)}}function XVe(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No Go modules were found."),x(),pe(3,"td"),x())}function JVe(t,n){if(1&t&&(_(0,"tr")(1,"td"),O(2),x(),_(3,"td",13),O(4),x()()),2&t){const e=n.$implicit;w(2),bt(e.path),w(2),bt(e.mod_time)}}function KVe(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No Lua modules were found."),x(),pe(3,"td"),x())}function QVe(t,n){if(1&t&&(_(0,"tr")(1,"td"),O(2),x(),_(3,"td",13),O(4),x()()),2&t){const e=n.$implicit;w(2),bt(e.path),w(2),bt(e.mod_time)}}function ZVe(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No JavaScript modules were found."),x(),pe(3,"td"),x())}const XI=function(){return["/apiexplorer"]},JI=function(t){return{endpoint:t}};function eHe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),O(3),x()(),_(4,"td",15)(5,"a",16),O(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),bt(e),w(2),S("routerLink",ml(3,XI))("queryParams",sr(4,JI,e))}}function tHe(t,n){1&t&&(_(0,"tr")(1,"td",17),O(2,"No Go RPC functions were found."),x()())}function nHe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),O(3),x()(),_(4,"td",15)(5,"a",16),O(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),bt(e),w(2),S("routerLink",ml(3,XI))("queryParams",sr(4,JI,e))}}function iHe(t,n){1&t&&(_(0,"tr")(1,"td",17),O(2,"No Lua RPC functions were found."),x()())}function rHe(t,n){if(1&t&&(_(0,"tr")(1,"td")(2,"code"),O(3),x()(),_(4,"td",15)(5,"a",16),O(6,"API Explorer"),x()()()),2&t){const e=n.$implicit;w(3),bt(e),w(2),S("routerLink",ml(3,XI))("queryParams",sr(4,JI,e))}}function oHe(t,n){1&t&&(_(0,"tr")(1,"td",17),O(2,"No JavaScript RPC functions were found."),x()())}let sHe=(()=>{class t{route;consoleService;error="";runtimeInfo;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){this.route.data.subscribe(e=>{this.runtimeInfo=e[0]},e=>{this.error=e})}ngOnDestroy(){}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Runtime Modules"),x(),Z(2,qVe,4,2,"ngb-alert",1),_(3,"table",2)(4,"thead",3)(5,"tr")(6,"th"),O(7,"Go Modules"),x(),_(8,"th",4),O(9,"Last Modified"),x()()(),_(10,"tbody"),Z(11,YVe,5,2,"tr",5),Z(12,XVe,4,0,"tr",6),x(),_(13,"thead",3)(14,"tr")(15,"th",7),O(16,"Lua Modules"),x()()(),_(17,"tbody"),Z(18,JVe,5,2,"tr",5),Z(19,KVe,4,0,"tr",6),x(),_(20,"thead",3)(21,"tr")(22,"th",7),O(23,"JavaScript Modules"),x()()(),_(24,"tbody"),Z(25,QVe,5,2,"tr",5),Z(26,ZVe,4,0,"tr",6),x()(),_(27,"h4",8),O(28,"Registered RPC Functions"),x(),_(29,"table",9)(30,"thead",3)(31,"tr")(32,"th",7),O(33,"Go RPC Functions"),x()()(),_(34,"tbody"),Z(35,eHe,7,6,"tr",5),Z(36,tHe,3,0,"tr",6),x(),_(37,"thead",3)(38,"tr")(39,"th",7),O(40,"Lua RPC Functions"),x()()(),_(41,"tbody"),Z(42,nHe,7,6,"tr",5),Z(43,iHe,3,0,"tr",6),x(),_(44,"thead",3)(45,"tr")(46,"th",7),O(47,"JavaScript RPC Functions"),x()()(),_(48,"tbody"),Z(49,rHe,7,6,"tr",5),Z(50,oHe,3,0,"tr",6),x()()),2&i&&(w(2),S("ngIf",r.error),w(9),S("ngForOf",r.runtimeInfo.go_modules),w(1),S("ngIf",0===r.runtimeInfo.go_modules.length),w(6),S("ngForOf",r.runtimeInfo.lua_modules),w(1),S("ngIf",0===r.runtimeInfo.lua_modules.length),w(6),S("ngForOf",r.runtimeInfo.js_modules),w(1),S("ngIf",0===r.runtimeInfo.js_modules.length),w(9),S("ngForOf",r.runtimeInfo.go_rpc_functions),w(1),S("ngIf",0===r.runtimeInfo.go_rpc_functions.length),w(6),S("ngForOf",r.runtimeInfo.lua_rpc_functions),w(1),S("ngIf",0===r.runtimeInfo.lua_rpc_functions.length),w(6),S("ngForOf",r.runtimeInfo.js_rpc_functions),w(1),S("ngIf",0===r.runtimeInfo.js_rpc_functions.length))},dependencies:[Ou,Ln,vn,po],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:40%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]})}return t})(),aHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getRuntime("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function lHe(t,n){1&t&&(_(0,"span"),O(1,"Filter by collection"),x())}function cHe(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.f.collection.value)}}function uHe(t,n){if(1&t){const e=vt();_(0,"button",34),ye("click",function(){const o=Be(e).$implicit;return Ve($().f.collection.setValue(o))}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function dHe(t,n){if(1&t&&(_(0,"ngb-alert",35),pe(1,"img",36),_(2,"h6",37),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying storage objects: ",e.error,"")}}function hHe(t,n){1&t&&(_(0,"th",38),O(1,"Remove"),x())}function fHe(t,n){1&t&&(_(0,"tr")(1,"td",39),O(2,"No storage objects found - change the filter criteria or add new objects."),x()())}function pHe(t,n){if(1&t){const e=vt();_(0,"td",42)(1,"button",43),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteObject(r,s,a))}),O(2,"Delete"),x()()}}function mHe(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(2),x(),_(3,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(4),x(),_(5,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(6),x(),_(7,"td",40),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewObject(o))}),O(8),x(),Z(9,pHe,3,0,"td",41),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.collection),w(2),bt(e.key),w(2),bt(e.user_id),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed())}}let gHe=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";collections=[];objects=[];objectCount=0;nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const e=this.route.snapshot.queryParamMap;this.f.collection.setValue(e.get("collection")),this.f.key.setValue(e.get("key")),this.f.user_id.setValue(e.get("user_id")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(i=>{this.collections.length=0,this.collections.push(...i[0].collections),this.objectCount=i[1].total_count,this.nextCursor=i[1].next_cursor,this.prevCursor=i[1].prev_cursor,this.objects.length=0,this.objects.push(...i[1].objects)},i=>{this.error=i})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,i).subscribe(r=>{this.error="",this.objectCount=r.total_count,this.nextCursor=r.next_cursor,this.objects.length=0,this.objects.push(...r.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteObject(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",r.collection,r.key,r.user_id,r.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}viewObject(e){this.router.navigate(["/storage",e.collection,e.key,e.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Storage Objects"),x(),_(2,"h6",1),O(3),x(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return r.search(0)}),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"button",9),Z(12,lHe,2,0,"span",10),Z(13,cHe,2,1,"span",10),x(),_(14,"div",11)(15,"button",12),ye("click",function(){return r.f.collection.reset()}),O(16,"\u2718 Deselect collection"),x(),pe(17,"div",13),Z(18,uHe,2,1,"button",14),x()()(),pe(19,"input",15)(20,"input",16),_(21,"div",17)(22,"span",18),ye("click",function(){return r.f.user_id.setValue(r.systemUserId)}),pe(23,"img",19),x()(),_(24,"div",17)(25,"button",20),ye("click",function(){return r.search(0)}),O(26,"Search"),x()()()()(),_(27,"div",21)(28,"div",22)(29,"button",23),ye("click",function(){return r.search(0)}),pe(30,"img",24),x(),_(31,"button",23),ye("click",function(){return r.search(1)}),pe(32,"img",25),x()()()()(),Z(33,dHe,4,2,"ngb-alert",26),_(34,"div",27)(35,"table",28)(36,"thead",29)(37,"tr")(38,"th"),O(39,"Collection Name"),x(),_(40,"th"),O(41,"Key Name"),x(),_(42,"th",30),O(43,"User ID"),x(),_(44,"th",31),O(45,"Last Update"),x(),Z(46,hHe,2,0,"th",32),x()(),_(47,"tbody"),Z(48,fHe,3,0,"tr",10),Z(49,mHe,10,5,"tr",33),x()()()),2&i&&(w(3),mn("",r.objectCount," objects found."),w(4),S("formGroup",r.searchForm),w(4),S("disabled",0===r.collections.length),w(1),S("ngIf",!r.f.collection.value||""===r.f.collection.value),w(1),S("ngIf",r.f.collection.value&&""!==r.f.collection.value),w(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),w(2),S("hidden",!r.f.collection.value||""===r.f.collection.value),w(1),S("ngForOf",r.collections),w(7),S("disabled",r.disableSearch()),w(4),S("disabled",0===r.objects.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.objects.length),w(1),S("ngForOf",r.objects))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),vHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listStorageCollections("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),yHe=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("collection"),o=e.queryParamMap.get("key"),s=e.queryParamMap.get("user_id");return this.consoleService.listStorage("",s,o,r,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var KI,Yq,Xq,Jq,Kq,Qq,Zq,eY,tY,nY,iY,rY,oY,sY,aY,lY,cY,uY,dY,hY,fY,pY,mY,gY,vY,yY,_Y,bY,xY,wY,CY,SY,kY,DY,TY,EY,AY,MY,OY,IY,NY,FY,PY,jY,RY,LY,$Y,BY,VY,HY,UY,zY,GY,WY,qY,YY,XY,JY,KY,QY,ZY,eX,tX,nX,iX,rX,oX,sX,aX,lX,cX,uX,dX,hX,fX,pX,mX,gX,vX,yX,_X,bX,xX,wX,CX,SX,kX,DX,TX,EX,AX,MX,OX,IX,NX,FX,PX,jX,RX,LX,$X,BX,VX,HX,UX,zX,GX,WX,qX,YX,XX,JX,KX,QX,ZX,eJ,tJ,nJ,iJ,rJ,oJ,sJ,aJ,lJ,cJ,uJ,dJ,hJ,fJ,pJ,mJ,gJ,vJ,yJ,_J,bJ,xJ,wJ,CJ,SJ,kJ,DJ,TJ,EJ,AJ,MJ,OJ,IJ,NJ,FJ,PJ,jJ,RJ,LJ,$J,BJ,VJ,HJ,UJ,zJ,GJ,WJ,qJ,YJ,XJ,JJ,KJ,QJ,ZJ,eK,tK,nK,iK,rK,oK,sK,aK,lK,cK,uK,dK,hK,fK,pK,mK,gK,vK,yK,_K,bK,xK,wK,CK,SK,kK,DK,TK,EK,AK,MK,OK,IK,NK,FK,PK,jK,RK,LK,$K,BK,VK,HK,UK,zK,GK,WK,qK,YK,XK,JK,KK,QK,ZK,eQ,tQ,nQ,iQ,rQ,oQ,sQ,aQ,lQ,cQ,uQ,dQ,hQ,fQ,pQ,mQ,gQ,vQ,yQ,_Q,bQ,xQ,wQ,CQ,SQ,kQ,DQ,TQ,EQ,AQ,MQ,OQ,IQ,NQ,FQ,PQ,jQ,RQ,LQ,$Q,BQ,VQ,HQ,UQ,zQ,GQ,WQ,qQ,YQ,XQ,JQ,KQ,QQ,ZQ,eZ,tZ,nZ,iZ,rZ,oZ,_He=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],bHe=["mainAxis","crossAxis","limiter"];function O_(t){var n="function"==typeof Map?new Map:void 0;return O_=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return QI(e,arguments,Wi(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),I_(r,e)},O_(t)}function QI(t,n,e){return(QI=dZ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&I_(a,o.prototype),a}).apply(null,arguments)}function Ee(t,n){return n||(n=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(n)}}))}function sZ(t,n){if(null==t)return{};var e,i,r=function(s,a){if(null==s)return{};var l,c,u={},d=Object.keys(s);for(c=0;c=0||(u[l]=s[l]);return u}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Re(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Q2(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var l=e.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function pn(){pn=function(){return t};var t={},n=Object.prototype,e=n.hasOwnProperty,i=Object.defineProperty||function(X,te,P){X[te]=P.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function l(X,te,P){return Object.defineProperty(X,te,{value:P,enumerable:!0,configurable:!0,writable:!0}),X[te]}try{l({},"")}catch{l=function(te,P,W){return te[P]=W}}function c(X,te,P,W){var H=Object.create((te&&te.prototype instanceof h?te:h).prototype),le=new R(W||[]);return i(H,"_invoke",{value:k(X,P,le)}),H}function u(X,te,P){try{return{type:"normal",arg:X.call(te,P)}}catch(W){return{type:"throw",arg:W}}}t.wrap=c;var d={};function h(){}function f(){}function p(){}var m={};l(m,o,function(){return this});var g=Object.getPrototypeOf,v=g&&g(g(U([])));v&&v!==n&&e.call(v,o)&&(m=v);var y=p.prototype=h.prototype=Object.create(m);function b(X){["next","throw","return"].forEach(function(te){l(X,te,function(P){return this._invoke(te,P)})})}function C(X,te){function P(J,H,le,E){var I=u(X[J],X,H);if("throw"!==I.type){var N=I.arg,q=N.value;return q&&"object"==gn(q)&&e.call(q,"__await")?te.resolve(q.__await).then(function(V){P("next",V,le,E)},function(V){P("throw",V,le,E)}):te.resolve(q).then(function(V){N.value=V,le(N)},function(V){return P("throw",V,le,E)})}E(I.arg)}var W;i(this,"_invoke",{value:function(J,H){function le(){return new te(function(E,I){P(J,H,E,I)})}return W=W?W.then(le,le):le()}})}function k(X,te,P){var W="suspendedStart";return function(J,H){if("executing"===W)throw new Error("Generator is already running");if("completed"===W){if("throw"===J)throw H;return{value:void 0,done:!0}}for(P.method=J,P.arg=H;;){var le=P.delegate;if(le){var E=D(le,P);if(E){if(E===d)continue;return E}}if("next"===P.method)P.sent=P._sent=P.arg;else if("throw"===P.method){if("suspendedStart"===W)throw W="completed",P.arg;P.dispatchException(P.arg)}else"return"===P.method&&P.abrupt("return",P.arg);W="executing";var I=u(X,te,P);if("normal"===I.type){if(W=P.done?"completed":"suspendedYield",I.arg===d)continue;return{value:I.arg,done:P.done}}"throw"===I.type&&(W="completed",P.method="throw",P.arg=I.arg)}}}function D(X,te){var P=te.method,W=X.iterator[P];if(void 0===W)return te.delegate=null,"throw"===P&&X.iterator.return&&(te.method="return",te.arg=void 0,D(X,te),"throw"===te.method)||"return"!==P&&(te.method="throw",te.arg=new TypeError("The iterator does not provide a '"+P+"' method")),d;var J=u(W,X.iterator,te.arg);if("throw"===J.type)return te.method="throw",te.arg=J.arg,te.delegate=null,d;var H=J.arg;return H?H.done?(te[X.resultName]=H.value,te.next=X.nextLoc,"return"!==te.method&&(te.method="next",te.arg=void 0),te.delegate=null,d):H:(te.method="throw",te.arg=new TypeError("iterator result is not an object"),te.delegate=null,d)}function L(X){var te={tryLoc:X[0]};1 in X&&(te.catchLoc=X[1]),2 in X&&(te.finallyLoc=X[2],te.afterLoc=X[3]),this.tryEntries.push(te)}function z(X){var te=X.completion||{};te.type="normal",delete te.arg,X.completion=te}function R(X){this.tryEntries=[{tryLoc:"root"}],X.forEach(L,this),this.reset(!0)}function U(X){if(X){var te=X[o];if(te)return te.call(X);if("function"==typeof X.next)return X;if(!isNaN(X.length)){var P=-1,W=function J(){for(;++P=0;--W){var J=this.tryEntries[W],H=J.completion;if("root"===J.tryLoc)return P("end");if(J.tryLoc<=this.prev){var le=e.call(J,"catchLoc"),E=e.call(J,"finallyLoc");if(le&&E){if(this.prev=0;--P){var W=this.tryEntries[P];if(W.tryLoc<=this.prev&&e.call(W,"finallyLoc")&&this.prev=0;--te){var P=this.tryEntries[te];if(P.finallyLoc===X)return this.complete(P.completion,P.afterLoc),z(P),d}},catch:function(X){for(var te=this.tryEntries.length-1;te>=0;--te){var P=this.tryEntries[te];if(P.tryLoc===X){var W=P.completion;if("throw"===W.type){var J=W.arg;z(P)}return J}}throw new Error("illegal catch attempt")},delegateYield:function(X,te,P){return this.delegate={iterator:U(X),resultName:te,nextLoc:P},"next"===this.method&&(this.arg=void 0),d}},t}function aZ(t,n,e,i,r,o,s){try{var a=t[o](s),l=a.value}catch(c){return void e(c)}a.done?n(l):Promise.resolve(l).then(i,r)}function Ki(t){return function(){var n=this,e=arguments;return new Promise(function(i,r){var o=t.apply(n,e);function s(l){aZ(o,i,r,s,a,"next",l)}function a(l){aZ(o,i,r,s,a,"throw",l)}s(void 0)})}}function zn(t,n){return cZ(t)||function(e,i){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,s,a,l,c=[],u=!0,d=!1;try{if(a=(r=r.call(e)).next,0===i){if(Object(r)!==r)return;u=!1}else for(;!(u=(o=a.call(r)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,s=h}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}(t,n)||Q2(t,n)||lZ()}function lZ(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function cZ(t){if(Array.isArray(t))return t}function uZ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function Qe(t){for(var n=1;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Wi(t){return(Wi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}function Ce(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function hZ(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,i=new Array(n);e32){for(var n=[],e=t.ctx.length/32,i=0;i2&&void 0!==arguments[2]?arguments[2]:{},i=e.bubbles,r=void 0!==i&&i,o=e.cancelable,s=void 0!==o&&o,a=document.createEvent("CustomEvent");return a.initCustomEvent(t,r,s,n),a}function Xd(t,n){return new t(n)}var F_,eS=new Map,nN=0;function kZ(t,n,e,i,r,o,s){for(var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/i,c="{\n",u=0;u<=1;u+=l){var d=n+(e-n)*o(u);c+=100*u+"%{".concat(s(d,1-d),"}\n")}var h=c+"100% {".concat(s(e,1-e),"}\n}"),f="__svelte_".concat(function DHe(t){for(var n=5381,e=t.length;e--;)n=(n<<5)-n^t.charCodeAt(e);return n>>>0}(h),"_").concat(a),p=tN(t),m=eS.get(p)||function THe(t,n){var e={stylesheet:SHe(n),rules:{}};return eS.set(t,e),e}(p,t),g=m.stylesheet,v=m.rules;v[f]||(v[f]=!0,g.insertRule("@keyframes ".concat(f," ").concat(h),g.cssRules.length));var y=t.style.animation||"";return t.style.animation="".concat(y?"".concat(y,", "):"").concat(f," ").concat(i,"ms linear ").concat(r,"ms 1 both"),nN+=1,f}function P_(t){F_=t}function Xv(){if(!F_)throw new Error("Function called outside component initialization");return F_}function Yc(t){Xv().$$.on_mount.push(t)}function Hu(t){Xv().$$.on_destroy.push(t)}function DZ(){var t=Xv();return function(n,e){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,s=t.$$.callbacks[n];if(s){var a=SZ(n,e,{cancelable:void 0!==r&&r});return s.slice().forEach(function(l){l.call(t,a)}),!a.defaultPrevented}return!0}}function TZ(t,n){return Xv().$$.context.set(t,n),n}function _a(t){return Xv().$$.context.get(t)}function tS(t,n){var e=this,i=t.$$.callbacks[n.type];i&&i.slice().forEach(function(r){return r.call(e,n)})}var Jv=[],Hi=[],nS=[],iN=[],EZ=Promise.resolve(),rN=!1;function AZ(){rN||(rN=!0,EZ.then(MZ))}function zl(){return AZ(),EZ}function Lm(t){nS.push(t)}function Uu(t){iN.push(t)}var iS,oN=new Set,Kv=0;function MZ(){if(0===Kv){var t=F_;do{try{for(;Kvl.start&&(a=d(l,b),l=null,sN(t,a.b,"start"),z&&(u(),c=kZ(t,s,a.b,a.duration,0,k,o.css))),a&&(U>=a.end?(L(s=a.b,1-s),sN(t,a.b,"end"),l||(a.b?u():--a.group.r||so(a.group.c)),a=null):U>=a.start&&(s=a.a+a.d*k((U-a.start)/a.duration),L(s,1-s))),!(!a&&!l)},0===N_.size&&eN(bZ),new Promise(function(U){N_.add({c:p,f:U})}))}return{run:function(f){va(o)?(iS||(iS=Promise.resolve()).then(function(){iS=null}),iS).then(function(){o=o(r),h(f)}):h(f)},end:function(){u(),a=l=null}}}var aN=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function OHe(t,n){t.d(1),n.delete(t.key)}function lN(t,n){ae(t,1,1,function(){n.delete(t.key)})}function sS(t,n,e,i,r,o,s,a,l,c,u,d){for(var h=t.length,f=o.length,p=h,m={};p--;)m[t[p].key]=p;var g=[],v=new Map,y=new Map;for(p=f;p--;){var b=d(r,o,p),C=e(b),k=s.get(C);k?i&&k.p(b,n):(k=c(C,b)).c(),v.set(C,g[p]=k),C in m&&y.set(C,Math.abs(p-m[C]))}var D=new Set,L=new Set;function z(P){K(P,1),P.m(a,u),s.set(P.key,P),u=P.first,f--}for(;h&&f;){var R=g[f-1],U=t[h-1],G=R.key,X=U.key;R===U?(u=R.first,h--,f--):v.has(X)?!s.has(G)||D.has(G)?z(R):L.has(X)?h--:y.get(G)>y.get(X)?(L.add(G),z(R)):(D.add(X),h--):(l(U,s),h--)}for(;h--;){var te=t[h];v.has(te.key)||l(te,s)}for(;f;)z(g[f-1]);return g}function $m(t,n){for(var e={},i={},r={$$scope:1},o=t.length;o--;){var s=t[o],a=n[o];if(a){for(var l in s)l in a||(i[l]=1);for(var c in a)r[c]||(e[c]=a[c],r[c]=1);t[o]=a}else for(var u in s)r[u]=1}for(var d in i)d in e||(e[d]=void 0);return e}function aS(t){return"object"===gn(t)&&null!==t?t:{}}function zu(t,n,e){var i=t.$$.props[n];void 0!==i&&(t.$$.bound[i]=e,e(t.$$.ctx[i]))}function ft(t){t&&t.c()}function dt(t,n,e,i){var r=t.$$,o=r.fragment,s=r.after_update;o&&o.m(n,e),i||Lm(function(){var a,l=t.$$.on_mount.map(gZ).filter(va);t.$$.on_destroy?(a=t.$$.on_destroy).push.apply(a,ri(l)):so(l),t.$$.on_mount=[]}),s.forEach(Lm)}function ht(t,n){var e=t.$$;null!==e.fragment&&(so(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function Nn(t,n,e,i,r,o,s){var a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=F_;P_(t);var c=t.$$={fragment:null,ctx:[],props:o,update:jt,not_equal:r,bound:vZ(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:vZ(),dirty:a,skip_bound:!1,root:n.target||l.$$.root};s&&s(c.root);var u=!1;if(c.ctx=e?e(t,n.props||{},function(h,f){var p=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:f;return c.ctx&&r(c.ctx[h],c.ctx[h]=p)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](p),u&&function IHe(t,n){-1===t.$$.dirty[0]&&(Jv.push(t),AZ(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<1&&void 0!==arguments[1]?arguments[1]:!!function PHe(t){try{if(typeof window<"u"&&void 0!==window.localStorage)return window.localStorage[t]}catch{}}("debug");if(n){var e=function jHe(t){for(var n=0,e=0;e1&&void 0!==arguments[1]?arguments[1]:{},e=n.delay,i=void 0===e?0:e,r=n.duration,o=void 0===r?400:r,s=n.easing,a=void 0===s?mZ:s,l=+getComputedStyle(t).opacity;return{delay:i,duration:o,easing:a,css:function(c){return"opacity: ".concat(c*l)}}}var LHe=aN.window;function $He(t){di(t,"svelte-n7cvum",".svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}")}function IZ(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b=t[1].closeButton&&NZ(t),C=t[2];return C&&(s=Xd(C,{})),{c:function(){n=ve("div"),e=ve("div"),i=ve("div"),b&&b.c(),r=tt(),o=ve("div"),s&&ft(s.$$.fragment),j(o,"class",a=ko(t[1].classContent)+" svelte-n7cvum"),j(o,"style",t[9]),At(o,"content",!t[0]),j(i,"class",l=ko(t[1].classWindow)+" svelte-n7cvum"),j(i,"role","dialog"),j(i,"aria-modal","true"),j(i,"aria-label",c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null),j(i,"aria-labelledby",u=t[1].ariaLabelledBy||null),j(i,"style",t[8]),At(i,"window",!t[0]),j(e,"class",h=ko(t[1].classWindowWrap)+" svelte-n7cvum"),j(e,"style",t[7]),At(e,"wrap",!t[0]),j(n,"id",f=t[1].id),j(n,"class",p=ko(t[1].classBg)+" svelte-n7cvum"),j(n,"style",t[6]),At(n,"bg",!t[0])},m:function(k,D){Pe(k,n,D),ue(n,e),ue(e,i),b&&b.m(i,null),ue(i,r),ue(i,o),s&&dt(s,o,null),t[50](i),t[51](e),t[52](n),g=!0,v||(y=[It(i,"introstart",function(){va(t[13])&&t[13].apply(this,arguments)}),It(i,"outrostart",function(){va(t[14])&&t[14].apply(this,arguments)}),It(i,"introend",function(){va(t[15])&&t[15].apply(this,arguments)}),It(i,"outroend",function(){va(t[16])&&t[16].apply(this,arguments)}),It(n,"mousedown",t[20]),It(n,"mouseup",t[21])],v=!0)},p:function(k,D){if((t=k)[1].closeButton?b?(b.p(t,D),2&D[0]&&K(b,1)):((b=NZ(t)).c(),K(b,1),b.m(i,r)):b&&(Lt(),ae(b,1,1,function(){b=null}),$t()),C!==(C=t[2])){if(s){Lt();var L=s;ae(L.$$.fragment,1,0,function(){ht(L,1)}),$t()}C?(ft((s=Xd(C,{})).$$.fragment),K(s.$$.fragment,1),dt(s,o,null)):s=null}(!g||2&D[0]&&a!==(a=ko(t[1].classContent)+" svelte-n7cvum"))&&j(o,"class",a),(!g||512&D[0])&&j(o,"style",t[9]),(!g||3&D[0])&&At(o,"content",!t[0]),(!g||2&D[0]&&l!==(l=ko(t[1].classWindow)+" svelte-n7cvum"))&&j(i,"class",l),(!g||2&D[0]&&c!==(c=t[1].ariaLabelledBy?null:t[1].ariaLabel||null))&&j(i,"aria-label",c),(!g||2&D[0]&&u!==(u=t[1].ariaLabelledBy||null))&&j(i,"aria-labelledby",u),(!g||256&D[0])&&j(i,"style",t[8]),(!g||3&D[0])&&At(i,"window",!t[0]),(!g||2&D[0]&&h!==(h=ko(t[1].classWindowWrap)+" svelte-n7cvum"))&&j(e,"class",h),(!g||128&D[0])&&j(e,"style",t[7]),(!g||3&D[0])&&At(e,"wrap",!t[0]),(!g||2&D[0]&&f!==(f=t[1].id))&&j(n,"id",f),(!g||2&D[0]&&p!==(p=ko(t[1].classBg)+" svelte-n7cvum"))&&j(n,"class",p),(!g||64&D[0])&&j(n,"style",t[6]),(!g||3&D[0])&&At(n,"bg",!t[0])},i:function(k){g||(K(b),s&&K(s.$$.fragment,k),Lm(function(){d||(d=oS(i,t[12],t[1].transitionWindowProps,!0)),d.run(1)}),Lm(function(){m||(m=oS(n,t[11],t[1].transitionBgProps,!0)),m.run(1)}),g=!0)},o:function(k){ae(b),s&&ae(s.$$.fragment,k),d||(d=oS(i,t[12],t[1].transitionWindowProps,!1)),d.run(0),m||(m=oS(n,t[11],t[1].transitionBgProps,!1)),m.run(0),g=!1},d:function(k){k&&Fe(n),b&&b.d(),s&&ht(s),t[50](null),k&&d&&d.end(),t[51](null),t[52](null),k&&m&&m.end(),v=!1,so(y)}}}function NZ(t){var n,e,i,r,o,s=[VHe,BHe],a=[];function l(c,u){return 2&u[0]&&(n=null),null==n&&(n=!!c[17](c[1].closeButton)),n?0:1}return e=l(t,[-1,-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=br()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(Lt(),ae(a[d],1,1,function(){a[d]=null}),$t(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),K(i,1),i.m(r.parentNode,r))},i:function(c){o||(K(i),o=!0)},o:function(c){ae(i),o=!1},d:function(c){a[e].d(c),c&&Fe(r)}}}function BHe(t){var n,e,i,r;return{c:function(){j(n=ve("button"),"class",e=ko(t[1].classCloseButton)+" svelte-n7cvum"),j(n,"aria-label","Close modal"),j(n,"style",t[10]),j(n,"type","button"),At(n,"close",!t[0])},m:function(o,s){Pe(o,n,s),i||(r=It(n,"click",t[18]),i=!0)},p:function(o,s){2&s[0]&&e!==(e=ko(o[1].classCloseButton)+" svelte-n7cvum")&&j(n,"class",e),1024&s[0]&&j(n,"style",o[10]),3&s[0]&&At(n,"close",!o[0])},i:jt,o:jt,d:function(o){o&&Fe(n),i=!1,r()}}}function VHe(t){var n,e,i,r=t[1].closeButton;function o(s){return{props:{onClose:s[18]}}}return r&&(n=Xd(r,o(t))),{c:function(){n&&ft(n.$$.fragment),e=br()},m:function(s,a){n&&dt(n,s,a),Pe(s,e,a),i=!0},p:function(s,a){if(r!==(r=s[1].closeButton)){if(n){Lt();var l=n;ae(l.$$.fragment,1,0,function(){ht(l,1)}),$t()}r?(ft((n=Xd(r,o(s))).$$.fragment),K(n.$$.fragment,1),dt(n,e.parentNode,e)):n=null}},i:function(s){i||(n&&K(n.$$.fragment,s),i=!0)},o:function(s){n&&ae(n.$$.fragment,s),i=!1},d:function(s){s&&Fe(e),n&&ht(n,s)}}}function HHe(t){var n,e,i,r,o=t[2]&&IZ(t),s=t[49].default,a=Ss(s,t,t[48],null);return{c:function(){o&&o.c(),n=tt(),a&&a.c()},m:function(l,c){o&&o.m(l,c),Pe(l,n,c),a&&a.m(l,c),e=!0,i||(r=It(LHe,"keydown",t[19]),i=!0)},p:function(l,c){l[2]?o?(o.p(l,c),4&c[0]&&K(o,1)):((o=IZ(l)).c(),K(o,1),o.m(n.parentNode,n)):o&&(Lt(),ae(o,1,1,function(){o=null}),$t()),a&&a.p&&(!e||131072&c[1])&&Ds(a,s,l,l[48],e?ks(s,l[48],c,null):Ts(l[48]),null)},i:function(l){e||(K(o),K(a,l),e=!0)},o:function(l){ae(o),ae(a,l),e=!1},d:function(l){o&&o.d(l),l&&Fe(n),a&&a.d(l),i=!1,r()}}}function FZ(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return new t(Qe(Qe({},e),{},{props:Qe(Qe({},n),e.props)}))}}function UHe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y=n.$$slots,b=void 0===y?{}:y,C=n.$$scope,k=DZ(),L=n.isTabbable,z=void 0===L?function(Ue){return Ue.tabIndex>=0&&!Ue.hidden&&!Ue.disabled&&"none"!==Ue.style.display&&"hidden"!==Ue.type&&Boolean(Ue.offsetWidth||Ue.offsetHeight||Ue.getClientRects().length)}:L,R=n.show,U=void 0===R?null:R,G=n.id,X=void 0===G?null:G,te=n.key,P=void 0===te?"simple-modal":te,W=n.ariaLabel,J=void 0===W?null:W,H=n.ariaLabelledBy,le=void 0===H?null:H,E=n.closeButton,I=void 0===E||E,N=n.closeOnEsc,q=void 0===N||N,V=n.closeOnOuterClick,re=void 0===V||V,he=n.styleBg,Oe=void 0===he?{}:he,_e=n.styleWindowWrap,Xe=void 0===_e?{}:_e,Le=n.styleWindow,rt=void 0===Le?{}:Le,B=n.styleContent,ne=void 0===B?{}:B,ie=n.styleCloseButton,Me=void 0===ie?{}:ie,Ye=n.classBg,je=void 0===Ye?null:Ye,yt=n.classWindowWrap,Tt=void 0===yt?null:yt,fn=n.classWindow,Hn=void 0===fn?null:fn,Zt=n.classContent,Ei=void 0===Zt?null:Zt,ln=n.classCloseButton,ur=void 0===ln?null:ln,wr=n.unstyled,or=void 0!==wr&&wr,mr=n.setContext,gi=void 0===mr?TZ:mr,Vr=n.transitionBg,Oo=void 0===Vr?RHe:Vr,On=n.transitionBgProps,xt=void 0===On?{duration:250}:On,ai=n.transitionWindow,Ii=void 0===ai?Oo:ai,Cr=n.transitionWindowProps,vo=void 0===Cr?xt:Cr,qo=n.disableFocusTrap,pt=void 0!==qo&&qo,In={id:X,ariaLabel:J,ariaLabelledBy:le,closeButton:I,closeOnEsc:q,closeOnOuterClick:re,styleBg:Oe,styleWindowWrap:Xe,styleWindow:rt,styleContent:ne,styleCloseButton:Me,classBg:je,classWindowWrap:Tt,classWindow:Hn,classContent:Ei,classCloseButton:ur,transitionBg:Oo,transitionBgProps:xt,transitionWindow:Ii,transitionWindowProps:vo,disableFocusTrap:pt,isTabbable:z,unstyled:or},oi=Qe({},In),vi=null,Tr=function(Ue){return Ue?Object.keys(Ue).reduce(function(kn,ni){return"".concat(kn,"; ").concat((ci=ni,ci.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()),": ").concat(Ue[ni]);var ci},""):""},Hr=function(Ue){return!!(Ue&&Ue.constructor&&Ue.call&&Ue.apply)},no=function(){e(6,a=Tr(Object.assign({},{width:window.innerWidth,height:window.innerHeight},oi.styleBg))),e(7,l=Tr(oi.styleWindowWrap)),e(8,c=Tr(oi.styleWindow)),e(9,u=Tr(oi.styleContent)),e(10,d=Tr(oi.styleCloseButton)),e(11,h=oi.transitionBg),e(12,f=oi.transitionWindow)},Us=function(){},gr=Us,zs=Us,Wa=Us,qa=Us,Oc=function(Ue){var ni=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ci=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e(2,vi=FZ(Ue,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),e(1,oi=Qe(Qe({},In),ni)),no(),He(),e(13,gr=function(li){ci.onOpen&&ci.onOpen(li),k("open"),k("opening")}),e(14,zs=function(li){ci.onClose&&ci.onClose(li),k("close"),k("closing")}),e(15,Wa=function(li){ci.onOpened&&ci.onOpened(li),k("opened")}),e(16,qa=function(li){ci.onClosed&&ci.onClosed(li),k("closed")})},xe=function(){var Ue=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vi&&(e(14,zs=Ue.onClose||zs),e(16,qa=Ue.onClosed||qa),e(2,vi=null),We())},He=function(){s=window.scrollY,p=document.body.style.position,m=document.body.style.overflow,g=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(s,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},We=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=g||"",window.scrollTo({top:s,left:0,behavior:"instant"})};gi(P,{open:Oc,close:xe});var lt=!1;return Hu(function(){lt&&xe()}),Yc(function(){e(47,lt=!0)}),t.$$set=function(Ue){"isTabbable"in Ue&&e(22,z=Ue.isTabbable),"show"in Ue&&e(23,U=Ue.show),"id"in Ue&&e(24,X=Ue.id),"key"in Ue&&e(25,P=Ue.key),"ariaLabel"in Ue&&e(26,J=Ue.ariaLabel),"ariaLabelledBy"in Ue&&e(27,le=Ue.ariaLabelledBy),"closeButton"in Ue&&e(28,I=Ue.closeButton),"closeOnEsc"in Ue&&e(29,q=Ue.closeOnEsc),"closeOnOuterClick"in Ue&&e(30,re=Ue.closeOnOuterClick),"styleBg"in Ue&&e(31,Oe=Ue.styleBg),"styleWindowWrap"in Ue&&e(32,Xe=Ue.styleWindowWrap),"styleWindow"in Ue&&e(33,rt=Ue.styleWindow),"styleContent"in Ue&&e(34,ne=Ue.styleContent),"styleCloseButton"in Ue&&e(35,Me=Ue.styleCloseButton),"classBg"in Ue&&e(36,je=Ue.classBg),"classWindowWrap"in Ue&&e(37,Tt=Ue.classWindowWrap),"classWindow"in Ue&&e(38,Hn=Ue.classWindow),"classContent"in Ue&&e(39,Ei=Ue.classContent),"classCloseButton"in Ue&&e(40,ur=Ue.classCloseButton),"unstyled"in Ue&&e(0,or=Ue.unstyled),"setContext"in Ue&&e(41,gi=Ue.setContext),"transitionBg"in Ue&&e(42,Oo=Ue.transitionBg),"transitionBgProps"in Ue&&e(43,xt=Ue.transitionBgProps),"transitionWindow"in Ue&&e(44,Ii=Ue.transitionWindow),"transitionWindowProps"in Ue&&e(45,vo=Ue.transitionWindowProps),"disableFocusTrap"in Ue&&e(46,pt=Ue.disableFocusTrap),"$$scope"in Ue&&e(48,C=Ue.$$scope)},t.$$.update=function(){8388608&t.$$.dirty[0]|65536&t.$$.dirty[1]&<&&(Hr(U)?Oc(U):xe())},[or,oi,vi,i,r,o,a,l,c,u,d,h,f,gr,zs,Wa,qa,Hr,xe,function(Ue){if(oi.closeOnEsc&&vi&&"Escape"===Ue.key&&(Ue.preventDefault(),xe()),vi&&"Tab"===Ue.key&&!oi.disableFocusTrap){var kn=o.querySelectorAll("*"),ni=Array.from(kn).filter(oi.isTabbable).sort(function(li,Sr){return li.tabIndex-Sr.tabIndex}),ci=ni.indexOf(document.activeElement);-1===ci&&Ue.shiftKey&&(ci=0),ci+=ni.length+(Ue.shiftKey?-1:1),ni[ci%=ni.length].focus(),Ue.preventDefault()}},function(Ue){!oi.closeOnOuterClick||Ue.target!==i&&Ue.target!==r||(v=Ue.target)},function(Ue){oi.closeOnOuterClick&&Ue.target===v&&(Ue.preventDefault(),xe())},z,U,X,P,J,le,I,q,re,Oe,Xe,rt,ne,Me,je,Tt,Hn,Ei,ur,gi,Oo,xt,Ii,vo,pt,lt,C,b,function(Ue){Hi[Ue?"unshift":"push"](function(){e(5,o=Ue)})},function(Ue){Hi[Ue?"unshift":"push"](function(){e(4,r=Ue)})},function(Ue){Hi[Ue?"unshift":"push"](function(){e(3,i=Ue)})}]}var Lo,Zr,Gu,Jd,Wu,Xc,PZ=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,UHe,HHe,ps,{isTabbable:22,show:23,id:24,key:25,ariaLabel:26,ariaLabelledBy:27,closeButton:28,closeOnEsc:29,closeOnOuterClick:30,styleBg:31,styleWindowWrap:32,styleWindow:33,styleContent:34,styleCloseButton:35,classBg:36,classWindowWrap:37,classWindow:38,classContent:39,classCloseButton:40,unstyled:0,setContext:41,transitionBg:42,transitionBgProps:43,transitionWindow:44,transitionWindowProps:45,disableFocusTrap:46},$He,[-1,-1,-1]),r}return Se(e)}();(function(t){t.text="text",t.tree="tree",t.table="table"})(Lo||(Lo={})),function(t){t.after="after",t.inside="inside",t.key="key",t.value="value",t.multi="multi"}(Zr||(Zr={})),function(t){t.after="after",t.key="key",t.value="value",t.inside="inside"}(Gu||(Gu={})),function(t){t.info="info",t.warning="warning",t.error="error"}(Jd||(Jd={})),function(t){t.key="key",t.value="value"}(Wu||(Wu={})),function(t){t.asc="asc",t.desc="desc"}(Xc||(Xc={}));var Bm=[{start:0,end:100}],Vm={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-content"},zHe=Qe(Qe({},Vm),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),GHe=Qe(Qe({},Vm),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),jZ=Qe(Qe({},Vm),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),cN="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",uN="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",WHe="NO",dN="SELF",hN="NEXT_INSIDE",qHe=(Ul(KI={},Xc.asc,"ascending"),Ul(KI,Xc.desc,"descending"),KI),YHe=0;function j_(){return++YHe}function np(t){return(np="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function eo(t){return Array.isArray(t)}function Do(t){return null!==t&&"object"===np(t)&&t.constructor===Object}function RZ(t){return!(!t||"object"!==np(t))&&"add"===t.op}function LZ(t){return!(!t||"object"!==np(t))&&"remove"===t.op}function fN(t){return!(!t||"object"!==np(t))&&"replace"===t.op}function pN(t){return!(!t||"object"!==np(t))&&"copy"===t.op}function Qv(t){return!(!t||"object"!==np(t))&&"move"===t.op}function mN(t){return(mN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function XHe(t,n){return t===n}function $Z(t){return t.slice(0,t.length-1)}function BZ(t){return"object"===mN(t)&&null!==t}function R_(t){return(R_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function VZ(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),e.push.apply(e,i)}return e}function JHe(t,n,e){return r=function(o,s){if("object"!==R_(o)||null===o)return o;var a=o[Symbol.toPrimitive];if(void 0!==a){var l=a.call(o,"string");if("object"!==R_(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n),(n="symbol"===R_(r)?r:String(r))in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t;var r}function gN(t){if(eo(t)){var n=t.slice();return Object.getOwnPropertySymbols(t).forEach(function(i){n[i]=t[i]}),n}if(Do(t)){var e=function(i){for(var r=1;r3&&void 0!==arguments[3]&&arguments[3];if(0===n.length)return e;var r=n[0],o=qu(t?t[r]:void 0,n.slice(1),e,i);if(Do(t)||eo(t))return vN(t,r,o);if(i){var s=KHe.test(r)?[]:{};return s[r]=o,s}throw new Error("Path does not exist")}var KHe=/^\d+$/;function HZ(t,n,e){if(0===n.length)return e(t);if(!BZ(t))throw new Error("Path doesn't exist");var i=n[0];return vN(t,i,HZ(t[i],n.slice(1),e))}function yN(t,n){if(0===n.length)return t;if(!BZ(t))throw new Error("Path does not exist");if(1===n.length){var e=n[0];if(e in t){var i=gN(t);return eo(i)&&i.splice(parseInt(e),1),Do(i)&&delete i[e],i}return t}var r=n[0];return vN(t,r,yN(t[r],n.slice(1)))}function _N(t,n,e){var i=n.slice(0,n.length-1),r=n[n.length-1];return HZ(t,i,function(o){if(!Array.isArray(o))throw new TypeError("Array expected at path "+JSON.stringify(i));var s=gN(o);return s.splice(parseInt(r),0,e),s})}function Jc(t,n){return void 0!==t&&(0===n.length||null!==t&&Jc(t[n[0]],n.slice(1)))}function Yu(t){var n=t.split("/");return n.shift(),n.map(function(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")})}function an(t){return t.map(UZ).join("")}function UZ(t){return"/"+String(t).replace(/~/g,"~0").replace(/\//g,"~1")}function bN(t,n){return t+UZ(n)}function Zv(t,n){return t.startsWith(n)&&(t.length===n.length||"/"===t[n.length])}function Xu(t,n,e){for(var i=t,r=0;rt.length)&&(n=t.length);for(var e=0,i=new Array(n);e2&&void 0!==arguments[2]?arguments[2]:XHe;if(p.length=0?z=function(){var U="",G=!0;"-"==t[s]&&(U+=h()),U+="0"==t[s]?h():m(),"."==t[s]&&(U+=h()+m(),G=!1),"e"!=t[s]&&"E"!=t[s]||(U+=h(),"+"!=t[s]&&"-"!=t[s]||(U+=h()),U+=m(),G=!1);var X=+U;return a&&G&&(X>Number.MAX_SAFE_INTEGER||X="a"&&z<="f"?L+=z.charCodeAt()-aUe+10:z>="0"&&z<="9"?L+=+z:C()}return String.fromCharCode(L)}function m(){for(var D="";t[s]>="0"&&t[s]<="9";)D+=h();if(D.length)return D;k(),b()}function g(D,L){v(D,L,y())}function v(D,L,z){i[D]=i[D]||{},i[D][L]=z}function y(){return{line:r,column:o,pos:s}}function b(){throw new SyntaxError("Unexpected token "+t[s]+" in JSON at position "+s)}function C(){f(),b()}function k(){if(s>=t.length)throw new SyntaxError("Unexpected end of JSON input")}},lS.stringify=function(t,n,e){if(cS(t)){var i,r,o=0,s="object"==gn(e)?e.space:e;switch(gn(s)){case"number":var a=s>10?10:s<0?0:Math.floor(s);s=a&&y(a," "),i=a,r=a;break;case"string":s=s.slice(0,10),i=0,r=0;for(var l=0;l=0}var cUe=/"|\\/g,uUe=/[\b]/g,dUe=/\f/g,hUe=/\n/g,fUe=/\r/g,pUe=/\t/g;function uS(t){return'"'+(t=t.replace(cUe,"\\$&").replace(dUe,"\\f").replace(uUe,"\\b").replace(hUe,"\\n").replace(fUe,"\\r").replace(pUe,"\\t"))+'"'}var mUe=/~/g,gUe=/\//g;function CN(t){return t.replace(mUe,"~0").replace(gUe,"~1")}function SN(t){return(SN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function kN(t){var n="function"==typeof Map?new Map:void 0;return kN=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,r)}function r(){return DN(e,arguments,B_(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),$_(r,e)},kN(t)}function DN(t,n,e){return(DN=JZ()?Reflect.construct.bind():function(i,r,o){var s=[null];s.push.apply(s,r);var a=new(Function.bind.apply(i,s));return o&&$_(a,o.prototype),a}).apply(null,arguments)}function JZ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function $_(t,n){return($_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,i){return e.__proto__=i,e})(t,n)}function B_(t){return(B_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)})(t)}var ip=function(t){!function(l,c){if("function"!=typeof c&&null!==c)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(c&&c.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),c&&$_(l,c)}(a,kN(Error));var n,e,i,s=(n=a,e=JZ(),function(){var l,c=B_(n);if(e){var u=B_(this).constructor;l=Reflect.construct(c,arguments,u)}else l=c.apply(this,arguments);return function vUe(t,n){if(n&&("object"===SN(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(this,l)});function a(l,c){var u;return function(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),(u=s.call(this,l+" at position "+c)).position=c,u}return i=a,Object.defineProperty(i,"prototype",{writable:!1}),i}();function dS(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function hS(t){return t>=48&&t<=57}function yUe(t){return t>=32&&t<=1114111}var _Ue=/^[,:[\]{}()\n]$/;function KZ(t){return bUe.test(t)||t&&pS(t.charCodeAt(0))}var bUe=/^[[{\w-]$/;function xUe(t){return 10===t||13===t||9===t||8===t||12===t}function fS(t){return 32===t||10===t||9===t||13===t}function wUe(t){return 160===t||t>=8192&&t<=8202||8239===t||8287===t||12288===t}function pS(t){return QZ(t)||TN(t)}function QZ(t){return 34===t||8220===t||8221===t}function TN(t){return 39===t||8216===t||8217===t||96===t||180===t}function V_(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.lastIndexOf(n);return-1!==i?t.substring(0,i)+(e?"":t.substring(i+1)):t}function Hm(t,n){var e=t.length;if(!fS(t.charCodeAt(e-1)))return t+n;for(;fS(t.charCodeAt(e-1));)e--;return t.substring(0,e)+n+t.substring(e)}function CUe(t,n,e){return t.substring(0,n)+t.substring(n+e)}var SUe={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},kUe={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function Kd(t){var n=0,e="";r()||function(){throw new ip("Unexpected end of json string",t.length)}();var i=l(44);if(i&&o(),KZ(t[n])&&/[,\n][ \t\r]*$/.test(e)?(i||(e=Hm(e,",")),function(){for(var b=!0,C=!0;C;)b?b=!1:l(44)||(e=Hm(e,",")),C=r();C||(e=V_(e,",")),e="[\n".concat(e,"\n]")}()):i&&(e=V_(e,",")),n>=t.length)return e;function r(){o();var b=function(){if(123===t.charCodeAt(n)){e+="{",n++,o();for(var C=!0;n=49&&k<=57)for(n++;hS(t.charCodeAt(n));)n++;if(46===t.charCodeAt(n))for(n++,f(C);hS(t.charCodeAt(n));)n++;if(101===t.charCodeAt(n)||69===t.charCodeAt(n))for(n++,45!==t.charCodeAt(n)&&43!==t.charCodeAt(n)||n++,f(C);hS(t.charCodeAt(n));)n++;return n>C&&(e+=t.slice(C,n),!0)}()||d("true","true")||d("false","false")||d("null","null")||d("True","true")||d("False","false")||d("None","null")||h();return o(),b}function o(){var b=n,C=s();do{(C=a())&&(C=s())}while(C);return n>b}function s(){for(var b,C="";(b=fS(t.charCodeAt(n)))||wUe(t.charCodeAt(n));)C+=b?t[n]:" ",n++;return C.length>0&&(e+=C,!0)}function a(){if(47===t.charCodeAt(n)&&42===t.charCodeAt(n+1)){for(;nC){if(40===t.charCodeAt(n))return n++,r(),41===t.charCodeAt(n)&&(n++,59===t.charCodeAt(n)&&n++),!0;for(;fS(t.charCodeAt(n-1))&&n>0;)n--;var k=t.slice(C,n);return e+=JSON.stringify(k),!0}}function f(b){if(!hS(t.charCodeAt(n))){var C=t.slice(b,n);throw new ip("Invalid number '".concat(C,"', expecting a digit ").concat(t[n]?"but got '".concat(t[n],"'"):"but reached end of input"),2)}}function p(b){throw new ip("Invalid character "+JSON.stringify(b),n)}function m(){throw new ip("Object key expected",n)}function g(){throw new ip("Object value expected",n)}function v(){throw new ip("Colon expected",n)}function y(b){for(var C=b+2;/\w/.test(t[C]);)C++;var k=t.slice(b,C);throw new ip('Invalid unicode character "'.concat(k,'"'),n)}!function(){throw new ip("Unexpected character "+JSON.stringify(t[n]),n)}()}function DUe(t,n){return"*"===t[n]&&"/"===t[n+1]}function Bs(t){return parseInt(t,10)}function EN(t){return TUe.test(t)}var TUe=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function To(t){return"object"===gn(t)&&null!==t&&t.constructor===Object}function $o(t){return"object"===gn(t)&&null!==t&&(t.constructor===Object||t.constructor===Array)}function AN(t){if("number"==typeof t)return t>9466848e5&&isFinite(t)&&Math.floor(t)===t&&!isNaN(new Date(t).valueOf());if("bigint"==typeof t)return AN(Number(t));try{var n=t&&t.valueOf();if(n!==t)return AN(n)}catch{return!1}return!1}function ZZ(t){var n=window.document.createElement("div");n.style.color=t;var e=n.style.color;return""!==e?e.replace(/\s+/g,"").toLowerCase():null}function MN(t,n){if("number"==typeof t||"string"==typeof t||"boolean"==typeof t||void 0===t)return gn(t);if("bigint"==typeof t)return"number";if(null===t)return"null";if(Array.isArray(t))return"array";if(To(t))return"object";var e=n.stringify(t);return e&&EN(e)?"number":"true"===e||"false"===e?"boolean":"null"===e?"null":"unknown"}var EUe=/^https?:\/\/\S+$/;function mS(t){return"string"==typeof t&&EUe.test(t)}function e0(t,n){if(""===t)return"";var e=t.trim();return"null"===e?null:"true"===e||"false"!==e&&(EN(e)?n.parse(e):t)}var AUe=/^-?[0-9]+$/,tee="object"==(typeof global>"u"?"undefined":gn(global))&&global&&global.Object===Object&&global,MUe="object"==(typeof self>"u"?"undefined":gn(self))&&self&&self.Object===Object&&self,xa=tee||MUe||Function("return this")(),il=xa.Symbol,nee=Object.prototype,OUe=nee.hasOwnProperty,IUe=nee.toString,H_=il?il.toStringTag:void 0,NUe=Object.prototype.toString,iee=il?il.toStringTag:void 0;function bl(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":iee&&iee in Object(t)?function(n){var e=OUe.call(n,H_),i=n[H_];try{n[H_]=void 0;var r=!0}catch{}var o=IUe.call(n);return r&&(e?n[H_]=i:delete n[H_]),o}(t):NUe.call(t)}function ns(t){return null!=t&&"object"==gn(t)}function Gl(t){return"symbol"==gn(t)||ns(t)&&"[object Symbol]"==bl(t)}function ree(t){return"number"==typeof t?t:Gl(t)?NaN:+t}function Wo(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}var bee=_ee(pee),nze=/\{\n\/\* \[wrapped with (.+)\] \*/,ize=/,? & /,rze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function xS(t){return function(){return t}}var oze=function(){try{var t=zm(Object,"defineProperty");return t({},"",{}),t}catch{}}(),wS=oze,sze=wS?function(t,n){return wS(t,"toString",{configurable:!0,enumerable:!1,value:xS(n),writable:!0})}:rl,NN=_ee(sze);function Qc(t,n){for(var e=-1,i=null==t?0:t.length;++e-1}var aze=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];function wee(t,n,e){var o,i=n+"";return NN(t,function(r,o){var s=o.length;if(!s)return r;var a=s-1;return o[a]=(s>1?"& ":"")+o[a],o=o.join(s>2?", ":" "),r.replace(rze,"{\n/* [wrapped with "+o+"] */\n")}(i,function(r,o){return Qc(aze,function(s){var a="_."+s[0];o&s[1]&&!SS(r,a)&&r.push(a)}),r.sort()}((o=i.match(nze))?o[1].split(ize):[],e)))}function Cee(t,n,e,i,r,o,s,a,l,c){var u=8&n;n|=u?32:64,4&(n&=~(u?64:32))||(n&=-4);var d=[t,n,r,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,l,c],h=e.apply(void 0,d);return IN(t)&&bee(h,d),h.placeholder=i,wee(h,t,n)}function o0(t){return t.placeholder}var lze=/^(?:0|[1-9]\d*)$/;function af(t,n){var e=gn(t);return!!(n=n??9007199254740991)&&("number"==e||"symbol"!=e&&lze.test(t))&&t>-1&&t%1==0&&t1&&y.reverse(),u&&l-1&&t%1==0&&t<=9007199254740991}function xl(t){return null!=t&&W_(t.length)&&!Zd(t)}function wl(t,n,e){if(!Bo(e))return!1;var i=gn(n);return!!("number"==i?xl(e)&&af(n,e.length):"string"==i&&n in e)&&Zc(e[n],t)}function s0(t){return lr(function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,s=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&wl(e[0],e[1],s)&&(o=r<3?void 0:o,r=1),n=Object(n);++i"u"?"undefined":gn(exports))&&exports&&!exports.nodeType&&exports,Mee=Aee&&"object"==(typeof module>"u"?"undefined":gn(module))&&module&&!module.nodeType&&module,Oee=Mee&&Mee.exports===Aee?xa.Buffer:void 0,uf=(Oee?Oee.isBuffer:void 0)||DS,Vo={};function Cc(t){return function(n){return t(n)}}Vo["[object Float32Array]"]=Vo["[object Float64Array]"]=Vo["[object Int8Array]"]=Vo["[object Int16Array]"]=Vo["[object Int32Array]"]=Vo["[object Uint8Array]"]=Vo["[object Uint8ClampedArray]"]=Vo["[object Uint16Array]"]=Vo["[object Uint32Array]"]=!0,Vo["[object Arguments]"]=Vo["[object Array]"]=Vo["[object ArrayBuffer]"]=Vo["[object Boolean]"]=Vo["[object DataView]"]=Vo["[object Date]"]=Vo["[object Error]"]=Vo["[object Function]"]=Vo["[object Map]"]=Vo["[object Number]"]=Vo["[object Object]"]=Vo["[object RegExp]"]=Vo["[object Set]"]=Vo["[object String]"]=Vo["[object WeakMap]"]=!1;var Iee="object"==(typeof exports>"u"?"undefined":gn(exports))&&exports&&!exports.nodeType&&exports,Y_=Iee&&"object"==(typeof module>"u"?"undefined":gn(module))&&module&&!module.nodeType&&module,jN=Y_&&Y_.exports===Iee&&tee.process,eu=function(){try{return Y_&&Y_.require&&Y_.require("util").types||jN&&jN.binding&&jN.binding("util")}catch{}}(),Nee=eu&&eu.isTypedArray,Gm=Nee?Cc(Nee):function(t){return ns(t)&&W_(t.length)&&!!Vo[bl(t)]},vze=Object.prototype.hasOwnProperty;function Fee(t,n){var e=ji(t),i=!e&&op(t),r=!e&&!i&&uf(t),o=!e&&!i&&!r&&Gm(t),s=e||i||r||o,a=s?PN(t.length,String):[],l=a.length;for(var c in t)!n&&!vze.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||af(c,l))||a.push(c);return a}function Pee(t,n){return function(e){return t(n(e))}}var yze=Pee(Object.keys,Object),_ze=Object.prototype.hasOwnProperty;function RN(t){if(!q_(t))return yze(t);var n=[];for(var e in Object(t))_ze.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Vs(t){return xl(t)?Fee(t):RN(t)}var bze=Object.prototype.hasOwnProperty,xze=s0(function(t,n){if(q_(n)||xl(n))eh(n,Vs(n),t);else for(var e in n)bze.call(n,e)&&G_(t,e,n[e])}),jee=xze,wze=Object.prototype.hasOwnProperty;function Cl(t){return xl(t)?Fee(t,!0):function Cze(t){if(!Bo(t))return function(r){var o=[];if(null!=r)for(var s in Object(r))o.push(s);return o}(t);var n=q_(t),e=[];for(var i in t)("constructor"!=i||!n&&wze.call(t,i))&&e.push(i);return e}(t)}var Sze=s0(function(t,n){eh(n,Cl(n),t)}),TS=Sze,kze=s0(function(t,n,e,i){eh(n,Cl(n),t,i)}),a0=kze,Dze=s0(function(t,n,e,i){eh(n,Vs(n),t,i)}),Ree=Dze,Tze=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eze=/^\w*$/;function LN(t,n){if(ji(t))return!1;var e=gn(t);return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!Gl(t))||Eze.test(t)||!Tze.test(t)||null!=n&&t in Object(n)}var X_=zm(Object,"create"),Aze=Object.prototype.hasOwnProperty,Mze=Object.prototype.hasOwnProperty;function Wm(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1},df.prototype.set=function(t,n){var e=this.__data__,i=ES(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this};var J_=zm(xa,"Map");function AS(t,n){var i,r,e=t.__data__;return("string"==(r=gn(i=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==i:null===i)?e["string"==typeof n?"string":"hash"]:e.map}function hf(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n0&&e(a)?n>1?La(a,n-1,e,i,r):ap(r,a):i||(r[r.length]=a)}return r}function BN(t){return null!=t&&t.length?La(t,1):[]}function ff(t){return NN(Dee(t,void 0,BN),t+"")}var Bee=ff($N),OS=Pee(Object.getPrototypeOf,Object),Vee=Function.prototype.toString,Lze=Object.prototype.hasOwnProperty,$ze=Vee.call(Object);function c0(t){if(!ns(t)||"[object Object]"!=bl(t))return!1;var n=OS(t);if(null===n)return!0;var e=Lze.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Vee.call(e)==$ze}function IS(t){if(!ns(t))return!1;var n=bl(t);return"[object Error]"==n||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!c0(t)}var Bze=lr(function(t,n){try{return wc(t,void 0,n)}catch(e){return IS(e)?e:new Error(e)}}),VN=Bze;function HN(t,n){var e;if("function"!=typeof n)throw new TypeError("Expected a function");return t=Gi(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var UN=lr(function(t,n,e){var i=1;if(e.length){var r=rp(e,o0(UN));i|=32}return lf(t,i,n,e,r)});UN.placeholder={};var zN=UN,Vze=ff(function(t,n){return Qc(n,function(e){e=th(e),cf(t,e,zN(t[e],t))}),t}),Hee=Vze,GN=lr(function(t,n,e){var i=3;if(e.length){var r=rp(e,o0(GN));i|=32}return lf(n,i,t,e,r)});GN.placeholder={};var Uee=GN;function tu(t,n,e){var i=-1,r=t.length;n<0&&(n=-n>r?0:r+n),(e=e>r?r:e)<0&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i=i?t:tu(t,n,e)}var Hze=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function u0(t){return Hze.test(t)}var WN="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",qN="\\ud83c[\\udffb-\\udfff]",zee="[^\\ud800-\\udfff]",Gee="(?:\\ud83c[\\udde6-\\uddff]){2}",Wee="[\\ud800-\\udbff][\\udc00-\\udfff]",qee="(?:"+WN+"|"+qN+")?",zze="[\\ufe0e\\ufe0f]?"+qee+"(?:\\u200d(?:"+[zee,Gee,Wee].join("|")+")[\\ufe0e\\ufe0f]?"+qee+")*",Gze="(?:"+[zee+WN+"?",WN,Gee,Wee,"[\\ud800-\\udfff]"].join("|")+")",Wze=RegExp(qN+"(?="+qN+")|"+Gze+zze,"g");function Ku(t){return u0(t)?function(n){return n.match(Wze)||[]}(t):function(n){return n.split("")}(t)}function Yee(t){return function(n){var e=u0(n=Gr(n))?Ku(n):void 0,i=e?e[0]:n.charAt(0),r=e?lp(e,1).join(""):n.slice(1);return i[t]()+r}}var NS=Yee("toUpperCase");function YN(t){return NS(Gr(t).toLowerCase())}function XN(t,n,e,i){var r=-1,o=null==t?0:t.length;for(i&&o&&(e=t[++r]);++r=n?t:n)),t}function lte(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=xc(e))==e?e:0),void 0!==n&&(n=(n=xc(n))==n?n:0),Ym(xc(t),n,e)}function Qu(t){var n=this.__data__=new df(t);this.size=n.size}function cte(t,n){return t&&eh(n,Vs(n),t)}Qu.prototype.clear=function(){this.__data__=new df,this.size=0},Qu.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Qu.prototype.get=function(t){return this.__data__.get(t)},Qu.prototype.has=function(t){return this.__data__.has(t)},Qu.prototype.set=function(t,n){var e=this.__data__;if(e instanceof df){var i=e.__data__;if(!J_||i.length<199)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new hf(i)}return e.set(t,n),this.size=e.size,this};var ute="object"==(typeof exports>"u"?"undefined":gn(exports))&&exports&&!exports.nodeType&&exports,dte=ute&&"object"==(typeof module>"u"?"undefined":gn(module))&&module&&!module.nodeType&&module,hte=dte&&dte.exports===ute?xa.Buffer:void 0,fte=hte?hte.allocUnsafe:void 0;function pte(t,n){if(n)return t.slice();var e=t.length,i=fte?fte(e):new t.constructor(e);return t.copy(i),i}function cp(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++ea))return!1;var c=o.get(t),u=o.get(n);if(c&&u)return c==n&&u==t;var d=-1,h=!0,f=2&e?new Jm:void 0;for(o.set(t,n),o.set(n,t);++d=n||C<0||d&&b-c>=o}function g(){var C,k,b=Z_();if(m(b))return v(b);a=setTimeout(g,(k=n-((C=b)-l),d?EGe(k,o-(C-c)):k))}function v(b){return a=void 0,h&&i?f(b):(i=r=void 0,s)}function y(){var b=Z_(),C=m(b);if(i=arguments,r=this,l=b,C){if(void 0===a)return function p(b){return c=b,a=setTimeout(g,n),u?f(b):s}(l);if(d)return clearTimeout(a),a=setTimeout(g,n),f(l)}return void 0===a&&(a=setTimeout(g,n)),s}return n=xc(n)||0,Bo(e)&&(u=!!e.leading,o=(d="maxWait"in e)?TGe(xc(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),c=0,i=l=r=a=void 0},y.flush=function(){return void 0===a?s:v(Z_())},y}function Gte(t,n){return null==t||t!=t?n:t}var Wte=Object.prototype,AGe=Wte.hasOwnProperty,MGe=lr(function(t,n){t=Object(t);var e=-1,i=n.length,r=i>2?n[2]:void 0;for(r&&wl(n[0],n[1],r)&&(i=1);++e=200&&(o=K_,s=!1,n=new Jm(n));e:for(;++r=0&&t.slice(e,r)==n}function une(t){return function(n){var i,r,o,e=nh(n);return"[object Map]"==e?hF(n):"[object Set]"==e?(i=n,r=-1,o=Array(i.size),i.forEach(function(s){o[++r]=[s,s]}),o):function(i,r){return Wo(r,function(o){return[o,i[o]]})}(n,t(n))}}var GS=une(Vs),WS=une(Cl),LGe=JN({"&":"&","<":"<",">":">",'"':""","'":"'"}),dne=/[&<>"']/g,$Ge=RegExp(dne.source);function kF(t){return(t=Gr(t))&&$Ge.test(t)?t.replace(dne,LGe):t}var hne=/[\\^$.*+?()[\]{}|]/g,BGe=RegExp(hne.source);function fne(t){return(t=Gr(t))&&BGe.test(t)?t.replace(hne,"\\$&"):t}function pne(t,n){for(var e=-1,i=null==t?0:t.length;++ec?0:c+a),(l=void 0===l||l>c?c:Gi(l))<0&&(l+=c),l=a>l?0:DF(l);a-1?r[o?n[s]:s]:void 0}}var HGe=Math.max;function TF(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Gi(e);return r<0&&(r=HGe(i+r,0)),CS(t,Ri(n),r)}var bne=_ne(TF);function xne(t,n,e){var i;return e(t,function(r,o,s){if(n(r,o,s))return i=o,!1}),i}function wne(t,n){return xne(t,Ri(n),ih)}var UGe=Math.max,zGe=Math.min;function EF(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i-1;return void 0!==e&&(r=Gi(e),r=e<0?UGe(i+r,0):zGe(r,i-1)),CS(t,Ri(n),r,!0)}var Cne=_ne(EF);function Sne(t,n){return xne(t,Ri(n),SF)}function ia(t){return t&&t.length?t[0]:void 0}function kne(t,n){var e=-1,i=xl(t)?Array(t.length):[];return up(t,function(r,o,s){i[++e]=n(r,o,s)}),i}function m0(t,n){return(ji(t)?Wo:kne)(t,Ri(n))}function Dne(t,n){return La(m0(t,n),1)}function Tne(t,n){return La(m0(t,n),1/0)}function Ene(t,n,e){return e=void 0===e?1:Gi(e),La(m0(t,n),e)}function Ane(t){return null!=t&&t.length?La(t,1/0):[]}function Mne(t,n){return null!=t&&t.length?La(t,n=void 0===n?1:Gi(n)):[]}function One(t){return lf(t,512)}var Ine=ZN("floor");function Nne(t){return ff(function(n){var e=n.length,i=e,r=Kc.prototype.thru;for(t&&n.reverse();i--;){var o=n[i];if("function"!=typeof o)throw new TypeError("Expected a function");if(r&&!s&&"wrapper"==bS(o))var s=new Kc([],!0)}for(i=s?i:e;++in}function YS(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=xc(n),e=xc(e)),t(n,e)}}var Une=YS(AF),zne=YS(function(t,n){return t>=n}),qGe=Object.prototype.hasOwnProperty;function YGe(t,n){return null!=t&&qGe.call(t,n)}function Gne(t,n){return null!=t&&Pte(t,n,YGe)}var XGe=Math.max,JGe=Math.min;function Wne(t,n,e){return n=Qd(n),void 0===e?(e=n,n=0):e=Qd(e),(i=t=xc(t))>=JGe(r=n,o=e)&&i-1:!!r&&r0(t,n,e)>-1}var QGe=Math.max;function Yne(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=null==e?0:Gi(e);return r<0&&(r=QGe(i+r,0)),r0(t,n,r)}function qi(t){return null!=t&&t.length?tu(t,0,-1):[]}var ZGe=Math.min;function OF(t,n,e){for(var i=e?CF:SS,r=t[0].length,o=t.length,s=o,a=Array(o),l=1/0,c=[];s--;){var u=t[s];s&&n&&(u=Wo(u,Cc(n))),l=ZGe(u.length,l),a[s]=!e&&(n||r>=120&&u.length>=120)?new Jm(s&&u):void 0}u=t[0];var d=-1,h=a[0];e:for(;++d=-9007199254740991&&t<=9007199254740991}function xie(t){return void 0===t}function wie(t){return ns(t)&&"[object WeakMap]"==nh(t)}function Cie(t){return ns(t)&&"[object WeakSet]"==bl(t)}function Sie(t){return Ri("function"==typeof t?t:nu(t,1))}var uWe=Array.prototype.join;function kie(t,n){return null==t?"":uWe.call(t,n)}var dWe=h0(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Die=dWe,hWe=$S(function(t,n,e){cf(t,e,n)}),Tie=hWe,fWe=Math.max,pWe=Math.min;function Eie(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var r=i;return void 0!==e&&(r=(r=Gi(e))<0?fWe(i+r,0):pWe(r,i-1)),n==n?function(o,s,a){for(var l=a+1;l--;)if(o[l]===s)return l;return l}(t,n,r):CS(t,xee,r,!0)}var mWe=h0(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),Aie=mWe,Mie=Yee("toLowerCase");function PF(t,n){return t=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}}function Wie(t,n){var e=t.length;if(e)return af(n+=n<0?e:0,e)?t[n]:void 0}function qie(t,n){return t&&t.length?Wie(t,Gi(n)):void 0}function Yie(t){return t=Gi(t),lr(function(n){return Wie(n,t)})}function HF(t,n){return null==(t=nie(t,n=sp(n,t)))||delete t[th(Fn(n))]}function _We(t){return c0(t)?void 0:t}var bWe=ff(function(t,n){var e={};if(null==t)return e;var i=!1;n=Wo(n,function(o){return o=sp(o,t),i||(i=o.length>1),o}),eh(t,iF(t),e),i&&(e=nu(e,7,_We));for(var r=n.length;r--;)HF(e,n[r]);return e}),Xie=bWe;function rb(t,n,e,i){if(!Bo(t))return t;for(var r=-1,o=(n=sp(n,t)).length,s=o-1,a=t;null!=a&&++rn||o&&s&&l&&!a&&!c||i&&s&&l||!e&&l||!r)return 1;if(!i&&!o&&!c&&t=p?m:m*("desc"==c[u]?-1:1)}return a.index-l.index}(o,s,e)});a--;)o[a]=o[a].value;return o}(kne(t,function(o,s,a){return{criteria:Wo(n,function(c){return c(o)}),index:++i,value:o}}))}function tre(t,n,e,i){return null==t?[]:(ji(n)||(n=null==n?[]:[n]),ji(e=i?void 0:e)||(e=null==e?[]:[e]),ere(t,n,e))}function zF(t){return ff(function(n){return n=Wo(n,Cc(Ri)),lr(function(e){var i=this;return t(n,function(r){return wc(r,i,e)})})})}var nre=zF(Wo),wWe=Math.min,CWe=lr(function(t,n){var e=(n=1==n.length&&ji(n[0])?Wo(n[0],Cc(Ri)):Wo(La(n,1),Cc(Ri))).length;return lr(function(i){for(var r=-1,o=wWe(i.length,e);++r9007199254740991)return e;do{n%2&&(e+=t),(n=SWe(n/2))&&(t+=t)}while(n);return e}var kWe=gF("length"),WF="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",qF="\\ud83c[\\udffb-\\udfff]",sre="[^\\ud800-\\udfff]",are="(?:\\ud83c[\\udde6-\\uddff]){2}",lre="[\\ud800-\\udbff][\\udc00-\\udfff]",cre="(?:"+WF+"|"+qF+")?",TWe="[\\ufe0e\\ufe0f]?"+cre+"(?:\\u200d(?:"+[sre,are,lre].join("|")+")[\\ufe0e\\ufe0f]?"+cre+")*",EWe="(?:"+[sre+WF+"?",WF,are,lre,"[\\ud800-\\udfff]"].join("|")+")",ure=RegExp(qF+"(?="+qF+")|"+EWe+TWe,"g");function _0(t){return u0(t)?function(n){for(var e=ure.lastIndex=0;ure.test(n);)++e;return e}(t):kWe(t)}var AWe=Math.ceil;function KS(t,n){var e=(n=void 0===n?" ":bc(n)).length;if(e<2)return e?GF(n,t):n;var i=GF(n,AWe(t/_0(n)));return u0(n)?lp(Ku(i),0,t).join(""):i.slice(0,t)}var MWe=Math.ceil,OWe=Math.floor;function dre(t,n,e){t=Gr(t);var i=(n=Gi(n))?_0(t):0;if(!n||i>=n)return t;var r=(n-i)/2;return KS(OWe(r),e)+t+KS(MWe(r),e)}function hre(t,n,e){t=Gr(t);var i=(n=Gi(n))?_0(t):0;return n&&i-1;)a!==t&&yre.call(a,l,1),yre.call(t,l,1);return t}function eP(t,n){return t&&t.length&&n&&n.length?ZF(t,n):t}var _re=lr(eP);function bre(t,n,e){return t&&t.length&&n&&n.length?ZF(t,n,Ri(e)):t}function xre(t,n,e){return t&&t.length&&n&&n.length?ZF(t,n,void 0,e):t}var RWe=Array.prototype.splice;function wre(t,n){for(var e=t?n.length:0,i=e-1;e--;){var r=n[e];if(e==i||r!==o){var o=r;af(r)?RWe.call(t,r,1):HF(t,r)}}return t}var LWe=ff(function(t,n){var e=null==t?0:t.length,i=$N(t,n);return wre(t,Wo(n,function(r){return af(r,e)?+r:r}).sort(Zie)),i}),Cre=LWe,$We=Math.floor,BWe=Math.random;function tP(t,n){return t+$We(BWe()*(n-t+1))}var VWe=parseFloat,HWe=Math.min,UWe=Math.random;function Sre(t,n,e){if(e&&"boolean"!=typeof e&&wl(t,n,e)&&(n=e=void 0),void 0===e&&("boolean"==typeof n?(e=n,n=void 0):"boolean"==typeof t&&(e=t,t=void 0)),void 0===t&&void 0===n?(t=0,n=1):(t=Qd(t),void 0===n?(n=t,t=0):n=Qd(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var r=UWe();return HWe(t+r*(n-t+VWe("1e-"+((r+"").length-1))),n)}return tP(t,n)}var zWe=Math.ceil,GWe=Math.max;function kre(t){return function(n,e,i){return i&&"number"!=typeof i&&wl(n,e,i)&&(e=i=void 0),n=Qd(n),void 0===e?(e=n,n=0):e=Qd(e),function(r,o,s,a){for(var l=-1,c=GWe(zWe((o-r)/(s||1)),0),u=Array(c);c--;)u[a?c:++l]=r,r+=s;return u}(n,e,i=void 0===i?n1&&wl(t,n[0],n[1])?n=[]:e>2&&wl(n[0],n[1],n[2])&&(n=[n[0]]),ere(t,La(n,1),[])}),iP=nqe,iqe=Math.floor,rqe=Math.min;function rP(t,n,e,i){var r=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(n=e(n))!=n,a=null===n,l=Gl(n),c=void 0===n;r>>1,s=t[o];null!==s&&!Gl(s)&&(e?s<=n:s>>0)?(t=Gr(t))&&("string"==typeof n||null!=n&&!XS(n))&&!(n=bc(n))&&u0(t)?lp(Ku(t),0,e):t.split(n,e):[]}var oqe=Math.max;function roe(t,n){if("function"!=typeof t)throw new TypeError("Expected a function");return n=null==n?0:oqe(Gi(n),0),lr(function(e){var i=e[n],r=lp(e,0,n);return i&&ap(r,i),wc(t,this,r)})}var sqe=h0(function(t,n,e){return t+(e?" ":"")+NS(n)}),ooe=sqe;function soe(t,n,e){return t=Gr(t),e=null==e?0:Ym(Gi(e),0,t.length),n=bc(n),t.slice(e,e+n.length)==n}function aoe(){return{}}function loe(){return""}function coe(){return!0}var uoe=gS(function(t,n){return t-n},0);function doe(t){return t&&t.length?RF(t,rl):0}function hoe(t,n){return t&&t.length?RF(t,Ri(n)):0}function foe(t){var n=null==t?0:t.length;return n?tu(t,1,n):[]}function poe(t,n,e){return t&&t.length?tu(t,0,(n=e||void 0===n?1:Gi(n))<0?0:n):[]}function moe(t,n,e){var i=null==t?0:t.length;return i?tu(t,(n=i-(n=e||void 0===n?1:Gi(n)))<0?0:n,i):[]}function goe(t,n){return t&&t.length?US(t,Ri(n),!1,!0):[]}function voe(t,n){return t&&t.length?US(t,Ri(n)):[]}function yoe(t,n){return n(t),t}var _oe=Object.prototype,aqe=_oe.hasOwnProperty;function boe(t,n,e,i){return void 0===t||Zc(t,_oe[e])&&!aqe.call(i,e)?n:t}var lqe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function cqe(t){return"\\"+lqe[t]}var xoe=/<%=([\s\S]+?)%>/g,tk={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:xoe,variable:"",imports:{_:{escape:kF}}},uqe=/\b__p \+= '';/g,dqe=/\b(__p \+=) '' \+/g,hqe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fqe=/[()=,{}\[\]\/\s]/,pqe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,nk=/($^)/,mqe=/['\n\r\u2028\u2029\\]/g,woe=Object.prototype.hasOwnProperty;function Coe(t,n,e){var i=tk.imports._.templateSettings||tk;e&&wl(t,n,e)&&(n=void 0),t=Gr(t),n=a0({},n,i,boe);var r,o,s=a0({},n.imports,i.imports,boe),a=Vs(s),l=MF(s,a),c=0,u=n.interpolate||nk,d="__p += '",h=RegExp((n.escape||nk).source+"|"+u.source+"|"+(u===xoe?pqe:nk).source+"|"+(n.evaluate||nk).source+"|$","g"),f=woe.call(n,"sourceURL")?"//# sourceURL="+(n.sourceURL+"").replace(/\s/g," ")+"\n":"";t.replace(h,function(g,v,y,b,C,k){return y||(y=b),d+=t.slice(c,k).replace(mqe,cqe),v&&(r=!0,d+="' +\n__e("+v+") +\n'"),C&&(o=!0,d+="';\n"+C+";\n__p += '"),y&&(d+="' +\n((__t = ("+y+")) == null ? '' : __t) +\n'"),c=k+g.length,g}),d+="';\n";var p=woe.call(n,"variable")&&n.variable;if(p){if(fqe.test(p))throw new Error("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(o?d.replace(uqe,""):d).replace(dqe,"$1").replace(hqe,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var m=VN(function(){return Function(a,f+"return "+d).apply(void 0,l)});if(m.source=d,IS(m))throw m;return m}function oP(t,n,e){var i=!0,r=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return Bo(e)&&(i="leading"in e?!!e.leading:i,r="trailing"in e?!!e.trailing:r),p0(t,n,{leading:i,maxWait:n,trailing:r})}function b0(t,n){return n(t)}var gqe=Math.min;function sP(t,n){if((t=Gi(t))<1||t>9007199254740991)return[];var e=4294967295,i=gqe(t,4294967295);t-=4294967295;for(var r=PN(i,n=rh(n));++e-1;);return e}function Ooe(t,n){for(var e=-1,i=t.length;++e-1;);return e}function Ioe(t,n,e){if((t=Gr(t))&&(e||void 0===n))return cee(t);if(!t||!(n=bc(n)))return t;var i=Ku(t),r=Ku(n);return lp(i,Ooe(i,r),Moe(i,r)+1).join("")}function Noe(t,n,e){if((t=Gr(t))&&(e||void 0===n))return t.slice(0,lee(t)+1);if(!t||!(n=bc(n)))return t;var i=Ku(t);return lp(i,0,Moe(i,Ku(n))+1).join("")}var vqe=/^\s+/;function Foe(t,n,e){if((t=Gr(t))&&(e||void 0===n))return t.replace(vqe,"");if(!t||!(n=bc(n)))return t;var i=Ku(t);return lp(i,Ooe(i,Ku(n))).join("")}var yqe=/\w*$/;function Poe(t,n){var e=30,i="...";if(Bo(n)){var r="separator"in n?n.separator:r;e="length"in n?Gi(n.length):e,i="omission"in n?bc(n.omission):i}var o=(t=Gr(t)).length;if(u0(t)){var s=Ku(t);o=s.length}if(e>=o)return t;var a=e-_0(i);if(a<1)return i;var l=s?lp(s,0,a).join(""):t.slice(0,a);if(void 0===r)return l+i;if(s&&(a+=l.length-a),XS(r)){if(t.slice(a).search(r)){var c,u=l;for(r.global||(r=RegExp(r.source,Gr(yqe.exec(r))+"g")),r.lastIndex=0;c=r.exec(u);)var d=c.index;l=l.slice(0,void 0===d?a:d)}}else if(t.indexOf(bc(r),a)!=a){var h=l.lastIndexOf(r);h>-1&&(l=l.slice(0,h))}return l+i}function joe(t){return FN(t,1)}var _qe=JN({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Roe=/&(?:amp|lt|gt|quot|#39);/g,bqe=RegExp(Roe.source);function Loe(t){return(t=Gr(t))&&bqe.test(t)?t.replace(Roe,_qe):t}var xqe=f0&&1/jS(new f0([,-0]))[1]==1/0?function(t){return new f0(t)}:ho,wqe=xqe;function dp(t,n,e){var i=-1,r=SS,o=t.length,s=!0,a=[],l=a;if(e)s=!1,r=CF;else if(o>=200){var c=n?null:wqe(t);if(c)return jS(c);s=!1,r=K_,l=new Jm}else l=n?[]:a;e:for(;++i1||this.__actions__.length)&&i instanceof Dr&&af(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:b0,args:[r],thisArg:void 0}),new Kc(i,this.__chain__).thru(function(o){return n&&!o.length&&o.push(void 0),o})):this.thru(r)}),Zoe=Eqe;function ese(){return eF(this)}function tse(){var t=this.__wrapped__;if(t instanceof Dr){var n=t;return this.__actions__.length&&(n=new Dr(this)),(n=n.reverse()).__actions__.push({func:b0,args:[QS],thisArg:void 0}),new Kc(n,this.__chain__)}return this.thru(QS)}function cP(t,n,e){var i=t.length;if(i<2)return i?dp(t[0]):[];for(var r=-1,o=Array(i);++r1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,lP(t,e)}),cse=Mqe,Gn={chunk:ate,compact:Tte,concat:Ete,difference:Zte,differenceBy:ene,differenceWith:tne,drop:ine,dropRight:rne,dropRightWhile:one,dropWhile:sne,fill:gne,findIndex:TF,findLastIndex:EF,first:ia,flatten:BN,flattenDeep:Ane,flattenDepth:Mne,fromPairs:Bne,head:ia,indexOf:Yne,initial:qi,intersection:Xne,intersectionBy:Jne,intersectionWith:Kne,join:kie,last:Fn,lastIndexOf:Eie,nth:qie,pull:_re,pullAll:eP,pullAllBy:bre,pullAllWith:xre,pullAt:Cre,remove:Ire,reverse:QS,slice:Gre,sortedIndex:Yre,sortedIndexBy:Xre,sortedIndexOf:Jre,sortedLastIndex:Kre,sortedLastIndexBy:Qre,sortedLastIndexOf:Zre,sortedUniq:toe,sortedUniqBy:noe,tail:foe,take:poe,takeRight:moe,takeRightWhile:goe,takeWhile:voe,union:$oe,unionBy:Boe,unionWith:Voe,uniq:Hoe,uniqBy:Uoe,uniqWith:zoe,unzip:ik,unzipWith:lP,without:Koe,xor:nse,xorBy:ise,xorWith:rse,zip:ose,zipObject:ase,zipObjectDeep:lse,zipWith:cse},fo={countBy:Ute,each:zS,eachRight:tb,every:mne,filter:yne,find:bne,findLast:Cne,flatMap:Dne,flatMapDeep:Tne,flatMapDepth:Ene,forEach:zS,forEachRight:tb,groupBy:g0,includes:qne,invokeMap:rie,keyBy:Tie,map:m0,orderBy:tre,partition:KF,reduce:Are,reduceRight:Mre,reject:Ore,sample:$re,sampleSize:Bre,shuffle:Ure,size:zre,some:qre,sortBy:iP},Oqe={now:Z_},gs={after:uee,ary:FN,before:HN,bind:zN,bindKey:Uee,curry:BS,curryRight:VS,debounce:p0,defer:Kte,delay:Qte,flip:One,memoize:l0,negate:y0,once:Qie,overArgs:ire,partial:XF,partialRight:mre,rearg:Tre,rest:Pre,spread:roe,throttle:oP,unary:joe,wrap:Qoe},hi={castArray:ote,clone:Ste,cloneDeep:kte,cloneDeepWith:cF,cloneWith:Dte,conformsTo:Bte,eq:Zc,gt:Une,gte:zne,isArguments:op,isArray:ji,isArrayBuffer:sie,isArrayLike:xl,isArrayLikeObject:ms,isBoolean:aie,isBuffer:uf,isDate:cie,isElement:uie,isEmpty:Ui,isEqual:ir,isEqualWith:die,isError:IS,isFinite:hie,isFunction:Zd,isInteger:NF,isLength:W_,isMap:aF,isMatch:fie,isMatchWith:pie,isNaN:mie,isNative:gie,isNil:vie,isNull:yie,isNumber:FF,isObject:Bo,isObjectLike:ns,isPlainObject:c0,isRegExp:XS,isSafeInteger:bie,isSet:lF,isString:nb,isSymbol:Gl,isTypedArray:Gm,isUndefined:xie,isWeakMap:wie,isWeakSet:Cie,lt:Oie,lte:Iie,toArray:BF,toFinite:Qd,toInteger:Gi,toLength:DF,toNumber:xc,toPlainObject:xF,toSafeInteger:Toe,toString:Gr},Sl={add:aee,ceil:ste,divide:nne,floor:Ine,max:jie,maxBy:Rie,mean:$ie,meanBy:Bie,min:zie,minBy:v0,multiply:Gie,round:Rre,subtract:uoe,sum:doe,sumBy:hoe},Iqe=lte,Nqe=Wne,Fqe=Sre,Oi={assign:jee,assignIn:TS,assignInWith:a0,assignWith:Ree,at:Bee,create:zte,defaults:qte,defaultsDeep:Xte,entries:GS,entriesIn:WS,extend:TS,extendWith:a0,findKey:wne,findLastKey:Sne,forIn:jne,forInRight:Rne,forOwn:Lne,forOwnRight:$ne,functions:Vne,functionsIn:Hne,get:MS,has:Gne,hasIn:LS,invert:Zne,invertBy:tie,invoke:iie,keys:Vs,keysIn:Cl,mapKeys:Nie,mapValues:jF,merge:Vie,mergeWith:wF,omit:Xie,omitBy:Kie,pick:gre,pickBy:UF,result:jre,set:Vre,setWith:Hre,toPairs:GS,toPairsIn:WS,transform:Aoe,unset:Goe,update:qoe,updateWith:Yoe,values:Km,valuesIn:Joe},oh={at:Zoe,chain:eF,commit:uF,lodash:me,next:VF,plant:QF,reverse:tse,tap:yoe,thru:b0,toIterator:aP,toJSON:Qm,value:Qm,valueOf:Qm,wrapperChain:ese},Wr={camelCase:rte,capitalize:YN,deburr:KN,endsWith:cne,escape:kF,escapeRegExp:fne,kebabCase:Die,lowerCase:Aie,lowerFirst:Mie,pad:dre,padEnd:hre,padStart:fre,parseInt:pre,repeat:Nre,replace:Fre,snakeCase:Wre,split:ioe,startCase:ooe,startsWith:soe,template:Coe,templateSettings:tk,toLower:koe,toUpper:Eoe,trim:Ioe,trimEnd:Noe,trimStart:Foe,truncate:Poe,unescape:Loe,upperCase:Xoe,upperFirst:NS,words:QN},to={attempt:VN,bindAll:Hee,cond:Rte,conforms:$te,constant:xS,defaultTo:Gte,flow:Fne,flowRight:Pne,identity:rl,iteratee:Sie,matches:Fie,matchesProperty:Pie,method:Hie,methodOf:Uie,mixin:LF,noop:ho,nthArg:Yie,over:nre,overEvery:rre,overSome:ore,property:vF,propertyOf:vre,range:nP,rangeRight:Dre,stubArray:FS,stubFalse:DS,stubObject:aoe,stubString:loe,stubTrue:coe,times:sP,toPath:Doe,uniqueId:hp},Pqe=Math.max,jqe=Math.min,Rqe=Math.min,Lqe=Array.prototype,use=Object.prototype.hasOwnProperty,dse=il?il.iterator:void 0,$qe=Math.max,hse=Math.min,dP=function(t){return function(n,e,i){if(null==i){var r=Bo(e),o=r&&Vs(e),s=o&&o.length&&qS(e,o);(s?s.length:r)||(i=e,e=n,n=this)}return t(n,e,i)}}(LF);me.after=gs.after,me.ary=gs.ary,me.assign=Oi.assign,me.assignIn=Oi.assignIn,me.assignInWith=Oi.assignInWith,me.assignWith=Oi.assignWith,me.at=Oi.at,me.before=gs.before,me.bind=gs.bind,me.bindAll=to.bindAll,me.bindKey=gs.bindKey,me.castArray=hi.castArray,me.chain=oh.chain,me.chunk=Gn.chunk,me.compact=Gn.compact,me.concat=Gn.concat,me.cond=to.cond,me.conforms=to.conforms,me.constant=to.constant,me.countBy=fo.countBy,me.create=Oi.create,me.curry=gs.curry,me.curryRight=gs.curryRight,me.debounce=gs.debounce,me.defaults=Oi.defaults,me.defaultsDeep=Oi.defaultsDeep,me.defer=gs.defer,me.delay=gs.delay,me.difference=Gn.difference,me.differenceBy=Gn.differenceBy,me.differenceWith=Gn.differenceWith,me.drop=Gn.drop,me.dropRight=Gn.dropRight,me.dropRightWhile=Gn.dropRightWhile,me.dropWhile=Gn.dropWhile,me.fill=Gn.fill,me.filter=fo.filter,me.flatMap=fo.flatMap,me.flatMapDeep=fo.flatMapDeep,me.flatMapDepth=fo.flatMapDepth,me.flatten=Gn.flatten,me.flattenDeep=Gn.flattenDeep,me.flattenDepth=Gn.flattenDepth,me.flip=gs.flip,me.flow=to.flow,me.flowRight=to.flowRight,me.fromPairs=Gn.fromPairs,me.functions=Oi.functions,me.functionsIn=Oi.functionsIn,me.groupBy=fo.groupBy,me.initial=Gn.initial,me.intersection=Gn.intersection,me.intersectionBy=Gn.intersectionBy,me.intersectionWith=Gn.intersectionWith,me.invert=Oi.invert,me.invertBy=Oi.invertBy,me.invokeMap=fo.invokeMap,me.iteratee=to.iteratee,me.keyBy=fo.keyBy,me.keys=Vs,me.keysIn=Oi.keysIn,me.map=fo.map,me.mapKeys=Oi.mapKeys,me.mapValues=Oi.mapValues,me.matches=to.matches,me.matchesProperty=to.matchesProperty,me.memoize=gs.memoize,me.merge=Oi.merge,me.mergeWith=Oi.mergeWith,me.method=to.method,me.methodOf=to.methodOf,me.mixin=dP,me.negate=y0,me.nthArg=to.nthArg,me.omit=Oi.omit,me.omitBy=Oi.omitBy,me.once=gs.once,me.orderBy=fo.orderBy,me.over=to.over,me.overArgs=gs.overArgs,me.overEvery=to.overEvery,me.overSome=to.overSome,me.partial=gs.partial,me.partialRight=gs.partialRight,me.partition=fo.partition,me.pick=Oi.pick,me.pickBy=Oi.pickBy,me.property=to.property,me.propertyOf=to.propertyOf,me.pull=Gn.pull,me.pullAll=Gn.pullAll,me.pullAllBy=Gn.pullAllBy,me.pullAllWith=Gn.pullAllWith,me.pullAt=Gn.pullAt,me.range=to.range,me.rangeRight=to.rangeRight,me.rearg=gs.rearg,me.reject=fo.reject,me.remove=Gn.remove,me.rest=gs.rest,me.reverse=Gn.reverse,me.sampleSize=fo.sampleSize,me.set=Oi.set,me.setWith=Oi.setWith,me.shuffle=fo.shuffle,me.slice=Gn.slice,me.sortBy=fo.sortBy,me.sortedUniq=Gn.sortedUniq,me.sortedUniqBy=Gn.sortedUniqBy,me.split=Wr.split,me.spread=gs.spread,me.tail=Gn.tail,me.take=Gn.take,me.takeRight=Gn.takeRight,me.takeRightWhile=Gn.takeRightWhile,me.takeWhile=Gn.takeWhile,me.tap=oh.tap,me.throttle=gs.throttle,me.thru=b0,me.toArray=hi.toArray,me.toPairs=Oi.toPairs,me.toPairsIn=Oi.toPairsIn,me.toPath=to.toPath,me.toPlainObject=hi.toPlainObject,me.transform=Oi.transform,me.unary=gs.unary,me.union=Gn.union,me.unionBy=Gn.unionBy,me.unionWith=Gn.unionWith,me.uniq=Gn.uniq,me.uniqBy=Gn.uniqBy,me.uniqWith=Gn.uniqWith,me.unset=Oi.unset,me.unzip=Gn.unzip,me.unzipWith=Gn.unzipWith,me.update=Oi.update,me.updateWith=Oi.updateWith,me.values=Oi.values,me.valuesIn=Oi.valuesIn,me.without=Gn.without,me.words=Wr.words,me.wrap=gs.wrap,me.xor=Gn.xor,me.xorBy=Gn.xorBy,me.xorWith=Gn.xorWith,me.zip=Gn.zip,me.zipObject=Gn.zipObject,me.zipObjectDeep=Gn.zipObjectDeep,me.zipWith=Gn.zipWith,me.entries=Oi.toPairs,me.entriesIn=Oi.toPairsIn,me.extend=Oi.assignIn,me.extendWith=Oi.assignInWith,dP(me,me),me.add=Sl.add,me.attempt=to.attempt,me.camelCase=Wr.camelCase,me.capitalize=Wr.capitalize,me.ceil=Sl.ceil,me.clamp=Iqe,me.clone=hi.clone,me.cloneDeep=hi.cloneDeep,me.cloneDeepWith=hi.cloneDeepWith,me.cloneWith=hi.cloneWith,me.conformsTo=hi.conformsTo,me.deburr=Wr.deburr,me.defaultTo=to.defaultTo,me.divide=Sl.divide,me.endsWith=Wr.endsWith,me.eq=hi.eq,me.escape=Wr.escape,me.escapeRegExp=Wr.escapeRegExp,me.every=fo.every,me.find=fo.find,me.findIndex=Gn.findIndex,me.findKey=Oi.findKey,me.findLast=fo.findLast,me.findLastIndex=Gn.findLastIndex,me.findLastKey=Oi.findLastKey,me.floor=Sl.floor,me.forEach=fo.forEach,me.forEachRight=fo.forEachRight,me.forIn=Oi.forIn,me.forInRight=Oi.forInRight,me.forOwn=Oi.forOwn,me.forOwnRight=Oi.forOwnRight,me.get=Oi.get,me.gt=hi.gt,me.gte=hi.gte,me.has=Oi.has,me.hasIn=Oi.hasIn,me.head=Gn.head,me.identity=rl,me.includes=fo.includes,me.indexOf=Gn.indexOf,me.inRange=Nqe,me.invoke=Oi.invoke,me.isArguments=hi.isArguments,me.isArray=ji,me.isArrayBuffer=hi.isArrayBuffer,me.isArrayLike=hi.isArrayLike,me.isArrayLikeObject=hi.isArrayLikeObject,me.isBoolean=hi.isBoolean,me.isBuffer=hi.isBuffer,me.isDate=hi.isDate,me.isElement=hi.isElement,me.isEmpty=hi.isEmpty,me.isEqual=hi.isEqual,me.isEqualWith=hi.isEqualWith,me.isError=hi.isError,me.isFinite=hi.isFinite,me.isFunction=hi.isFunction,me.isInteger=hi.isInteger,me.isLength=hi.isLength,me.isMap=hi.isMap,me.isMatch=hi.isMatch,me.isMatchWith=hi.isMatchWith,me.isNaN=hi.isNaN,me.isNative=hi.isNative,me.isNil=hi.isNil,me.isNull=hi.isNull,me.isNumber=hi.isNumber,me.isObject=Bo,me.isObjectLike=hi.isObjectLike,me.isPlainObject=hi.isPlainObject,me.isRegExp=hi.isRegExp,me.isSafeInteger=hi.isSafeInteger,me.isSet=hi.isSet,me.isString=hi.isString,me.isSymbol=hi.isSymbol,me.isTypedArray=hi.isTypedArray,me.isUndefined=hi.isUndefined,me.isWeakMap=hi.isWeakMap,me.isWeakSet=hi.isWeakSet,me.join=Gn.join,me.kebabCase=Wr.kebabCase,me.last=Fn,me.lastIndexOf=Gn.lastIndexOf,me.lowerCase=Wr.lowerCase,me.lowerFirst=Wr.lowerFirst,me.lt=hi.lt,me.lte=hi.lte,me.max=Sl.max,me.maxBy=Sl.maxBy,me.mean=Sl.mean,me.meanBy=Sl.meanBy,me.min=Sl.min,me.minBy=Sl.minBy,me.stubArray=to.stubArray,me.stubFalse=to.stubFalse,me.stubObject=to.stubObject,me.stubString=to.stubString,me.stubTrue=to.stubTrue,me.multiply=Sl.multiply,me.nth=Gn.nth,me.noop=to.noop,me.now=Oqe.now,me.pad=Wr.pad,me.padEnd=Wr.padEnd,me.padStart=Wr.padStart,me.parseInt=Wr.parseInt,me.random=Fqe,me.reduce=fo.reduce,me.reduceRight=fo.reduceRight,me.repeat=Wr.repeat,me.replace=Wr.replace,me.result=Oi.result,me.round=Sl.round,me.sample=fo.sample,me.size=fo.size,me.snakeCase=Wr.snakeCase,me.some=fo.some,me.sortedIndex=Gn.sortedIndex,me.sortedIndexBy=Gn.sortedIndexBy,me.sortedIndexOf=Gn.sortedIndexOf,me.sortedLastIndex=Gn.sortedLastIndex,me.sortedLastIndexBy=Gn.sortedLastIndexBy,me.sortedLastIndexOf=Gn.sortedLastIndexOf,me.startCase=Wr.startCase,me.startsWith=Wr.startsWith,me.subtract=Sl.subtract,me.sum=Sl.sum,me.sumBy=Sl.sumBy,me.template=Wr.template,me.times=to.times,me.toFinite=hi.toFinite,me.toInteger=Gi,me.toLength=hi.toLength,me.toLower=Wr.toLower,me.toNumber=hi.toNumber,me.toSafeInteger=hi.toSafeInteger,me.toString=hi.toString,me.toUpper=Wr.toUpper,me.trim=Wr.trim,me.trimEnd=Wr.trimEnd,me.trimStart=Wr.trimStart,me.truncate=Wr.truncate,me.unescape=Wr.unescape,me.uniqueId=to.uniqueId,me.upperCase=Wr.upperCase,me.upperFirst=Wr.upperFirst,me.each=fo.forEach,me.eachRight=fo.forEachRight,me.first=Gn.head,dP(me,(uP={},ih(me,function(t,n){use.call(me.prototype,n)||(uP[n]=t)}),uP),{chain:!1}),me.VERSION="4.17.21",(me.templateSettings=Wr.templateSettings).imports._=me,Qc(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){me[t].placeholder=me}),Qc(["drop","take"],function(t,n){Dr.prototype[t]=function(e){e=void 0===e?1:$qe(Gi(e),0);var i=this.__filtered__&&!n?new Dr(this):this.clone();return i.__filtered__?i.__takeCount__=hse(e,i.__takeCount__):i.__views__.push({size:hse(e,4294967295),type:t+(i.__dir__<0?"Right":"")}),i},Dr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Qc(["filter","map","takeWhile"],function(t,n){var e=n+1,i=1==e||3==e;Dr.prototype[t]=function(r){var o=this.clone();return o.__iteratees__.push({iteratee:Ri(r),type:e}),o.__filtered__=o.__filtered__||i,o}}),Qc(["head","last"],function(t,n){var e="take"+(n?"Right":"");Dr.prototype[t]=function(){return this[e](1).value()[0]}}),Qc(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");Dr.prototype[t]=function(){return this.__filtered__?new Dr(this):this[e](1)}}),Dr.prototype.compact=function(){return this.filter(rl)},Dr.prototype.find=function(t){return this.filter(t).head()},Dr.prototype.findLast=function(t){return this.reverse().find(t)},Dr.prototype.invokeMap=lr(function(t,n){return"function"==typeof t?new Dr(this):this.map(function(e){return ib(e,t,n)})}),Dr.prototype.reject=function(t){return this.filter(y0(Ri(t)))},Dr.prototype.slice=function(t,n){t=Gi(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Dr(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=Gi(n))<0?e.dropRight(-n):e.take(n-t)),e)},Dr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Dr.prototype.toArray=function(){return this.take(4294967295)},ih(Dr.prototype,function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),r=me[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);r&&(me.prototype[n]=function(){var s=this.__wrapped__,a=i?[1]:arguments,l=s instanceof Dr,c=a[0],u=l||ji(s),d=function(v){var y=r.apply(me,ap([v],a));return i&&h?y[0]:y};u&&e&&"function"==typeof c&&1!=c.length&&(l=u=!1);var h=this.__chain__,p=o&&!h,m=l&&!this.__actions__.length;if(!o&&u){s=m?s:new Dr(this);var g=t.apply(s,a);return g.__actions__.push({func:b0,args:[d],thisArg:void 0}),new Kc(g,h)}return p&&m?t.apply(this,a):(g=this.thru(d),p?i?g.value()[0]:g.value():g)})}),Qc(["pop","push","shift","sort","splice","unshift"],function(t){var n=Lqe[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);me.prototype[t]=function(){var r=arguments;if(i&&!this.__chain__){var o=this.value();return n.apply(ji(o)?o:[],r)}return this[e](function(s){return n.apply(ji(s)?s:[],r)})}}),ih(Dr.prototype,function(t,n){var e=me[n];if(e){var i=e.name+"";use.call(n0,i)||(n0[i]=[]),n0[i].push({name:n,func:e})}}),n0[kS(void 0,2).name]=[{name:"wrapper",func:void 0}],Dr.prototype.clone=function(){var t=new Dr(this.__wrapped__);return t.__actions__=Wl(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Wl(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Wl(this.__views__),t},Dr.prototype.reverse=function(){if(this.__filtered__){var t=new Dr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Dr.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=ji(t),i=n<0,r=e?t.length:0,o=function(k,D,L){for(var z=-1,R=L.length;++z1&&void 0!==arguments[1]&&arguments[1],e={};if(!Array.isArray(t))throw new TypeError("Array expected");function i(l,c){(!Array.isArray(l)&&!To(l)||n&&c.length>0)&&(e[an(c)]=!0),To(l)&&Object.keys(l).forEach(function(u){i(l[u],c.concat(u))})}for(var r=Math.min(t.length,1e4),o=0;on?t.slice(0,n):t}function pse(t){return Qe({},t)}function mse(t){return Object.values(t)}function gse(t,n,e,i){var r=t.slice(0),o=r.splice(n,e);return r.splice.apply(r,[n+i,0].concat(ri(o))),r}function fP(t,n){try{return n.parse(t)}catch{return n.parse(Kd(t))}}function vse(t,n){try{return fP(t,n)}catch{return}}function ok(t,n){t=t.replace(_se,"");try{return n(t)}catch{}try{return n("["+t+"]")}catch{}try{return n("{"+t+"}")}catch{}throw new Error("Failed to parse partial JSON")}function yse(t){t=t.replace(_se,"");try{return Kd(t)}catch{}try{var n=Kd("["+t+"]");return n.substring(1,n.length-1)}catch{}try{var e=Kd("{"+t+"}");return e.substring(1,e.length-1)}catch{}throw new Error("Failed to repair partial JSON")}var _se=/,\s*$/;function sk(t,n){var e=wse.exec(n);if(e){var i=Bs(e[2]),r=function(f,p){for(var g=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.length,v=0,y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;y1&&void 0!==arguments[1]?arguments[1]:void 0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return x0(t)?t:{text:e.stringify(t.json,null,n)}}function bse(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return mP(t)?t:{json:n.parse(t.text)}}function ak(t,n,e){return Zm(t,n,e).text}function xse(t,n){return function Uqe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(x0(t))return t.text.length;var i=0;return function r(o){if(Array.isArray(o)){if((i+=o.length-1+2)>n)return i;for(var s=0;sn)return i}else if(To(o)){var a=Object.keys(o);i+=2+a.length+(a.length-1);for(var l=0;ln}var wse=/(position|char) (\d+)/,zqe=/line (\d+)/,Gqe=/column (\d+)/;function Sse(t){return Wqe.test(t)&&t.length>2}var Wqe=/^[[{]\S/;function gP(t){var e=t.escapeUnicodeCharacters;return t.escapeControlCharacters?e?qqe:Yqe:e?Xqe:Jqe}var qqe={escapeValue:function(t){return kse(Ese(String(t)))},unescapeValue:function(t){return Ase(Dse(t))}},Yqe={escapeValue:function(t){return Ese(String(t))},unescapeValue:function(t){return Ase(t)}},Xqe={escapeValue:function(t){return kse(String(t))},unescapeValue:function(t){return Dse(t)}},Jqe={escapeValue:function(t){return String(t)},unescapeValue:function(t){return t}};function kse(t){return t.replace(/[^\x20-\x7F]/g,function(n){var e;return"\b"===n||"\f"===n||"\n"===n||"\r"===n||"\t"===n?n:"\\u"+("000"+(null===(e=n.codePointAt(0))||void 0===e?void 0:e.toString(16))).slice(-4)})}function Dse(t){return t.replace(/\\u[a-fA-F0-9]{4}/g,function(n){try{var e=JSON.parse('"'+n+'"');return Tse[e]||e}catch{return n}})}var Tse={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Kqe={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function Ese(t){return t.replace(/["\b\f\n\r\t\\]/g,function(n){return Tse[n]||n})}function Ase(t){return t.replace(/\\["bfnrt\\]/g,function(n){return Kqe[n]||n})}function eg(t){return"string"!=typeof t?String(t):t.endsWith("\n")?t+"\n":t}function Mse(t,n){return ob(t,function(e){return e.nodeName.toUpperCase()===n.toUpperCase()})}function tg(t,n,e){return ob(t,function(i){return s=e,"function"==typeof(r=i).getAttribute&&r.getAttribute(n)===s;var r,s})}function ob(t,n){return!!vP(t,n)}function vP(t,n){for(var e=t;e&&!n(e);)e=e.parentNode;return e||void 0}function Ose(t){if(null!=t.firstChild){var n=document.createRange(),e=window.getSelection();n.setStart(t,1),n.collapse(!0),e?.removeAllRanges(),e?.addRange(n)}else t.focus()}function lk(t,n,e){var i=w0(t);if(i){var r=i.document.activeElement?i.document.activeElement:null;r&&r.isContentEditable&&(r.textContent=e?n:r.textContent+n,Ose(r))}}function w0(t){return t&&t.ownerDocument?t.ownerDocument.defaultView:null}function ck(t){var e=w0(t)?.document.activeElement;return!!e&&ob(e,function(i){return i===t})}function Ise(t,n){return vP(t,function(e){return e.nodeName===n})}function yP(t){return tg(t,"data-type","selectable-key")?Zr.key:tg(t,"data-type","selectable-value")?Zr.value:tg(t,"data-type","insert-selection-area-inside")?Zr.inside:tg(t,"data-type","insert-selection-area-after")?Zr.after:Zr.multi}function C0(t){return encodeURIComponent(an(t))}function Nse(t){var e=vP(t,function(i){return!(null==i||!i.hasAttribute)&&i.hasAttribute("data-path")})?.getAttribute("data-path");return e?Yu(decodeURIComponent(e)):null}function fp(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"+",e=[];t.ctrlKey&&e.push("Ctrl"),t.metaKey&&e.push("Ctrl"),t.altKey&&e.push("Alt"),t.shiftKey&&e.push("Shift");var i=1===t.key.length?t.key.toUpperCase():t.key;return i in Zqe||e.push(i),e.join(n)}var Zqe={Ctrl:!0,Command:!0,Control:!0,Alt:!0,Option:!0,Shift:!0},_P=aN.window;function eYe(t){di(t,"svelte-1r8q3m8",".jse-absolute-popup.svelte-1r8q3m8.svelte-1r8q3m8{position:relative;left:0;top:0;width:0;height:0;z-index:1001}.jse-absolute-popup.svelte-1r8q3m8 .jse-hidden-input.svelte-1r8q3m8{position:fixed;left:0;top:0;width:0;height:0;padding:0;margin:0;border:none;outline:none;overflow:hidden}.jse-absolute-popup.svelte-1r8q3m8 .jse-absolute-popup-content.svelte-1r8q3m8{position:absolute}")}function Fse(t){var n,e,i,r,o,s,a=[t[0].props],l=t[0].component;function c(u){for(var d={},h=0;hwindow.innerHeight&&C>h,z="left"===v||b+u>window.innerWidth&&b>u;return{left:z?y.right-g:b+g,top:L?C-p:y.bottom+p,positionAbove:L,positionLeft:z}}if("number"==typeof n.left&&"number"==typeof n.top){var R=n.left,U=n.top,G=n.width,X=void 0===G?0:G,te=n.height,P=void 0===te?0:te;return{left:R,top:U,positionAbove:U+P>window.innerHeight&&U>P,positionLeft:R+X>window.innerWidth&&R>X}}throw new Error('Invalid config: pass either "left" and "top", or pass "anchor"')}(),r=i.left,o=i.top,a=i.positionLeft;return(i.positionAbove?"bottom: ".concat(e.top-o,"px;"):"top: ".concat(o-e.top,"px;"))+(a?"right: ".concat(e.left-r,"px;"):"left: ".concat(r-e.left,"px;"))}function iYe(t,n,e){var i,r,o=n.popup,s=n.closeAbsolutePopup;function a(l){o.options&&o.options.closeOnOuterClick&&!ob(l.target,function(c){return c===i})&&s(o.id)}return Yc(function(){r&&r.focus()}),t.$$set=function(l){"popup"in l&&e(0,o=l.popup),"closeAbsolutePopup"in l&&e(6,s=l.closeAbsolutePopup)},[o,i,r,function(l){a(l)},function(l){"Escape"===fp(l)&&s(o.id)},function(l){a(l)},s,function(l){Hi[l?"unshift":"push"](function(){e(2,r=l)})},function(l){Hi[l?"unshift":"push"](function(){e(1,i=l)})}]}var rYe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,iYe,tYe,ps,{popup:0,closeAbsolutePopup:6},eYe),r}return Se(e)}();function jse(t,n,e){var i=t.slice();return i[6]=n[e],i}function Rse(t){var n,e;return n=new rYe({props:{popup:t[6],closeAbsolutePopup:t[1]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.popup=i[6]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function oYe(t){for(var n,e,i=t[0],r=[],o=0;o0;){var i=n.match(lYe);if(!i)throw new SyntaxError('Cannot parse path: unexpected part "'.concat(n,'" at position ').concat(t.length-n.length));e.push(i[1]||i[2]||i[3]),n=n.substring(i[0].length)}var r;return e}var lYe=new RegExp(["^\\.([A-zA-Z$_][a-zA-Z$_0-9]*)","^\\[([0-9]+)]","^\\['(.*)']"].join("|"));function sb(t){return{value:t,label:Ui(t)?"(whole item)":iu(ql(t))}}function sh(t){return t.map(function(n){return xP.test(n)?"?.[".concat(n,"]"):bP.test(n)?"?.".concat(n):"?.[".concat(JSON.stringify(n),"]")}).join("")}var bP=/^[a-zA-Z$_][a-zA-Z$_\d]*$/,xP=/^\d+$/;function ab(t,n){for(var e=new Set(n),i=t.replace(/ \(copy( \d+)?\)$/,""),r=t,o=1;e.has(r);){var s="copy"+(o>1?" "+o:"");r="".concat(i," (").concat(s,")"),o++}return r}function ah(t,n){return t.length>n?t.substring(0,n-3)+"...":t}var cYe={id:"javascript",name:"JavaScript",description:"\n

    \n Enter a JavaScript function to filter, sort, or transform the data.\n

    \n",createQuery:function(t,n){var e=n.filter,i=n.sort,r=n.projection,o=[" return data\n"];if(e&&e.path&&e.relation&&e.value){var s="item => item".concat(sh(e.path)),a=function wP(t){if(""===t)return"";var n=t.toLowerCase();if("null"===n)return null;if("true"===n)return!0;if("false"===n)return!1;if("undefined"!==n){var e=Number(t),i=parseFloat(t);return isNaN(e)||isNaN(i)?t:e}}(e.value),l="string"==typeof a?"'".concat(e.value,"'"):function eee(t){return AUe.test(t)}(e.value)&&!Number.isSafeInteger(a)?"".concat(e.value,"n"):e.value;o.push(" .filter(".concat(s," ").concat(e.relation," ").concat(l,")\n"))}if(i&&i.path&&i.direction&&o.push("desc"===i.direction?" .slice()\n .sort((a, b) => {\n // sort descending\n"+" const valueA = a".concat(sh(i.path),"\n")+" const valueB = b".concat(sh(i.path),"\n")+" return valueA > valueB ? -1 : valueA < valueB ? 1 : 0\n })\n":" .slice()\n .sort((a, b) => {\n // sort ascending\n"+" const valueA = a".concat(sh(i.path),"\n")+" const valueB = b".concat(sh(i.path),"\n")+" return valueA > valueB ? 1 : valueA < valueB ? -1 : 0\n })\n"),r&&r.paths)if(r.paths.length>1){var c=r.paths.map(function(d){var h=d[d.length-1]||"item",f="item".concat(sh(d));return" ".concat(JSON.stringify(h),": ").concat(f)});o.push(" .map(item => ({\n".concat(c.join(",\n"),"})\n )\n"))}else{var u="item".concat(sh(r.paths[0]));o.push(" .map(item => ".concat(u,")\n"))}return"function query (data) {\n".concat(o.join(""),"}")},executeQuery:function(t,n){var e=new Function('"use strict";\n\n'+n+'\n\nif (typeof query !== "function") {\n throw new Error("Cannot execute query: expecting a function named \'query\' but is undefined")\n}\n\nreturn query;\n')()(t);return void 0!==e?e:null}},uYe={prefix:"far",iconName:"lightbulb",icon:[384,512,[128161],"f0eb","M281.2 248.9C295.6 228.3 304 203.2 304 176c0-70.7-57.3-128-128-128S48 105.3 48 176c0 27.2 8.4 52.3 22.8 72.9c3.7 5.3 8.1 11.3 12.8 17.7l0 0c12.9 17.7 28.3 38.9 39.8 59.8c10.4 19 15.7 38.8 18.3 57.5H93c-2.2-12-5.9-23.7-11.8-34.5c-9.9-18-22.2-34.9-34.5-51.8l0 0 0 0c-5.2-7.1-10.4-14.2-15.4-21.4C11.6 247.9 0 213.3 0 176C0 78.8 78.8 0 176 0s176 78.8 176 176c0 37.3-11.6 71.9-31.4 100.3c-5 7.2-10.2 14.3-15.4 21.4l0 0 0 0c-12.3 16.8-24.6 33.7-34.5 51.8c-5.9 10.8-9.6 22.5-11.8 34.5H210.4c2.6-18.7 7.9-38.6 18.3-57.5c11.5-20.9 26.9-42.1 39.8-59.8l0 0 0 0 0 0c4.7-6.4 9-12.4 12.7-17.7zM176 128c-26.5 0-48 21.5-48 48c0 8.8-7.2 16-16 16s-16-7.2-16-16c0-44.2 35.8-80 80-80c8.8 0 16 7.2 16 16s-7.2 16-16 16zm0 384c-44.2 0-80-35.8-80-80V416H256v16c0 44.2-35.8 80-80 80z"]},lb={prefix:"far",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M211.8 339.8C200.9 350.7 183.1 350.7 172.2 339.8L108.2 275.8C97.27 264.9 97.27 247.1 108.2 236.2C119.1 225.3 136.9 225.3 147.8 236.2L192 280.4L300.2 172.2C311.1 161.3 328.9 161.3 339.8 172.2C350.7 183.1 350.7 200.9 339.8 211.8L211.8 339.8zM0 96C0 60.65 28.65 32 64 32H384C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96zM48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80H64C55.16 80 48 87.16 48 96z"]},cb={prefix:"far",iconName:"square",icon:[448,512,[9632,9723,9724,61590],"f0c8","M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"]},dYe={prefix:"far",iconName:"clock",icon:[512,512,[128339,"clock-four"],"f017","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"]};function hYe(t){for(var n,e=[t[0]],i={},r=0;r300},{anchor:h.target,closeOnOuterClick:!0,onClose:d,offsetTop:18,offsetLeft:-8,height:300})}},o,l,c]}var $Ye=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,LYe,RYe,Ti,{path:4,value:0,readOnly:1,onPatch:5,focus:6},jYe),r}return Se(e)}();function Yse(t){for(var n=iP(t,function(a){return a.start}),e=[n[0]],i=0;i=e.start&&n0){var d=hk(n,u);SP(l,d,function(g){o[c]=String(g),a(l[g])}),o.pop()}}}else if(To(l)&&i(o)){r[an(o)]=!0;var h=Object.keys(l);if(h.length>0){var f,p=Re(h);try{for(p.s();!(f=p.n()).done;){var m=f.value;o[c]=m,a(l[m])}}catch(g){p.e(g)}finally{p.f()}o.pop()}}}(s),Qe(Qe({},n),{},{expandedMap:r})}function Xse(t,n){var e=S0(t.expandedMap,n),i=S0(t.enforceStringMap,n),r=S0(t.visibleSectionsMap,n);return Qe(Qe({},t),{},{expandedMap:e,enforceStringMap:i,visibleSectionsMap:r})}function Jse(t,n,e){if(e){var i=Qe({},t.enforceStringMap);return i[n]=e,Qe(Qe({},t),{},{enforceStringMap:i})}if("boolean"==typeof t.enforceStringMap[n]){var r=Qe({},t.enforceStringMap);return delete r[n],Qe(Qe({},t),{},{enforceStringMap:r})}return t}function Kse(t,n,e){var i=Xu(t,e),r=e.reduce(function(o,s){return RZ(s)?Qse(i,o,s):LZ(s)?Zse(i,o,s):fN(s)?(u=(c=s).path,d=AP(a=i,(l=o).expandedMap),h=AP(a,l.enforceStringMap),f=AP(a,l.visibleSectionsMap),Do(c.value)||eo(c.value)||delete d[u],eo(c.value)||delete f[u],(Do(c.value)||eo(c.value))&&delete h[u],Qe(Qe({},l),{},{expandedMap:d,enforceStringMap:h,visibleSectionsMap:f})):pN(s)||Qv(s)?function(a,l,c){if(Qv(c)&&c.from===c.path)return l;var u=function(y){return c.path+y.substring(c.from.length)},d=EP(DP(l.expandedMap,c.from),u),h=EP(DP(l.enforceStringMap,c.from),u),f=EP(DP(l.visibleSectionsMap,c.from),u),p=l;Qv(c)&&(p=Zse(a,p,{op:"remove",path:c.from}));var m=TP((p=Qse(a,p,{op:"add",path:c.path,value:null})).expandedMap,d),g=TP(p.enforceStringMap,h),v=TP(p.visibleSectionsMap,f);return Qe(Qe({},l),{},{expandedMap:m,enforceStringMap:g,visibleSectionsMap:v})}(i,o,s):o;var a,l,c,u,d,h,f},n);return{json:i,documentState:r}}function Qse(t,n,e){var i=Ju(t,e.path),r=qi(i),o=an(r);if(eo(Sn(t,r))){var s=Bs(Fn(i)),a=k0(n.expandedMap,r,s,1),l=k0(n.enforceStringMap,r,s,1),c=k0(n.visibleSectionsMap,r,s,1);return c=eae(c,o,function(u){return tae(u,s,1)}),Qe(Qe({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}return n}function Zse(t,n,e){var i=Ju(t,e.path),r=qi(i),o=an(r),s=Sn(t,r),a=n.expandedMap,l=n.enforceStringMap,c=n.visibleSectionsMap;if(a=S0(a,i),l=S0(l,i),c=S0(c,i),eo(s)){var u=Bs(Fn(i));a=k0(a,r,u,-1),l=k0(l,r,u,-1),c=eae(c=k0(c,r,u,-1),o,function(d){return tae(d,u,-1)})}return Qe(Qe({},n),{},{expandedMap:a,enforceStringMap:l,visibleSectionsMap:c})}function S0(t,n){var e={},i=an(n);return Object.keys(t).forEach(function(r){Zv(r,i)||(e[r]=t[r])}),e}function DP(t,n){var e={};return Object.keys(t).forEach(function(i){Zv(i,n)&&(e[i]=t[i])}),e}function TP(t,n){return Qe(Qe({},t),n)}function EP(t,n){var e={};return Object.keys(t).forEach(function(i){var r=n(i);e[r]=t[i]}),e}function k0(t,n,e,i){for(var r=n.length,o=an(n),s=[],a=0,l=Object.keys(t);a=e&&(u[r]=String(d+i),s.push({oldPointer:c,newPointer:an(u),value:t[c]}))}}if(0===s.length)return t;var h=Qe({},t);return s.forEach(function(f){delete h[f.oldPointer]}),s.forEach(function(f){h[f.newPointer]=f.value}),h}function AP(t,n){var e={};return Object.keys(n).filter(function(i){return Jc(t,Ju(t,i))}).forEach(function(i){e[i]=n[i]}),e}function eae(t,n,e){var i=t[n];if(n in t){var r=e(i);if(!ir(i,r)){var o=Qe({},t);return void 0===r?delete o[n]:o[n]=r,o}}return t}function tae(t,n,e){return t.map(function(i){return{start:i.start>n?i.start+e:i.start,end:i.end>=n?i.end+e:i.end}})}function pf(t,n,e,i){var o,r=n?n[e]:void 0;return"boolean"==typeof r?r:"string"==typeof(o=t)&&"string"!=typeof e0(o,i)}function ub(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.indexOf(n);return-1!==i?t.slice(e?i:i+1):[]}function MP(t,n){var e=[];return function i(r,o){e.push(o);var s=an(o);if(r&&!0===n.expandedMap[s]){if(eo(r)){var a=hk(n,s);SP(r,a,function(l){i(r[l],o.concat(String(l)))})}Do(r)&&Object.keys(r).forEach(function(l){i(r[l],o.concat(l))})}}(t,[]),e}function nae(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=[];return function r(o,s){i.push({path:s,type:Gu.value});var a=an(s);if(o&&!0===n.expandedMap[a]){if(e&&i.push({path:s,type:Gu.inside}),eo(o)){var l=hk(n,a);SP(o,l,function(c){var u=s.concat(String(c));r(o[c],u),e&&i.push({path:u,type:Gu.after})})}Do(o)&&Object.keys(o).forEach(function(c){var u=s.concat(c);i.push({path:u,type:Gu.key}),r(o[c],u),e&&i.push({path:u,type:Gu.after})})}}(t,[]),i}function OP(t,n,e){var i=MP(t,n),r=i.map(an).indexOf(an(e));return-1!==r&&r0;){if(!0===t.pointersMap[an(i)])return!0;i.pop()}return vs(t)?e===Zr.key&&ir(t.focusPath,n):!(!Yi(t)||!(e===Zr.value&&ir(t.focusPath,n)||A0(n,t.focusPath)&&n.length>t.focusPath.length&&(e===Zr.key||e===Zr.value||e===Zr.multi)))}function oae(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.selection;if(!r)return null;var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Ir(r)?r.focusPath:ia(r.paths),s=function HYe(t,n,e){var i=MP(t,n),r=i.map(an),o=an(e),s=r.indexOf(o);return-1!==s&&s>0?i[s-1]:null}(t,n,o);if(null===s)return null;var a=s,l=s;if(e)return Zu(r)||Hs(r)?Es(t,r.anchorPath,r.anchorPath):Es(t,r.anchorPath,l);if(vs(r)){var u=Sn(t,qi(s));return Array.isArray(u)||Ui(s)?fr(s,!1):ou(s,!1)}return Yi(r)?fr(s,!1):Zu(r)||Hs(r)?Es(t,o,o):Es(t,a,l)}function sae(t,n,e){var i=n.selection;if(!i)return{caret:null,previous:null,next:null};var r=nae(t,n,e),o=r.findIndex(function(s){return ir(s.path,i.focusPath)&&String(s.type)===String(i.type)});return{caret:-1!==o?r[o]:null,previous:-1!==o&&o>0?r[o-1]:null,next:-1!==o&&oe[i].length;)i++;var r=e[i];return 0===r.length||Array.isArray(Sn(t,qi(r)))?fr(r,!1):ou(r,!1)}function E0(t,n){if(1===n.length){var e=ia(n);if("replace"===e.op||"move"===e.op)return fr(Ju(t,e.path),!1)}if(!Ui(n)&&n.every(function(s){return"move"===s.op})){var i=ia(n),r=n.slice(1);if((pN(i)||Qv(i))&&i.from!==i.path&&r.every(function(s){return(pN(s)||Qv(s))&&s.from===s.path}))return ou(Ju(t,i.path),!1)}var o=n.filter(function(s){return"test"!==s.op&&"remove"!==s.op&&("move"!==s.op||s.from!==s.path)&&"string"==typeof s.path}).map(function(s){return Ju(t,s.path)});if(!Ui(o))return{type:Zr.multi,paths:o,anchorPath:ia(o),focusPath:Fn(o),pointersMap:aae(o)}}function aae(t){var n={};return t.forEach(function(e){n[an(e)]=!0}),n}function pk(t){return Ul({},an(t),!0)}function hb(t){return void 0!==t&&(vs(t)||Yi(t)||Ir(t)&&1===t.paths.length)}function lae(t,n){return hb(n)&&$o(Sn(t,n.focusPath))?n.focusPath:qi(n.focusPath)}function A0(t,n){if(t.length0?0:-1,e=t.items[n],i=t.items.map(function(r,o){return Qe(Qe({},r),{},{active:o===n})});return Qe(Qe({},t),{},{items:i,itemsMap:g0(i,function(r){return an(r.path)}),activeItem:e,activeIndex:n})}function KYe(t){var n=t.activeIndex>0?t.activeIndex-1:t.items.length-1,e=t.items[n],i=t.items.map(function(r,o){return Qe(Qe({},r),{},{active:o===n})});return Qe(Qe({},t),{},{items:i,itemsMap:g0(i,function(r){return an(r.path)}),activeItem:e,activeIndex:n})}function _ae(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,i=[],r=[];function o(l){i.length=e)return;r.pop()}else if(Do(c)){var h=Object.keys(c),f=r.length;r.push("");for(var p=0,m=h;p=e)return}r.pop()}else bae(String(c),l,r,Wu.value,o)}(t.toLowerCase(),n),i}function bae(t,n,e,i,r){var o=t.toLowerCase(),s=0,a=-1,l=-1;do{-1!==(l=o.indexOf(n,a))&&(a=l+n.length,r({path:e.slice(0),field:i,fieldIndex:s,start:l,end:a}),s++)}while(-1!==l)}function PP(t,n,e,i){return t.substring(0,e)+n+t.substring(i)}function xae(t,n,e){var i=t;return tb(e,function(r){i=PP(i,n,r.start,r.end)}),i}function QYe(t,n,e,i,r){var o=i.field,s=i.path,a=i.start,l=i.end;if(o===Wu.key){var c=qi(s),u=Sn(t,c),d=Fn(s),h=pb(c,Object.keys(u),d,PP(d,e,a,l));return{newSelection:E0(t,h),operations:h}}if(o===Wu.value){var f=Sn(t,s);if(void 0===f)throw new Error("Cannot replace: path not found ".concat(an(s)));var p="string"==typeof f?f:String(f),m=an(s),g=pf(f,n.enforceStringMap,m,r),v=PP(p,e,a,l),y=[{op:"replace",path:an(s),value:g?v:e0(v,r)}];return{newSelection:E0(t,y),operations:y}}throw new Error("Cannot replace: unknown type of search result field ".concat(o))}function ZYe(t,n,e,i,r){for(var o=_ae(e,t,1/0),s=[],a=0;an.floating[o]&&(s=wk(s)),{main:s,cross:wk(s)}}var $Xe={start:"end",end:"start"};function UP(t){return t.replace(/start|end/g,function(n){return $Xe[n]})}var BXe=function(t){return void 0===t&&(t={}),{name:"flip",options:t,fn:function(n){return Ki(pn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te,P,W,le,E,I,N,q,V,re;return pn().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return r=n.placement,o=n.middlewareData,s=n.rects,a=n.initialPlacement,l=n.platform,c=n.elements,d=(u=t).mainAxis,h=void 0===d||d,p=void 0===(f=u.crossAxis)||f,m=u.fallbackPlacements,v=void 0===(g=u.fallbackStrategy)?"bestFit":g,b=void 0===(y=u.fallbackAxisSideDirection)?"none":y,k=void 0===(C=u.flipAlignment)||C,D=sZ(u,_He),L=og(r),z=og(a)===a,he.next=23,null==l.isRTL?void 0:l.isRTL(c.floating);case 23:return R=he.sent,U=m||(z||!k?[wk(a)]:(void 0,_e=wk(Oe=a),[UP(Oe),_e,UP(_e)])),m||"none"===b||U.push.apply(U,ri(function(Oe,_e,Xe,Le){var rt=bk(Oe),B=function(ne,ie,Me){var Ye=["left","right"],je=["right","left"];switch(ne){case"top":case"bottom":return Me?ie?je:Ye:ie?Ye:je;case"left":case"right":return ie?["top","bottom"]:["bottom","top"];default:return[]}}(og(Oe),"start"===Xe,Le);return rt&&(B=B.map(function(ne){return ne+"-"+rt}),_e&&(B=B.concat(B.map(UP)))),B}(a,k,b,R))),G=[a].concat(ri(U)),he.next=29,Rae(n,D);case 29:if(X=he.sent,te=[],P=(null==(i=o.flip)?void 0:i.overflows)||[],h&&te.push(X[L]),p&&(W=LXe(r,s,R),te.push(X[W.main],X[W.cross])),P=[].concat(ri(P),[{placement:r,overflows:te}]),te.every(function(Oe){return Oe<=0})){he.next=48;break}if(I=((null==(le=o.flip)?void 0:le.index)||0)+1,!(N=G[I])){he.next=37;break}return he.abrupt("return",{data:{index:I,overflows:P},reset:{placement:N}});case 37:if(q=null==(E=P.filter(function(Oe){return Oe.overflows[0]<=0}).sort(function(Oe,_e){return Oe.overflows[1]-_e.overflows[1]})[0])?void 0:E.placement,q){he.next=46;break}he.t0=v,he.next="bestFit"===he.t0?42:"initialPlacement"===he.t0?45:46;break;case 42:return re=null==(V=P.map(function(Oe){return[Oe.placement,Oe.overflows.filter(function(_e){return _e>0}).reduce(function(_e,Xe){return _e+Xe},0)]}).sort(function(Oe,_e){return Oe[1]-_e[1]})[0])?void 0:V[0],re&&(q=re),he.abrupt("break",46);case 45:q=a;case 46:if(r===q){he.next=48;break}return he.abrupt("return",{reset:{placement:q}});case 48:return he.abrupt("return",{});case 49:case"end":return he.stop()}var Oe,_e},e)}))()}}},VXe=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn:function(n){return Ki(pn().mark(function e(){var i,r,o;return pn().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return i=n.x,r=n.y,s.next=4,function(){var a=Ki(pn().mark(function l(c,u){var d,h,f,p,m,g,v,y,b,C,k,D,L,z;return pn().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return d=c.placement,h=c.platform,f=c.elements,R.next=5,null==h.isRTL?void 0:h.isRTL(f.floating);case 5:return p=R.sent,m=og(d),g=bk(d),v="x"===xk(d),y=["left","top"].includes(m)?-1:1,b=p&&v?-1:1,C="function"==typeof u?u(c):u,k="number"==typeof C?{mainAxis:C,crossAxis:0,alignmentAxis:null}:Qe({mainAxis:0,crossAxis:0,alignmentAxis:null},C),D=k.mainAxis,L=k.crossAxis,z=k.alignmentAxis,R.abrupt("return",(g&&"number"==typeof z&&(L="end"===g?-1*z:z),v?{x:L*b,y:D*y}:{x:D*y,y:L*b}));case 14:case"end":return R.stop()}},l)}));return function(l,c){return a.apply(this,arguments)}}()(n,t);case 4:return s.abrupt("return",{x:i+(o=s.sent).x,y:r+o.y,data:o});case 6:case"end":return s.stop()}},e)}))()}}};function HXe(t){return"x"===t?"y":"x"}var UXe=function(t){return void 0===t&&(t={}),{name:"shift",options:t,fn:function(n){return Ki(pn().mark(function e(){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,L;return pn().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return r=n.x,o=n.y,s=n.placement,l=(a=t).mainAxis,c=void 0===l||l,d=void 0!==(u=a.crossAxis)&&u,f=void 0===(h=a.limiter)?{fn:function(R){return{x:R.x,y:R.y}}}:h,p=sZ(a,bHe),m={x:r,y:o},z.next=14,Rae(n,p);case 14:return g=z.sent,v=xk(og(s)),y=HXe(v),b=m[v],C=m[y],c&&(b=Lae(b+g["y"===v?"top":"left"],b,b-g["y"===v?"bottom":"right"])),d&&(C=Lae(C+g["y"===y?"top":"left"],C,C-g["y"===y?"bottom":"right"])),L=f.fn(Qe(Qe({},n),{},(Ul(i={},v,b),Ul(i,y,C),i))),z.abrupt("return",Qe(Qe({},L),{},{data:{x:L.x-r,y:L.y-o}}));case 22:case"end":return z.stop()}},e)}))()}}};function Sc(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function uh(t){return Sc(t).getComputedStyle(t)}var zP,$ae=Math.min,gb=Math.max,Ck=Math.round;function Bae(t){var n=uh(t),e=parseFloat(n.width),i=parseFloat(n.height),r=t.offsetWidth,o=t.offsetHeight,s=Ck(e)!==r||Ck(i)!==o;return s&&(e=r,i=o),{width:e,height:i,fallback:s}}function _p(t){return Hae(t)?(t.nodeName||"").toLowerCase():""}function Vae(){if(zP)return zP;var t=navigator.userAgentData;return t&&Array.isArray(t.brands)?zP=t.brands.map(function(n){return n.brand+"/"+n.version}).join(" "):navigator.userAgent}function dh(t){return t instanceof Sc(t).HTMLElement}function td(t){return t instanceof Sc(t).Element}function Hae(t){return t instanceof Sc(t).Node}function Uae(t){return typeof ShadowRoot<"u"&&(t instanceof Sc(t).ShadowRoot||t instanceof ShadowRoot)}function Sk(t){var n=uh(t),o=n.display;return/auto|scroll|overlay|hidden|clip/.test(n.overflow+n.overflowY+n.overflowX)&&!["inline","contents"].includes(o)}function zXe(t){return["table","td","th"].includes(_p(t))}function GP(t){var n=/firefox/i.test(Vae()),e=uh(t),i=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!i&&"none"!==i||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some(function(r){return e.willChange.includes(r)})||["paint","layout","strict","content"].some(function(r){var o=e.contain;return null!=o&&o.includes(r)})}function WP(){return/^((?!chrome|android).)*safari/i.test(Vae())}function qP(t){return["html","body","#document"].includes(_p(t))}function zae(t){return td(t)?t:t.contextElement}var Gae={x:1,y:1};function j0(t){var n=zae(t);if(!dh(n))return Gae;var e=n.getBoundingClientRect(),i=Bae(n),r=i.width,o=i.height,s=i.fallback,a=(s?Ck(e.width):e.width)/r,l=(s?Ck(e.height):e.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function sg(t,n,e,i){var r,o;void 0===n&&(n=!1),void 0===e&&(e=!1);var s=t.getBoundingClientRect(),a=zae(t),l=Gae;n&&(i?td(i)&&(l=j0(i)):l=j0(t));var c=a?Sc(a):window,u=WP()&&e,d=(s.left+(u&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/l.x,h=(s.top+(u&&(null==(o=c.visualViewport)?void 0:o.offsetTop)||0))/l.y,f=s.width/l.x,p=s.height/l.y;if(a)for(var m=Sc(a),g=i&&td(i)?Sc(i):i,v=m.frameElement;v&&i&&g!==m;){var y=j0(v),b=v.getBoundingClientRect(),C=getComputedStyle(v);b.x+=(v.clientLeft+parseFloat(C.paddingLeft))*y.x,b.y+=(v.clientTop+parseFloat(C.paddingTop))*y.y,d*=y.x,h*=y.y,f*=y.x,p*=y.y,d+=b.x,h+=b.y,v=Sc(v).frameElement}return{width:f,height:p,top:h,right:d+f,bottom:h+p,left:d,x:d,y:h}}function bp(t){return((Hae(t)?t.ownerDocument:t.document)||window.document).documentElement}function kk(t){return td(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Wae(t){return sg(bp(t)).left+kk(t).scrollLeft}function vb(t){if("html"===_p(t))return t;var n=t.assignedSlot||t.parentNode||Uae(t)&&t.host||bp(t);return Uae(n)?n.host:n}function qae(t){var n=vb(t);return qP(n)?n.ownerDocument.body:dh(n)&&Sk(n)?n:qae(n)}function yb(t,n){var e;void 0===n&&(n=[]);var i=qae(t),r=i===(null==(e=t.ownerDocument)?void 0:e.body),o=Sc(i);return r?n.concat(o,o.visualViewport||[],Sk(i)?i:[]):n.concat(i,yb(i))}function Yae(t,n,e){var i,l,c,u,d,h,f,p,m;if("viewport"===n)i=function(l,c){var u=Sc(l),d=bp(l),h=u.visualViewport,f=d.clientWidth,p=d.clientHeight,m=0,g=0;if(h){f=h.width,p=h.height;var v=WP();(!v||v&&"fixed"===c)&&(m=h.offsetLeft,g=h.offsetTop)}return{width:f,height:p,x:m,y:g}}(t,e);else if("document"===n)l=bp(t),c=bp(l),u=kk(l),h=gb(c.scrollWidth,c.clientWidth,(d=l.ownerDocument.body).scrollWidth,d.clientWidth),f=gb(c.scrollHeight,c.clientHeight,d.scrollHeight,d.clientHeight),p=-u.scrollLeft+Wae(l),m=-u.scrollTop,"rtl"===uh(d).direction&&(p+=gb(c.clientWidth,d.clientWidth)-h),i={width:h,height:f,x:p,y:m};else if(td(n))i=function(l,c){var u=sg(l,!0,"fixed"===c),d=u.top+l.clientTop,h=u.left+l.clientLeft,f=dh(l)?j0(l):{x:1,y:1};return{width:l.clientWidth*f.x,height:l.clientHeight*f.y,x:h*f.x,y:d*f.y}}(n,e);else{var r=Qe({},n);if(WP()){var o,s,a=Sc(t);r.x-=(null==(o=a.visualViewport)?void 0:o.offsetLeft)||0,r.y-=(null==(s=a.visualViewport)?void 0:s.offsetTop)||0}i=r}return VP(i)}function Xae(t,n){return dh(t)&&"fixed"!==uh(t).position?n?n(t):t.offsetParent:null}function Jae(t,n){for(var e=Sc(t),i=Xae(t,n);i&&zXe(i)&&"static"===uh(i).position;)i=Xae(i,n);return i&&("html"===_p(i)||"body"===_p(i)&&"static"===uh(i).position&&!GP(i))?e:i||function(r){for(var o=vb(r);dh(o)&&!qP(o);){if(GP(o))return o;o=vb(o)}return null}(t)||e}function GXe(t,n,e){var i=dh(n),r=bp(n),o=sg(t,!0,"fixed"===e,n),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};if(i||!i&&"fixed"!==e)if(("body"!==_p(n)||Sk(r))&&(s=kk(n)),dh(n)){var l=sg(n,!0);a.x=l.x+n.clientLeft,a.y=l.y+n.clientTop}else r&&(a.x=Wae(r));return{x:o.left+s.scrollLeft-a.x,y:o.top+s.scrollTop-a.y,width:o.width,height:o.height}}var WXe={getClippingRect:function(t){var n=t.element,e=t.boundary,i=t.rootBoundary,r=t.strategy,o="clippingAncestors"===e?function(c,u){var d=u.get(c);if(d)return d;for(var h=yb(c).filter(function(y){return td(y)&&"body"!==_p(y)}),f=null,p="fixed"===uh(c).position,m=p?vb(c):c;td(m)&&!qP(m);){var g=uh(m),v=GP(m);"fixed"===g.position?f=null:(p?v||f:v||"static"!==g.position||!f||!["absolute","fixed"].includes(f.position))?f=g:h=h.filter(function(y){return y!==m}),m=vb(m)}return u.set(c,h),h}(n,this._c):[].concat(e),s=[].concat(ri(o),[i]),l=s.reduce(function(c,u){var d=Yae(n,u,r);return c.top=gb(d.top,c.top),c.right=$ae(d.right,c.right),c.bottom=$ae(d.bottom,c.bottom),c.left=gb(d.left,c.left),c},Yae(n,s[0],r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){var n=t.rect,e=t.offsetParent,i=t.strategy,r=dh(e),o=bp(e);if(e===o)return n;var s={scrollLeft:0,scrollTop:0},a={x:1,y:1},l={x:0,y:0};if((r||!r&&"fixed"!==i)&&(("body"!==_p(e)||Sk(o))&&(s=kk(e)),dh(e))){var c=sg(e);a=j0(e),l.x=c.x+e.clientLeft,l.y=c.y+e.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-s.scrollLeft*a.x+l.x,y:n.y*a.y-s.scrollTop*a.y+l.y}},isElement:td,getDimensions:function(t){return dh(t)?Bae(t):t.getBoundingClientRect()},getOffsetParent:Jae,getDocumentElement:bp,getScale:j0,getElementRects:function(t){var n=this;return Ki(pn().mark(function e(){var i,r,o,s,a;return pn().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return i=t.reference,r=t.floating,o=t.strategy,s=n.getOffsetParent||Jae,a=n.getDimensions,l.t0=GXe,l.t1=i,l.next=6,s(r);case 6:return l.t2=l.sent,l.t3=o,l.t4=(0,l.t0)(l.t1,l.t2,l.t3),l.t5=Qe,l.t6={x:0,y:0},l.next=13,a(r);case 13:return l.t7=l.sent,l.t8=(0,l.t5)(l.t6,l.t7),l.abrupt("return",{reference:l.t4,floating:l.t8});case 16:case"end":return l.stop()}},e)}))()},getClientRects:function(t){return Array.from(t.getClientRects())},isRTL:function(t){return"rtl"===uh(t).direction}};function XXe(t){var e=t.filterText,i=t.items,r=t.multiple,o=t.value,s=t.itemId,a=t.groupBy,l=t.filterSelectedItems,c=t.itemFilter,u=t.convertStringItemsToObjects,d=t.filterGroupedItems,h=t.label;if(i&&t.loadOptions)return i;if(!i)return[];i&&i.length>0&&"object"!==gn(i[0])&&(i=u(i));var f=i.filter(function(p){var m=c(p[h],e,p);return m&&r&&null!=o&&o.length&&(m=!o.some(function(g){return!!l&&g[s]===p[s]})),m});return a&&(f=d(f)),f}function JXe(t){return YP.apply(this,arguments)}function YP(){return YP=Ki(pn().mark(function t(n){var e,i,r,o,s;return pn().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=n.dispatch,i=n.loadOptions,r=n.convertStringItemsToObjects,o=n.filterText,a.next=3,i(o).catch(function(l){console.warn("svelte-select loadOptions error :>> ",l),e("error",{type:"loadOptions",details:l})});case 3:if(!(s=a.sent)||s.cancelled){a.next=7;break}return s?(s&&s.length>0&&"object"!==gn(s[0])&&(s=r(s)),e("loaded",{items:s})):s=[],a.abrupt("return",{filteredItems:s,loading:!1,focused:!0,listOpen:!0});case 7:case"end":return a.stop()}},t)})),YP.apply(this,arguments)}function KXe(t){di(t,"svelte-qbd276","svg.svelte-qbd276{width:var(--chevron-icon-width, 20px);height:var(--chevron-icon-width, 20px);color:var(--chevron-icon-colour, currentColor)}")}function QXe(t){var n,e;return{c:function(){n=Yd("svg"),j(e=Yd("path"),"fill","currentColor"),j(e,"d","M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747\n 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0\n 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502\n 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0\n 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"),j(n,"width","100%"),j(n,"height","100%"),j(n,"viewBox","0 0 20 20"),j(n,"focusable","false"),j(n,"aria-hidden","true"),j(n,"class","svelte-qbd276")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:jt,i:jt,o:jt,d:function(i){i&&Fe(n)}}}var ZXe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,null,QXe,ps,{},KXe),r}return Se(e)}();function eJe(t){di(t,"svelte-whdbu1","svg.svelte-whdbu1{width:var(--clear-icon-width, 20px);height:var(--clear-icon-width, 20px);color:var(--clear-icon-color, currentColor)}")}function tJe(t){var n,e;return{c:function(){n=Yd("svg"),j(e=Yd("path"),"fill","currentColor"),j(e,"d","M34.923,37.251L24,26.328L13.077,37.251L9.436,33.61l10.923-10.923L9.436,11.765l3.641-3.641L24,19.047L34.923,8.124\n l3.641,3.641L27.641,22.688L38.564,33.61L34.923,37.251z"),j(n,"width","100%"),j(n,"height","100%"),j(n,"viewBox","-2 -2 50 50"),j(n,"focusable","false"),j(n,"aria-hidden","true"),j(n,"role","presentation"),j(n,"class","svelte-whdbu1")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:jt,i:jt,o:jt,d:function(i){i&&Fe(n)}}}var Dk=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,null,tJe,ps,{},eJe),r}return Se(e)}();function nJe(t){di(t,"svelte-1p3nqvd",".loading.svelte-1p3nqvd{width:var(--spinner-width, 20px);height:var(--spinner-height, 20px);color:var(--spinner-color, var(--icons-color));animation:svelte-1p3nqvd-rotate 0.75s linear infinite;transform-origin:center center;transform:none}.circle_path.svelte-1p3nqvd{stroke-dasharray:90;stroke-linecap:round}@keyframes svelte-1p3nqvd-rotate{100%{transform:rotate(360deg)}}")}function iJe(t){var n,e;return{c:function(){n=Yd("svg"),j(e=Yd("circle"),"class","circle_path svelte-1p3nqvd"),j(e,"cx","50"),j(e,"cy","50"),j(e,"r","20"),j(e,"fill","none"),j(e,"stroke","currentColor"),j(e,"stroke-width","5"),j(e,"stroke-miterlimit","10"),j(n,"class","loading svelte-1p3nqvd"),j(n,"viewBox","25 25 50 50")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:jt,i:jt,o:jt,d:function(i){i&&Fe(n)}}}var rJe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,null,iJe,ps,{},nJe),r}return Se(e)}();function oJe(t){di(t,"svelte-tyxmms",".svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{--borderRadius:var(--border-radius);--clearSelectColor:var(--clear-select-color);--clearSelectWidth:var(--clear-select-width);--disabledBackground:var(--disabled-background);--disabledBorderColor:var(--disabled-border-color);--disabledColor:var(--disabled-color);--disabledPlaceholderColor:var(--disabled-placeholder-color);--disabledPlaceholderOpacity:var(--disabled-placeholder-opacity);--errorBackground:var(--error-background);--errorBorder:var(--error-border);--groupItemPaddingLeft:var(--group-item-padding-left);--groupTitleColor:var(--group-title-color);--groupTitleFontSize:var(--group-title-font-size);--groupTitleFontWeight:var(--group-title-font-weight);--groupTitlePadding:var(--group-title-padding);--groupTitleTextTransform:var(--group-title-text-transform);--indicatorColor:var(--chevron-color);--indicatorHeight:var(--chevron-height);--indicatorWidth:var(--chevron-width);--inputColor:var(--input-color);--inputLeft:var(--input-left);--inputLetterSpacing:var(--input-letter-spacing);--inputMargin:var(--input-margin);--inputPadding:var(--input-padding);--itemActiveBackground:var(--item-active-background);--itemColor:var(--item-color);--itemFirstBorderRadius:var(--item-first-border-radius);--itemHoverBG:var(--item-hover-bg);--itemHoverColor:var(--item-hover-color);--itemIsActiveBG:var(--item-is-active-bg);--itemIsActiveColor:var(--item-is-active-color);--itemIsNotSelectableColor:var(--item-is-not-selectable-color);--itemPadding:var(--item-padding);--listBackground:var(--list-background);--listBorder:var(--list-border);--listBorderRadius:var(--list-border-radius);--listEmptyColor:var(--list-empty-color);--listEmptyPadding:var(--list-empty-padding);--listEmptyTextAlign:var(--list-empty-text-align);--listMaxHeight:var(--list-max-height);--listPosition:var(--list-position);--listShadow:var(--list-shadow);--listZIndex:var(--list-z-index);--multiItemBG:var(--multi-item-bg);--multiItemBorderRadius:var(--multi-item-border-radius);--multiItemDisabledHoverBg:var(--multi-item-disabled-hover-bg);--multiItemDisabledHoverColor:var(--multi-item-disabled-hover-color);--multiItemHeight:var(--multi-item-height);--multiItemMargin:var(--multi-item-margin);--multiItemPadding:var(--multi-item-padding);--multiSelectInputMargin:var(--multi-select-input-margin);--multiSelectInputPadding:var(--multi-select-input-padding);--multiSelectPadding:var(--multi-select-padding);--placeholderColor:var(--placeholder-color);--placeholderOpacity:var(--placeholder-opacity);--selectedItemPadding:var(--selected-item-padding);--spinnerColor:var(--spinner-color);--spinnerHeight:var(--spinner-height);--spinnerWidth:var(--spinner-width);--internal-padding:0 0 0 16px;border:var(--border, 1px solid #d8dbdf);border-radius:var(--border-radius, 6px);min-height:var(--height, 42px);position:relative;display:flex;align-items:stretch;padding:var(--padding, var(--internal-padding));background:var(--background, #fff);margin:var(--margin, 0);width:var(--width, 100%);font-size:var(--font-size, 16px)}.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-sizing:var(--box-sizing, border-box)}.svelte-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{border:var(--border-hover, 1px solid #b2b8bf)}.value-container.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:center;gap:5px 10px;padding:5px 0;position:relative;overflow:hidden;align-self:stretch}.prepend.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.indicators.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;flex-shrink:0;align-items:center}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:absolute;cursor:default;border:none;color:var(--input-color, var(--item-color));padding:var(--input-padding, 0);letter-spacing:var(--input-letter-spacing, inherit);margin:var(--input-margin, 0);min-width:10px;top:0;right:0;bottom:0;left:0;background:transparent;font-size:var(--font-size, 16px)}.svelte-tyxmms:not(.multi)>.value-container.svelte-tyxmms>input.svelte-tyxmms{width:100%;height:100%}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--placeholder-color, #78848f);opacity:var(--placeholder-opacity, 1)}input.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.svelte-select.focused.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--border-focused, 1px solid #006fe8);border-radius:var(--border-radius-focused, var(--border-radius, 6px))}.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--disabled-background, #ebedef);border-color:var(--disabled-border-color, #ebedef);color:var(--disabled-color, #c1c6cc)}.disabled.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms::placeholder{color:var(--disabled-placeholder-color, #c1c6cc);opacity:var(--disabled-placeholder-opacity, 1)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{position:relative;overflow:var(--selected-item-overflow, hidden);padding:var(--selected-item-padding, 0 20px 0 0);text-overflow:ellipsis;white-space:nowrap;color:var(--selected-item-color, inherit);font-size:var(--font-size, 16px)}.multi.svelte-tyxmms .selected-item.svelte-tyxmms.svelte-tyxmms{position:absolute;line-height:var(--height, 42px);height:var(--height, 42px)}.selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:none}.hide-selected-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0}.icon.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{all:unset;display:flex;align-items:center;justify-content:center;width:var(--clear-select-width, 40px);height:var(--clear-select-height, 100%);color:var(--clear-select-color, var(--icons-color));margin:var(--clear-select-margin, 0);pointer-events:all;flex-shrink:0}.clear-select.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:focus{outline:var(--clear-select-focus-outline, 1px solid #006fe8)}.loading.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--loading-width, 40px);height:var(--loading-height);color:var(--loading-color, var(--icons-color));margin:var(--loading--margin, 0);flex-shrink:0}.chevron.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{width:var(--chevron-width, 40px);height:var(--chevron-height, 40px);background:var(--chevron-background, transparent);pointer-events:var(--chevron-pointer-events, none);color:var(--chevron-color, var(--icons-color));border:var(--chevron-border, 0 0 0 1px solid #d8dbdf);flex-shrink:0}.multi.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-padding, var(--internal-padding))}.multi.svelte-tyxmms input.svelte-tyxmms.svelte-tyxmms{padding:var(--multi-select-input-padding, 0);position:relative;margin:var(--multi-select-input-margin, 5px 0);flex:1 1 40px}.svelte-select.error.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border:var(--error-border, 1px solid #ff2d55);background:var(--error-background, #fff)}.a11y-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{z-index:9999;border:0px;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0px;white-space:nowrap}.multi-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--multi-item-bg, #ebedef);margin:var(--multi-item-margin, 0);outline:var(--multi-item-outline, 1px solid #ddd);border-radius:var(--multi-item-border-radius, 4px);height:var(--multi-item-height, 25px);line-height:var(--multi-item-height, 25px);display:flex;cursor:default;padding:var(--multi-item-padding, 0 5px);overflow:hidden;gap:var(--multi-item-gap, 4px);outline-offset:-1px;max-width:var(--multi-max-width, none);color:var(--multi-item-color, var(--item-color))}.multi-item.disabled.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:hover{background:var(--multi-item-disabled-hover-bg, #ebedef);color:var(--multi-item-disabled-hover-color, #c1c6cc)}.multi-item-text.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.multi-item-clear.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{display:flex;align-items:center;justify-content:center;--clear-icon-color:var(--multi-item-clear-icon-color, #000)}.multi-item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{outline:var(--multi-item-active-outline, 1px solid #006fe8)}.svelte-select-list.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{box-shadow:var(--list-shadow, 0 2px 3px 0 rgba(44, 62, 80, 0.24));border-radius:var(--list-border-radius, 4px);max-height:var(--list-max-height, 252px);overflow-y:auto;background:var(--list-background, #fff);position:var(--list-position, absolute);z-index:var(--list-z-index, 2);border:var(--list-border)}.prefloat.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;pointer-events:none}.list-group-title.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{color:var(--group-title-color, #8f8f8f);cursor:default;font-size:var(--group-title-font-size, 16px);font-weight:var(--group-title-font-weight, 600);height:var(--height, 42px);line-height:var(--height, 42px);padding:var(--group-title-padding, 0 20px);text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap;text-transform:var(--group-title-text-transform, uppercase)}.empty.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{text-align:var(--list-empty-text-align, center);padding:var(--list-empty-padding, 20px 0);color:var(--list-empty-color, #78848f)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{cursor:default;height:var(--item-height, var(--height, 42px));line-height:var(--item-line-height, var(--height, 42px));padding:var(--item-padding, 0 20px);color:var(--item-color, inherit);text-overflow:ellipsis;overflow:hidden;white-space:nowrap;transition:var(--item-transition, all 0.2s);align-items:center;width:100%}.item.group-item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{padding-left:var(--group-item-padding-left, 40px)}.item.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{background:var(--item-active-background, #b9daff)}.item.active.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{background:var(--item-is-active-bg, #007aff);color:var(--item-is-active-color, #fff)}.item.first.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{border-radius:var(--item-first-border-radius, 4px 4px 0 0)}.item.hover.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:not(.active){background:var(--item-hover-bg, #e7f2ff);color:var(--item-hover-color, inherit)}.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.hover.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.active.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms,.item.not-selectable.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms:active{color:var(--item-is-not-selectable-color, #999);background:transparent}.required.svelte-tyxmms.svelte-tyxmms.svelte-tyxmms{opacity:0;z-index:-1;position:absolute;top:0;left:0;bottom:0;right:0}")}var sJe=function(t){return{value:8&t[0]}},Kae=function(t){return{value:t[3]}},aJe=function(t){return{listOpen:64&t[0]}},Qae=function(t){return{listOpen:t[6]}},lJe=function(t){return{}},Zae=function(t){return{}},cJe=function(t){return{}},ele=function(t){return{}},uJe=function(t){return{selection:8&t[0]}},tle=function(t){return{selection:t[3]}};function nle(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var dJe=function(t){return{}},ile=function(t){return{}},hJe=function(t){return{selection:8&t[0]}},rle=function(t){return{selection:t[127],index:t[129]}},fJe=function(t){return{}},ole=function(t){return{}},pJe=function(t){return{}},sle=function(t){return{}};function ale(t,n,e){var i=t.slice();return i[127]=n[e],i[129]=e,i}var mJe=function(t){return{item:16777216&t[0]}},lle=function(t){return{item:t[127],index:t[129]}},gJe=function(t){return{filteredItems:16777216&t[0]}},cle=function(t){return{filteredItems:t[24]}};function ule(t){var n,e,i,r,o,s,a=[_Je,yJe,vJe],l=[];function c(u,d){return u[51].list?0:u[24].length>0?1:u[19]?-1:2}return~(e=c(t))&&(i=l[e]=a[e](t)),{c:function(){n=ve("div"),i&&i.c(),j(n,"class","svelte-select-list svelte-tyxmms"),At(n,"prefloat",t[28])},m:function(u,d){Pe(u,n,d),~e&&l[e].m(n,null),t[91](n),r=!0,o||(s=[ya(t[49].call(null,n)),It(n,"scroll",t[41]),It(n,"pointerdown",nf(t[50])),It(n,"pointerup",rf(nf(t[86])))],o=!0)},p:function(u,d){var h=e;(e=c(u))===h?~e&&l[e].p(u,d):(i&&(Lt(),ae(l[h],1,1,function(){l[h]=null}),$t()),~e?((i=l[e])?i.p(u,d):(i=l[e]=a[e](u)).c(),K(i,1),i.m(n,null)):i=null),(!r||268435456&d[0])&&At(n,"prefloat",u[28])},i:function(u){r||(K(i),r=!0)},o:function(u){ae(i),r=!1},d:function(u){u&&Fe(n),~e&&l[e].d(),t[91](null),o=!1,so(s)}}}function vJe(t){var n,e,i=t[83].empty,r=Ss(i,t,t[82],sle),o=r||{c:function(){(e=ve("div")).textContent="No options",j(e,"class","empty svelte-tyxmms")},m:function(s,a){Pe(s,e,a)},p:jt,d:function(s){s&&Fe(e)}};return{c:function(){o&&o.c()},m:function(s,a){o&&o.m(s,a),n=!0},p:function(s,a){r&&r.p&&(!n||1048576&a[2])&&Ds(r,i,s,s[82],n?ks(i,s[82],a,pJe):Ts(s[82]),sle)},i:function(s){n||(K(o,s),n=!0)},o:function(s){ae(o,s),n=!1},d:function(s){o&&o.d(s)}}}function yJe(t){for(var n,e,i=t[24],r=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:1;clearTimeout(h),h=setTimeout(Ke,Jn)}:kn,ci=n.debounceWait,li=void 0===ci?300:ci,Sr=n.hideEmptyState,qr=void 0!==Sr&&Sr,fi=n.inputAttributes,vr=void 0===fi?{}:fi,Te=n.listAutoWidth,kt=void 0===Te||Te,Vt=n.showChevron,rn=void 0!==Vt&&Vt,un=n.listOffset,ii=void 0===un?5:un,Ni=n.hoverItemIndex,$n=void 0===Ni?0:Ni,ei=n.floatingConfig,Xn=void 0===ei?{}:ei,yr=n.class,Er=void 0===yr?"":yr;function Io(Ke){var Jn=[],Qi={};Ke.forEach(function(wd){var jr=wr(wd);Jn.includes(jr)||(Jn.push(jr),Qi[jr]=[],jr&&Qi[jr].push(Object.assign(Us(jr,wd),{id:jr,groupHeader:!0,selectable:Vr}))),Qi[jr].push(Object.assign({groupItem:!!jr},wd))});var Gs=[];return mr(Jn).forEach(function(wd){Qi[wd]&&Gs.push.apply(Gs,ri(Qi[wd]))}),Gs}function sa(){var Ke=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,Jn=arguments.length>1?arguments[1]:void 0;e(7,$n=Ke<0?0:Ke),!Jn&&wr&&c[$n]&&!c[$n].selectable&&yo(1)}function md(){var Ke=!0;if(B){var Jn=[],Qi=[];B.forEach(function(Gs){Jn.includes(Gs[On])?Ke=!1:(Jn.push(Gs[On]),Qi.push(Gs))}),Ke||e(3,B=Qi)}return Ke}function pu(Ke){var Jn=Ke?Ke[On]:B[On];return fn.find(function(Qi){return Qi[On]===Jn})}function aa(Ke){return El.apply(this,arguments)}function El(){return(El=Ki(pn().mark(function Ke(Jn){var Qi;return pn().wrap(function(Gs){for(;;)switch(Gs.prev=Gs.next){case 0:Qi=B[Jn],e(3,B=1===B.length?void 0:B.filter(function(wd){return wd!==Qi})),L("clear",Qi);case 3:case"end":return Gs.stop()}},Ke)}))).apply(this,arguments)}function gd(Ke){var Jn;Le&&N===(null===(Jn=document)||void 0===Jn?void 0:Jn.activeElement)||(Ke&&L("focus",Ke),N.focus(),e(2,Le=!0))}function Ms(Ke){return vd.apply(this,arguments)}function vd(){return(vd=Ki(pn().mark(function Ke(Jn){return pn().wrap(function(Qi){for(;;)switch(Qi.prev=Qi.next){case 0:if(!ui&&!hx){Qi.next=2;break}return Qi.abrupt("return");case 2:(Ue||Le)&&(L("blur",Jn),yd(),e(2,Le=!1),e(26,f=void 0),N.blur());case 3:case"end":return Qi.stop()}},Ke)}))).apply(this,arguments)}function yd(){e(4,ie=""),e(6,Ue=!1)}y=Ki(pn().mark(function Ke(){return pn().wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:e(78,p=B),e(79,m=ie),e(80,g=V);case 3:case"end":return Jn.stop()}},Ke)})),Xv().$$.before_update.push(y),Yc(function(){Ue&&e(2,Le=!0),Le&&N&&N.focus()});var on,kT=n.ariaValues,we=void 0===kT?function(Ke){return"Option ".concat(Ke,", selected.")}:kT,at=n.ariaListOpen,Mt=void 0===at?function(Ke,Jn){return"You are currently focused on option ".concat(Ke,". There are ").concat(Jn," results available.")}:at,Xt=n.ariaFocused,nn=void 0===Xt?function(){return"Select is focused, type to refine list, press down to open the menu."}:Xt,Bn=null;function si(){clearTimeout(on),on=setTimeout(function(){ui=!1},100)}Hu(function(){var Ke;null===(Ke=Bn)||void 0===Ke||Ke.remove()});var ui=!1;function No(Ke){Ke&&!1!==Ke.selectable&&function(Jn){if(Jn){e(4,ie="");var Qi=Object.assign({},Jn);if(Qi.groupHeader&&!Qi.selectable)return;e(3,B=V?B?B.concat([Qi]):[Qi]:e(3,B=Qi)),setTimeout(function(){Hr&&yd(),e(26,f=void 0),L("change",B),L("select",Jn)})}}(Ke)}function Os(Ke){ui||e(7,$n=Ke)}function Yo(Ke){var Gs,Jn=Ke.item,Qi=Ke.i;if(!1!==Jn?.selectable){if(B&&!V&&B[On]===Jn[On])return yd();((Gs=Jn).groupHeader&&Gs.selectable||Gs.selectable||!Gs.hasOwnProperty("selectable"))&&(e(7,$n=Qi),No(Jn)),hx=!1}}function yo(Ke){if(0===c.filter(function(Qi){return!Object.hasOwn(Qi,"selectable")||!0===Qi.selectable}).length)return e(7,$n=0);e(7,Ke>0&&$n===c.length-1?$n=0:Ke<0&&0===$n?$n=c.length-1:$n+=Ke);var Jn=c[$n];Jn&&!1===Jn.selectable&&(1!==Ke&&-1!==Ke||yo(Ke))}var Al=_d,Sh=_d;function _d(Ke){return{update:function(Jn){Jn.scroll&&(si(),Ke.scrollIntoView({behavior:"auto",block:"nearest"}))}}}var Ar={strategy:"absolute",placement:"bottom-start",middleware:[VXe(ii),BXe(),UXe()],autoUpdate:!1},Kl=zn(function YXe(t){var n,e,i={autoUpdate:!0},r=t,o=function(l){return Qe(Qe(Qe({},i),t||{}),l||{})},s=function(l){var c,u,d,h,f,p;n&&e&&(r=o(l),(c=n,u=e,d=r,h=new Map,f=Qe({platform:WXe},d),p=Qe(Qe({},f.platform),{},{_c:h}),NXe(c,u,Qe(Qe({},f),{},{platform:p}))).then(function(c){var u;Object.assign(e.style,{position:c.strategy,left:"".concat(c.x,"px"),top:"".concat(c.y,"px")}),null!==(u=r)&&void 0!==u&&u.onComputed&&r.onComputed(c)}))};return[function(l){if("subscribe"in l)return function(l){Hu(l.subscribe(function(c){void 0===n?(n=c,s()):(Object.assign(n,c),s())}))}(l),{};n=l,s()},function(l,c){var u;e=l,r=o(c),setTimeout(function(){return s(c)},0),s(c);var d=function(){u&&(u(),u=void 0)},h=function(){var p=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:r||{}).autoUpdate;if(d(),!1!==p)return function qXe(t,n,e,i){void 0===i&&(i={});var o=i.ancestorScroll,a=i.ancestorResize,l=void 0===a||a,c=i.elementResize,u=void 0===c||c,d=i.animationFrame,h=void 0!==d&&d,f=(void 0===o||o)&&!h,p=f||l?[].concat(ri(td(t)?yb(t):t.contextElement?yb(t.contextElement):[]),ri(yb(n))):[];p.forEach(function(b){f&&b.addEventListener("scroll",e,{passive:!0}),l&&b.addEventListener("resize",e)});var m,g=null;if(u){var v=!0;g=new ResizeObserver(function(){v||e(),v=!1}),td(t)&&!h&&g.observe(t),td(t)||!t.contextElement||h||g.observe(t.contextElement),g.observe(n)}var y=h?sg(t):null;return h&&function b(){var C=sg(t);!y||C.x===y.x&&C.y===y.y&&C.width===y.width&&C.height===y.height||e(),y=C,m=requestAnimationFrame(b)}(),e(),function(){var b;p.forEach(function(C){f&&C.removeEventListener("scroll",e),l&&C.removeEventListener("resize",e)}),null==(b=g)||b.disconnect(),g=null,h&&cancelAnimationFrame(m)}}(n,e,function(){return s(r)},!0===p?{}:p)};return u=h(),{update:function(f){s(f),u=h(f)},destroy:function(){d()}}},s]}(Ar),3),mu=Kl[0],bd=Kl[1],kh=Kl[2],xd=!0,hx=!1;return t.$$set=function(Ke){"justValue"in Ke&&e(53,R=Ke.justValue),"filter"in Ke&&e(54,G=Ke.filter),"getItems"in Ke&&e(55,te=Ke.getItems),"id"in Ke&&e(56,W=Ke.id),"name"in Ke&&e(8,H=Ke.name),"container"in Ke&&e(0,E=Ke.container),"input"in Ke&&e(1,N=Ke.input),"multiple"in Ke&&e(9,V=Ke.multiple),"multiFullItemClearable"in Ke&&e(10,he=Ke.multiFullItemClearable),"disabled"in Ke&&e(11,_e=Ke.disabled),"focused"in Ke&&e(2,Le=Ke.focused),"value"in Ke&&e(3,B=Ke.value),"filterText"in Ke&&e(4,ie=Ke.filterText),"placeholder"in Ke&&e(57,Ye=Ke.placeholder),"placeholderAlwaysShow"in Ke&&e(58,yt=Ke.placeholderAlwaysShow),"items"in Ke&&e(52,fn=Ke.items),"label"in Ke&&e(12,Zt=Ke.label),"itemFilter"in Ke&&e(59,ln=Ke.itemFilter),"groupBy"in Ke&&e(60,wr=Ke.groupBy),"groupFilter"in Ke&&e(61,mr=Ke.groupFilter),"groupHeaderSelectable"in Ke&&e(62,Vr=Ke.groupHeaderSelectable),"itemId"in Ke&&e(13,On=Ke.itemId),"loadOptions"in Ke&&e(63,ai=Ke.loadOptions),"containerStyles"in Ke&&e(14,Cr=Ke.containerStyles),"hasError"in Ke&&e(15,qo=Ke.hasError),"filterSelectedItems"in Ke&&e(64,In=Ke.filterSelectedItems),"required"in Ke&&e(16,vi=Ke.required),"closeListOnChange"in Ke&&e(65,Hr=Ke.closeListOnChange),"createGroupHeaderItem"in Ke&&e(66,Us=Ke.createGroupHeaderItem),"searchable"in Ke&&e(17,zs=Ke.searchable),"inputStyles"in Ke&&e(18,qa=Ke.inputStyles),"clearable"in Ke&&e(68,xe=Ke.clearable),"loading"in Ke&&e(5,We=Ke.loading),"listOpen"in Ke&&e(6,Ue=Ke.listOpen),"debounce"in Ke&&e(69,ni=Ke.debounce),"debounceWait"in Ke&&e(70,li=Ke.debounceWait),"hideEmptyState"in Ke&&e(19,qr=Ke.hideEmptyState),"inputAttributes"in Ke&&e(71,vr=Ke.inputAttributes),"listAutoWidth"in Ke&&e(72,kt=Ke.listAutoWidth),"showChevron"in Ke&&e(20,rn=Ke.showChevron),"listOffset"in Ke&&e(73,ii=Ke.listOffset),"hoverItemIndex"in Ke&&e(7,$n=Ke.hoverItemIndex),"floatingConfig"in Ke&&e(74,Xn=Ke.floatingConfig),"class"in Ke&&e(21,Er=Ke.class),"ariaValues"in Ke&&e(75,we=Ke.ariaValues),"ariaListOpen"in Ke&&e(76,Mt=Ke.ariaListOpen),"ariaFocused"in Ke&&e(77,nn=Ke.ariaFocused),"$$scope"in Ke&&e(82,k=Ke.$$scope)},t.$$.update=function(){var Ke,Jn,Qi,Gs,wd,jr;8&t.$$.dirty[0]|2097152&t.$$.dirty[1]&&B&&function(){if("string"==typeof B){var jr,Ws=(fn||[]).find(function(gu){return gu[On]===B});e(3,B=Ws||(Ul(jr={},On,B),Ul(jr,"label",B),jr))}else V&&Array.isArray(B)&&B.length>0&&e(3,B=B.map(function(gu){return"string"==typeof gu?{value:gu,label:gu}:gu}))}(),131072&t.$$.dirty[0]|512&t.$$.dirty[2]&&(!vr&&zs||(e(27,v=Object.assign({autocapitalize:"none",autocomplete:"off",autocorrect:"off",spellcheck:!1,tabindex:0,type:"text","aria-autocomplete":"list"},vr)),W&&e(27,v.id=W,v),zs||e(27,v.readonly=!0,v))),512&t.$$.dirty[0]&&V&&B&&(Array.isArray(B)?e(3,B=ri(B)):e(3,B=[B])),512&t.$$.dirty[0]|262144&t.$$.dirty[2]&&g&&!V&&B&&e(3,B=null),520&t.$$.dirty[0]&&V&&B&&B.length>1&&md(),8&t.$$.dirty[0]&&B&&(V?JSON.stringify(B)!==JSON.stringify(p)&&md()&&L("input",B):p&&JSON.stringify(B[On])===JSON.stringify(p[On])||L("input",B)),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&!B&&V&&p&&L("input",B),6&t.$$.dirty[0]&&!Le&&N&&yd(),16&t.$$.dirty[0]|131072&t.$$.dirty[2]&&ie!==m&&(ai||0!==ie.length)&&(ai?ni(Ki(pn().mark(function jr(){var Ws;return pn().wrap(function(gu){for(;;)switch(gu.prev=gu.next){case 0:return e(5,We=!0),gu.next=3,te({dispatch:L,loadOptions:ai,convertStringItemsToObjects:ble,filterText:ie});case 3:(Ws=gu.sent)?(e(5,We=Ws.loading),e(6,Ue=Ue?Ws.listOpen:ie.length>0),e(2,Le=Ue&&Ws.focused),e(52,fn=wr?Io(Ws.filteredItems):Ws.filteredItems)):(e(5,We=!1),e(2,Le=!0),e(6,Ue=!0));case 5:case"end":return gu.stop()}},jr)})),li):(e(6,Ue=!0),V&&e(26,f=void 0))),12824&t.$$.dirty[0]|815792128&t.$$.dirty[1]|6&t.$$.dirty[2]&&e(24,c=G({loadOptions:ai,filterText:ie,items:fn,multiple:V,value:B,itemId:On,groupBy:wr,label:Zt,filterSelectedItems:In,itemFilter:ln,convertStringItemsToObjects:ble,filterGroupedItems:Io})),16777800&t.$$.dirty[0]&&!V&&Ue&&B&&c&&(Ke=c.findIndex(function(jr){return jr[On]===B[On]}),sa(Ke,!0)),576&t.$$.dirty[0]&&Ue&&V&&e(7,$n=0),16&t.$$.dirty[0]&&ie&&e(7,$n=0),128&t.$$.dirty[0]&&L("hoverItem",$n),520&t.$$.dirty[0]&&e(25,i=V?B&&B.length>0:B),33554448&t.$$.dirty[0]&&e(35,r=i&&ie.length>0),33556512&t.$$.dirty[0]|64&t.$$.dirty[2]&&e(34,o=i&&xe&&!_e&&!We),520&t.$$.dirty[0]|201326592&t.$$.dirty[1]&&e(33,s=yt&&V||V&&0===(null===(Jn=B)||void 0===Jn?void 0:Jn.length)?Ye:B?"":Ye),520&t.$$.dirty[0]&&e(32,a=B?(Qi=V&&B.length>0?B.map(function(jr){return jr[Zt]}).join(", "):B[Zt],we(Qi)):""),16777412&t.$$.dirty[0]&&e(31,l=function(){if(!c||0===c.length)return"";var jr=c[$n];return Ue&&jr?Mt(jr[Zt],c?c.length:0):nn()}()),2097152&t.$$.dirty[1]&&(jr=fn)&&0!==jr.length&&!jr.some(function(Ws){return"object"!==gn(Ws)})&&B&&(V?!B.some(function(Ws){return!Ws||!Ws[On]}):B[On])&&(Array.isArray(B)?e(3,B=B.map(function(Ws){return pu(Ws)||Ws})):e(3,B=pu()||B)),8712&t.$$.dirty[0]&&e(53,R=V?B?B.map(function(jr){return jr[On]}):null:B&&B[On]),520&t.$$.dirty[0]|65536&t.$$.dirty[2]&&(V||!p||B||L("input",B)),16777800&t.$$.dirty[0]&&Ue&&c&&!V&&!B&&sa(),16777216&t.$$.dirty[0]&&function(jr){Ue&&L("filter",jr)}(c),1&t.$$.dirty[0]|4096&t.$$.dirty[2]&&E&&void 0===(null===(Gs=Xn)||void 0===Gs?void 0:Gs.autoUpdate)&&e(81,Ar.autoUpdate=!0,Ar),1&t.$$.dirty[0]|528384&t.$$.dirty[2]&&E&&Xn&&kh(Object.assign(Ar,Xn)),8388608&t.$$.dirty[0]&&e(30,u=!!Bn),8388672&t.$$.dirty[0]&&function(jr,Ws){if(!jr||!Ws)return e(28,xd=!0);setTimeout(function(){e(28,xd=!1)},0)}(Bn,Ue),8388673&t.$$.dirty[0]&&Ue&&E&&Bn&&(wd=E.getBoundingClientRect().width,e(23,Bn.style.width=kt?wd+"px":"auto",Bn)),128&t.$$.dirty[0]&&e(29,d=$n),70&t.$$.dirty[0]&&N&&Ue&&!Le&&gd()},[E,N,Le,B,ie,We,Ue,$n,H,V,he,_e,Zt,On,Cr,qo,vi,zs,qa,qr,rn,Er,function(){L("clear",B),e(3,B=void 0),yd(),gd()},Bn,c,i,f,v,xd,d,u,l,a,s,o,r,aa,function(Ke){if(Le)switch(Ke.stopPropagation(),Ke.key){case"Escape":Ke.preventDefault(),yd();break;case"Enter":if(Ke.preventDefault(),Ue){if(0===c.length)break;if(B&&!V&&B[On]===c[$n][On]){yd();break}No(c[$n])}break;case"ArrowDown":Ke.preventDefault(),Ue?yo(1):(e(6,Ue=!0),e(26,f=void 0));break;case"ArrowUp":Ke.preventDefault(),Ue?yo(-1):(e(6,Ue=!0),e(26,f=void 0));break;case"Tab":if(Ue&&Le){if(0===c.length||B&&B[On]===c[$n][On])return yd();Ke.preventDefault(),No(c[$n]),yd()}break;case"Backspace":if(!V||ie.length>0)return;if(V&&B&&B.length>0){if(aa(void 0!==f?f:B.length-1),0===f||void 0===f)break;e(26,f=B.length>f?f-1:void 0)}break;case"ArrowLeft":if(!B||!V||ie.length>0)return;void 0===f?e(26,f=B.length-1):B.length>f&&0!==f&&e(26,f-=1);break;case"ArrowRight":if(!B||!V||ie.length>0||void 0===f)return;f===B.length-1?e(26,f=void 0):f",">="].map(function(W){return{value:W,label:W}}),R=[{value:"asc",label:"ascending"},{value:"desc",label:"descending"}],U=null!==(i=D)&&void 0!==i&&null!==(r=i.filter)&&void 0!==r&&r.path?sb(D.filter.path):null,G=null!==(o=D)&&void 0!==o&&null!==(s=o.filter)&&void 0!==s&&s.relation?z.find(function(W){var J;return W.value===(null===(J=D.filter)||void 0===J?void 0:J.relation)}):null,X=(null===(a=D)||void 0===a||null===(l=a.filter)||void 0===l?void 0:l.value)||"",te=null!==(c=D)&&void 0!==c&&null!==(u=c.sort)&&void 0!==u&&u.path?sb(D.sort.path):null,P=null!==(d=D)&&void 0!==d&&null!==(h=d.sort)&&void 0!==h&&h.direction?R.find(function(W){var J;return W.value===(null===(J=D.sort)||void 0===J?void 0:J.direction)}):null;return t.$$set=function(W){"json"in W&&e(11,C=W.json),"queryOptions"in W&&e(10,D=W.queryOptions),"onChange"in W&&e(12,L=W.onChange)},t.$$.update=function(){var W,J,H,le,E,I,N,q,V,re,he,Oe,_e,Xe,Le,rt,B,ne,ie,Me,Ye;2048&t.$$.dirty&&e(15,f=Array.isArray(C)),34816&t.$$.dirty&&e(14,p=f?hP(C):[]),34816&t.$$.dirty&&e(13,m=f?hP(C,!0):[]),16384&t.$$.dirty&&e(7,g=p.map(sb)),8192&t.$$.dirty&&e(6,v=m?m.map(sb):[]),1088&t.$$.dirty&&e(5,y=null!==(W=D)&&void 0!==W&&null!==(J=W.projection)&&void 0!==J&&J.paths&&v?D.projection.paths.map(function(ie){return v.find(function(Me){return ir(Me.value,ie)})}).filter(function(ie){return!!ie}):null),1&t.$$.dirty&&(le=(null===(H=U)||void 0===H?void 0:H.value)||null,ir(null===(E=D)||void 0===E||null===(I=E.filter)||void 0===I?void 0:I.path,le)||(b("changeFilterPath",le),e(10,D=qu(D,["filter","path"],le,!0)),L(D))),2&t.$$.dirty&&(q=(null===(N=G)||void 0===N?void 0:N.value)||null,ir(null===(V=D)||void 0===V||null===(re=V.filter)||void 0===re?void 0:re.relation,q)||(b("changeFilterRelation",q),e(10,D=qu(D,["filter","relation"],q,!0)),L(D))),4&t.$$.dirty&&(ir(null===(Oe=D)||void 0===Oe||null===(_e=Oe.filter)||void 0===_e?void 0:_e.value,he=X||null)||(b("changeFilterValue",he),e(10,D=qu(D,["filter","value"],he,!0)),L(D))),8&t.$$.dirty&&(ie=(null===(Xe=te)||void 0===Xe?void 0:Xe.value)||null,ir(null===(Me=D)||void 0===Me||null===(Ye=Me.sort)||void 0===Ye?void 0:Ye.path,ie)||(b("changeSortPath",ie),e(10,D=qu(D,["sort","path"],ie,!0)),L(D))),16&t.$$.dirty&&(rt=(null===(Le=P)||void 0===Le?void 0:Le.value)||null,ir(null===(B=D)||void 0===B||null===(ne=B.sort)||void 0===ne?void 0:ne.direction,rt)||(b("changeSortDirection",rt),e(10,D=qu(D,["sort","direction"],rt,!0)),L(D))),32&t.$$.dirty&&function(ie){var Me,Ye;ir(null===(Me=D)||void 0===Me||null===(Ye=Me.projection)||void 0===Ye?void 0:Ye.paths,ie)||(b("changeProjectionPaths",ie),e(10,D=qu(D,["projection","paths"],ie,!0)),L(D))}(y?y.map(function(ie){return ie.value}):null)},[U,G,X,te,P,y,v,g,z,R,D,C,L,m,p,f,function(W){e(0,U=W)},function(W){e(1,G=W)},function(){e(2,X=this.value)},function(W){e(3,te=W)},function(W){e(4,P=W)},function(W){e(5,y=W),e(10,D),e(6,v),e(13,m),e(15,f),e(11,C)}]}var TJe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,DJe,kJe,Ti,{json:11,queryOptions:10,onChange:12},SJe),r}return Se(e)}();function EJe(t){di(t,"svelte-19cxesy",".jse-select-query-language.svelte-19cxesy.svelte-19cxesy{position:relative;width:32px}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container.svelte-19cxesy{position:absolute;top:0;right:0;display:flex;flex-direction:column;box-shadow:var(--jse-controls-box-shadow)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;text-align:left;padding:var(--jse-padding) calc(2 * var(--jse-padding));white-space:nowrap;color:var(--jse-context-menu-color);background:var(--jse-context-menu-background)}.jse-select-query-language.svelte-19cxesy .jse-select-query-language-container .jse-query-language.svelte-19cxesy:hover{background:var(--jse-context-menu-background-highlight)}")}function xle(t,n,e){var i=t.slice();return i[5]=n[e],i}function AJe(t){var n,e;return n=new rr({props:{data:cb}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function MJe(t){var n,e;return n=new rr({props:{data:lb}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function wle(t){var n,e,i,r,o,s,a,l,c,u,d=t[5].name+"",h=[MJe,AJe],f=[];function p(g,v){return g[5].id===g[0]?0:1}function m(){return t[4](t[5])}return e=p(t),i=f[e]=h[e](t),{c:function(){n=ve("button"),i.c(),r=tt(),o=tn(d),s=tt(),j(n,"type","button"),j(n,"class","jse-query-language svelte-19cxesy"),j(n,"title",a="Select ".concat(t[5].name," as query language")),At(n,"selected",t[5].id===t[0])},m:function(g,v){Pe(g,n,v),f[e].m(n,null),ue(n,r),ue(n,o),ue(n,s),l=!0,c||(u=It(n,"click",m),c=!0)},p:function(g,v){var y=e;(e=p(t=g))===y?f[e].p(t,v):(Lt(),ae(f[y],1,1,function(){f[y]=null}),$t(),(i=f[e])?i.p(t,v):(i=f[e]=h[e](t)).c(),K(i,1),i.m(n,r)),(!l||2&v)&&d!==(d=t[5].name+"")&&qn(o,d),(!l||2&v&&a!==(a="Select ".concat(t[5].name," as query language")))&&j(n,"title",a),(!l||3&v)&&At(n,"selected",t[5].id===t[0])},i:function(g){l||(K(i),l=!0)},o:function(g){ae(i),l=!1},d:function(g){g&&Fe(n),f[e].d(),c=!1,u()}}}function OJe(t){for(var n,e,i,r=t[1],o=[],s=0;s1&&Cle(t);return s=new rr({props:{data:P0}}),{c:function(){n=ve("div"),(e=ve("div")).textContent="Transform",i=tt(),u&&u.c(),r=tt(),o=ve("button"),ft(s.$$.fragment),j(e,"class","jse-title svelte-d01h2s"),j(o,"type","button"),j(o,"class","jse-close svelte-d01h2s"),j(n,"class","jse-header svelte-d01h2s")},m:function(d,h){Pe(d,n,h),ue(n,e),ue(n,i),u&&u.m(n,null),ue(n,r),ue(n,o),dt(s,o,null),a=!0,l||(c=It(o,"click",t[2]),l=!0)},p:function(d,h){var f=zn(h,1)[0];d[0].length>1?u?(u.p(d,f),1&f&&K(u,1)):((u=Cle(d)).c(),K(u,1),u.m(n,r)):u&&(Lt(),ae(u,1,1,function(){u=null}),$t())},i:function(d){a||(K(u),K(s.$$.fragment,d),a=!0)},o:function(d){ae(u),ae(s.$$.fragment,d),a=!1},d:function(d){d&&Fe(n),u&&u.d(),ht(s),l=!1,c()}}}function jJe(t,n,e){var i,r,o=n.queryLanguages,s=n.queryLanguageId,a=n.onChangeQueryLanguage,l=_a("simple-modal").close,c=_a("absolute-popup"),u=c.openAbsolutePopup,d=c.closeAbsolutePopup;return t.$$set=function(h){"queryLanguages"in h&&e(0,o=h.queryLanguages),"queryLanguageId"in h&&e(4,s=h.queryLanguageId),"onChangeQueryLanguage"in h&&e(5,a=h.onChangeQueryLanguage)},[o,i,l,function(){r=u(NJe,{queryLanguages:o,queryLanguageId:s,onChangeQueryLanguage:function(h){d(r),a(h)}},{position:"bottom",offsetTop:-2,offsetLeft:0,anchor:i,closeOnOuterClick:!0})},s,a,function(h){Hi[h?"unshift":"push"](function(){e(1,i=h)})}]}var RJe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,jJe,PJe,Ti,{queryLanguages:0,queryLanguageId:4,onChangeQueryLanguage:5},FJe),r}return Se(e)}(),XP=ba("jsoneditor:AutoScrollHandler"),LJe=function(t,n,e,i){return(t/=i/2)<1?e/2*t*t+n:-e/2*(--t*(t-2)-1)+n},Sle=function(){var t,n,e,i,r,o,s,a,l,c,u,d,h;function p(v){return v.getBoundingClientRect().top-(t.getBoundingClientRect?t.getBoundingClientRect().top:0)+e}function m(v){t.scrollTo?t.scrollTo(t.scrollLeft,v):t.scrollTop=v}function g(v){c||(c=v),m(o(u=v-c,e,a,l)),h=!0,u1&&void 0!==arguments[1]?arguments[1]:{};switch(l=1e3,r=y.offset||0,d=void 0,o=y.easing||LJe,s=y.a11y||!1,gn(y.container)){case"object":t=y.container;break;case"string":t=document.querySelector(y.container);break;default:t=window.document.documentElement}switch(e=function f(){return t.scrollTop}(),gn(v)){case"number":n=void 0,s=!1,i=e+v;break;case"object":i=p(n=v);break;case"string":n=document.querySelector(v),i=p(n)}switch(a=i-e+r,gn(y.duration)){case"number":l=y.duration;break;case"function":l=y.duration(a)}h?c=0:requestAnimationFrame(g)}},Tk=ba("jsoneditor:History");function kle(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxItems||1e3,e=[],i=0;function r(){return i0}function s(){return{canUndo:r(),canRedo:o(),length:e.length}}function a(){t.onChange&&t.onChange(s())}return{add:function l(h){Tk("add",h),e=[h].concat(e.slice(i)).slice(0,n),i=0,a()},clear:function c(){Tk("clear"),e=[],i=0,a()},getState:s,undo:function u(){if(r()){var h=e[i];return i+=1,Tk("undo",h),a(),h}},redo:function d(){if(o())return Tk("redo",e[i-=1]),a(),e[i]}}}function R0(t,n){var e=Date.now(),i=t();return n(Date.now()-e),i}var L0=ba("validation");function Dle(t,n,e,i){return L0("validateJSON"),n?n(e!==i?i.parse(e.stringify(t)):t):[]}function $Je(t,n,e,i){if(L0("validateText"),t.length>104857600)return{validationErrors:[{path:[],message:"Validation turned off: the document is too large",severity:Jd.info}]};if(0===t.length)return null;try{var r=R0(function(){return e.parse(t)},function(l){return L0("validate: parsed json in ".concat(l," ms"))});if(!n)return null;var o=e===i?r:R0(function(){return i.parse(t)},function(l){return L0("validate: parsed json with the validationParser in ".concat(l," ms"))}),s=R0(function(){return n(o)},function(l){return L0("validate: validated json in ".concat(l," ms"))});return Ui(s)?null:{validationErrors:s}}catch(l){var a=R0(function(){return function(c,u){if(c.length>1048576)return!1;try{return u.parse(Kd(c)),!0}catch{return!1}}(t,e)},function(c){return L0("validate: checked whether repairable in ".concat(c," ms"))});return{parseError:sk(t,l.message||l.toString()),isRepairable:a}}}var Ek=ba("jsoneditor:FocusTracker");function JP(t){var n,i=t.onDestroy,r=t.getWindow,o=t.hasFocus,s=t.onFocus,a=t.onBlur,l=!1;function c(){var d=o();d&&(clearTimeout(n),l||(Ek("focus"),s(),l=d))}function u(){l&&(clearTimeout(n),n=setTimeout(function(){Ek("blur"),l=!1,a()}))}(0,t.onMount)(function(){Ek("mount FocusTracker");var d=r();d&&(d.addEventListener("focusin",c,!0),d.addEventListener("focusout",u,!0))}),i(function(){Ek("destroy FocusTracker");var d=r();d&&(d.removeEventListener("focusin",c,!0),d.removeEventListener("focusout",u,!0))})}function BJe(t){di(t,"svelte-fqu1ku",".jse-message.svelte-fqu1ku.svelte-fqu1ku{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);padding:var(--jse-padding);display:flex;gap:var(--jse-padding);flex-wrap:wrap;align-items:stretch}.jse-message.jse-success.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-success-background);color:var(--jse-message-success-color)}.jse-message.svelte-fqu1ku .jse-text.svelte-fqu1ku{display:flex;flex:1;min-width:60%;align-items:center}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku{cursor:pointer}.jse-message.svelte-fqu1ku .jse-text.jse-clickable.svelte-fqu1ku:hover{background-color:rgba(255, 255, 255, 0.1)}.jse-message.jse-error.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-error-background);color:var(--jse-message-error-color)}.jse-message.jse-warning.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-warning-background);color:var(--jse-message-warning-color)}.jse-message.jse-info.svelte-fqu1ku.svelte-fqu1ku{background:var(--jse-message-info-background);color:var(--jse-message-info-color)}.jse-message.svelte-fqu1ku .jse-actions.svelte-fqu1ku{display:flex;gap:var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-message-action-background);color:inherit;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding)}.jse-message.svelte-fqu1ku .jse-actions button.jse-action.svelte-fqu1ku:hover{background:var(--jse-message-action-background-highlight)}")}function Tle(t,n,e){var i=t.slice();return i[8]=n[e],i}function Ele(t){var n,e;return n=new rr({props:{data:t[1]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};2&r&&(o.data=i[1]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Ale(t){var n,e;return n=new rr({props:{data:t[8].icon}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};8&r&&(o.data=i[8].icon),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Mle(t){var n,e,i,r,o,s,a,l,c,u=t[8].text+"",d=t[8].icon&&Ale(t);function h(){return t[6](t[8])}function f(){return t[7](t[8])}return{c:function(){n=ve("button"),d&&d.c(),e=tt(),i=tn(u),r=tt(),j(n,"type","button"),j(n,"class","jse-button jse-action jse-primary svelte-fqu1ku"),j(n,"title",o=t[8].title),n.disabled=s=t[8].disabled},m:function(p,m){Pe(p,n,m),d&&d.m(n,null),ue(n,e),ue(n,i),ue(n,r),a=!0,l||(c=[It(n,"click",h),It(n,"mousedown",f)],l=!0)},p:function(p,m){(t=p)[8].icon?d?(d.p(t,m),8&m&&K(d,1)):((d=Ale(t)).c(),K(d,1),d.m(n,e)):d&&(Lt(),ae(d,1,1,function(){d=null}),$t()),(!a||8&m)&&u!==(u=t[8].text+"")&&qn(i,u),(!a||8&m&&o!==(o=t[8].title))&&j(n,"title",o),(!a||8&m&&s!==(s=t[8].disabled))&&(n.disabled=s)},i:function(p){a||(K(d),a=!0)},o:function(p){ae(d),a=!1},d:function(p){p&&Fe(n),d&&d.d(),l=!1,so(c)}}}function VJe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[1]&&Ele(t),f=t[3],p=[],m=0;m100&&Ple(t);return{c:function(){n=ve("table"),e=ve("tbody");for(var u=0;u100?c?c.p(u,d):((c=Ple(u)).c(),c.m(e,null)):c&&(c.d(1),c=null)},i:function(u){if(!r){for(var d=0;d1&&Nle(t);function y(){return t[6](t[7])}return{c:function(){n=ve("tr"),e=ve("td"),ft(i.$$.fragment),r=tt(),o=ve("td"),s=tn(m),a=tt(),l=ve("td"),c=tn(g),u=tt(),d=ve("td"),v&&v.c(),j(e,"class","jse-validation-error-icon svelte-1oe8e8r"),j(o,"class","svelte-1oe8e8r"),j(l,"class","svelte-1oe8e8r"),j(d,"class","jse-validation-error-action svelte-1oe8e8r"),j(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(b,C){Pe(b,n,C),ue(n,e),dt(i,e,null),ue(n,r),ue(n,o),ue(o,s),ue(n,a),ue(n,l),ue(l,c),ue(n,u),ue(n,d),v&&v.m(d,null),h=!0,f||(p=It(n,"click",y),f=!0)},p:function(b,C){t=b,(!h||1&C)&&m!==(m=iu(ql(t[7].path))+"")&&qn(s,m),(!h||1&C)&&g!==(g=t[7].message+"")&&qn(c,g),0===t[9]&&t[0].length>1?v?(v.p(t,C),1&C&&K(v,1)):((v=Nle(t)).c(),K(v,1),v.m(d,null)):v&&(Lt(),ae(v,1,1,function(){v=null}),$t())},i:function(b){h||(K(i.$$.fragment,b),K(v),h=!0)},o:function(b){ae(i.$$.fragment,b),ae(v),h=!1},d:function(b){b&&Fe(n),ht(i),v&&v.d(),f=!1,p()}}}function Ple(t){var n,e,i,r,o,s,a,l,c,u,d,h=t[3]-100+"";return{c:function(){n=ve("tr"),e=ve("td"),i=tt(),r=ve("td"),o=tt(),s=ve("td"),a=tn("(and "),l=tn(h),c=tn(" more errors)"),u=tt(),d=ve("td"),j(e,"class","svelte-1oe8e8r"),j(r,"class","svelte-1oe8e8r"),j(s,"class","svelte-1oe8e8r"),j(d,"class","svelte-1oe8e8r"),j(n,"class","jse-validation-error svelte-1oe8e8r")},m:function(f,p){Pe(f,n,p),ue(n,e),ue(n,i),ue(n,r),ue(n,o),ue(n,s),ue(s,a),ue(s,l),ue(s,c),ue(n,u),ue(n,d)},p:function(f,p){8&p&&h!==(h=f[3]-100+"")&&qn(l,h)},d:function(f){f&&Fe(n)}}}function WJe(t){var n,e,i=!Ui(t[0]),r=i&&Ile(t);return{c:function(){r&&r.c(),n=br()},m:function(o,s){r&&r.m(o,s),Pe(o,n,s),e=!0},p:function(o,s){var a=zn(s,1)[0];1&a&&(i=!Ui(o[0])),i?r?(r.p(o,a),1&a&&K(r,1)):((r=Ile(o)).c(),K(r,1),r.m(n.parentNode,n)):r&&(Lt(),ae(r,1,1,function(){r=null}),$t())},i:function(o){e||(K(r),e=!0)},o:function(o){ae(r),e=!1},d:function(o){r&&r.d(o),o&&Fe(n)}}}function qJe(t,n,e){var i,r=n.validationErrors,o=n.selectError,s=!0;return t.$$set=function(a){"validationErrors"in a&&e(0,r=a.validationErrors),"selectError"in a&&e(1,o=a.selectError)},t.$$.update=function(){1&t.$$.dirty&&e(3,i=r.length)},[r,o,s,i,function(){e(2,s=!1)},function(){e(2,s=!0)},function(a){setTimeout(function(){return o(a)})}]}var KP=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,qJe,WJe,Ti,{validationErrors:0,selectError:1},UJe),r}return Se(e)}(),YJe=typeof navigator<"u"&&navigator.platform.toUpperCase().indexOf("MAC")>=0;function XJe(t){di(t,"svelte-d01h2s",".jse-header.svelte-d01h2s.svelte-d01h2s{display:flex;background:var(--jse-theme-color);color:var(--jse-menu-color)}.jse-header.svelte-d01h2s .jse-title.svelte-d01h2s{flex:1;padding:5px;vertical-align:middle}.jse-header.svelte-d01h2s button.svelte-d01h2s{border:none;background:transparent;min-width:32px;color:inherit;cursor:pointer}.jse-header.svelte-d01h2s button.svelte-d01h2s:hover{background:rgba(255, 255, 255, 0.1)}")}function JJe(t){var n,e,i,r,o,s,a,l,c;return s=new rr({props:{data:P0}}),{c:function(){n=ve("div"),e=ve("div"),i=tn(t[0]),r=tt(),o=ve("button"),ft(s.$$.fragment),j(e,"class","jse-title svelte-d01h2s"),j(o,"type","button"),j(o,"class","jse-close svelte-d01h2s"),j(n,"class","jse-header svelte-d01h2s")},m:function(u,d){Pe(u,n,d),ue(n,e),ue(e,i),ue(n,r),ue(n,o),dt(s,o,null),a=!0,l||(c=It(o,"click",t[3]),l=!0)},p:function(u,d){var h=zn(d,1)[0];(!a||1&h)&&qn(i,u[0])},i:function(u){a||(K(s.$$.fragment,u),a=!0)},o:function(u){ae(s.$$.fragment,u),a=!1},d:function(u){u&&Fe(n),ht(s),l=!1,c()}}}function KJe(t,n,e){var i=n.title,r=void 0===i?"Modal":i,o=n.onClose,s=void 0===o?void 0:o,a=_a("simple-modal").close;return t.$$set=function(l){"title"in l&&e(0,r=l.title),"onClose"in l&&e(1,s=l.onClose)},[r,s,a,function(){s?s():a()}]}var QP=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,KJe,JJe,Ti,{title:0,onClose:1},XJe),r}return Se(e)}();function QJe(t){di(t,"svelte-1olothd",".jse-modal.svelte-1olothd.svelte-1olothd{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1olothd .jse-modal-contents.svelte-1olothd{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions.svelte-1olothd{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1olothd .jse-modal-contents .jse-actions button.jse-primary.svelte-1olothd:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts.svelte-1olothd{display:flex;flex-wrap:wrap;justify-content:space-around;margin:calc(2 * var(--jse-padding)) 0}.jse-modal.jse-copy-paste.svelte-1olothd .jse-shortcuts .jse-shortcut .jse-key.svelte-1olothd{font-size:200%;color:var(--jse-theme-color)}")}function ZJe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z;return e=new QP({props:{title:"Copying and pasting"}}),{c:function(){n=ve("div"),ft(e.$$.fragment),i=tt(),r=ve("div"),(o=ve("div")).textContent="These actions are unavailable via the menu. Please use:",s=tt(),a=ve("div"),l=ve("div"),(c=ve("div")).textContent="".concat(t[1],"+C"),u=tn("\n for copy"),d=tt(),h=ve("div"),(f=ve("div")).textContent="".concat(t[1],"+X"),p=tn("\n for cut"),m=tt(),g=ve("div"),(v=ve("div")).textContent="".concat(t[1],"+V"),y=tn("\n for paste"),b=tt(),C=ve("div"),(k=ve("button")).textContent="Close",j(c,"class","jse-key svelte-1olothd"),j(l,"class","jse-shortcut"),j(f,"class","jse-key svelte-1olothd"),j(h,"class","jse-shortcut"),j(v,"class","jse-key svelte-1olothd"),j(g,"class","jse-shortcut"),j(a,"class","jse-shortcuts svelte-1olothd"),j(k,"type","button"),j(k,"class","jse-primary svelte-1olothd"),j(C,"class","jse-actions svelte-1olothd"),j(r,"class","jse-modal-contents svelte-1olothd"),j(n,"class","jse-modal jse-copy-paste svelte-1olothd")},m:function(R,U){Pe(R,n,U),dt(e,n,null),ue(n,i),ue(n,r),ue(r,o),ue(r,s),ue(r,a),ue(a,l),ue(l,c),ue(l,u),ue(a,d),ue(a,h),ue(h,f),ue(h,p),ue(a,m),ue(a,g),ue(g,v),ue(g,y),ue(r,b),ue(r,C),ue(C,k),D=!0,L||(z=It(k,"click",t[0]),L=!0)},p:jt,i:function(R){D||(K(e.$$.fragment,R),D=!0)},o:function(R){ae(e.$$.fragment,R),D=!1},d:function(R){R&&Fe(n),ht(e),L=!1,z()}}}function eKe(t){return[_a("simple-modal").close,YJe?"\u2318":"Ctrl"]}var jle=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,eKe,ZJe,Ti,{},QJe),r}return Se(e)}();function Rle(t){return!!t&&("space"===t.type||!0===t.space)}function Ak(t){return!!t&&("separator"===t.type||!0===t.separator)}function _b(t){return!!t&&"function"==typeof t.onClick}function ZP(t){return!!t&&"dropdown-button"===t.type&&_b(t.main)&&Array.isArray(t.items)}function Lle(t){return To(t)&&To(t.parseError)}function nKe(t){di(t,"svelte-497ud4",".jse-menu.svelte-497ud4.svelte-497ud4{background:var(--jse-theme-color);border-bottom:1px solid var(--jse-theme-color);color:var(--jse-menu-color);display:flex;flex-wrap:wrap;align-items:center;position:relative}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4{width:var(--jse-menu-button-size);height:var(--jse-menu-button-size);border:none;background:transparent;color:inherit;cursor:pointer;padding:calc(0.5 * var(--jse-padding));margin:0;border-radius:0}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.svelte-497ud4:disabled{color:var(--jse-menu-color);opacity:0.5;background:transparent}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4{border:1px solid var(--jse-menu-color);padding:0 calc(0.5 * var(--jse-padding));margin:calc(0.5 * var(--jse-padding)) 0;height:calc(var(--jse-menu-button-size) - var(--jse-padding));width:auto}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:not(.jse-last){border-right:none}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-first.svelte-497ud4{margin-left:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-last.svelte-497ud4{margin-right:calc(0.5 * var(--jse-padding))}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:hover,.jse-menu.svelte-497ud4 .jse-button.jse-group-button.svelte-497ud4:focus{background:var(--jse-theme-color-highlight)}.jse-menu.svelte-497ud4 .jse-button.jse-group-button.jse-selected.svelte-497ud4{background:var(--jse-menu-color);color:var(--jse-theme-color)}.jse-menu.svelte-497ud4 .jse-space.svelte-497ud4{flex:1}.jse-menu.svelte-497ud4 .jse-separator.svelte-497ud4{background:var(--jse-menu-color);opacity:0.3;box-sizing:border-box;width:1px;height:calc(var(--jse-menu-button-size) - 6px);margin:3px}")}var iKe=function(t){return{}},$le=function(t){return{}};function Ble(t,n,e){var i=t.slice();return i[3]=n[e],i}var rKe=function(t){return{}},Vle=function(t){return{}};function oKe(t){var n,e=Gle(t[3])+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=Gle(i[3])+"")&&qn(n,e)},i:jt,o:jt,d:function(i){i&&Fe(n)}}}function sKe(t){var n,e,i,r,o,s,a,l,c=t[3].icon&&Hle(t),u=t[3].text&&Ule(t);return{c:function(){n=ve("button"),c&&c.c(),e=tt(),u&&u.c(),j(n,"type","button"),j(n,"class",i="jse-button "+t[3].className+" svelte-497ud4"),j(n,"title",r=t[3].title),n.disabled=o=t[3].disabled||!1},m:function(d,h){Pe(d,n,h),c&&c.m(n,null),ue(n,e),u&&u.m(n,null),s=!0,a||(l=It(n,"click",function(){va(t[3].onClick)&&t[3].onClick.apply(this,arguments)}),a=!0)},p:function(d,h){(t=d)[3].icon?c?(c.p(t,h),1&h&&K(c,1)):((c=Hle(t)).c(),K(c,1),c.m(n,e)):c&&(Lt(),ae(c,1,1,function(){c=null}),$t()),t[3].text?u?u.p(t,h):((u=Ule(t)).c(),u.m(n,null)):u&&(u.d(1),u=null),(!s||1&h&&i!==(i="jse-button "+t[3].className+" svelte-497ud4"))&&j(n,"class",i),(!s||1&h&&r!==(r=t[3].title))&&j(n,"title",r),(!s||1&h&&o!==(o=t[3].disabled||!1))&&(n.disabled=o)},i:function(d){s||(K(c),s=!0)},o:function(d){ae(c),s=!1},d:function(d){d&&Fe(n),c&&c.d(),u&&u.d(),a=!1,l()}}}function aKe(t){var n;return{c:function(){j(n=ve("div"),"class","jse-space svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function lKe(t){var n;return{c:function(){j(n=ve("div"),"class","jse-separator svelte-497ud4")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function Hle(t){var n,e;return n=new rr({props:{data:t[3].icon}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r&&(o.data=i[3].icon),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Ule(t){var n,e=t[3].text+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){1&r&&e!==(e=i[3].text+"")&&qn(n,e)},d:function(i){i&&Fe(n)}}}function zle(t){var n,e,i,r,o,s,a,l=[lKe,aKe,sKe,oKe],c=[];function u(d,h){return 1&h&&(n=null),1&h&&(e=null),1&h&&(i=null),null==n&&(n=!!Ak(d[3])),n?0:(null==e&&(e=!!Rle(d[3])),e?1:(null==i&&(i=!!_b(d[3])),i?2:3))}return r=u(t,-1),o=c[r]=l[r](t),{c:function(){o.c(),s=br()},m:function(d,h){c[r].m(d,h),Pe(d,s,h),a=!0},p:function(d,h){var f=r;(r=u(d,h))===f?c[r].p(d,h):(Lt(),ae(c[f],1,1,function(){c[f]=null}),$t(),(o=c[r])?o.p(d,h):(o=c[r]=l[r](d)).c(),K(o,1),o.m(s.parentNode,s))},i:function(d){a||(K(o),a=!0)},o:function(d){ae(o),a=!1},d:function(d){c[r].d(d),d&&Fe(s)}}}function cKe(t){for(var n,e,i,r,o=t[2].left,s=Ss(o,t,t[1],Vle),a=t[0],l=[],c=0;c0&&b.height>0}),u),c=u(e);function u(y){var b=y.getBoundingClientRect();return{x:b.left+b.width/2,y:b.top+b.height/2,rect:b,element:y}}function d(y,b){var k=y.x-b.x,D=(y.y-b.y)*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:1);return Math.sqrt(k*k+D*D)}var h=function(y){return d(y,c)};if("Left"===i||"Right"===i){var f=l.filter("Left"===i?function(y){return y.rect.left+ac.rect.right+a});return(v0(f.filter(function(y){return Math.abs(y.y-c.y)c.y+a});return(v0(g.filter(function(y){return o(y.element)}),h)||v0(g,h))?.element}}({allElements:Array.from(i.querySelectorAll("button:not([disabled])")),currentElement:a.target,direction:c,hasPrio:function(d){return"jse-open-dropdown"!==d.getAttribute("data-type")}});u&&u.focus()}},function(a){Hi[a?"unshift":"push"](function(){e(2,i=a)})}]}var lce=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,JKe,XKe,Ti,{items:0,tip:1},NKe),r}return Se(e)}();function KKe(t){var n,e;return n=new lce({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function QKe(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L=n.json,z=n.documentState,R=n.parser,U=n.showTip,G=n.onCloseContextMenu,X=n.onEditKey,te=n.onEditValue,P=n.onToggleEnforceString,W=n.onCut,J=n.onCopy,H=n.onPaste,le=n.onRemove,E=n.onDuplicate,I=n.onExtract,N=n.onInsertBefore,q=n.onInsert,V=n.onConvert,re=n.onInsertAfter,he=n.onSort,Oe=n.onTransform;function _e(){G(),X()}function Xe(){G(),te()}function Le(){G(),P()}function rt(){G(),W(!0)}function B(){G(),W(!1)}function ne(){G(),J(!0)}function ie(){G(),J(!1)}function Me(){G(),H()}function Ye(){G(),le()}function je(){G(),E()}function yt(){G(),I()}function Tt(ln){G(),c?V(ln):q(ln)}function fn(){G(),he()}function Hn(){G(),Oe()}function Zt(){G(),N()}function Ei(){G(),re()}return t.$$set=function(ln){"json"in ln&&e(2,L=ln.json),"documentState"in ln&&e(3,z=ln.documentState),"parser"in ln&&e(4,R=ln.parser),"showTip"in ln&&e(0,U=ln.showTip),"onCloseContextMenu"in ln&&e(5,G=ln.onCloseContextMenu),"onEditKey"in ln&&e(6,X=ln.onEditKey),"onEditValue"in ln&&e(7,te=ln.onEditValue),"onToggleEnforceString"in ln&&e(8,P=ln.onToggleEnforceString),"onCut"in ln&&e(9,W=ln.onCut),"onCopy"in ln&&e(10,J=ln.onCopy),"onPaste"in ln&&e(11,H=ln.onPaste),"onRemove"in ln&&e(12,le=ln.onRemove),"onDuplicate"in ln&&e(13,E=ln.onDuplicate),"onExtract"in ln&&e(14,I=ln.onExtract),"onInsertBefore"in ln&&e(15,N=ln.onInsertBefore),"onInsert"in ln&&e(16,q=ln.onInsert),"onConvert"in ln&&e(17,V=ln.onConvert),"onInsertAfter"in ln&&e(18,re=ln.onInsertAfter),"onSort"in ln&&e(19,he=ln.onSort),"onTransform"in ln&&e(20,Oe=ln.onTransform)},t.$$.update=function(){8&t.$$.dirty[0]&&e(37,i=z.selection),4&t.$$.dirty[0]&&e(39,r=void 0!==L),64&t.$$.dirty[1]&&e(31,o=null!=i),65&t.$$.dirty[1]&&e(21,s=o&&Ui(i.focusPath)),4&t.$$.dirty[0]|65&t.$$.dirty[1]&&e(38,a=o?Sn(L,i.focusPath):void 0),128&t.$$.dirty[1]&&e(35,l=Array.isArray(a)?"Edit array":To(a)?"Edit object":"Edit value"),320&t.$$.dirty[1]&&e(22,c=r&&(Ir(i)||vs(i)||Yi(i))),6291456&t.$$.dirty[0]|256&t.$$.dirty[1]&&e(30,u=r&&c&&!s),2097152&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(29,d=r&&null!=i&&(Ir(i)||Yi(i))&&!s),2097156&t.$$.dirty[0]|320&t.$$.dirty[1]&&e(36,h=r&&null!=i&&hb(i)&&!s&&!Array.isArray(Sn(L,qi(i.focusPath)))),320&t.$$.dirty[1]&&e(34,f=r&&null!=i&&hb(i)),136&t.$$.dirty[1]&&e(32,p=f&&!$o(a)),4194304&t.$$.dirty[0]&&e(25,m=c),33554432&t.$$.dirty[0]&&e(24,g=m?"Convert to:":"Insert:"),33554432&t.$$.dirty[0]|1&t.$$.dirty[1]&&e(28,v=!m&&o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(27,y=m?ng(i)&&!To(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(26,b=m?ng(i)&&!Array.isArray(a):o),33554432&t.$$.dirty[0]|193&t.$$.dirty[1]&&e(23,C=m?ng(i)&&$o(a):o),24&t.$$.dirty[0]|192&t.$$.dirty[1]&&e(33,k=null!=i&&pf(a,z.enforceStringMap,an(i.focusPath),R)),2145386496&t.$$.dirty[0]|63&t.$$.dirty[1]&&e(1,D=[{type:"row",items:[{type:"button",onClick:_e,icon:N0,text:"Edit key",title:"Edit the key (Double-click on the key)",disabled:!h},{type:"dropdown-button",main:{type:"button",onClick:Xe,icon:N0,text:l,title:"Edit the value (Double-click on the value)",disabled:!f},width:"11em",items:[{type:"button",icon:N0,text:l,title:"Edit the value (Double-click on the value)",onClick:Xe,disabled:!f},{type:"button",icon:k?lb:cb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:Le,disabled:!p}]}]},{type:"separator"},{type:"row",items:[{type:"dropdown-button",main:{type:"button",onClick:rt,icon:I0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!c},width:"10em",items:[{type:"button",icon:I0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:rt,disabled:!c},{type:"button",icon:I0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:B,disabled:!c}]},{type:"dropdown-button",main:{type:"button",onClick:ne,icon:yp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!c},width:"12em",items:[{type:"button",icon:yp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:ne,disabled:!c},{type:"button",icon:yp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:ie,disabled:!c}]},{type:"button",onClick:Me,icon:Tae,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o}]},{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"button",onClick:je,icon:Fae,text:"Duplicate",title:"Duplicate selected contents (Ctrl+D)",disabled:!u},{type:"button",onClick:yt,icon:TXe,text:"Extract",title:"Extract selected contents",disabled:!d},{type:"button",onClick:fn,icon:_k,text:"Sort",title:"Sort array or object contents",disabled:!c},{type:"button",onClick:Hn,icon:gk,text:"Transform",title:"Transform array or object contents (filter, sort, project)",disabled:!c},{type:"button",onClick:Ye,icon:RP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!c}]},{type:"column",items:[{type:"label",text:g},{type:"button",onClick:function(){return Tt("structure")},icon:m?yk:F0,text:"Structure",title:g+" structure",disabled:!v},{type:"button",onClick:function(){return Tt("object")},icon:m?yk:F0,text:"Object",title:g+" structure",disabled:!y},{type:"button",onClick:function(){return Tt("array")},icon:m?yk:F0,text:"Array",title:g+" array",disabled:!b},{type:"button",onClick:function(){return Tt("value")},icon:m?yk:F0,text:"Value",title:g+" value",disabled:!C}]}]},{type:"separator"},{type:"row",items:[{type:"button",onClick:Zt,icon:kXe,text:"Insert before",title:"Select area before current entry to insert or paste contents",disabled:!c||s},{type:"button",onClick:Ei,icon:wXe,text:"Insert after",title:"Select area after current entry to insert or paste contents",disabled:!c||s}]}])},[U,D,L,z,R,G,X,te,P,W,J,H,le,E,I,N,q,V,re,he,Oe,s,c,C,g,m,b,y,v,d,u,o,p,k,f,l,h,i,a,r]}var ZKe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,QKe,KKe,Ti,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditKey:6,onEditValue:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicate:13,onExtract:14,onInsertBefore:15,onInsert:16,onConvert:17,onInsertAfter:18,onSort:19,onTransform:20},null,[-1,-1]),r}return Se(e)}();function eQe(t){di(t,"svelte-1kai5ns","div.jse-collapsed-items.svelte-1kai5ns.svelte-1kai5ns{font-family:var(--jse-font-family);font-size:var(--jse-font-size);color:var(--jse-collapsed-items-link-color);padding:calc(0.5 * var(--jse-padding));border:8px solid transparent;border-width:8px 0;background-color:var(--jse-contents-background-color);background-image:linear-gradient(var(--jse-collapsed-items-background-color), var(--jse-collapsed-items-background-color)), linear-gradient(to bottom right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to bottom left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top right, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%), linear-gradient(to top left, transparent 50.5%, var(--jse-collapsed-items-background-color) 50.5%);background-repeat:repeat, repeat-x, repeat-x, repeat-x, repeat-x;background-position:0 0, 8px 0, 8px 0, 8px 100%, 8px 100%;background-size:auto auto, 16px 16px, 16px 16px, 16px 16px, 16px 16px;background-clip:padding-box, border-box, border-box, border-box, border-box;background-origin:padding-box, border-box, border-box, border-box, border-box;display:flex}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{margin:0 calc(0.5 * var(--jse-padding))}div.jse-collapsed-items.svelte-1kai5ns div.jse-text.svelte-1kai5ns{display:inline}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns{font-family:inherit;font-size:inherit;color:var(--jse-collapsed-items-link-color);background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:hover,div.jse-collapsed-items.svelte-1kai5ns button.jse-expand-items.svelte-1kai5ns:focus{color:var(--jse-collapsed-items-link-color-highlight)}")}function cce(t,n,e){var i=t.slice();return i[13]=n[e],i}function uce(t){var n,e,i,r,o,s,a,l,c=t[13].start+"",u=t[13].end+"";function d(){return t[12](t[13])}return{c:function(){n=ve("button"),e=tn("show "),i=tn(c),r=tn("-"),o=tn(u),s=tt(),j(n,"type","button"),j(n,"class","jse-expand-items svelte-1kai5ns")},m:function(h,f){Pe(h,n,f),ue(n,e),ue(n,i),ue(n,r),ue(n,o),ue(n,s),a||(l=It(n,"click",d),a=!0)},p:function(h,f){t=h,16&f&&c!==(c=t[13].start+"")&&qn(i,c),16&f&&u!==(u=t[13].end+"")&&qn(o,u)},d:function(h){h&&Fe(n),a=!1,l()}}}function tQe(t){for(var n,e,i,r,o,s,a,l,c,u,d,h=t[4],f=[],p=0;p=v.end&&b.end<=D.start)&&L.push(b),D.start>=(z?b.end:v.end)&&L.push(D),a=L))},[d,p,o,r,a,s,l,c,u,h,f,i,function(m){return p(d,m)}]}var rQe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,iQe,tQe,Ti,{visibleSections:6,sectionIndex:7,total:8,path:0,pointer:9,selection:10,onExpandSection:1},eQe),r}return Se(e)}();function oQe(t){di(t,"svelte-1yzl4st",".jse-context-menu-pointer.svelte-1yzl4st{position:absolute;top:calc(-0.5 * var(--jse-context-menu-pointer-size));right:calc(-0.5 * var(--jse-context-menu-pointer-size));width:var(--jse-context-menu-pointer-size);height:var(--jse-context-menu-pointer-size);padding:0;margin:0;cursor:pointer;background:transparent;border-radius:2px;background:var(--jse-context-menu-pointer-background);color:var(--jse-context-menu-pointer-color);border:none;box-shadow:var(--jse-controls-box-shadow)}.jse-context-menu-pointer.svelte-1yzl4st:hover{background:var(--jse-context-menu-pointer-background-highlight)}")}function sQe(t){var n,e,i,r,o;return e=new rr({props:{data:su}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-context-menu-pointer svelte-1yzl4st"),j(n,"title",uN),At(n,"jse-selected",t[0])},m:function(s,a){Pe(s,n,a),dt(e,n,null),i=!0,r||(o=It(n,"click",t[1]),r=!0)},p:function(s,a){var l=zn(a,1)[0];(!i||1&l)&&At(n,"jse-selected",s[0])},i:function(s){i||(K(e.$$.fragment,s),i=!0)},o:function(s){ae(e.$$.fragment,s),i=!1},d:function(s){s&&Fe(n),ht(e),r=!1,o()}}}function aQe(t,n,e){var i=n.selected,r=n.onContextMenu;return t.$$set=function(o){"selected"in o&&e(0,i=o.selected),"onContextMenu"in o&&e(2,r=o.onContextMenu)},[i,function(o){for(var s=o.target;s&&"BUTTON"!==s.nodeName;)s=s.parentNode;s&&r({anchor:s,left:0,top:0,width:260,height:336,offsetTop:2,offsetLeft:0,showTip:!0})},r]}var xp=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,aQe,sQe,Ti,{selected:0,onContextMenu:2},oQe),r}return Se(e)}();function lQe(t){di(t,"svelte-24a1b2",'.jse-key.svelte-24a1b2{display:inline-block;min-width:2em;padding:0 5px;box-sizing:border-box;outline:none;border-radius:1px;vertical-align:top;color:var(--jse-key-color);cursor:var(--jse-contents-cursor);word-break:normal;overflow-wrap:normal;white-space:pre-wrap}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.svelte-24a1b2:hover{background:var(--jse-hover-background-color)}.jse-key.jse-empty.svelte-24a1b2{min-width:3em;outline:1px dotted var(--jse-tag-background);-moz-outline-radius:2px}.jse-key.jse-empty.svelte-24a1b2::after{pointer-events:none;color:var(--jse-tag-background);content:"key"}')}function cQe(t){var n,e,i,r,o,s,a,l=[hQe,dQe],c=[];function u(d,h){return d[1]?0:1}return e=u(t),i=c[e]=l[e](t),{c:function(){n=ve("div"),i.c(),j(n,"data-type","selectable-key"),j(n,"class",r=ko(t[6](t[0]))+" svelte-24a1b2")},m:function(d,h){Pe(d,n,h),c[e].m(n,null),o=!0,s||(a=It(n,"dblclick",t[5]),s=!0)},p:function(d,h){var f=e;(e=u(d))===f?c[e].p(d,h):(Lt(),ae(c[f],1,1,function(){c[f]=null}),$t(),(i=c[e])?i.p(d,h):(i=c[e]=l[e](d)).c(),K(i,1),i.m(n,null)),(!o||1&h&&r!==(r=ko(d[6](d[0]))+" svelte-24a1b2"))&&j(n,"class",r)},i:function(d){o||(K(i),o=!0)},o:function(d){ae(i),o=!1},d:function(d){d&&Fe(n),c[e].d(),s=!1,a()}}}function uQe(t){var n,e;return n=new fae({props:{value:t[2].normalization.escapeValue(t[0]),shortText:!0,onChange:t[7],onCancel:t[8],onFind:t[2].onFind}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.value=i[2].normalization.escapeValue(i[0])),4&r&&(o.onFind=i[2].onFind),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function dQe(t){var n,e=eg(t[2].normalization.escapeValue(t[0]))+"";return{c:function(){n=tn(e)},m:function(i,r){Pe(i,n,r)},p:function(i,r){5&r&&e!==(e=eg(i[2].normalization.escapeValue(i[0]))+"")&&qn(n,e)},i:jt,o:jt,d:function(i){i&&Fe(n)}}}function hQe(t){var n,e;return n=new Dae({props:{text:t[2].normalization.escapeValue(t[0]),searchResultItems:t[1]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};5&r&&(o.text=i[2].normalization.escapeValue(i[0])),2&r&&(o.searchResultItems=i[1]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function hce(t){var n,e;return n=new xp({props:{selected:!0,onContextMenu:t[2].onContextMenu}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};4&r&&(o.onContextMenu=i[2].onContextMenu),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function fQe(t){var n,e,i,r,o,s=[uQe,cQe],a=[];function l(u,d){return u[4]?0:1}n=l(t),e=a[n]=s[n](t);var c=!t[2].readOnly&&t[3]&&!t[4]&&hce(t);return{c:function(){e.c(),i=tt(),c&&c.c(),r=br()},m:function(u,d){a[n].m(u,d),Pe(u,i,d),c&&c.m(u,d),Pe(u,r,d),o=!0},p:function(u,d){var h=zn(d,1)[0],f=n;(n=l(u))===f?a[n].p(u,h):(Lt(),ae(a[f],1,1,function(){a[f]=null}),$t(),(e=a[n])?e.p(u,h):(e=a[n]=s[n](u)).c(),K(e,1),e.m(i.parentNode,i)),u[2].readOnly||!u[3]||u[4]?c&&(Lt(),ae(c,1,1,function(){c=null}),$t()):c?(c.p(u,h),28&h&&K(c,1)):((c=hce(u)).c(),K(c,1),c.m(r.parentNode,r))},i:function(u){o||(K(e),K(c),o=!0)},o:function(u){ae(e),ae(c),o=!1},d:function(u){a[n].d(u),u&&Fe(i),c&&c.d(u),u&&Fe(r)}}}function pQe(t,n,e){var i,r,o=n.path,s=n.pointer,a=n.key,l=n.selection,c=n.searchResultItems,u=n.onUpdateKey,d=n.context;return t.$$set=function(h){"path"in h&&e(9,o=h.path),"pointer"in h&&e(10,s=h.pointer),"key"in h&&e(0,a=h.key),"selection"in h&&e(11,l=h.selection),"searchResultItems"in h&&e(1,c=h.searchResultItems),"onUpdateKey"in h&&e(12,u=h.onUpdateKey),"context"in h&&e(2,d=h.context)},t.$$.update=function(){3072&t.$$.dirty&&e(3,i=l?!0===l.pointersMap[s]&&vs(l):void 0),2056&t.$$.dirty&&e(4,r=i&&mp(l))},[a,c,d,i,r,function(h){r||d.readOnly||(h.preventDefault(),d.onSelect(ou(o,!0)))},function(h){return ch("jse-key",{"jse-empty":""===h})},function(h,f){var p=u(a,d.normalization.unescapeValue(h)),m=qi(o).concat(p);d.onSelect(f===hN?fr(m,!1):ou(m,!1)),f!==dN&&d.focus()},function(){d.onSelect(ou(o,!1)),d.focus()},o,s,l,u]}var mQe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,pQe,fQe,Ti,{path:9,pointer:10,key:0,selection:11,searchResultItems:1,onUpdateKey:12,context:2},lQe),r}return Se(e)}();function fce(t,n,e){var i=t.slice();return i[8]=n[e],i}function pce(t){var n,e,i,r=[t[8].props],o=t[8].component;function s(a){for(var l={},c=0;cy+g()/2;)y+=g(),v-=1;return v!==m&&void 0!==d[v]?{beforePath:d[v].path,offset:v-m}:void 0}({json:n,selection:o,deltaY:i,items:r}):function(u){for(var d,h=u.json,f=u.items,m=u.deltaY,g=fk(u.selection),v=f.findIndex(function(U){return ir(U.path,g)}),y=0,b=v,C=function(){var U;return null===(U=f[b+1])||void 0===U?void 0:U.height};void 0!==C()&&Math.abs(m)>y+C()/2;)y+=C(),b+=1;var D=Sn(h,qi(g)),L=Array.isArray(D),z=null===(d=f[L?b:b+1])||void 0===d?void 0:d.path,R=b-v;return z?{beforePath:z,offset:R}:{append:!0,offset:R}}({json:n,selection:o,deltaY:i,items:r});if(!s||0===s.offset)return{operations:void 0,updatedSelection:void 0,offset:0};var u,d,h,f,p,m,g,v,y,b,C,a=function(u,d,h){if(!d)return[];var f="beforePath"in h?h.beforePath:void 0,p="append"in h?h.append:void 0,m=qi(d.focusPath),g=Sn(u,m);if(!(p||f&&A0(f,m)&&f.length>m.length))return[];var v=D0(d),y=fk(d),b=Fn(v),C=Fn(y),k=f?f[m.length]:void 0;if(!Do(g)){if(eo(g)){var D=Bs(b),L=Bs(C),z=void 0!==k?Bs(k):g.length;return sP(L-D+1,zU?[].concat(ri(R.slice(U,G+1)),ri(R.slice(X,R.length))).map(function(te){return ig(m,te)}):[].concat(ri(R.slice(X,U)),ri(R.slice(G+1,R.length))).map(function(te){return ig(m,te)}):[]}(n,o,s),l=Sn(n,qi(D0(o)));return Array.isArray(l)?{operations:a,updatedSelection:(f=(u={items:r,json:n,selection:o,offset:s.offset}).items,p=u.json,g=u.offset,v=D0(m=u.selection),y=fk(m),b=f.findIndex(function(L){return ir(L.path,v)}),C=f.findIndex(function(L){return ir(L.path,y)}),Es(p,null===(d=f[b+g])||void 0===d?void 0:d.path,null===(h=f[C+g])||void 0===h?void 0:h.path)),offset:s.offset}:{operations:a,updatedSelection:void 0,offset:s.offset}}function hh(t,n){return function(e,i){if(e){for(var r={},o=0,s=Object.keys(e);o0?r:void 0}}(t,function(e){return Zv(e,n)})}function bQe(t){di(t,"svelte-pz3g1j","button.jse-validation-error.svelte-pz3g1j{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;padding:0;margin:0;vertical-align:top;display:inline-flex;color:var(--jse-warning-color)}")}function xQe(t){var n,e,i,r,o,s;return e=new rr({props:{data:rg}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-validation-error svelte-pz3g1j")},m:function(a,l){Pe(a,n,l),dt(e,n,null),r=!0,o||(s=[It(n,"click",function(){va(t[0])&&t[0].apply(this,arguments)}),ya(i=jP.call(null,n,Qe({text:t[1]},t[2])))],o=!0)},p:function(a,l){var c=zn(l,1)[0];t=a,i&&va(i.update)&&2&c&&i.update.call(null,Qe({text:t[1]},t[2]))},i:function(a){r||(K(e.$$.fragment,a),r=!0)},o:function(a){ae(e.$$.fragment,a),r=!1},d:function(a){a&&Fe(n),ht(e),o=!1,so(s)}}}function wQe(t,n,e){var i,r=_a("absolute-popup"),o=n.validationError,s=n.onExpand;return t.$$set=function(a){"validationError"in a&&e(3,o=a.validationError),"onExpand"in a&&e(0,s=a.onExpand)},t.$$.update=function(){8&t.$$.dirty&&e(1,i=o.isChildError?"Contains invalid data":o.message)},[s,i,r,o]}var V0=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,wQe,xQe,ps,{validationError:3,onExpand:0},bQe),r}return Se(e)}();function CQe(t){di(t,"svelte-1wlxti1",".jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative;color:var(--jse-text-color)}.jse-json-node.jse-root.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{min-height:100%;padding-bottom:2px;box-sizing:border-box}.jse-json-node.jse-root.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1 .jse-context-menu-pointer,.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1 .jse-context-menu-pointer{top:0;right:calc(-2px - var(--jse-context-menu-pointer-size))}.jse-json-node.jse-root.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1.svelte-1wlxti1{padding-left:0}.jse-json-node.svelte-1wlxti1 .jse-props.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-items.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-header .jse-meta.svelte-1wlxti1>.jse-meta-inner.svelte-1wlxti1.svelte-1wlxti1{display:flex;justify-content:center}.jse-json-node.svelte-1wlxti1 .jse-contents-outer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;flex-direction:row;align-items:start}.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-left:var(--jse-indent-size)}.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;padding-left:calc(var(--jse-indent-size) + 5px)}.jse-json-node.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-contents-background-color)}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{visibility:hidden;padding:0 calc(0.5 * var(--jse-padding));flex:1}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-inside.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:inline-flex;align-items:center}.jse-json-node.svelte-1wlxti1 .jse-insert-selection-area.jse-after.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;align-items:flex-end}.jse-json-node.svelte-1wlxti1 .jse-context-menu-pointer-anchor.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{position:relative}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{display:flex;position:relative;z-index:1;max-width:250px;min-width:100px;height:0;margin-right:calc(0.5 * var(--jse-padding));outline:1px solid}.jse-json-node.svelte-1wlxti1 .jse-insert-area.svelte-1wlxti1 .jse-context-menu-pointer{right:-1px;background:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-hovered.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-hover-background)}.jse-json-node.svelte-1wlxti1:hover>.jse-contents-outer .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-header-outer.svelte-1wlxti1:hover>.jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected),.jse-json-node.svelte-1wlxti1 .jse-footer-outer:hover .jse-insert-selection-area.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:not(.jse-selected){visibility:visible}.jse-json-node.jse-hovered.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-hovered.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-hover-background-color)}.jse-json-node.jse-selected.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected.svelte-1wlxti1 .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-identifier>.jse-key,.jse-json-node.jse-selected-key.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-identifier>.jse-key{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-contents-outer.svelte-1wlxti1>.jse-contents.svelte-1wlxti1>.jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.svelte-1wlxti1 .jse-collapsed-items.jse-selected,.jse-json-node.jse-selected.svelte-1wlxti1 .jse-collapsed-items,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-collapsed-items{background-color:var(--jse-selection-background-color);--jse-collapsed-items-background-color:var(--jse-collapsed-items-selected-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{background:var(--jse-selection-background-color)}.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-header-outer.svelte-1wlxti1>.jse-header.svelte-1wlxti1>.jse-meta.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1>.jse-footer-outer.svelte-1wlxti1>.jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-props .jse-expand.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-contents.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-header.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-footer.svelte-1wlxti1 .jse-value,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-key,.jse-json-node.jse-selected-value.svelte-1wlxti1 .jse-items .jse-expand.svelte-1wlxti1 .jse-value{background:var(--jse-selection-background-color);cursor:var(--jse-contents-selected-cursor)}.jse-json-node.jse-readonly.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-contents-selected-cursor:pointer}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{outline-color:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer{background:var(--jse-context-menu-pointer-background)}.jse-json-node.svelte-1wlxti1 .jse-insert-area.jse-selected.svelte-1wlxti1 .jse-context-menu-pointer:hover{background:var(--jse-context-menu-pointer-background-highlight)}.jse-main:not(.jse-focus) .jse-json-node.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{--jse-selection-background-color:var(--jse-selection-background-inactive-color);--jse-context-menu-pointer-background:var(--jse-context-menu-pointer-hover-background)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{width:var(--jse-indent-size);padding:0;margin:0;border:none;cursor:pointer;background:transparent;color:var(--jse-delimiter-color);font-size:var(--jse-font-size-mono);height:var(--jse-line-height)}.jse-expand.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-meta.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-separator.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1,.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;color:var(--jse-delimiter-color)}.jse-index.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 calc(0.5 * var(--jse-padding))}.jse-bracket.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding:0 2px}.jse-bracket.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{padding-right:var(--jse-padding)}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{border:none;font-size:80%;font-family:var(--jse-font-family);color:var(--jse-tag-color);background:var(--jse-tag-background);border-radius:2px;cursor:pointer;display:inline-block;padding:0 4px;line-height:normal;margin:1px 0}.jse-tag.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1:hover{opacity:0.8}.jse-tag.jse-expanded.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{opacity:0.7;cursor:inherit}.jse-identifier.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1.svelte-1wlxti1{vertical-align:top;position:relative}")}var SQe=function(t){return{}},mce=function(t){return{}};function gce(t,n,e){var i=t.slice();return i[53]=n[e],i}var kQe=function(t){return{}},vce=function(t){return{}};function yce(t,n,e){var i=t.slice();return i[47]=n[e],i[49]=e,i}function _ce(t,n,e){var i=t.slice();return i[50]=n[e],i}var DQe=function(t){return{}},bce=function(t){return{}};function TQe(t){var n,e,i,r,o,s,a,l,c,u=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Ir(t[7]))&&!t[7].edit&&ir(t[7].focusPath,t[1]),d=t[34].identifier,h=Ss(d,t,t[35],mce),f=!t[17]&&xce();o=new _Qe({props:{path:t[1],value:t[0],enforceString:t[13],selection:t[16]?t[7]:void 0,searchResultItems:Cae(t[6],t[9]),context:t[8]}});var p=u&&wce(t),m=t[15]&&Cce(t),g=!t[17]&&Sce(t);return{c:function(){n=ve("div"),e=ve("div"),h&&h.c(),i=tt(),f&&f.c(),r=tt(),ft(o.$$.fragment),s=tt(),p&&p.c(),a=tt(),m&&m.c(),l=tt(),g&&g.c(),j(e,"class","jse-contents svelte-1wlxti1"),j(n,"class","jse-contents-outer svelte-1wlxti1"),j(n,"style",t[18])},m:function(v,y){Pe(v,n,y),ue(n,e),h&&h.m(e,null),ue(e,i),f&&f.m(e,null),ue(e,r),dt(o,e,null),ue(e,s),p&&p.m(e,null),ue(n,a),m&&m.m(n,null),ue(n,l),g&&g.m(n,null),c=!0},p:function(v,y){h&&h.p&&(!c||16&y[1])&&Ds(h,d,v,v[35],c?ks(d,v[35],y,SQe):Ts(v[35]),mce),v[17]?f&&(f.d(1),f=null):f||((f=xce()).c(),f.m(e,r));var b={};2&y[0]&&(b.path=v[1]),1&y[0]&&(b.value=v[0]),8192&y[0]&&(b.enforceString=v[13]),65664&y[0]&&(b.selection=v[16]?v[7]:void 0),576&y[0]&&(b.searchResultItems=Cae(v[6],v[9])),256&y[0]&&(b.context=v[8]),o.$set(b),65922&y[0]&&(u=!v[8].readOnly&&v[16]&&v[7]&&(Yi(v[7])||Ir(v[7]))&&!v[7].edit&&ir(v[7].focusPath,v[1])),u?p?(p.p(v,y),65922&y[0]&&K(p,1)):((p=wce(v)).c(),K(p,1),p.m(e,null)):p&&(Lt(),ae(p,1,1,function(){p=null}),$t()),v[15]?m?(m.p(v,y),32768&y[0]&&K(m,1)):((m=Cce(v)).c(),K(m,1),m.m(n,l)):m&&(Lt(),ae(m,1,1,function(){m=null}),$t()),v[17]?g&&(g.d(1),g=null):g?g.p(v,y):((g=Sce(v)).c(),g.m(n,null)),(!c||262144&y[0])&&j(n,"style",v[18])},i:function(v){c||(K(h,v),K(o.$$.fragment,v),K(p),K(m),c=!0)},o:function(v){ae(h,v),ae(o.$$.fragment,v),ae(p),ae(m),c=!1},d:function(v){v&&Fe(n),h&&h.d(v),f&&f.d(),ht(o),p&&p.d(),m&&m.d(),g&&g.d()}}}function EQe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Ir(t[7]))&&!t[7].edit&&ir(t[7].focusPath,t[1]),C=[OQe,MQe],k=[];function D(E,I){return E[12]?0:1}r=D(t),o=k[r]=C[r](t);var L=t[34].identifier,z=Ss(L,t,t[35],vce),R=!t[17]&&kce();function U(E,I){return E[12]?NQe:IQe}var G=U(t),X=G(t),te=b&&Dce(t),P=t[15]&&(!t[12]||!t[15].isChildError)&&Tce(t);function W(E,I){return E[12]?PQe:E[17]?void 0:FQe}var J=W(t),H=J&&J(t),le=t[12]&&Ece(t);return{c:function(){n=ve("div"),e=ve("div"),i=ve("button"),o.c(),s=tt(),z&&z.c(),a=tt(),R&&R.c(),l=tt(),c=ve("div"),u=ve("div"),X.c(),d=tt(),te&&te.c(),h=tt(),P&&P.c(),f=tt(),H&&H.c(),p=tt(),le&&le.c(),m=br(),j(i,"type","button"),j(i,"class","jse-expand svelte-1wlxti1"),j(i,"title","Expand or collapse this object (Ctrl+Click to expand/collapse recursively)"),j(u,"class","jse-meta-inner svelte-1wlxti1"),j(c,"class","jse-meta svelte-1wlxti1"),j(c,"data-type","selectable-value"),j(e,"class","jse-header svelte-1wlxti1"),j(n,"class","jse-header-outer svelte-1wlxti1"),j(n,"style",t[18])},m:function(E,I){Pe(E,n,I),ue(n,e),ue(e,i),k[r].m(i,null),ue(e,s),z&&z.m(e,null),ue(e,a),R&&R.m(e,null),ue(e,l),ue(e,c),ue(c,u),X.m(u,null),ue(e,d),te&&te.m(e,null),ue(n,h),P&&P.m(n,null),ue(n,f),H&&H.m(n,null),Pe(E,p,I),le&&le.m(E,I),Pe(E,m,I),g=!0,v||(y=It(i,"click",t[21]),v=!0)},p:function(E,I){var N=r;(r=D(E))===N?k[r].p(E,I):(Lt(),ae(k[N],1,1,function(){k[N]=null}),$t(),(o=k[r])?o.p(E,I):(o=k[r]=C[r](E)).c(),K(o,1),o.m(i,null)),z&&z.p&&(!g||16&I[1])&&Ds(z,L,E,E[35],g?ks(L,E[35],I,kQe):Ts(E[35]),vce),E[17]?R&&(R.d(1),R=null):R||((R=kce()).c(),R.m(e,l)),G===(G=U(E))&&X?X.p(E,I):(X.d(1),(X=G(E))&&(X.c(),X.m(u,null))),65922&I[0]&&(b=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Ir(E[7]))&&!E[7].edit&&ir(E[7].focusPath,E[1])),b?te?(te.p(E,I),65922&I[0]&&K(te,1)):((te=Dce(E)).c(),K(te,1),te.m(e,null)):te&&(Lt(),ae(te,1,1,function(){te=null}),$t()),!E[15]||E[12]&&E[15].isChildError?P&&(Lt(),ae(P,1,1,function(){P=null}),$t()):P?(P.p(E,I),36864&I[0]&&K(P,1)):((P=Tce(E)).c(),K(P,1),P.m(n,f)),J===(J=W(E))&&H?H.p(E,I):(H&&H.d(1),(H=J&&J(E))&&(H.c(),H.m(n,null))),(!g||262144&I[0])&&j(n,"style",E[18]),E[12]?le?(le.p(E,I),4096&I[0]&&K(le,1)):((le=Ece(E)).c(),K(le,1),le.m(m.parentNode,m)):le&&(Lt(),ae(le,1,1,function(){le=null}),$t())},i:function(E){g||(K(o),K(z,E),K(te),K(P),K(le),g=!0)},o:function(E){ae(o),ae(z,E),ae(te),ae(P),ae(le),g=!1},d:function(E){E&&Fe(n),k[r].d(),z&&z.d(E),R&&R.d(),X.d(),te&&te.d(),P&&P.d(),H&&H.d(),E&&Fe(p),le&&le.d(E),E&&Fe(m),v=!1,y()}}}function AQe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b=!t[8].readOnly&&t[16]&&t[7]&&(Yi(t[7])||Ir(t[7]))&&!t[7].edit&&ir(t[7].focusPath,t[1]),C=[LQe,RQe],k=[];function D(E,I){return E[12]?0:1}r=D(t),o=k[r]=C[r](t);var L=t[34].identifier,z=Ss(L,t,t[35],bce),R=!t[17]&&Ice();function U(E,I){return E[12]?BQe:$Qe}var G=U(t),X=G(t),te=b&&Nce(t),P=t[15]&&(!t[12]||!t[15].isChildError)&&Fce(t);function W(E,I){return E[12]?HQe:VQe}var J=W(t),H=J(t),le=t[12]&&Pce(t);return{c:function(){n=ve("div"),e=ve("div"),i=ve("button"),o.c(),s=tt(),z&&z.c(),a=tt(),R&&R.c(),l=tt(),c=ve("div"),u=ve("div"),X.c(),d=tt(),te&&te.c(),h=tt(),P&&P.c(),f=tt(),H.c(),p=tt(),le&&le.c(),m=br(),j(i,"type","button"),j(i,"class","jse-expand svelte-1wlxti1"),j(i,"title","Expand or collapse this array (Ctrl+Click to expand/collapse recursively)"),j(u,"class","jse-meta-inner svelte-1wlxti1"),j(u,"data-type","selectable-value"),j(c,"class","jse-meta svelte-1wlxti1"),j(e,"class","jse-header svelte-1wlxti1"),j(n,"class","jse-header-outer svelte-1wlxti1"),j(n,"style",t[18])},m:function(E,I){Pe(E,n,I),ue(n,e),ue(e,i),k[r].m(i,null),ue(e,s),z&&z.m(e,null),ue(e,a),R&&R.m(e,null),ue(e,l),ue(e,c),ue(c,u),X.m(u,null),ue(e,d),te&&te.m(e,null),ue(n,h),P&&P.m(n,null),ue(n,f),H.m(n,null),Pe(E,p,I),le&&le.m(E,I),Pe(E,m,I),g=!0,v||(y=It(i,"click",t[21]),v=!0)},p:function(E,I){var N=r;(r=D(E))===N?k[r].p(E,I):(Lt(),ae(k[N],1,1,function(){k[N]=null}),$t(),(o=k[r])?o.p(E,I):(o=k[r]=C[r](E)).c(),K(o,1),o.m(i,null)),z&&z.p&&(!g||16&I[1])&&Ds(z,L,E,E[35],g?ks(L,E[35],I,DQe):Ts(E[35]),bce),E[17]?R&&(R.d(1),R=null):R||((R=Ice()).c(),R.m(e,l)),G===(G=U(E))&&X?X.p(E,I):(X.d(1),(X=G(E))&&(X.c(),X.m(u,null))),65922&I[0]&&(b=!E[8].readOnly&&E[16]&&E[7]&&(Yi(E[7])||Ir(E[7]))&&!E[7].edit&&ir(E[7].focusPath,E[1])),b?te?(te.p(E,I),65922&I[0]&&K(te,1)):((te=Nce(E)).c(),K(te,1),te.m(e,null)):te&&(Lt(),ae(te,1,1,function(){te=null}),$t()),!E[15]||E[12]&&E[15].isChildError?P&&(Lt(),ae(P,1,1,function(){P=null}),$t()):P?(P.p(E,I),36864&I[0]&&K(P,1)):((P=Fce(E)).c(),K(P,1),P.m(n,f)),J===(J=W(E))&&H?H.p(E,I):(H.d(1),(H=J(E))&&(H.c(),H.m(n,null))),(!g||262144&I[0])&&j(n,"style",E[18]),E[12]?le?(le.p(E,I),4096&I[0]&&K(le,1)):((le=Pce(E)).c(),K(le,1),le.m(m.parentNode,m)):le&&(Lt(),ae(le,1,1,function(){le=null}),$t())},i:function(E){g||(K(o),K(z,E),K(te),K(P),K(le),g=!0)},o:function(E){ae(o),ae(z,E),ae(te),ae(P),ae(le),g=!1},d:function(E){E&&Fe(n),k[r].d(),z&&z.d(E),R&&R.d(),X.d(),te&&te.d(),P&&P.d(),H.d(),E&&Fe(p),le&&le.d(E),E&&Fe(m),v=!1,y()}}}function xce(t){var n;return{c:function(){(n=ve("div")).textContent=":",j(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&Fe(n)}}}function wce(t){var n,e,i;return e=new xp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=ve("div"),ft(e.$$.fragment),j(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),dt(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(K(e.$$.fragment,r),i=!0)},o:function(r){ae(e.$$.fragment,r),i=!1},d:function(r){r&&Fe(n),ht(e)}}}function Cce(t){var n,e;return n=new V0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Sce(t){var n,e,i;return{c:function(){j(n=ve("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),j(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=It(n,"click",t[30]),e=!0)},p:jt,d:function(r){r&&Fe(n),e=!1,i()}}}function MQe(t){var n,e;return n=new rr({props:{data:gp}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function OQe(t){var n,e;return n=new rr({props:{data:su}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function kce(t){var n;return{c:function(){(n=ve("div")).textContent=":",j(n,"class","jse-separator svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&Fe(n)}}}function IQe(t){var n,e,i,r,o,s,a,l,c,u,d=Object.keys(t[0]).length+"",h=1===Object.keys(t[0]).length?"prop":"props";return{c:function(){(n=ve("div")).textContent="{",e=tt(),i=ve("button"),r=tn(d),o=tt(),s=tn(h),a=tt(),(l=ve("div")).textContent="}",j(n,"class","jse-bracket svelte-1wlxti1"),j(i,"type","button"),j(i,"class","jse-tag svelte-1wlxti1"),j(l,"class","jse-bracket svelte-1wlxti1")},m:function(f,p){Pe(f,n,p),Pe(f,e,p),Pe(f,i,p),ue(i,r),ue(i,o),ue(i,s),Pe(f,a,p),Pe(f,l,p),c||(u=It(i,"click",t[22]),c=!0)},p:function(f,p){1&p[0]&&d!==(d=Object.keys(f[0]).length+"")&&qn(r,d),1&p[0]&&h!==(h=1===Object.keys(f[0]).length?"prop":"props")&&qn(s,h)},d:function(f){f&&Fe(n),f&&Fe(e),f&&Fe(i),f&&Fe(a),f&&Fe(l),c=!1,u()}}}function NQe(t){var n;return{c:function(){(n=ve("div")).textContent="{",j(n,"class","jse-bracket jse-expanded svelte-1wlxti1")},m:function(e,i){Pe(e,n,i)},p:jt,d:function(e){e&&Fe(n)}}}function Dce(t){var n,e,i;return e=new xp({props:{selected:!0,onContextMenu:t[8].onContextMenu}}),{c:function(){n=ve("div"),ft(e.$$.fragment),j(n,"class","jse-context-menu-pointer-anchor svelte-1wlxti1")},m:function(r,o){Pe(r,n,o),dt(e,n,null),i=!0},p:function(r,o){var s={};256&o[0]&&(s.onContextMenu=r[8].onContextMenu),e.$set(s)},i:function(r){i||(K(e.$$.fragment,r),i=!0)},o:function(r){ae(e.$$.fragment,r),i=!1},d:function(r){r&&Fe(n),ht(e)}}}function Tce(t){var n,e;return n=new V0({props:{validationError:t[15],onExpand:t[22]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.validationError=i[15]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function FQe(t){var n,e,i;return{c:function(){j(n=ve("div"),"class","jse-insert-selection-area jse-after svelte-1wlxti1"),j(n,"data-type","insert-selection-area-after")},m:function(r,o){Pe(r,n,o),e||(i=It(n,"click",t[30]),e=!0)},p:jt,d:function(r){r&&Fe(n),e=!1,i()}}}function PQe(t){var n,e,i;return{c:function(){j(n=ve("div"),"class","jse-insert-selection-area jse-inside svelte-1wlxti1"),j(n,"data-type","insert-selection-area-inside")},m:function(r,o){Pe(r,n,o),e||(i=It(n,"click",t[29]),e=!0)},p:jt,d:function(r){r&&Fe(n),e=!1,i()}}}function Ece(t){for(var n,e,i,r,o,s,a,l=!t[8].readOnly&&("hover-insert-inside"===t[10]||t[16]&&Hs(t[7])),c=l&&Ace(t),u=t[19](t[1],t[0],t[2],t[3],t[4],t[5],t[6],t[7],t[11]),d=[],h=0;h}',s=tt(),p&&p.c(),j(n,"class","jse-props svelte-1wlxti1"),j(o,"data-type","selectable-value"),j(o,"class","jse-footer svelte-1wlxti1"),j(r,"class","jse-footer-outer svelte-1wlxti1"),j(r,"style",t[18])},m:function(m,g){Pe(m,n,g),c&&c.m(n,null),ue(n,e);for(var v=0;v]',s=tt(),v&&v.c(),j(n,"class","jse-items svelte-1wlxti1"),j(o,"data-type","selectable-value"),j(o,"class","jse-footer svelte-1wlxti1"),j(r,"class","jse-footer-outer svelte-1wlxti1"),j(r,"style",t[18])},m:function(y,b){Pe(y,n,b),d&&d.m(n,null),ue(n,e);for(var C=0;C=je.start&&ne<=je.end});if(!ie)return null;fse(ie.start,Math.min(p.length,ie.end),function(je){return Xe(String(je))})}else Object.keys(p).forEach(Xe);return _e}(k,l||Bm);if(z("dragSelectionStart",{selection:k,items:N}),N){var q=D0(k),V=N.findIndex(function(he){return ir(he.path,q)}),re=nj({json:D.getJson(),documentState:D.getDocumentState(),deltaY:0,items:N}).offset;e(11,G={initialTarget:E.target,initialClientY:E.clientY,initialContentTop:W(),selectionStartIndex:V,selectionItemsCount:uae(k).length,items:N,offset:re,didMoveItems:!1}),ra.dragging=!0,document.addEventListener("mousemove",H,!0),document.addEventListener("mouseup",le)}else z("Cannot drag the current selection (probably spread over multiple sections)")}else L(E)}},function(E){ra.selecting||ra.dragging||(E.stopPropagation(),tg(E.target,"data-type","selectable-value")?e(10,R="hover-collection"):tg(E.target,"data-type","insert-selection-area-inside")?e(10,R="hover-insert-inside"):tg(E.target,"data-type","insert-selection-area-after")&&e(10,R="hover-insert-after"),clearTimeout(U))},function(E){E.stopPropagation(),U=setTimeout(function(){return e(10,R=void 0)})},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),D.onSelect(mf(m)))},function(E){E.shiftKey||(E.stopPropagation(),E.preventDefault(),D.onSelect(gf(m)))},function(E){D.onSelect(mf(m)),D.onContextMenu(E)},function(E){D.onSelect(gf(m)),D.onContextMenu(E)},L,h,f]}var ij=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,GQe,zQe,Ti,{value:0,path:1,expandedMap:2,enforceStringMap:3,visibleSectionsMap:4,validationErrorsMap:5,searchResultItemsMap:6,selection:7,context:8,onDragSelectionStart:33},CQe,[-1,-1]),r}return Se(e)}(),WQe=ij,qQe={prefix:"fas",iconName:"jsoneditor-expand",icon:[512,512,[],"","M 0,448 V 512 h 512 v -64 z M 0,0 V 64 H 512 V 0 Z M 256,96 128,224 h 256 z M 256,416 384,288 H 128 Z"]},YQe={prefix:"fas",iconName:"jsoneditor-collapse",icon:[512,512,[],"","m 0,224 v 64 h 512 v -64 z M 256,192 384,64 H 128 Z M 256,320 128,448 h 256 z"]},rj={prefix:"fas",iconName:"jsoneditor-format",icon:[512,512,[],"","M 0,32 v 64 h 416 v -64 z M 160,160 v 64 h 352 v -64 z M 160,288 v 64 h 288 v -64 z M 0,416 v 64 h 320 v -64 z"]},XQe={prefix:"fas",iconName:"jsoneditor-compact",icon:[512,512,[],"","M 0,32 v 64 h 512 v -64 z M 0,160 v 64 h 512 v -64 z M 0,288 v 64 h 352 v -64 z"]};function JQe(t){var n,e;return n=new Mk({props:{items:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&zn(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function KQe(t,n,e){var i,r,o,s,a,l,c,u=n.json,d=n.selection,h=n.readOnly,f=n.showSearch,p=void 0!==f&&f,m=n.historyState,g=n.onExpandAll,v=n.onCollapseAll,y=n.onUndo,b=n.onRedo,C=n.onSort,k=n.onTransform,D=n.onContextMenu,L=n.onCopy,z=n.onRenderMenu;function R(){e(1,p=!p)}return t.$$set=function(U){"json"in U&&e(2,u=U.json),"selection"in U&&e(3,d=U.selection),"readOnly"in U&&e(4,h=U.readOnly),"showSearch"in U&&e(1,p=U.showSearch),"historyState"in U&&e(5,m=U.historyState),"onExpandAll"in U&&e(6,g=U.onExpandAll),"onCollapseAll"in U&&e(7,v=U.onCollapseAll),"onUndo"in U&&e(8,y=U.onUndo),"onRedo"in U&&e(9,b=U.onRedo),"onSort"in U&&e(10,C=U.onSort),"onTransform"in U&&e(11,k=U.onTransform),"onContextMenu"in U&&e(12,D=U.onContextMenu),"onCopy"in U&&e(13,L=U.onCopy),"onRenderMenu"in U&&e(14,z=U.onRenderMenu)},t.$$.update=function(){4&t.$$.dirty&&e(20,i=void 0!==u),1048584&t.$$.dirty&&e(19,r=i&&(Ir(d)||vs(d)||Yi(d))),68&t.$$.dirty&&e(15,s={type:"button",icon:qQe,title:"Expand all",className:"jse-expand-all",onClick:g,disabled:!$o(u)}),132&t.$$.dirty&&e(16,a={type:"button",icon:YQe,title:"Collapse all",className:"jse-collapse-all",onClick:v,disabled:!$o(u)}),4&t.$$.dirty&&e(17,l={type:"button",icon:BP,title:"Search (Ctrl+F)",className:"jse-search",onClick:R,disabled:void 0===u}),769844&t.$$.dirty&&e(18,c=h?[s,a,{type:"separator"},{type:"button",icon:yp,title:"Copy (Ctrl+C)",className:"jse-copy",onClick:L,disabled:!r},{type:"separator"},l,{type:"space"}]:[s,a,{type:"separator"},{type:"button",icon:_k,title:"Sort",className:"jse-sort",onClick:C,disabled:h||void 0===u},{type:"button",icon:gk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:k,disabled:h||void 0===u},l,{type:"button",icon:Oae,title:uN,className:"jse-contextmenu",onClick:D},{type:"separator"},{type:"button",icon:$P,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:y,disabled:!m.canUndo},{type:"button",icon:LP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:b,disabled:!m.canRedo},{type:"space"}]),278528&t.$$.dirty&&e(0,o=z(c)||c)},[o,p,u,d,h,m,g,v,y,b,C,k,D,L,z,s,a,l,c,r,i]}var QQe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,KQe,JQe,Ti,{json:2,selection:3,readOnly:4,showSearch:1,historyState:5,onExpandAll:6,onCollapseAll:7,onUndo:8,onRedo:9,onSort:10,onTransform:11,onContextMenu:12,onCopy:13,onRenderMenu:14}),r}return Se(e)}();function ZQe(t){di(t,"svelte-1q2qkk2",'@charset "UTF-8";.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2{flex:1;overflow:auto;font-family:var(--jse-font-family);font-size:var(--jse-font-size);display:flex;flex-direction:column;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2.svelte-1q2qkk2:last-child{border-bottom:var(--jse-main-border)}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-before.svelte-1q2qkk2{flex:1}.jse-welcome.svelte-1q2qkk2 .jse-space.jse-after.svelte-1q2qkk2{flex:2}.jse-welcome.svelte-1q2qkk2 .jse-contents.svelte-1q2qkk2{margin:2em var(--jse-padding) 0;color:var(--jse-panel-color-readonly)}.jse-welcome.svelte-1q2qkk2 .jse-contents ul.svelte-1q2qkk2{list-style:"\u25cf";list-style-position:outside;padding-left:20px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li.svelte-1q2qkk2{padding-left:10px}.jse-welcome.svelte-1q2qkk2 .jse-contents ul li span.jse-bold.svelte-1q2qkk2{font-family:var(--jse-font-family-mono);font-weight:bold}')}function Hce(t){var n;return{c:function(){(n=ve("ul")).innerHTML='
  • Click inside the editor
  • \n
  • Paste clipboard data using Ctrl+V
  • \n
  • Create a new object by typing {
  • \n
  • Create a new array by typing [
  • ',j(n,"class","svelte-1q2qkk2")},m:function(e,i){Pe(e,n,i)},d:function(e){e&&Fe(n)}}}function eZe(t){var n,e,i,r,o,s,a,l=!t[0]&&Hce();return{c:function(){n=ve("div"),e=ve("div"),i=tt(),r=ve("div"),o=tn("Empty document\n "),l&&l.c(),s=tt(),a=ve("div"),j(e,"class","jse-space jse-before svelte-1q2qkk2"),j(r,"class","jse-contents svelte-1q2qkk2"),j(a,"class","jse-space jse-after svelte-1q2qkk2"),j(n,"class","jse-welcome svelte-1q2qkk2")},m:function(c,u){Pe(c,n,u),ue(n,e),ue(n,i),ue(n,r),ue(r,o),l&&l.m(r,null),ue(n,s),ue(n,a)},p:function(c,u){zn(u,1),c[0]?l&&(l.d(1),l=null):l||((l=Hce()).c(),l.m(r,null))},i:jt,o:jt,d:function(c){c&&Fe(n),l&&l.d()}}}function tZe(t,n,e){var i=n.readOnly;return t.$$set=function(r){"readOnly"in r&&e(0,i=r.readOnly)},[i]}var nZe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,tZe,eZe,Ti,{readOnly:0},ZQe),r}return Se(e)}(),oj={},iZe={get exports(){return oj},set exports(t){oj=t}},Uce=function(t,n){var e,i,r=1,o=0,s=0,a=String.alphabet;function l(c,u,d){if(d){for(e=u;(d=l(c,e))<76&&d>65;)++e;return+c.slice(u-1,e)}return(d=a&&a.indexOf(c.charAt(u)))>-1?d+76:(d=c.charCodeAt(u)||0)<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63}if((t+="")!=(n+=""))for(;r;)if(i=l(t,o++),r=l(n,s++),i<76&&r<76&&i>66&&r>66&&(i=l(t,o,o),r=l(n,s,o=e),s=e),i!=r)return i1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(eo(Sn(t,n))){if(void 0===e)throw new Error("Cannot sort: no property selected by which to sort the array");return function oZe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function sZe(t,n){return function(e,i){var r=Sn(e,t),o=Sn(i,t);return void 0===r?n:void 0===o?-n:"string"!=typeof r&&"string"!=typeof o?r>o?n:r2&&void 0!==arguments[2]?arguments[2]:[],arguments.length>3&&void 0!==arguments[3]?arguments[3]:1),o=Sn(t,n);return[{op:"replace",path:an(n),value:o.slice(0).sort(r)}]}(t,n,e,i)}if(To(t))return function rZe(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=Sn(t,n),o=Object.keys(i).slice();o.sort(function(u,d){return e*sj(u,d)});for(var s=[],a=0;axb&&qce();return{c:function(){n=ve("div");for(var d=0;dxb?u?u.p(d,f):((u=qce()).c(),u.m(n,null)):u&&(u.d(1),u=null)},i:jt,o:jt,d:function(d){d&&Fe(n);for(var h=0;h0&&(a("scrollTo ",g),o.scrollTo({left:g,behavior:"smooth"}))}})},[l,d,h,i,o,s,f,r,function(g){a("get items for path",g);var v=Sn(l,g);if(Array.isArray(v))return nP(0,v.length).map(String);if(To(v)){var y=Object.keys(v).slice(0);return y.sort(sj),y}return[]},function(g){return Jc(l,g)},p,function(){e(6,f=!f)},m,function(g){m(),p(g)},c,u,function(g){Hi[g?"unshift":"push"](function(){e(5,s=g)})},function(g){Hi[g?"unshift":"push"](function(){e(4,o=g)})}]}var CZe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,wZe,xZe,Ti,{json:0,documentState:14,onSelect:15,onError:1,pathParser:2},yZe),r}return Se(e)}();function SZe(t){di(t,"svelte-3lbrbf",".jse-search-box.svelte-3lbrbf.svelte-3lbrbf{border:var(--jse-panel-border);border-radius:3px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);box-shadow:var(--jse-controls-box-shadow);display:inline-block;width:400px;max-width:100%;overflow:auto}.jse-search-box.svelte-3lbrbf .jse-search-form.svelte-3lbrbf{display:flex;align-items:stretch}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf,.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{font-family:inherit;font-size:inherit}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf{display:block;text-align:center;border:none;padding:0 5px;margin:0;cursor:pointer;color:var(--jse-panel-button-color);background:var(--jse-panel-button-background)}.jse-search-box.svelte-3lbrbf .jse-search-form button.svelte-3lbrbf:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form input.svelte-3lbrbf{color:var(--jse-panel-color);border:var(--jse-input-border);border-radius:3px;background:var(--jse-input-background);height:28px;padding:0 5px;margin:0;flex:1;width:0;min-width:50px;outline:none}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-replace-toggle.svelte-3lbrbf{padding:var(--jse-padding) calc(0.5 * var(--jse-padding));min-width:20px;background:var(--jse-panel-button-background-highlight)}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents.svelte-3lbrbf{flex:1;display:flex;flex-direction:column;padding:calc(0.5 * var(--jse-padding));gap:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section.svelte-3lbrbf{flex:1;display:flex;align-items:center;position:relative;padding-left:32px}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-icon.svelte-3lbrbf{color:inherit;cursor:inherit;background:inherit;position:absolute;top:calc(0.5 * var(--jse-padding));left:calc(0.5 * var(--jse-padding))}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section label.jse-search-input-label.svelte-3lbrbf{flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.svelte-3lbrbf{color:inherit;font-size:80%;visibility:hidden;padding:0 5px;min-width:36px;text-align:center}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-search-section .jse-search-count.jse-visible.svelte-3lbrbf{visibility:visible}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section.svelte-3lbrbf{padding-left:32px;flex:1;display:flex}.jse-search-box.svelte-3lbrbf .jse-search-form .jse-search-contents .jse-replace-section button.svelte-3lbrbf{width:auto}")}function nue(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te=(-1!==t[3]?"".concat(t[3]+1,"/"):"")+"",P=!t[4]&&iue(t),W=[DZe,kZe],J=[];function H(E,I){return E[2]?0:1}a=H(t),l=J[a]=W[a](t),y=new rr({props:{data:OXe}}),k=new rr({props:{data:SXe}}),z=new rr({props:{data:P0}});var le=t[0]&&!t[4]&&rue(t);return{c:function(){n=ve("div"),e=ve("form"),P&&P.c(),i=tt(),r=ve("div"),o=ve("div"),s=ve("div"),l.c(),c=tt(),u=ve("label"),d=ve("input"),h=tt(),f=ve("div"),p=tn(te),m=tn(t[10]),g=tt(),v=ve("button"),ft(y.$$.fragment),b=tt(),C=ve("button"),ft(k.$$.fragment),D=tt(),L=ve("button"),ft(z.$$.fragment),R=tt(),le&&le.c(),j(s,"class","jse-search-icon svelte-3lbrbf"),j(d,"class","jse-search-input svelte-3lbrbf"),j(d,"title","Enter text to search"),j(d,"type","text"),j(d,"placeholder","Find"),j(u,"class","jse-search-input-label svelte-3lbrbf"),j(u,"about","jse-search input"),j(f,"class","jse-search-count svelte-3lbrbf"),At(f,"jse-visible",""!==t[8]),j(v,"type","button"),j(v,"class","jse-search-next svelte-3lbrbf"),j(v,"title","Go to next search result (Enter)"),j(C,"type","button"),j(C,"class","jse-search-previous svelte-3lbrbf"),j(C,"title","Go to previous search result (Shift+Enter)"),j(L,"type","button"),j(L,"class","jse-search-clear svelte-3lbrbf"),j(L,"title","Close search box (Esc)"),j(o,"class","jse-search-section svelte-3lbrbf"),j(r,"class","jse-search-contents svelte-3lbrbf"),j(e,"class","jse-search-form svelte-3lbrbf"),j(n,"class","jse-search-box svelte-3lbrbf")},m:function(E,I){Pe(E,n,I),ue(n,e),P&&P.m(e,null),ue(e,i),ue(e,r),ue(r,o),ue(o,s),J[a].m(s,null),ue(o,c),ue(o,u),ue(u,d),ep(d,t[8]),ue(o,h),ue(o,f),ue(f,p),ue(f,m),ue(o,g),ue(o,v),dt(y,v,null),ue(o,b),ue(o,C),dt(k,C,null),ue(o,D),ue(o,L),dt(z,L,null),ue(r,R),le&&le.m(r,null),U=!0,G||(X=[It(d,"input",t[21]),ya(EZe.call(null,d)),It(v,"click",t[22]),It(C,"click",t[23]),It(L,"click",t[24]),It(e,"submit",t[12]),It(e,"keydown",t[13])],G=!0)},p:function(E,I){E[4]?P&&(Lt(),ae(P,1,1,function(){P=null}),$t()):P?(P.p(E,I),16&I&&K(P,1)):((P=iue(E)).c(),K(P,1),P.m(e,i));var N=a;(a=H(E))===N?J[a].p(E,I):(Lt(),ae(J[N],1,1,function(){J[N]=null}),$t(),(l=J[a])?l.p(E,I):(l=J[a]=W[a](E)).c(),K(l,1),l.m(s,null)),256&I&&d.value!==E[8]&&ep(d,E[8]),(!U||8&I)&&te!==(te=(-1!==E[3]?"".concat(E[3]+1,"/"):"")+"")&&qn(p,te),(!U||1024&I)&&qn(m,E[10]),(!U||256&I)&&At(f,"jse-visible",""!==E[8]),E[0]&&!E[4]?le?le.p(E,I):((le=rue(E)).c(),le.m(r,null)):le&&(le.d(1),le=null)},i:function(E){U||(K(P),K(l),K(y.$$.fragment,E),K(k.$$.fragment,E),K(z.$$.fragment,E),U=!0)},o:function(E){ae(P),ae(l),ae(y.$$.fragment,E),ae(k.$$.fragment,E),ae(z.$$.fragment,E),U=!1},d:function(E){E&&Fe(n),P&&P.d(),J[a].d(),ht(y),ht(k),ht(z),le&&le.d(),G=!1,so(X)}}}function iue(t){var n,e,i,r,o;return e=new rr({props:{data:t[0]?su:gp}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-replace-toggle svelte-3lbrbf"),j(n,"title","Toggle visibility of replace options (Ctrl+H)")},m:function(s,a){Pe(s,n,a),dt(e,n,null),i=!0,r||(o=It(n,"click",t[11]),r=!0)},p:function(s,a){var l={};1&a&&(l.data=s[0]?su:gp),e.$set(l)},i:function(s){i||(K(e.$$.fragment,s),i=!0)},o:function(s){ae(e.$$.fragment,s),i=!1},d:function(s){s&&Fe(n),ht(e),r=!1,o()}}}function kZe(t){var n,e;return n=new rr({props:{data:BP}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function DZe(t){var n,e;return n=new rr({props:{data:xXe,spin:!0}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:jt,i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function rue(t){var n,e,i,r,o,s,a,l;return{c:function(){n=ve("div"),e=ve("input"),i=tt(),(r=ve("button")).textContent="Replace",o=tt(),(s=ve("button")).textContent="All",j(e,"class","jse-replace-input svelte-3lbrbf"),j(e,"title","Enter replacement text"),j(e,"type","text"),j(e,"placeholder","Replace"),j(r,"type","button"),j(r,"title","Replace current occurrence (Ctrl+Enter)"),j(r,"class","svelte-3lbrbf"),j(s,"type","button"),j(s,"title","Replace all occurrences"),j(s,"class","svelte-3lbrbf"),j(n,"class","jse-replace-section svelte-3lbrbf")},m:function(c,u){Pe(c,n,u),ue(n,e),ep(e,t[9]),ue(n,i),ue(n,r),ue(n,o),ue(n,s),a||(l=[It(e,"input",t[25]),It(r,"click",t[14]),It(s,"click",t[15])],a=!0)},p:function(c,u){512&u&&e.value!==c[9]&&ep(e,c[9])},d:function(c){c&&Fe(n),a=!1,so(l)}}}function TZe(t){var n,e,i=t[1]&&nue(t);return{c:function(){i&&i.c(),n=br()},m:function(r,o){i&&i.m(r,o),Pe(r,n,o),e=!0},p:function(r,o){var s=zn(o,1)[0];r[1]?i?(i.p(r,s),2&s&&K(i,1)):((i=nue(r)).c(),K(i,1),i.m(n.parentNode,n)):i&&(Lt(),ae(i,1,1,function(){i=null}),$t())},i:function(r){e||(K(i),e=!0)},o:function(r){ae(i),e=!1},d:function(r){i&&i.d(r),r&&Fe(n)}}}function EZe(t){t.select()}function AZe(t,n,e){var i,r,o=n.show,s=void 0!==o&&o,a=n.searching,l=n.resultCount,c=void 0===l?0:l,u=n.activeIndex,d=void 0===u?0:u,h=n.showReplace,f=void 0!==h&&h,p=n.readOnly,m=void 0!==p&&p,g=n.onChange,v=void 0===g?ho:g,y=n.onPrevious,b=void 0===y?ho:y,C=n.onNext,k=void 0===C?ho:C,D=n.onReplace,L=void 0===D?ho:D,z=n.onReplaceAll,R=void 0===z?ho:z,U=n.onClose,G=void 0===U?ho:U,X="",te="",P="";function W(){e(0,f=!f&&!m)}function J(){m||L(X,P)}return t.$$set=function(H){"show"in H&&e(1,s=H.show),"searching"in H&&e(2,a=H.searching),"resultCount"in H&&e(16,c=H.resultCount),"activeIndex"in H&&e(3,d=H.activeIndex),"showReplace"in H&&e(0,f=H.showReplace),"readOnly"in H&&e(4,m=H.readOnly),"onChange"in H&&e(17,v=H.onChange),"onPrevious"in H&&e(5,b=H.onPrevious),"onNext"in H&&e(6,k=H.onNext),"onReplace"in H&&e(18,L=H.onReplace),"onReplaceAll"in H&&e(19,R=H.onReplaceAll),"onClose"in H&&e(7,G=H.onClose)},t.$$.update=function(){65536&t.$$.dirty&&e(10,i=c>=1e3?"".concat(999,"+"):String(c)),131072&t.$$.dirty&&e(20,r=p0(v,300)),1048832&t.$$.dirty&&r(X),2&t.$$.dirty&&s&&""!==X&&v(X)},[f,s,a,d,m,b,k,G,X,P,i,W,function(H){H.preventDefault(),X!==te?(te=X,r.cancel(),v(X)):k()},function(H){H.stopPropagation();var le=fp(H);"Enter"===le&&(H.preventDefault(),k()),"Shift+Enter"===le&&(H.preventDefault(),b()),"Ctrl+Enter"===le&&(H.preventDefault(),f?J():k()),"Ctrl+H"===le&&(H.preventDefault(),W()),"Escape"===le&&(H.preventDefault(),G())},J,function(){m||R(X,P)},c,v,L,R,r,function(){e(8,X=this.value)},function(){return k()},function(){return b()},function(){return G()},function(){e(9,P=this.value)}]}var MZe=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,AZe,TZe,Ti,{show:1,searching:2,resultCount:16,activeIndex:3,showReplace:0,readOnly:4,onChange:17,onPrevious:5,onNext:6,onReplace:18,onReplaceAll:19,onClose:7},SZe),r}return Se(e)}(),oue=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function OZe(t,n){if(t.length!==n.length)return!1;for(var e=0;e \n
    loading...
    ',j(n,"class","jse-contents svelte-qojdc1")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function qZe(t){var n,e,i,r,o,s,a,l,c,u=[XZe,YZe],d=[];function h(f,p){return void 0===f[10]?0:1}return r=h(t),o=d[r]=u[r](t),{c:function(){n=ve("label"),e=ve("input"),i=tt(),o.c(),s=br(),j(e,"type","text"),e.readOnly="readonly",j(e,"tabindex","-1"),j(e,"class","jse-hidden-input svelte-qojdc1"),j(n,"class","jse-hidden-input-label svelte-qojdc1")},m:function(f,p){Pe(f,n,p),ue(n,e),t[76](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=It(e,"paste",t[34]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):(Lt(),ae(d[m],1,1,function(){d[m]=null}),$t(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),K(o,1),o.m(s.parentNode,s))},i:function(f){a||(K(o),a=!0)},o:function(f){ae(o),a=!1},d:function(f){f&&Fe(n),t[76](null),f&&Fe(i),d[r].d(f),f&&Fe(s),l=!1,c()}}}function YZe(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p;s=new MZe({props:{show:t[19],resultCount:(null===(n=t[17])||void 0===n||null===(e=n.items)||void 0===e?void 0:e.length)||0,activeIndex:(null===(i=t[17])||void 0===i?void 0:i.activeIndex)||0,showReplace:t[20],searching:t[21],readOnly:t[0],onChange:t[26],onNext:t[27],onPrevious:t[28],onReplace:t[29],onReplaceAll:t[30],onClose:t[31]}}),c=new WQe({props:{value:t[10],path:[],expandedMap:t[16].expandedMap,enforceStringMap:t[16].enforceStringMap,visibleSectionsMap:t[16].visibleSectionsMap,validationErrorsMap:t[24],searchResultItemsMap:null===(r=t[17])||void 0===r?void 0:r.itemsMap,selection:t[16].selection,context:t[13],onDragSelectionStart:ho}});var m=t[18]&&gue(t),g=t[23]&&vue(t);return f=new KP({props:{validationErrors:t[12],selectError:t[32]}}),{c:function(){o=ve("div"),ft(s.$$.fragment),a=tt(),l=ve("div"),ft(c.$$.fragment),u=tt(),m&&m.c(),d=tt(),g&&g.c(),h=tt(),ft(f.$$.fragment),j(o,"class","jse-search-box-container svelte-qojdc1"),j(l,"class","jse-contents svelte-qojdc1"),j(l,"data-jsoneditor-scrollable-contents",!0)},m:function(v,y){Pe(v,o,y),dt(s,o,null),Pe(v,a,y),Pe(v,l,y),dt(c,l,null),t[77](l),Pe(v,u,y),m&&m.m(v,y),Pe(v,d,y),g&&g.m(v,y),Pe(v,h,y),dt(f,v,y),p=!0},p:function(v,y){var b,C,k,D,L={};524288&y[0]&&(L.show=v[19]),131072&y[0]&&(L.resultCount=(null===(b=v[17])||void 0===b||null===(C=b.items)||void 0===C?void 0:C.length)||0),131072&y[0]&&(L.activeIndex=(null===(k=v[17])||void 0===k?void 0:k.activeIndex)||0),1048576&y[0]&&(L.showReplace=v[20]),2097152&y[0]&&(L.searching=v[21]),1&y[0]&&(L.readOnly=v[0]),s.$set(L);var z={};1024&y[0]&&(z.value=v[10]),65536&y[0]&&(z.expandedMap=v[16].expandedMap),65536&y[0]&&(z.enforceStringMap=v[16].enforceStringMap),65536&y[0]&&(z.visibleSectionsMap=v[16].visibleSectionsMap),16777216&y[0]&&(z.validationErrorsMap=v[24]),131072&y[0]&&(z.searchResultItemsMap=null===(D=v[17])||void 0===D?void 0:D.itemsMap),65536&y[0]&&(z.selection=v[16].selection),8192&y[0]&&(z.context=v[13]),c.$set(z),v[18]?m?(m.p(v,y),262144&y[0]&&K(m,1)):((m=gue(v)).c(),K(m,1),m.m(d.parentNode,d)):m&&(Lt(),ae(m,1,1,function(){m=null}),$t()),v[23]?g?(g.p(v,y),8388608&y[0]&&K(g,1)):((g=vue(v)).c(),K(g,1),g.m(h.parentNode,h)):g&&(Lt(),ae(g,1,1,function(){g=null}),$t());var R={};4096&y[0]&&(R.validationErrors=v[12]),f.$set(R)},i:function(v){p||(K(s.$$.fragment,v),K(c.$$.fragment,v),K(m),K(g),K(f.$$.fragment,v),p=!0)},o:function(v){ae(s.$$.fragment,v),ae(c.$$.fragment,v),ae(m),ae(g),ae(f.$$.fragment,v),p=!1},d:function(v){v&&Fe(o),ht(s),v&&Fe(a),v&&Fe(l),ht(c),t[77](null),v&&Fe(u),m&&m.d(v),v&&Fe(d),g&&g.d(v),v&&Fe(h),ht(f,v)}}}function XZe(t){var n,e,i,r,o=[KZe,JZe],s=[];function a(l,c){return""===l[11]||void 0===l[11]?0:1}return n=a(t),e=s[n]=o[n](t),{c:function(){e.c(),i=br()},m:function(l,c){s[n].m(l,c),Pe(l,i,c),r=!0},p:function(l,c){var u=n;(n=a(l))===u?s[n].p(l,c):(Lt(),ae(s[u],1,1,function(){s[u]=null}),$t(),(e=s[n])?e.p(l,c):(e=s[n]=o[n](l)).c(),K(e,1),e.m(i.parentNode,i))},i:function(l){r||(K(e),r=!0)},o:function(l){ae(e),r=!1},d:function(l){s[n].d(l),l&&Fe(i)}}}function gue(t){var n,e;return n=new nd({props:{type:"info",message:"You pasted a JSON ".concat(Array.isArray(t[18].contents)?"array":"object"," as text"),actions:[{icon:vk,text:"Paste as JSON instead",onMouseDown:t[45]},{text:"Leave as is",onClick:t[46]}]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.message="You pasted a JSON ".concat(Array.isArray(i[18].contents)?"array":"object"," as text")),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function vue(t){var n,e;return n=new nd({props:{type:"success",message:"The loaded JSON document was invalid but is successfully repaired.",actions:t[0]?[]:[{icon:mb,text:"Ok",onClick:t[8]},{icon:vp,text:"Repair manually instead",onClick:t[47]}]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.actions=i[0]?[]:[{icon:mb,text:"Ok",onClick:i[8]},{icon:vp,text:"Repair manually instead",onClick:i[47]}]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function JZe(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:vp,text:"Repair manually",onClick:t[47]}]}}),i=new fue({props:{text:t[11],json:t[10],indentation:t[5],parser:t[3]}}),{c:function(){ft(n.$$.fragment),e=tt(),ft(i.$$.fragment)},m:function(o,s){dt(n,o,s),Pe(o,e,s),dt(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:vp,text:"Repair manually",onClick:o[47]}]),n.$set(a);var l={};2048&s[0]&&(l.text=o[11]),1024&s[0]&&(l.json=o[10]),32&s[0]&&(l.indentation=o[5]),8&s[0]&&(l.parser=o[3]),i.$set(l)},i:function(o){r||(K(n.$$.fragment,o),K(i.$$.fragment,o),r=!0)},o:function(o){ae(n.$$.fragment,o),ae(i.$$.fragment,o),r=!1},d:function(o){ht(n,o),o&&Fe(e),ht(i,o)}}}function KZe(t){var n,e;return n=new nZe({props:{readOnly:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function QZe(t){var n,e,i,r,o,s,a,l,c=t[1]&&pue(t),u=t[2]&&mue(t),h=[];return o=h[r=t[25]?1:0]=[qZe,WZe][r](t),{c:function(){n=ve("div"),c&&c.c(),e=tt(),u&&u.c(),i=tt(),o.c(),j(n,"class","jse-tree-mode svelte-qojdc1"),At(n,"no-main-menu",!t[1])},m:function(f,p){Pe(f,n,p),c&&c.m(n,null),ue(n,e),u&&u.m(n,null),ue(n,i),h[r].m(n,null),t[78](n),s=!0,a||(l=[It(zZe,"mousedown",t[49]),It(n,"keydown",t[41]),It(n,"mousedown",t[42]),It(n,"contextmenu",t[43])],a=!0)},p:function(f,p){f[1]?c?(c.p(f,p),2&p[0]&&K(c,1)):((c=pue(f)).c(),K(c,1),c.m(n,e)):c&&(Lt(),ae(c,1,1,function(){c=null}),$t()),f[2]?u?(u.p(f,p),4&p[0]&&K(u,1)):((u=mue(f)).c(),K(u,1),u.m(n,i)):u&&(Lt(),ae(u,1,1,function(){u=null}),$t()),o.p(f,p),(!s||2&p[0])&&At(n,"no-main-menu",!f[1])},i:function(f){s||(K(c),K(u),K(o),s=!0)},o:function(f){ae(c),ae(u),ae(o),s=!1},d:function(f){f&&Fe(n),c&&c.d(),u&&u.d(),h[r].d(),t[78](null),a=!1,so(l)}}}function ZZe(t,n,e){var i,r=ba("jsoneditor:TreeMode"),o=typeof window>"u";r("isSSR:",o);var s,a,l,c,u,d=_a("simple-modal").open,h=hp(),f=hp(),p=_a("absolute-popup"),m=p.openAbsolutePopup,g=p.closeAbsolutePopup,v=!1,y=Sle(),b=n.readOnly,C=n.externalContent,k=n.mainMenuBar,D=n.navigationBar,L=n.escapeControlCharacters,z=n.escapeUnicodeCharacters,R=n.parser,U=n.parseMemoizeOne,G=n.validator,X=n.validationParser,te=n.pathParser,P=n.indentation,W=n.onError,J=n.onChange,H=n.onChangeMode,le=n.onRenderValue,E=n.onRenderMenu,I=n.onClassName,N=n.onFocus,q=n.onBlur,V=n.onSortModal,re=n.onTransformModal,he=n.onJSONEditorModal,Oe=!1;JP({onMount:Yc,onDestroy:Hu,getWindow:function(){return w0(l)},hasFocus:function(){return Oe&&document.hasFocus()||ck(l)},onFocus:function(){v=!0,N&&N()},onBlur:function(){v=!1,q&&q()}});var _e=void 0;function Xe(we){r("updateSelection",we);var at="function"==typeof we?we(ie.selection):we;ir(at,ie.selection)||e(16,ie=Qe(Qe({},ie),{},{selection:at}))}var Le,rt,B,ne=!1,ie=dk(),Me=!1,Ye=!1,je=!1,yt="";function Tt(we){return fn.apply(this,arguments)}function fn(){return(fn=Ki(pn().mark(function we(at){return pn().wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return r("search text updated",at),e(74,yt=at),Mt.next=4,zl();case 4:return Mt.next=6,ur();case 6:case"end":return Mt.stop()}},we)}))).apply(this,arguments)}function Hn(){return(Hn=Ki(pn().mark(function we(){return pn().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return e(17,Le=Le?JYe(Le):void 0),at.next=3,ur();case 3:case"end":return at.stop()}},we)}))).apply(this,arguments)}function Zt(){return(Zt=Ki(pn().mark(function we(){return pn().wrap(function(at){for(;;)switch(at.prev=at.next){case 0:return e(17,Le=Le?KYe(Le):void 0),at.next=3,ur();case 3:case"end":return at.stop()}},we)}))).apply(this,arguments)}function Ei(){return(Ei=Ki(pn().mark(function we(at,Mt){var Xt,nn,on,si;return pn().wrap(function(ui){for(;;)switch(ui.prev=ui.next){case 0:if(nn=null===(Xt=Le)||void 0===Xt?void 0:Xt.activeItem,r("handleReplace",{replacementText:Mt,activeItem:nn}),nn){ui.next=4;break}return ui.abrupt("return");case 4:return on=QYe(c,ie,Mt,nn,R),si=on.newSelection,Xn(on.operations,function(No,Os){return{state:Qe(Qe({},Os),{},{selection:si})}}),ui.next=8,zl();case 8:return ui.next=10,ur();case 10:case"end":return ui.stop()}},we)}))).apply(this,arguments)}function ln(){return(ln=Ki(pn().mark(function we(at,Mt){var Xt,on;return pn().wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return r("handleReplaceAll",{text:at,replacementText:Mt}),Xt=ZYe(c,ie,at,Mt,R),on=Xt.newSelection,Xn(Xt.operations,function(si,ui){return{state:Qe(Qe({},ui),{},{selection:on})}}),Bn.next=5,zl();case 5:return Bn.next=7,ur();case 7:case"end":return Bn.stop()}},we)}))).apply(this,arguments)}function ur(){return wr.apply(this,arguments)}function wr(){return(wr=Ki(pn().mark(function we(){var at,Mt,Xt;return pn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(Mt=null===(at=Le)||void 0===at?void 0:at.activeItem,r("focusActiveSearchResult",Le),!Mt){nn.next=9;break}return e(16,ie=Qe(Qe({},kP(c,ie,Xt=Mt.path)),{},{selection:void 0})),nn.next=7,zl();case 7:return nn.next=9,un(Xt);case 9:case"end":return nn.stop()}},we)}))).apply(this,arguments)}var gi,Vr,or=kle({onChange:function(we){e(22,mr=we)}}),mr=or.getState(),Oo=oP(function(we,at){if(""===we)return r("clearing search result"),void(void 0!==Le&&e(17,Le=void 0));e(21,je=!0),setTimeout(function(){r("searching...",we);var nn,on,Bn,si,ui,No,Os,Mt=_ae(we,at,1e3);e(17,(nn=Mt,Bn=null!=(on=Le)&&on.activeItem?wae(on.activeItem):void 0,si=nn.findIndex(function(Yo){return ir(Bn,wae(Yo))}),ui=-1!==si?si:void 0!==on?.activeIndex&&on?.activeIndex0?0:-1,Os=(No=nn.map(function(Yo,yo){return Qe(Qe({},Yo),{},{active:yo===ui})}))[ui],Le={items:No,itemsMap:g0(No,function(Yo){return an(Yo.path)}),activeItem:Os,activeIndex:ui})),e(21,je=!1)})},300),On=!1,xt=[],ai=wb(Dle);function Ii(we,at,Mt,Xt){R0(function(){var nn;try{nn=ai(we,at,Mt,Xt)}catch(on){nn=[{path:[],message:"Failed to validate: "+on.message,severity:Jd.warning}]}ir(nn,xt)||(r("validationErrors changed:",nn),e(12,xt=nn))},function(nn){return r("validationErrors updated in ".concat(nn," ms"))})}function Cr(){return r("validate"),_e?{parseError:_e,isRepairable:!1}:(Ii(c,G,R,X),Ui(xt)?null:{validationErrors:xt})}function vo(){return c}function qo(){return ie}function In(we){ne||(ne=!0,e(16,ie=ru(we,ie,[],xse({json:we},10240)?lh:db)))}function oi(we){void 0!==ie.selection&&(ie.selection&&Jc(we,ie.selection.anchorPath)&&Jc(we,ie.selection.focusPath)||(r("clearing selection: path does not exist anymore",ie.selection),e(16,ie=Qe(Qe({},ie),{},{selection:T0(we,ie)}))))}function vi(we){var at=we.previousJson,Mt=we.previousState,Xt=we.previousText,nn=we.previousTextIsRepaired;void 0===at&&void 0===Xt||(void 0!==c?or.add(void 0!==at?{undo:{patch:[{op:"replace",path:"",value:at}],state:ol(Mt),json:void 0,text:Xt,textIsRepaired:nn},redo:{patch:[{op:"replace",path:"",value:c}],state:ol(ie),json:void 0,text:u,textIsRepaired:On}}:{undo:{patch:void 0,json:void 0,text:Xt,state:ol(Mt),textIsRepaired:nn},redo:{patch:void 0,json:c,state:ol(ie),text:u,textIsRepaired:On}}):void 0!==at&&or.add({undo:{patch:void 0,json:at,state:ol(Mt),text:Xt,textIsRepaired:nn},redo:{patch:void 0,json:void 0,text:u,textIsRepaired:On,state:ol(ie)}}))}function Tr(we,at){if(r("patch",we,at),void 0===c)throw new Error("Cannot apply patch: no JSON");var Mt={json:c,text:u},Xt=c,nn=ie,on=u,Bn=On,si=vae(c,we),ui=Kse(c,ie,we),No=E0(c,we),Os=function(Sh,_d){return void 0!==_d||!(arguments.length>2&&void 0!==arguments[2])||arguments[2]?Qe(Qe({},Sh),{},{selection:_d}):Sh}(ui.documentState,No,!1);r("patch updatedSelection",No);var Yo="function"==typeof at?at(ui.json,Os):void 0;e(10,c=Yo&&void 0!==Yo.json?Yo.json:ui.json);var yo=Yo&&void 0!==Yo.state?Yo.state:Os;e(16,ie=yo),e(11,u=void 0),e(23,On=!1),e(18,B=void 0),oi(c),or.add({undo:{patch:si,json:void 0,text:on,state:ol(nn),textIsRepaired:Bn},redo:{patch:we,json:void 0,state:ol(yo),text:u,textIsRepaired:On}});var Al={json:c,previousJson:Xt,undo:si,redo:we};return ei(Mt,Al),Al}function Hr(){!b&&ie.selection&&Xe(ou(ie.selection.focusPath,!0))}function no(){if(!b&&ie.selection){var we=ie.selection.focusPath,at=Sn(c,we);$o(at)?(r("openJSONEditorModal",{path:Mt=we,value:Xt=at}),Oe=!0,he({content:{json:Xt},path:Mt,onPatch:Vr.onPatch,onClose:function(){Oe=!1,Ms()}})):Xe(fr(we,!0))}var Mt,Xt}function Us(){if(!b&&Yi(ie.selection)){var we=ie.selection.focusPath,at=an(we),Mt=Sn(c,we),Xt=!pf(Mt,ie.enforceStringMap,at,R),nn=Xt?String(Mt):e0(String(Mt),R);r("handleToggleEnforceString",{enforceString:Xt,value:Mt,updatedValue:nn}),Xn([{op:"replace",path:at,value:nn}],function(on,Bn){return{state:Jse(Bn,at,Xt)}})}}function gr(){return zs.apply(this,arguments)}function zs(){return zs=Ki(pn().mark(function we(){var at,Mt=arguments;return pn().wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return at=!(Mt.length>0&&void 0!==Mt[0])||Mt[0],Xt.next=3,lue({json:c,documentState:ie,indentation:at?P:void 0,readOnly:b,parser:R,onPatch:Xn});case 3:case"end":return Xt.stop()}},we)})),zs.apply(this,arguments)}function Wa(){return qa.apply(this,arguments)}function qa(){return qa=Ki(pn().mark(function we(){var at,Mt=arguments;return pn().wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(at=!(Mt.length>0&&void 0!==Mt[0])||Mt[0],void 0!==c){Xt.next=3;break}return Xt.abrupt("return");case 3:return Xt.next=5,cue({json:c,documentState:ie,indentation:at?P:void 0,parser:R});case 5:case"end":return Xt.stop()}},we)})),qa.apply(this,arguments)}function Oc(){d(jle,{},Qe(Qe({},Vm),{},{styleWindow:{width:"450px"}}),{onClose:function(){return Ms()}})}function xe(we,at){d(qle,{text:we,onParse:ok,onRepair:yse,onApply:at},Qe(Qe({},Vm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return Ms()}})}function He(){due({json:c,text:u,documentState:ie,keepSelection:!1,readOnly:b,onChange:J,onPatch:Xn})}function We(){!b&&void 0!==c&&ie.selection&&M0(ie.selection)&&!Ui(ie.selection.focusPath)&&(r("duplicate",{selection:ie.selection}),Xn(pae(c,uae(ie.selection))))}function lt(){b||!ie.selection||!Ir(ie.selection)&&!Yi(ie.selection)||Ui(ie.selection.focusPath)||(r("extract",{selection:ie.selection}),Xn(function(at,Mt){if(Yi(Mt))return[{op:"move",from:an(Mt.focusPath),path:""}];if(!Ir(Mt))throw new Error("Cannot create extract operations: parent must be an Object or Array");var Xt=Sn(at,qi(Mt.focusPath));if(eo(Xt))return[{op:"replace",path:"",value:Mt.paths.map(function(on){var Bn=Bs(Fn(on));return Xt[Bn]})}];if(Do(Xt)){var nn={};return Mt.paths.forEach(function(on){var Bn=String(Fn(on));nn[Bn]=Xt[Bn]}),[{op:"replace",path:"",value:nn}]}throw new Error("Cannot extract: unsupported type of selection "+JSON.stringify(Mt))}(c,ie.selection),function(at,Mt){if($o(at))return{state:pp(at,Mt,[])}}))}function Ue(we){void 0!==c&&Ik({insertType:we,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:b,parser:R,onPatch:Xn,onReplaceJson:yr})}function kn(we){vs(ie.selection)&&Xe(fr(ie.selection.focusPath,!1)),Ue(we)}function ni(we){if(!b&&ie.selection)if(ng(ie.selection))try{var at=ie.selection.anchorPath,Mt=Sn(c,at),Xt=function(on,Bn,si){if("array"===Bn){if(Array.isArray(on))return on;if(To(on))return mse(on);if("string"==typeof on)try{var ui=si.parse(on);if(Array.isArray(ui))return ui;if(To(ui))return mse(ui)}catch{return[on]}return[on]}if("object"===Bn){if(Array.isArray(on))return pse(on);if(To(on))return on;if("string"==typeof on)try{var No=si.parse(on);if(To(No))return No;if(Array.isArray(No))return pse(No)}catch{return{value:on}}return{value:on}}if("value"===Bn)return $o(on)?si.stringify(on):on;throw new Error("Cannot convert ".concat(MN(on,si)," to ").concat(Bn))}(Mt,we,R);if(Xt===Mt)return;var nn=[{op:"replace",path:an(at),value:Xt}];r("handleConvert",{selection:ie.selection,path:at,type:we,operations:nn}),Xn(nn,function(on,Bn){return{state:pp(on,Bn,ie.selection.focusPath)}})}catch(on){W(on)}else W(new Error("Cannot convert current selection to ".concat(we)))}function ci(){var we=oae(c,ie,!1),at=qi(ie.selection.focusPath);!Ui(we.focusPath)&&ir(at,qi(we.focusPath))?Xe(gf(we.focusPath)):Xe(mf(at)),r("insert before",{selection:ie.selection,selectionBefore:we,parentPath:at}),zl().then(El)}function li(){var we=Ir(ie.selection)?Fn(ie.selection.paths):ie.selection.focusPath;r("insert after",we),Xe(gf(we)),zl().then(El)}function Sr(we){return qr.apply(this,arguments)}function qr(){return(qr=Ki(pn().mark(function we(at){return pn().wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,hue({char:at,selectInside:!0,refJsonEditor:l,json:c,documentState:ie,readOnly:b,parser:R,onPatch:Xn,onReplaceJson:yr,onSelect:Xe});case 2:case"end":return Mt.stop()}},we)}))).apply(this,arguments)}function fi(){if(!b&&or.getState().canUndo){var we=or.undo();if(we){var at={json:c,text:u};e(10,c=we.undo.patch?Xu(c,we.undo.patch):we.undo.json),e(16,ie=we.undo.state),e(11,u=we.undo.text),e(23,On=we.undo.textIsRepaired),r("undo",{item:we,json:c,documentState:ie}),ei(at,{json:c,previousJson:at.json,redo:we.undo.patch,undo:we.redo.patch}),Ms(),ie.selection&&un(ie.selection.focusPath,!1)}}}function vr(){if(!b&&or.getState().canRedo){var we=or.redo();if(we){var at={json:c,text:u};e(10,c=we.redo.patch?Xu(c,we.redo.patch):we.redo.json),e(16,ie=we.redo.state),e(11,u=we.redo.text),e(23,On=we.redo.textIsRepaired),r("redo",{item:we,json:c,documentState:ie}),ei(at,{json:c,previousJson:at.json,redo:we.redo.patch,undo:we.undo.patch}),Ms(),ie.selection&&un(ie.selection.focusPath,!1)}}}function Te(we){var at;b||void 0===c||(Oe=!0,V({id:h,json:c,rootPath:we,onSort:(at=Ki(pn().mark(function Mt(Xt){var nn;return pn().wrap(function(on){for(;;)switch(on.prev=on.next){case 0:r("onSort",we,nn=Xt.operations),Xn(nn,function(Bn,si){return{state:Qe(Qe({},pp(Bn,si,we)),{},{selection:fr(we,!1)})}});case 3:case"end":return on.stop()}},Mt)})),function(Mt){return at.apply(this,arguments)}),onClose:function(){Oe=!1,Ms()}}))}function kt(){ie.selection&&Te(lae(c,ie.selection))}function Vt(we){var Mt=we.rootPath,Xt=we.onTransform,nn=we.onClose;void 0!==c&&Mt&&(Oe=!0,re({id:we.id||f,json:c,rootPath:Mt,onTransform:Xt?function(on){Xt({operations:on,json:c,transformedJson:Xu(c,on)})}:function(on){r("onTransform",Mt,on),Xn(on,function(Bn,si){return{state:Qe(Qe({},pp(Bn,si,Mt)),{},{selection:fr(Mt,!1)})}})},onClose:function(){Oe=!1,Ms(),nn&&nn()}}))}function rn(){ie.selection&&Vt({rootPath:lae(c,ie.selection)})}function un(we){return ii.apply(this,arguments)}function ii(){return ii=Ki(pn().mark(function we(at){var Mt,Xt,nn,on,si=arguments;return pn().wrap(function(ui){for(;;)switch(ui.prev=ui.next){case 0:return Mt=!(si.length>1&&void 0!==si[1])||si[1],e(16,ie=kP(c,ie,qi(at))),ui.next=4,zl();case 4:if(!(Xt=Ni(at))){ui.next=14;break}if(r("scrollTo",{path:at,elem:Xt,refContents:s}),nn=s.getBoundingClientRect(),on=Xt.getBoundingClientRect(),Mt){ui.next=12;break}if(!(on.bottom>nn.top&&on.topMt.bottom-20&&y(at,{container:s,offset:-(Mt.height-nn-20),duration:0})}}function ei(we,at){(void 0!==we.json||void 0!==we?.text)&&(void 0!==u?J({text:u,json:void 0},we,{contentErrors:Cr(),patchResult:at}):void 0!==c&&J({text:void 0,json:c},we,{contentErrors:Cr(),patchResult:at}))}function Xn(we,at){if(!b)return r("handlePatch",we,at),Tr(we,at)}function yr(we,at){var Mt=ie,Xt=c,nn=u,on={json:c,text:u},Bn=On,si=ru(c,ie,[],lh),ui="function"==typeof at?at(we,si):void 0;e(10,c=ui&&void 0!==ui.json?ui.json:we),e(16,ie=ui&&void 0!==ui.state?ui.state:si),e(11,u=void 0),e(23,On=!1),oi(c),vi({previousJson:Xt,previousState:Mt,previousText:nn,previousTextIsRepaired:Bn}),ei(on,null)}function Er(we,at){r("handleChangeText");var Mt=ie,Xt=c,nn=u,on={json:c,text:u},Bn=On;try{e(10,c=U(we)),e(16,ie=ru(c,ie,[],lh)),e(11,u=void 0),e(23,On=!1)}catch{try{e(10,c=U(Kd(we))),e(16,ie=ru(c,ie,[],lh)),e(11,u=we),e(23,On=!0)}catch{e(10,c=void 0),e(16,ie=dk({json:c,expand:lh})),e(11,u=we),e(23,On=!1)}}if("function"==typeof at){var si=at(c,ie);e(10,c=si&&si.json?si.json:c),e(16,ie=si&&si.state?si.state:ie)}oi(c),vi({previousJson:Xt,previousState:Mt,previousText:nn,previousTextIsRepaired:Bn}),ei(on,null)}function Io(we,at){var Mt=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r("expand",{path:we,expanded:at,recursive:Mt}),e(16,ie=at?Mt?ru(c,ie,we,db):function VYe(t,n){return Qe(Qe({},t),{},{expandedMap:Qe(Qe({},t.expandedMap),{},Ul({},an(n),!0))})}(ie,we):Xse(ie,we)),ie.selection&&!at&&function UYe(t,n){return A0(t.focusPath,n)&&(t.focusPath.length>n.length||Hs(t))}(ie.selection,we)&&Xe(void 0),setTimeout(function(){ck(l)||Ms()})}function sa(we){r("openFind",{findAndReplace:we}),e(19,Me=!1),e(20,Ye=!1),zl().then(function(){e(19,Me=!0),e(20,Ye=we)})}function md(we,at){r("handleExpandSection",we,at);var nn,on,Bn,Mt=an(we);e(16,(on=Mt,Bn=at,ie=Qe(Qe({},nn=ie),{},{visibleSectionsMap:Qe(Qe({},nn.visibleSectionsMap),{},Ul({},on,Yse(hk(nn,on).concat(Bn))))})))}function pu(we){r("pasted json as text",we),e(18,B=we)}function aa(we){Oe=!0;var No=m(ZKe,{json:c,documentState:ie,parser:R,showTip:we.showTip,onEditKey:Hr,onEditValue:no,onToggleEnforceString:Us,onCut:gr,onCopy:Wa,onPaste:Oc,onRemove:He,onDuplicate:We,onExtract:lt,onInsertBefore:ci,onInsert:kn,onConvert:ni,onInsertAfter:li,onSort:kt,onTransform:rn,onCloseContextMenu:function(){g(No),Ms()}},{left:we.left,top:we.top,offsetTop:we.offsetTop,offsetLeft:we.offsetLeft,width:we.width,height:we.height,anchor:we.anchor,closeOnOuterClick:!0,onClose:function(){Oe=!1,Ms()}})}function El(we){if(!b&&!mp(ie.selection)){if(we&&(we.stopPropagation(),we.preventDefault()),we&&"contextmenu"===we.type&&we.target!==a)aa({left:we.clientX,top:we.clientY,width:260,height:336,showTip:!1});else{var at,Mt=null===(at=s)||void 0===at?void 0:at.querySelector(".jse-context-menu-pointer.jse-selected");if(Mt)aa({anchor:Mt,offsetTop:2,width:260,height:336,showTip:!1});else{var Xt,nn=null===(Xt=s)||void 0===Xt?void 0:Xt.getBoundingClientRect();nn&&aa({top:nn.top+2,left:nn.left+2,width:260,height:336,showTip:!1})}}return!1}}function gd(){return(gd=Ki(pn().mark(function we(){var at,Mt,Xt;return pn().wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:return r("apply pasted json",B),Mt=(at=B).path,Xt=at.contents,Xe(fr(Mt,!1)),nn.next=5,zl();case 5:Xn([{op:"replace",path:an(Mt),value:Xt}],function(on,Bn){return{state:pp(on,Bn,Mt)}});case 7:case"end":return nn.stop()}},we)}))).apply(this,arguments)}function Ms(){r("focus"),a&&(a.focus(),a.select())}function vd(we){return at=c,Mt=ie,nn=qi(Xt=we),on=[Fn(Xt)],(si=(Bn=Sn(at,nn))?OP(Bn,Mt,on):void 0)?fr(nn.concat(si),!1):gf(Xt);var at,Mt,Xt,nn,on,Bn,si}function yd(we){i&&i.onDrag(we)}function kT(){i&&i.onDragEnd()}return t.$$set=function(we){"readOnly"in we&&e(0,b=we.readOnly),"externalContent"in we&&e(50,C=we.externalContent),"mainMenuBar"in we&&e(1,k=we.mainMenuBar),"navigationBar"in we&&e(2,D=we.navigationBar),"escapeControlCharacters"in we&&e(51,L=we.escapeControlCharacters),"escapeUnicodeCharacters"in we&&e(52,z=we.escapeUnicodeCharacters),"parser"in we&&e(3,R=we.parser),"parseMemoizeOne"in we&&e(53,U=we.parseMemoizeOne),"validator"in we&&e(54,G=we.validator),"validationParser"in we&&e(55,X=we.validationParser),"pathParser"in we&&e(4,te=we.pathParser),"indentation"in we&&e(5,P=we.indentation),"onError"in we&&e(6,W=we.onError),"onChange"in we&&e(56,J=we.onChange),"onChangeMode"in we&&e(57,H=we.onChangeMode),"onRenderValue"in we&&e(58,le=we.onRenderValue),"onRenderMenu"in we&&e(7,E=we.onRenderMenu),"onClassName"in we&&e(59,I=we.onClassName),"onFocus"in we&&e(60,N=we.onFocus),"onBlur"in we&&e(61,q=we.onBlur),"onSortModal"in we&&e(62,V=we.onSortModal),"onTransformModal"in we&&e(63,re=we.onTransformModal),"onJSONEditorModal"in we&&e(64,he=we.onJSONEditorModal)},t.$$.update=function(){var we,at;3145728&t.$$.dirty[1]&&e(73,rt=gP({escapeControlCharacters:L,escapeUnicodeCharacters:z})),524288&t.$$.dirty[1]&&function pt(we){void 0!==we.json&&function(at){if(void 0!==at){var Mt=!ir(c,at);if(r("update external json",{isChanged:Mt,currentlyText:void 0===c}),Mt){var Xt={json:c,text:u},nn=ie,on=c,Bn=u,si=On;e(10,c=at),In(c),e(11,u=void 0),e(23,On=!1),oi(c),vi({previousJson:on,previousState:nn,previousText:Bn,previousTextIsRepaired:si}),ei(Xt,null)}}}(we.json),void 0!==we.text&&function(at){if(void 0!==at&&void 0===C.json){var Mt=at!==u;if(r("update external text",{isChanged:Mt}),Mt){var Xt={json:c,text:u},nn=c,on=ie,Bn=u,si=On;try{e(10,c=U(at)),In(c),e(11,u=at),e(23,On=!1),_e=void 0}catch(ui){try{e(10,c=U(Kd(at))),In(c),e(11,u=at),e(23,On=!0),_e=void 0,oi(c)}catch{e(10,c=void 0),e(11,u=C.text),e(23,On=!1),_e=sk(u,ui.message||ui.toString())}}oi(c),vi({previousJson:nn,previousState:on,previousText:Bn,previousTextIsRepaired:si}),ei(Xt,null)}}}(we.text)}(C),1024&t.$$.dirty[0]|4096&t.$$.dirty[2]&&Oo(yt,c),1032&t.$$.dirty[0]|25165824&t.$$.dirty[1]&&Ii(c,G,R,X),4096&t.$$.dirty[0]&&e(24,(at={},(we=xt).forEach(function(Mt){at[an(Mt.path)]=Mt}),we.forEach(function(Mt){for(var Xt=Mt.path;Xt.length>0;){var nn=an(Xt=qi(Xt));nn in at||(at[nn]={isChildError:!0,path:Xt,message:"Contains invalid data",severity:Jd.warning})}}),gi=at)),512&t.$$.dirty[0]&&(i=s?function(we){var at,Mt;function Xt(si){return si<20?200:si<50?400:1200}function nn(){we&&(we.scrollTop+=.05*(at||0))}function on(si){Mt&&si===at||(Bn(),XP("startAutoScroll",si),at=si,Mt=setInterval(nn,50))}function Bn(){Mt&&(XP("stopAutoScroll"),clearInterval(Mt),Mt=void 0,at=void 0)}return XP("createAutoScrollHandler",we),{onDrag:function(si){if(we){var ui=si.clientY,No=we.getBoundingClientRect(),Os=No.top,Yo=No.bottom;uiYo?on(Xt(ui-Yo)):Bn()}},onDragEnd:function(){Bn()}}}(s):void 0),9&t.$$.dirty[0]|402653184&t.$$.dirty[1]|2048&t.$$.dirty[2]&&e(13,Vr={readOnly:b,parser:R,normalization:rt,getJson:vo,getDocumentState:qo,findElement:Ni,findNextInside:vd,focus:Ms,onPatch:Xn,onInsert:Ue,onExpand:Io,onSelect:Xe,onFind:sa,onExpandSection:md,onPasteJson:pu,onRenderValue:le,onContextMenu:aa,onClassName:I||function(){},onDrag:yd,onDragEnd:kT}),8192&t.$$.dirty[0]&&r("context changed",Vr)},[b,k,D,R,te,P,W,E,function(){return On&&void 0!==c&&yr(c),{json:c,text:u}},s,c,u,xt,Vr,a,l,ie,Le,B,Me,Ye,je,mr,On,gi,o,Tt,function(){return Hn.apply(this,arguments)},function(){return Zt.apply(this,arguments)},function(we,at){return Ei.apply(this,arguments)},function(we,at){return ln.apply(this,arguments)},function(){e(19,Me=!1),e(20,Ye=!1),Tt(""),Ms()},function(we){r("select validation error",we),Xe(fr(we.path,!1)),un(we.path)},Wa,function(we){we.preventDefault(),uue({clipboardText:we.clipboardData.getData("text/plain"),json:c,documentState:ie,readOnly:b,parser:R,onPatch:Xn,onChangeText:Er,openRepairModal:xe})},fi,vr,function(){Te([])},function(){Vt({rootPath:[]})},function(){Io([],!0,!0)},function(){Io([],!1,!0)},function(we){var at=fp(we),Mt=we.shiftKey;if(r("keydown",{combo:at,key:we.key}),"Ctrl+X"===at&&(we.preventDefault(),gr(!0)),"Ctrl+Shift+X"===at&&(we.preventDefault(),gr(!1)),"Ctrl+C"===at&&(we.preventDefault(),Wa(!0)),"Ctrl+Shift+C"===at&&(we.preventDefault(),Wa(!1)),"Ctrl+D"===at&&(we.preventDefault(),We()),"Delete"!==at&&"Backspace"!==at||(we.preventDefault(),He()),"Insert"===at&&(we.preventDefault(),Ue("structure")),"Ctrl+A"===at&&(we.preventDefault(),Xe(fr([],!1))),"Ctrl+Q"===at&&El(we),"ArrowUp"===at||"Shift+ArrowUp"===at){we.preventDefault();var Xt=ie.selection?oae(c,ie,Mt,!0)||ie.selection:T0(c,ie);Xe(Xt),$n(Xt.focusPath)}if("ArrowDown"===at||"Shift+ArrowDown"===at){we.preventDefault();var nn=ie.selection?function(yo,Al){var Sh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ar=Al.selection;if(!Ar)return null;var Kl=arguments.length>3&&void 0!==arguments[3]&&arguments[3]||!Ir(Ar)?Ar.focusPath:Fn(Ar.paths),mu=OP(yo,Al,Kl),bd=mu,kh=mu;if(null===mu||null==bd||null==kh)return null;if(Sh){var xd=OP(yo,$o(Sn(yo,Kl))?Xse(Al,Kl):Al,Kl);return null===xd?null:Zu(Ar)?Es(yo,xd,xd):Hs(Ar)?Es(yo,bd,kh):Es(yo,Ar.anchorPath,xd)}if(vs(Ar)){var hx=Sn(yo,qi(mu));return Array.isArray(hx)?fr(kh,!1):ou(kh,!1)}return Yi(Ar)?fr(kh,!1):Hs(Ar)?Es(yo,bd,kh):Es(yo,mu,mu)}(c,ie,Mt,!0)||ie.selection:T0(c,ie);Xe(nn),$n(nn.focusPath)}if("ArrowLeft"===at||"Shift+ArrowLeft"===at){we.preventDefault();var on=ie.selection?function(yo,Al){var Sh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ar=Al.selection;if(!Ar)return null;var Kl=sae(yo,Al,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),mu=Kl.caret,bd=Kl.previous;if(Sh)return Ir(Ar)?null:Es(yo,Ar.anchorPath,Ar.focusPath);if(mu&&bd)return IP(bd);var xd=Sn(yo,qi(Ar.focusPath));return Yi(Ar)&&Array.isArray(xd)?Es(yo,Ar.focusPath,Ar.focusPath):Ir(Ar)&&!Array.isArray(xd)?ou(Ar.focusPath,!1):null}(c,ie,Mt,!b)||ie.selection:T0(c,ie);Xe(on),$n(on.focusPath)}if("ArrowRight"===at||"Shift+ArrowRight"===at){we.preventDefault();var Bn=ie.selection&&void 0!==c?function(yo,Al){var Sh=arguments.length>2&&void 0!==arguments[2]&&arguments[2],Ar=Al.selection;if(!Ar)return null;var Kl=sae(yo,Al,!(arguments.length>3&&void 0!==arguments[3])||arguments[3]),mu=Kl.caret,bd=Kl.next;return Sh?Ir(Ar)?null:Es(yo,Ar.anchorPath,Ar.focusPath):mu&&bd?IP(bd):Ir(Ar)?fr(Ar.focusPath,!1):null}(c,ie,Mt,!b)||ie.selection:T0(c,ie);Xe(Bn),$n(Bn.focusPath)}if("Enter"===at&&ie.selection){if(!b&&Ir(ie.selection)&&1===ie.selection.paths.length){var si=ie.selection.focusPath,ui=Sn(c,qi(si));Array.isArray(ui)&&Xe(fr(si,!1))}!b&&vs(ie.selection)&&(we.preventDefault(),Xe(Qe(Qe({},ie.selection),{},{edit:!0}))),Yi(ie.selection)&&(we.preventDefault(),$o(Sn(c,ie.selection.focusPath))?Io(ie.selection.focusPath,!0):b||Xe(Qe(Qe({},ie.selection),{},{edit:!0})))}if(1===at.replace(/^Shift\+/,"").length&&ie.selection)return we.preventDefault(),void Sr(we.key);if("Enter"===at&&(Zu(ie.selection)||Hs(ie.selection)))return we.preventDefault(),void Sr("");if("Ctrl+Enter"===at&&Yi(ie.selection)){var No=Sn(c,ie.selection.focusPath);mS(No)&&window.open(String(No),"_blank")}if("Escape"===at&&ie.selection&&(we.preventDefault(),Xe(void 0)),"Ctrl+F"===at&&(we.preventDefault(),sa(!1)),"Ctrl+H"===at&&(we.preventDefault(),sa(!0)),"Ctrl+Z"===at){we.preventDefault();var Os=document.activeElement;Os&&Os.blur&&Os.focus?(Os.blur(),setTimeout(function(){fi(),setTimeout(function(){return Os.select()})})):fi()}if("Ctrl+Shift+Z"===at){we.preventDefault();var Yo=document.activeElement;Yo&&Yo.blur&&Yo.focus?(Yo.blur(),setTimeout(function(){vr(),setTimeout(function(){return Yo.select()})})):vr()}},function(we){r("handleMouseDown",we),setTimeout(function(){setTimeout(function(){v||Mse(we.target,"BUTTON")||(Ms(),ie.selection||void 0!==c||""!==u&&void 0!==u||(r("createDefaultSelection"),e(16,ie=Qe(Qe({},ie),{},{selection:Es(c||{},[],[])}))))})})},El,function(we){b||aa({anchor:Ise(we.target,"BUTTON"),offsetTop:0,width:260,height:336,showTip:!0})},function(){return gd.apply(this,arguments)},function(){r("clear pasted json"),e(18,B=void 0)},function(){H(Lo.text)},function(we){Xe(we),Ms(),un(we.focusPath)},function(we){!ob(we.target,function(Mt){return Mt===l})&&mp(ie.selection)&&(r("click outside the editor, stop edit mode"),Xe(function(Mt){return vs(Mt)||Yi(Mt)?Qe(Qe({},Mt),{},{edit:!1}):Mt}),v&&a&&(a.focus(),a.blur()),zl().then(function(){setTimeout(function(){a&&a.blur()})}))},C,L,z,U,G,X,J,H,le,I,N,q,V,re,he,function(){var we=arguments.length>0&&void 0!==arguments[0]?arguments[0]:db;r("expand");var at=Qe(Qe({},ie),{},{expandedMap:{},visibleSectionsMap:{}});e(16,ie=ru(c,at,[],we))},Cr,vo,Tr,Vt,un,Ni,Ms,rt,yt,function(we){e(19,Me=we)},function(we){Hi[we?"unshift":"push"](function(){e(14,a=we)})},function(we){Hi[we?"unshift":"push"](function(){e(9,s=we)})},function(we){Hi[we?"unshift":"push"](function(){e(15,l=we)})}]}var fj=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,ZZe,QZe,Ti,{readOnly:0,externalContent:50,mainMenuBar:1,navigationBar:2,escapeControlCharacters:51,escapeUnicodeCharacters:52,parser:3,parseMemoizeOne:53,validator:54,validationParser:55,pathParser:4,indentation:5,onError:6,onChange:56,onChangeMode:57,onRenderValue:58,onRenderMenu:7,onClassName:59,onFocus:60,onBlur:61,onSortModal:62,onTransformModal:63,onJSONEditorModal:64,expand:65,validate:66,getJson:67,patch:68,acceptAutoRepair:8,openTransformModal:69,scrollTo:70,findElement:71,focus:72},GZe,[-1,-1,-1,-1,-1]),r}return Se(e,[{key:"expand",get:function(){return this.$$.ctx[65]}},{key:"validate",get:function(){return this.$$.ctx[66]}},{key:"getJson",get:function(){return this.$$.ctx[67]}},{key:"patch",get:function(){return this.$$.ctx[68]}},{key:"acceptAutoRepair",get:function(){return this.$$.ctx[8]}},{key:"openTransformModal",get:function(){return this.$$.ctx[69]}},{key:"scrollTo",get:function(){return this.$$.ctx[70]}},{key:"findElement",get:function(){return this.$$.ctx[71]}},{key:"focus",get:function(){return this.$$.ctx[72]}}]),e}();function eet(t){di(t,"svelte-107mggt",".jse-modal.svelte-107mggt.svelte-107mggt{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-107mggt .jse-modal-contents.svelte-107mggt{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-107mggt .jse-modal-contents .jse-actions button.jse-primary.svelte-107mggt:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;color:inherit;min-height:0;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex:1;display:flex;gap:calc(2 * var(--jse-padding));min-height:0;box-sizing:border-box;padding:0 calc(2 * var(--jse-padding)) var(--jse-padding)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p{margin:var(--jse-padding) 0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:first-child{margin-top:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt p:last-child{margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents .jse-description.svelte-107mggt code{background:var(--jse-modal-code-background);font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono)}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{flex:1;outline:none;resize:vertical}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt{flex:1;display:flex;flex-direction:column;gap:calc(2 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-original-data.jse-hide.svelte-107mggt{flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents .jse-preview-data.svelte-107mggt{flex:1;display:flex;flex-direction:column;min-height:0;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.jse-hide-original-data.svelte-107mggt{flex-direction:column;gap:0;margin-bottom:0}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-actions.svelte-107mggt{padding:var(--jse-padding) calc(2 * var(--jse-padding)) calc(2 * var(--jse-padding))}@media screen and (max-width: 1200px){.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents.svelte-107mggt{flex-direction:column;overflow:auto}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-query-contents textarea.jse-query.svelte-107mggt{min-height:150px;flex:none}.jse-modal.jse-transform.svelte-107mggt .jse-modal-contents .jse-main-contents .jse-data-contents.svelte-107mggt .jse-tree-mode{height:300px;flex:none}}.jse-modal.jse-transform.svelte-107mggt .jse-label.svelte-107mggt{font-weight:bold;display:block;box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner.svelte-107mggt{margin-top:calc(2 * var(--jse-padding));margin-bottom:calc(0.5 * var(--jse-padding));box-sizing:border-box}.jse-modal.jse-transform.svelte-107mggt .jse-label .jse-label-inner button.svelte-107mggt{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;font-weight:bold;padding:0}.jse-modal.jse-transform.svelte-107mggt .jse-tree-mode{flex:1;background:var(--jse-input-background-readonly);box-shadow:none;box-sizing:border-box;--jse-main-border:var(--jse-input-border)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt{border:var(--jse-input-border);outline:none;box-sizing:border-box;padding:calc(0.5 * var(--jse-padding));font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:inherit;background:var(--jse-input-background)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:focus,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:focus{border:var(--jse-input-border-focus)}.jse-modal.jse-transform.svelte-107mggt input.svelte-107mggt:read-only,.jse-modal.jse-transform.svelte-107mggt textarea.svelte-107mggt:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-transform.svelte-107mggt .jse-preview.jse-error.svelte-107mggt{flex:1;background:var(--jse-input-background-readonly);border:var(--jse-input-border);color:var(--jse-error-color);padding:calc(0.5 * var(--jse-padding))}.jse-modal.jse-transform.svelte-107mggt a{color:var(--jse-a-color)}.jse-modal.jse-transform.svelte-107mggt a:hover{color:var(--jse-a-color-highlight)}")}function yue(t){var n,e,i,r,o,s=[net,tet],a=[];function l(c,u){return 16384&u[0]&&(n=null),null==n&&(n=!!Array.isArray(c[14])),n?0:1}return e=l(t,[-1,-1]),i=a[e]=s[e](t),{c:function(){i.c(),r=br()},m:function(c,u){a[e].m(c,u),Pe(c,r,u),o=!0},p:function(c,u){var d=e;(e=l(c,u))===d?a[e].p(c,u):(Lt(),ae(a[d],1,1,function(){a[d]=null}),$t(),(i=a[e])?i.p(c,u):(i=a[e]=s[e](c)).c(),K(i,1),i.m(r.parentNode,r))},i:function(c){o||(K(i),o=!0)},o:function(c){ae(i),o=!1},d:function(c){a[e].d(c),c&&Fe(r)}}}function tet(t){var n;return{c:function(){n=tn("(Only available for arrays, not for objects)")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function net(t){var n,e;return n=new TJe({props:{queryOptions:t[12],json:t[14],onChange:t[22]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};4096&r[0]&&(o.queryOptions=i[12]),16384&r[0]&&(o.json=i[14]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function _ue(t){var n,e;return n=new fj({props:{externalContent:t[19],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ho,onError:console.error,onChange:ho,onChangeMode:ho,onFocus:ho,onBlur:ho,onSortModal:ho,onTransformModal:ho,onJSONEditorModal:ho,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};524288&r[0]&&(o.externalContent=i[19]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function iet(t){var n,e;return{c:function(){n=ve("div"),e=tn(t[17]),j(n,"class","jse-preview jse-error svelte-107mggt")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:function(i,r){131072&r[0]&&qn(e,i[17])},i:jt,o:jt,d:function(i){i&&Fe(n)}}}function ret(t){var n,e;return n=new fj({props:{externalContent:t[18],readOnly:!0,mainMenuBar:!1,navigationBar:!1,indentation:t[2],escapeControlCharacters:t[3],escapeUnicodeCharacters:t[4],parser:t[5],parseMemoizeOne:t[6],onRenderValue:t[10],onRenderMenu:ho,onError:console.error,onChange:ho,onChangeMode:ho,onFocus:ho,onBlur:ho,onSortModal:ho,onTransformModal:ho,onJSONEditorModal:ho,onClassName:t[11],validator:null,validationParser:t[7],pathParser:t[8]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};262144&r[0]&&(o.externalContent=i[18]),4&r[0]&&(o.indentation=i[2]),8&r[0]&&(o.escapeControlCharacters=i[3]),16&r[0]&&(o.escapeUnicodeCharacters=i[4]),32&r[0]&&(o.parser=i[5]),64&r[0]&&(o.parseMemoizeOne=i[6]),1024&r[0]&&(o.onRenderValue=i[10]),2048&r[0]&&(o.onClassName=i[11]),128&r[0]&&(o.validationParser=i[7]),256&r[0]&&(o.pathParser=i[8]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function oet(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te,P,W,J,H,le,E,I,N,q,V,re,he,Oe,_e,Xe,Le,rt,B,ne=t[21](t[0]).description+"";n=new RJe({props:{queryLanguages:t[9],queryLanguageId:t[0],onChangeQueryLanguage:t[27]}}),y=new rr({props:{data:t[15]?su:gp}});var ie=t[15]&&yue(t);W=new rr({props:{data:t[16]?su:gp}});var Me=t[16]&&_ue(t),Ye=[ret,iet],je=[];function yt(Tt,fn){return Tt[17]?1:0}return q=yt(t),V=je[q]=Ye[q](t),{c:function(){ft(n.$$.fragment),e=tt(),i=ve("div"),r=ve("div"),o=ve("div"),(s=ve("div")).innerHTML='
    Language
    ',a=tt(),l=ve("div"),c=tt(),(u=ve("div")).innerHTML='
    Path
    ',d=tt(),h=ve("input"),p=tt(),m=ve("div"),g=ve("div"),v=ve("button"),ft(y.$$.fragment),b=tn("\n Wizard"),C=tt(),ie&&ie.c(),k=tt(),(D=ve("div")).innerHTML='
    Query
    ',L=tt(),z=ve("textarea"),R=tt(),U=ve("div"),G=ve("div"),X=ve("div"),te=ve("div"),P=ve("button"),ft(W.$$.fragment),J=tn("\n Original"),H=tt(),Me&&Me.c(),le=tt(),E=ve("div"),(I=ve("div")).innerHTML='
    Preview
    ',N=tt(),V.c(),re=tt(),he=ve("div"),Oe=ve("button"),_e=tn("Transform"),j(s,"class","jse-label svelte-107mggt"),j(l,"class","jse-description svelte-107mggt"),j(u,"class","jse-label svelte-107mggt"),j(h,"class","jse-path svelte-107mggt"),j(h,"type","text"),h.readOnly=!0,j(h,"title","Selected path"),h.value=f=Ui(t[1])?"(whole document)":iu(ql(t[1])),j(v,"type","button"),j(v,"class","svelte-107mggt"),j(g,"class","jse-label-inner svelte-107mggt"),j(m,"class","jse-label svelte-107mggt"),j(D,"class","jse-label svelte-107mggt"),j(z,"class","jse-query svelte-107mggt"),j(z,"spellcheck","false"),z.value=t[13],j(o,"class","jse-query-contents svelte-107mggt"),j(P,"type","button"),j(P,"class","svelte-107mggt"),j(te,"class","jse-label-inner svelte-107mggt"),j(X,"class","jse-label svelte-107mggt"),j(G,"class","jse-original-data svelte-107mggt"),At(G,"jse-hide",!t[16]),j(I,"class","jse-label svelte-107mggt"),j(E,"class","jse-preview-data svelte-107mggt"),j(U,"class","jse-data-contents svelte-107mggt"),At(U,"jse-hide-original-data",!t[16]),j(r,"class","jse-main-contents svelte-107mggt"),j(Oe,"type","button"),j(Oe,"class","jse-primary svelte-107mggt"),Oe.disabled=Xe=!!t[17],j(he,"class","jse-actions svelte-107mggt"),j(i,"class","jse-modal-contents svelte-107mggt")},m:function(Tt,fn){dt(n,Tt,fn),Pe(Tt,e,fn),Pe(Tt,i,fn),ue(i,r),ue(r,o),ue(o,s),ue(o,a),ue(o,l),l.innerHTML=ne,ue(o,c),ue(o,u),ue(o,d),ue(o,h),ue(o,p),ue(o,m),ue(m,g),ue(g,v),dt(y,v,null),ue(v,b),ue(o,C),ie&&ie.m(o,null),ue(o,k),ue(o,D),ue(o,L),ue(o,z),ue(r,R),ue(r,U),ue(U,G),ue(G,X),ue(X,te),ue(te,P),dt(W,P,null),ue(P,J),ue(G,H),Me&&Me.m(G,null),ue(U,le),ue(U,E),ue(E,I),ue(E,N),je[q].m(E,null),ue(i,re),ue(i,he),ue(he,Oe),ue(Oe,_e),Le=!0,rt||(B=[It(v,"click",t[25]),It(z,"input",t[23]),It(P,"click",t[26]),It(Oe,"click",t[24]),ya(aet.call(null,Oe))],rt=!0)},p:function(Tt,fn){var Hn={};512&fn[0]&&(Hn.queryLanguages=Tt[9]),1&fn[0]&&(Hn.queryLanguageId=Tt[0]),n.$set(Hn),(!Le||1&fn[0])&&ne!==(ne=Tt[21](Tt[0]).description+"")&&(l.innerHTML=ne),(!Le||2&fn[0]&&f!==(f=Ui(Tt[1])?"(whole document)":iu(ql(Tt[1])))&&h.value!==f)&&(h.value=f);var Zt={};32768&fn[0]&&(Zt.data=Tt[15]?su:gp),y.$set(Zt),Tt[15]?ie?(ie.p(Tt,fn),32768&fn[0]&&K(ie,1)):((ie=yue(Tt)).c(),K(ie,1),ie.m(o,k)):ie&&(Lt(),ae(ie,1,1,function(){ie=null}),$t()),(!Le||8192&fn[0])&&(z.value=Tt[13]);var Ei={};65536&fn[0]&&(Ei.data=Tt[16]?su:gp),W.$set(Ei),Tt[16]?Me?(Me.p(Tt,fn),65536&fn[0]&&K(Me,1)):((Me=_ue(Tt)).c(),K(Me,1),Me.m(G,null)):Me&&(Lt(),ae(Me,1,1,function(){Me=null}),$t()),(!Le||65536&fn[0])&&At(G,"jse-hide",!Tt[16]);var ln=q;(q=yt(Tt))===ln?je[q].p(Tt,fn):(Lt(),ae(je[ln],1,1,function(){je[ln]=null}),$t(),(V=je[q])?V.p(Tt,fn):(V=je[q]=Ye[q](Tt)).c(),K(V,1),V.m(E,null)),(!Le||65536&fn[0])&&At(U,"jse-hide-original-data",!Tt[16]),(!Le||131072&fn[0]&&Xe!==(Xe=!!Tt[17]))&&(Oe.disabled=Xe)},i:function(Tt){Le||(K(n.$$.fragment,Tt),K(y.$$.fragment,Tt),K(ie),K(W.$$.fragment,Tt),K(Me),K(V),Le=!0)},o:function(Tt){ae(n.$$.fragment,Tt),ae(y.$$.fragment,Tt),ae(ie),ae(W.$$.fragment,Tt),ae(Me),ae(V),Le=!1},d:function(Tt){ht(n,Tt),Tt&&Fe(e),Tt&&Fe(i),ht(y),ie&&ie.d(),ht(W),Me&&Me.d(),je[q].d(),rt=!1,so(B)}}}function set(t){var n,e,i,r,o;return e=new Lse({props:{$$slots:{default:[oet]},$$scope:{ctx:t}}}),{c:function(){n=ve("div"),ft(e.$$.fragment),j(n,"class","jse-modal jse-transform svelte-107mggt")},m:function(s,a){Pe(s,n,a),dt(e,n,null),i=!0,r||(o=ya(Ok.call(null,n,t[20])),r=!0)},p:function(s,a){var l={};1048575&a[0]|256&a[1]&&(l.$$scope={dirty:a,ctx:s}),e.$set(l)},i:function(s){i||(K(e.$$.fragment,s),i=!0)},o:function(s){ae(e.$$.fragment,s),i=!1},d:function(s){s&&Fe(n),ht(e),r=!1,o()}}}function aet(t){t.focus()}function cet(t,n,e){var i,r,o=ba("jsoneditor:TransformModal"),s=n.id,a=void 0===s?"transform-modal-"+j_():s,l=n.json,c=n.rootPath,u=void 0===c?[]:c,d=n.indentation,h=n.escapeControlCharacters,f=n.escapeUnicodeCharacters,p=n.parser,m=n.parseMemoizeOne,g=n.validationParser,v=n.pathParser,y=n.queryLanguages,b=n.queryLanguageId,C=n.onChangeQueryLanguage,k=n.onRenderValue,D=n.onClassName,L=n.onTransform,z=_a("simple-modal").close,R="".concat(a,":").concat(an(u)),U=ed[R]||{},G=!1!==ed.showWizard,X=!1!==ed.showOriginal,te=U.queryOptions||{},P=b===U.queryLanguageId&&U.query?U.query:le(b).createQuery(l,U.queryOptions||{}),W=U.isManual||!1,J=void 0,H={text:""};function le(I){return y.find(function(N){return N.id===I})||y[0]}var E=p0(function(I,N){try{o("previewTransform",{query:N});var q=le(b).executeQuery(I,N,p);e(18,H={json:q}),e(17,J=void 0)}catch(V){e(18,H={text:""}),e(17,J=V.toString())}},300);return t.$$set=function(I){"id"in I&&e(28,a=I.id),"json"in I&&e(29,l=I.json),"rootPath"in I&&e(1,u=I.rootPath),"indentation"in I&&e(2,d=I.indentation),"escapeControlCharacters"in I&&e(3,h=I.escapeControlCharacters),"escapeUnicodeCharacters"in I&&e(4,f=I.escapeUnicodeCharacters),"parser"in I&&e(5,p=I.parser),"parseMemoizeOne"in I&&e(6,m=I.parseMemoizeOne),"validationParser"in I&&e(7,g=I.validationParser),"pathParser"in I&&e(8,v=I.pathParser),"queryLanguages"in I&&e(9,y=I.queryLanguages),"queryLanguageId"in I&&e(0,b=I.queryLanguageId),"onChangeQueryLanguage"in I&&e(30,C=I.onChangeQueryLanguage),"onRenderValue"in I&&e(10,k=I.onRenderValue),"onClassName"in I&&e(11,D=I.onClassName),"onTransform"in I&&e(31,L=I.onTransform)},t.$$.update=function(){536870914&t.$$.dirty[0]&&e(14,i=Sn(l,u)),16384&t.$$.dirty[0]&&e(19,r={json:i}),24576&t.$$.dirty[0]&&E(i,P),12289&t.$$.dirty[0]|6&t.$$.dirty[1]&&(e(32,ed[R]={queryOptions:te,query:P,queryLanguageId:b,isManual:W},ed),o("store state in memory",R,ed[R]))},[b,u,d,h,f,p,m,g,v,y,k,D,te,P,i,G,X,J,H,r,z,le,function(I){e(12,te=I),e(13,P=le(b).createQuery(l,I)),e(33,W=!1),o("updateQueryByWizard",{queryOptions:te,query:P,isManual:W})},function(I){e(13,P=I.target.value),e(33,W=!0),o("handleChangeQuery",{query:P,isManual:W})},function(){try{o("handleTransform",{query:P});var I=le(b).executeQuery(i,P,p);L([{op:"replace",path:an(u),value:I}]),z()}catch(N){console.error(N),e(18,H={text:""}),e(17,J=N.toString())}},function(){e(15,G=!G),e(32,ed.showWizard=G,ed)},function(){e(16,X=!X),e(32,ed.showOriginal=X,ed)},function(I){o("handleChangeQueryLanguage",I),e(0,b=I),C(I);var N=le(b);e(13,P=N.createQuery(l,te)),e(33,W=!1)},a,l,C,L,ed,W]}var uet=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,cet,set,Ti,{id:28,json:29,rootPath:1,indentation:2,escapeControlCharacters:3,escapeUnicodeCharacters:4,parser:5,parseMemoizeOne:6,validationParser:7,pathParser:8,queryLanguages:9,queryLanguageId:0,onChangeQueryLanguage:30,onRenderValue:10,onClassName:11,onTransform:31},eet,[-1,-1]),r}return Se(e)}(),wp={};function det(t){di(t,"svelte-1y818v2",".jse-modal.svelte-1y818v2.svelte-1y818v2{--height:36px;--multi-item-height:28px;--multi-item-margin:2px;--multi-item-padding:2px 8px;--multi-item-border-radius:6px;--indicator-top:8px;flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;background:var(--jse-modal-background);color:var(--jse-text-color)}.jse-modal.svelte-1y818v2 .jse-modal-contents.svelte-1y818v2{padding:20px;overflow:auto;min-width:0;min-height:0}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions.svelte-1y818v2{display:flex;flex-direction:row;justify-content:flex-end;padding-top:var(--jse-padding)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:hover{background:var(--jse-button-primary-background-highlight)}.jse-modal.svelte-1y818v2 .jse-modal-contents .jse-actions button.jse-primary.svelte-1y818v2:disabled{background:var(--jse-button-primary-background-disabled)}.bg.jse-modal-bg{width:100%;height:100%;top:0;left:0;background:var(--jse-modal-overlay-background)}.bg.jse-modal-bg .jse-modal-window-wrap{margin:0}.bg.jse-modal-bg .jse-modal-window{max-width:90%;margin:4rem auto 2rem auto;border-radius:2px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-sort{width:400px}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-transform{width:1200px;height:1200px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-window.jse-modal-window-jsoneditor{width:800px;height:auto;min-height:500px;max-height:80%;display:flex}.bg.jse-modal-bg .jse-modal-content{flex:1;display:flex;max-height:calc(100vh - 6rem);padding:0}.jse-modal.jse-sort.svelte-1y818v2 table.svelte-1y818v2{width:100%;border-collapse:collapse;border-spacing:0}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2{text-align:left;vertical-align:middle;font-weight:normal;padding-bottom:var(--jse-padding)}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2{width:100%;box-sizing:border-box;padding:6px 16px;border:var(--jse-input-border);border-radius:var(--jse-input-radius);font-family:inherit;font-size:inherit;background:inherit;color:inherit;outline:none}.jse-modal.jse-sort.svelte-1y818v2 table th input.jse-path.svelte-1y818v2:read-only,.jse-modal.jse-sort.svelte-1y818v2 table td input.jse-path.svelte-1y818v2:read-only{background:var(--jse-input-background-readonly)}.jse-modal.jse-sort.svelte-1y818v2 table th.svelte-1y818v2 .svelte-select input,.jse-modal.jse-sort.svelte-1y818v2 table td.svelte-1y818v2 .svelte-select input{box-sizing:border-box}.jse-modal.jse-sort.svelte-1y818v2 .jse-space.svelte-1y818v2{height:200px}.jse-modal.jse-sort.svelte-1y818v2 .jse-space .jse-error.svelte-1y818v2{color:var(--jse-error-color)}")}function bue(t){var n,e,i,r,o,s,a;function l(u){t[14](u)}var c={showChevron:!0,items:t[3]};return void 0!==t[1]&&(c.value=t[1]),o=new ag({props:c}),Hi.push(function(){return zu(o,"value",l)}),{c:function(){n=ve("tr"),(e=ve("th")).textContent="Property",i=tt(),r=ve("td"),ft(o.$$.fragment),j(e,"class","svelte-1y818v2"),j(r,"class","svelte-1y818v2")},m:function(u,d){Pe(u,n,d),ue(n,e),ue(n,i),ue(n,r),dt(o,r,null),a=!0},p:function(u,d){var h={};8&d&&(h.items=u[3]),!s&&2&d&&(s=!0,h.value=u[1],Uu(function(){return s=!1})),o.$set(h)},i:function(u){a||(K(o.$$.fragment,u),a=!0)},o:function(u){ae(o.$$.fragment,u),a=!1},d:function(u){u&&Fe(n),ht(o)}}}function xue(t){var n,e;return{c:function(){n=ve("div"),e=tn(t[5]),j(n,"class","jse-error svelte-1y818v2")},m:function(i,r){Pe(i,n,r),ue(n,e)},p:function(i,r){32&r&&qn(e,i[5])},d:function(i){i&&Fe(n)}}}function het(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,X,te,P,W,J;e=new QP({props:{title:t[4]?"Sort array items":"Sort object keys"}});var H=t[4]&&(t[3].length>1||void 0===t[1])&&bue(t);function le(N){t[15](N)}var E={showChevron:!0,clearable:!1,items:t[7]};void 0!==t[2]&&(E.value=t[2]),k=new ag({props:E}),Hi.push(function(){return zu(k,"value",le)});var I=t[5]&&xue(t);return{c:function(){n=ve("div"),ft(e.$$.fragment),i=tt(),r=ve("div"),o=ve("table"),(s=ve("colgroup")).innerHTML=' \n ',a=tt(),l=ve("tbody"),c=ve("tr"),(u=ve("th")).textContent="Path",d=tt(),h=ve("td"),f=ve("input"),m=tt(),H&&H.c(),g=tt(),v=ve("tr"),(y=ve("th")).textContent="Direction",b=tt(),C=ve("td"),ft(k.$$.fragment),L=tt(),z=ve("div"),I&&I.c(),R=tt(),U=ve("div"),G=ve("button"),X=tn("Sort"),j(u,"class","svelte-1y818v2"),j(f,"class","jse-path svelte-1y818v2"),j(f,"type","text"),f.readOnly=!0,j(f,"title","Selected path"),f.value=p=Ui(t[0])?"(whole document)":iu(ql(t[0])),j(h,"class","svelte-1y818v2"),j(y,"class","svelte-1y818v2"),j(C,"class","svelte-1y818v2"),j(o,"class","svelte-1y818v2"),j(z,"class","jse-space svelte-1y818v2"),j(G,"type","button"),j(G,"class","jse-primary svelte-1y818v2"),G.disabled=te=!!t[4]&&!t[1],j(U,"class","jse-actions svelte-1y818v2"),j(r,"class","jse-modal-contents svelte-1y818v2"),j(n,"class","jse-modal jse-sort svelte-1y818v2")},m:function(N,q){Pe(N,n,q),dt(e,n,null),ue(n,i),ue(n,r),ue(r,o),ue(o,s),ue(o,a),ue(o,l),ue(l,c),ue(c,u),ue(c,d),ue(c,h),ue(h,f),ue(l,m),H&&H.m(l,null),ue(l,g),ue(l,v),ue(v,y),ue(v,b),ue(v,C),dt(k,C,null),ue(r,L),ue(r,z),I&&I.m(z,null),ue(r,R),ue(r,U),ue(U,G),ue(G,X),P=!0,W||(J=[It(G,"click",t[8]),ya(fet.call(null,G)),ya(Ok.call(null,n,t[6]))],W=!0)},p:function(N,q){var V=zn(q,1)[0],re={};16&V&&(re.title=N[4]?"Sort array items":"Sort object keys"),e.$set(re),(!P||1&V&&p!==(p=Ui(N[0])?"(whole document)":iu(ql(N[0])))&&f.value!==p)&&(f.value=p),N[4]&&(N[3].length>1||void 0===N[1])?H?(H.p(N,V),26&V&&K(H,1)):((H=bue(N)).c(),K(H,1),H.m(l,g)):H&&(Lt(),ae(H,1,1,function(){H=null}),$t());var he={};!D&&4&V&&(D=!0,he.value=N[2],Uu(function(){return D=!1})),k.$set(he),N[5]?I?I.p(N,V):((I=xue(N)).c(),I.m(z,null)):I&&(I.d(1),I=null),(!P||18&V&&te!==(te=!!N[4]&&!N[1]))&&(G.disabled=te)},i:function(N){P||(K(e.$$.fragment,N),K(H),K(k.$$.fragment,N),P=!0)},o:function(N){ae(e.$$.fragment,N),ae(H),ae(k.$$.fragment,N),P=!1},d:function(N){N&&Fe(n),ht(e),H&&H.d(),ht(k),I&&I.d(),W=!1,so(J)}}}function fet(t){t.focus()}function pet(t,n,e){var i,r,o,s=ba("jsoneditor:SortModal"),a=n.id,l=n.json,c=n.rootPath,u=n.onSort,d=_a("simple-modal").close,h="".concat(a,":").concat(an(c)),f=Sn(l,c),p={value:1,label:"ascending"},m=[p,{value:-1,label:"descending"}],g=wp[h]&&wp[h].selectedProperty||void 0,v=wp[h]&&wp[h].selectedDirection||p,y=void 0;return t.$$set=function(b){"id"in b&&e(9,a=b.id),"json"in b&&e(10,l=b.json),"rootPath"in b&&e(0,c=b.rootPath),"onSort"in b&&e(11,u=b.onSort)},t.$$.update=function(){16&t.$$.dirty&&e(13,r=i&&void 0!==f?hP(f):void 0),8192&t.$$.dirty&&e(3,o=r?r.map(sb):void 0),10&t.$$.dirty&&void 0===g&&o&&1===o.length&&e(1,g=o[0]),4102&t.$$.dirty&&(e(12,wp[h]={selectedProperty:g,selectedDirection:v},wp),s("store state in memory",h,wp[h]))},e(4,i=Array.isArray(f)),[c,g,v,o,i,y,d,m,function(){try{var b,C;e(5,y=void 0);var k=null===(b=g)||void 0===b?void 0:b.value,D=null===(C=v)||void 0===C?void 0:C.value,L=zce(l,c,k,D);u({operations:L,rootPath:c,itemPath:k,direction:D}),d()}catch(z){e(5,y=z.toString())}},a,l,u,wp,r,function(b){e(1,g=b),e(3,o),e(13,r),e(4,i)},function(b){e(2,v=b)}]}var met=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,pet,het,Ti,{id:9,json:10,rootPath:0,onSort:11},det),r}return Se(e)}();function fh(){}function Fk(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;if(t<.9*n)return t.toFixed()+" B";var e=t/n;if(e<.9*n)return e.toFixed(1)+" KB";var i=e/n;if(i<.9*n)return i.toFixed(1)+" MB";var r=i/n;return r<.9*n?r.toFixed(1)+" GB":(r/n).toFixed(1)+" TB"}function get(t){var n,e;return n=new Mk({props:{items:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&zn(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function vet(t,n,e){var i,r,o=n.readOnly,s=void 0!==o&&o,a=n.onFormat,l=n.onCompact,c=n.onSort,u=n.onTransform,d=n.onToggleSearch,h=n.onUndo,f=n.onRedo,p=n.canUndo,m=n.canRedo,g=n.canFormat,v=n.canCompact,y=n.canSort,b=n.canTransform,C=n.onRenderMenu;return t.$$set=function(k){"readOnly"in k&&e(1,s=k.readOnly),"onFormat"in k&&e(2,a=k.onFormat),"onCompact"in k&&e(3,l=k.onCompact),"onSort"in k&&e(4,c=k.onSort),"onTransform"in k&&e(5,u=k.onTransform),"onToggleSearch"in k&&e(6,d=k.onToggleSearch),"onUndo"in k&&e(7,h=k.onUndo),"onRedo"in k&&e(8,f=k.onRedo),"canUndo"in k&&e(9,p=k.canUndo),"canRedo"in k&&e(10,m=k.canRedo),"canFormat"in k&&e(11,g=k.canFormat),"canCompact"in k&&e(12,v=k.canCompact),"canSort"in k&&e(13,y=k.canSort),"canTransform"in k&&e(14,b=k.canTransform),"onRenderMenu"in k&&e(15,C=k.onRenderMenu)},t.$$.update=function(){32766&t.$$.dirty&&e(16,r=s?[{type:"space"}]:[{type:"button",icon:rj,title:"Format JSON: add proper indentation and new lines (Ctrl+I)",className:"jse-format",onClick:a,disabled:s||!g},{type:"button",icon:XQe,title:"Compact JSON: remove all white spacing and new lines (Ctrl+Shift+I)",className:"jse-compact",onClick:l,disabled:s||!v},{type:"separator"},{type:"button",icon:_k,title:"Sort",className:"jse-sort",onClick:c,disabled:s||!y},{type:"button",icon:gk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:u,disabled:s||!b},{type:"button",icon:BP,title:"Search (Ctrl+F)",className:"jse-search",onClick:d},{type:"separator"},{type:"button",icon:$P,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:h,disabled:!p},{type:"button",icon:LP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:f,disabled:!m},{type:"space"}]),98304&t.$$.dirty&&e(0,i=C(r)||r)},[i,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,r]}var yet=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,vet,get,Ti,{readOnly:1,onFormat:2,onCompact:3,onSort:4,onTransform:5,onToggleSearch:6,onUndo:7,onRedo:8,canUndo:9,canRedo:10,canFormat:11,canCompact:12,canSort:13,canTransform:14,onRenderMenu:15}),r}return Se(e)}(),ao=function(){function t(){Ce(this,t)}return Se(t,[{key:"lineAt",value:function(n){if(n<0||n>this.length)throw new RangeError("Invalid position ".concat(n," in document of length ").concat(this.length));return this.lineInner(n,!1,1,0)}},{key:"line",value:function(n){if(n<1||n>this.lines)throw new RangeError("Invalid line number ".concat(n," in ").concat(this.lines,"-line document"));return this.lineInner(n,!0,1,0)}},{key:"replace",value:function(n,e,i){var r=[];return this.decompose(0,n,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),Pk.from(r,this.length-(e-n)+i.length)}},{key:"append",value:function(n){return this.replace(this.length,this.length,n)}},{key:"slice",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,i=[];return this.decompose(n,e,i,0),Pk.from(i,e-n)}},{key:"eq",value:function(n){if(n==this)return!0;if(n.length!=this.length||n.lines!=this.lines)return!1;for(var e=this.scanIdentical(n,1),i=this.length-this.scanIdentical(n,-1),r=new Sb(this),o=new Sb(n),s=e,a=e;;){if(r.next(s),o.next(s),s=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(a+=r.value.length,r.done||a>=i)return!0}}},{key:"iter",value:function(){return new Sb(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:1)}},{key:"iterRange",value:function(n){return new Cue(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length)}},{key:"iterLines",value:function(n,e){var i;if(null==n)i=this.iter();else{null==e&&(e=this.lines+1);var r=this.line(n).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new Sue(i)}},{key:"toString",value:function(){return this.sliceString(0)}},{key:"toJSON",value:function(){var n=[];return this.flatten(n),n}}],[{key:"of",value:function(n){if(0==n.length)throw new RangeError("A document must have at least one line");return 1!=n.length||n[0]?n.length<=32?new id(n):Pk.from(id.split(n,[])):t.empty}}]),t}(),id=function(t){wt(e,ao);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function _et(t){var n,e=-1,i=Re(t);try{for(i.s();!(n=i.n()).done;)e+=n.value.length+1}catch(r){i.e(r)}finally{i.f()}return e}(i);return Ce(this,e),(r=n.call(this)).text=i,r.length=o,r}return Se(e,[{key:"lines",get:function(){return this.text.length}},{key:"children",get:function(){return null}},{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.text[a],c=s+l.length;if((r?o:c)>=i)return new bet(s,c,o,l);s=c+1,o++}}},{key:"decompose",value:function(i,r,o,s){var a=i<=0&&r>=this.length?this:new e(wue(this.text,i,r),Math.min(r,this.length)-Math.max(0,i));if(1&s){var l=o.pop(),c=jk(a.text,l.text.slice(),0,a.length);if(c.length<=32)o.push(new e(c,l.length+a.length));else{var u=c.length>>1;o.push(new e(c.slice(0,u)),new e(c.slice(u)))}}else o.push(a)}},{key:"replace",value:function(i,r,o){if(!(o instanceof e))return hr(Wi(e.prototype),"replace",this).call(this,i,r,o);var s=jk(this.text,jk(o.text,wue(this.text,0,i)),r),a=this.length+o.length-(r-i);return s.length<=32?new e(s,a):Pk.from(e.split(s,[]),a)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;a<=r&&li&&l&&(s+=o),ia&&(s+=c.slice(Math.max(0,i-a),r-a)),a=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.text);try{for(o.s();!(r=o.n()).done;)i.push(r.value)}catch(a){o.e(a)}finally{o.f()}}},{key:"scanIdentical",value:function(){return 0}}],[{key:"split",value:function(i,r){var o,s=[],a=-1,l=Re(i);try{for(l.s();!(o=l.n()).done;){var c=o.value;s.push(c),a+=c.length+1,32==s.length&&(r.push(new e(s,a)),s=[],a=-1)}}catch(u){l.e(u)}finally{l.f()}return a>-1&&r.push(new e(s,a)),r}}]),e}(),Pk=function(t){wt(e,ao);var n=Ct(e);function e(i,r){var o;Ce(this,e),(o=n.call(this)).children=i,o.length=r,o.lines=0;var s,a=Re(i);try{for(a.s();!(s=a.n()).done;)o.lines+=s.value.lines}catch(c){a.e(c)}finally{a.f()}return o}return Se(e,[{key:"lineInner",value:function(i,r,o,s){for(var a=0;;a++){var l=this.children[a],c=s+l.length,u=o+l.lines-1;if((r?u:c)>=i)return l.lineInner(i,r,o,s);s=c+1,o=u+1}}},{key:"decompose",value:function(i,r,o,s){for(var a=0,l=0;l<=r&&a=l){var d=s&((l<=i?1:0)|(u>=r?2:0));l>=i&&u<=r&&!d?o.push(c):c.decompose(i-l,r-l,o,d)}l=u+1}}},{key:"replace",value:function(i,r,o){if(o.lines=a&&r<=c){var u=l.replace(i-a,r-a,o),d=this.lines-l.lines+u.lines;if(u.lines>4&&u.lines>d>>6){var h=this.children.slice();return h[s]=u,new e(h,this.length-(r-i)+o.length)}return hr(Wi(e.prototype),"replace",this).call(this,a,c,u)}a=c+1}return hr(Wi(e.prototype),"replace",this).call(this,i,r,o)}},{key:"sliceString",value:function(i){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"\n",s="",a=0,l=0;ai&&a&&(s+=o),il&&(s+=c.sliceString(i-l,r-l,o)),l=u+1}return s}},{key:"flatten",value:function(i){var r,o=Re(this.children);try{for(o.s();!(r=o.n()).done;)r.value.flatten(i)}catch(s){o.e(s)}finally{o.f()}}},{key:"scanIdentical",value:function(i,r){if(!(i instanceof e))return 0;for(var o=0,s=zn(r>0?[0,0,this.children.length,i.children.length]:[this.children.length-1,i.children.length-1,-1,-1],4),a=s[0],l=s[1],c=s[2],u=s[3];;a+=r,l+=r){if(a==c||l==u)return o;var d=this.children[a],h=i.children[l];if(d!=h)return o+d.scanIdentical(h,r);o+=d.length+1}}}],[{key:"from",value:function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.reduce(function(R,U){return R+U.length+1},-1),s=0,a=Re(i);try{for(a.s();!(r=a.n()).done;)s+=r.value.lines}catch(R){a.e(R)}finally{a.f()}if(s<32){var c,u=[],d=Re(i);try{for(d.s();!(c=d.n()).done;)c.value.flatten(u)}catch(R){d.e(R)}finally{d.f()}return new id(u,o)}var f=Math.max(32,s>>5),p=f<<1,m=f>>1,g=[],v=0,y=-1,b=[];function C(R){var U;if(R.lines>p&&R instanceof e){var G,X=Re(R.children);try{for(X.s();!(G=X.n()).done;)C(G.value)}catch(te){X.e(te)}finally{X.f()}}else R.lines>m&&(v>m||!v)?(k(),g.push(R)):R instanceof id&&v&&(U=b[b.length-1])instanceof id&&R.lines+U.lines<=32?(v+=R.lines,y+=R.length+1,b[b.length-1]=new id(U.text.concat(R.text),U.length+1+R.length)):(v+R.lines>f&&k(),v+=R.lines,y+=R.length+1,b.push(R))}function k(){0!=v&&(g.push(1==b.length?b[0]:e.from(b,y)),y=-1,v=b.length=0)}var D,L=Re(i);try{for(L.s();!(D=L.n()).done;)C(D.value)}catch(R){L.e(R)}finally{L.f()}return k(),1==g.length?g[0]:new e(g,o)}}]),e}();function jk(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e9,r=0,o=0,s=!0;o=e&&(l>i&&(a=a.slice(0,i-r)),r1&&void 0!==arguments[1]?arguments[1]:1;Ce(this,t),this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[n],this.offsets=[e>0?1:(n instanceof id?n.text.length:n.children.length)<<1]}return Se(t,[{key:"nextInner",value:function(n,e){for(this.done=this.lineBreak=!1;;){var i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],s=o>>1;if(s==(e>0?r instanceof id?r.text.length:r.children.length:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==n)return this.lineBreak=!0,this.value="\n",this;n--}else if(r instanceof id){var l=r.text[s+(e<0?-1:0)];if(this.offsets[i]+=e,l.length>Math.max(0,n))return this.value=0==n?l:e>0?l.slice(n):l.slice(0,l.length-n),this;n-=l.length}else{var c=r.children[s+(e<0?-1:0)];n>c.length?(n-=c.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(e>0?1:(c instanceof id?c.text.length:c.children.length)<<1))}}}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0&&(this.nextInner(-n,-this.dir),n=this.value.length),this.nextInner(n,this.dir)}}]),t}(),Cue=function(){function t(n,e,i){Ce(this,t),this.value="",this.done=!1,this.cursor=new Sb(n,e>i?-1:1),this.pos=e>i?n.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}return Se(t,[{key:"nextInner",value:function(n,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;n+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);var i=e<0?this.pos-this.from:this.to-this.pos;n>i&&(n=i),i-=n;var r=this.cursor.next(n).value;return this.pos+=(r.length+n)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}},{key:"next",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return n<0?n=Math.max(n,this.from-this.pos):n>0&&(n=Math.min(n,this.to-this.pos)),this.nextInner(n,this.cursor.dir)}},{key:"lineBreak",get:function(){return this.cursor.lineBreak&&""!=this.value}}]),t}(),Sue=function(){function t(n){Ce(this,t),this.inner=n,this.afterBreak=!0,this.value="",this.done=!1}return Se(t,[{key:"next",value:function(){var e=this.inner.next(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0),r=e.lineBreak,o=e.value;return e.done?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}},{key:"lineBreak",get:function(){return!1}}]),t}();typeof Symbol<"u"&&(ao.prototype[Symbol.iterator]=function(){return this.iter()},Sb.prototype[Symbol.iterator]=Cue.prototype[Symbol.iterator]=Sue.prototype[Symbol.iterator]=function(){return this});for(var bet=function(){function t(n,e,i,r){Ce(this,t),this.from=n,this.to=e,this.number=i,this.text=r}return Se(t,[{key:"length",get:function(){return this.to-this.from}}]),t}(),U0="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(function(t){return t?parseInt(t,36):1}),Rk=1;Rkt)return U0[n-1]<=t;return!1}function kue(t){return t>=127462&&t<=127487}function Dl(t,n){return(arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?wet:Due)(t,n,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])}function Due(t,n,e){if(n==t.length)return n;n&&Tue(t.charCodeAt(n))&&Eue(t.charCodeAt(n-1))&&n--;var i=$a(t,n);for(n+=kc(i);n=0&&kue($a(t,s));)o++,s-=2;if(o%2==0)break;n+=2}}return n}function wet(t,n,e){for(;n>0;){var i=Due(t,n-2,e);if(i=56320&&t<57344}function Eue(t){return t>=55296&&t<56320}function $a(t,n){var e=t.charCodeAt(n);if(!Eue(e)||n+1==t.length)return e;var i=t.charCodeAt(n+1);return Tue(i)?i-56320+(e-55296<<10)+65536:e}function pj(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function kc(t){return t<65536?1:2}var mj=/\r\n?|\n/,Tl=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Tl||(Tl={})),z0=function(){function t(n){Ce(this,t),this.sections=n}return Se(t,[{key:"length",get:function(){for(var n=0,e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"invertedDesc",get:function(){for(var n=[],e=0;e1&&void 0!==arguments[1]&&arguments[1])}},{key:"mapPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Tl.Simple,r=0,o=0,s=0;sn)return o+(n-r);o+=a}else{if(i!=Tl.Simple&&c>=n&&(i==Tl.TrackDel&&rn||i==Tl.TrackBefore&&rn))return null;if(c>n||c==n&&e<0&&!a)return n==r||e<0?o:o+l;o+=l}r=c}if(n>r)throw new RangeError("Position ".concat(n," is out of range for changeset of length ").concat(r));return o}},{key:"touchesRange",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,i=0,r=0;i=0&&r<=e&&a>=n)return!(re)||"cover";r=a}return!1}},{key:"toString",value:function(){for(var n="",e=0;e=0?":"+r:"")}return n}},{key:"toJSON",value:function(){return this.sections}}],[{key:"fromJSON",value:function(n){if(!Array.isArray(n)||n.length%2||n.some(function(e){return"number"!=typeof e}))throw new RangeError("Invalid JSON representation of ChangeDesc");return new t(n)}},{key:"create",value:function(n){return new t(n)}}]),t}(),rd=function(t){wt(e,z0);var n=Ct(e);function e(i,r){var o;return Ce(this,e),(o=n.call(this,i)).inserted=r,o}return Se(e,[{key:"apply",value:function(i){if(this.length!=i.length)throw new RangeError("Applying change set to a document with the wrong length");return gj(this,function(r,o,s,a,l){return i=i.replace(s,s+(o-r),l)},!1),i}},{key:"mapDesc",value:function(i){return vj(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"invert",value:function(i){for(var r=this.sections.slice(),o=[],s=0,a=0;s=0){r[s]=c,r[s+1]=l;for(var u=s>>1;o.length1&&void 0!==arguments[1]&&arguments[1],!0)}},{key:"iterChanges",value:function(i){gj(this,i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}},{key:"desc",get:function(){return z0.create(this.sections)}},{key:"filter",value:function(i){var r=[],o=[],s=[],a=new kb(this);e:for(var l=0,c=0;;){for(var u=l==i.length?1e9:i[l++];c0&&Cp(o,r,a.text),a.forward(d),c+=d}for(var f=i[l++];c>1].toJSON()))}return i}}],[{key:"of",value:function(i,r,o){var s=[],a=[],l=0,c=null;function u(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||s.length){lv||m<0||v>r)throw new RangeError("Invalid change range ".concat(m," to ").concat(v," (in doc of length ").concat(r,")"));var b=y?"string"==typeof y?ao.of(y.split(o||mj)):y:ao.empty,C=b.length;if(m==v&&0==C)return;ml&&sl(s,m-l,-1),sl(s,v-m,C),Cp(a,s,b),l=v}}(i),u(!c),c}},{key:"empty",value:function(i){return new e(i?[i,-1]:[],[])}},{key:"fromJSON",value:function(i){if(!Array.isArray(i))throw new RangeError("Invalid JSON representation of ChangeSet");for(var r=[],o=[],s=0;s3&&void 0!==arguments[3]&&arguments[3];if(!(0==n&&e<=0)){var r=t.length-2;r>=0&&e<=0&&e==t[r+1]?t[r]+=n:0==n&&0==t[r]?t[r+1]+=e:i?(t[r]+=n,t[r+1]+=e):t.push(n,e)}}function Cp(t,n,e){if(0!=e.length){var i=n.length-2>>1;if(i>1])),!(e||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];n(r,c,o,u,d),r=c,o=u}}}function vj(t,n,e){for(var r=[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?[]:null,s=new kb(t),a=new kb(n),l=-1;;)if(-1==s.ins&&-1==a.ins){var c=Math.min(s.len,a.len);sl(r,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||0==s.off&&(a.len=0&&l=0)){if(s.done&&a.done)return o?rd.createSet(r,o):z0.create(r);throw new Error("Mismatched change set lengths")}for(var h=0,f=s.len;f;)if(-1==a.ins){var p=Math.min(f,a.len);h+=p,f-=p,a.forward(p)}else{if(!(0==a.ins&&a.len2&&void 0!==arguments[2]&&arguments[2]?[]:null,o=new kb(t),s=new kb(n),a=!1;;){if(o.done&&s.done)return r?rd.createSet(i,r):z0.create(i);if(0==o.ins)sl(i,o.len,0,a),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");var l=Math.min(o.len2,s.len),c=i.length;if(-1==o.ins){var u=-1==s.ins?-1:s.off?0:s.ins;sl(i,l,u,a),r&&u&&Cp(r,i,s.text)}else-1==s.ins?(sl(i,o.off?0:o.len,l,a),r&&Cp(r,i,o.textBit(l))):(sl(i,o.off?0:o.len,s.off?0:s.ins,a),r&&!s.off&&Cp(r,i,s.text));a=(o.ins>l||s.ins>=0&&s.len>l)&&(a||i.length>c),o.forward2(l),s.forward(l)}else sl(i,0,s.ins,a),r&&Cp(r,i,s.text),s.next()}}var kb=function(){function t(n){Ce(this,t),this.set=n,this.i=0,this.next()}return Se(t,[{key:"next",value:function(){var n=this.set.sections;this.i>1;return e>=n.length?ao.empty:n[e]}},{key:"textBit",value:function(n){var e=this.set.inserted,i=this.i-2>>1;return i>=e.length&&!n?ao.empty:e[i].slice(this.off,null==n?void 0:this.off+n)}},{key:"forward",value:function(n){n==this.len?this.next():(this.len-=n,this.off+=n)}},{key:"forward2",value:function(n){-1==this.ins?this.forward(n):n==this.ins?this.next():(this.ins-=n,this.off+=n)}}]),t}(),Lk=function(){function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.flags=i}return Se(t,[{key:"anchor",get:function(){return 16&this.flags?this.to:this.from}},{key:"head",get:function(){return 16&this.flags?this.from:this.to}},{key:"empty",get:function(){return this.from==this.to}},{key:"assoc",get:function(){return 4&this.flags?-1:8&this.flags?1:0}},{key:"bidiLevel",get:function(){var n=3&this.flags;return 3==n?null:n}},{key:"goalColumn",get:function(){var n=this.flags>>5;return 33554431==n?void 0:n}},{key:"map",value:function(n){var e,i;return this.empty?e=i=n.mapPos(this.from,arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1):(e=n.mapPos(this.from,1),i=n.mapPos(this.to,-1)),e==this.from&&i==this.to?this:new t(e,i,this.flags)}},{key:"extend",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;if(n<=this.anchor&&e>=this.anchor)return Qt.range(n,e);var i=Math.abs(n-this.anchor)>Math.abs(e-this.anchor)?n:e;return Qt.range(this.anchor,i)}},{key:"eq",value:function(n){return this.anchor==n.anchor&&this.head==n.head}},{key:"toJSON",value:function(){return{anchor:this.anchor,head:this.head}}}],[{key:"fromJSON",value:function(n){if(!n||"number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Qt.range(n.anchor,n.head)}},{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),Qt=function(){function t(n,e){Ce(this,t),this.ranges=n,this.mainIndex=e}return Se(t,[{key:"map",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return n.empty?this:t.create(this.ranges.map(function(i){return i.map(n,e)}),this.mainIndex)}},{key:"eq",value:function(n){if(this.ranges.length!=n.ranges.length||this.mainIndex!=n.mainIndex)return!1;for(var e=0;e1&&void 0!==arguments[1])||arguments[1];return t.create([n].concat(this.ranges),e?0:this.mainIndex+1)}},{key:"replaceRange",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.mainIndex,i=this.ranges.slice();return i[e]=n,t.create(i,this.mainIndex)}},{key:"toJSON",value:function(){return{ranges:this.ranges.map(function(n){return n.toJSON()}),main:this.mainIndex}}}],[{key:"fromJSON",value:function(n){if(!n||!Array.isArray(n.ranges)||"number"!=typeof n.main||n.main>=n.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new t(n.ranges.map(function(e){return Lk.fromJSON(e)}),n.main)}},{key:"single",value:function(n){return new t([t.range(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n)],0)}},{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0==n.length)throw new RangeError("A selection needs at least one range");for(var i=0,r=0;r1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return Lk.create(n,n,(0==e?0:e<0?4:8)|(null==i?3:Math.min(2,i))|(r??33554431)<<5)}},{key:"range",value:function(n,e,i,r){var o=(i??33554431)<<5|(null==r?3:Math.min(2,r));return en?4:0)|o)}},{key:"normalized",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=n[e];n.sort(function(c,u){return c.from-u.from}),e=n.indexOf(i);for(var r=1;ro.head?t.range(l,a):t.range(a,l))}}return new t(n,e)}}]),t}();function Mue(t,n){var e,i=Re(t.ranges);try{for(i.s();!(e=i.n()).done;)if(e.value.to>n)throw new RangeError("Selection points outside of document")}catch(r){i.e(r)}finally{i.f()}}var yj=0,Qn=function(){function t(n,e,i,r,o){Ce(this,t),this.combine=n,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=yj++,this.default=n([]),this.extensions="function"==typeof o?o(this):o}return Se(t,[{key:"of",value:function(n){return new $k([],this,0,n)}},{key:"compute",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $k(n,this,1,e)}},{key:"computeN",value:function(n,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $k(n,this,2,e)}},{key:"from",value:function(n,e){return e||(e=function(i){return i}),this.compute([n],function(i){return e(i.field(n))})}}],[{key:"define",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new t(n.combine||function(e){return e},n.compareInput||function(e,i){return e===i},n.compare||(n.combine?function(e,i){return e===i}:_j),!!n.static,n.enables)}}]),t}();function _j(t,n){return t==n||t.length==n.length&&t.every(function(e,i){return e===n[i]})}var $k=function(){function t(n,e,i,r){Ce(this,t),this.dependencies=n,this.facet=e,this.type=i,this.value=r,this.id=yj++}return Se(t,[{key:"dynamicSlot",value:function(n){var e,i,r=this,o=this.value,s=this.facet.compareInput,a=this.id,l=n[a]>>1,c=2==this.type,u=!1,d=!1,h=[],f=Re(this.dependencies);try{for(f.s();!(i=f.n()).done;){var p=i.value;"doc"==p?u=!0:"selection"==p?d=!0:!(1&(null!==(e=n[p.id])&&void 0!==e?e:1))&&h.push(n[p.id])}}catch(m){f.e(m)}finally{f.f()}return{create:function(m){return m.values[l]=o(m),1},update:function(m,g){if(u&&g.docChanged||d&&(g.docChanged||g.selection)||bj(m,h)){var v=o(m);if(c?!Oue(v,m.values[l],s):!s(v,m.values[l]))return m.values[l]=v,1}return 0},reconfigure:function(m,g){var v,y=g.config.address[a];if(null!=y){var b=Bk(g,y);if(r.dependencies.every(function(C){return C instanceof Qn?g.facet(C)===m.facet(C):!(C instanceof Ba)||g.field(C,!1)==m.field(C,!1)})||(c?Oue(v=o(m),b,s):s(v=o(m),b)))return m.values[l]=b,0}else v=o(m);return m.values[l]=v,1}}}}]),t}();function Oue(t,n,e){if(t.length!=n.length)return!1;for(var i=0;i>1;return{create:function(r){return r.values[i]=e.create(r),1},update:function(r,o){var s=r.values[i],a=e.updateF(s,o);return e.compareF(s,a)?0:(r.values[i]=a,1)},reconfigure:function(r,o){return null!=o.config.address[e.id]?(r.values[i]=o.field(e),0):(r.values[i]=e.create(r),1)}}}},{key:"init",value:function(n){return[this,Iue.of({field:this,create:n})]}},{key:"extension",get:function(){return this}}],[{key:"define",value:function(n){var e=new t(yj++,n.create,n.update,n.compare||function(i,r){return i===r},n);return n.provide&&(e.provides=n.provide(e)),e}}]),t}();function Db(t){return function(n){return new Nue(n,t)}}var G0={highest:Db(0),high:Db(1),default:Db(2),low:Db(3),lowest:Db(4)},Nue=Se(function t(n,e){Ce(this,t),this.inner=n,this.prec=e}),Sp=function(){function t(){Ce(this,t)}return Se(t,[{key:"of",value:function(n){return new wj(this,n)}},{key:"reconfigure",value:function(n){return t.reconfigure.of({compartment:this,extension:n})}},{key:"get",value:function(n){return n.config.compartments.get(this)}}]),t}(),wj=Se(function t(n,e){Ce(this,t),this.compartment=n,this.inner=e}),Fue=function(){function t(n,e,i,r,o,s){for(Ce(this,t),this.base=n,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=s,this.statusTemplate=[];this.statusTemplate.length>1]}}],[{key:"resolve",value:function(n,e,i){var r,C,k,D,L,z,o=[],s=Object.create(null),a=new Map,l=Re((C=n,k=e,D=a,L=[[],[],[],[],[]],z=new Map,function R(U,G){var X=z.get(U);if(null!=X){if(X<=G)return;var te=L[X].indexOf(U);te>-1&&L[X].splice(te,1),U instanceof wj&&D.delete(U.compartment)}if(z.set(U,G),Array.isArray(U)){var P,W=Re(U);try{for(W.s();!(P=W.n()).done;)R(P.value,G)}catch(le){W.e(le)}finally{W.f()}}else if(U instanceof wj){if(D.has(U.compartment))throw new RangeError("Duplicate use of compartment in extensions");var J=k.get(U.compartment)||U.inner;D.set(U.compartment,J),R(J,G)}else if(U instanceof Nue)R(U.inner,U.prec);else if(U instanceof Ba)L[G].push(U),U.provides&&R(U.provides,G);else if(U instanceof $k)L[G].push(U),U.facet.extensions&&R(U.facet.extensions,2);else{var H=U.extension;if(!H)throw new Error("Unrecognized extension value in extension set (".concat(U,"). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks."));R(H,G)}}(C,2),L.reduce(function(U,G){return U.concat(G)})));try{for(l.s();!(r=l.n()).done;){var c=r.value;c instanceof Ba?o.push(c):(s[c.facet.id]||(s[c.facet.id]=[])).push(c)}}catch(C){l.e(C)}finally{l.f()}for(var u=Object.create(null),d=[],h=[],f=function(){var C=m[p];u[C.id]=h.length<<1,h.push(function(k){return C.slot(k)})},p=0,m=o;p>1;function I(N){for(var q=[],V=0;V>1,i=t.status[e];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[e]=4;var r=t.computeSlot(t,t.config.dynamicSlots[e]);return t.status[e]=2|r}function Bk(t,n){return 1&n?t.config.staticValues[n>>1]:t.values[n>>1]}var Pue=Qn.define(),jue=Qn.define({combine:function(t){return t.some(function(n){return n})},static:!0}),Rue=Qn.define({combine:function(t){return t.length?t[0]:void 0},static:!0}),Lue=Qn.define(),$ue=Qn.define(),Bue=Qn.define(),Vue=Qn.define({combine:function(t){return!!t.length&&t[0]}}),kp=function(){function t(n,e){Ce(this,t),this.type=n,this.value=e}return Se(t,null,[{key:"define",value:function(){return new Tet}}]),t}(),Tet=function(){function t(){Ce(this,t)}return Se(t,[{key:"of",value:function(n){return new kp(this,n)}}]),t}(),Eet=function(){function t(n){Ce(this,t),this.map=n}return Se(t,[{key:"of",value:function(n){return new cr(this,n)}}]),t}(),cr=function(){function t(n,e){Ce(this,t),this.type=n,this.value=e}return Se(t,[{key:"map",value:function(n){var e=this.type.map(this.value,n);return void 0===e?void 0:e==this.value?this:new t(this.type,e)}},{key:"is",value:function(n){return this.type==n}}],[{key:"define",value:function(){return new Eet((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).map||function(e){return e})}},{key:"mapEffects",value:function(n,e){if(!n.length)return n;var i,r=[],o=Re(n);try{for(o.s();!(i=o.n()).done;){var s=i.value.map(e);s&&r.push(s)}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}();cr.reconfigure=cr.define(),cr.appendConfig=cr.define();var Yl=function(){function t(n,e,i,r,o,s){Ce(this,t),this.startState=n,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=s,this._doc=null,this._state=null,i&&Mue(i,e.newLength),o.some(function(a){return a.type==t.time})||(this.annotations=o.concat(t.time.of(Date.now())))}return Se(t,[{key:"newDoc",get:function(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}},{key:"newSelection",get:function(){return this.selection||this.startState.selection.map(this.changes)}},{key:"state",get:function(){return this._state||this.startState.applyTransaction(this),this._state}},{key:"annotation",value:function(n){var e,i=Re(this.annotations);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.type==n)return r.value}}catch(o){i.e(o)}finally{i.f()}}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"reconfigured",get:function(){return this.startState.config!=this.state.config}},{key:"isUserEvent",value:function(n){var e=this.annotation(t.userEvent);return!(!e||!(e==n||e.length>n.length&&e.slice(0,n.length)==n&&"."==e[n.length]))}}],[{key:"create",value:function(n,e,i,r,o,s){return new t(n,e,i,r,o,s)}}]),t}();function Aet(t,n){for(var e=[],i=0,r=0;;){var o=void 0,s=void 0;if(i=t[i]))o=t[i++],s=t[i++];else{if(!(r=0;d--){var h=c[d](a);h&&Object.keys(h).length&&(u=Hue(u,Cj(l,h,a.changes.newLength),!0))}return u==a?a:Yl.create(l,a.changes,a.selection,u.effects,u.annotations,u.scrollIntoView)}(e?function(a){var l,c=a.startState,u=!0,d=Re(c.facet(Lue));try{for(d.s();!(l=d.n()).done;){var h=(0,l.value)(a);if(!1===h){u=!1;break}Array.isArray(h)&&(u=!0===u?h:Aet(u,h))}}catch(b){d.e(b)}finally{d.f()}if(!0!==u){var f,p;if(!1===u)p=a.changes.invertedDesc,f=rd.empty(c.doc.length);else{var m=a.changes.filter(u);f=m.changes,p=m.filtered.mapDesc(m.changes).invertedDesc}a=Yl.create(c,f,a.selection&&a.selection.map(p),cr.mapEffects(a.effects,p),a.annotations,a.scrollIntoView)}for(var g=c.facet($ue),v=g.length-1;v>=0;v--){var y=g[v](a);a=y instanceof Yl?y:Array.isArray(y)&&1==y.length&&y[0]instanceof Yl?y[0]:Uue(c,W0(y),!1)}return a}(s):s)}Yl.time=kp.define(),Yl.userEvent=kp.define(),Yl.addToHistory=kp.define(),Yl.remote=kp.define();var Met=[];function W0(t){return null==t?Met:Array.isArray(t)?t:[t]}var Sj,is=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(is||(is={})),Oet=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{Sj=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}var Ao=function(){function t(n,e,i,r,o,s){Ce(this,t),this.config=n,this.doc=e,this.selection=i,this.values=r,this.status=n.statusTemplate.slice(),this.computeSlot=o,s&&(s._state=this);for(var a=0;a1&&void 0!==arguments[1])||arguments[1],i=this.config.address[n.id];if(null!=i)return Tb(this,i),Bk(this,i);if(e)throw new RangeError("Field is not present in this state")}},{key:"update",value:function(){for(var n=arguments.length,e=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:[];return n instanceof rd?n:rd.of(n,this.doc.length,this.facet(t.lineSeparator))}},{key:"toText",value:function(n){return ao.of(n.split(this.facet(t.lineSeparator)||mj))}},{key:"sliceDoc",value:function(){return this.doc.sliceString(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.doc.length,this.lineBreak)}},{key:"facet",value:function(n){var e=this.config.address[n.id];return null==e?n.default:(Tb(this,e),Bk(this,e))}},{key:"toJSON",value:function(n){var e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(n)for(var i in n){var r=n[i];r instanceof Ba&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(n[i]),this))}return e}},{key:"tabSize",get:function(){return this.facet(t.tabSize)}},{key:"lineBreak",get:function(){return this.facet(t.lineSeparator)||"\n"}},{key:"readOnly",get:function(){return this.facet(Vue)}},{key:"phrase",value:function(n){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;ri.length?l:i[u-1]})),n}},{key:"languageDataAt",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=[],s=Re(this.facet(Pue));try{for(s.s();!(i=s.n()).done;){var a,c=Re((0,i.value)(this,e,r));try{for(c.s();!(a=c.n()).done;){var u=a.value;Object.prototype.hasOwnProperty.call(u,n)&&o.push(u[n])}}catch(d){c.e(d)}finally{c.f()}}}catch(d){s.e(d)}finally{s.f()}return o}},{key:"charCategorizer",value:function(n){return function Iet(t){return function(n){if(!/\S/.test(n))return is.Space;if(function(i){if(Sj)return Sj.test(i);for(var r=0;r"\x80"&&(o.toUpperCase()!=o.toLowerCase()||Oet.test(o)))return!0}return!1}(n))return is.Word;for(var e=0;e-1)return is.Word;return is.Other}}(this.languageDataAt("wordChars",n).join(""))}},{key:"wordAt",value:function(n){for(var e=this.doc.lineAt(n),i=e.text,r=e.from,o=e.length,s=this.charCategorizer(n),a=n-r,l=n-r;a>0;){var c=Dl(i,a,!1);if(s(i.slice(c,a))!=is.Word)break;a=c}for(;l1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(!n||"string"!=typeof n.doc)throw new RangeError("Invalid JSON representation for EditorState");var r=[];if(i)for(var o in i)Object.prototype.hasOwnProperty.call(n,o)&&function(){var s=i[o],a=n[o];r.push(s.init(function(l){return s.spec.fromJSON(a,l)}))}();return t.create({doc:n.doc,selection:Qt.fromJSON(n.selection),extensions:e.extensions?r.concat([e.extensions]):r})}},{key:"create",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Fue.resolve(n.extensions||[],new Map),i=n.doc instanceof ao?n.doc:ao.of((n.doc||"").split(e.staticFacet(t.lineSeparator)||mj)),r=n.selection?n.selection instanceof Qt?n.selection:Qt.single(n.selection.anchor,n.selection.head):Qt.single(0);return Mue(r,i.length),e.staticFacet(jue)||(r=r.asSingle()),new t(e,i,r,e.dynamicSlots.map(function(){return null}),function(o,s){return s.create(o)},null)}}]),t}();function lu(t,n){var e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},o=Re(t);try{for(o.s();!(e=o.n()).done;)for(var s=e.value,a=0,l=Object.keys(s);a1&&void 0!==arguments[1]?arguments[1]:n,this)}}]),t}();cg.prototype.startSide=cg.prototype.endSide=0,cg.prototype.point=!1,cg.prototype.mapMode=Tl.TrackDel;var kj=function(){function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.value=i}return Se(t,null,[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}();function Dj(t,n){return t.from-n.from||t.value.startSide-n.value.startSide}var Net=function(){function t(n,e,i,r){Ce(this,t),this.from=n,this.to=e,this.value=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){return this.to[this.to.length-1]}},{key:"findIndex",value:function(n,e,i){for(var o=i?this.to:this.from,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=o.length;;){if(s==a)return s;var l=s+a>>1,c=o[l]-n||(i?this.value[l].endSide:this.value[l].startSide)-e;if(l==s)return c>=0?s:a;c>=0?a=l:s=l+1}}},{key:"between",value:function(n,e,i,r){for(var o=this.findIndex(e,-1e9,!0),s=this.findIndex(i,1e9,!1,o);o(f=e.mapPos(d,c.endSide))||h==f&&c.startSide>0&&c.endSide<=0)continue;(f-h||c.endSide-c.startSide)<0||(s<0&&(s=h),c.point&&(a=Math.max(a,f-h)),i.push(c),r.push(h-s),o.push(f-s))}return{mapped:i.length?new t(r,o,i,a):null,pos:s}}}]),t}(),Ho=function(){function t(n,e,i,r){Ce(this,t),this.chunkPos=n,this.chunk=e,this.nextLayer=i,this.maxPoint=r}return Se(t,[{key:"length",get:function(){var n=this.chunk.length-1;return n<0?0:Math.max(this.chunkEnd(n),this.nextLayer.length)}},{key:"size",get:function(){if(this.isEmpty)return 0;var n,e=this.nextLayer.size,i=Re(this.chunk);try{for(i.s();!(n=i.n()).done;)e+=n.value.value.length}catch(r){i.e(r)}finally{i.f()}return e}},{key:"chunkEnd",value:function(n){return this.chunkPos[n]+this.chunk[n].length}},{key:"update",value:function(n){var e=n.add,i=void 0===e?[]:e,r=n.sort,s=n.filterFrom,a=void 0===s?0:s,l=n.filterTo,c=void 0===l?this.length:l,u=n.filter;if(0==i.length&&!u)return this;if(void 0!==r&&r&&(i=i.slice().sort(Dj)),this.isEmpty)return i.length?t.of(i):this;for(var d=new Gue(this,null,-1).goto(0),h=0,f=[],p=new ug;d.value||h=0){var m=i[h++];p.addInner(m.from,m.to,m.value)||f.push(m)}else 1==d.rangeIndex&&d.chunkIndexthis.chunkEnd(d.chunkIndex)||cd.to||c=o&&n<=o+s.length&&!1===s.between(o,n-o,e-o,i))return}this.nextLayer.between(n,e,i)}}},{key:"iter",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Tj.from([this]).goto(n)}},{key:"isEmpty",get:function(){return this.nextLayer==this}}],[{key:"create",value:function(n,e,i,r){return new t(n,e,i,r)}},{key:"iter",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Tj.from(n).goto(e)}},{key:"compare",value:function(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,s=n.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),a=e.filter(function(d){return d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o}),l=zue(s,a,i),c=new Eb(s,l,o),u=new Eb(a,l,o);i.iterGaps(function(d,h,f){return Wue(c,d,u,h,f,r)}),i.empty&&0==i.length&&Wue(c,0,u,0,0,r)}},{key:"eq",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0;null==r&&(r=999999999);var o=n.filter(function(u){return!u.isEmpty&&e.indexOf(u)<0}),s=e.filter(function(u){return!u.isEmpty&&n.indexOf(u)<0});if(o.length!=s.length)return!1;if(!o.length)return!0;for(var a=zue(o,s),l=new Eb(o,a,0).goto(i),c=new Eb(s,a,0).goto(i);;){if(l.to!=c.to||!Aj(l.active,c.active)||l.point&&(!c.point||!l.point.eq(c.point)))return!1;if(l.to>r)return!0;l.next(),c.next()}}},{key:"spans",value:function(n,e,i,r){for(var s=new Eb(n,null,arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1).goto(e),a=e,l=s.openStart;;){var c=Math.min(s.to,i);if(s.point){var u=s.activeForPoint(s.to),d=s.pointFroma&&(r.span(a,c,s.active,l),l=s.openEnd(c));if(s.to>i)return l+(s.point&&s.to>i?1:0);a=s.to,s.next()}}},{key:"of",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new ug,o=Re(n instanceof kj?[n]:i?function Fet(t){if(t.length>1)for(var n=t[0],e=1;e0)return t.slice().sort(Dj);n=i}return t}(n):n);try{for(o.s();!(e=o.n()).done;){var s=e.value;r.add(s.from,s.to,s.value)}}catch(a){o.e(a)}finally{o.f()}return r.finish()}}]),t}();Ho.empty=new Ho([],[],null,-1),Ho.empty.nextLayer=Ho.empty;var ug=function(){function t(){Ce(this,t),this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}return Se(t,[{key:"finishChunk",value:function(n){this.chunks.push(new Net(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,n&&(this.from=[],this.to=[],this.value=[])}},{key:"add",value:function(n,e,i){this.addInner(n,e,i)||(this.nextLayer||(this.nextLayer=new t)).add(n,e,i)}},{key:"addInner",value:function(n,e,i){var r=n-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(n-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=n),this.from.push(n-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=n,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-n)),0))}},{key:"addChunk",value:function(n,e){if((n-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(n);var i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+n,this.lastTo=e.to[i]+n,!0}},{key:"finish",value:function(){return this.finishInner(Ho.empty)}},{key:"finishInner",value:function(n){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return n;var e=Ho.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(n):n,this.setMaxPoint);return this.from=null,e}}]),t}();function zue(t,n,e){var i,r=new Map,o=Re(t);try{for(o.s();!(i=o.n()).done;)for(var s=i.value,a=0;a3&&void 0!==arguments[3]?arguments[3]:0;Ce(this,t),this.layer=n,this.skip=e,this.minPoint=i,this.rank=r}return Se(t,[{key:"startSide",get:function(){return this.value?this.value.startSide:0}},{key:"endSide",get:function(){return this.value?this.value.endSide:0}},{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.chunkIndex=this.rangeIndex=0,this.gotoInner(n,e,!1),this}},{key:"gotoInner",value:function(n,e,i){for(;this.chunkIndex=this.minPoint)break}}},{key:"setRangeIndex",value:function(n){if(n==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex1&&void 0!==arguments[1]?arguments[1]:-1e9,r=Re(this.heap);try{for(r.s();!(e=r.n()).done;)e.value.goto(n,i)}catch(a){r.e(a)}finally{r.f()}for(var s=this.heap.length>>1;s>=0;s--)Ej(this.heap,s);return this.next(),this}},{key:"forward",value:function(n,e){var i,r=Re(this.heap);try{for(r.s();!(i=r.n()).done;)i.value.forward(n,e)}catch(s){r.e(s)}finally{r.f()}for(var o=this.heap.length>>1;o>=0;o--)Ej(this.heap,o);(this.to-n||this.value.endSide-e)<0&&this.next()}},{key:"next",value:function(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{var n=this.heap[0];this.from=n.from,this.to=n.to,this.value=n.value,this.rank=n.rank,n.value&&n.next(),Ej(this.heap,0)}}}],[{key:"from",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=[],o=0;o=i&&r.push(new Gue(s,e,i,o));return 1==r.length?r[0]:new t(r)}}]),t}();function Ej(t,n){for(var e=t[n];;){var i=1+(n<<1);if(i>=t.length)break;var r=t[i];if(i+1=0&&(r=t[i+1],i++),e.compare(r)<0)break;t[i]=e,t[n]=r,n=i}}var Eb=function(){function t(n,e,i){Ce(this,t),this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Tj.from(n,e,i)}return Se(t,[{key:"goto",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1e9;return this.cursor.goto(n,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=n,this.endSide=e,this.openStart=-1,this.next(),this}},{key:"forward",value:function(n,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-n||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(n,e)}},{key:"removeActive",value:function(n){Vk(this.active,n),Vk(this.activeTo,n),Vk(this.activeRank,n),this.minActive=que(this.active,this.activeTo)}},{key:"addActive",value:function(n){for(var e=0,i=this.cursor,r=i.value,o=i.to,s=i.rank;e-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>n){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Vk(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>n){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}var o=this.cursor.value;if(o.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[s]=0&&!(this.activeRank[i]n||this.activeTo[i]==n&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}},{key:"openEnd",value:function(n){for(var e=0,i=this.activeTo.length-1;i>=0&&this.activeTo[i]>n;i--)e++;return e}}]),t}();function Wue(t,n,e,i,r,o){t.goto(n),e.goto(i);for(var s=i+r,a=i,l=i-n;;){var c=t.to+l-e.to||t.endSide-e.endSide,u=c<0?t.to+l:e.to,d=Math.min(u,s);if(t.point||e.point?t.point&&e.point&&(t.point==e.point||t.point.eq(e.point))&&Aj(t.activeForPoint(t.to+l),e.activeForPoint(e.to))||o.comparePoint(a,d,t.point,e.point):d>a&&!Aj(t.active,e.active)&&o.compareRange(a,d,t.active,e.active),u>s)break;a=u,c<=0&&t.next(),c>=0&&e.next()}}function Aj(t,n){if(t.length!=n.length)return!1;for(var e=0;e=n;i--)t[i+1]=t[i];t[n]=e}function que(t,n){for(var e=-1,i=1e9,r=0;r2&&void 0!==arguments[2]?arguments[2]:t.length,i=0,r=0;r=n)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?e-o%e:1,r=Dl(t,r)}return!0===i?-1:t.length}for(var Yue=typeof Symbol>"u"?"__\u037c":Symbol.for("\u037c"),Oj=typeof Symbol>"u"?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Xue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{},Dp=function(){function t(n,e){Ce(this,t),this.rules=[];var i=(e||{}).finish;function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,l,c,u){var d=[],h=/^@(\w+)\b/.exec(a[0]),f=h&&"keyframes"==h[1];if(h&&null==l)return c.push(a[0]+";");for(var p in l){var m=l[p];if(/&/.test(p))o(p.split(/,\s*/).map(function(g){return a.map(function(v){return g.replace(/&/,v)})}).reduce(function(g,v){return g.concat(v)}),m,c);else if(m&&"object"==gn(m)){if(!h)throw new RangeError("The value of a property ("+p+") should be a primitive value.");o(r(p),m,d,f)}else null!=m&&d.push(p.replace(/_.*/,"").replace(/[A-Z]/g,function(g){return"-"+g.toLowerCase()})+": "+m+";")}(d.length||f)&&c.push((!i||h||u?a:a.map(i)).join(", ")+" {"+d.join(" ")+"}")}for(var s in n)o(r(s),n[s],this.rules)}return Se(t,[{key:"getRules",value:function(){return this.rules.join("\n")}}],[{key:"newName",value:function(){var n=Xue[Yue]||1;return Xue[Yue]=n+1,"\u037c"+n.toString(36)}},{key:"mount",value:function(n,e){(n[Oj]||new Pet(n)).mount(Array.isArray(e)?e:[e])}}]),t}(),Uk=null,Pet=function(){function t(n){if(Ce(this,t),!n.head&&n.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Uk)return n.adoptedStyleSheets=[Uk.sheet].concat(n.adoptedStyleSheets),n[Oj]=Uk;this.sheet=new CSSStyleSheet,n.adoptedStyleSheets=[this.sheet].concat(n.adoptedStyleSheets),Uk=this}else{this.styleTag=(n.ownerDocument||n).createElement("style");var e=n.head||n;e.insertBefore(this.styleTag,e.firstChild)}this.modules=[],n[Oj]=this}return Se(t,[{key:"mount",value:function(n){for(var e=this.sheet,i=0,r=0,o=0;o-1&&(this.modules.splice(a,1),r--,a=-1),-1==a){if(this.modules.splice(r++,0,s),e)for(var l=0;l",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Jue=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),jet=typeof navigator<"u"&&/Mac/.test(navigator.platform),Ret=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Let=jet||Jue&&+Jue[1]<57,Va=0;Va<10;Va++)Tp[48+Va]=Tp[96+Va]=String(Va);for(Va=1;Va<=24;Va++)Tp[Va+111]="F"+Va;for(Va=65;Va<=90;Va++)Tp[Va]=String.fromCharCode(Va+32),Mb[Va]=String.fromCharCode(Va);for(var Ij in Tp)Mb.hasOwnProperty(Ij)||(Mb[Ij]=Tp[Ij]);function zk(t){return(11==t.nodeType?t.getSelection?t:t.ownerDocument:t).getSelection()}function q0(t,n){return!!n&&(t==n||t.contains(1!=n.nodeType?n.parentNode:n))}function Gk(t,n){if(!n.anchorNode)return!1;try{return q0(t,n.anchorNode)}catch{return!1}}function Ob(t){return 3==t.nodeType?X0(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Wk(t,n,e,i){return!!e&&(Kue(t,n,e,i,-1)||Kue(t,n,e,i,1))}function qk(t){for(var n=0;;n++)if(!(t=t.previousSibling))return n}function Kue(t,n,e,i,r){for(;;){if(t==e&&n==i)return!0;if(n==(r<0?0:Ib(t))){if("DIV"==t.nodeName)return!1;var o=t.parentNode;if(!o||1!=o.nodeType)return!1;n=qk(t)+(r<0?0:1),t=o}else{if(1!=t.nodeType||1==(t=t.childNodes[n+(r<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;n=r<0?Ib(t):0}}}function Ib(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}var Que={left:0,right:0,top:0,bottom:0};function Nj(t,n){var e=n?t.left:t.right;return{left:e,right:e,top:t.top,bottom:t.bottom}}function $et(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}var Zue,Bet=function(){function t(){Ce(this,t),this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}return Se(t,[{key:"eq",value:function(n){return this.anchorNode==n.anchorNode&&this.anchorOffset==n.anchorOffset&&this.focusNode==n.focusNode&&this.focusOffset==n.focusOffset}},{key:"setRange",value:function(n){this.set(n.anchorNode,n.anchorOffset,n.focusNode,n.focusOffset)}},{key:"set",value:function(n,e,i,r){this.anchorNode=n,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}]),t}(),Y0=null;function ede(t){if(t.setActive)return t.setActive();if(Y0)return t.focus(Y0);for(var n=[],e=t;e&&(n.push(e,e.scrollTop,e.scrollLeft),e!=e.ownerDocument);e=e.parentNode);if(t.focus(null==Y0?{get preventScroll(){return Y0={preventScroll:!0},!0}}:void 0),!Y0){Y0=!1;for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:n,i=Zue||(Zue=document.createRange());return i.setEnd(t,e),i.setStart(t,n),i}function J0(t,n,e){var i={key:n,code:n,keyCode:e,which:e,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,t.dispatchEvent(r);var o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),r.defaultPrevented||o.defaultPrevented}function tde(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}var Dc=function(){function t(n,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Ce(this,t),this.node=n,this.offset=e,this.precise=i}return Se(t,null,[{key:"before",value:function(n,e){return new t(n.parentNode,qk(n),e)}},{key:"after",value:function(n,e){return new t(n.parentNode,qk(n)+1,e)}}]),t}(),Fj=[],ys=function(){function t(){Ce(this,t),this.parent=null,this.dom=null,this.dirty=2}return Se(t,[{key:"overrideDOMText",get:function(){return null}},{key:"posAtStart",get:function(){return this.parent?this.parent.posBefore(this):0}},{key:"posAtEnd",get:function(){return this.posAtStart+this.length}},{key:"posBefore",value:function(n){var e,i=this.posAtStart,r=Re(this.children);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o==n)return i;i+=o.length+o.breakAfter}}catch(s){r.e(s)}finally{r.f()}throw new RangeError("Invalid child in posBefore")}},{key:"posAfter",value:function(n){return this.posBefore(n)+n.length}},{key:"coordsAt",value:function(n,e){return null}},{key:"sync",value:function(n,e){if(2&this.dirty){var i,r,o=this.dom,s=null,a=Re(this.children);try{for(a.s();!(r=a.n()).done;){var l=r.value;if(l.dirty){if(!l.dom&&(i=s?s.nextSibling:o.firstChild)){var c=t.get(i);(!c||!c.parent&&c.canReuseDOM(l))&&l.reuseDOM(i)}l.sync(n,e),l.dirty=0}if(i=s?s.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&i!=l.dom&&(e.written=!0),l.dom.parentNode==o)for(;i&&i!=l.dom;)i=nde(i);else o.insertBefore(l.dom,i);s=l.dom}}catch(f){a.e(f)}finally{a.f()}for((i=s?s.nextSibling:o.firstChild)&&e&&e.node==o&&(e.written=!0);i;)i=nde(i)}else if(1&this.dirty){var u,d=Re(this.children);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.dirty&&(h.sync(n,e),h.dirty=0)}}catch(f){d.e(f)}finally{d.f()}}}},{key:"reuseDOM",value:function(n){}},{key:"localPosFromDOM",value:function(n,e){var i;if(n==this.dom)i=this.dom.childNodes[e];else{for(var r=0==Ib(n)?0:0==e?-1:1;;){var o=n.parentNode;if(o==this.dom)break;0==r&&o.firstChild!=o.lastChild&&(r=n==o.firstChild?-1:1),n=o}i=r<0?n:n.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!t.get(i);)i=i.nextSibling;if(!i)return this.length;for(var s=0,a=0;;s++){var l=this.children[s];if(l.dom==i)return a;a+=l.length+l.breakAfter}}},{key:"domBoundsAround",value:function(n,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=-1,o=-1,s=-1,a=-1,l=0,c=i,u=i;le)return d.domBoundsAround(n,e,c);if(h>=n&&-1==r&&(r=l,o=c),c>e&&d.dom.parentNode==this.dom){s=l,a=u;break}u=h,c=h+d.breakAfter}return{from:o,to:a<0?i+this.length:a,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s=0?this.children[s].dom:null}}},{key:"markDirty",value:function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.dirty|=2,this.markParentsDirty(n)}},{key:"markParentsDirty",value:function(n){for(var e=this.parent;e;e=e.parent){if(n&&(e.dirty|=2),1&e.dirty)return;e.dirty|=1,n=!1}}},{key:"setParent",value:function(n){this.parent!=n&&(this.parent=n,this.dirty&&this.markParentsDirty(!0))}},{key:"setDOM",value:function(n){this.dom&&(this.dom.cmView=null),this.dom=n,n.cmView=this}},{key:"rootView",get:function(){for(var n=this;;){var e=n.parent;if(!e)return n;n=e}}},{key:"replaceChildren",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Fj;this.markDirty();for(var o=n;o0&&void 0!==arguments[0]?arguments[0]:this.length,this.children.length)}},{key:"childPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.childCursor().findPos(n,e)}},{key:"toString",value:function(){var n=this.constructor.name.replace("View","");return n+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==n?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}},{key:"isEditable",get:function(){return!0}},{key:"isWidget",get:function(){return!1}},{key:"merge",value:function(n,e,i,r,o,s){return!1}},{key:"become",value:function(n){return!1}},{key:"canReuseDOM",value:function(n){return n.constructor==this.constructor}},{key:"getSide",value:function(){return 0}},{key:"destroy",value:function(){this.parent=null}}],[{key:"get",value:function(n){return n.cmView}}]),t}();function nde(t){var n=t.nextSibling;return t.parentNode.removeChild(t),n}ys.prototype.breakAfter=0;var ide=function(){function t(n,e,i){Ce(this,t),this.children=n,this.pos=e,this.i=i,this.off=0}return Se(t,[{key:"findPos",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;;){if(n>this.pos||n==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=n-this.pos,this;var i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}]),t}();function rde(t,n,e,i,r,o,s,a,l){var c=t.children,u=c.length?c[n]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(n==i&&u&&!s&&!h&&o.length<2&&u.merge(e,r,o.length?d:null,0==e,a,l))){if(i0&&(!s&&o.length&&u.merge(e,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(e2),Zn={mac:ude||/Mac/.test(Tc.platform),windows:/Win/.test(Tc.platform),linux:/Linux|X11/.test(Tc.platform),ie:Yk,ie_version:sde?Pj.documentMode||6:Rj?+Rj[1]:jj?+jj[1]:0,gecko:ade,gecko_version:ade?+(/Firefox\/(\d+)/.exec(Tc.userAgent)||[0,0])[1]:0,chrome:!!Lj,chrome_version:Lj?+Lj[1]:0,ios:ude,android:/Android\b/.test(Tc.userAgent),webkit:lde,safari:cde,webkit_version:lde?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=Pj.documentElement.style.tabSize?"tab-size":"-moz-tab-size"},Nb=function(t){wt(e,ys);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).text=i,r}return Se(e,[{key:"length",get:function(){return this.text.length}},{key:"createDOM",value:function(i){this.setDOM(i||document.createTextNode(this.text))}},{key:"sync",value:function(i,r){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(r&&r.node==this.dom&&(r.written=!0),this.dom.nodeValue=this.text)}},{key:"reuseDOM",value:function(i){3==i.nodeType&&this.createDOM(i)}},{key:"merge",value:function(i,r,o){return(!o||o instanceof e&&!(this.length-(r-i)+o.length>256))&&(this.text=this.text.slice(0,i)+(o?o.text:"")+this.text.slice(r),this.markDirty(),!0)}},{key:"split",value:function(i){var r=new e(this.text.slice(i));return this.text=this.text.slice(0,i),this.markDirty(),r}},{key:"localPosFromDOM",value:function(i,r){return i==this.dom?r:r?this.text.length:0}},{key:"domAtPos",value:function(i){return new Dc(this.dom,i)}},{key:"domBoundsAround",value:function(i,r,o){return{from:o,to:o+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}},{key:"coordsAt",value:function(i,r){return $j(this.dom,i,r)}}]),e}(),dg=function(t){wt(e,ys);var n=Ct(e);function e(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Ce(this,e),(r=n.call(this)).mark=i,r.children=o,r.length=s;var a,l=Re(o);try{for(l.s();!(a=l.n()).done;)a.value.setParent(An(r))}catch(u){l.e(u)}finally{l.f()}return r}return Se(e,[{key:"setAttrs",value:function(i){if(tde(i),this.mark.class&&(i.className=this.mark.class),this.mark.attrs)for(var r in this.mark.attrs)i.setAttribute(r,this.mark.attrs[r]);return i}},{key:"reuseDOM",value:function(i){i.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),hr(Wi(e.prototype),"sync",this).call(this,i,r)}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&o.mark.eq(this.mark))||i&&a<=0||ri&&o.push(s=i&&(a=l),s=d,l++}}catch(f){c.e(f)}finally{c.f()}var h=this.length-i;return this.length=i,a>-1&&(this.children.length=a,this.markDirty()),new e(this.mark,o,h)}},{key:"domAtPos",value:function(i){return fde(this,i)}},{key:"coordsAt",value:function(i,r){return mde(this,i,r)}}]),e}();function $j(t,n,e){var i=t.nodeValue.length;n>i&&(n=i);var r=n,o=n,s=0;0==n&&e<0||n==i&&e>=0?Zn.chrome||Zn.gecko||(n?(r--,s=1):o=0)?0:a.length-1];return Zn.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,function(c){return c.width})||l),s?Nj(l,s<0):l||null}var Bj=function(t){wt(e,ys);var n=Ct(e);function e(i,r,o){var s;return Ce(this,e),(s=n.call(this)).widget=i,s.length=r,s.side=o,s.prevWidget=null,s}return Se(e,[{key:"split",value:function(i){var r=e.create(this.widget,this.length-i,this.side);return this.length-=i,r}},{key:"sync",value:function(i){this.dom&&this.widget.updateDOM(this.dom,i)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(i)),this.dom.contentEditable="false")}},{key:"getSide",value:function(){return this.side}},{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0?o.length-1:0;s=o[a],!(i>0?0==a:a==o.length-1||s.top0?-1:1);return this.length?s:Nj(s,this.side>0)}},{key:"isEditable",get:function(){return!1}},{key:"isWidget",get:function(){return!0}},{key:"destroy",value:function(){hr(Wi(e.prototype),"destroy",this).call(this),this.dom&&this.widget.destroy(this.dom)}}],[{key:"create",value:function(i,r,o){return new(i.customView||e)(i,r,o)}}]),e}(),dde=function(t){wt(e,Bj);var n=Ct(e);function e(){return Ce(this,e),n.apply(this,arguments)}return Se(e,[{key:"domAtPos",value:function(i){var r=this.widget,o=r.topView,s=r.text;return o?Vj(i,0,o,s,function(a,l){return a.domAtPos(l)},function(a){return new Dc(s,Math.min(a,s.nodeValue.length))}):new Dc(s,Math.min(i,s.nodeValue.length))}},{key:"sync",value:function(){this.setDOM(this.widget.toDOM())}},{key:"localPosFromDOM",value:function(i,r){var o=this.widget,s=o.topView;return s?hde(i,r,s,o.text):Math.min(r,this.length)}},{key:"ignoreMutation",value:function(){return!1}},{key:"overrideDOMText",get:function(){return null}},{key:"coordsAt",value:function(i,r){var o=this.widget,s=o.topView,a=o.text;return s?Vj(i,r,s,a,function(l,c,u){return l.coordsAt(c,u)},function(l,c){return $j(a,l,c)}):$j(a,i,r)}},{key:"destroy",value:function(){var i;hr(Wi(e.prototype),"destroy",this).call(this),null===(i=this.widget.topView)||void 0===i||i.destroy()}},{key:"isEditable",get:function(){return!0}},{key:"canReuseDOM",value:function(){return!0}}]),e}();function Vj(t,n,e,i,r,o){if(e instanceof dg){for(var s=e.dom.firstChild;s;s=s.nextSibling){var a=ys.get(s);if(!a)return o(t,n);var l=q0(s,i),c=a.length+(l?i.nodeValue.length:0);if(t=0;)if(a<0?c>0:c0?-1:1);return o&&o.topr.top?{left:r.left,right:r.right,top:o.top,bottom:o.bottom}:r}},{key:"overrideDOMText",get:function(){return ao.empty}}]),e}();function fde(t,n){for(var e=t.dom,i=t.children,r=0,o=0;ro&&n0;l--){var c=i[l-1];if(c.dom.parentNode==e)return c.domAtPos(c.length)}for(var u=r;u0&&n instanceof dg&&r.length&&(i=r[r.length-1])instanceof dg&&i.mark.eq(n.mark)?pde(i,n.children[0],e-1):(r.push(n),n.setParent(t)),t.length+=n.length}function mde(t,n,e){var i=null,r=-1,o=null,s=-1;!function l(c,u){for(var d=0,h=0;d=u&&(f.children.length?l(f,u-h):!o&&(p>u||h==p&&f.getSide()>0)?(o=f,s=u-h):(h-1}}],[{key:"mark",value:function(i){return new gde(i)}},{key:"widget",value:function(i){var r=i.side||0,o=!!i.block;return new Fb(i,r+=o?r>0?3e8:-4e8:r>0?1e8:-1e8,r,o,i.widget||null,!1)}},{key:"replace",value:function(i){var r,o,s=!!i.block;if(i.isBlockGap)r=-5e8,o=4e8;else{var a=vde(i,s);r=(a.start?s?-3e8:-1:5e8)-1,o=1+(a.end?s?2e8:1:-6e8)}return new Fb(i,r,o,s,i.widget||null,!0)}},{key:"line",value:function(i){return new Wj(i)}},{key:"set",value:function(i){return Ho.of(i,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}}]),e}();mi.none=Ho.empty;var gde=function(t){wt(e,mi);var n=Ct(e);function e(i){var r;Ce(this,e);var o=vde(i);return(r=n.call(this,o.start?-1:5e8,o.end?1:-6e8,null,i)).tagName=i.tagName||"span",r.class=i.class||"",r.attrs=i.attributes||null,r}return Se(e,[{key:"eq",value:function(i){return this==i||i instanceof e&&this.tagName==i.tagName&&this.class==i.class&&zj(this.attrs,i.attrs)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(i>=r)throw new RangeError("Mark decorations may not be empty");return hr(Wi(e.prototype),"range",this).call(this,i,r)}}]),e}();gde.prototype.point=!1;var Wj=function(t){wt(e,mi);var n=Ct(e);function e(i){return Ce(this,e),n.call(this,-2e8,-2e8,null,i)}return Se(e,[{key:"eq",value:function(i){return i instanceof e&&this.spec.class==i.spec.class&&zj(this.spec.attributes,i.spec.attributes)}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(r!=i)throw new RangeError("Line decoration ranges must be zero-length");return hr(Wi(e.prototype),"range",this).call(this,i,r)}}]),e}();Wj.prototype.mapMode=Tl.TrackBefore,Wj.prototype.point=!0;var Fb=function(t){wt(e,mi);var n=Ct(e);function e(i,r,o,s,a,l){var c;return Ce(this,e),(c=n.call(this,r,o,a,i)).block=s,c.isReplace=l,c.mapMode=s?r<=0?Tl.TrackBefore:Tl.TrackAfter:Tl.TrackDel,c}return Se(e,[{key:"type",get:function(){return this.startSide=5}},{key:"eq",value:function(i){return i instanceof e&&((r=this.widget)==(o=i.widget)||!!(r&&o&&r.compare(o)))&&this.block==i.block&&this.startSide==i.startSide&&this.endSide==i.endSide;var r,o}},{key:"range",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(this.isReplace&&(i>r||i==r&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&r!=i)throw new RangeError("Widget decorations can only have zero-length ranges");return hr(Wi(e.prototype),"range",this).call(this,i,r)}}]),e}();function vde(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=t.inclusiveStart,i=t.inclusiveEnd;return null==e&&(e=t.inclusive),null==i&&(i=t.inclusive),{start:e??n,end:i??n}}function qj(t,n,e){var r=e.length-1;r>=0&&e[r]+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)>=t?e[r]=Math.max(e[r],n):e.push(t,n)}Fb.prototype.point=!0;var od=function(t){wt(e,ys);var n=Ct(e);function e(){var i;return Ce(this,e),(i=n.apply(this,arguments)).children=[],i.length=0,i.prevAttrs=void 0,i.attrs=null,i.breakAfter=0,i}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){if(o){if(!(o instanceof e))return!1;this.dom||o.transferDOM(this)}return s&&this.setDeco(o?o.attrs:null),ode(this,i,r,o?o.children:[],a,l),!0}},{key:"split",value:function(i){var r=new e;if(r.breakAfter=this.breakAfter,0==this.length)return r;var o=this.childPos(i),s=o.i,a=o.off;a&&(r.append(this.children[s].split(a),0),this.children[s].merge(a,this.children[s].length,null,!1,0,0),s++);for(var l=s;l0&&0==this.children[s-1].length;)this.children[--s].destroy();return this.children.length=s,this.markDirty(),this.length=i,r}},{key:"transferDOM",value:function(i){this.dom&&(this.markDirty(),i.setDOM(this.dom),i.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}},{key:"setDeco",value:function(i){zj(this.attrs,i)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=i)}},{key:"append",value:function(i,r){pde(this,i,r)}},{key:"addLineDeco",value:function(i){var r=i.spec.attributes,o=i.spec.class;r&&(this.attrs=Uj(r,this.attrs||{})),o&&(this.attrs=Uj({class:o},this.attrs||{}))}},{key:"domAtPos",value:function(i){return fde(this,i)}},{key:"reuseDOM",value:function(i){"DIV"==i.nodeName&&(this.setDOM(i),this.dirty|=6)}},{key:"sync",value:function(i,r){var o;this.dom?4&this.dirty&&(tde(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Gj(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),hr(Wi(e.prototype),"sync",this).call(this,i,r);for(var s=this.dom.lastChild;s&&ys.get(s)instanceof dg;)s=s.lastChild;if(!(s&&this.length&&("BR"==s.nodeName||0!=(null===(o=ys.get(s))||void 0===o?void 0:o.isEditable)||Zn.ios&&this.children.some(function(l){return l instanceof Nb})))){var a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}},{key:"measureTextSize",value:function(){if(0==this.children.length||this.length>20)return null;var i,r=0,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(!(s instanceof Nb)||/[^ -~]/.test(s.text))return null;var a=Ob(s.dom);if(1!=a.length)return null;r+=a[0].width}}catch(l){o.e(l)}finally{o.f()}return r?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:r/this.length}:null}},{key:"coordsAt",value:function(i,r){return mde(this,i,r)}},{key:"become",value:function(i){return!1}},{key:"type",get:function(){return go.Text}}],[{key:"find",value:function(i,r){for(var o=0,s=0;o=r){if(a instanceof e)return a;if(l>r)break}s=l+a.breakAfter}return null}}]),e}(),Yj=function(t){wt(e,ys);var n=Ct(e);function e(i,r,o){var s;return Ce(this,e),(s=n.call(this)).widget=i,s.length=r,s.type=o,s.breakAfter=0,s.prevWidget=null,s}return Se(e,[{key:"merge",value:function(i,r,o,s,a,l){return!(o&&(!(o instanceof e&&this.widget.compare(o.widget))||i>0&&a<=0||r0&&void 0!==arguments[0]?arguments[0]:this.bufferMarks;this.pendingBuffer&&(this.curLine.append(Xk(new Hj(-1),n),n.length),this.pendingBuffer=0)}},{key:"addBlockWidget",value:function(n){this.flushBuffer(),this.curLine=null,this.content.push(n)}},{key:"finish",value:function(n){this.pendingBuffer&&n<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||this.getLine()}},{key:"buildText",value:function(n,e,i){for(;n>0;){if(this.textOff==this.text.length){var r=this.cursor.next(this.skip),o=r.value,s=r.lineBreak,a=r.done;if(this.skip=0,a)throw new Error("Ran out of text content when drawing inline views");if(s){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,n--;continue}this.text=o,this.textOff=0}var l=Math.min(this.text.length-this.textOff,n,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(Xk(new Nb(this.text.slice(this.textOff,this.textOff+l)),e),i),this.atCursorPos=!0,this.textOff+=l,n-=l,i=0}}},{key:"span",value:function(n,e,i,r){this.buildText(e-n,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}},{key:"point",value:function(n,e,i,r,o,s){if(this.disallowBlockEffectsFor[s]&&i instanceof Fb){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}var a=e-n;if(i instanceof Fb)if(i.block){var l=i.type;l!=go.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new Yj(i.widget||new yde("div"),a,l))}else{var c=Bj.create(i.widget||new yde("span"),a,a?0:i.startSide),u=this.atCursorPos&&!c.isEditable&&o<=r.length&&(n0),d=!c.isEditable&&(nr.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||u||(this.pendingBuffer=0),this.flushBuffer(r),u&&(h.append(Xk(new Hj(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(Xk(c,r),o),this.atCursorPos=d,this.pendingBuffer=d?nr.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);a&&(this.textOff+a<=this.text.length?this.textOff+=a:(this.skip+=a-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=o)}}],[{key:"build",value:function(n,e,i,r,o){var s=new t(n,e,i,o);return s.openEnd=Ho.spans(r,e,i,s),s.openStart<0&&(s.openStart=s.openEnd),s.finish(s.openEnd),s}}]),t}();function Xk(t,n){var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)t=new dg(e.value,[t],t.length)}catch(o){i.e(o)}finally{i.f()}return t}var yde=function(t){wt(e,Ep);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).tag=i,r}return Se(e,[{key:"eq",value:function(i){return i.tag==this.tag}},{key:"toDOM",value:function(){return document.createElement(this.tag)}},{key:"updateDOM",value:function(i){return i.nodeName.toLowerCase()==this.tag}}]),e}(),_de=Qn.define(),bde=Qn.define(),xde=Qn.define(),wde=Qn.define(),Xj=Qn.define(),Cde=Qn.define(),Sde=Qn.define(),kde=Qn.define({combine:function(t){return t.some(function(n){return n})}}),Dde=Qn.define({combine:function(t){return t.some(function(n){return n})}}),Tde=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"nearest",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5;Ce(this,t),this.range=n,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o}return Se(t,[{key:"map",value:function(n){return n.empty?this:new t(this.range.map(n),this.y,this.x,this.yMargin,this.xMargin)}}]),t}(),Ede=cr.define({map:function(t,n){return t.map(n)}});function Ec(t,n,e){var i=t.facet(wde);i.length?i[0](n):window.onerror?window.onerror(String(n),e,void 0,void 0,n):e?console.error(e+":",n):console.error(n)}var Jk=Qn.define({combine:function(t){return!t.length||t[0]}}),Uet=0,Pb=Qn.define(),wa=function(){function t(n,e,i,r){Ce(this,t),this.id=n,this.create=e,this.domEventHandlers=i,this.extension=r(this)}return Se(t,null,[{key:"define",value:function(n,e){var i=e||{},o=i.provide,s=i.decorations;return new t(Uet++,n,i.eventHandlers,function(a){var l=[Pb.of(a)];return s&&l.push(jb.of(function(c){var u=c.plugin(a);return u?s(u):mi.none})),o&&l.push(o(a)),l})}},{key:"fromClass",value:function(n,e){return t.define(function(i){return new n(i)},e)}}]),t}(),Jj=function(){function t(n){Ce(this,t),this.spec=n,this.mustUpdate=null,this.value=null}return Se(t,[{key:"update",value:function(n){if(this.value){if(this.mustUpdate){var e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(i){if(Ec(e.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(n)}catch(i){Ec(n.state,i,"CodeMirror plugin crashed"),this.deactivate()}return this}},{key:"destroy",value:function(n){var e;if(null!==(e=this.value)&&void 0!==e&&e.destroy)try{this.value.destroy()}catch(i){Ec(n.state,i,"CodeMirror plugin crashed")}}},{key:"deactivate",value:function(){this.spec=this.value=null}}]),t}(),Ade=Qn.define(),Kj=Qn.define(),jb=Qn.define(),Mde=Qn.define(),Ode=Qn.define(),Rb=Qn.define(),K0=function(){function t(n,e,i,r){Ce(this,t),this.fromA=n,this.toA=e,this.fromB=i,this.toB=r}return Se(t,[{key:"join",value:function(n){return new t(Math.min(this.fromA,n.fromA),Math.max(this.toA,n.toA),Math.min(this.fromB,n.fromB),Math.max(this.toB,n.toB))}},{key:"addToSet",value:function(n){for(var e=n.length,i=this;e>0;e--){var r=n[e-1];if(!(r.fromA>i.toA)){if(r.toAu)break;o+=2}if(!l)return i;new t(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),s=l.toA,a=l.toB}}}]),t}(),Ide=function(){function t(n,e,i){Ce(this,t),this.view=n,this.state=e,this.transactions=i,this.flags=0,this.startState=n.state,this.changes=rd.empty(this.startState.doc.length);var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)this.changes=this.changes.compose(r.value.changes)}catch(l){o.e(l)}finally{o.f()}var a=[];this.changes.iterChangedRanges(function(l,c,u,d){return a.push(new K0(l,c,u,d))}),this.changedRanges=a}return Se(t,[{key:"viewportChanged",get:function(){return(4&this.flags)>0}},{key:"heightChanged",get:function(){return(2&this.flags)>0}},{key:"geometryChanged",get:function(){return this.docChanged||(10&this.flags)>0}},{key:"focusChanged",get:function(){return(1&this.flags)>0}},{key:"docChanged",get:function(){return!this.changes.empty}},{key:"selectionSet",get:function(){return this.transactions.some(function(n){return n.selection})}},{key:"empty",get:function(){return 0==this.flags&&0==this.transactions.length}}],[{key:"create",value:function(n,e,i){return new t(n,e,i)}}]),t}(),rs=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(rs||(rs={})),Qj=rs.LTR,zet=rs.RTL;function Nde(t){for(var n=[],e=0;e=e){if(a.level==i)return s;(o<0||(0!=r?r<0?a.frome:n[o].level>a.level))&&(o=s)}}if(o<0)throw new RangeError("Index out of range");return o}}]),t}(),os=[];function Lde(t){return[new Q0(0,t,0)]}var $de="";function Xet(t,n,e,i,r){var o,s=i.head-t.from,a=-1;if(0==s){if(!r||!t.length)return null;n[0].level!=e&&(s=n[0].side(!1,e),a=0)}else if(s==t.length){if(r)return null;var l=n[n.length-1];l.level!=e&&(s=l.side(!0,e),a=n.length-1)}a<0&&(a=Q0.find(n,s,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc));var c=n[a];s==c.side(r,e)&&(s=(c=n[a+=r?1:-1]).side(!r,e));var u=r==(c.dir==e),d=Dl(t.text,s,u);if($de=t.text.slice(Math.min(s,d),Math.max(s,d)),d!=c.side(r,e))return Qt.cursor(d+t.from,u?-1:1,c.level);var h=a==(r?n.length-1:0)?null:n[a+(r?1:-1)];return h||c.level==e?h&&h.level1){var d,h=Re(this.points);try{for(h.s();!(d=h.n()).done;){var f=d.value;f.node==n&&f.pos>this.text.length&&(f.pos-=c-1)}}catch(p){h.e(p)}finally{h.f()}}s=l+c}}},{key:"readNode",value:function(n){if(!n.cmIgnore){var e=ys.get(n),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(n,i.length);for(var r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else 3==n.nodeType?this.readTextNode(n):"BR"==n.nodeName?n.nextSibling&&this.lineBreak():1==n.nodeType&&this.readRange(n.firstChild,null)}}},{key:"findPointBefore",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.node==n&&n.childNodes[o.offset]==e&&(o.pos=this.text.length)}}catch(s){r.e(s)}finally{r.f()}}},{key:"findPointInside",value:function(n,e){var i,r=Re(this.points);try{for(r.s();!(i=r.n()).done;){var o=i.value;(3==n.nodeType?o.node==n:n.contains(o.node))&&(o.pos=this.text.length+Math.min(e,o.offset))}}catch(s){r.e(s)}finally{r.f()}}}]),t}();function Vde(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}var Hde=Se(function t(n,e){Ce(this,t),this.node=n,this.offset=e,this.pos=-1}),Ude=function(t){wt(e,ys);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).view=i,r.compositionDeco=mi.none,r.decorations=[],r.dynamicDecorationMap=[],r.minWidth=0,r.minWidthFrom=0,r.minWidthTo=0,r.impreciseAnchor=null,r.impreciseHead=null,r.forceSelection=!1,r.lastUpdate=Date.now(),r.setDOM(i.contentDOM),r.children=[new od],r.children[0].setParent(An(r)),r.updateDeco(),r.updateInner([new K0(0,0,0,i.state.doc.length)],0),r}return Se(e,[{key:"length",get:function(){return this.view.state.doc.length}},{key:"update",value:function(i){var r=this,o=i.changedRanges;this.minWidth>0&&o.length&&(o.every(function(a){return a.toAr.minWidthTo})?(this.minWidthFrom=i.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=i.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=mi.none:(i.transactions.length||this.dirty)&&(this.compositionDeco=function(a,l){var c=Gde(a);if(!c)return mi.none;var d=c.to,h=c.node,f=c.text,p=l.mapPos(c.from,1),m=Math.max(p,l.mapPos(d,-1)),g=a.state,v=3==h.nodeType?h.nodeValue:new Bde([],g).readRange(h.firstChild,null).text;if(m-p=0?i[s]:null;if(!a)break;var l=a.fromA,c=a.toA,h=Het.build(this.view.state.doc,a.fromB,a.toB,this.decorations,this.dynamicDecorationMap),f=h.content,p=h.breakAtStart,m=h.openStart,g=h.openEnd,v=o.findPos(c,1),y=v.i,b=v.off,C=o.findPos(l,-1);rde(this,C.i,C.off,y,b,f,p,m,g)}}},{key:"updateSelection",value:function(){var i=this,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange(),o||this.mayControlSelection()){var s=this.forceSelection;this.forceSelection=!1;var a=this.view.state.selection.main,l=this.domAtPos(a.anchor),c=a.empty?l:this.domAtPos(a.head);if(Zn.gecko&&a.empty&&function Jet(t){return 1==t.node.nodeType&&t.node.firstChild&&(0==t.offset||"false"==t.node.childNodes[t.offset-1].contentEditable)&&(t.offset==t.node.childNodes.length||"false"==t.node.childNodes[t.offset].contentEditable)}(l)){var u=document.createTextNode("");this.view.observer.ignore(function(){return l.node.insertBefore(u,l.node.childNodes[l.offset]||null)}),l=c=new Dc(u,0),s=!0}var d=this.view.observer.selectionRange;!s&&d.focusNode&&Wk(l.node,l.offset,d.anchorNode,d.anchorOffset)&&Wk(c.node,c.offset,d.focusNode,d.focusOffset)||(this.view.observer.ignore(function(){Zn.android&&Zn.chrome&&i.dom.contains(d.focusNode)&&function ett(t,n){for(var e=t;e&&e!=n;e=e.assignedSlot||e.parentNode)if(1==e.nodeType&&"false"==e.contentEditable)return!0;return!1}(d.focusNode,i.dom)&&(i.dom.blur(),i.dom.focus({preventScroll:!0}));var h=zk(i.view.root);if(h)if(a.empty){if(Zn.gecko){var f=function Qet(t,n){return 1!=t.nodeType?0:(n&&"false"==t.childNodes[n-1].contentEditable?1:0)|(na.head){var g=[c,l];l=g[0],c=g[1]}m.setEnd(c.node,c.offset),m.setStart(l.node,l.offset),h.removeAllRanges(),h.addRange(m)}}),this.view.observer.setSelectionRange(l,c)),this.impreciseAnchor=l.precise?null:new Dc(d.anchorNode,d.anchorOffset),this.impreciseHead=c.precise?null:new Dc(d.focusNode,d.focusOffset)}}},{key:"enforceCursorAssoc",value:function(){if(!this.compositionDeco.size){var i=this.view,r=i.state.selection.main,o=zk(i.root),s=i.observer.selectionRange,a=s.anchorNode,l=s.anchorOffset;if(o&&r.empty&&r.assoc&&o.modify){var c=od.find(this,r.head);if(c){var u=c.posAtStart;if(r.head!=u&&r.head!=u+c.length){var d=this.coordsAt(r.head,-1),h=this.coordsAt(r.head,1);if(d&&h&&!(d.bottom>h.top)){var f=this.domAtPos(r.head+r.assoc);o.collapse(f.node,f.offset),o.modify("move",r.assoc<0?"forward":"backward","lineboundary"),i.observer.readSelectionRange();var p=i.observer.selectionRange;i.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=r.from&&o.collapse(a,l)}}}}}}},{key:"mayControlSelection",value:function(){var i=this.view.root.activeElement;return i==this.dom||Gk(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i))}},{key:"nearest",value:function(i){for(var r=i;r;){var o=ys.get(r);if(o&&o.rootView==this)return o;r=r.parentNode}return null}},{key:"posFromDOM",value:function(i,r){var o=this.nearest(i);if(!o)throw new RangeError("Trying to find position for a DOM position outside of the document");return o.localPosFromDOM(i,r)+o.posAtStart}},{key:"domAtPos",value:function(i){for(var r=this.childCursor().findPos(i,-1),o=r.i,s=r.off;ol||i==l&&a.type!=go.WidgetBefore&&a.type!=go.WidgetAfter&&(!s||2==r||this.children[s-1].breakAfter||this.children[s-1].type==go.WidgetBefore&&r>-2))return a.coordsAt(i-l,r);o=l}}},{key:"measureVisibleLineHeights",value:function(i){for(var r=[],o=i.from,s=i.to,a=this.view.contentDOM.clientWidth,l=a>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==rs.LTR,d=0,h=0;hs)break;if(d>=o){var m=f.dom.getBoundingClientRect();if(r.push(m.height),l){var g=f.dom.lastChild,v=g?Ob(g):[];if(v.length){var y=v[v.length-1],b=u?y.right-m.left:m.right-y.left;b>c&&(c=b,this.minWidth=a,this.minWidthFrom=d,this.minWidthTo=p)}}}d=p+f.breakAfter}return r}},{key:"textDirectionAt",value:function(i){var r=this.childPos(i,1).i;return"rtl"==getComputedStyle(this.children[r].dom).direction?rs.RTL:rs.LTR}},{key:"measureTextSize",value:function(){var i,r=this,o=Re(this.children);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s instanceof od){var a=s.measureTextSize();if(a)return a}}}catch(d){o.e(d)}finally{o.f()}var l,c,u=document.createElement("div");return u.className="cm-line",u.style.width="99999px",u.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(function(){r.dom.appendChild(u);var d=Ob(u.firstChild)[0];l=u.getBoundingClientRect().height,c=d?d.width/27:7,u.remove()}),{lineHeight:l,charWidth:c}}},{key:"childCursor",value:function(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.length,r=this.children.length;return r&&(i-=this.children[--r].length),new ide(this.children,i,r)}},{key:"computeBlockGapDeco",value:function(){for(var i=[],r=this.view.viewState,o=0,s=0;;s++){var a=s==r.viewports.length?null:r.viewports[s],l=a?a.from-1:this.length;if(l>o){var c=r.lineBlockAt(l).bottom-r.lineBlockAt(o).top;i.push(mi.replace({widget:new zde(c),block:!0,inclusive:!0,isBlockGap:!0}).range(o,l))}if(!a)break;o=a.to+1}return mi.set(i)}},{key:"updateDeco",value:function(){for(var i=this,r=this.view.state.facet(jb).map(function(s,a){return(i.dynamicDecorationMap[a]="function"==typeof s)?s(i.view):s}),o=r.length;os.anchor?-1:1);if(a){!s.empty&&(r=this.coordsAt(s.anchor,s.anchor>s.head?-1:1))&&(a={left:Math.min(a.left,r.left),top:Math.min(a.top,r.top),right:Math.max(a.right,r.right),bottom:Math.max(a.bottom,r.bottom)});var l,c=0,u=0,d=0,h=0,f=Re(this.view.state.facet(Ode).map(function(C){return C(o.view)}));try{for(f.s();!(l=f.n()).done;){var p=l.value;if(p){var m=p.left,g=p.right,v=p.top,y=p.bottom;null!=m&&(c=Math.max(c,m)),null!=g&&(u=Math.max(u,g)),null!=v&&(d=Math.max(d,v)),null!=y&&(h=Math.max(h,y))}}}catch(C){f.e(C)}finally{f.f()}!function(C,k,D,L,z,R,U,G){for(var X=C.ownerDocument,te=X.defaultView||window,P=C;P;)if(1==P.nodeType){var W=void 0,J=P==X.body;if(J)W=$et(te);else{if(P.scrollHeight<=P.clientHeight&&P.scrollWidth<=P.clientWidth){P=P.assignedSlot||P.parentNode;continue}var H=P.getBoundingClientRect();W={left:H.left,right:H.left+P.clientWidth,top:H.top,bottom:H.top+P.clientHeight}}var le=0,E=0;if("nearest"==z)k.top0&&k.bottom>W.bottom+E&&(E=k.bottom-W.bottom+E+U)):k.bottom>W.bottom&&(E=k.bottom-W.bottom+U,D<0&&k.top-E0&&k.right>W.right+le&&(le=k.right-W.right+le+R)):k.right>W.right&&(le=k.right-W.right+R,D<0&&k.left0&&e<=0)n=Ib(t=t.childNodes[n-1]);else{if(!(1==t.nodeType&&n=0))return null;t=t.childNodes[n],n=0}}}var Zet=function(){function t(){Ce(this,t),this.changes=[]}return Se(t,[{key:"compareRange",value:function(n,e){qj(n,e,this.changes)}},{key:"comparePoint",value:function(n,e){qj(n,e,this.changes)}}]),t}();function ttt(t,n){return n.left>t?n.left-t:Math.max(0,t-n.right)}function ntt(t,n){return n.top>t?n.top-t:Math.max(0,t-n.bottom)}function t4(t,n){return t.topn.top+1}function qde(t,n){return nt.bottom?{top:t.top,left:t.left,right:t.right,bottom:n}:t}function n4(t,n,e){for(var i,r,o,s,a,l,c,u,d=!1,h=t.firstChild;h;h=h.nextSibling)for(var f=Ob(h),p=0;pv||s==v&&o>g){i=h,r=m,o=g,s=v;var y=v?e0?p0)}0==g?e>m.bottom&&(!c||c.bottomm.top)&&(l=h,u=m):c&&t4(c,m)?c=Yde(c,m.bottom):u&&t4(u,m)&&(u=qde(u,m.top))}if(c&&c.bottom>=e?(i=a,r=c):u&&u.top<=e&&(i=l,r=u),!i)return{node:t,offset:0};var b=Math.max(r.left,Math.min(r.right,n));return 3==i.nodeType?Xde(i,b,e):d&&"false"!=i.contentEditable?n4(i,b,e):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(r.left+r.right)/2?1:0)}}function Xde(t,n,e){for(var i=t.nodeValue.length,r=-1,o=1e9,s=0,a=0;ae?u.top-e:e-u.bottom)-1;if(u.left-1<=n&&u.right+1>=n&&d=(u.left+u.right)/2,f=h;if((Zn.chrome||Zn.gecko)&&X0(t,a).getBoundingClientRect().left==u.right&&(f=!h),d<=0)return{node:t,offset:a+(f?1:0)};r=a+(f?1:0),o=d}}}return{node:t,offset:r>-1?r:s>0?t.nodeValue.length:0}}function Jde(t,n,e){var i,r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,s=t.contentDOM.getBoundingClientRect(),a=s.top+t.viewState.paddingTop,l=t.viewState.docHeight,c=n.x,u=n.y,d=u-a;if(d<0)return 0;if(d>l)return t.state.doc.length;for(var h=t.defaultLineHeight/2,f=!1;(r=t.elementAtHeight(d)).type!=go.Text;)for(;!((d=o>0?r.bottom+h:r.top-h)>=0&&d<=l);){if(f)return e?null:0;f=!0,o=-o}u=a+d;var p=r.from;if(pt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:e?null:Kde(t,s,r,c,u);var m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,u);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(s.left+1,Math.min(s.right-1,c)),(v=g.elementFromPoint(c,u))&&!t.contentDOM.contains(v)&&(v=null));var y,b=-1;if(v&&0!=(null===(i=t.docView.nearest(v))||void 0===i?void 0:i.isEditable))if(m.caretPositionFromPoint){var C=m.caretPositionFromPoint(c,u);C&&(y=C.offsetNode,b=C.offset)}else if(m.caretRangeFromPoint){var k=m.caretRangeFromPoint(c,u);k&&(b=k.startOffset,(!t.contentDOM.contains(y=k.startContainer)||Zn.safari&&function itt(t,n,e){var i;if(3!=t.nodeType||n!=(i=t.nodeValue.length))return!1;for(var r=t.nextSibling;r;r=r.nextSibling)if(1!=r.nodeType||"BR"!=r.nodeName)return!1;return X0(t,i-1,i).getBoundingClientRect().left>e}(y,b,c)||Zn.chrome&&function rtt(t,n,e){if(0!=n)return!1;for(var i=t;;){var r=i.parentNode;if(!r||1!=r.nodeType||r.firstChild!=i)return!1;if(r.classList.contains("cm-line"))break;i=r}return e-(1==t.nodeType?t.getBoundingClientRect():X0(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(y,b,c))&&(y=void 0))}if(!y||!t.docView.dom.contains(y)){var D=od.find(t.docView,p);if(!D)return d>r.top+r.height/2?r.to:r.from;var L=n4(D.dom,c,u);y=L.node,b=L.offset}var z=t.docView.nearest(y);if(!z)return null;if(z.isWidget){var R=z.dom.getBoundingClientRect();return n.y1.5*t.defaultLineHeight&&(o+=Math.floor((r-e.top)/t.defaultLineHeight)*t.viewState.heightOracle.lineLength);var s=t.state.sliceDoc(e.from,e.to);return e.from+Mj(s,o,t.state.tabSize)}function Qde(t,n,e,i){for(var r=t.state.doc.lineAt(n.head),o=t.bidiSpans(r),s=t.textDirectionAt(r.from),a=n,l=null;;){var c=Xet(r,o,s,a,e),u=$de;if(!c){if(r.number==(e?t.state.doc.lines:1))return a;u="\n",r=t.state.doc.line(r.number+(e?1:-1)),o=t.bidiSpans(r),c=Qt.cursor(e?r.from:r.to)}if(l){if(!l(u))return a}else{if(!i)return c;l=i(u)}a=c}}function i4(t,n,e){for(var i=t.state.facet(Mde).map(function(a){return a(t)});;){var r,o=!1,s=Re(i);try{for(s.s();!(r=s.n()).done;)r.value.between(e.from-1,e.from+1,function(a,l,c){e.from>a&&e.frome.from?Qt.cursor(a,1):Qt.cursor(l,-1),o=!0)})}catch(a){s.e(a)}finally{s.f()}if(!o)return e}}var stt=function(){function t(n){var e=this;Ce(this,t),this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.mouseSelection=null;var i=function(s,a){e.ignoreDuringComposition(a)||"keydown"==a.type&&e.keydown(n,a)||(e.mustFlushObserver(a)&&n.observer.forceFlush(),e.runCustomHandlers(a.type,n,a)?a.preventDefault():s(n,a))},r=function(s){var a=oa[s];n.contentDOM.addEventListener(s,function(l){the(n,l)&&i(a,l)},r4[s]),e.registeredEvents.push(s)};for(var o in oa)r(o);n.scrollDOM.addEventListener("mousedown",function(s){s.target==n.scrollDOM&&s.clientY>n.contentDOM.getBoundingClientRect().bottom&&i(oa.mousedown,s)}),Zn.chrome&&102==Zn.chrome_version&&n.scrollDOM.addEventListener("wheel",function(){e.chromeScrollHack<0?n.contentDOM.style.pointerEvents="none":window.clearTimeout(e.chromeScrollHack),e.chromeScrollHack=setTimeout(function(){e.chromeScrollHack=-1,n.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=n.hasFocus,Zn.safari&&n.contentDOM.addEventListener("input",function(){return null})}return Se(t,[{key:"setSelectionOrigin",value:function(n){this.lastSelectionOrigin=n,this.lastSelectionTime=Date.now()}},{key:"ensureHandlers",value:function(n,e){var i,r,o=this;this.customHandlers=[];var s,a=Re(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;if(r=null===(i=l.update(n).spec)||void 0===i?void 0:i.domEventHandlers){this.customHandlers.push({plugin:l.value,handlers:r});var c=function(d){o.registeredEvents.indexOf(d)<0&&"scroll"!=d&&(o.registeredEvents.push(d),n.contentDOM.addEventListener(d,function(h){the(n,h)&&o.runCustomHandlers(d,n,h)&&h.preventDefault()}))};for(var u in r)c(u)}}}catch(d){a.e(d)}finally{a.f()}}},{key:"runCustomHandlers",value:function(n,e,i){var r,o=Re(this.customHandlers);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=s.handlers[n];if(a)try{if(a.call(s.plugin,i,e)||i.defaultPrevented)return!0}catch(l){Ec(e.state,l)}}}catch(l){o.e(l)}finally{o.f()}return!1}},{key:"runScrollHandlers",value:function(n,e){this.lastScrollTop=n.scrollDOM.scrollTop,this.lastScrollLeft=n.scrollDOM.scrollLeft;var i,r=Re(this.customHandlers);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=o.handlers.scroll;if(s)try{s.call(o.plugin,e,n)}catch(a){Ec(n.state,a)}}}catch(a){r.e(a)}finally{r.f()}}},{key:"keydown",value:function(n,e){var i,r=this;return this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()-1&&e.ctrlKey&&!e.shiftKey)||(this.pendingIOSKey=i||e,setTimeout(function(){return r.flushIOSKey(n)},250),0)):(n.observer.delayAndroidKey(e.key,e.keyCode),!0))}},{key:"flushIOSKey",value:function(n){var e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,J0(n.contentDOM,e.key,e.keyCode))}},{key:"ignoreDuringComposition",value:function(n){return!!/^key/.test(n.type)&&(this.composing>0||!!(Zn.safari&&!Zn.ios&&Date.now()-this.compositionEndedAt<100)&&(this.compositionEndedAt=0,!0))}},{key:"mustFlushObserver",value:function(n){return"keydown"==n.type&&229!=n.keyCode}},{key:"startMouseSelection",value:function(n){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=n}},{key:"update",value:function(n){this.mouseSelection&&this.mouseSelection.update(n),n.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}},{key:"destroy",value:function(){this.mouseSelection&&this.mouseSelection.destroy()}}]),t}(),Zde=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],att="dthko",ehe=[16,17,18,20,91,92,224,225];function Kk(t){return.7*t+8}var ltt=function(){function t(n,e,i,r){Ce(this,t),this.view=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(s){for(var a=s.ownerDocument,l=s.parentNode;l&&l!=a.body;)if(1==l.nodeType){if(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth)return l;l=l.assignedSlot||l.parentNode}else{if(11!=l.nodeType)break;l=l.host}return null}(n.contentDOM);var a,l,o=n.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=n.state.facet(Ao.allowMultipleSelections)&&(a=e,(l=n.state.facet(_de)).length?l[0](a):Zn.mac?a.metaKey:a.ctrlKey),this.dragMove=function(s,a){var l=s.state.facet(bde);return l.length?l[0](a):Zn.mac?!a.altKey:!a.ctrlKey}(n,e),this.dragging=!(!function(s,a){if(s.state.selection.main.empty)return!1;var l=zk(s.root);if(!l||0==l.rangeCount)return!0;for(var c=l.getRangeAt(0).getClientRects(),u=0;u=a.clientX&&d.top<=a.clientY&&d.bottom>=a.clientY)return!0}return!1}(n,e)||1!=dhe(e))&&null}return Se(t,[{key:"start",value:function(n){!1===this.dragging&&(n.preventDefault(),this.select(n))}},{key:"move",value:function(n){var e;if(0==n.buttons)return this.destroy();if(!1===this.dragging){this.select(this.lastEvent=n);var i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};n.clientX<=o.left?i=-Kk(o.left-n.clientX):n.clientX>=o.right&&(i=Kk(n.clientX-o.right)),n.clientY<=o.top?r=-Kk(o.top-n.clientY):n.clientY>=o.bottom&&(r=Kk(n.clientY-o.bottom)),this.setScrollSpeed(i,r)}}},{key:"up",value:function(n){null==this.dragging&&this.select(this.lastEvent),this.dragging||n.preventDefault(),this.destroy()}},{key:"destroy",value:function(){this.setScrollSpeed(0,0);var n=this.view.contentDOM.ownerDocument;n.removeEventListener("mousemove",this.move),n.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}},{key:"setScrollSpeed",value:function(n,e){var i=this;this.scrollSpeed={x:n,y:e},n||e?this.scrolling<0&&(this.scrolling=setInterval(function(){return i.scroll()},50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}},{key:"scroll",value:function(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}},{key:"select",value:function(n){var e=this.style.get(n,this.extend,this.multiple);!this.mustSelect&&e.eq(this.view.state.selection)&&e.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:e,userEvent:"select.pointer"}),this.mustSelect=!1}},{key:"update",value:function(n){var e=this;n.docChanged&&this.dragging&&(this.dragging=this.dragging.map(n.changes)),this.style.update(n)&&setTimeout(function(){return e.select(e.lastEvent)},20)}}]),t}();function the(t,n){if(!n.bubbles)return!0;if(n.defaultPrevented)return!1;for(var e,i=n.target;i!=t.contentDOM;i=i.parentNode)if(!i||11==i.nodeType||(e=ys.get(i))&&e.ignoreEvent(n))return!1;return!0}var oa=Object.create(null),r4=Object.create(null),nhe=Zn.ie&&Zn.ie_version<15||Zn.ios&&Zn.webkit_version<604;function ihe(t,n){var e,i=t.state,r=1,o=i.toText(n),s=o.lines==i.selection.ranges.length;if(null!=o4&&i.selection.ranges.every(function(c){return c.empty})&&o4==o.toString()){var l=-1;e=i.changeByRange(function(c){var u=i.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;var d=i.toText((s?o.line(r++).text:n)+i.lineBreak);return{changes:{from:u.from,insert:d},range:Qt.cursor(c.from+d.length)}})}else e=s?i.changeByRange(function(c){var u=o.line(r++);return{changes:{from:c.from,to:c.to,insert:u.text},range:Qt.cursor(c.from+u.length)}}):i.replaceSelection(o);t.dispatch(e,{userEvent:"input.paste",scrollIntoView:!0})}function rhe(t,n,e,i){if(1==i)return Qt.cursor(n,e);if(2==i)return function(l,c){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,d=l.charCategorizer(c),h=l.doc.lineAt(c),f=c-h.from;if(0==h.length)return Qt.cursor(c);0==f?u=1:f==h.length&&(u=-1);var p=f,m=f;u<0?p=Dl(h.text,f,!1):m=Dl(h.text,f);for(var g=d(h.text.slice(p,m));p>0;){var v=Dl(h.text,p,!1);if(d(h.text.slice(v,p))!=g)break;p=v}for(;mDate.now()-2e3)){var e,i=null,r=Re(t.state.facet(xde));try{for(r.s();!(e=r.n()).done&&!(i=(0,e.value)(t,n)););}catch(s){r.e(s)}finally{r.f()}if(i||0!=n.button||(l=ahe(s=t,a=n),c=dhe(a),u=s.state.selection,i={update:function(d){d.docChanged&&(l.pos=d.changes.mapPos(l.pos),u=u.map(d.changes))},get:function(d,h,f){var p=ahe(s,d),m=rhe(s,p.pos,p.bias,c);if(l.pos!=p.pos&&!h){var g=rhe(s,l.pos,l.bias,c),v=Math.min(g.from,m.from),y=Math.max(g.to,m.to);m=v1&&u.ranges.some(function(b){return b.eq(m)})?function(b,C){for(var k=0;;k++)if(b.ranges[k].eq(C))return Qt.create(b.ranges.slice(0,k).concat(b.ranges.slice(k+1)),b.mainIndex==k?0:b.mainIndex-(b.mainIndex>k?1:0))}(u,m):f?u.addRange(m):Qt.create([m])}}),i){var o=t.root.activeElement!=t.contentDOM;t.inputState.startMouseSelection(new ltt(t,n,i,o)),o&&t.observer.ignore(function(){return ede(t.contentDOM)}),t.inputState.mouseSelection&&t.inputState.mouseSelection.start(n)}}var s,a,l,c,u};var ohe=function(t,n){return t>=n.top&&t<=n.bottom},she=function(t,n,e){return ohe(n,e)&&t>=e.left&&t<=e.right};function ctt(t,n,e,i){var r=od.find(t.docView,n);if(!r)return 1;var o=n-r.posAtStart;if(0==o)return 1;if(o==r.length)return-1;var s=r.coordsAt(o,-1);if(s&&she(e,i,s))return-1;var a=r.coordsAt(o,1);return a&&she(e,i,a)?1:s&&ohe(i,s)?-1:1}function ahe(t,n){var e=t.posAtCoords({x:n.clientX,y:n.clientY},!1);return{pos:e,bias:ctt(t,e,n.clientX,n.clientY)}}var utt=Zn.ie&&Zn.ie_version<=11,lhe=null,che=0,uhe=0;function dhe(t){if(!utt)return t.detail;var n=lhe,e=uhe;return lhe=t,uhe=Date.now(),che=!n||e>Date.now()-400&&Math.abs(n.clientX-t.clientX)<2&&Math.abs(n.clientY-t.clientY)<2?(che+1)%3:1}function hhe(t,n,e,i){if(e){var r=t.posAtCoords({x:n.clientX,y:n.clientY},!1);n.preventDefault();var o=t.inputState.mouseSelection,s=i&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:r,insert:e},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(r,-1),head:l.mapPos(r,1)},userEvent:s?"move.drop":"input.drop"})}}oa.dragstart=function(t,n){var e=t.state.selection.main,i=t.inputState.mouseSelection;i&&(i.dragging=e),n.dataTransfer&&(n.dataTransfer.setData("Text",t.state.sliceDoc(e.from,e.to)),n.dataTransfer.effectAllowed="copyMove")},oa.drop=function(t,n){if(n.dataTransfer){if(t.state.readOnly)return n.preventDefault();var e=n.dataTransfer.files;e&&e.length?function(){n.preventDefault();for(var i=Array(e.length),r=0,o=function(){++r==e.length&&hhe(t,n,i.filter(function(l){return null!=l}).join(t.state.lineBreak),!1)},s=function(l){var c=new FileReader;c.onerror=o,c.onload=function(){/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[l]=c.result),o()},c.readAsText(e[l])},a=0;am&&(c.push(y.text),u.push({from:y.from,to:Math.min(a.doc.length,y.to+1)})),m=y.number}}catch(b){g.e(b)}finally{g.f()}d=!0}return{text:c.join(a.lineBreak),ranges:u,linewise:d}}(t.state),i=e.text,r=e.ranges,o=e.linewise;if(i||o){o4=o?i:null;var s=nhe?null:n.clipboardData;s?(n.preventDefault(),s.clearData(),s.setData("text/plain",i)):function(a,l){var c=a.dom.parentNode;if(c){var u=c.appendChild(document.createElement("textarea"));u.style.cssText="position: fixed; left: -10000px; top: 10px",u.value=l,u.focus(),u.selectionEnd=l.length,u.selectionStart=0,setTimeout(function(){u.remove(),a.focus()},50)}}(t,i),"cut"!=n.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})}};var fhe=kp.define();function phe(t,n){var e,i=[],r=Re(t.facet(Sde));try{for(r.s();!(e=r.n()).done;){var o=(0,e.value)(t,n);o&&i.push(o)}}catch(s){r.e(s)}finally{r.f()}return i?t.update({effects:i,annotations:fhe.of(!0)}):null}function mhe(t){setTimeout(function(){var n=t.hasFocus;if(n!=t.inputState.notifiedFocused){var e=phe(t.state,n);e?t.dispatch(e):t.update([])}},10)}oa.focus=function(t){t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),mhe(t)},oa.blur=function(t){t.observer.clearSelectionRange(),mhe(t)},oa.compositionstart=oa.compositionupdate=function(t){null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},oa.compositionend=function(t){t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionFirstChange=null,Zn.chrome&&Zn.android&&t.observer.flushSoon(),setTimeout(function(){t.inputState.composing<0&&t.docView.compositionDeco.size&&t.update([])},50)},oa.contextmenu=function(t){t.inputState.lastContextMenu=Date.now()},oa.beforeinput=function(t,n){var e,i;if(Zn.chrome&&Zn.android&&(i=Zde.find(function(o){return o.inputType==n.inputType}))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){var r=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||0;setTimeout(function(){var o;((null===(o=window.visualViewport)||void 0===o?void 0:o.height)||0)>r+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}};var ghe=["pre-wrap","normal","pre-line","break-spaces"],dtt=function(){function t(n){Ce(this,t),this.lineWrapping=n,this.doc=ao.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}return Se(t,[{key:"heightForGap",value:function(n,e){var i=this.doc.lineAt(e).number-this.doc.lineAt(n).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-n-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}},{key:"heightForLine",value:function(n){return this.lineWrapping?(1+Math.max(0,Math.ceil((n-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}},{key:"setDoc",value:function(n){return this.doc=n,this}},{key:"mustRefreshForWrapping",value:function(n){return ghe.indexOf(n)>-1!=this.lineWrapping}},{key:"mustRefreshForHeights",value:function(n){for(var e=!1,i=0;i-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.lineLength=r,a){this.heightSamples={};for(var l=0;l2&&void 0!==arguments[2]?arguments[2]:2;Ce(this,t),this.length=n,this.height=e,this.flags=i}return Se(t,[{key:"outdated",get:function(){return(2&this.flags)>0},set:function(n){this.flags=(n?2:0)|-3&this.flags}},{key:"setHeight",value:function(n,e){this.height!=e&&(Math.abs(this.height-e)>.001&&(n.heightChanged=!0),this.height=e)}},{key:"replace",value:function(n,e,i){return t.of(i)}},{key:"decomposeLeft",value:function(n,e){e.push(this)}},{key:"decomposeRight",value:function(n,e){e.push(this)}},{key:"applyChanges",value:function(n,e,i,r){for(var o=this,s=i.doc,a=r.length-1;a>=0;a--){var l=r[a],c=l.fromA,u=l.toA,d=l.fromB,h=l.toB,f=o.lineAt(c,Uo.ByPosNoHeight,i.setDoc(e),0,0),p=f.to>=u?f:o.lineAt(u,Uo.ByPosNoHeight,i,0,0);for(h+=p.to-u,u=p.to;a>0&&f.from<=r[a-1].toA;)c=r[a-1].fromA,d=r[a-1].fromB,a--,c2*o){var s=n[e-1];s.break?n.splice(--e,1,s.left,null,s.right):n.splice(--e,1,s.left,s.right),i+=1+s.break,r-=s.size}else{if(!(o>2*r))break;var a=n[i];a.break?n.splice(i,1,a.left,null,a.right):n.splice(i,1,a.left,a.right),i+=2+a.break,o-=a.size}else if(r=a&&l(this.blockAt(0,o,s,a))}},{key:"updateHeight",value:function(i){var o=arguments.length>3?arguments[3]:void 0;return o&&o.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&o.more&&this.setHeight(i,o.heights[o.index++]),this.outdated=!1,this}},{key:"toString",value:function(){return"block(".concat(this.length,")")}}]),e}(),mh=function(t){wt(e,vhe);var n=Ct(e);function e(i,r){var o;return Ce(this,e),(o=n.call(this,i,r,go.Text)).collapsed=0,o.widgetHeight=0,o}return Se(e,[{key:"replace",value:function(i,r,o){var s=o[0];return 1==o.length&&(s instanceof e||s instanceof Z0&&4&s.flags)&&Math.abs(this.length-s.length)<10?(s instanceof Z0?s=new e(s.length,this.height):s.height=this.height,this.outdated||(s.outdated=!1),s):sd.of(o)}},{key:"updateHeight",value:function(i){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0;return s&&s.from<=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)&&s.more?this.setHeight(i,s.heights[s.index++]):(o||this.outdated)&&this.setHeight(i,Math.max(this.widgetHeight,i.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}},{key:"toString",value:function(){return"line(".concat(this.length).concat(this.collapsed?-this.collapsed:"").concat(this.widgetHeight?":"+this.widgetHeight:"",")")}}]),e}(),Z0=function(t){wt(e,sd);var n=Ct(e);function e(i){return Ce(this,e),n.call(this,i,0)}return Se(e,[{key:"heightMetrics",value:function(i,r){var o,s=i.doc.lineAt(r).number,a=i.doc.lineAt(r+this.length).number,l=a-s+1,c=0;if(i.lineWrapping){var u=Math.min(this.height,i.lineHeight*l);o=u/l,c=(this.height-u)/(this.length-l-1)}else o=this.height/l;return{firstLine:s,lastLine:a,perLine:o,perChar:c}}},{key:"blockAt",value:function(i,r,o,s){var a=this.heightMetrics(r,s),l=a.firstLine,c=a.lastLine,u=a.perLine,d=a.perChar;if(r.lineWrapping){var h=s+Math.round(Math.max(0,Math.min(1,(i-o)/this.height))*this.length),f=r.doc.lineAt(h),p=u+f.length*d,m=Math.max(o,i-p/2);return new hg(f.from,f.length,m,p,go.Text)}var g=Math.max(0,Math.min(c-l,Math.floor((i-o)/u))),v=r.doc.line(l+g);return new hg(v.from,v.length,o+u*g,u,go.Text)}},{key:"lineAt",value:function(i,r,o,s,a){if(r==Uo.ByHeight)return this.blockAt(i,o,s,a);if(r==Uo.ByPosNoHeight){var l=o.doc.lineAt(i),c=l.from;return new hg(c,l.to-c,0,0,go.Text)}var d=this.heightMetrics(o,a),h=d.firstLine,f=d.perLine,p=d.perChar,m=o.doc.lineAt(i),g=f+m.length*p,v=m.number-h;return new hg(m.from,m.length,Math.max(s,Math.min(s+f*v+p*(m.from-a-v),s+this.height-g)),g,go.Text)}},{key:"forEachLine",value:function(i,r,o,s,a,l){i=Math.max(i,a),r=Math.min(r,a+this.length);for(var c=this.heightMetrics(o,a),u=c.firstLine,d=c.perLine,h=c.perChar,f=i,p=s;f<=r;){var m=o.doc.lineAt(f);if(f==i){var g=m.number-u;p+=d*g+h*(i-a-g)}var v=d+h*m.length;l(new hg(m.from,m.length,p,v,go.Text)),p+=v,f=m.to+1}}},{key:"replace",value:function(i,r,o){var s=this.length-r;if(s>0){var a=o[o.length-1];a instanceof e?o[o.length-1]=new e(a.length+s):o.push(null,new e(s-1))}if(i>0){var l=o[0];l instanceof e?o[0]=new e(i+l.length):o.unshift(new e(i-1),null)}return sd.of(o)}},{key:"decomposeLeft",value:function(i,r){r.push(new e(i-1),null)}},{key:"decomposeRight",value:function(i,r){r.push(null,new e(this.length-i-1))}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=r+this.length;if(s&&s.from<=r+this.length&&s.more){var l=[],c=Math.max(r,s.from),u=-1;for(s.from>r&&l.push(new e(s.from-r-1).updateHeight(i,r));c<=a&&s.more;){var d=i.doc.lineAt(c).length;l.length&&l.push(null);var h=s.heights[s.index++];-1==u?u=h:Math.abs(h-u)>=.001&&(u=-2);var f=new mh(d,h);f.outdated=!1,l.push(f),c+=d+1}c<=a&&l.push(null,new e(a-c).updateHeight(i,c));var p=sd.of(l);return(u<0||Math.abs(p.height-this.height)>=.001||Math.abs(u-this.heightMetrics(i,r).perLine)>=.001)&&(i.heightChanged=!0),p}return(o||this.outdated)&&(this.setHeight(i,i.heightForGap(r,r+this.length)),this.outdated=!1),this}},{key:"toString",value:function(){return"gap(".concat(this.length,")")}}]),e}(),ftt=function(t){wt(e,sd);var n=Ct(e);function e(i,r,o){var s;return Ce(this,e),(s=n.call(this,i.length+r+o.length,i.height+o.height,r|(i.outdated||o.outdated?2:0))).left=i,s.right=o,s.size=i.size+o.size,s}return Se(e,[{key:"break",get:function(){return 1&this.flags}},{key:"blockAt",value:function(i,r,o,s){var a=o+this.left.height;return ic))return d;var h=r==Uo.ByPosNoHeight?Uo.ByPosNoHeight:Uo.ByPos;return u?d.join(this.right.lineAt(c,h,o,l,c)):this.left.lineAt(c,h,o,s,a).join(d)}},{key:"forEachLine",value:function(i,r,o,s,a,l){var c=s+this.left.height,u=a+this.left.length+this.break;if(this.break)i=u&&this.right.forEachLine(i,r,o,c,u,l);else{var d=this.lineAt(u,Uo.ByPos,o,s,a);i=i&&d.from<=r&&l(d),r>d.to&&this.right.forEachLine(d.to+1,r,o,c,u,l)}}},{key:"replace",value:function(i,r,o){var s=this.left.length+this.break;if(rthis.left.length)return this.balanced(this.left,this.right.replace(i-s,r-s,o));var a=[];i>0&&this.decomposeLeft(i,a);var l,c=a.length,u=Re(o);try{for(u.s();!(l=u.n()).done;)a.push(l.value)}catch(f){u.e(f)}finally{u.f()}if(i>0&&yhe(a,c-1),r=++o&&r.push(null),i>o&&this.right.decomposeLeft(i-o,r)}},{key:"decomposeRight",value:function(i,r){var o=this.left.length,s=o+this.break;if(i>=s)return this.right.decomposeRight(i-s,r);i2*r.size||r.size>2*i.size?sd.of(this.break?[i,null,r]:[i,r]):(this.left=i,this.right=r,this.height=i.height+r.height,this.outdated=i.outdated||r.outdated,this.size=i.size+r.size,this.length=i.length+this.break+r.length,this)}},{key:"updateHeight",value:function(i){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3?arguments[3]:void 0,a=this.left,l=this.right,c=r+a.length+this.break,u=null;return s&&s.from<=r+a.length&&s.more?u=a=a.updateHeight(i,r,o,s):a.updateHeight(i,r,o),s&&s.from<=c+l.length&&s.more?u=l=l.updateHeight(i,c,o,s):l.updateHeight(i,c,o),u?this.balanced(a,l):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}},{key:"toString",value:function(){return this.left+(this.break?" ":"-")+this.right}}]),e}();function yhe(t,n){var e,i;null==t[n]&&(e=t[n-1])instanceof Z0&&(i=t[n+1])instanceof Z0&&t.splice(n-1,3,new Z0(e.length+1+i.length))}var ptt=function(){function t(n,e){Ce(this,t),this.pos=n,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=n}return Se(t,[{key:"isCovered",get:function(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}},{key:"span",value:function(n,e){if(this.lineStart>-1){var i=Math.min(e,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof mh?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new mh(i-this.pos,-1)),this.writtenTo=i,e>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}},{key:"point",value:function(n,e,i){if(n=5)&&this.addLineDeco(r,o)}else e>n&&this.span(n,e);this.lineEnd>-1&&this.lineEnd-1)){var n=this.oracle.doc.lineAt(this.pos),e=n.from,i=n.to;this.lineStart=e,this.lineEnd=i,this.writtenToe&&this.nodes.push(new mh(this.pos-e,-1)),this.writtenTo=this.pos}}},{key:"blankContent",value:function(n,e){var i=new Z0(e-n);return this.oracle.doc.lineAt(n).to==e&&(i.flags|=4),i}},{key:"ensureLine",value:function(){this.enterLine();var n=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(n instanceof mh)return n;var e=new mh(0,-1);return this.nodes.push(e),e}},{key:"addBlock",value:function(n){this.enterLine(),n.type!=go.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(n),this.writtenTo=this.pos=this.pos+n.length,n.type!=go.WidgetBefore&&(this.covering=n)}},{key:"addLineDeco",value:function(n,e){var i=this.ensureLine();i.length+=e,i.collapsed+=e,i.widgetHeight=Math.max(i.widgetHeight,n),this.writtenTo=this.pos=this.pos+e}},{key:"finish",value:function(n){var e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof mh||this.isCovered?(this.writtenTou.clientHeight||u.scrollWidth>u.clientWidth)&&"visible"!=d.overflow){var h=u.getBoundingClientRect();o=Math.max(o,h.left),s=Math.min(s,h.right),a=Math.max(a,h.top),l=c==t.parentNode?h.bottom:Math.min(l,h.bottom)}c="absolute"==d.position||"fixed"==d.position?u.offsetParent:u.parentNode}else{if(11!=c.nodeType)break;c=c.host}return{left:o-e.left,right:Math.max(o,s)-e.left,top:a-(e.top+n),bottom:Math.max(a,l)-(e.top+n)}}function ytt(t,n){var e=t.getBoundingClientRect();return{left:0,right:e.right-e.left,top:n,bottom:e.bottom-(e.top+n)}}var s4=function(){function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.size=i}return Se(t,[{key:"draw",value:function(n){return mi.replace({widget:new _tt(this.size,n)}).range(this.from,this.to)}}],[{key:"same",value:function(n,e){if(n.length!=e.length)return!1;for(var i=0;i=d.from&&a<=d.to})){var l=n.lineBlockAt(a);e.push(new Qk(l.from,l.to))}},o=0;o<=1;o++)r(o);this.viewports=e.sort(function(s,a){return s.from-a.from}),this.scaler=this.heightMap.height<=7e6?bhe:new xtt(this.heightOracle,this.heightMap,this.viewports)}},{key:"updateViewportLines",value:function(){var n=this;this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,function(e){n.viewportLines.push(1==n.scaler.scale?e:Lb(e,n.scaler))})}},{key:"update",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.state=n.state;var i=this.stateDeco;this.stateDeco=this.state.facet(jb).filter(function(c){return"function"!=typeof c});var o=K0.extendWithRanges(n.changedRanges,function mtt(t,n,e){var i=new gtt;return Ho.compare(t,n,e,i,0),i.changes}(i,this.stateDeco,n?n.changes:rd.empty(this.state.doc.length))),s=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,n.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=s&&(n.flags|=2);var a=o.length?this.mapViewport(this.viewport,n.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));var l=!n.changes.empty||2&n.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,n.changes))),n.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&n.selectionSet&&n.view.lineWrapping&&n.state.selection.main.empty&&n.state.selection.main.assoc&&!n.state.facet(Dde)&&(this.mustEnforceCursorAssoc=!0)}},{key:"measure",value:function(n){var e=n.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?rs.RTL:rs.LTR;var s=this.heightOracle.mustRefreshForWrapping(o),a=e.getBoundingClientRect(),l=s||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;var c=0,u=0,d=parseInt(i.paddingTop)||0,h=parseInt(i.paddingBottom)||0;this.paddingTop==d&&this.paddingBottom==h||(this.paddingTop=d,this.paddingBottom=h,c|=10),this.editorWidth!=n.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=n.scrollDOM.clientWidth,c|=8);var f=(this.printing?ytt:vtt)(e,this.paddingTop),p=f.top-this.pixelViewport.top,m=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;var g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;var v=a.width;if(this.contentDOMWidth==v&&this.editorHeight==n.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=n.scrollDOM.clientHeight,c|=8),l){var y=n.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(y)&&(s=!0),s||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){var b=n.docView.measureTextSize(),C=b.lineHeight,k=b.charWidth;(s=C>0&&r.refresh(o,C,k,v/k,y))&&(n.docView.minWidth=0,c|=8)}p>0&&m>0?u=Math.max(p,m):p<0&&m<0&&(u=Math.min(p,m)),r.heightChanged=!1;var D,L=Re(this.viewports);try{for(L.s();!(D=L.n()).done;){var z=D.value,R=z.from==this.viewport.from?y:n.docView.measureVisibleLineHeights(z);this.heightMap=(s?sd.empty().applyChanges(this.stateDeco,ao.empty,this.heightOracle,[new K0(0,0,0,n.state.doc.length)]):this.heightMap).updateHeight(r,0,s,new htt(z.from,R))}}catch(G){L.e(G)}finally{L.f()}r.heightChanged&&(c|=2)}var U=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return U&&(this.viewport=this.getViewport(u,this.scrollTarget)),this.updateForViewport(),(2&c||U)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(s?[]:this.lineGaps,n)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,n.docView.enforceCursorAssoc()),c}},{key:"visibleTop",get:function(){return this.scaler.fromDOM(this.pixelViewport.top)}},{key:"visibleBottom",get:function(){return this.scaler.fromDOM(this.pixelViewport.bottom)}},{key:"getViewport",value:function(n,e){var i=.5-Math.max(-.5,Math.min(.5,n/1e3/2)),r=this.heightMap,o=this.heightOracle,a=this.visibleBottom,l=new Qk(r.lineAt(this.visibleTop-1e3*i,Uo.ByHeight,o,0,0).from,r.lineAt(a+1e3*(1-i),Uo.ByHeight,o,0,0).to);if(e){var c=e.range.head;if(cl.to){var u,d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),h=r.lineAt(c,Uo.ByPos,o,0,0);l=new Qk(r.lineAt((u="center"==e.y?(h.top+h.bottom)/2-d/2:"start"==e.y||"nearest"==e.y&&c1&&void 0!==arguments[1]?arguments[1]:0;if(!this.inView)return!0;var s=this.heightMap.lineAt(e,Uo.ByPos,this.heightOracle,0,0).top,l=this.heightMap.lineAt(i,Uo.ByPos,this.heightOracle,0,0).bottom,c=this.visibleTop,u=this.visibleBottom;return(0==e||s<=c-Math.max(10,Math.min(-r,250)))&&(i==this.state.doc.length||l>=u+Math.max(10,Math.min(r,250)))&&s>c-2e3&&l>1,a=o<<1;if(this.defaultTextDirection!=rs.LTR&&!r)return[];var l,c=[],u=function X(te,P,W,J){if(!(P-tete&&N=W.from&&re.to<=W.to&&Math.abs(re.from-te)he})});if(!q){if(P=P})){var V=e.moveToLineBoundary(Qt.cursor(P),!1,!0).head;V>te&&(P=V)}q=new s4(te,P,i.gapSize(W,te,P,J))}c.push(q)}},d=Re(this.viewportLines);try{for(d.s();!(l=d.n()).done;){var h=l.value;if(!(h.lengthh.from&&u(h.from,m,h,f),g=this.viewport.from&&n<=this.viewport.to&&this.viewportLines.find(function(e){return e.from<=n&&e.to>=n})||Lb(this.heightMap.lineAt(n,Uo.ByPos,this.heightOracle,0,0),this.scaler)}},{key:"lineBlockAtHeight",value:function(n){return Lb(this.heightMap.lineAt(this.scaler.fromDOM(n),Uo.ByHeight,this.heightOracle,0,0),this.scaler)}},{key:"elementAtHeight",value:function(n){return Lb(this.heightMap.blockAt(this.scaler.fromDOM(n),this.heightOracle,0,0),this.scaler)}},{key:"docHeight",get:function(){return this.scaler.toDOM(this.heightMap.height)}},{key:"contentHeight",get:function(){return this.docHeight+this.paddingTop+this.paddingBottom}}]),t}(),Qk=Se(function t(n,e){Ce(this,t),this.from=n,this.to=e});function btt(t,n,e){var i=[],r=t,o=0;return Ho.spans(e,t,n,{span:function(){},point:function(s,a){s>r&&(i.push({from:r,to:s}),o+=s-r),r=a}},20),r=1)return i[i.length-1].to;for(var r=Math.floor(t.total*n),o=0;;o++){var s=i[o],a=s.from,l=s.to-a;if(r<=l)return a+r;r-=l}}function eD(t,n){var e,i=0,r=Re(t.ranges);try{for(r.s();!(e=r.n()).done;){var o=e.value,s=o.from,a=o.to;if(n<=a){i+=n-s;break}i+=a-s}}catch(l){r.e(l)}finally{r.f()}return i/t.total}var bhe={toDOM:function(t){return t},fromDOM:function(t){return t},scale:1},xtt=function(){function t(n,e,i){Ce(this,t);var r=0,o=0,s=0;this.viewports=i.map(function(u){var d=u.from,h=u.to,f=e.lineAt(d,Uo.ByPos,n,0,0).top,p=e.lineAt(h,Uo.ByPos,n,0,0).bottom;return r+=p-f,{from:d,to:h,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(e.height-r);var a,l=Re(this.viewports);try{for(l.s();!(a=l.n()).done;){var c=a.value;c.domTop=s+(c.top-o)*this.scale,s=c.domBottom=c.domTop+(c.bottom-c.top),o=c.bottom}}catch(u){l.e(u)}finally{l.f()}}return Se(t,[{key:"toDOM",value:function(n){for(var e=0,i=0,r=0;;e++){var o=e-1}}),l4=Dp.newName(),xhe=Dp.newName(),whe=Dp.newName(),Che={"&light":"."+xhe,"&dark":"."+whe};function c4(t,n,e){return new Dp(n,{finish:function(i){return/&/.test(i)?i.replace(/&\w*/,function(r){if("&"==r)return t;if(!e||!e[r])throw new RangeError("Unsupported selector: ".concat(r));return e[r]}):t+" "+i}})}var wtt=c4("."+l4,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Che),Ctt=Se(function t(n,e,i,r){Ce(this,t),this.typeOver=r,this.bounds=null,this.text="";var o=n.docView,s=o.impreciseHead,a=o.impreciseAnchor;if(n.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=n.docView.domBoundsAround(e,i,0))){var l=s||a?[]:function(f){var p=[];if(f.root.activeElement!=f.contentDOM)return p;var m=f.observer.selectionRange,g=m.anchorNode,v=m.anchorOffset,y=m.focusNode,b=m.focusOffset;return g&&(p.push(new Hde(g,v)),y==g&&b==v||p.push(new Hde(y,b))),p}(n),c=new Bde(l,n.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=function(f,p){if(0==f.length)return null;var m=f[0].pos,g=2==f.length?f[1].pos:m;return m>-1&&g>-1?Qt.single(m+p,g+p):null}(l,this.bounds.from)}else{var u=n.observer.selectionRange,d=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!q0(n.contentDOM,u.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(u.focusNode,u.focusOffset),h=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!q0(n.contentDOM,u.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(u.anchorNode,u.anchorOffset);this.newSel=Qt.single(h,d)}});function She(t,n){var e,i=n.newSel,r=t.state.selection.main;if(n.bounds){var o=n.bounds,s=o.from,a=o.to,l=r.from,c=null;(8===t.inputState.lastKeyCode&&t.inputState.lastKeyTime>Date.now()-100||Zn.android&&n.text.length0&&J>0&&R.charCodeAt(W-1)==U.charCodeAt(J-1);)W--,J--;return"end"==X&&(G-=W+Math.max(0,P-Math.min(W,J))-P),W=W?P-G:0)+(J-W),W=P):J=J?P-G:0)+(W-J),J=P),{from:P,toA:W,toB:J}}(t.state.doc.sliceString(s,a,"\uffff"),n.text,l-s,c);u&&(Zn.chrome&&13==t.inputState.lastKeyCode&&u.toB==u.from+2&&"\uffff\uffff"==n.text.slice(u.from,u.toB)&&u.toB--,e={from:s+u.from,to:s+u.toA,insert:ao.of(n.text.slice(u.from,u.toB).split("\uffff"))})}else i&&(!t.hasFocus&&t.state.facet(Jk)||i.main.eq(r))&&(i=null);if(!e&&!i)return!1;if(!e&&n.typeOver&&!r.empty&&i&&i.main.empty?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:e&&e.from>=r.from&&e.to<=r.to&&(e.from!=r.from||e.to!=r.to)&&r.to-r.from-(e.to-e.from)<=4?e={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,e.from).append(e.insert).append(t.state.doc.slice(e.to,r.to))}:(Zn.mac||Zn.android)&&e&&e.from==e.to&&e.from==r.head-1&&/^\. ?$/.test(e.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==e.insert.length&&(i=Qt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:ao.of([" "])}):Zn.chrome&&e&&e.from==e.to&&e.from==r.head&&"\n "==e.insert.toString()&&t.lineWrapping&&(i&&(i=Qt.single(i.main.anchor-1,i.main.head-1)),e={from:r.from,to:r.to,insert:ao.of([" "])}),e){var d=t.state;if(Zn.ios&&t.inputState.flushIOSKey(t)||Zn.android&&(e.from==r.from&&e.to==r.to&&1==e.insert.length&&2==e.insert.lines&&J0(t.contentDOM,"Enter",13)||e.from==r.from-1&&e.to==r.to&&0==e.insert.length&&J0(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&0==e.insert.length&&J0(t.contentDOM,"Delete",46)))return!0;var h,f=e.insert.toString();if(t.state.facet(Cde).some(function(R){return R(t,e.from,e.to,f)}))return!0;if(t.inputState.composing>=0&&t.inputState.composing++,e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){var p=r.frome.to?d.sliceDoc(e.to,r.to):"";h=d.replaceSelection(t.state.toText(p+e.insert.sliceString(0,void 0,t.state.lineBreak)+m))}else{var g=d.changes(e),v=i&&!d.selection.main.eq(i.main)&&i.main.to<=g.newLength?i.main:void 0;if(d.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){var y=t.state.sliceDoc(e.from,e.to),b=Gde(t)||t.state.doc.lineAt(r.head),C=r.to-e.to,k=r.to-r.from;h=d.changeByRange(function(R){if(R.from==r.from&&R.to==r.to)return{changes:g,range:v||R.map(g)};var U=R.to-C,G=U-y.length;if(R.to-R.from!=k||t.state.sliceDoc(G,U)!=y||b&&R.to>=b.from&&R.from<=b.to)return{range:R};var X=d.changes({from:G,to:U,insert:e.insert}),te=R.to-r.to;return{changes:X,range:v?Qt.range(Math.max(0,v.anchor+te),Math.max(0,v.head+te)):R.map(X)}})}else h={changes:g,selection:v&&d.selection.replaceRange(v)}}var D="input.type";return t.composing&&(D+=".compose",t.inputState.compositionFirstChange&&(D+=".start",t.inputState.compositionFirstChange=!1)),t.dispatch(h,{scrollIntoView:!0,userEvent:D}),!0}if(i&&!i.main.eq(r)){var L=!1,z="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(L=!0),z=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:L,userEvent:z}),!0}return!1}var Stt={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},u4=Zn.ie&&Zn.ie_version<=11,ktt=function(){function t(n){var e=this;Ce(this,t),this.view=n,this.active=!1,this.selectionRange=new Bet,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=n.contentDOM,this.observer=new MutationObserver(function(i){var r,o=Re(i);try{for(o.s();!(r=o.n()).done;)e.queue.push(r.value)}catch(a){o.e(a)}finally{o.f()}(Zn.ie&&Zn.ie_version<=11||Zn.ios&&n.composing)&&i.some(function(a){return"childList"==a.type&&a.removedNodes.length||"characterData"==a.type&&a.oldValue.length>a.target.nodeValue.length})?e.flushSoon():e.flush()}),u4&&(this.onCharData=function(i){e.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),e.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(function(){var i;(null===(i=e.view.docView)||void 0===i?void 0:i.lastUpdate)0&&i[i.length-1].intersectionRatio>0!=e.intersecting&&(e.intersecting=!e.intersecting,e.intersecting!=e.view.inView&&e.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(function(i){i.length>0&&i[i.length-1].intersectionRatio>0&&e.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}return Se(t,[{key:"onScrollChanged",value:function(n){this.view.inputState.runScrollHandlers(this.view,n),this.intersecting&&this.view.measure()}},{key:"onScroll",value:function(n){this.intersecting&&this.flush(!1),this.onScrollChanged(n)}},{key:"onResize",value:function(){var n=this;this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(function(){n.resizeTimeout=-1,n.view.requestMeasure()},50))}},{key:"onPrint",value:function(){var n=this;this.view.viewState.printing=!0,this.view.measure(),setTimeout(function(){n.view.viewState.printing=!1,n.view.requestMeasure()},500)}},{key:"updateGaps",value:function(n){if(this.gapIntersection&&(n.length!=this.gaps.length||this.gaps.some(function(o,s){return o!=n[s]}))){this.gapIntersection.disconnect();var e,i=Re(n);try{for(i.s();!(e=i.n()).done;)this.gapIntersection.observe(e.value)}catch(o){i.e(o)}finally{i.f()}this.gaps=n}}},{key:"onSelectionChange",value:function(n){var e=this.selectionChanged;if(this.readSelectionRange()&&!this.delayedAndroidKey){var i=this.view,r=this.selectionRange;if(i.state.facet(Jk)?i.root.activeElement==this.dom:Gk(i.dom,r)){var o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(n)?e||(this.selectionChanged=!1):(Zn.ie&&Zn.ie_version<=11||Zn.android&&Zn.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Wk(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}}}},{key:"readSelectionRange",value:function(){var n=this.view,e=Zn.safari&&11==n.root.nodeType&&function(r){for(var o=r.activeElement;o&&o.shadowRoot;)o=o.shadowRoot.activeElement;return o}(this.dom.ownerDocument)==this.dom&&function(r){var o=null;function s(f){f.preventDefault(),f.stopImmediatePropagation(),o=f.getTargetRanges()[0]}if(r.contentDOM.addEventListener("beforeinput",s,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",s,!0),!o)return null;var a=o.startContainer,l=o.startOffset,c=o.endContainer,u=o.endOffset,d=r.docView.domAtPos(r.state.selection.main.anchor);if(Wk(d.node,d.offset,c,u)){var h=[c,u,a,l];a=h[0],l=h[1],c=h[2],u=h[3]}return{anchorNode:a,anchorOffset:l,focusNode:c,focusOffset:u}}(this.view)||zk(n.root);if(!e||this.selectionRange.eq(e))return!1;var i=Gk(this.dom,e);return i&&!this.selectionChanged&&n.inputState.lastFocusTime>Date.now()-200&&n.inputState.lastTouchTime=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}},{key:"processRecords",value:function(){var n,e=this.queue,i=Re(this.observer.takeRecords());try{for(i.s();!(n=i.n()).done;)e.push(n.value)}catch(h){i.e(h)}finally{i.f()}e.length&&(this.queue=[]);var o,s=-1,a=-1,l=!1,c=Re(e);try{for(c.s();!(o=c.n()).done;){var d=this.readMutation(o.value);d&&(d.typeOver&&(l=!0),-1==s?(s=d.from,a=d.to):(s=Math.min(d.from,s),a=Math.max(d.to,a)))}}catch(h){c.e(h)}finally{c.f()}return{from:s,to:a,typeOver:l}}},{key:"readChange",value:function(){var n=this.processRecords(),e=n.from,i=n.to,r=n.typeOver,o=this.selectionChanged&&Gk(this.dom,this.selectionRange);return e<0&&!o?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new Ctt(this.view,e,i,r))}},{key:"flush",value:function(){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.readSelectionRange();var e=this.readChange();if(!e)return!1;var i=this.view.state,r=She(this.view,e);return this.view.state==i&&this.view.update([]),r}},{key:"readMutation",value:function(n){var e=this.view.docView.nearest(n.target);if(!e||e.ignoreMutation(n))return null;if(e.markDirty("attributes"==n.type),"attributes"==n.type&&(e.dirty|=4),"childList"==n.type){var i=khe(e,n.previousSibling||n.target.previousSibling,-1),r=khe(e,n.nextSibling||n.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==n.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:n.target.nodeValue==n.oldValue}:null}},{key:"setWindow",value:function(n){n!=this.win&&(this.removeWindowListeners(this.win),this.win=n,this.addWindowListeners(this.win))}},{key:"addWindowListeners",value:function(n){n.addEventListener("resize",this.onResize),n.addEventListener("beforeprint",this.onPrint),n.addEventListener("scroll",this.onScroll),n.document.addEventListener("selectionchange",this.onSelectionChange)}},{key:"removeWindowListeners",value:function(n){n.removeEventListener("scroll",this.onScroll),n.removeEventListener("resize",this.onResize),n.removeEventListener("beforeprint",this.onPrint),n.document.removeEventListener("selectionchange",this.onSelectionChange)}},{key:"destroy",value:function(){var n,e,i,r;this.stop(),null===(n=this.intersection)||void 0===n||n.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();var o,s=Re(this.scrollTargets);try{for(s.s();!(o=s.n()).done;)o.value.removeEventListener("scroll",this.onScroll)}catch(a){s.e(a)}finally{s.f()}this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}]),t}();function khe(t,n,e){for(;n;){var i=ys.get(n);if(i&&i.parent==t)return i;var r=n.parentNode;n=r!=t.dom?r:e>0?n.nextSibling:n.previousSibling}return null}var Wn=function(){function t(){var n=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,t),this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||function(s){return n.update([s])},this.dispatch=this.dispatch.bind(this),this._root=e.root||function Vet(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(e.parent)||document,this.viewState=new _he(e.state||Ao.create(e)),this.plugins=this.state.facet(Pb).map(function(s){return new Jj(s)});var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.update(this)}catch(s){r.e(s)}finally{r.f()}this.observer=new ktt(this),this.inputState=new stt(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new Ude(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}return Se(t,[{key:"state",get:function(){return this.viewState.state}},{key:"viewport",get:function(){return this.viewState.viewport}},{key:"visibleRanges",get:function(){return this.viewState.visibleRanges}},{key:"inView",get:function(){return this.viewState.inView}},{key:"composing",get:function(){return this.inputState.composing>0}},{key:"compositionStarted",get:function(){return this.inputState.composing>=0}},{key:"root",get:function(){return this._root}},{key:"win",get:function(){return this.dom.ownerDocument.defaultView||window}},{key:"dispatch",value:function(){var n;this._dispatch(1==arguments.length&&(arguments.length<=0?void 0:arguments[0])instanceof Yl?arguments.length<=0?void 0:arguments[0]:(n=this.state).update.apply(n,arguments))}},{key:"update",value:function(n){var e=this;if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");var i,r,o=!1,s=!1,a=this.state,l=Re(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;if(c.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=c.state}}catch(R){l.e(R)}finally{l.f()}if(this.destroyed)this.viewState.state=a;else{var u=this.hasFocus,d=0,h=null;n.some(function(R){return R.annotation(fhe)})?(this.inputState.notifiedFocused=u,d=1):u!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=u,(h=phe(a,u))||(d=1));var f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),((p=this.observer.readChange())&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(p=null)):this.observer.clear(),a.facet(Ao.phrases)!=this.state.facet(Ao.phrases))return this.setState(a);(i=Ide.create(this,a,n)).flags|=d;var m=this.viewState.scrollTarget;try{this.updateState=2;var g,v=Re(n);try{for(v.s();!(g=v.n()).done;){var y=g.value;if(m&&(m=m.map(y.changes)),y.scrollIntoView){var b=y.state.selection.main;m=new Tde(b.empty?b:Qt.cursor(b.head,b.head>b.anchor?-1:1))}var C,k=Re(y.effects);try{for(k.s();!(C=k.n()).done;){var D=C.value;D.is(Ede)&&(m=D.value)}}catch(R){k.e(R)}finally{k.f()}}}catch(R){v.e(R)}finally{v.f()}this.viewState.update(i,m),this.bidiCache=The.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),o=this.docView.update(i),this.state.facet(Rb)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(n),this.docView.updateSelection(o,n.some(function(R){return R.isUserEvent("select.pointer")}))}finally{this.updateState=0}if(i.startState.facet(tD)!=i.state.facet(tD)&&(this.viewState.mustMeasureContent=!0),(o||s||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!i.empty){var L,z=Re(this.state.facet(Xj));try{for(z.s();!(L=z.n()).done;)(0,L.value)(i)}catch(R){z.e(R)}finally{z.f()}}(h||p)&&Promise.resolve().then(function(){h&&e.state==h.startState&&e.dispatch(h),p&&!She(e,p)&&f.force&&J0(e.contentDOM,f.key,f.keyCode)})}}},{key:"setState",value:function(n){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)this.viewState.state=n;else{this.updateState=2;var e=this.hasFocus;try{var i,r=Re(this.plugins);try{for(r.s();!(i=r.n()).done;)i.value.destroy(this)}catch(a){r.e(a)}finally{r.f()}this.viewState=new _he(n),this.plugins=n.facet(Pb).map(function(a){return new Jj(a)}),this.pluginMap.clear();var o,s=Re(this.plugins);try{for(s.s();!(o=s.n()).done;)o.value.update(this)}catch(a){s.e(a)}finally{s.f()}this.docView=new Ude(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}}},{key:"updatePlugins",value:function(n){var e=n.startState.facet(Pb),i=n.state.facet(Pb);if(e!=i){var r,o=[],s=Re(i);try{for(s.s();!(r=s.n()).done;){var a=r.value,l=e.indexOf(a);if(l<0)o.push(new Jj(a));else{var c=this.plugins[l];c.mustUpdate=n,o.push(c)}}}catch(g){s.e(g)}finally{s.f()}var u,d=Re(this.plugins);try{for(d.s();!(u=d.n()).done;){var h=u.value;h.mustUpdate!=n&&h.destroy(this)}}catch(g){d.e(g)}finally{d.f()}this.plugins=o,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else{var f,p=Re(this.plugins);try{for(p.s();!(f=p.n()).done;)f.value.mustUpdate=n}catch(g){p.e(g)}finally{p.f()}}for(var m=0;m0&&void 0!==arguments[0])||arguments[0];if(!this.destroyed){this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();var i=null,r=this.scrollDOM,o=r.scrollHeight,s=r.scrollTop,l=s>o-r.clientHeight-4?o:s;try{for(var c=0;;c++){this.updateState=1;var u=this.viewport,d=this.viewState.lineBlockAtHeight(l),h=this.viewState.measure(this);if(!h&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}var f=[];if(!(4&h)){var p=[f,this.measureRequests];this.measureRequests=p[0],f=p[1]}var m=f.map(function(R){try{return R.read(n)}catch(U){return Ec(n.state,U),Dhe}}),g=Ide.create(this,this.state,[]),v=!1,y=!1;g.flags|=h,i?i.flags|=h:i=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),v=this.docView.update(g));for(var b=0;b1||k<-1)&&(this.scrollDOM.scrollTop+=k,y=!0)}if(v&&this.docView.updateSelection(!0),this.viewport.from==u.from&&this.viewport.to==u.to&&!y&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(i&&!i.empty){var D,L=Re(this.state.facet(Xj));try{for(L.s();!(D=L.n()).done;)(0,D.value)(i)}catch(R){L.e(R)}finally{L.f()}}}}},{key:"themeClasses",get:function(){return l4+" "+(this.state.facet(a4)?whe:xhe)+" "+this.state.facet(tD)}},{key:"updateAttrs",value:function(){var n=this,e=Ehe(this,Ade,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),i={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Jk)?"true":"false",class:"cm-content",style:"".concat(Zn.tabSize,": ").concat(this.state.tabSize),role:"textbox","aria-multiline":"true"};this.state.readOnly&&(i["aria-readonly"]="true"),Ehe(this,Kj,i);var r=this.observer.ignore(function(){var o=Gj(n.contentDOM,n.contentAttrs,i),s=Gj(n.dom,n.editorAttrs,e);return o||s});return this.editorAttrs=e,this.contentAttrs=i,r}},{key:"showAnnouncements",value:function(n){var e,i=!0,r=Re(n);try{for(r.s();!(e=r.n()).done;){var o,s=Re(e.value.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(t.announce)&&(i&&(this.announceDOM.textContent=""),i=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=a.value)}}catch(l){s.e(l)}finally{s.f()}}}catch(l){r.e(l)}finally{r.f()}}},{key:"mountStyles",value:function(){this.styleModules=this.state.facet(Rb),Dp.mount(this.root,this.styleModules.concat(wtt).reverse())}},{key:"readMeasured",value:function(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}},{key:"requestMeasure",value:function(n){var e=this;if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(function(){return e.measure()})),n){if(this.measureRequests.indexOf(n)>-1)return;if(null!=n.key)for(var i=0;ir.from?n.head-1:n.head):null;if(o){var s=t.dom.getBoundingClientRect(),a=t.textDirectionAt(r.from),l=t.posAtCoords({x:e==(a==rs.LTR)?s.right-1:s.left+1,y:(o.top+o.bottom)/2});if(null!=l)return Qt.cursor(l,e?-1:1)}var c=od.find(t.docView,n.head);return Qt.cursor(c?e?c.posAtEnd:c.posAtStart:e?r.to:r.from,e?-1:1)}(this,n,e,!(arguments.length>2&&void 0!==arguments[2])||arguments[2])}},{key:"moveVertically",value:function(n,e,i){return i4(this,n,function(r,o,s,a){var l=o.head,c=s?1:-1;if(l==(s?r.state.doc.length:0))return Qt.cursor(l,o.assoc);var u,d=o.goalColumn,h=r.contentDOM.getBoundingClientRect(),f=r.coordsAtPos(l),p=r.documentTop;if(f)null==d&&(d=f.left-h.left),u=c<0?f.top:f.bottom;else{var m=r.viewState.lineBlockAt(l);null==d&&(d=Math.min(h.right-h.left,r.defaultCharacterWidth*(l-m.from))),u=(c<0?m.top:m.bottom)+p}for(var g=h.left+d,v=a??r.defaultLineHeight>>1,y=0;;y+=10){var b=u+(v+y)*c,C=Jde(r,{x:g,y:b},!1,c);if(bh.bottom||(c<0?Cl))return Qt.cursor(C,o.assoc,void 0,d)}}(this,n,e,i))}},{key:"domAtPos",value:function(n){return this.docView.domAtPos(n)}},{key:"posAtDOM",value:function(n){return this.docView.posFromDOM(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)}},{key:"posAtCoords",value:function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return this.readMeasured(),Jde(this,n,e)}},{key:"coordsAtPos",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.readMeasured();var i=this.docView.coordsAt(n,e);if(!i||i.left==i.right)return i;var r=this.state.doc.lineAt(n),o=this.bidiSpans(r);return Nj(i,o[Q0.find(o,n-r.from,-1,e)].dir==rs.LTR==e>0)}},{key:"defaultCharacterWidth",get:function(){return this.viewState.heightOracle.charWidth}},{key:"defaultLineHeight",get:function(){return this.viewState.heightOracle.lineHeight}},{key:"textDirection",get:function(){return this.viewState.defaultTextDirection}},{key:"textDirectionAt",value:function(n){return!this.state.facet(kde)||nthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(n))}},{key:"lineWrapping",get:function(){return this.viewState.heightOracle.lineWrapping}},{key:"bidiSpans",value:function(n){if(n.length>Dtt)return Lde(n.length);var e,i=this.textDirectionAt(n.from),r=Re(this.bidiCache);try{for(r.s();!(e=r.n()).done;){var o=e.value;if(o.from==n.from&&o.dir==i)return o.order}}catch(a){r.e(a)}finally{r.f()}var s=function(a,l){var c=a.length,u=l==Qj?1:2,d=l==Qj?2:1;if(!a||1==u&&!Yet.test(a))return Lde(c);for(var h=0,f=u,p=u;h=0;te-=3)if(ph[te+1]==-z){var P=ph[te+2],W=2&P?u:4&P?1&P?d:u:0;W&&(os[U]=os[ph[te]]=W),G=te;break}}else{if(189==ph.length)break;ph[G++]=U,ph[G++]=L,ph[G++]=X}else if(2==(R=os[U])||1==R){var J=R==u;X=J?0:1;for(var H=G-3;H>=0;H-=3){var le=ph[H+2];if(2&le)break;if(J)ph[H+2]|=2;else{if(4&le)break;ph[H+2]|=4}}}for(var E=0;EOe;){for(var Le=Xe,rt=2!=os[--Xe];Xe>Oe&&rt==(2!=os[Xe-1]);)Xe--;re.push(new Q0(Xe,Le,rt?2:1))}else re.push(new Q0(Oe,he,0))}else for(var B=0;BDate.now()-3e4)&&this.root.activeElement==this.contentDOM}},{key:"focus",value:function(){var n=this;this.observer.ignore(function(){ede(n.contentDOM),n.docView.updateSelection()})}},{key:"setRoot",value:function(n){this._root!=n&&(this._root=n,this.observer.setWindow((9==n.nodeType?n:n.ownerDocument).defaultView||window),this.mountStyles())}},{key:"destroy",value:function(){var n,e=Re(this.plugins);try{for(e.s();!(n=e.n()).done;)n.value.destroy(this)}catch(i){e.e(i)}finally{e.f()}this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}}],[{key:"scrollIntoView",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ede.of(new Tde("number"==typeof n?Qt.cursor(n):n,e.y,e.x,e.yMargin,e.xMargin))}},{key:"domEventHandlers",value:function(n){return wa.define(function(){return{}},{eventHandlers:n})}},{key:"theme",value:function(n,e){var i=Dp.newName(),r=[tD.of(i),Rb.of(c4(".".concat(i),n))];return e&&e.dark&&r.push(a4.of(!0)),r}},{key:"baseTheme",value:function(n){return G0.lowest(Rb.of(c4("."+l4,n,Che)))}},{key:"findFromDOM",value:function(n){var e,i=n.querySelector(".cm-content");return(null===(e=(i&&ys.get(i)||ys.get(n))?.rootView)||void 0===e?void 0:e.view)||null}}]),t}();Wn.styleModule=Rb,Wn.inputHandler=Cde,Wn.focusChangeEffect=Sde,Wn.perLineTextDirection=kde,Wn.exceptionSink=wde,Wn.updateListener=Xj,Wn.editable=Jk,Wn.mouseSelectionStyle=xde,Wn.dragMovesSelection=bde,Wn.clickAddsSelectionRange=_de,Wn.decorations=jb,Wn.atomicRanges=Mde,Wn.scrollMargins=Ode,Wn.darkTheme=a4,Wn.contentAttributes=Kj,Wn.editorAttributes=Ade,Wn.lineWrapping=Wn.contentAttributes.of({class:"cm-lineWrapping"}),Wn.announce=cr.define();var Dtt=4096,Dhe={},The=function(){function t(n,e,i,r){Ce(this,t),this.from=n,this.to=e,this.dir=i,this.order=r}return Se(t,null,[{key:"update",value:function(n,e){if(e.empty)return n;for(var i=[],r=n.length?n[n.length-1].dir:rs.LTR,o=Math.max(0,n.length-10);o=0;r--){var o=i[r],s="function"==typeof o?o(t):o;s&&Uj(s,e)}return e}var Ttt=Zn.mac?"mac":Zn.windows?"win":Zn.linux?"linux":"key";function nD(t,n,e){return n.altKey&&(t="Alt-"+t),n.ctrlKey&&(t="Ctrl-"+t),n.metaKey&&(t="Meta-"+t),!1!==e&&n.shiftKey&&(t="Shift-"+t),t}var Att=G0.default(Wn.domEventHandlers({keydown:function(t,n){return Ohe(Mhe(n.state),t,n,"editor")}})),iD=Qn.define({enables:Att}),Ahe=new WeakMap;function Mhe(t){var n=t.facet(iD),e=Ahe.get(n);return e||Ahe.set(n,e=function(i){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ttt,s=Object.create(null),a=Object.create(null),l=function(D,L){var z=a[D];if(null==z)a[D]=L;else if(z!=L)throw new Error("Key binding "+D+" is used both as a regular binding and as a multi-stroke prefix")},c=function(D,L,z,R){for(var U,G,X=s[D]||(s[D]=Object.create(null)),te=L.split(/ (?!$)/).map(function(le){return function Ett(t,n){var e,i,r,o,s=t.split(/-(?!$)/),a=s[s.length-1];"Space"==a&&(a=" ");for(var l=0;l=t.viewport.to)return[];var i=Math.max(e.from,t.viewport.from),r=Math.min(e.to,t.viewport.to),o=t.textDirection==rs.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=Ihe(t),c=window.getComputedStyle(s.firstChild),u=a.left+parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)),d=a.right-parseInt(c.paddingRight),h=Fhe(t,i),f=Fhe(t,r),p=h.type==go.Text?h:null,m=f.type==go.Text?f:null;if(t.lineWrapping&&(p&&(p=Nhe(t,i,p)),m&&(m=Nhe(t,r,m))),p&&m&&p.from==m.from)return C(k(e.from,e.to,p));var g=p?k(e.from,null,p):D(h,!1),v=m?k(null,e.to,m):D(f,!0),y=[];return(p||h).to<(m||f).from-1?y.push(b(u,g.bottom,d,v.top)):g.bottomW&&le.from=I)break;Oe>E&&te(Math.max(he,E),null==L&&he<=W,Math.min(Oe,I),null==z&&Oe>=J,re.dir)}}catch(_e){V.e(_e)}finally{V.f()}if((E=q.to+1)>=I)break}}}catch(_e){H.e(_e)}finally{H.f()}return 0==X.length&&te(W,null==L,J,null==z,t.textDirection),{top:U,bottom:G,horizontal:X}}function D(L,z){var R=a.top+(z?L.top:L.bottom);return{top:R,bottom:R,horizontal:[]}}}(n,e,i)}}]),t}();function Ihe(t){var n=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==rs.LTR?n.left:n.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:n.top-t.scrollDOM.scrollTop}}function Nhe(t,n,e){var i=Qt.cursor(n);return{from:Math.max(e.from,t.moveToLineBoundary(i,!1,!0).from),to:Math.min(e.to,t.moveToLineBoundary(i,!0,!0).from),type:go.Text}}function Fhe(t,n){var e=t.lineBlockAt(n);if(Array.isArray(e.type)){var i,r=Re(e.type);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.to>n||o.to==n&&(o.to==e.to||o.type==go.Text))return o}}catch(s){r.e(s)}finally{r.f()}}return e}var Ott=function(){function t(n,e){Ce(this,t),this.view=n,this.layer=e,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=n.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(n.state),n.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,n)}return Se(t,[{key:"update",value:function(n){n.startState.facet(rD)!=n.state.facet(rD)&&this.setOrder(n.state),(this.layer.update(n,this.dom)||n.geometryChanged)&&n.view.requestMeasure(this.measureReq)}},{key:"setOrder",value:function(n){for(var e=0,i=n.facet(rD);e0&&void 0!==arguments[0]?arguments[0]:{}),Ntt,Ftt,Ptt,Dde.of(!0)]}function Rhe(t){return t.startState.facet($b)!=t.state.facet($b)}var Ntt=Phe({above:!0,markers:function(t){var n,e=t.state,i=e.facet($b),r=[],o=Re(e.selection.ranges);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=s==e.selection.main;if(s.empty?!a||jhe:i.drawRangeCursor){var l,c=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",u=s.empty?s:Qt.cursor(s.head,s.head>s.anchor?-1:1),d=Re(d4.forRange(t,c,u));try{for(d.s();!(l=d.n()).done;)r.push(l.value)}catch(f){d.e(f)}finally{d.f()}}}}catch(f){o.e(f)}finally{o.f()}return r},update:function(t,n){t.transactions.some(function(i){return i.selection})&&(n.style.animationName="cm-blink"==n.style.animationName?"cm-blink2":"cm-blink");var e=Rhe(t);return e&&Lhe(t.state,n),t.docChanged||t.selectionSet||e},mount:function(t,n){Lhe(n.state,t)},class:"cm-cursorLayer"});function Lhe(t,n){n.style.animationDuration=t.facet($b).cursorBlinkRate+"ms"}var Ftt=Phe({above:!1,markers:function(t){return t.state.selection.ranges.map(function(n){return n.empty?[]:d4.forRange(t,"cm-selectionBackground",n)}).reduce(function(n,e){return n.concat(e)})},update:function(t,n){return t.docChanged||t.selectionSet||t.viewportChanged||Rhe(t)},class:"cm-selectionLayer"}),$he={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};jhe&&($he[".cm-line"].caretColor="transparent !important");var Ptt=G0.highest(Wn.theme($he)),Bhe=cr.define({map:function(t,n){return null==t?null:n.mapPos(t)}}),Bb=Ba.define({create:function(){return null},update:function(t,n){return null!=t&&(t=n.changes.mapPos(t)),n.effects.reduce(function(e,i){return i.is(Bhe)?i.value:e},t)}}),jtt=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}return Se(t,[{key:"update",value:function(n){var e,i=n.state.field(Bb);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(Bb)!=i||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}},{key:"readPos",value:function(){var n=this.view.state.field(Bb),e=null!=n&&this.view.coordsAtPos(n);if(!e)return null;var i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}},{key:"drawCursor",value:function(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}},{key:"destroy",value:function(){this.cursor&&this.cursor.remove()}},{key:"setDropPos",value:function(n){this.view.state.field(Bb)!=n&&this.view.dispatch({effects:Bhe.of(n)})}}]),t}(),{eventHandlers:{dragover:function(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave:function(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend:function(){this.setDropPos(null)},drop:function(){this.setDropPos(null)}}});function Vhe(t,n,e,i,r){n.lastIndex=0;for(var o,s=t.iterRange(e,i),a=e;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=n.exec(s.value);)r(a+o.index,o)}var Rtt=function(){function t(n){Ce(this,t);var e=n.regexp,i=n.decoration,r=n.decorate,o=n.boundary,s=n.maxLength,a=void 0===s?1e3:s;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=function(l,c,u,d){return r(d,u,u+l[0].length,l,c)};else if("function"==typeof i)this.addMatch=function(l,c,u,d){var h=i(l,c,u);h&&d(u,u+l[0].length,h)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=function(l,c,u,d){return d(u,u+l[0].length,i)}}this.boundary=o,this.maxLength=a}return Se(t,[{key:"createDeco",value:function(n){var e,i=this,r=new ug,o=r.add.bind(r),s=Re(function(u,d){var h=u.visibleRanges;if(1==h.length&&h[0].from==u.viewport.from&&h[0].to==u.viewport.to)return h;var f,p=[],m=Re(h);try{for(m.s();!(f=m.n()).done;){var g=f.value,v=g.from,y=g.to;v=Math.max(u.state.doc.lineAt(v).from,v-d),y=Math.min(u.state.doc.lineAt(y).to,y+d),p.length&&p[p.length-1].to>=v?p[p.length-1].to=y:p.push({from:v,to:y})}}catch(b){m.e(b)}finally{m.f()}return p}(n,this.maxLength));try{for(s.s();!(e=s.n()).done;){var a=e.value;Vhe(n.state.doc,this.regexp,a.from,a.to,function(u,d){return i.addMatch(d,n,u,o)})}}catch(u){s.e(u)}finally{s.f()}return r.finish()}},{key:"updateDeco",value:function(n,e){var i=1e9,r=-1;return n.docChanged&&n.changes.iterChanges(function(o,s,a,l){l>n.view.viewport.from&&a1e3?this.createDeco(n.view):r>-1?this.updateRange(n.view,e.map(n.changes),i,r):e}},{key:"updateRange",value:function(n,e,i,r){var o,s=this,a=Re(n.visibleRanges);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=Math.max(l.from,i),u=Math.min(l.to,r);u>c&&function(){var d=n.state.doc.lineAt(c),h=d.tod.from;c--)if(s.boundary.test(d.text[c-1-d.from])){f=c;break}for(;up},add:m})}()}}catch(d){a.e(d)}finally{a.f()}return e}}]),t}(),h4=null!=/x/.unicode?"gu":"g",Ltt=new RegExp("[\0-\b\n-\x1f\x7f-\x9f\xad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]",h4),$tt={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"},f4=null,oD=Qn.define({combine:function(t){var n=lu(t,{render:null,specialChars:Ltt,addSpecialChars:null});return(n.replaceTabs=!function(){var e;if(null==f4&&typeof document<"u"&&document.body){var i=document.body.style;f4=null!=(null!==(e=i.tabSize)&&void 0!==e?e:i.MozTabSize)}return f4||!1}())&&(n.specialChars=new RegExp("\t|"+n.specialChars.source,h4)),n.addSpecialChars&&(n.specialChars=new RegExp(n.specialChars.source+"|"+n.addSpecialChars.source,h4)),n}});function Btt(){return[oD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Hhe||(Hhe=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.decorations=mi.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(oD)),this.decorations=this.decorator.createDeco(n)}return Se(t,[{key:"makeDecorator",value:function(n){var e=this;return new Rtt({regexp:n.specialChars,decoration:function(i,r,o){var s=r.state.doc,a=$a(i[0],0);if(9==a){var l=s.lineAt(o),c=r.state.tabSize,u=Ab(l.text,c,o-l.from);return mi.replace({widget:new Utt((c-u%c)*e.view.defaultCharacterWidth)})}return e.decorationCache[a]||(e.decorationCache[a]=mi.replace({widget:new Htt(n,a)}))},boundary:n.replaceTabs?void 0:/[^]/})}},{key:"update",value:function(n){var e=n.state.facet(oD);n.startState.facet(oD)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}}]),t}(),{decorations:function(t){return t.decorations}}))]}var Hhe=null,Htt=function(t){wt(e,Ep);var n=Ct(e);function e(i,r){var o;return Ce(this,e),(o=n.call(this)).options=i,o.code=r,o}return Se(e,[{key:"eq",value:function(i){return i.code==this.code}},{key:"toDOM",value:function(i){var l,r=(l=this.code)>=32?"\u2022":10==l?"\u2424":String.fromCharCode(9216+l),o=i.state.phrase("Control character")+" "+($tt[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,o,r);if(s)return s;var a=document.createElement("span");return a.textContent=r,a.title=o,a.setAttribute("aria-label",o),a.className="cm-specialChar",a}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),Utt=function(t){wt(e,Ep);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).width=i,r}return Se(e,[{key:"eq",value:function(i){return i.width==this.width}},{key:"toDOM",value:function(){var i=document.createElement("span");return i.textContent="\t",i.className="cm-tab",i.style.width=this.width+"px",i}},{key:"ignoreEvent",value:function(){return!1}}]),e}(),ztt=mi.line({class:"cm-activeLine"}),Gtt=wa.fromClass(function(){function t(n){Ce(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e,i=-1,r=[],o=Re(n.state.selection.ranges);try{for(o.s();!(e=o.n()).done;){var a=n.lineBlockAt(e.value.head);a.from>i&&(r.push(ztt.range(a.from)),i=a.from)}}catch(l){o.e(l)}finally{o.f()}return mi.set(r)}}]),t}(),{decorations:function(t){return t.decorations}});function Uhe(t,n){var s,a,l,e=t.posAtCoords({x:n.clientX,y:n.clientY},!1),i=t.state.doc.lineAt(e),r=e-i.from,o=r>2e3?-1:r==i.length?(a=n.clientX,(l=(s=t).coordsAtPos(s.viewport.from))?Math.round(Math.abs((l.left-a)/s.defaultCharacterWidth)):-1):Ab(i.text,t.state.tabSize,e-i.from);return{line:i.number,col:o,off:r}}function qtt(t){var n=t?.eventFilter||function(e){return e.altKey&&0==e.button};return Wn.mouseSelectionStyle.of(function(e,i){return n(i)?function Wtt(t,n){var e=Uhe(t,n),i=t.state.selection;return e?{update:function(r){if(r.docChanged){var o=r.changes.mapPos(r.startState.doc.line(e.line).from),s=r.state.doc.lineAt(o);e={line:s.number,col:e.col,off:Math.min(e.off,s.length)},i=i.map(r.changes)}},get:function(r,o,s){var a=Uhe(t,r);if(!a)return i;var l=function(c,u,d){var h=Math.min(u.line,d.line),f=Math.max(u.line,d.line),p=[];if(u.off>2e3||d.off>2e3||u.col<0||d.col<0)for(var m=Math.min(u.off,d.off),g=Math.max(u.off,d.off),v=h;v<=f;v++){var y=c.doc.line(v);y.length<=g&&p.push(Qt.range(y.from+m,y.to+g))}else for(var b=Math.min(u.col,d.col),C=Math.max(u.col,d.col),k=h;k<=f;k++){var D=c.doc.line(k),L=Mj(D.text,b,c.tabSize,!0);if(L<0)p.push(Qt.cursor(D.to));else{var z=Mj(D.text,C,c.tabSize);p.push(Qt.range(D.from+L,D.from+z))}}return p}(t.state,e,a);return l.length?Qt.create(s?l.concat(i.ranges):l):i}}:null}(e,i):null})}var Ytt={Alt:[18,function(t){return t.altKey}],Control:[17,function(t){return t.ctrlKey}],Shift:[16,function(t){return t.shiftKey}],Meta:[91,function(t){return t.metaKey}]},Xtt={style:"cursor: crosshair"};function Jtt(){var n=zn(Ytt[(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).key||"Alt"],2),e=n[0],i=n[1],r=wa.fromClass(function(){function o(s){Ce(this,o),this.view=s,this.isDown=!1}return Se(o,[{key:"set",value:function(s){this.isDown!=s&&(this.isDown=s,this.view.update([]))}}]),o}(),{eventHandlers:{keydown:function(o){this.set(o.keyCode==e||i(o))},keyup:function(o){o.keyCode!=e&&i(o)||this.set(!1)},mousemove:function(o){this.set(i(o))}}});return[r,Wn.contentAttributes.of(function(o){var s;return null!==(s=o.plugin(r))&&void 0!==s&&s.isDown?Xtt:null})]}var zhe=function(){function t(n,e,i){Ce(this,t),this.facet=e,this.createTooltipView=i,this.input=n.state.facet(e),this.tooltips=this.input.filter(function(r){return r}),this.tooltipViews=this.tooltips.map(i)}return Se(t,[{key:"update",value:function(n){var e,i=n.state.facet(this.facet),r=i.filter(function(y){return y});if(i===this.input){var o,s=Re(this.tooltipViews);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.update&&a.update(n)}}catch(y){s.e(y)}finally{s.f()}return!1}for(var l=[],c=0;ce.lastTransaction-50&&r.length>0&&r[r.length-1].intersectionRatio<1&&e.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),n.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}return Se(t,[{key:"createContainer",value:function(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}},{key:"observeIntersection",value:function(){if(this.intersectionObserver){this.intersectionObserver.disconnect();var n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)this.intersectionObserver.observe(n.value.dom)}catch(r){e.e(r)}finally{e.f()}}}},{key:"measureSoon",value:function(){var n=this;this.measureTimeout<0&&(this.measureTimeout=setTimeout(function(){n.measureTimeout=-1,n.maybeMeasure()},50))}},{key:"update",value:function(n){n.transactions.length&&(this.lastTransaction=Date.now());var e=this.manager.update(n);e&&this.observeIntersection();var i=e||n.geometryChanged,r=n.state.facet(p4);if(r.position!=this.position){this.position=r.position;var o,s=Re(this.manager.tooltipViews);try{for(s.s();!(o=s.n()).done;)o.value.dom.style.position=this.position}catch(u){s.e(u)}finally{s.f()}i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();var a,l=Re(this.manager.tooltipViews);try{for(l.s();!(a=l.n()).done;)this.container.appendChild(a.value.dom)}catch(u){l.e(u)}finally{l.f()}i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}},{key:"createTooltip",value:function(n){var e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){var i=document.createElement("div");i.className="cm-tooltip-arrow",e.dom.appendChild(i)}return e.dom.style.position=this.position,e.dom.style.top="-10000px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}},{key:"destroy",value:function(){var n,e;this.view.win.removeEventListener("resize",this.measureSoon);var i,r=Re(this.manager.tooltipViews);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.remove(),null===(n=o.destroy)||void 0===n||n.call(o)}}catch(s){r.e(s)}finally{r.f()}null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}},{key:"readMeasure",value:function(){var n=this,e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map(function(i,r){var o=n.manager.tooltipViews[r];return o.getCoords?o.getCoords(i.pos):n.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(function(i){return i.dom.getBoundingClientRect()}),space:this.view.state.facet(p4).tooltipSpace(this.view)}}},{key:"writeMeasure",value:function(n){for(var e,i=n.editor,r=n.space,o=[],s=0;s=Math.min(i.bottom,r.bottom)||u.rightMath.min(i.right,r.right)+.1)c.style.top="-10000px";else{var h=a.arrow?l.dom.querySelector(".cm-tooltip-arrow"):null,f=h?7:0,p=d.right-d.left,m=null!==(e=Ghe.get(l))&&void 0!==e?e:d.bottom-d.top,g=l.offset||Ztt,v=this.view.textDirection==rs.LTR,y=d.width>r.right-r.left?v?r.left:r.right-d.width:v?Math.min(u.left-(h?14:0)+g.x,r.right-p):Math.max(r.left,u.left-p+(h?14:0)-g.x),b=!!a.above;!a.strictSide&&(b?u.top-(d.bottom-d.top)-g.yr.bottom)&&b==r.bottom-u.bottom>u.top-r.top&&(b=!b);var C=(b?u.top-r.top:r.bottom-u.bottom)-f;if(Cy&&R.topk&&(k=b?R.top-m-2-f:R.bottom+f+2)}}catch(U){z.e(U)}finally{z.f()}}"absolute"==this.position?(c.style.top=k-n.parent.top+"px",c.style.left=y-n.parent.left+"px"):(c.style.top=k+"px",c.style.left=y+"px"),h&&(h.style.left="".concat(u.left+(v?g.x:-g.x)-(y+14-7),"px")),!0!==l.overlap&&o.push({left:y,top:k,right:D,bottom:k+m}),c.classList.toggle("cm-tooltip-above",b),c.classList.toggle("cm-tooltip-below",!b),l.positioned&&l.positioned(n.space)}}}},{key:"maybeMeasure",value:function(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView))){var n,e=Re(this.manager.tooltipViews);try{for(e.s();!(n=e.n()).done;)n.value.dom.style.top="-10000px"}catch(i){e.e(i)}finally{e.f()}}}}]),t}(),{eventHandlers:{scroll:function(){this.maybeMeasure()}}}),Qtt=Wn.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"".concat(7,"px"),width:"".concat(14,"px"),position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"".concat(7,"px solid transparent"),borderRight:"".concat(7,"px solid transparent")},".cm-tooltip-above &":{bottom:"-".concat(7,"px"),"&:before":{borderTop:"".concat(7,"px solid #bbb")},"&:after":{borderTop:"".concat(7,"px solid #f5f5f5"),bottom:"1px"}},".cm-tooltip-below &":{top:"-".concat(7,"px"),"&:before":{borderBottom:"".concat(7,"px solid #bbb")},"&:after":{borderBottom:"".concat(7,"px solid #f5f5f5"),top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Ztt={x:0,y:0},sD=Qn.define({enables:[Whe,Qtt]}),aD=Qn.define(),ent=function(){function t(n){var e=this;Ce(this,t),this.view=n,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new zhe(n,aD,function(i){return e.createHostedView(i)})}return Se(t,[{key:"createHostedView",value:function(n){var e=n.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}},{key:"mount",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.mount&&r.mount(n)}}catch(o){i.e(o)}finally{i.f()}this.mounted=!0}},{key:"positioned",value:function(n){var e,i=Re(this.manager.tooltipViews);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.positioned&&r.positioned(n)}}catch(o){i.e(o)}finally{i.f()}}},{key:"update",value:function(n){this.manager.update(n)}}],[{key:"create",value:function(n){return new t(n)}}]),t}(),tnt=sD.compute([aD],function(t){var n=t.facet(aD).filter(function(e){return e});return 0===n.length?null:{pos:Math.min.apply(Math,ri(n.map(function(e){return e.pos}))),end:Math.max.apply(Math,ri(n.filter(function(e){return null!=e.end}).map(function(e){return e.end}))),create:ent.create,above:n[0].above,arrow:n.some(function(e){return e.arrow})}}),nnt=function(){function t(n,e,i,r,o){Ce(this,t),this.view=n,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:n.dom,time:0},this.checkHover=this.checkHover.bind(this),n.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),n.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}return Se(t,[{key:"update",value:function(){var n=this;this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(function(){return n.startHover()},20))}},{key:"active",get:function(){return this.view.state.field(this.field)}},{key:"checkHover",value:function(){if(this.hoverTimeout=-1,!this.active){var n=Date.now()-this.lastMove.time;nr.bottom||e.xr.right+this.view.defaultCharacterWidth)){var o=this.view.bidiSpans(this.view.state.doc.lineAt(i)).find(function(c){return c.from<=i&&c.to>=i}),s=o&&o.dir==rs.RTL?-1:1,a=this.source(this.view,i,e.x1&&void 0!==arguments[1]?arguments[1]:{},e=cr.define(),i=Ba.define({create:function(){return null},update:function(r,o){if(r&&(n.hideOnChange&&(o.docChanged||o.selection)||n.hideOn&&n.hideOn(o,r)))return null;if(r&&o.docChanged){var s=o.changes.mapPos(r.pos,-1,Tl.TrackDel);if(null==s)return null;var a=Object.assign(Object.create(null),r);a.pos=s,null!=r.end&&(a.end=o.changes.mapPos(r.end)),r=a}var l,c=Re(o.effects);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.is(e)&&(r=u.value),u.is(ont)&&(r=null)}}catch(d){c.e(d)}finally{c.f()}return r},provide:function(r){return aD.from(r)}});return[i,wa.define(function(r){return new nnt(r,t,i,e,n.hoverTime||300)}),tnt]}var ont=cr.define(),Yhe=Qn.define({combine:function(t){var n,e,i,r=Re(t);try{for(r.s();!(i=r.n()).done;){var o=i.value;n=n||o.topContainer,e=e||o.bottomContainer}}catch(s){r.e(s)}finally{r.f()}return{topContainer:n,bottomContainer:e}}});function Vb(t,n){var e=t.plugin(Xhe),i=e?e.specs.indexOf(n):-1;return i>-1?e.panels[i]:null}var Xhe=wa.fromClass(function(){function t(n){Ce(this,t),this.input=n.state.facet(Hb),this.specs=this.input.filter(function(s){return s}),this.panels=this.specs.map(function(s){return s(n)});var e=n.state.facet(Yhe);this.top=new lD(n,!0,e.topContainer),this.bottom=new lD(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(function(s){return s.top})),this.bottom.sync(this.panels.filter(function(s){return!s.top}));var i,r=Re(this.panels);try{for(r.s();!(i=r.n()).done;){var o=i.value;o.dom.classList.add("cm-panel"),o.mount&&o.mount()}}catch(s){r.e(s)}finally{r.f()}}return Se(t,[{key:"update",value:function(n){var e=n.state.facet(Yhe);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new lD(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new lD(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();var i=n.state.facet(Hb);if(i!=this.input){var r,o=i.filter(function(C){return C}),s=[],a=[],l=[],c=[],u=Re(o);try{for(u.s();!(r=u.n()).done;){var d=r.value,h=this.specs.indexOf(d),f=void 0;h<0?(f=d(n.view),c.push(f)):(f=this.panels[h]).update&&f.update(n),s.push(f),(f.top?a:l).push(f)}}catch(C){u.e(C)}finally{u.f()}this.specs=o,this.panels=s,this.top.sync(a),this.bottom.sync(l);for(var p=0,m=c;pthis.i;){var e=n.elements.pop();n.dom.removeChild(e.dom),e.destroy()}}}]),t}(),tfe=function(){function t(n,e){var i=this;Ce(this,t),this.view=n,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");var r=function(s){i.dom.addEventListener(s,function(a){var l,c=a.target;if(c!=i.dom&&i.dom.contains(c)){for(;c.parentNode!=i.dom;)c=c.parentNode;var u=c.getBoundingClientRect();l=(u.top+u.bottom)/2}else l=a.clientY;var d=n.lineBlockAtHeight(l-n.documentTop);e.domEventHandlers[s](n,d,a)&&a.preventDefault()})};for(var o in e.domEventHandlers)r(o);this.markers=Zhe(e.markers(n)),e.initialSpacer&&(this.spacer=new nfe(n,0,0,[e.initialSpacer(n)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}return Se(t,[{key:"update",value:function(n){var e=this.markers;if(this.markers=Zhe(this.config.markers(n.view)),this.spacer&&this.config.updateSpacer){var i=this.config.updateSpacer(this.spacer.markers[0],n);i!=this.spacer.markers[0]&&this.spacer.update(n.view,0,0,[i])}var r=n.view.viewport;return!Ho.eq(this.markers,e,r.from,r.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(n)}},{key:"destroy",value:function(){var n,e=Re(this.elements);try{for(e.s();!(n=e.n()).done;)n.value.destroy()}catch(i){e.e(i)}finally{e.f()}}}]),t}(),nfe=function(){function t(n,e,i,r){Ce(this,t),this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(n,e,i,r)}return Se(t,[{key:"update",value:function(n,e,i,r){this.height!=e&&(this.dom.style.height=(this.height=e)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(o,s){if(o.length!=s.length)return!1;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Qhe(),unt]}function ife(t){for(var n=9;ni&&(i=s,e.push(hnt.range(s)))}}catch(a){r.e(a)}finally{r.f()}return Ho.of(e)}),pnt=0,y4=Se(function t(n,e){Ce(this,t),this.from=n,this.to=e}),pr=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,t),this.id=pnt++,this.perNode=!!n.perNode,this.deserialize=n.deserialize||function(){throw new Error("This node type doesn't define a deserialize function")}}return Se(t,[{key:"add",value:function(n){var e=this;if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof n&&(n=cu.match(n)),function(i){var r=n(i);return void 0===r?null:[e,r]}}}]),t}();pr.closedBy=new pr({deserialize:function(t){return t.split(" ")}}),pr.openedBy=new pr({deserialize:function(t){return t.split(" ")}}),pr.group=new pr({deserialize:function(t){return t.split(" ")}}),pr.contextHash=new pr({perNode:!0}),pr.lookAhead=new pr({perNode:!0}),pr.mounted=new pr({perNode:!0});var mnt=Object.create(null),cu=function(){function t(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;Ce(this,t),this.name=n,this.props=e,this.id=i,this.flags=r}return Se(t,[{key:"prop",value:function(n){return this.props[n.id]}},{key:"isTop",get:function(){return(1&this.flags)>0}},{key:"isSkipped",get:function(){return(2&this.flags)>0}},{key:"isError",get:function(){return(4&this.flags)>0}},{key:"isAnonymous",get:function(){return(8&this.flags)>0}},{key:"is",value:function(n){if("string"==typeof n){if(this.name==n)return!0;var e=this.prop(pr.group);return!!e&&e.indexOf(n)>-1}return this.id==n}}],[{key:"define",value:function(n){var e=n.props&&n.props.length?Object.create(null):mnt,r=new t(n.name||"",e,n.id,(n.top?1:0)|(n.skipped?2:0)|(n.error?4:0)|(null==n.name?8:0));if(n.props){var o,s=Re(n.props);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(Array.isArray(a)||(a=a(r)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[a[0].id]=a[1]}}}catch(l){s.e(l)}finally{s.f()}}return r}},{key:"match",value:function(n){var e=Object.create(null);for(var i in n){var r,o=Re(i.split(" "));try{for(o.s();!(r=o.n()).done;)e[r.value]=n[i]}catch(a){o.e(a)}finally{o.f()}}return function(a){for(var l=a.prop(pr.group),c=-1;c<(l?l.length:0);c++){var u=e[c<0?a.name:l[c]];if(u)return u}}}}]),t}();cu.none=new cu("",Object.create(null),0,8);var Ha,gnt=function(){function t(n){Ce(this,t),this.types=n;for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"cursorAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=uD.get(this)||this.topNode,r=new fD(i);return r.moveTo(n,e),uD.set(this,r._tree),r}},{key:"topNode",get:function(){return new Gb(this,0,0,null)}},{key:"resolve",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t1(uD.get(this)||this.topNode,n,e,!1);return uD.set(this,i),i}},{key:"resolveInner",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t1(rfe.get(this)||this.topNode,n,e,!0);return rfe.set(this,i),i}},{key:"iterate",value:function(n){for(var e=n.enter,i=n.leave,r=n.from,o=void 0===r?0:r,s=n.to,a=void 0===s?this.length:s,l=this.cursor((n.mode||0)|Ha.IncludeAnonymous);;){var c=!1;if(l.from<=a&&l.to>=o&&(l.type.isAnonymous||!1!==e(l))){if(l.firstChild())continue;c=!0}for(;c&&i&&!l.type.isAnonymous&&i(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}},{key:"prop",value:function(n){return n.perNode?this.props?this.props[n.id]:void 0:this.type.prop(n)}},{key:"propValues",get:function(){var n=[];if(this.props)for(var e in this.props)n.push([+e,this.props[e]]);return n}},{key:"balance",value:function(){var n=this;return this.children.length<=8?this:x4(cu.none,this.children,this.positions,0,this.children.length,0,this.length,function(i,r,o){return new t(n.type,i,r,o,n.propValues)},(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).makeTree||function(i,r,o){return new t(cu.none,i,r,o)})}}],[{key:"build",value:function(n){return function _nt(t){var n,e=t.buffer,i=t.nodeSet,r=t.maxBufferLength,o=void 0===r?1024:r,s=t.reused,a=void 0===s?[]:s,l=t.minRepeatType,c=void 0===l?i.types.length:l,u=Array.isArray(e)?new vnt(e,e.length):e,d=i.types,h=0,f=0;function p(k,D,L,z,R){for(var U=u.id,G=u.start,X=u.end,te=u.size,P=f;te<0;){if(u.next(),-1==te)return L.push(a[U]),void z.push(G-k);if(-3==te)return void(h=U);if(-4==te)return void(f=U);throw new RangeError("Unrecognized record size: ".concat(te))}var J,H,rt,le=d[U],E=G-k;if(X-G<=o&&(H=function(rt,B){var ne=u.fork(),ie=0,Me=0,Ye=0,je=ne.end-o,yt={size:0,start:0,skip:0};e:for(var Tt=ne.pos-rt;ne.pos>Tt;){var fn=ne.size;if(ne.id==B&&fn>=0)yt.size=ie,yt.start=Me,yt.skip=Ye,Ye+=4,ie+=4,ne.next();else{var Hn=ne.pos-fn;if(fn<0||Hn=c?4:0,Ei=ne.start;for(ne.next();ne.pos>Hn;){if(ne.size<0){if(-3!=ne.size)break e;Zt+=4}else ne.id>=c&&(Zt+=4);ne.next()}Me=Ei,ie+=fn,Ye+=Zt}}return(B<0||ie==rt)&&(yt.size=ie,yt.start=Me,yt.skip=Ye),yt.size>4?yt:void 0}(u.pos-D,R))){for(var I=new Uint16Array(H.size-H.skip),N=u.pos-H.size,q=I.length;u.pos>N;)q=v(H.start,I,q);J=new zb(I,X-H.start,i),E=H.start-k}else{var V=u.pos-te;u.next();for(var re=[],he=[],Oe=U>=c?U:-1,_e=0,Xe=X;u.pos>V;)Oe>=0&&u.id==Oe&&u.size>=0?(u.end<=Xe-o&&(m(re,he,G,_e,u.end,Xe,Oe,P),_e=re.length,Xe=u.end),u.next()):p(G,V,re,he,Oe);if(Oe>=0&&_e>0&&_e-1&&_e>0){var Le=(rt=le,function(B,ne,ie){var Me,Ye,je=0,yt=B.length-1;if(yt>=0&&(Me=B[yt])instanceof Ua){if(!yt&&Me.type==rt&&Me.length==ie)return Me;(Ye=Me.prop(pr.lookAhead))&&(je=ne[yt]+Me.length+Ye)}return g(rt,B,ne,ie,je)});J=x4(le,re,he,0,re.length,0,X-G,Le,Le)}else J=g(le,re,he,X-G,P-X)}L.push(J),z.push(E)}function m(k,D,L,z,R,U,G,X){for(var te=[],P=[];k.length>z;)te.push(k.pop()),P.push(D.pop()+L-R);k.push(g(i.types[G],te,P,U-R,X-U)),D.push(R-L)}function g(k,D,L,z){var R=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,U=arguments.length>5?arguments[5]:void 0;if(h){var G=[pr.contextHash,h];U=U?[G].concat(U):[G]}if(R>25){var X=[pr.lookAhead,R];U=U?[X].concat(U):[X]}return new Ua(k,D,L,z,U)}function v(k,D,L){var z=u.id,R=u.start,U=u.end,G=u.size;if(u.next(),G>=0&&z4)for(var te=u.pos-(G-4);u.pos>te;)L=v(k,D,L);D[--L]=X,D[--L]=U-k,D[--L]=R-k,D[--L]=z}else-3==G?h=z:-4==G&&(f=z);return L}for(var y=[],b=[];u.pos>0;)p(t.start||0,t.bufferStart||0,y,b,-1);var C=null!==(n=t.length)&&void 0!==n?n:y.length?b[0]+y[0].length:0;return new Ua(d[t.topID],y.reverse(),b.reverse(),C)}(n)}}]),t}();Ua.empty=new Ua(cu.none,[],[],0);var vnt=function(){function t(n,e){Ce(this,t),this.buffer=n,this.index=e}return Se(t,[{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"pos",get:function(){return this.index}},{key:"next",value:function(){this.index-=4}},{key:"fork",value:function(){return new t(this.buffer,this.index)}}]),t}(),zb=function(){function t(n,e,i){Ce(this,t),this.buffer=n,this.length=e,this.set=i}return Se(t,[{key:"type",get:function(){return cu.none}},{key:"toString",value:function(){for(var n=[],e=0;e0));l=s[l+3]);return a}},{key:"slice",value:function(n,e,i,r){for(var o=this.buffer,s=new Uint16Array(e-n),a=n,l=0;a=n&&en;case 1:return e<=n&&i>n;case 2:return i>n;case 4:return!0}}function sfe(t,n){for(var e=t.childBefore(n);e;){var i=e.lastChild;if(!i||i.to!=e.to)break;i.type.isError&&i.from==i.to?(t=e,e=i.prevSibling):e=i}return t}function t1(t,n,e,i){for(var r;t.from==t.to||(e<1?t.from>=n:t.from>n)||(e>-1?t.to<=n:t.to4&&void 0!==arguments[4]?arguments[4]:0,s=this;;){for(var a=s._tree,l=a.children,c=a.positions,u=e>0?l.length:-1;n!=u;n+=e){var d=l[n],h=c[n]+s.from;if(ofe(r,i,h,h+d.length))if(d instanceof zb){if(o&Ha.ExcludeBuffers)continue;var f=d.findChild(0,d.buffer.length,e,i-h,r);if(f>-1)return new _4(new ynt(s,d,n,h),null,f)}else if(o&Ha.IncludeAnonymous||!d.type.isAnonymous||b4(d)){var p=void 0;if(!(o&Ha.IgnoreMounts)&&d.props&&(p=d.prop(pr.mounted))&&!p.overlay)return new t(p.tree,h,n,s);var m=new t(d,h,n,s);return o&Ha.IncludeAnonymous||!m.type.isAnonymous?m:m.nextChild(e<0?d.children.length-1:0,e,i,r)}}if(o&Ha.IncludeAnonymous||!s.type.isAnonymous||(n=s.index>=0?s.index+e:e<0?-1:s._parent._tree.children.length,!(s=s._parent)))return null}}},{key:"firstChild",get:function(){return this.nextChild(0,1,0,4)}},{key:"lastChild",get:function(){return this.nextChild(this._tree.children.length-1,-1,0,4)}},{key:"childAfter",value:function(n){return this.nextChild(0,1,n,2)}},{key:"childBefore",value:function(n){return this.nextChild(this._tree.children.length-1,-1,n,-2)}},{key:"enter",value:function(n,e){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!(r&Ha.IgnoreOverlays)&&(i=this._tree.prop(pr.mounted))&&i.overlay){var o,s=n-this.from,a=Re(i.overlay);try{for(a.s();!(o=a.n()).done;){var l=o.value,c=l.from,u=l.to;if((e>0?c<=s:c=s:u>s))return new t(i.tree,i.overlay[0].from+this.from,-1,this)}}catch(d){a.e(d)}finally{a.f()}}return this.nextChild(0,1,n,e,r)}},{key:"nextSignificantParent",value:function(){for(var n=this;n.type.isAnonymous&&n._parent;)n=n._parent;return n}},{key:"parent",get:function(){return this._parent?this._parent.nextSignificantParent():null}},{key:"nextSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}},{key:"prevSibling",get:function(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}},{key:"cursor",value:function(){return new fD(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return this._tree}},{key:"toTree",value:function(){return this._tree}},{key:"resolve",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return sfe(this,n)}},{key:"getChild",value:function(n){var r=dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"toString",value:function(){return this._tree.toString()}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return hD(this,n)}}]),t}();function dD(t,n,e,i){var r=t.cursor(),o=[];if(!r.firstChild())return o;if(null!=e)for(;!r.type.is(e);)if(!r.nextSibling())return o;for(;;){if(null!=i&&r.type.is(i))return o;if(r.type.is(n)&&o.push(r.node),!r.nextSibling())return null==i?o:[]}}function hD(t,n){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.length-1,i=t.parent;e>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(n[e]&&n[e]!=i.name)return!1;e--}}return!0}var ynt=Se(function t(n,e,i,r){Ce(this,t),this.parent=n,this.buffer=e,this.index=i,this.start=r}),_4=function(){function t(n,e,i){Ce(this,t),this.context=n,this._parent=e,this.index=i,this.type=n.buffer.set.types[n.buffer.buffer[i]]}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"from",get:function(){return this.context.start+this.context.buffer.buffer[this.index+1]}},{key:"to",get:function(){return this.context.start+this.context.buffer.buffer[this.index+2]}},{key:"child",value:function(n,e,i){var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.context.start,i);return o<0?null:new t(this.context,this,o)}},{key:"firstChild",get:function(){return this.child(1,0,4)}},{key:"lastChild",get:function(){return this.child(-1,0,4)}},{key:"childAfter",value:function(n){return this.child(1,n,2)}},{key:"childBefore",value:function(n){return this.child(-1,n,-2)}},{key:"enter",value:function(n,e){if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)&Ha.ExcludeBuffers)return null;var r=this.context.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,n-this.context.start,e);return o<0?null:new t(this.context,this,o)}},{key:"parent",get:function(){return this._parent||this.context.parent.nextSignificantParent()}},{key:"externalSibling",value:function(n){return this._parent?null:this.context.parent.nextChild(this.context.index+n,n,0,4)}},{key:"nextSibling",get:function(){var n=this.context.buffer,e=n.buffer[this.index+3];return e<(this._parent?n.buffer[this._parent.index+3]:n.buffer.length)?new t(this.context,this._parent,e):this.externalSibling(1)}},{key:"prevSibling",get:function(){var n=this.context.buffer,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new t(this.context,this._parent,n.findChild(e,this.index,-1,0,4))}},{key:"cursor",value:function(){return new fD(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)}},{key:"tree",get:function(){return null}},{key:"toTree",value:function(){var n=[],e=[],i=this.context.buffer,r=this.index+4,o=i.buffer[this.index+3];return o>r&&(n.push(i.slice(r,o,i.buffer[this.index+1],i.buffer[this.index+2])),e.push(0)),new Ua(this.type,n,e,this.to-this.from)}},{key:"resolve",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!1)}},{key:"resolveInner",value:function(n){return t1(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,!0)}},{key:"enterUnfinishedNodesBefore",value:function(n){return sfe(this,n)}},{key:"toString",value:function(){return this.context.buffer.childString(this.index)}},{key:"getChild",value:function(n){var r=dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return r.length?r[0]:null}},{key:"getChildren",value:function(n){return dD(this,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)}},{key:"node",get:function(){return this}},{key:"matchContext",value:function(n){return hD(this,n)}}]),t}(),fD=function(){function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(Ce(this,t),this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,n instanceof Gb)this.yieldNode(n);else{this._tree=n.context.parent,this.buffer=n.context;for(var i=n._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=n,this.yieldBuf(n.index)}}return Se(t,[{key:"name",get:function(){return this.type.name}},{key:"yieldNode",value:function(n){return!!n&&(this._tree=n,this.type=n.type,this.from=n.from,this.to=n.to,!0)}},{key:"yieldBuf",value:function(n,e){this.index=n;var i=this.buffer,r=i.start,o=i.buffer;return this.type=e||o.set.types[o.buffer[n]],this.from=r+o.buffer[n+1],this.to=r+o.buffer[n+2],!0}},{key:"yield",value:function(n){return!!n&&(n instanceof Gb?(this.buffer=null,this.yieldNode(n)):(this.buffer=n.context,this.yieldBuf(n.index,n.type)))}},{key:"toString",value:function(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}},{key:"enterChild",value:function(n,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(n<0?this._tree._tree.children.length-1:0,n,e,i,this.mode));var r=this.buffer.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],n,e-this.buffer.start,i);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}},{key:"firstChild",value:function(){return this.enterChild(1,0,4)}},{key:"lastChild",value:function(){return this.enterChild(-1,0,4)}},{key:"childAfter",value:function(n){return this.enterChild(1,n,2)}},{key:"childBefore",value:function(n){return this.enterChild(-1,n,-2)}},{key:"enter",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.mode;return this.buffer?!(i&Ha.ExcludeBuffers)&&this.enterChild(1,n,e):this.yield(this._tree.enter(n,e,i))}},{key:"parent",value:function(){if(!this.buffer)return this.yieldNode(this.mode&Ha.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());var n=this.mode&Ha.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(n)}},{key:"sibling",value:function(n){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+n,n,0,4,this.mode));var e=this.buffer.buffer,i=this.stack.length-1;if(n<0){var r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(e.findChild(r,this.index,-1,0,4))}else{var o=e.buffer[this.index+3];if(o<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(o)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+n,n,0,4,this.mode))}},{key:"nextSibling",value:function(){return this.sibling(1)}},{key:"prevSibling",value:function(){return this.sibling(-1)}},{key:"atLastNode",value:function(n){var e,i,r=this.buffer;if(r){if(n>0){if(this.index-1)for(var l=e+n,c=n<0?-1:i._tree.children.length;l!=c;l+=n){var u=i._tree.children[l];if(this.mode&Ha.IncludeAnonymous||u instanceof zb||!u.type.isAnonymous||b4(u))return!1}}return!0}},{key:"move",value:function(n,e){if(e&&this.enterChild(n,0,4))return!0;for(;;){if(this.sibling(n))return!0;if(this.atLastNode(n)||!this.parent())return!1}}},{key:"next",value:function(){return this.move(1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"prev",value:function(){return this.move(-1,!(arguments.length>0&&void 0!==arguments[0])||arguments[0])}},{key:"moveTo",value:function(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(this.from==this.to||(e<1?this.from>=n:this.from>n)||(e>-1?this.to<=n:this.to=0;){for(var s=n;s;s=s._parent)if(s.index==r){if(r==this.index)return s;e=s,i=o+1;break e}r=this.stack[--o]}for(var a=i;a=0;o--){if(o<0)return hD(this.node,n,r);var s=i[e.buffer[this.stack[o]]];if(!s.isAnonymous){if(n[r]&&n[r]!=s.name)return!1;r--}}return!0}}]),t}();function b4(t){return t.children.some(function(n){return n instanceof zb||!n.type.isAnonymous||b4(n)})}var afe=new WeakMap;function pD(t,n){if(!t.isAnonymous||n instanceof zb||n.type!=t)return 1;var e=afe.get(n);if(null==e){e=1;var i,r=Re(n.children);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.type!=t||!(o instanceof Ua)){e=1;break}e+=pD(t,o)}}catch(s){r.e(s)}finally{r.f()}afe.set(n,e)}return e}function x4(t,n,e,i,r,o,s,a,l){for(var c=0,u=i;u=d)break;L+=z}if(C==k+1){if(L>d){var R=m[k];p(R.children,R.positions,0,R.children.length,g[k]+b);continue}h.push(m[k])}else h.push(x4(t,m,g,k,C,D,g[C-1]+m[C-1].length-D,null,l));f.push(D+b-o)}}(n,e,i,r,0),(a||l)(h,f,s)}var mD=function(){function t(n,e,i,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];Ce(this,t),this.from=n,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(s?2:0)}return Se(t,[{key:"openStart",get:function(){return(1&this.open)>0}},{key:"openEnd",get:function(){return(2&this.open)>0}}],[{key:"addTree",value:function(n){var e,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=[new t(0,n.length,n,0,!1,arguments.length>2&&void 0!==arguments[2]&&arguments[2])],s=Re(i);try{for(s.s();!(e=s.n()).done;){var a=e.value;a.to>n.length&&o.push(a)}}catch(l){s.e(l)}finally{s.f()}return o}},{key:"applyChanges",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:128;if(!e.length)return n;for(var r=[],o=1,s=n.length?n[0]:null,a=0,l=0,c=0;;a++){var u=a=i)for(;s&&s.from=h.from||d<=h.to||c){var f=Math.max(h.from,l)-c,p=Math.min(h.to,d)-c;h=f>=p?null:new t(f,p,h.tree,h.offset+c,a>0,!!u)}if(h&&r.push(h),s.to>d)break;s=o-1?e:cfe.get(e.base||e,e.modified.concat(n).sort(function(i,r){return i.id-r.id}))}}}]),t}(),wnt=0,cfe=function(){function t(){Ce(this,t),this.instances=[],this.id=wnt++}return Se(t,null,[{key:"get",value:function(n,e){if(!e.length)return n;var i=e[0].instances.find(function(m){return m.base==n&&(g=e).length==(v=m.modified).length&&g.every(function(y,b){return y==v[b]});var g,v});if(i)return i;var r,o=[],s=new Mp(o,n,e),a=Re(e);try{for(a.s();!(r=a.n()).done;)r.value.instances.push(s)}catch(m){a.e(m)}finally{a.f()}var l,c=ufe(e),u=Re(n.set);try{for(u.s();!(l=u.n()).done;){var d,h=l.value,f=Re(c);try{for(f.s();!(d=f.n()).done;)o.push(t.get(h,d.value))}catch(m){f.e(m)}finally{f.f()}}}catch(m){u.e(m)}finally{u.f()}return s}}]),t}();function ufe(t){for(var n=[t],e=0;e0&&u+3==s.length){l=1;break}var d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!d)throw new RangeError("Invalid path: "+s);if(a.push("*"==d[0]?"":'"'==d[0][0]?JSON.parse(d[0]):d[0]),(u+=d[0].length)==s.length)break;var h=s[u++];if(u==s.length&&"!"==h){l=0;break}if("/"!=h)throw new RangeError("Invalid path: "+s);c=s.slice(u)}var f=a.length-1,p=a[f];if(!p)throw new RangeError("Invalid path: "+s);var m=new Cnt(i,l,f>0?a.slice(0,f):null);n[p]=m.sort(n[p])}}}catch(g){o.e(g)}finally{o.f()}}return hfe.add(n)}var hfe=new pr,Cnt=function(){function t(n,e,i,r){Ce(this,t),this.tags=n,this.mode=e,this.context=i,this.next=r}return Se(t,[{key:"sort",value:function(n){return!n||n.depth3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.length,o=new Dnt(i,Array.isArray(n)?n:[n],e);o.highlightRange(t.cursor(),i,r,"",o.highlighters),o.flush(r)}var w4,Dnt=function(){function t(n,e,i){Ce(this,t),this.at=n,this.highlighters=e,this.span=i,this.class=""}return Se(t,[{key:"startSpan",value:function(n,e){e!=this.class&&(this.flush(n),n>this.at&&(this.at=n),this.class=e)}},{key:"flush",value:function(n){n>this.at&&this.class&&this.span(this.at,n,this.class)}},{key:"highlightRange",value:function(n,e,i,r,o){var s=n.type,a=n.from,l=n.to;if(!(a>=i||l<=e)){s.isTop&&(o=this.highlighters.filter(function(L){return!L.scope||L.scope(s)}));for(var c=r,u=s.prop(hfe),d=!1;u;){if(!u.context||n.matchContext(u.context)){var h=Snt(o,u.tags);h&&(c&&(c+=" "),c+=h,1==u.mode?r+=(r?" ":"")+h:0==u.mode&&(d=!0));break}u=u.next}if(this.startSpan(n.from,c),!d){var f=n.tree&&n.tree.prop(pr.mounted);if(f&&f.overlay){for(var p=n.node.enter(f.overlay[0].from+a,1),m=this.highlighters.filter(function(L){return!L.scope||L.scope(f.tree.type)}),g=n.firstChild(),v=0,y=a;;v++){var b=v=C)&&n.nextSibling()););if(!b||C>i)break;(y=b.to+a)>e&&(this.highlightRange(p.cursor(),Math.max(e,b.from+a),Math.min(i,y),r,m),this.startSpan(y,c))}g&&n.parent()}else if(n.firstChild()){do{if(!(n.to<=e)){if(n.from>=i)break;this.highlightRange(n,e,i,r,o),this.startSpan(Math.min(i,n.to),c)}}while(n.nextSibling());n.parent()}}}}}]),t}(),xn=Mp.define,gD=xn(),Op=xn(),pfe=xn(Op),mfe=xn(Op),Ip=xn(),vD=xn(Ip),C4=xn(Ip),vh=xn(),fg=xn(vh),yh=xn(),_h=xn(),S4=xn(),Wb=xn(S4),yD=xn(),dn={comment:gD,lineComment:xn(gD),blockComment:xn(gD),docComment:xn(gD),name:Op,variableName:xn(Op),typeName:pfe,tagName:xn(pfe),propertyName:mfe,attributeName:xn(mfe),className:xn(Op),labelName:xn(Op),namespace:xn(Op),macroName:xn(Op),literal:Ip,string:vD,docString:xn(vD),character:xn(vD),attributeValue:xn(vD),number:C4,integer:xn(C4),float:xn(C4),bool:xn(Ip),regexp:xn(Ip),escape:xn(Ip),color:xn(Ip),url:xn(Ip),keyword:yh,self:xn(yh),null:xn(yh),atom:xn(yh),unit:xn(yh),modifier:xn(yh),operatorKeyword:xn(yh),controlKeyword:xn(yh),definitionKeyword:xn(yh),moduleKeyword:xn(yh),operator:_h,derefOperator:xn(_h),arithmeticOperator:xn(_h),logicOperator:xn(_h),bitwiseOperator:xn(_h),compareOperator:xn(_h),updateOperator:xn(_h),definitionOperator:xn(_h),typeOperator:xn(_h),controlOperator:xn(_h),punctuation:S4,separator:xn(S4),bracket:Wb,angleBracket:xn(Wb),squareBracket:xn(Wb),paren:xn(Wb),brace:xn(Wb),content:vh,heading:fg,heading1:xn(fg),heading2:xn(fg),heading3:xn(fg),heading4:xn(fg),heading5:xn(fg),heading6:xn(fg),contentSeparator:xn(vh),list:xn(vh),quote:xn(vh),emphasis:xn(vh),strong:xn(vh),link:xn(vh),monospace:xn(vh),strikethrough:xn(vh),inserted:xn(),deleted:xn(),changed:xn(),invalid:xn(),meta:yD,documentMeta:xn(yD),annotation:xn(yD),processingInstruction:xn(yD),definition:Mp.defineModifier(),constant:Mp.defineModifier(),function:Mp.defineModifier(),standard:Mp.defineModifier(),local:Mp.defineModifier(),special:Mp.defineModifier()};ffe([{tag:dn.link,class:"tok-link"},{tag:dn.heading,class:"tok-heading"},{tag:dn.emphasis,class:"tok-emphasis"},{tag:dn.strong,class:"tok-strong"},{tag:dn.keyword,class:"tok-keyword"},{tag:dn.atom,class:"tok-atom"},{tag:dn.bool,class:"tok-bool"},{tag:dn.url,class:"tok-url"},{tag:dn.labelName,class:"tok-labelName"},{tag:dn.inserted,class:"tok-inserted"},{tag:dn.deleted,class:"tok-deleted"},{tag:dn.literal,class:"tok-literal"},{tag:dn.string,class:"tok-string"},{tag:dn.number,class:"tok-number"},{tag:[dn.regexp,dn.escape,dn.special(dn.string)],class:"tok-string2"},{tag:dn.variableName,class:"tok-variableName"},{tag:dn.local(dn.variableName),class:"tok-variableName tok-local"},{tag:dn.definition(dn.variableName),class:"tok-variableName tok-definition"},{tag:dn.special(dn.variableName),class:"tok-variableName2"},{tag:dn.definition(dn.propertyName),class:"tok-propertyName tok-definition"},{tag:dn.typeName,class:"tok-typeName"},{tag:dn.namespace,class:"tok-namespace"},{tag:dn.className,class:"tok-className"},{tag:dn.macroName,class:"tok-macroName"},{tag:dn.propertyName,class:"tok-propertyName"},{tag:dn.operator,class:"tok-operator"},{tag:dn.comment,class:"tok-comment"},{tag:dn.meta,class:"tok-meta"},{tag:dn.invalid,class:"tok-invalid"},{tag:dn.punctuation,class:"tok-punctuation"}]);var n1=new pr,Tnt=new pr,ad=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";Ce(this,t),this.data=n,this.name=r,Ao.prototype.hasOwnProperty("tree")||Object.defineProperty(Ao.prototype,"tree",{get:function(){return al(this)}}),this.parser=e,this.extension=[Np.of(this),Ao.languageData.of(function(o,s,a){var l=gfe(o,s,a),c=l.type.prop(n1);if(!c)return[];var u=o.facet(c),d=l.type.prop(Tnt);if(d){var h,f=l.resolve(s-l.from,a),p=Re(d);try{for(p.s();!(h=p.n()).done;){var m=h.value;if(m.test(f,o)){var g=o.facet(m.facet);return"replace"==m.type?g:g.concat(u)}}}catch(v){p.e(v)}finally{p.f()}}return u})].concat(i)}return Se(t,[{key:"isActiveAt",value:function(n,e){return gfe(n,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1).type.prop(n1)==this.data}},{key:"findRegions",value:function(n){var e=this,i=n.facet(Np);if(i?.data==this.data)return[{from:0,to:n.doc.length}];if(!i||!i.allowsNesting)return[];var r=[];return function o(s,a){if(s.prop(n1)!=e.data){var l=s.prop(pr.mounted);if(l){if(l.tree.prop(n1)==e.data){if(l.overlay){var c,u=Re(l.overlay);try{for(u.s();!(c=u.n()).done;){var d=c.value;r.push({from:d.from+a,to:d.to+a})}}catch(m){u.e(m)}finally{u.f()}}else r.push({from:a,to:a+s.length});return}if(l.overlay){var h=r.length;if(o(l.tree,l.overlay[0].from+a),r.length>h)return}}for(var f=0;f=this.cursorPos?this.doc.sliceString(n,e):this.string.slice(n-i,e-i)}}]),t}(),qb=null,Mnt=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0;Ce(this,t),this.parser=n,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=s,this.skipped=a,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}return Se(t,[{key:"startParse",value:function(){return this.parser.startParse(new Ant(this.state.doc),this.fragments)}},{key:"work",value:function(n,e){var i=this;return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Ua.empty&&this.isDone(e??this.state.doc.length)?(this.takeTree(),!0):this.withContext(function(){var r;if("number"==typeof n){var o=Date.now()+n;n=function(){return Date.now()>o}}for(i.parse||(i.parse=i.startParse()),null!=e&&(null==i.parse.stoppedAt||i.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>n)&&this.parse.stopAt(n),this.withContext(function(){for(;!(e=i.parse.advance()););}),this.treeLen=n,this.tree=e,this.fragments=this.withoutTempSkipped(mD.addTree(this.tree,this.fragments,!0)),this.parse=null)}},{key:"withContext",value:function(n){var e=qb;qb=this;try{return n()}finally{qb=e}}},{key:"withoutTempSkipped",value:function(n){for(var e;e=this.tempSkipped.pop();)n=vfe(n,e.from,e.to);return n}},{key:"changes",value:function(n,e){var i=this.fragments,r=this.tree,o=this.treeLen,s=this.viewport,a=this.skipped;if(this.takeTree(),!n.empty){var l=[];if(n.iterChangedRanges(function(p,m,g,v){return l.push({fromA:p,toA:m,fromB:g,toB:v})}),i=mD.applyChanges(i,l),r=Ua.empty,o=0,s={from:n.mapPos(s.from,-1),to:n.mapPos(s.to,1)},this.skipped.length){a=[];var c,u=Re(this.skipped);try{for(u.s();!(c=u.n()).done;){var d=c.value,h=n.mapPos(d.from,1),f=n.mapPos(d.to,-1);hn.from&&(this.fragments=vfe(this.fragments,o,s),this.skipped.splice(i--,1))}return!(this.skipped.length>=e||(this.reset(),0))}},{key:"reset",value:function(){this.parse&&(this.takeTree(),this.parse=null)}},{key:"skipUntilInView",value:function(n,e){this.skipped.push({from:n,to:e})}},{key:"isDone",value:function(n){n=Math.min(n,this.state.doc.length);var e=this.fragments;return this.treeLen>=n&&e.length&&0==e[0].from&&e[0].to>=n}}],[{key:"create",value:function(n,e,i){return new t(n,e,[],Ua.empty,0,i,[],null)}},{key:"getSkippingParser",value:function(n){return new(function(e){wt(r,lfe);var i=Ct(r);function r(){return Ce(this,r),i.apply(this,arguments)}return Se(r,[{key:"createParse",value:function(o,s,a){var l=a[0].from,c=a[a.length-1].to;return{parsedPos:l,advance:function(){var u=qb;if(u){var d,h=Re(a);try{for(h.s();!(d=h.n()).done;)u.tempSkipped.push(d.value)}catch(p){h.e(p)}finally{h.f()}n&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,n]):n)}return this.parsedPos=c,new Ua(cu.none,[],[],c-l)},stoppedAt:null,stopAt:function(){}}}}]),r}())}},{key:"get",value:function(){return qb}}]),t}();function vfe(t,n,e){return mD.applyChanges(t,[{fromA:n,toA:e,fromB:n,toB:e}])}var k4=function(){function t(n){Ce(this,t),this.context=n,this.tree=n.tree}return Se(t,[{key:"apply",value:function(n){if(!n.docChanged&&this.tree==this.context.tree)return this;var e=this.context.changes(n.changes,n.state),i=this.context.treeLen==n.startState.doc.length?void 0:Math.max(n.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new t(e)}}],[{key:"init",value:function(n){var e=Math.min(3e3,n.doc.length),i=Mnt.create(n.facet(Np).parser,n,{from:0,to:e});return i.work(20,e)||i.takeTree(),new t(i)}}]),t}();ad.state=Ba.define({create:k4.init,update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;if(r.is(ad.setState))return r.value}}catch(o){i.e(o)}finally{i.f()}return n.startState.facet(Np)!=n.state.facet(Np)?k4.init(n.state):t.apply(n)}});var yfe=function(t){var n=setTimeout(function(){return t()},500);return function(){return clearTimeout(n)}};typeof requestIdleCallback<"u"&&(yfe=function(t){var n=-1,e=setTimeout(function(){n=requestIdleCallback(t,{timeout:400})},100);return function(){return n<0?clearTimeout(e):cancelIdleCallback(n)}});var D4=typeof navigator<"u"&&null!==(w4=navigator.scheduling)&&void 0!==w4&&w4.isInputPending?function(){return navigator.scheduling.isInputPending()}:null,Ont=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}return Se(t,[{key:"update",value:function(n){var e=this.view.state.field(ad.state).context;(e.updateViewport(n.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),n.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}},{key:"scheduleWork",value:function(){if(!this.working){var n=this.view.state,e=n.field(ad.state);e.tree==e.context.tree&&e.context.isDone(n.doc.length)||(this.working=yfe(this.work))}}},{key:"work",value:function(n){this.working=null;var e=Date.now();if(this.chunkEndo+1e3,c=s.context.work(function(){return D4&&D4()||Date.now()>a},o+(l?0:1e5));this.chunkBudget-=Date.now()-e,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:ad.setState.of(new k4(s.context))})),this.chunkBudget>0&&(!c||l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}}}},{key:"checkAsyncSchedule",value:function(n){var e=this;n.scheduleOn&&(this.workScheduled++,n.scheduleOn.then(function(){return e.scheduleWork()}).catch(function(i){return Ec(e.view.state,i)}).then(function(){return e.workScheduled--}),n.scheduleOn=null)}},{key:"destroy",value:function(){this.working&&this.working()}},{key:"isWorking",value:function(){return!!(this.working||this.workScheduled>0)}}]),t}(),{eventHandlers:{focus:function(){this.scheduleWork()}}}),Np=Qn.define({combine:function(t){return t.length?t[0]:null},enables:function(t){return[ad.state,Ont,Wn.contentAttributes.compute([t],function(n){var e=n.facet(t);return e&&e.name?{"data-language":e.name}:{}})]}}),Int=Se(function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Ce(this,t),this.language=n,this.support=e,this.extension=[n,e]}),Nnt=Qn.define(),_D=Qn.define({combine:function(t){if(!t.length)return" ";var n=t[0];if(!n||/\S/.test(n)||Array.from(n).some(function(e){return e!=n[0]}))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return n}});function i1(t){var n=t.facet(_D);return 9==n.charCodeAt(0)?t.tabSize*n.length:n.length}function Yb(t,n){var e="",i=t.tabSize,r=t.facet(_D)[0];if("\t"==r){for(;n>=i;)e+="\t",n-=i;r=" "}for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,t),this.state=n,this.options=e,this.unit=i1(n)}return Se(t,[{key:"lineAt",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this.state.doc.lineAt(n),r=this.options,o=r.simulateBreak;return null!=o&&o>=i.from&&o<=i.to?r.simulateDoubleBreak&&o==n?{text:"",from:n}:(e<0?o1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from;return r.slice(n-o,Math.min(r.length,n+100-o))}},{key:"column",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,o=i.from,s=this.countColumn(r,n-o),a=this.options.overrideIndentation?this.options.overrideIndentation(o):-1;return a>-1&&(s+=a-this.countColumn(r,r.search(/\S|$/))),s}},{key:"countColumn",value:function(n){return Ab(n,this.state.tabSize,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.length)}},{key:"lineIndent",value:function(n){var i=this.lineAt(n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),r=i.text,s=this.options.overrideIndentation;if(s){var a=s(i.from);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}},{key:"simulatedBreak",get:function(){return this.options.simulateBreak||null}}]),t}(),_fe=new pr;function Fnt(t){var n=t.type.prop(_fe);if(n)return n;var e,i=t.firstChild;if(i&&(e=i.type.prop(pr.closedBy))){var r=t.lastChild,o=r&&e.indexOf(r.name)>-1;return function(s){return function(a,l,c,u,d){var f=a.textAfter.match(/^\s*/)[0].length,p=d==a.pos+f,m=function(g){var v=g.node,y=v.childAfter(v.from),b=v.lastChild;if(!y)return null;for(var C=g.options.simulateBreak,k=g.state.doc.lineAt(y.from),D=null==C||C<=k.from?k.to:Math.min(k.to,C),L=y.to;;){var z=v.childAfter(L);if(!z||z==b)return null;if(!z.type.isSkipped)return z.from0&&void 0!==arguments[0]?arguments[0]:{},n=t.except,e=t.units,i=void 0===e?1:e;return function(r){var o=n&&n.test(r.textAfter);return r.baseIndent+(o?0:i*r.unit)}}var Lnt=Qn.define(),wfe=new pr;function xD(t,n,e){var i,r=Re(t.facet(Lnt));try{for(r.s();!(i=r.n()).done;){var o=(0,i.value)(t,n,e);if(o)return o}}catch(s){r.e(s)}finally{r.f()}return function(s,a,l){var c=al(s);if(c.lengthl)){if(h&&f.from=a&&m.to>l&&(h=m)}}return h}(t,n,e)}function Cfe(t,n){var e=n.mapPos(t.from,1),i=n.mapPos(t.to,-1);return e>=i?void 0:{from:e,to:i}}var wD=cr.define({map:Cfe}),Xb=cr.define({map:Cfe});function Sfe(t){var n,e=[],i=Re(t.state.selection.ranges);try{var r=function(){var o=n.value.head;if(e.some(function(s){return s.from<=o&&s.to>=o}))return"continue";e.push(t.lineBlockAt(o))};for(i.s();!(n=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}return e}var pg=Ba.define({create:function(){return mi.none},update:function(t,n){t=t.map(n.changes);var e,i=Re(n.effects);try{var r=function(){var c,u,d,a=e.value;a.is(wD)&&(u=a.value.to,d=!1,t.between(c=a.value.from,c,function(h,f){h==c&&f==u&&(d=!0)}),!d)?t=t.update({add:[Afe.range(a.value.from,a.value.to)]}):a.is(Xb)&&(t=t.update({filter:function(l,c){return a.value.from!=l||a.value.to!=c},filterFrom:a.value.from,filterTo:a.value.to}))};for(i.s();!(e=i.n()).done;)r()}catch(a){i.e(a)}finally{i.f()}if(n.selection){var o=!1,s=n.selection.main.head;t.between(s,s,function(a,l){as&&(o=!0)}),o&&(t=t.update({filterFrom:s,filterTo:s,filter:function(a,l){return l<=s||a>=s}}))}return t},provide:function(t){return Wn.decorations.from(t)},toJSON:function(t,n){var e=[];return t.between(0,n.doc.length,function(i,r){e.push(i,r)}),e},fromJSON:function(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");for(var n=[],e=0;eo)&&(r={from:o,to:s})}),r}function kfe(t,n){return t.field(pg,!1)?n:n.concat(cr.appendConfig.of(Efe()))}function Dfe(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.state.doc.lineAt(n.from).number,r=t.state.doc.lineAt(n.to).number;return Wn.announce.of("".concat(t.state.phrase(e?"Folded lines":"Unfolded lines")," ").concat(i," ").concat(t.state.phrase("to")," ").concat(r,"."))}var $nt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:function(t){var n,e=Re(Sfe(t));try{for(e.s();!(n=e.n()).done;){var i=n.value,r=xD(t.state,i.from,i.to);if(r)return t.dispatch({effects:kfe(t.state,[wD.of(r),Dfe(t,r)])}),!0}}catch(o){e.e(o)}finally{e.f()}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:function(t){if(!t.state.field(pg,!1))return!1;var n,e=[],i=Re(Sfe(t));try{for(i.s();!(n=i.n()).done;){var r=n.value,o=CD(t.state,r.from,r.to);o&&e.push(Xb.of(o),Dfe(t,o,!1))}}catch(s){i.e(s)}finally{i.f()}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:function(t){for(var n=t.state,e=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},Vnt),t),e=new E4(n,!0),i=new E4(n,!1),r=wa.fromClass(function(){function s(a){Ce(this,s),this.from=a.viewport.from,this.markers=this.buildMarkers(a)}return Se(s,[{key:"update",value:function(a){(a.docChanged||a.viewportChanged||a.startState.facet(Np)!=a.state.facet(Np)||a.startState.field(pg,!1)!=a.state.field(pg,!1)||al(a.startState)!=al(a.state)||n.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}},{key:"buildMarkers",value:function(a){var l,c=new ug,u=Re(a.viewportLineBlocks);try{for(u.s();!(l=u.n()).done;){var d=l.value,h=CD(a.state,d.from,d.to)?i:xD(a.state,d.from,d.to)?e:null;h&&c.add(d.from,d.from,h)}}catch(f){u.e(f)}finally{u.f()}return c.finish()}}]),s}()),o=n.domEventHandlers;return[r,Khe({class:"cm-foldGutter",markers:function(s){var a;return(null===(a=s.plugin(r))||void 0===a?void 0:a.markers)||Ho.empty},initialSpacer:function(){return new E4(n,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:function(s,a,l){if(o.click&&o.click(s,a,l))return!0;var c=CD(s.state,a.from,a.to);if(c)return s.dispatch({effects:Xb.of(c)}),!0;var u=xD(s.state,a.from,a.to);return!!u&&(s.dispatch({effects:wD.of(u)}),!0)}})}),Efe()]}var Unt=Wn.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}}),A4=function(){function t(n,e){var i;function r(a){var l=Dp.newName();return(i||(i=Object.create(null)))["."+l]=a,l}Ce(this,t),this.specs=n;var o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof ad?function(a){return a.prop(n1)==s.data}:s?function(a){return a==s}:void 0,this.style=ffe(n.map(function(a){return{tag:a.tag,class:a.class||r(Object.assign({},a,{tag:null}))}}),{all:o}).style,this.module=i?new Dp(i):null,this.themeType=e.themeType}return Se(t,null,[{key:"define",value:function(n,e){return new t(n,e||{})}}]),t}(),M4=Qn.define(),Mfe=Qn.define({combine:function(t){return t.length?[t[0]]:null}});function O4(t){var n=t.facet(M4);return n.length?n:t.facet(Mfe)}function Ofe(t,n){var e,i=[Gnt];return t instanceof A4&&(t.module&&i.push(Wn.styleModule.of(t.module)),e=t.themeType),i.push(n?.fallback?Mfe.of(t):e?M4.computeN([Wn.darkTheme],function(r){return r.facet(Wn.darkTheme)==("dark"==e)?[t]:[]}):M4.of(t)),i}var znt=function(){function t(n){Ce(this,t),this.markCache=Object.create(null),this.tree=al(n.state),this.decorations=this.buildDeco(n,O4(n.state))}return Se(t,[{key:"update",value:function(n){var e=al(n.state),i=O4(n.state),r=i!=O4(n.startState);e.length0&&bh(n.state,s.head-1,1,r)||r.afterCursor&&(bh(n.state,s.head,1,r)||s.head0&&void 0!==arguments[0]?arguments[0]:{}),Qnt]}var eit=new pr;function I4(t,n,e){var i=t.prop(n<0?pr.openedBy:pr.closedBy);if(i)return i;if(1==t.name.length){var r=e.indexOf(t.name);if(r>-1&&r%2==(n<0?1:0))return[e[r+n]]}return null}function N4(t){var n=t.type.prop(eit);return n?n(t.node):t}function bh(t,n,e){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i.maxScanDistance||1e4,o=i.brackets||"()[]{}",s=al(t),a=s.resolveInner(n,e),l=a;l;l=l.parent){var c=I4(l.type,e,o);if(c&&l.from0?n>=u.from&&nu.from&&n<=u.to))return tit(0,0,e,l,u,c,o)}}return function nit(t,n,e,i,r,o,s){var a=e<0?t.sliceDoc(n-1,n):t.sliceDoc(n,n+1),l=s.indexOf(a);if(l<0||l%2==0!=e>0)return null;for(var c={from:e<0?n-1:n,to:e>0?n+1:n},u=t.doc.iterRange(n,e>0?t.doc.length:0),d=0,h=0;!u.next().done&&h<=o;){var f=u.value;e<0&&(h+=f.length);for(var p=n+h*e,m=e>0?0:f.length-1,g=e>0?f.length:-1;m!=g;m+=e){var v=s.indexOf(f[m]);if(!(v<0||i.resolveInner(p+m,1).type!=r))if(v%2==0==e>0)d++;else{if(1==d)return{start:c,end:{from:p+m,to:p+m+1},matched:v>>1==l>>1};d--}}e>0&&(h+=f.length)}return u.done?{start:c,matched:!1}:null}(t,n,e,s,a.type,r,o)}function tit(t,n,e,i,r,o,s){var l={from:r.from,to:r.to},c=0,u=i.parent?.cursor();if(u&&(e<0?u.childBefore(i.from):u.childAfter(i.to)))do{if(e<0?u.to<=i.from:u.from>=i.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(Ffe.push(t),console.warn(n))}function ait(t,n){var e,i=null,r=Re(n.split("."));try{for(r.s();!(e=r.n()).done;){var o=e.value,s=t[o]||dn[o];s?"function"==typeof s?i?i=s(i):P4(o,"Modifier ".concat(o," used at start of tag")):i?P4(o,"Tag ".concat(o," used as modifier")):i=s:P4(o,"Unknown highlighting tag ".concat(o))}}catch(c){r.e(c)}finally{r.f()}if(!i)return 0;var a=n.replace(/ /g,"_"),l=cu.define({id:Nfe.length,name:a,props:[dfe(Ul({},a,i))]});return Nfe.push(l),l.id}function j4(t,n){return function(e){var i=e.state,r=e.dispatch;if(i.readOnly)return!1;var o=t(n,i);return!!o&&(r(i.update(o)),!0)}}var lit=j4(function hit(t,n){var e,r=[],o=-1,s=Re(arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges);try{for(s.s();!(e=s.n()).done;){for(var a=e.value,l=a.from,c=a.to,u=r.length,d=1e9,h=l;h<=c;){var f=n.doc.lineAt(h);if(f.from>o&&(l==c||c>f.from)){o=f.from;var p=R4(n,f.from).line;if(!p)continue;var m=/^\s*/.exec(f.text)[0].length,g=m==f.length,v=f.text.slice(m,m+p.length)==p?m:-1;m=0})){var te,P=[],W=Re(r);try{for(W.s();!(te=W.n()).done;){var J=te.value,H=J.line,le=J.comment;if(le>=0){var I=H.from+le,N=I+J.token.length;" "==H.text[N-H.from]&&N++,P.push({from:I,to:N})}}}catch(q){W.e(q)}finally{W.f()}return{changes:P}}return null},0),cit=j4(Rfe,0),uit=j4(function(t,n){return Rfe(t,n,function(e){var i,r=[],o=Re(e.selection.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value,a=e.doc.lineAt(s.from),l=s.to<=a.to?a:e.doc.lineAt(s.to),c=r.length-1;c>=0&&r[c].to>a.from?r[c].to=l.to:r.push({from:a.from,to:l.to})}}catch(u){o.e(u)}finally{o.f()}return r}(n))},0);function R4(t,n){var e=t.languageDataAt("commentTokens",n);return e.length?e[0]:{}}function Rfe(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.selection.ranges,i=e.map(function(h){return R4(n,h.from).block});if(!i.every(function(h){return h}))return null;var r=e.map(function(h,f){return function dit(t,n,e,i){var r,o,s=n.open,a=n.close,l=t.sliceDoc(e-50,e),c=t.sliceDoc(i,i+50),u=/\s*$/.exec(l)[0].length,d=/^\s*/.exec(c)[0].length,h=l.length-u;if(l.slice(h-s.length,h)==s&&c.slice(d,d+a.length)==a)return{open:{pos:e-u,margin:u&&1},close:{pos:i+d,margin:d&&1}};i-e<=100?r=o=t.sliceDoc(e,i):(r=t.sliceDoc(e,e+50),o=t.sliceDoc(i-50,i));var f=/^\s*/.exec(r)[0].length,p=/\s*$/.exec(o)[0].length,m=o.length-p-a.length;return r.slice(f,f+s.length)==s&&o.slice(m,m+a.length)==a?{open:{pos:e+f+s.length,margin:/\s/.test(r.charAt(f+s.length))?1:0},close:{pos:i-p-a.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(n,i[f],h.from,h.to)});if(2!=t&&!r.every(function(h){return h}))return{changes:n.changes(e.map(function(h,f){return r[f]?[]:[{from:h.from,insert:i[f].open+" "},{from:h.to,insert:" "+i[f].close}]}))};if(1!=t&&r.some(function(h){return h})){for(var o,s=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{}),Wn.domEventHandlers({beforeinput:function(n,e){var i="historyUndo"==n.inputType?B4:"historyRedo"==n.inputType?kD:null;return!!i&&(n.preventDefault(),i(e))}})]}function SD(t,n){return function(e){var i=e.state,r=e.dispatch;if(!n&&i.readOnly)return!1;var o=i.field($4,!1);if(!o)return!1;var s=o.pop(t,i,n);return!!s&&(r(s),!0)}}var B4=SD(0,!1),kD=SD(1,!1),git=SD(0,!0),vit=SD(1,!0);function $fe(t){return function(n){var e=n.field($4,!1);if(!e)return 0;var i=0==t?e.done:e.undone;return i.length-(i.length&&!i[0].changes?1:0)}}var yit=$fe(0),_it=$fe(1),vf=function(){function t(n,e,i,r,o){Ce(this,t),this.changes=n,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}return Se(t,[{key:"setSelAfter",value:function(n){return new t(this.changes,this.effects,this.mapped,this.startSelection,n)}},{key:"toJSON",value:function(){var n,e,i;return{changes:null===(n=this.changes)||void 0===n?void 0:n.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(function(r){return r.toJSON()})}}}],[{key:"fromJSON",value:function(n){return new t(n.changes&&rd.fromJSON(n.changes),[],n.mapped&&z0.fromJSON(n.mapped),n.startSelection&&Qt.fromJSON(n.startSelection),n.selectionsAfter.map(Qt.fromJSON))}},{key:"fromTransaction",value:function(n,e){var i,r=uu,o=Re(n.startState.facet(pit));try{for(o.s();!(i=o.n()).done;){var s=(0,i.value)(n);s.length&&(r=r.concat(s))}}catch(a){o.e(a)}finally{o.f()}return!r.length&&n.changes.empty?null:new t(n.changes.invert(n.startState.doc),r,void 0,e||n.startState.selection,uu)}},{key:"selection",value:function(n){return new t(void 0,uu,void 0,void 0,n)}}]),t}();function DD(t,n,e,i){var o=t.slice(n+1>e+20?n-e-1:0,n);return o.push(i),o}function Bfe(t,n){return t.length?n.length?t.concat(n):t:n}var uu=[];function Vfe(t,n){if(t.length){var e=t[t.length-1],i=e.selectionsAfter.slice(Math.max(0,e.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(n)?t:(i.push(n),DD(t,t.length-1,1e9,e.setSelAfter(i)))}return[vf.selection([n])]}function bit(t){var n=t[t.length-1],e=t.slice();return e[t.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),e}function V4(t,n){if(!t.length)return t;for(var e=t.length,i=uu;e;){var r=xit(t[e-1],n,i);if(r.changes&&!r.changes.empty||r.effects.length){var o=t.slice(0,e);return o[e-1]=r,o}n=r.mapped,e--,i=r.selectionsAfter}return i.length?[vf.selection(i)]:uu}function xit(t,n,e){var i=Bfe(t.selectionsAfter.length?t.selectionsAfter.map(function(a){return a.map(n)}):uu,e);if(!t.changes)return vf.selection(i);var r=t.changes.map(n),o=n.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new vf(r,cr.mapEffects(t.effects,n),s,t.startSelection.map(o),i)}var wit=/^(input\.type|delete)($|\.)/,Jb=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;Ce(this,t),this.done=n,this.undone=e,this.prevTime=i,this.prevUserEvent=r}return Se(t,[{key:"isolate",value:function(){return this.prevTime?new t(this.done,this.undone):this}},{key:"addChanges",value:function(n,e,i,r,o){var c,u,d,s=this.done,a=s[s.length-1];return new t(s=a&&a.changes&&!a.changes.empty&&n.changes&&(!i||wit.test(i))&&(!a.selectionsAfter.length&&e-this.prevTime=v&&p<=y&&(d=!0)}}),d))||"input.type.compose"==i)?DD(s,s.length-1,r.minDepth,new vf(n.changes.compose(a.changes),Bfe(n.effects,a.effects),a.mapped,a.startSelection,uu)):DD(s,s.length,r.minDepth,n),uu,e,i)}},{key:"addSelection",value:function(n,e,i,r){var s,a,o=this.done.length?this.done[this.done.length-1].selectionsAfter:uu;return o.length>0&&e-this.prevTime2||/[^\s,.;:]/.test(t.sliceDoc(n.from,n.to)))||n.firstChild}function ED(t,n,e){for(var i=al(t).resolveInner(n.head),r=e?pr.closedBy:pr.openedBy,o=n.head;;){var s=e?i.childAfter(o):i.childBefore(o);if(!s)break;Sit(t,s,r)?i=s:o=e?s.to:s.from}var a,l;return l=i.type.prop(r)&&(a=e?bh(t,i.from,1):bh(t,i.to,-1))&&a.matched?e?a.end.to:a.end.from:e?i.to:i.from,Qt.cursor(l,e?-1:1)}function Wfe(t,n){return ld(t,function(e){if(!e.empty)return TD(e,n);var i=t.moveVertically(e,n);return i.head!=e.head?i:t.moveToLineBoundary(e,n)})}var qfe=function(t){return Wfe(t,!1)},Yfe=function(t){return Wfe(t,!0)};function Xfe(t){var n,e=t.scrollDOM.clientHeightl&&s.bottoms&&(e="delete.forward",l=MD(t,l,!0)),s=Math.min(s,l),a=Math.max(a,l)}else s=MD(t,s,!1),a=MD(t,a,!0);return s==a?{range:o}:{changes:{from:s,to:a},range:Qt.cursor(s)}});return!r.changes.empty&&(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:e,effects:"delete.selection"==e?Wn.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function MD(t,n,e){if(t instanceof Wn){var i,r=Re(t.state.facet(Wn.atomicRanges).map(function(o){return o(t)}));try{for(r.s();!(i=r.n()).done;)i.value.between(n,n,function(o,s){on&&(n=e?s:o)})}catch(o){r.e(o)}finally{r.f()}}return n}var hpe=function(t,n){return AD(t,function(e){var i,r,o=t.state,s=o.doc.lineAt(e);if(!n&&e>s.from&&e=s.number){var l=e[e.length-1];l.to=a.to,l.ranges.push(o)}else e.push({from:s.from,to:a.to,ranges:[o]});i=a.number+1}}catch(c){r.e(c)}finally{r.f()}return e}function vpe(t,n,e){if(t.readOnly)return!1;var i,r=[],o=[],s=Re(OD(t));try{for(s.s();!(i=s.n()).done;){var a=i.value;if(e?a.to!=t.doc.length:0!=a.from){var l=t.doc.lineAt(e?a.to+1:a.from-1),c=l.length+1;if(e){r.push({from:a.to,to:l.to},{from:a.from,insert:l.text+t.lineBreak});var u,d=Re(a.ranges);try{for(d.s();!(u=d.n()).done;){var h=u.value;o.push(Qt.range(Math.min(t.doc.length,h.anchor+c),Math.min(t.doc.length,h.head+c)))}}catch(g){d.e(g)}finally{d.f()}}else{r.push({from:l.from,to:a.from},{from:a.to,insert:t.lineBreak+l.text});var f,p=Re(a.ranges);try{for(p.s();!(f=p.n()).done;){var m=f.value;o.push(Qt.range(m.anchor-c,m.head-c))}}catch(g){p.e(g)}finally{p.f()}}}}}catch(g){s.e(g)}finally{s.f()}return!!r.length&&(n(t.update({changes:r,scrollIntoView:!0,selection:Qt.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function ype(t,n,e){if(t.readOnly)return!1;var i,r=[],o=Re(OD(t));try{for(o.s();!(i=o.n()).done;){var s=i.value;r.push(e?{from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}:{from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)})}}catch(a){o.e(a)}finally{o.f()}return n(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}var kit=_pe(!1),Dit=_pe(!0);function _pe(t){return function(n){var e=n.state,i=n.dispatch;if(e.readOnly)return!1;var r=e.changeByRange(function(o){var s=o.from,a=o.to,l=e.doc.lineAt(s),c=!t&&s==a&&function(f,p){if(/\(\)|\[\]|\{\}/.test(f.sliceDoc(p-1,p+1)))return{from:p,to:p};var m,g=al(f).resolveInner(p),v=g.childBefore(p),y=g.childAfter(p);return v&&y&&v.to<=p&&y.from>=p&&(m=v.type.prop(pr.closedBy))&&m.indexOf(y.name)>-1&&f.doc.lineAt(v.to).from==f.doc.lineAt(y.from).from?{from:v.to,to:y.from}:null}(e,s);t&&(s=a=(a<=l.to?l:e.doc.lineAt(a)).to);var u=new bD(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=T4(u,s);for(null==d&&(d=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);al.from&&se&&(i.empty||i.to>s.from)&&(n(s,r,i),e=s.number),o=s.to+1}var a=t.changes(r);return{changes:r,range:Qt.range(a.mapPos(i.anchor,1),a.mapPos(i.head,1))}})}var bpe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(z4(n,function(i,r){r.push({from:i.from,insert:n.facet(_D)})}),{userEvent:"input.indent"})),!0)},xpe=function(t){var n=t.state;return!n.readOnly&&((0,t.dispatch)(n.update(z4(n,function(i,r){var o=/^\s*/.exec(i.text)[0];if(o){for(var s=Ab(o,n.tabSize),a=0,l=Yb(n,Math.max(0,s-i1(n)));ae?e:Math.max(0,n-1)})}},{mac:"Mod-Delete",run:gpe}].concat(Tit.map(function(t){return{mac:t.key,run:t.run,shift:t.shift}})),Ait=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:function(t){return ld(t,function(n){return ED(t.state,n,!ll(t))})},shift:function(t){return du(t,function(n){return ED(t.state,n,!ll(t))})}},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:function(t){return ld(t,function(n){return ED(t.state,n,ll(t))})},shift:function(t){return du(t,function(n){return ED(t.state,n,ll(t))})}},{key:"Alt-ArrowUp",run:function(t){return vpe(t.state,t.dispatch,!1)}},{key:"Shift-Alt-ArrowUp",run:function(t){return ype(t.state,t.dispatch,!1)}},{key:"Alt-ArrowDown",run:function(t){return vpe(t.state,t.dispatch,!0)}},{key:"Shift-Alt-ArrowDown",run:function(t){return ype(t.state,t.dispatch,!0)}},{key:"Escape",run:function(t){var n=t.state,e=t.dispatch,i=n.selection,r=null;return i.ranges.length>1?r=Qt.create([i.main]):i.main.empty||(r=Qt.create([Qt.cursor(i.main.head)])),!!r&&(e(xh(n,r)),!0)}},{key:"Mod-Enter",run:Dit},{key:"Alt-l",mac:"Ctrl-l",run:function(t){var n=t.state,e=t.dispatch,i=OD(n).map(function(r){return Qt.range(r.from,Math.min(r.to+1,n.doc.length))});return e(n.update({selection:Qt.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:function(t){var n=t.state,e=t.dispatch,i=r1(n.selection,function(r){for(var o,s=al(n).resolveInner(r.head,1);!(s.from=r.to||s.to>r.to&&s.from<=r.from)&&null!==(o=s.parent)&&void 0!==o&&o.parent;)s=s.parent;return Qt.range(s.to,s.from)});return e(xh(n,i)),!0},preventDefault:!0},{key:"Mod-[",run:xpe},{key:"Mod-]",run:bpe},{key:"Mod-Alt-\\",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=Object.create(null),r=new bD(n,{overrideIndentation:function(s){return i[s]??-1}}),o=z4(n,function(s,a,l){var c=T4(r,s.from);if(null!=c){/\S/.test(s.text)||(c=0);var u=/^\s*/.exec(s.text)[0],d=Yb(n,c);(u!=d||l.from0?o--:s0&&bh(n,s.head-1,1)||s.head2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0;Ce(this,t),this.test=s,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=n.iterRange(i,r),this.bufferStart=i,this.normalize=o?function(a){return o(Cpe(a))}:Cpe,this.query=this.normalize(e)}return Se(t,[{key:"peek",value:function(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return $a(this.buffer,this.bufferPos)}},{key:"next",value:function(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}},{key:"nextOverlapping",value:function(){for(;;){var n=this.peek();if(n<0)return this.done=!0,this;var e=pj(n),i=this.bufferStart+this.bufferPos;this.bufferPos+=kc(n);for(var r=this.normalize(e),o=0,s=i;;o++){var a=r.charCodeAt(o),l=this.match(a,s);if(l)return this.value=l,this;if(o==r.length-1)break;s==i&&o3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.length;if(Ce(this,t),this.text=n,this.to=o,this.curLine="",this.done=!1,this.value=Spe,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new Tpe(n,e,i,r,o);this.re=new RegExp(e,G4+(i?.ignoreCase?"i":"")),this.test=i?.test,this.iter=n.iter();var s=n.lineAt(r);this.curLineStart=s.from,this.matchPos=ID(n,r),this.getLine(this.curLineStart)}return Se(t,[{key:"getLine",value:function(n){this.iter.next(n),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}},{key:"nextLine",value:function(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}},{key:"next",value:function(){for(var n=this.matchPos-this.curLineStart;;){this.re.lastIndex=n;var e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){var i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=ID(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;n=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||r.to<=e){var o=new t(e,n.sliceString(e,i));return W4.set(n,o),o}if(r.from==e&&r.to==i)return r;var s=r.text,a=r.from;return a>e&&(s=n.sliceString(e,a)+s,a=e),r.to=this.to?this.to:this.text.lineAt(n).to}},{key:"next",value:function(){for(;;){var n=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==n&&(this.re.lastIndex=n+1,e=this.re.exec(this.flat.text)),e){var i=this.flat.from+e.index,r=i+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this.matchPos=ID(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Dpe.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}]),t}();function ID(t,n){if(n>=t.length)return n;for(var e,i=t.lineAt(n);n=56320&&e<57344;)n++;return n}function q4(t){var n=Mo("input",{class:"cm-textfield",name:"line"});function e(){var i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(i){var r=t.state,o=r.doc.lineAt(r.selection.main.head),s=zn(i,5),a=s[1],l=s[2],c=s[3],u=s[4],d=c?+c.slice(1):0,h=l?+l:o.number;if(l&&u){var f=h/100;a&&(f=f*("-"==a?-1:1)+o.number/r.doc.lines),h=Math.round(r.doc.lines*f)}else l&&a&&(h=h*("-"==a?-1:1)+o.number);var p=r.doc.line(Math.max(1,Math.min(r.doc.lines,h)));t.dispatch({effects:ND.of(!1),selection:Qt.cursor(p.from+Math.max(0,Math.min(d,p.length))),scrollIntoView:!0}),t.focus()}}return{dom:Mo("form",{class:"cm-gotoLine",onkeydown:function(i){27==i.keyCode?(i.preventDefault(),t.dispatch({effects:ND.of(!1)}),t.focus()):13==i.keyCode&&(i.preventDefault(),e())},onsubmit:function(i){i.preventDefault(),e()}},Mo("label",t.state.phrase("Go to line"),": ",n)," ",Mo("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}typeof Symbol<"u"&&(kpe.prototype[Symbol.iterator]=Tpe.prototype[Symbol.iterator]=function(){return this});var ND=cr.define(),Epe=Ba.define({create:function(){return!0},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(ND)&&(t=r.value)}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return Hb.from(t,function(n){return n?q4:null})}}),Oit=Wn.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Iit={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Ape=Qn.define({combine:function(t){return lu(t,Iit,{highlightWordAroundCursor:function(n,e){return n||e},minSelectionLength:Math.min,maxMatches:Math.min})}}),Nit=mi.mark({class:"cm-selectionMatch"}),Fit=mi.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Mpe(t,n,e,i){return!(0!=e&&t(n.sliceDoc(e-1,e))==is.Word||i!=n.doc.length&&t(n.sliceDoc(i,i+1))==is.Word)}var Pit=wa.fromClass(function(){function t(n){Ce(this,t),this.decorations=this.getDeco(n)}return Se(t,[{key:"update",value:function(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}},{key:"getDeco",value:function(n){var e=n.state.facet(Ape),i=n.state,r=i.selection;if(r.ranges.length>1)return mi.none;var o,y,b,C,k,s=r.main,a=null;if(s.empty){if(!e.highlightWordAroundCursor)return mi.none;var l=i.wordAt(s.head);if(!l)return mi.none;a=i.charCategorizer(s.head),o=i.sliceDoc(l.from,l.to)}else{var c=s.to-s.from;if(c200)return mi.none;if(e.wholeWords){if(o=i.sliceDoc(s.from,s.to),!Mpe(a=i.charCategorizer(s.head),i,s.from,s.to)||(k=s.to,(y=a)((b=i).sliceDoc(C=s.from,C+1))!=is.Word||y(b.sliceDoc(k-1,k))!=is.Word))return mi.none}else if(!(o=i.sliceDoc(s.from,s.to).trim()))return mi.none}var u,d=[],h=Re(n.visibleRanges);try{for(h.s();!(u=h.n()).done;)for(var f=u.value,p=new o1(i.doc,o,f.from,f.to);!p.next().done;){var m=p.value,g=m.from,v=m.to;if((!a||Mpe(a,i,g,v))&&(s.empty&&g<=s.from&&v>=s.to?d.push(Fit.range(g,v)):(g>=s.to||v<=s.from)&&d.push(Nit.range(g,v)),d.length>e.maxMatches))return mi.none}}catch(y){h.e(y)}finally{h.f()}return mi.set(d)}}]),t}(),{decorations:function(t){return t.decorations}}),jit=Wn.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),FD=Qn.define({combine:function(t){return lu(t,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:function(n){return new Wit(n)}})}});function Rit(t){return t?[FD.of(t),tR]:tR}var Ope=function(){function t(n){Ce(this,t),this.search=n.search,this.caseSensitive=!!n.caseSensitive,this.literal=!!n.literal,this.regexp=!!n.regexp,this.replace=n.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,G4),!0}catch{return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!n.wholeWord}return Se(t,[{key:"unquote",value:function(n){return this.literal?n:n.replace(/\\([nrt\\])/g,function(e,i){return"n"==i?"\n":"r"==i?"\r":"t"==i?"\t":"\\"})}},{key:"eq",value:function(n){return this.search==n.search&&this.replace==n.replace&&this.caseSensitive==n.caseSensitive&&this.regexp==n.regexp&&this.wholeWord==n.wholeWord}},{key:"create",value:function(){return this.regexp?new $it(this):new Lit(this)}},{key:"getCursor",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0,r=n.doc?n:Ao.create({doc:n});return null==i&&(i=r.doc.length),this.regexp?a1(this,r,e,i):s1(this,r,e,i)}}]),t}(),Ipe=Se(function t(n){Ce(this,t),this.spec=n});function s1(t,n,e,i){return new o1(n.doc,t.unquoted,e,i,t.caseSensitive?void 0:function(r){return r.toLowerCase()},t.wholeWord?(r=n.doc,o=n.charCategorizer(n.selection.main.head),function(s,a,l,c){return(c>s||c+l.length=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=s1(this.spec,i,Math.max(0,r-this.spec.unquoted.length),Math.min(o+this.spec.unquoted.length,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}();function a1(t,n,e,i){return new kpe(n.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(r=n.charCategorizer(n.selection.main.head),function(o,s,a){return!a[0].length||(r(PD(a.input,a.index))!=is.Word||r(jD(a.input,a.index))!=is.Word)&&(r(jD(a.input,a.index+a[0].length))!=is.Word||r(PD(a.input,a.index+a[0].length))!=is.Word)}):void 0},e,i);var r}function PD(t,n){return t.slice(Dl(t,n,!1),n)}function jD(t,n){return t.slice(n,Dl(t,n))}var $it=function(t){wt(e,Ipe);var n=Ct(e);function e(){return Ce(this,e),n.apply(this,arguments)}return Se(e,[{key:"nextMatch",value:function(i,r,o){var s=a1(this.spec,i,o,i.doc.length).next();return s.done&&(s=a1(this.spec,i,0,r).next()),s.done?null:s.value}},{key:"prevMatchInRange",value:function(i,r,o){for(var s=1;;s++){for(var a=Math.max(r,o-1e4*s),l=a1(this.spec,i,a,o),c=null;!l.next().done;)c=l.value;if(c&&(a==r||c.from>a+10))return c;if(a==r)return null}}},{key:"prevMatch",value:function(i,r,o){return this.prevMatchInRange(i,0,r)||this.prevMatchInRange(i,o,i.doc.length)}},{key:"getReplacement",value:function(i){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,function(r,o){return"$"==o?"$":"&"==o?i.match[0]:"0"!=o&&+o=r)return null;s.push(o.value)}return s}},{key:"highlight",value:function(i,r,o,s){for(var a=a1(this.spec,i,Math.max(0,r-250),Math.min(o+250,i.doc.length));!a.next().done;)s(a.value.from,a.value.to)}}]),e}(),Kb=cr.define(),Y4=cr.define(),Pp=Ba.define({create:function(t){return new X4(K4(t).create(),null)},update:function(t,n){var e,i=Re(n.effects);try{for(i.s();!(e=i.n()).done;){var r=e.value;r.is(Kb)?t=new X4(r.value.create(),t.panel):r.is(Y4)&&(t=new X4(t.query,r.value?J4:null))}}catch(o){i.e(o)}finally{i.f()}return t},provide:function(t){return Hb.from(t,function(n){return n.panel})}}),X4=Se(function t(n,e){Ce(this,t),this.query=n,this.panel=e}),Bit=mi.mark({class:"cm-searchMatch"}),Vit=mi.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Hit=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.decorations=this.highlight(n.state.field(Pp))}return Se(t,[{key:"update",value:function(n){var e=n.state.field(Pp);(e!=n.startState.field(Pp)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}},{key:"highlight",value:function(n){var e=n.query;if(!n.panel||!e.spec.valid)return mi.none;for(var i=this.view,r=new ug,o=0,s=i.visibleRanges,a=s.length;os[o+1].from-500;)u=s[++o].to;e.highlight(i.state,c,u,function(d,h){var f=i.state.selection.ranges.some(function(p){return p.from==d&&p.to==h});r.add(d,h,f?Vit:Bit)})}return r.finish()}}]),t}(),{decorations:function(t){return t.decorations}});function Qb(t){return function(n){var e=n.state.field(Pp,!1);return e&&e.query.spec.valid?t(n,e):Q4(n)}}var RD=Qb(function(t,n){var i=t.state.selection.main.to,r=n.query.nextMatch(t.state,i,i);return!!r&&(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:eR(t,r),userEvent:"select.search"}),!0)}),LD=Qb(function(t,n){var i=t.state,r=i.selection.main.from,o=n.query.prevMatch(i,r,r);return!!o&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0,effects:eR(t,o),userEvent:"select.search"}),!0)}),Uit=Qb(function(t,n){var e=n.query.matchAll(t.state,1e3);return!(!e||!e.length||(t.dispatch({selection:Qt.create(e.map(function(i){return Qt.range(i.from,i.to)})),userEvent:"select.search.matches"}),0))}),Npe=Qb(function(t,n){var e=n.query,i=t.state,r=i.selection.main,o=r.from,s=r.to;if(i.readOnly)return!1;var a=e.nextMatch(i,o,o);if(!a)return!1;var l,c,u=[],d=[];if(a.from==o&&a.to==s&&(c=i.toText(e.getReplacement(a)),u.push({from:a.from,to:a.to,insert:c}),a=e.nextMatch(i,a.from,a.to),d.push(Wn.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),a){var h=0==u.length||u[0].from>=a.to?0:a.to-a.from-c.length;l={anchor:a.from-h,head:a.to-h},d.push(eR(t,a))}return t.dispatch({changes:u,selection:l,scrollIntoView:!!l,effects:d,userEvent:"input.replace"}),!0}),zit=Qb(function(t,n){var e=n.query;if(t.state.readOnly)return!1;var i=e.matchAll(t.state,1e9).map(function(o){return{from:o.from,to:o.to,insert:e.getReplacement(o)}});if(!i.length)return!1;var r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Wn.announce.of(r),userEvent:"input.replace.all"}),!0});function J4(t){return t.state.facet(FD).createPanel(t)}function K4(t,n){var e,i,r,o,s=t.selection.main,a=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(n&&!a)return n;var l=t.facet(FD);return new Ope({search:(null!==(e=n?.literal)&&void 0!==e?e:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(i=n?.caseSensitive)&&void 0!==i?i:l.caseSensitive,literal:null!==(r=n?.literal)&&void 0!==r?r:l.literal,wholeWord:null!==(o=n?.wholeWord)&&void 0!==o?o:l.wholeWord})}var Q4=function(t){var n=t.state.field(Pp,!1);if(n&&n.panel){var e=Vb(t,J4);if(!e)return!1;var i=e.dom.querySelector("[main-field]");if(i&&i!=t.root.activeElement){var r=K4(t.state,n.query.spec);r.valid&&t.dispatch({effects:Kb.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[Y4.of(!0),n?Kb.of(K4(t.state,n.query.spec)):cr.appendConfig.of(tR)]});return!0},Z4=function(t){var n=t.state.field(Pp,!1);if(!n||!n.panel)return!1;var e=Vb(t,J4);return e&&e.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Y4.of(!1)}),!0},Git=[{key:"Mod-f",run:Q4,scope:"editor search-panel"},{key:"F3",run:RD,shift:LD,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:RD,shift:LD,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Z4,scope:"editor search-panel"},{key:"Mod-Shift-l",run:function(t){var n=t.state,e=t.dispatch,i=n.selection;if(i.ranges.length>1||i.main.empty)return!1;for(var r=i.main,o=r.from,a=[],l=0,c=new o1(n.doc,n.sliceDoc(o,r.to));!c.next().done;){if(a.length>1e3)return!1;c.value.from==o&&(l=a.length),a.push(Qt.range(c.value.from,c.value.to))}return e(n.update({selection:Qt.create(a,l),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:function(t){var n=Vb(t,q4);if(!n){var e=[ND.of(!0)];null==t.state.field(Epe,!1)&&e.push(cr.appendConfig.of([Epe,Oit])),t.dispatch({effects:e}),n=Vb(t,q4)}return n&&n.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:function(t){var s,a,l,c,u,n=t.state,e=t.dispatch,i=n.selection.ranges;if(i.some(function(s){return s.from===s.to}))return l=(s={state:n,dispatch:e}).dispatch,!(u=Qt.create((c=(a=s.state).selection).ranges.map(function(d){return a.wordAt(d.head)||Qt.cursor(d.head)}),c.mainIndex)).eq(c)&&(l(a.update({selection:u})),!0);var r=n.sliceDoc(i[0].from,i[0].to);if(n.selection.ranges.some(function(s){return n.sliceDoc(s.from,s.to)!=r}))return!1;var o=function(s,a){for(var l=s.selection,c=l.main,u=l.ranges,d=s.wordAt(c.head),h=d&&d.from==c.from&&d.to==c.to,f=function(v,y){if(y.next(),!y.done){if(v&&u.some(function(C){return C.from==y.value.from}))return m=y,p=v,"continue";if(h){var b=s.wordAt(y.value.from);if(!b||b.from!=y.value.from||b.to!=y.value.to)return m=y,p=v,"continue"}return p=v,m=y,{v:y.value}}if(v)return m=y,p=v,{v:null};y=new o1(s.doc,a,0,Math.max(0,u[u.length-1].from-1)),p=v=!0,m=y},p=!1,m=new o1(s.doc,a,u[u.length-1].to);;){var g=f(p,m);if("continue"!==g&&"object"===gn(g))return g.v}}(n,r);return!!o&&(e(n.update({selection:n.selection.addRange(Qt.range(o.from,o.to),!1),effects:Wn.scrollIntoView(o.to)})),!0)},preventDefault:!0}],Wit=function(){function t(n){var e=this;Ce(this,t),this.view=n;var i=this.query=n.state.field(Pp).query.spec;function r(o,s,a){return Mo("button",{class:"cm-button",name:o,onclick:s,type:"button"},a)}this.commit=this.commit.bind(this),this.searchField=Mo("input",{value:i.search,placeholder:Ac(n,"Find"),"aria-label":Ac(n,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Mo("input",{value:i.replace,placeholder:Ac(n,"Replace"),"aria-label":Ac(n,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Mo("input",{type:"checkbox",name:"case",form:"",checked:i.caseSensitive,onchange:this.commit}),this.reField=Mo("input",{type:"checkbox",name:"re",form:"",checked:i.regexp,onchange:this.commit}),this.wordField=Mo("input",{type:"checkbox",name:"word",form:"",checked:i.wholeWord,onchange:this.commit}),this.dom=Mo("div",{onkeydown:function(o){return e.keydown(o)},class:"cm-search"},[this.searchField,r("next",function(){return RD(n)},[Ac(n,"next")]),r("prev",function(){return LD(n)},[Ac(n,"previous")]),r("select",function(){return Uit(n)},[Ac(n,"all")]),Mo("label",null,[this.caseField,Ac(n,"match case")]),Mo("label",null,[this.reField,Ac(n,"regexp")]),Mo("label",null,[this.wordField,Ac(n,"by word")])].concat(ri(n.state.readOnly?[]:[Mo("br"),this.replaceField,r("replace",function(){return Npe(n)},[Ac(n,"replace")]),r("replaceAll",function(){return zit(n)},[Ac(n,"replace all")])]),[Mo("button",{name:"close",onclick:function(){return Z4(n)},"aria-label":Ac(n,"close"),type:"button"},["\xd7"])]))}return Se(t,[{key:"commit",value:function(){var n=new Ope({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});n.eq(this.query)||(this.query=n,this.view.dispatch({effects:Kb.of(n)}))}},{key:"keydown",value:function(n){!function(e,i,r){return Ohe(Mhe(e.state),i,e,"search-panel")}(this.view,n)?13==n.keyCode&&n.target==this.searchField?(n.preventDefault(),(n.shiftKey?LD:RD)(this.view)):13==n.keyCode&&n.target==this.replaceField&&(n.preventDefault(),Npe(this.view)):n.preventDefault()}},{key:"update",value:function(n){var e,i=Re(n.transactions);try{for(i.s();!(e=i.n()).done;){var r,o=Re(e.value.effects);try{for(o.s();!(r=o.n()).done;){var s=r.value;s.is(Kb)&&!s.value.eq(this.query)&&this.setQuery(s.value)}}catch(a){o.e(a)}finally{o.f()}}}catch(a){i.e(a)}finally{i.f()}}},{key:"setQuery",value:function(n){this.query=n,this.searchField.value=n.search,this.replaceField.value=n.replace,this.caseField.checked=n.caseSensitive,this.reField.checked=n.regexp,this.wordField.checked=n.wholeWord}},{key:"mount",value:function(){this.searchField.select()}},{key:"pos",get:function(){return 80}},{key:"top",get:function(){return this.view.state.facet(FD).top}}]),t}();function Ac(t,n){return t.state.phrase(n)}var $D=/[\s\.,:;?!]/;function eR(t,n){var e=n.from,i=n.to,r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,s=Math.max(r.from,e-30),a=Math.min(o,i+30),l=t.state.sliceDoc(s,a);if(s!=r.from)for(var c=0;c<30;c++)if(!$D.test(l[c+1])&&$D.test(l[c])){l=l.slice(c);break}if(a!=o)for(var u=l.length-1;u>l.length-30;u--)if(!$D.test(l[u-1])&&$D.test(l[u])){l=l.slice(0,u);break}return Wn.announce.of("".concat(t.state.phrase("current match"),". ").concat(l," ").concat(t.state.phrase("on line")," ").concat(r.number,"."))}var qit=Wn.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),tR=[Pp,G0.lowest(Hit),qit],Fpe=function(){function t(n,e,i){Ce(this,t),this.state=n,this.pos=e,this.explicit=i,this.abortListeners=[]}return Se(t,[{key:"tokenBefore",value:function(n){for(var e=al(this.state).resolveInner(this.pos,-1);e&&n.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}},{key:"matchBefore",value:function(n){var e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(Rpe(n,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}},{key:"aborted",get:function(){return null==this.abortListeners}},{key:"addEventListener",value:function(n,e){"abort"==n&&this.abortListeners&&this.abortListeners.push(e)}}]),t}();function Ppe(t){var n=Object.keys(t).join(""),e=/\w/.test(n);return e&&(n=n.replace(/\w/g,"")),"[".concat(e?"\\w":"").concat(n.replace(/[^\w\s]/g,"\\$&"),"]")}var jpe=Se(function t(n,e,i){Ce(this,t),this.completion=n,this.source=e,this.match=i});function jp(t){return t.selection.main.head}function Rpe(t,n){var e,i=t.source,r=n&&"^"!=i[0],o="$"!=i[i.length-1];return r||o?new RegExp("".concat(r?"^":"","(?:").concat(i,")").concat(o?"$":""),null!==(e=t.flags)&&void 0!==e?e:t.ignoreCase?"i":""):t}function Lpe(t,n){var r,o,s,a,e=n.completion.apply||n.completion.label,i=n.source;"string"==typeof e?t.dispatch((r=t.state,o=e,s=i.from,a=i.to,Object.assign(Object.assign({},r.changeByRange(function(l){if(l==r.selection.main)return{changes:{from:s,to:a,insert:o},range:Qt.cursor(s+o.length)};var c=a-s;return!l.empty||c&&r.sliceDoc(l.from-c,l.from)!=r.sliceDoc(s,a)?{range:l}:{changes:{from:l.from-c,to:l.from,insert:o},range:Qt.cursor(l.from-c+o.length)}})),{userEvent:"input.complete"}))):e(t,n.completion,i.from,i.to)}var $pe=new WeakMap;function Xit(t){if(!Array.isArray(t))return t;var n=$pe.get(t);return n||$pe.set(t,n=function Yit(t){var n=t.map(function(s){return"string"==typeof s?{label:s}:s}),i=zn(n.every(function(s){return/^\w+$/.test(s.label)})?[/\w*$/,/\w+$/]:function(s){var a,l=Object.create(null),c=Object.create(null),u=Re(s);try{for(u.s();!(a=u.n()).done;){var d=a.value.label;l[d[0]]=!0;for(var h=1;h=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(U=pj(R))!=U.toLowerCase()?1:U!=U.toUpperCase()?2:0;(!D||1==G&&C||0==z&&0!=G)&&(e[m]==R||i[m]==R&&(g=!0)?s[m++]=D:s.length&&(k=!1)),z=G,D+=kc(R)}return m==c&&0==s[0]&&k?this.result((g?-200:0)-100,s,n):v==c&&0==y?[-200-n.length,0,b]:l>-1?[-700-n.length,l,l+this.pattern.length]:v==c?[-900-n.length,y,b]:m==c?this.result((g?-200:0)-100-700+(k?0:-1100),s,n):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,n)}},{key:"result",value:function(n,e,i){var r,o=[n-i.length],s=1,a=Re(e);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=l+(this.astral?kc($a(i,l)):1);s>1&&o[s-1]==l?o[s-1]=c:(o[s++]=l,o[s++]=c)}}catch(u){a.e(u)}finally{a.f()}return o}}]),t}(),wh=Qn.define({combine:function(t){return lu(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:function(){return""},aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:function(n,e){return n.label.localeCompare(e.label)}},{defaultKeymap:function(n,e){return n&&e},closeOnBlur:function(n,e){return n&&e},icons:function(n,e){return n&&e},optionClass:function(n,e){return function(i){return r=n(i),o=e(i),r?o?r+" "+o:r:o;var r,o}},addToOptions:function(n,e){return n.concat(e)}})}});function Bpe(t,n,e){if(t<=e)return{from:0,to:t};if(n<0&&(n=0),n<=t>>1){var i=Math.floor(n/e);return{from:i*e,to:(i+1)*e}}var r=Math.floor((t-n)/e);return{from:t-(r+1)*e,to:t-r*e}}var Kit=function(){function t(n,e){var i=this;Ce(this,t),this.view=n,this.stateField=e,this.info=null,this.placeInfo={read:function(){return i.measureInfo()},write:function(c){return i.positionInfo(c)},key:this};var c,u,r=n.state.field(e),o=r.open,s=o.options,a=o.selected,l=n.state.facet(wh);this.optionContent=(u=(c=l).addToOptions.slice(),c.icons&&u.push({render:function(d){var h,f=document.createElement("div");return f.classList.add("cm-completionIcon"),d.type&&(h=f.classList).add.apply(h,ri(d.type.split(/\s+/g).map(function(p){return"cm-completionIcon-"+p}))),f.setAttribute("aria-hidden","true"),f},position:20}),u.push({render:function(d,h,f){var p=document.createElement("span");p.className="cm-completionLabel";for(var m=d.label,g=0,v=1;vg&&p.appendChild(document.createTextNode(m.slice(g,y)));var C=p.appendChild(document.createElement("span"));C.appendChild(document.createTextNode(m.slice(y,b))),C.className="cm-completionMatchedText",g=b}return g=this.range.to)&&(this.range=Bpe(i.options.length,i.selected,this.view.state.facet(wh).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(i.options,e.id,this.range)),this.list.addEventListener("scroll",function(){n.info&&n.view.requestMeasure(n.placeInfo)})),this.updateSelectedOption(i.selected)){this.info&&(this.info.remove(),this.info=null);var r=i.options[i.selected].completion,o=r.info;if(!o)return;var s="string"==typeof o?document.createTextNode(o):o(r);if(!s)return;"then"in s?s.then(function(a){a&&n.view.state.field(n.stateField,!1)==e&&n.addInfoPane(a)}).catch(function(a){return Ec(n.view.state,a,"completion info")}):this.addInfoPane(s)}}},{key:"addInfoPane",value:function(n){var e=this.info=document.createElement("div");e.className="cm-tooltip cm-completionInfo",e.appendChild(n),this.dom.appendChild(e),this.view.requestMeasure(this.placeInfo)}},{key:"updateSelectedOption",value:function(n){for(var e=null,i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==n?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return e&&(s=e,a=(o=this.list).getBoundingClientRect(),(l=s.getBoundingClientRect()).topa.bottom&&(o.scrollTop+=l.bottom-a.bottom)),e;var o,s,a,l}},{key:"measureInfo",value:function(){var n=this.dom.querySelector("[aria-selected]");if(!n||!this.info)return null;var e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top>Math.min(innerHeight,e.bottom)-10||r.bottom=this.options.length?this:new t(this.options,Hpe(e,n),this.tooltip,this.timestamp,n)}},{key:"map",value:function(n){return new t(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:n.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}],[{key:"build",value:function(n,e,i,r,o){var s=function(d,h){var f,p=[],m=0,g=Re(d);try{for(g.s();!(f=g.n()).done;){var v=f.value;if(v.hasResult())if(!1===v.result.filter){var y,b=v.result.getMatch,C=Re(v.result.options);try{for(C.s();!(y=C.n()).done;){var k=y.value,D=[1e9-m++];if(b){var L,z=Re(b(k));try{for(z.s();!(L=z.n()).done;)D.push(L.value)}catch(N){z.e(N)}finally{z.f()}}p.push(new jpe(k,v,D))}}catch(N){C.e(N)}finally{C.f()}}else{var U,G=new Jit(h.sliceDoc(v.from,v.to)),X=void 0,te=Re(v.result.options);try{for(te.s();!(U=te.n()).done;){var P=U.value;(X=G.match(P.label))&&(null!=P.boost&&(X[0]+=P.boost),p.push(new jpe(P,v,X)))}}catch(N){te.e(N)}finally{te.f()}}}}catch(N){g.e(N)}finally{g.f()}var W,J=[],H=null,le=h.facet(wh).compareCompletions,E=Re(p.sort(function(N,q){return q.match[0]-N.match[0]||le(N.completion,q.completion)}));try{for(E.s();!(W=E.n()).done;){var I=W.value;!H||H.label!=I.completion.label||H.detail!=I.completion.detail||null!=H.type&&null!=I.completion.type&&H.type!=I.completion.type||H.apply!=I.completion.apply?J.push(I):Vpe(I.completion)>Vpe(H)&&(J[J.length-1]=I),H=I.completion}}catch(N){E.e(N)}finally{E.f()}return J}(n,e);if(!s.length)return null;var a,l=e.facet(wh).selectOnOpen?0:-1;if(r&&r.selected!=l&&-1!=r.selected)for(var c=r.options[r.selected].completion,u=0;u-1&&(e["aria-activedescendant"]=t+"-"+n),e}var trt=[];function nR(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}var mg=function(){function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;Ce(this,t),this.source=n,this.state=e,this.explicitPos=i}return Se(t,[{key:"hasResult",value:function(){return!1}},{key:"update",value:function(n,e){var i=nR(n),r=this;i?r=r.handleUserEvent(n,i,e):n.docChanged?r=r.handleChange(n):n.selection&&0!=r.state&&(r=new t(r.source,0));var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;if(a.is(iR))r=new t(r.source,1,a.value?jp(n.state):-1);else if(a.is(BD))r=new t(r.source,0);else if(a.is(Upe)){var l,c=Re(a.value);try{for(c.s();!(l=c.n()).done;){var u=l.value;u.source==r.source&&(r=u)}}catch(d){c.e(d)}finally{c.f()}}}}catch(d){s.e(d)}finally{s.f()}return r}},{key:"handleUserEvent",value:function(n,e,i){return"delete"!=e&&i.activateOnTyping?new t(this.source,1):this.map(n.changes)}},{key:"handleChange",value:function(n){return n.changes.touchesRange(jp(n.startState))?new t(this.source,0):this.map(n.changes)}},{key:"map",value:function(n){return n.empty||this.explicitPos<0?this:new t(this.source,this.state,n.mapPos(this.explicitPos))}}]),t}(),nrt=function(t){wt(e,mg);var n=Ct(e);function e(i,r,o,s,a){var l;return Ce(this,e),(l=n.call(this,i,2,r)).result=o,l.from=s,l.to=a,l}return Se(e,[{key:"hasResult",value:function(){return!0}},{key:"handleUserEvent",value:function(i,r,o){var s,a=i.changes.mapPos(this.from),l=i.changes.mapPos(this.to,1),c=jp(i.state);if((this.explicitPos<0?c<=a:cl||"delete"==r&&jp(i.startState)==this.from)return new mg(this.source,"input"==r&&o.activateOnTyping?1:0);var u,d=this.explicitPos<0?-1:i.changes.mapPos(this.explicitPos);return function(h,f,p,m){if(!h)return!1;var g=f.sliceDoc(p,m);return"function"==typeof h?h(g,p,m,f):Rpe(h,!0).test(g)}(this.result.validFor,i.state,a,l)?new e(this.source,d,this.result,a,l):this.result.update&&(u=this.result.update(this.result,a,l,new Fpe(i.state,c,d>=0)))?new e(this.source,d,u,u.from,null!==(s=u.to)&&void 0!==s?s:jp(i.state)):new mg(this.source,1,d)}},{key:"handleChange",value:function(i){return i.changes.touchesRange(this.from,this.to)?new mg(this.source,0):this.map(i.changes)}},{key:"map",value:function(i){return i.empty?this:new e(this.source,this.explicitPos<0?-1:i.mapPos(this.explicitPos),this.result,i.mapPos(this.from),i.mapPos(this.to,1))}}]),e}(),iR=cr.define(),BD=cr.define(),Upe=cr.define({map:function(t,n){return t.map(function(e){return e.map(n)})}}),zpe=cr.define(),hu=Ba.define({create:function(){return Zit.start()},update:function(t,n){return t.update(n)},provide:function(t){return[sD.from(t,function(n){return n.tooltip}),Wn.contentAttributes.from(t,function(n){return n.attrs})]}});function VD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"option";return function(e){var i=e.state.field(hu,!1);if(!i||!i.open||Date.now()-i.open.timestamp<75)return!1;var r,o=1;"page"==n&&(r=function rnt(t,n){var e=t.plugin(Whe);if(!e)return null;var i=e.manager.tooltips.indexOf(n);return i<0?null:e.manager.tooltipViews[i]}(e,i.open.tooltip))&&(o=Math.max(2,Math.floor(r.dom.offsetHeight/r.dom.querySelector("li").offsetHeight)-1));var s=i.open.options.length,a=i.open.selected>-1?i.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==n?0:s-1:a>=s&&(a="page"==n?s-1:0),e.dispatch({effects:zpe.of(a)}),!0}}var irt=Se(function t(n,e){Ce(this,t),this.active=n,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}),rrt=wa.fromClass(function(){function t(n){Ce(this,t),this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;var e,i=Re(n.state.field(hu).active);try{for(i.s();!(e=i.n()).done;){var r=e.value;1==r.state&&this.startQuery(r)}}catch(o){i.e(o)}finally{i.f()}}return Se(t,[{key:"update",value:function(n){var e=this,i=n.state.field(hu);if(n.selectionSet||n.docChanged||n.startState.field(hu)!=i){for(var r=n.transactions.some(function(p){return(p.selection||p.docChanged)&&!nR(p)}),o=0;o50&&Date.now()-s.time>1e3){var a,l=Re(s.context.abortListeners);try{for(l.s();!(a=l.n()).done;){var c=a.value;try{c()}catch(p){Ec(this.view.state,p)}}}catch(p){l.e(p)}finally{l.f()}s.context.abortListeners=null,this.running.splice(o--,1)}else{var u;(u=s.updates).push.apply(u,ri(n.transactions))}}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=i.active.some(function(p){return 1==p.state&&!e.running.some(function(m){return m.active.source==p.source})})?setTimeout(function(){return e.startUpdate()},50):-1,0!=this.composing){var d,h=Re(n.transactions);try{for(h.s();!(d=h.n()).done;){var f=d.value;"input"==nR(f)?this.composing=2:2==this.composing&&f.selection&&(this.composing=3)}}catch(p){h.e(p)}finally{h.f()}}}}},{key:"startUpdate",value:function(){var n=this;this.debounceUpdate=-1;var e,i=Re(this.view.state.field(hu).active);try{var r=function(){var o=e.value;1!=o.state||n.running.some(function(s){return s.active.source==o.source})||n.startQuery(o)};for(i.s();!(e=i.n()).done;)r()}catch(o){i.e(o)}finally{i.f()}}},{key:"startQuery",value:function(n){var e=this,i=this.view.state,r=jp(i),o=new Fpe(i,r,n.explicitPos==r),s=new irt(n,o);this.running.push(s),Promise.resolve(n.source(o)).then(function(a){s.context.aborted||(s.done=a||null,e.scheduleAccept())},function(a){e.view.dispatch({effects:BD.of(null)}),Ec(e.view.state,a)})}},{key:"scheduleAccept",value:function(){var n=this;this.running.every(function(e){return void 0!==e.done})?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(function(){return n.accept()},50))}},{key:"accept",value:function(){var n,e=this;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;for(var i=[],r=this.view.state.facet(wh),o=function(a){var l=e.running[a];if(void 0===l.done)return s=a,"continue";if(e.running.splice(a--,1),l.done){var c,u=new nrt(l.active.source,l.active.explicitPos,l.done,l.done.from,null!==(n=l.done.to)&&void 0!==n?n:jp(l.updates.length?l.updates[0].startState:e.view.state)),d=Re(l.updates);try{for(d.s();!(c=d.n()).done;)u=u.update(c.value,r)}catch(y){d.e(y)}finally{d.f()}if(u.hasResult())return i.push(u),s=a,"continue"}var f=e.view.state.field(hu).active.find(function(y){return y.source==l.active.source});if(f&&1==f.state)if(null==l.done){var p,m=new mg(l.active.source,0),g=Re(l.updates);try{for(g.s();!(p=g.n()).done;)m=m.update(p.value,r)}catch(y){g.e(y)}finally{g.f()}1!=m.state&&i.push(m)}else e.startQuery(f);s=a},s=0;s ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25cb'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25cc'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1d465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1d436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1d461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222a'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25a1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1f511}\ufe0e'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25a2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),HD={brackets:["(","[","{","'",'"'],before:")]}:;>"},gg=cr.define({map:function(t,n){return n.mapPos(t,-1,Tl.TrackAfter)??void 0}}),rR=cr.define({map:function(t,n){return n.mapPos(t)}}),oR=new(function(t){wt(e,cg);var n=Ct(e);function e(){return Ce(this,e),n.apply(this,arguments)}return Se(e)}());oR.startSide=1,oR.endSide=-1;var Gpe=Ba.define({create:function(){return Ho.empty},update:function(t,n){if(n.selection){var e=n.state.doc.lineAt(n.selection.main.head).from,i=n.startState.doc.lineAt(n.startState.selection.main.head).from;e!=n.changes.mapPos(i,-1)&&(t=Ho.empty)}t=t.map(n.changes);var r,o=Re(n.effects);try{var s=function(){var a=r.value;a.is(gg)?t=t.update({add:[oR.range(a.value,a.value+1)]}):a.is(rR)&&(t=t.update({filter:function(l){return l!=a.value}}))};for(o.s();!(r=o.n()).done;)s()}catch(a){o.e(a)}finally{o.f()}return t}});function Wpe(t){for(var n=0;n<8;n+=2)if("()[]{}<>".charCodeAt(n)==t)return"()[]{}<>".charAt(n+1);return pj(t<128?t:t+1)}function qpe(t,n){return t.languageDataAt("closeBrackets",n)[0]||HD}var srt="object"==(typeof navigator>"u"?"undefined":gn(navigator))&&/Android\b/.test(navigator.userAgent),art=Wn.inputHandler.of(function(t,n,e,i){if((srt?t.composing:t.compositionStarted)||t.state.readOnly)return!1;var r=t.state.selection.main;if(i.length>2||2==i.length&&1==kc($a(i,0))||n!=r.from||e!=r.to)return!1;var o=function(s,a){var l,c=qpe(s,s.selection.main.head),u=c.brackets||HD.brackets,d=Re(u);try{for(d.s();!(l=d.n()).done;){var h=l.value,f=Wpe($a(h,0));if(a==h)return f==h?drt(s,h,u.indexOf(h+h+h)>-1):crt(s,h,f,c.before||HD.before);if(a==f&&Ype(s,s.selection.main.from))return urt(s,0,f)}}catch(p){d.e(p)}finally{d.f()}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)}),lrt=[{key:"Backspace",run:function(t){var n=t.state,e=t.dispatch;if(n.readOnly)return!1;var i=qpe(n,n.selection.main.head).brackets||HD.brackets,r=null,o=n.changeByRange(function(s){if(s.empty){var a,l=kc($a(f=(d=n.doc).sliceString((h=s.head)-2,h),0))==f.length?f:f.slice(1),c=Re(i);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(u==l&&UD(n.doc,s.head)==Wpe($a(u,0)))return{changes:{from:s.head-u.length,to:s.head+u.length},range:Qt.cursor(s.head-u.length),userEvent:"delete.backward"}}}catch(d){c.e(d)}finally{c.f()}}var d,h,f;return{range:r=s}});return r||e(n.update(o,{scrollIntoView:!0})),!r}}];function Ype(t,n){var e=!1;return t.field(Gpe).between(0,t.doc.length,function(i){i==n&&(e=!0)}),e}function UD(t,n){var e=t.sliceString(n,n+2);return e.slice(0,kc($a(e,0)))}function crt(t,n,e,i){var r=null,o=t.changeByRange(function(s){if(!s.empty)return{changes:[{insert:n,from:s.from},{insert:e,from:s.to}],effects:gg.of(s.to+n.length),range:Qt.range(s.anchor+n.length,s.head+n.length)};var a=UD(t.doc,s.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:n+e,from:s.head},effects:gg.of(s.head+n.length),range:Qt.cursor(s.head+n.length)}:{range:r=s}});return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function urt(t,n,e){var i=null,r=t.selection.ranges.map(function(o){return o.empty&&UD(t.doc,o.head)==e?Qt.cursor(o.head+e.length):i=o});return i?null:t.update({selection:Qt.create(r,t.selection.mainIndex),scrollIntoView:!0,effects:t.selection.ranges.map(function(o){return rR.of(o.from)})})}function drt(t,n,e){var i=null,r=t.changeByRange(function(o){if(!o.empty)return{changes:[{insert:n,from:o.from},{insert:n,from:o.to}],effects:gg.of(o.to+n.length),range:Qt.range(o.anchor+n.length,o.head+n.length)};var s=o.head,a=UD(t.doc,s);if(a==n){if(Xpe(t,s))return{changes:{insert:n+n,from:s},effects:gg.of(s+n.length),range:Qt.cursor(s+n.length)};if(Ype(t,s)){var l=e&&t.sliceDoc(s,s+3*n.length)==n+n+n;return{range:Qt.cursor(s+n.length*(l?3:1)),effects:rR.of(s)}}}else{if(e&&t.sliceDoc(s-2*n.length,s)==n+n&&Xpe(t,s-2*n.length))return{changes:{insert:n+n+n+n,from:s},effects:gg.of(s+n.length),range:Qt.cursor(s+n.length)};if(t.charCategorizer(s)(a)!=is.Word){var c=t.sliceDoc(s-1,s);if(c!=n&&t.charCategorizer(s)(c)!=is.Word&&!function(u,d,h){for(var f=al(u).resolveInner(d,-1),p=0;p<5;p++){if(u.sliceDoc(f.from,f.from+h.length)==h){for(var m=f.firstChild;m&&m.from==f.from&&m.to-m.from>h.length;){if(u.sliceDoc(m.to-h.length,m.to)==h)return!1;m=m.firstChild}return!0}var g=f.to==d&&f.parent;if(!g)break;f=g}return!1}(t,s,n))return{changes:{insert:n+n,from:s},effects:gg.of(s+n.length),range:Qt.cursor(s+n.length)}}}return{range:i=o}});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Xpe(t,n){var e=al(t).resolveInner(n+1);return e.parent&&e.from==n}function hrt(){return[hu,wh.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),rrt,frt,ort]}var Jpe=[{key:"Ctrl-Space",run:function(t){return!!t.state.field(hu,!1)&&(t.dispatch({effects:iR.of(!0)}),!0)}},{key:"Escape",run:function(t){var n=t.state.field(hu,!1);return!(!n||!n.active.some(function(e){return 0!=e.state})||(t.dispatch({effects:BD.of(null)}),0))}},{key:"ArrowDown",run:VD(!0)},{key:"ArrowUp",run:VD(!1)},{key:"PageDown",run:VD(!0,"page")},{key:"PageUp",run:VD(!1,"page")},{key:"Enter",run:function(t){var n=t.state.field(hu,!1);return!(t.state.readOnly||!n||!n.open||Date.now()-n.open.timestamp<75||n.open.selected<0||(Lpe(t,n.open.options[n.open.selected]),0))}}],frt=G0.highest(iD.computeN([wh],function(t){return t.facet(wh).defaultKeymap?[Jpe]:[]})),prt=Se(function t(n,e,i){Ce(this,t),this.from=n,this.to=e,this.diagnostic=i}),Zb=function(){function t(n,e,i){Ce(this,t),this.diagnostics=n,this.panel=e,this.selected=i}return Se(t,null,[{key:"init",value:function(n,e,i){var r=n,o=i.facet(vg).markerFilter;o&&(r=o(r));var s=mi.set(r.map(function(a){return a.from==a.to||a.from==a.to-1&&i.doc.lineAt(a.from).to==a.from?mi.widget({widget:new _rt(a),diagnostic:a}).range(a.from):mi.mark({attributes:{class:"cm-lintRange cm-lintRange-"+a.severity},diagnostic:a}).range(a.from,a.to)}),!0);return new t(s,e,l1(s))}}]),t}();function l1(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=null;return t.between(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,1e9,function(r,o,s){var a=s.spec;if(!n||a.diagnostic==n)return i=new prt(r,o,a.diagnostic),!1}),i}function Kpe(t,n){return!(!t.effects.some(function(e){return e.is(zD)})&&!t.changes.touchesRange(n.pos))}function Qpe(t,n){return t.field(Mc,!1)?n:n.concat(cr.appendConfig.of([Mc,Wn.decorations.compute([Mc],function(e){var i=e.field(Mc),r=i.selected;return r&&i.panel&&r.from!=r.to?mi.set([mrt.range(r.from,r.to)]):mi.none}),int(grt,{hideOn:Kpe}),brt]))}var zD=cr.define(),sR=cr.define(),Zpe=cr.define(),Mc=Ba.define({create:function(){return new Zb(mi.none,null,null)},update:function(t,n){if(n.docChanged){var e=t.diagnostics.map(n.changes),i=null;if(t.selected){var r=n.changes.mapPos(t.selected.from,1);i=l1(e,t.selected.diagnostic,r)||l1(e,null,r)}t=new Zb(e,t.panel,i)}var o,s=Re(n.effects);try{for(s.s();!(o=s.n()).done;){var a=o.value;a.is(zD)?t=Zb.init(a.value,t.panel,n.state):a.is(sR)?t=new Zb(t.diagnostics,a.value?ome.open:null,t.selected):a.is(Zpe)&&(t=new Zb(t.diagnostics,t.panel,a.value))}}catch(l){s.e(l)}finally{s.f()}return t},provide:function(t){return[Hb.from(t,function(n){return n.panel}),Wn.decorations.from(t,function(n){return n.diagnostics})]}}),mrt=mi.mark({class:"cm-lintRange cm-lintRange-active"});function grt(t,n,e){var i=t.state.field(Mc).diagnostics,r=[],o=2e8,s=0;i.between(n-(e<0?1:0),n+(e>0?1:0),function(l,c,u){n>=l&&n<=c&&(l==c||(n>l||e>0)&&(n=65&&i.keyCode<=90&&e.selectedIndex>=0))return;for(var r=e.items[e.selectedIndex].diagnostic,o=nme(r.actions),s=0;so&&(n.items.splice(o,f-o),s=!0)),r&&d.diagnostic==r.diagnostic?d.dom.hasAttribute("aria-selected")||(d.dom.setAttribute("aria-selected","true"),a=d):d.dom.hasAttribute("aria-selected")&&d.dom.removeAttribute("aria-selected"),o++});ou.bottom&&(n.list.scrollTop+=c.bottom-u.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}},{key:"sync",value:function(){var n=this.list.firstChild;function e(){var s=n;n=s.nextSibling,s.remove()}var i,r=Re(this.items);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(o.dom.parentNode==this.list){for(;n!=o.dom;)e();n=o.dom.nextSibling}else this.list.insertBefore(o.dom,n)}}catch(s){r.e(s)}finally{r.f()}for(;n;)e()}},{key:"moveSelection",value:function(n){if(!(this.selectedIndex<0)){var e=l1(this.view.state.field(Mc).diagnostics,this.items[n].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Zpe.of(e)})}}}],[{key:"open",value:function(n){return new t(n)}}]),t}();function GD(t){return'url(\'data:image/svg+xml,1&&void 0!==arguments[1]?arguments[1]:'viewBox="0 0 40 40"',">").concat(encodeURIComponent(t),"')")}function aR(t){return GD(''),'width="6" height="3"')}var brt=Wn.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:aR("#d11")},".cm-lintRange-warning":{backgroundImage:aR("orange")},".cm-lintRange-info":{backgroundImage:aR("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),xrt=function(t){wt(e,gh);var n=Ct(e);function e(i){var r;return Ce(this,e),(r=n.call(this)).diagnostics=i,r.severity=i.reduce(function(o,s){var a=s.severity;return"error"==a||"warning"==a&&"info"==o?a:o},"info"),r}return Se(e,[{key:"toDOM",value:function(i){var r=document.createElement("div");r.className="cm-lint-marker cm-lint-marker-"+this.severity;var o=this.diagnostics,s=i.state.facet(WD).tooltipFilter;return s&&(o=s(o)),o.length&&(r.onmouseover=function(){return function(a,l,c){function u(){var p,m,f=a.elementAtHeight(l.getBoundingClientRect().top+5-a.documentTop);a.coordsAtPos(f.from)&&a.dispatch({effects:lR.of({pos:f.from,above:!1,create:function(){return{dom:eme(a,c),getCoords:function(){return l.getBoundingClientRect()}}}})}),l.onmouseout=l.onmousemove=null,p=a,m=l,window.addEventListener("mousemove",function v(y){var b=m.getBoundingClientRect();if(!(y.clientX>b.left-10&&y.clientXb.top-10&&y.clientY')},".cm-lint-marker-warning":{content:GD('')},".cm-lint-marker-error":{content:GD('')}}),WD=Qn.define({combine:function(t){return lu(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})}});function krt(){return[WD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),sme,Crt,Srt,ame]}var lme,Drt=function(){return[dnt(),fnt,Btt(),mit(),Hnt(),Itt(),[Bb,jtt],Ao.allowMultipleSelections.of(!0),Ao.transactionFilter.of(function(e){if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;var i=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!i.length)return e;var r=e.newDoc,o=e.newSelection.main.head,s=r.lineAt(o);if(o>s.from+200)return e;var a=r.sliceString(s.from,o);if(!i.some(function(y){return y.test(a)}))return e;var l,c=e.state,u=-1,d=[],h=Re(c.selection.ranges);try{for(h.s();!(l=h.n()).done;){var p=c.doc.lineAt(l.value.head);if(p.from!=u){u=p.from;var m=T4(c,p.from);if(null!=m){var g=/^\s*/.exec(p.text)[0],v=Yb(c,m);g!=v&&d.push({from:p.from,to:p.from+g.length,insert:v})}}}}catch(y){h.e(y)}finally{h.f()}return d.length?[e,{changes:d,sequential:!0}]:e}),Ofe(Wnt,{fallback:!0}),Znt(),[art,Gpe],hrt(),qtt(),Jtt(),Gtt,(n=[jit,Pit],n),iD.of([].concat(lrt,ri(Ait),Git,Cit,$nt,Jpe,vrt))];var n}(),Trt=function(){function t(n,e,i,r,o,s,a,l,c){var u=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,d=arguments.length>10?arguments[10]:void 0;Ce(this,t),this.p=n,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}return Se(t,[{key:"toString",value:function(){return"[".concat(this.stack.filter(function(n,e){return e%3==0}).concat(this.state),"]@").concat(this.pos).concat(this.score?"!"+this.score:"")}},{key:"context",get:function(){return this.curContext?this.curContext.context:null}},{key:"pushState",value:function(n,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=n}},{key:"reduce",value:function(n){var e=n>>19,i=65535&n,r=this.p.parser,o=r.dynamicPrecedence(i);if(o&&(this.score+=o),0==e)return this.pushState(r.getGoto(this.state,i,!0),this.reducePos),is;)this.stack.pop();this.reduceContext(i,a)}},{key:"storeNode",value:function(n,e,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(0==n&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==s.buffer[a-4]&&s.buffer[a-1]>-1){if(e==i)return;if(s.buffer[a-2]>=e)return void(s.buffer[a-2]=i)}}if(o&&this.pos!=i){var l=this.buffer.length;if(l>0&&0!=this.buffer[l-4])for(;l>0&&this.buffer[l-2]>i;)this.buffer[l]=this.buffer[l-4],this.buffer[l+1]=this.buffer[l-3],this.buffer[l+2]=this.buffer[l-2],this.buffer[l+3]=this.buffer[l-1],l-=4,r>4&&(r-=4);this.buffer[l]=n,this.buffer[l+1]=e,this.buffer[l+2]=i,this.buffer[l+3]=r}else this.buffer.push(n,e,i,r)}},{key:"shift",value:function(n,e,i){var r=this.pos;if(131072&n)this.pushState(65535&n,this.pos);else if(262144&n)this.pos=i,this.shiftContext(e,r),e<=this.p.parser.maxNode&&this.buffer.push(e,r,i,4);else{var o=n,s=this.p.parser;(i>this.pos||e<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(e,r),e<=s.maxNode&&this.buffer.push(e,r,i,4)}}},{key:"apply",value:function(n,e,i){65536&n?this.reduce(n):this.shift(n,e,i)}},{key:"useNode",value:function(n,e){var i=this.p.reused.length-1;(i<0||this.p.reused[i]!=n)&&(this.p.reused.push(n),i++);var r=this.pos;this.reducePos=this.pos=r+n.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,n,this,this.p.stream.reset(this.pos-n.length)))}},{key:"split",value:function(){for(var n=this,e=n.buffer.length;e>0&&n.buffer[e-2]>n.reducePos;)e-=4;for(var i=n.buffer.slice(e),r=n.bufferBase+e;n&&r==n.bufferBase;)n=n.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,n)}},{key:"recoverByDelete",value:function(n,e){var i=n<=this.p.parser.maxNode;i&&this.storeNode(n,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}},{key:"canShift",value:function(n){for(var e=new Ert(this);;){var i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,n);if(!(65536&i))return!0;if(0==i)return!1;e.reduce(i)}}},{key:"recoverByInsert",value:function(n){if(this.stack.length>=300)return[];var e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){for(var i,r=[],o=0;o>19);if(o<0||e.getGoto(this.stack[o],65535&n,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}},{key:"forceAll",value:function(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}},{key:"deadEnd",get:function(){if(3!=this.stack.length)return!1;var n=this.p.parser;return 65535==n.data[n.stateSlot(this.state,1)]&&!n.stateSlot(this.state,4)}},{key:"restart",value:function(){this.state=this.stack[0],this.stack.length=0}},{key:"sameState",value:function(n){if(this.state!=n.state||this.stack.length!=n.stack.length)return!1;for(var e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=n)}},{key:"close",value:function(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}],[{key:"start",value:function(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=n.parser.context;return new t(n,[],e,i,i,0,[],0,r?new cme(r,r.start):null,0,null)}}]),t}(),cme=Se(function t(n,e){Ce(this,t),this.tracker=n,this.context=e,this.hash=n.strict?n.hash(e):0});!function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"}(lme||(lme={}));var Ert=function(){function t(n){Ce(this,t),this.start=n,this.state=n.state,this.stack=n.stack,this.base=this.stack.length}return Se(t,[{key:"reduce",value:function(n){var e=65535&n,i=n>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);var r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}]),t}(),Art=function(){function t(n,e,i){Ce(this,t),this.stack=n,this.pos=e,this.index=i,this.buffer=n.buffer,0==this.index&&this.maybeNext()}return Se(t,[{key:"maybeNext",value:function(){var n=this.stack.parent;null!=n&&(this.index=this.stack.bufferBase-n.bufferBase,this.stack=n,this.buffer=n.buffer)}},{key:"id",get:function(){return this.buffer[this.index-4]}},{key:"start",get:function(){return this.buffer[this.index-3]}},{key:"end",get:function(){return this.buffer[this.index-2]}},{key:"size",get:function(){return this.buffer[this.index-1]}},{key:"next",value:function(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}},{key:"fork",value:function(){return new t(this.stack,this.pos,this.index)}}],[{key:"create",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.bufferBase+n.buffer.length;return new t(n,e,e-n.bufferBase)}}]),t}(),qD=Se(function t(){Ce(this,t),this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}),ume=new qD,Mrt=function(){function t(n,e){Ce(this,t),this.input=n,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ume,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}return Se(t,[{key:"resolveOffset",value:function(n,e){for(var i=this.range,r=this.rangeIndex,o=this.pos+n;oi.to:o>=i.to;){if(r==this.ranges.length-1)return null;var a=this.ranges[++r];o+=a.from-i.to,i=a}return o}},{key:"clipPos",value:function(n){if(n>=this.range.from&&nn)return Math.max(n,r.from)}}catch(o){i.e(o)}finally{i.f()}return this.end}},{key:"peek",value:function(n){var e,i,r=this.chunkOff+n;if(r>=0&&r=this.chunk2Pos&&ea.to&&(this.chunk2=this.chunk2.slice(0,a.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}},{key:"acceptToken",value:function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i=this.chunk2Pos&&this.posthis.range.to?i.slice(0,this.range.to-this.pos):i,this.chunkPos=this.pos,this.chunkOff=0}}},{key:"readNext",value:function(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}},{key:"advance",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;for(this.chunkOff+=n;this.pos+n>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();n-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=n,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}},{key:"setDone",value:function(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}},{key:"reset",value:function(n,e){if(e?(this.token=e,e.start=n,e.lookAhead=n+1,e.value=e.extended=-1):this.token=ume,this.pos!=n){if(this.pos=n,n==this.end)return this.setDone(),this;for(;n=this.range.to;)this.range=this.ranges[++this.rangeIndex];n>=this.chunkPos&&n=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(n-this.chunkPos,e-this.chunkPos);if(n>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(n-this.chunk2Pos,e-this.chunk2Pos);if(n>=this.range.from&&e<=this.range.to)return this.input.read(n,e);var i,r="",o=Re(this.ranges);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(s.from>=e)break;s.to>n&&(r+=this.input.read(Math.max(s.from,n),Math.min(s.to,e)))}}catch(a){o.e(a)}finally{o.f()}return r}}]),t}(),YD=function(){function t(n,e){Ce(this,t),this.data=n,this.id=e}return Se(t,[{key:"token",value:function(n,e){!function(i,r,o,s){var a=0,l=1<0){var f=i[h];if(u.allows(f)&&(-1==r.token.value||r.token.value==f||c.overrides(f,r.token.value))){r.acceptToken(f);break}}var p=r.next,m=0,g=i[a+2];if(!(r.next<0&&g>m&&65535==i[d+3*g-3])){for(;m>1,y=d+v+(v<<1);if(p=i[y+1])){a=i[y+2],r.advance();continue e}m=v+1}}break}a=i[d+3*g-1]}}(this.data,n,e,this.id)}}]),t}();function XD(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint16Array;if("string"!=typeof t)return t;for(var e=null,i=0,r=0;i=92&&s--,s>=34&&s--;var l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}e?e[r++]=o:e=new n(o)}return e}YD.prototype.contextual=YD.prototype.fallback=YD.prototype.extend=!1;var dme,cd=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),cR=null;function hme(t,n,e){var i=t.cursor(Ha.IncludeAnonymous);for(i.moveTo(n);;)if(!(e<0?i.childBefore(n):i.childAfter(n)))for(;;){if((e<0?i.ton)&&!i.type.isError)return e<0?Math.max(0,Math.min(i.to-1,n-25)):Math.min(t.length,Math.max(i.from+1,n+25));if(e<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return e<0?0:t.length}}!function(t){t[t.Margin=25]="Margin"}(dme||(dme={}));var fme,Ort=function(){function t(n,e){Ce(this,t),this.fragments=n,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}return Se(t,[{key:"nextFragment",value:function(){var n=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(n){for(this.safeFrom=n.openStart?hme(n.tree,n.from+n.offset,1)-n.offset:n.from,this.safeTo=n.openEnd?hme(n.tree,n.to+n.offset,-1)-n.offset:n.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(n.tree),this.start.push(-n.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}},{key:"nodeAt",value:function(n){if(nn)return this.nextStart=s,null;if(o instanceof Ua){if(s==n){if(s=Math.max(this.safeFrom,n)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+o.length}else this.trees.pop(),this.start.pop(),this.index.pop()}}}]),t}(),Irt=function(){function t(n,e){Ce(this,t),this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=n.tokenizers.map(function(i){return new qD})}return Se(t,[{key:"getActions",value:function(n){for(var e=0,i=null,r=n.p.parser,o=r.tokenizers,s=r.stateSlot(n.state,3),a=n.curContext?n.curContext.hash:0,l=0,c=0;cd.end+25&&(l=Math.max(d.lookAhead,l)),0!=d.value)){var h=e;if(d.extended>-1&&(e=this.addActions(n,d.extended,d.end,e)),e=this.addActions(n,d.value,d.end,e),!u.extend&&(i=d,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return l&&n.setLookAhead(l),i||n.pos!=this.stream.end||((i=new qD).value=n.p.parser.eofTerm,i.start=i.end=n.pos,e=this.addActions(n,i.value,i.end,e)),this.mainToken=i,this.actions}},{key:"getMainToken",value:function(n){if(this.mainToken)return this.mainToken;var e=new qD,i=n.pos,r=n.p;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}},{key:"updateCachedToken",value:function(n,e,i){var r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,n),i),n.value>-1){for(var o=i.p.parser,s=0;s=0&&i.p.parser.dialect.allows(a>>1)){1&a?n.extended=a>>1:n.value=a>>1;break}}}else n.value=0,n.end=this.stream.clipPos(r+1)}},{key:"putAction",value:function(n,e,i,r){for(var o=0;o4*n.bufferLength?new Ort(i,n.nodeSet):null}return Se(t,[{key:"parsedPos",get:function(){return this.minStackPos}},{key:"advance",value:function(){for(var n,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[],s=0;sr)o.push(a);else{if(this.advanceStack(a,o,i))continue;n||(n=[],e=[]),n.push(a);var l=this.tokens.getMainToken(a);e.push(l.value,l.end)}break}if(!o.length){var c=n&&function(v){var y,b=null,C=Re(v);try{for(C.s();!(y=C.n()).done;){var k=y.value,D=k.p.stoppedAt;(k.pos==k.p.stream.end||null!=D&&k.pos>D)&&k.p.parser.stateFlag(k.state,2)&&(!b||b.scorethis.stoppedAt?n[0]:this.runRecovery(n,e,o);if(u)return this.stackToTree(u.forceAll())}if(this.recovering){var d=1==this.recovering?1:3*this.recovering;if(o.length>d)for(o.sort(function(v,y){return y.score-v.score});o.length>d;)o.pop();o.some(function(v){return v.reducePos>r})&&this.recovering--}else if(o.length>1)e:for(var h=0;h500&&m.buffer.length>500){if(!((f.score-m.score||f.buffer.length-m.buffer.length)>0)){o.splice(h--,1);continue e}o.splice(p--,1)}}this.minStackPos=o[0].pos;for(var g=1;g ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return n.forceReduce()?n:null;if(this.fragments)for(var a=n.curContext&&n.curContext.tracker.strict,l=a?n.curContext.hash:0,c=this.fragments.nodeAt(r);c;){var u=this.parser.nodeSet.types[c.type.id]==c.type?o.getGoto(n.state,c.type.id):-1;if(u>-1&&c.length&&(!a||(c.prop(pr.contextHash)||0)==l))return n.useNode(c,u),cd&&console.log(s+this.stackID(n)+" (via reuse of ".concat(o.getName(c.type.id),")")),!0;if(!(c instanceof Ua)||0==c.children.length||c.positions[0]>0)break;var d=c.children[0];if(!(d instanceof Ua&&0==c.positions[0]))break;c=d}var h=o.stateSlot(n.state,4);if(h>0)return n.reduce(h),cd&&console.log(s+this.stackID(n)+" (via always-reduce ".concat(o.getName(65535&h),")")),!0;if(n.stack.length>=15e3)for(;n.stack.length>9e3&&n.forceReduce(););for(var f=this.tokens.getActions(n),p=0;pr?e.push(b):i.push(b)}return!1}},{key:"advanceFully",value:function(n,e){for(var i=n.pos;;){if(!this.advanceStack(n,null,null))return!1;if(n.pos>i)return pme(n,e),!0}}},{key:"runRecovery",value:function(n,e,i){for(var r=null,o=!1,s=0;s ":"";if(!a.deadEnd||!o&&(o=!0,a.restart(),cd&&console.log(u+this.stackID(a)+" (restarted)"),!this.advanceFully(a,i))){for(var d=a.split(),h=u,f=0;d.forceReduce()&&f<10&&(cd&&console.log(h+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,i));f++)cd&&(h=this.stackID(d)+" -> ");var p,m=Re(a.recoverByInsert(l));try{for(m.s();!(p=m.n()).done;){var g=p.value;cd&&console.log(u+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,i)}}catch(v){m.e(v)}finally{m.f()}this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),cd&&console.log(u+this.stackID(a)+" (via recover-delete ".concat(this.parser.getName(l),")")),pme(a,i)):(!r||r.score=0)d(v,m,p[g++]);else{for(var y=p[g+-v],b=-v;b>0;b--)d(p[g++],m,y);g++}}}}catch(D){f.e(D)}finally{f.f()}}o.nodeSet=new gnt(s.map(function(D,L){return cu.define({name:L>=o.minRepeatTerm?void 0:D,id:L,props:c[L],top:l.indexOf(L)>-1,error:0==L,skipped:i.skippedNodes&&i.skippedNodes.indexOf(L)>-1})})),i.propSources&&(o.nodeSet=(r=o.nodeSet).extend.apply(r,ri(i.propSources))),o.strict=!1,o.bufferLength=1024;var C=XD(i.tokenData);o.context=i.context,o.specializerSpecs=i.specialized||[],o.specialized=new Uint16Array(o.specializerSpecs.length);for(var k=0;k2&&void 0!==arguments[2]&&arguments[2],s=this.goto;if(r>=s[0])return-1;for(var a=s[r+1];;){var l=s[a++],c=1&l,u=s[a++];if(c&&o)return u;for(var d=a+(l>>1);a0}},{key:"validAction",value:function(i,r){if(r==this.stateSlot(i,4))return!0;for(var o=this.stateSlot(i,1);;o+=3){if(65535==this.data[o]){if(1!=this.data[o+1])return!1;o=yf(this.data,o+2)}if(r==yf(this.data,o+1))return!0}}},{key:"nextStates",value:function(i){for(var r=this,o=[],s=this.stateSlot(i,1);;s+=3){if(65535==this.data[s]){if(1!=this.data[s+1])break;s=yf(this.data,s+2)}!(1&this.data[s+2])&&function(){var a=r.data[s+1];o.some(function(l,c){return 1&c&&l==a})||o.push(r.data[s],a)}()}return o}},{key:"overrides",value:function(i,r){var o=mme(this.data,this.tokenPrecTable,r);return o<0||mme(this.data,this.tokenPrecTable,i)0}},{key:"getName",value:function(i){return this.termNames?this.termNames[i]:String(i<=this.maxNode&&this.nodeSet.types[i].name||i)}},{key:"eofTerm",get:function(){return this.maxNode+1}},{key:"topNode",get:function(){return this.nodeSet.types[this.top[1]]}},{key:"dynamicPrecedence",value:function(i){var r=this.dynamicPrecedences;return null==r?0:r[i]||0}},{key:"parseDialect",value:function(i){var r=Object.keys(this.dialects),o=r.map(function(){return!1});if(i){var s,a=Re(i.split(" "));try{for(a.s();!(s=a.n()).done;){var c=r.indexOf(s.value);c>=0&&(o[c]=!0)}}catch(p){a.e(p)}finally{a.f()}}for(var u=null,d=0;d0&&_me(t);return{c:function(){n=ve("div"),r&&r.c(),e=tt(),o&&o.c(),i=tt(),s&&s.c(),j(n,"class","jse-status-bar svelte-1oo7hnc")},m:function(a,l){Pe(a,n,l),r&&r.m(n,null),ue(n,e),o&&o.m(n,null),ue(n,i),s&&s.m(n,null)},p:function(a,l){var c=zn(l,1)[0];void 0!==a[0]?r?r.p(a,c):((r=vme(a)).c(),r.m(n,e)):r&&(r.d(1),r=null),void 0!==a[1]?o?o.p(a,c):((o=yme(a)).c(),o.m(n,i)):o&&(o.d(1),o=null),void 0!==a[2]&&a[2]>0?s?s.p(a,c):((s=_me(a)).c(),s.m(n,null)):s&&(s.d(1),s=null)},i:jt,o:jt,d:function(a){a&&Fe(n),r&&r.d(),o&&o.d(),s&&s.d()}}}function Vrt(t,n,e){var i,r,o,s,a,l=n.editorState;return t.$$set=function(c){"editorState"in c&&e(3,l=c.editorState)},t.$$.update=function(){var c,u,d,h,f,p,m,g;8&t.$$.dirty&&e(4,i=null===(c=l)||void 0===c||null===(u=c.selection)||void 0===u||null===(d=u.main)||void 0===d?void 0:d.head),24&t.$$.dirty&&e(5,r=null===(h=l)||void 0===h||null===(f=h.doc)||void 0===f?void 0:f.lineAt(i)),32&t.$$.dirty&&e(0,o=r?r.number:void 0),48&t.$$.dirty&&e(1,s=r?i-r.from+1:void 0),8&t.$$.dirty&&e(2,a=null===(p=l)||void 0===p||null===(m=p.selection)||void 0===m||null===(g=m.ranges)||void 0===g?void 0:g.reduce(function(v,y){return v+y.to-y.from},0))},[o,s,a,l,i,r]}var Hrt=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Vrt,Brt,ps,{editorState:3},$rt),r}return Se(e)}(),uR=A4.define([{tag:dn.propertyName,color:"var(--jse-key-color)"},{tag:dn.number,color:"var(--jse-value-color-number)"},{tag:dn.bool,color:"var(--jse-value-color-boolean)"},{tag:dn.string,color:"var(--jse-value-color-string)"},{tag:dn.keyword,color:"var(--jse-value-color-null)"}]),Urt=Ofe(uR),zrt=uR.style;function dR(t){return t.doc.lineAt(t.selection.main.head)}function bme(t,n){var e=0;e:for(var i=0;i=r.level?i.level:i.empty&&0===i.level&&0!==r.level?0:r.level>i.level?i.level+1:r.level)}var o=bme(n.text,this.state.tabSize),s=Math.floor(o/this.unitWidth);return this.set(n,o,s)}},{key:"closestNonEmpty",value:function(n,e){for(var i=n.number+e;-1===e?i>=1:i<=this.state.doc.lines;){if(this.has(i)){var r=this.get(i);if(!r.empty)return r}var o=this.state.doc.line(i);if(o.text.trim().length){var s=bme(o.text,this.state.tabSize),a=Math.floor(s/this.unitWidth);return this.set(o,s,a)}i+=e}var l=this.state.doc.line(-1===e?1:this.state.doc.lines);return this.set(l,0,0)}},{key:"findAndSetActiveLines",value:function(){var n=dR(this.state);if(this.has(n)){var e=this.get(n);if(this.has(e.line.number+1)){var i=this.get(e.line.number+1);i.level>e.level&&(e=i)}if(this.has(e.line.number-1)){var r=this.get(e.line.number-1);r.level>e.level&&(e=r)}if(0!==e.level){var o,s;for(e.active=e.level,o=e.line.number;o>1;o--)if(this.has(o-1)){var a=this.get(o-1);if(a.level1&&void 0!==arguments[1]?arguments[1]:d.state,p=new Set,m=Re(d.visibleRanges);try{for(m.s();!(h=m.n()).done;)for(var g=h.value,y=g.to,b=g.from;b<=y;){var C=f.doc.lineAt(b);p.has(C)||p.add(C),b=C.to+1}}catch(k){m.e(k)}finally{m.f()}return p}(this.view,n),o=new Grt(r,n,this.unitWidth),s=n.facet(JD).hideFirstIndent,a=Re(r);try{for(a.s();!(e=a.n()).done;){var l=e.value,c=o.get(l.number);if(c?.level){var u=qrt(c,this.unitWidth,s);i.add(l.from,l.from,mi.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: ".concat(u)}}))}}}catch(d){a.e(d)}finally{a.f()}this.decorations=i.finish()}}]),t}();function Xrt(){return[JD.of(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Wrt,wa.fromClass(Yrt,{decorations:function(n){return n.decorations}})]}function Jrt(t){di(t,"svelte-1yqirn0",'.jse-text-mode.svelte-1yqirn0.svelte-1yqirn0{flex:1;box-sizing:border-box;display:flex;flex-direction:column;background:var(--jse-background-color)}.jse-text-mode.no-main-menu.svelte-1yqirn0.svelte-1yqirn0{border-top:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0{flex:1;display:flex;position:relative;flex-direction:column;overflow:hidden;min-width:0;min-height:0;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0:last-child{border-bottom:var(--jse-main-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-hidden.svelte-1yqirn0{visibility:hidden;position:absolute;top:0;left:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor{flex:1;overflow:hidden}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-scroller{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);color:var(--jse-delimiter-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-gutters{background:var(--jse-panel-background);color:var(--jse-panel-color-readonly);border-right:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLine,.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-activeLineGutter{background:var(--jse-active-line-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionBackground{background:var(--jse-selection-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch{background-color:var(--jse-search-match-color);outline:var(--jse-search-match-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-searchMatch.cm-searchMatch-selected{background-color:var(--jse-search-match-active-color);outline:var(--jse-search-match-active-outline)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-selectionMatch{background-color:var(--jse-search-match-background-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-foldPlaceholder{background:var(--jse-tag-background);color:var(--jse-tag-color);border:none;padding:0 var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-tooltip{font-size:var(--jse-font-size);font-family:var(--jse-font-family);color:var(--jse-tooltip-color);background:var(--jse-tooltip-background);border:var(--jse-tooltip-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-diagnosticAction{background:var(--jse-tooltip-action-button-color);background:var(--jse-tooltip-action-button-background)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-panels{border-bottom:var(--jse-panel-border)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search{background:var(--jse-panel-background);color:var(--jse-panel-color);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search input{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-input-color);border:var(--jse-input-border);background:var(--jse-input-background);margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);color:var(--jse-panel-button-color);background:var(--jse-panel-button-background);border:none;cursor:pointer;text-transform:capitalize;padding:calc(0.5 * var(--jse-padding)) var(--jse-padding);margin:0}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button:hover{color:var(--jse-panel-button-color-highlight);background:var(--jse-panel-button-background-highlight)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label{font-family:var(--jse-font-family);font-size:var(--jse-font-size-text-mode-search);padding-left:var(--jse-padding)}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search label input{margin-right:2px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-search button[name="close"]{width:32px;height:32px;font-size:24px;line-height:24px;padding:0;right:0;top:-4px}.jse-text-mode.svelte-1yqirn0 .jse-contents.svelte-1yqirn0 .cm-editor .cm-cursor-primary{border-color:var(--jse-text-color)}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading-space.svelte-1yqirn0{flex:1}.jse-text-mode.svelte-1yqirn0 .jse-contents .jse-loading.svelte-1yqirn0{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-text-mode.svelte-1yqirn0 .jse-contents.jse-preview.svelte-1yqirn0{flex:1;color:var(--jse-panel-color-readonly);overflow:auto;white-space:pre-wrap;word-break:break-word;padding:2px}')}function hR(t){var n=t.slice();return n[93]=0===n[10].length,n}function xme(t){var n,e;return n=new yet({props:{readOnly:t[0],onFormat:t[16],onCompact:t[17],onSort:t[18],onTransform:t[19],onToggleSearch:t[20],onUndo:t[21],onRedo:t[22],canFormat:!t[93],canCompact:!t[93],canSort:!t[93],canTransform:!t[93],canUndo:t[11],canRedo:t[12],onRenderMenu:t[3]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&r[0]&&(o.readOnly=i[0]),1024&r[0]&&(o.canFormat=!i[93]),1024&r[0]&&(o.canCompact=!i[93]),1024&r[0]&&(o.canSort=!i[93]),1024&r[0]&&(o.canTransform=!i[93]),2048&r[0]&&(o.canUndo=i[11]),4096&r[0]&&(o.canRedo=i[12]),8&r[0]&&(o.onRenderMenu=i[3]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Krt(t){var n;return{c:function(){(n=ve("div")).innerHTML='
    \n
    loading...
    ',j(n,"class","jse-contents svelte-1yqirn0")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function Qrt(t){var n,e,i,r,o,s=t[92]&&wme(t),a=!t[92]&&Cme(t);return{c:function(){n=ve("div"),e=tt(),s&&s.c(),i=tt(),a&&a.c(),r=br(),j(n,"class","jse-contents svelte-1yqirn0"),At(n,"jse-hidden",t[92])},m:function(l,c){Pe(l,n,c),t[50](n),Pe(l,e,c),s&&s.m(l,c),Pe(l,i,c),a&&a.m(l,c),Pe(l,r,c),o=!0},p:function(l,c){(!o||134218880&c[0])&&At(n,"jse-hidden",l[92]),l[92]?s?(s.p(l,c),1152&c[0]&&K(s,1)):((s=wme(l)).c(),K(s,1),s.m(i.parentNode,i)):s&&(Lt(),ae(s,1,1,function(){s=null}),$t()),l[92]?a&&(Lt(),ae(a,1,1,function(){a=null}),$t()):a?(a.p(l,c),1152&c[0]&&K(a,1)):((a=Cme(l)).c(),K(a,1),a.m(r.parentNode,r))},i:function(l){o||(K(s),K(a),o=!0)},o:function(l){ae(s),ae(a),o=!1},d:function(l){l&&Fe(n),t[50](null),l&&Fe(e),s&&s.d(l),l&&Fe(i),a&&a.d(l),l&&Fe(r)}}}function wme(t){var n,e,i,r,o,s=ah(t[10]||"",2e4)+"";return n=new nd({props:{icon:rg,type:"error",message:"The JSON document is larger than ".concat(Fk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(Fk(t[10].length,1024),"."),actions:[{text:"Open anyway",title:"Open the document in text mode. This may freeze or crash your browser.",onClick:t[23]},{text:"Open in tree mode",title:"Open the document in tree mode. Tree mode can handle large documents.",onClick:t[24]},{text:"Cancel",title:"Cancel opening this large document.",onClick:t[25]}]}}),{c:function(){ft(n.$$.fragment),e=tt(),i=ve("div"),r=tn(s),j(i,"class","jse-contents jse-preview svelte-1yqirn0")},m:function(a,l){dt(n,a,l),Pe(a,e,l),Pe(a,i,l),ue(i,r),o=!0},p:function(a,l){var c={};1024&l[0]&&(c.message="The JSON document is larger than ".concat(Fk(10485760,1024),", ")+"and may crash your browser when loading it in text mode. Actual size: ".concat(Fk(a[10].length,1024),".")),n.$set(c),(!o||1024&l[0])&&s!==(s=ah(a[10]||"",2e4)+"")&&qn(r,s)},i:function(a){o||(K(n.$$.fragment,a),o=!0)},o:function(a){ae(n.$$.fragment,a),o=!1},d:function(a){ht(n,a),a&&Fe(e),a&&Fe(i)}}}function Cme(t){var n,e,i,r,o,s=!t[13]&&t[8]&&Sse(t[10]),a=t[2]&&Sme(t),l=t[13]&&kme(t),c=s&&Dme(t);return r=new KP({props:{validationErrors:t[9],selectError:t[26]}}),{c:function(){a&&a.c(),n=tt(),l&&l.c(),e=tt(),c&&c.c(),i=tt(),ft(r.$$.fragment)},m:function(u,d){a&&a.m(u,d),Pe(u,n,d),l&&l.m(u,d),Pe(u,e,d),c&&c.m(u,d),Pe(u,i,d),dt(r,u,d),o=!0},p:function(u,d){u[2]?a?(a.p(u,d),4&d[0]&&K(a,1)):((a=Sme(u)).c(),K(a,1),a.m(n.parentNode,n)):a&&(Lt(),ae(a,1,1,function(){a=null}),$t()),u[13]?l?(l.p(u,d),8192&d[0]&&K(l,1)):((l=kme(u)).c(),K(l,1),l.m(e.parentNode,e)):l&&(Lt(),ae(l,1,1,function(){l=null}),$t()),9472&d[0]&&(s=!u[13]&&u[8]&&Sse(u[10])),s?c?(c.p(u,d),9472&d[0]&&K(c,1)):((c=Dme(u)).c(),K(c,1),c.m(i.parentNode,i)):c&&(Lt(),ae(c,1,1,function(){c=null}),$t());var h={};512&d[0]&&(h.validationErrors=u[9]),r.$set(h)},i:function(u){o||(K(a),K(l),K(c),K(r.$$.fragment,u),o=!0)},o:function(u){ae(a),ae(l),ae(c),ae(r.$$.fragment,u),o=!1},d:function(u){a&&a.d(u),u&&Fe(n),l&&l.d(u),u&&Fe(e),c&&c.d(u),u&&Fe(i),ht(r,u)}}}function Sme(t){var n,e;return n=new Hrt({props:{editorState:t[6]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};64&r[0]&&(o.editorState=i[6]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function kme(t){var n,e;return n=new nd({props:{type:"error",icon:rg,message:t[13].message,actions:t[14],onClick:t[28]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};8192&r[0]&&(o.message=i[13].message),16384&r[0]&&(o.actions=i[14]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Dme(t){var n,e;return n=new nd({props:{type:"success",message:"Do you want to format the JSON?",actions:[{icon:rj,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:t[16]},{icon:P0,text:"No thanks",title:"Close this message",onClick:t[51]}]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};256&r[0]&&(o.actions=[{icon:rj,text:"Format",title:"Format JSON: add proper indentation and new lines (Ctrl+I)",onClick:i[16]},{icon:P0,text:"No thanks",title:"Close this message",onClick:i[51]}]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Zrt(t){var n,e,i,r,o,s=t[1]&&xme(hR(t)),l=[];function c(u,d){return 0===d?(p=(f=u.slice())[27](f[10],f[7]),f[92]=p,f):u;var f,p}return r=l[i=t[15]?1:0]=[Qrt,Krt][i](c(t,i)),{c:function(){n=ve("div"),s&&s.c(),e=tt(),r.c(),j(n,"class","jse-text-mode svelte-1yqirn0"),At(n,"no-main-menu",!t[1])},m:function(u,d){Pe(u,n,d),s&&s.m(n,null),ue(n,e),l[i].m(n,null),t[52](n),o=!0},p:function(u,d){u[1]?s?(s.p(hR(u),d),2&d[0]&&K(s,1)):((s=xme(hR(u))).c(),K(s,1),s.m(n,e)):s&&(Lt(),ae(s,1,1,function(){s=null}),$t()),r.p(c(u,i),d),(!o||2&d[0])&&At(n,"no-main-menu",!u[1])},i:function(u){o||(K(s),K(r),o=!0)},o:function(u){ae(s),ae(r),o=!1},d:function(u){u&&Fe(n),s&&s.d(),l[i].d(),t[52](null)}}}function Tme(t){return{from:t.from||0,to:t.to||0,message:t.message||"",actions:t.actions,severity:t.severity}}function eot(t,n,e){var i,r,o,s,a,l,c=n.readOnly,u=n.mainMenuBar,d=n.statusBar,h=n.externalContent,f=n.indentation,p=n.tabSize,m=n.escapeUnicodeCharacters,g=n.parser,v=n.validator,y=n.validationParser,b=n.onChange,C=n.onChangeMode,k=n.onError,D=n.onFocus,L=n.onBlur,z=n.onRenderMenu,R=n.onSortModal,U=n.onTransformModal,G=ba("jsoneditor:TextMode"),X={key:"Mod-i",run:ie,shift:Me,preventDefault:!0},te=typeof window>"u";G("isSSR:",te);var P=!1,W=!0,J=[],H=new Sp,le=new Sp,E=new Sp,I=new Sp,N=new Sp,q=new Sp,V=h,re=ak(V,f,g),he=m;Yc(Ki(pn().mark(function pt(){return pn().wrap(function(In){for(;;)switch(In.prev=In.next){case 0:if(!te){In.next=2;break}return In.abrupt("return");case 2:try{s=Hn({target:o,initialText:Oo(re,P)?"":i.escapeValue(re),readOnly:c,indentation:f})}catch(oi){console.error(oi)}case 3:case"end":return In.stop()}},pt)}))),Hu(function(){s&&(G("Destroy CodeMirror editor"),s.destroy())});var Oe=!1,_e=!1,Xe=hp(),Le=hp();function rt(){s&&(G("focus"),s.focus())}var B=!1;function ne(pt){G("patch",pt);var In=g.parse(re),oi=Xu(In,pt),vi=zZ(In,pt);return ur({text:g.stringify(oi,null,f)}),{json:oi,previousJson:In,undo:vi,redo:pt}}function ie(){if(G("format"),c)return!1;try{var pt=g.parse(re);return ur({text:g.stringify(pt,null,f)}),e(8,W=!0),!0}catch(In){k(In)}return!1}function Me(){if(G("compact"),c)return!1;try{var pt=g.parse(re);return ur({text:g.stringify(pt)}),e(8,W=!1),!0}catch(In){k(In)}return!1}function Ye(){if(G("repair"),!c)try{ur({text:Kd(re)}),e(49,On="valid"),e(13,xt=null)}catch(pt){k(pt)}}function je(pt){var In=pt.id,oi=pt.rootPath,vi=pt.onTransform,Tr=pt.onClose;try{var Hr=g.parse(re);B=!0,U({id:In||Le,json:Hr,rootPath:oi||[],onTransform:function(no){vi?vi({operations:no,json:Hr,transformedJson:Xu(Hr,no)}):(G("onTransform",no),ne(no))},onClose:function(){B=!1,rt(),Tr&&Tr()}})}catch(no){k(no)}}function yt(pt,In){G("setSelection",{anchor:pt,head:In}),s&&s.dispatch(s.state.update({selection:{anchor:pt,head:In},scrollIntoView:!0}))}function Tt(pt,In){if(1===In.state.selection.ranges.length){var oi=In.state.selection.ranges[0],vi=re.slice(oi.from,oi.to);if("{"===vi||"["===vi){var Tr=lS.parse(re),Hr=Object.keys(Tr.pointers).find(function(Us){var gr;return(null===(gr=Tr.pointers[Us].value)||void 0===gr?void 0:gr.pos)===oi.from}),no=Tr.pointers[Hr];Hr&&no&&no.value&&no.valueEnd&&(G("pointer found, selecting inner contents of path:",Hr,no),yt(no.value.pos+1,no.valueEnd.pos-1))}}}function fn(){return function(pt){return vg.of({source:pt,config:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}})}(ai,{delay:300})}function Hn(pt){var In=pt.target,oi=pt.initialText,vi=pt.readOnly,Tr=pt.indentation;G("Create CodeMirror editor",{readOnly:vi,indentation:Tr});var Hr=Ao.create({doc:oi,extensions:[iD.of([Mit,X]),H.of(fn()),krt(),Drt,Urt,Xrt({hideFirstIndent:!0}),Wn.domEventHandlers({dblclick:Tt}),Wn.updateListener.of(function(no){e(6,l=no.state),no.docChanged&&gi()}),new Int(Lrt),Rit({top:!0}),E.of(Ao.readOnly.of(vi)),le.of(Wn.editable.of(!vi)),N.of(Ao.tabSize.of(p)),I.of(or(Tr)),q.of(Wn.theme({},{dark:Zt()})),Wn.lineWrapping]});return s=new Wn({state:Hr,parent:In})}function Zt(){return!!o&&getComputedStyle(o).getPropertyValue("--jse-theme").includes("dark")}function Ei(pt){var In=pt.path,oi=pt.message,vi=function(Tr,Hr){try{var no=lS.parse(Tr),Us=an(Hr),gr=no.pointers[Us];if(gr)return{path:Hr,line:gr.key?gr.key.line:gr.value?gr.value.line:0,column:gr.key?gr.key.column:gr.value?gr.value.column:0,from:gr.key?gr.key.pos:gr.value?gr.value.pos:0,to:gr.keyEnd?gr.keyEnd.pos:gr.valueEnd?gr.valueEnd.pos:0}}catch(zs){console.error(zs)}return null}(i.escapeValue(re),In);return{path:In,line:vi.line,column:vi.column,from:vi.from,to:vi.to,message:oi,severity:Jd.warning,actions:[]}}function ln(pt,In){var Tr=pt.position;return{path:[],line:pt.line,column:pt.column,from:Tr,to:Tr,severity:Jd.error,message:pt.message,actions:In&&!c?[{name:"Auto repair",apply:function(){return Ye()}}]:null}}function ur(pt){var In=arguments.length>1&&void 0!==arguments[1]&&arguments[1],oi=ak(pt,f,g),vi=!ir(pt,V),Tr=V;V=pt,e(10,re=oi),G("setCodeMirrorContent",{isChanged:vi,forceUpdate:In}),s&&(vi||In)&&(Oo(re,P)||s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(re)}}),mr(),vi&&Vr(V,Tr))}function wr(){if(s){var pt=s?i.unescapeValue(s.state.doc.toString()):"",In=pt!==re;if(G("onChangeCodeMirrorValue",{isChanged:In}),In){var oi=V;e(10,re=pt),V={text:re},mr(),Vr(V,oi)}}}function or(pt){return _D.of("number"==typeof pt?" ".repeat(pt):pt)}function mr(){e(11,Oe=yit(s.state)>0),e(12,_e=_it(s.state)>0),G({canUndo:Oe,canRedo:_e})}JP({onMount:Yc,onDestroy:Hu,getWindow:function(){return w0(a)},hasFocus:function(){return B&&document.hasFocus()||ck(a)},onFocus:D,onBlur:L});var gi=p0(wr,300);function Vr(pt,In){b&&b(pt,In,{contentErrors:Ii(),patchResult:null})}function Oo(pt,In){return!!pt&&pt.length>10485760&&!In}var On="valid",xt=null;function ai(){if(Oo(re,P))return[];var pt=Ii();return Lle(pt)?[Tme(ln(pt.parseError,pt.isRepairable))]:function tKe(t){return To(t)&&Array.isArray(t.validationErrors)}(pt)?pt.validationErrors.map(Ei).map(Tme):[]}function Ii(){G("validate:start"),gi.flush();var pt=Cr(i.escapeValue(re),v,g,y);return Lle(pt)?(e(49,On=pt.isRepairable?"repairable":"invalid"),e(13,xt=pt.parseError),e(9,J=[])):(e(49,On="valid"),e(13,xt=null),e(9,J=pt?.validationErrors||[])),G("validate:end"),pt}var Cr=wb($Je);function vo(){xt&&function(pt){G("select parse error",pt);var In=ln(pt,!1);yt(In.from,In.to),rt()}(xt)}var qo={icon:DXe,text:"Show me",title:"Move to the parse error location",onClick:vo};return t.$$set=function(pt){"readOnly"in pt&&e(0,c=pt.readOnly),"mainMenuBar"in pt&&e(1,u=pt.mainMenuBar),"statusBar"in pt&&e(2,d=pt.statusBar),"externalContent"in pt&&e(29,h=pt.externalContent),"indentation"in pt&&e(30,f=pt.indentation),"tabSize"in pt&&e(31,p=pt.tabSize),"escapeUnicodeCharacters"in pt&&e(32,m=pt.escapeUnicodeCharacters),"parser"in pt&&e(33,g=pt.parser),"validator"in pt&&e(34,v=pt.validator),"validationParser"in pt&&e(35,y=pt.validationParser),"onChange"in pt&&e(36,b=pt.onChange),"onChangeMode"in pt&&e(37,C=pt.onChangeMode),"onError"in pt&&e(38,k=pt.onError),"onFocus"in pt&&e(39,D=pt.onFocus),"onBlur"in pt&&e(40,L=pt.onBlur),"onRenderMenu"in pt&&e(3,z=pt.onRenderMenu),"onSortModal"in pt&&e(41,R=pt.onSortModal),"onTransformModal"in pt&&e(42,U=pt.onTransformModal)},t.$$.update=function(){var pt;2&t.$$.dirty[1]&&(i=gP({escapeControlCharacters:!1,escapeUnicodeCharacters:m})),536870912&t.$$.dirty[0]&&ur(h),8&t.$$.dirty[1]&&(G("updateLinter",v),s&&s.dispatch({effects:H.reconfigure(fn())})),1073741824&t.$$.dirty[0]&&(pt=f,s&&(G("updateIndentation",pt),s.dispatch({effects:I.reconfigure(or(pt))}))),1&t.$$.dirty[1]&&function(pt){s&&(G("updateTabSize",pt),s.dispatch({effects:N.reconfigure(Ao.tabSize.of(pt))}))}(p),1&t.$$.dirty[0]&&function(pt){s&&(G("updateReadOnly",pt),s.dispatch({effects:[E.reconfigure(Ao.readOnly.of(pt)),le.reconfigure(Wn.editable.of(!pt))]}))}(c),131074&t.$$.dirty[1]&&he!==m&&(e(48,he=m),G("forceUpdateText",{escapeUnicodeCharacters:m}),s&&s.dispatch({changes:{from:0,to:s.state.doc.length,insert:i.escapeValue(re)}})),1&t.$$.dirty[0]|262144&t.$$.dirty[1]&&e(14,r="repairable"!==On||c?[qo]:[{icon:vk,text:"Auto repair",title:"Automatically repair JSON",onClick:Ye},qo])},[c,u,d,z,o,a,l,P,W,J,re,Oe,_e,xt,r,te,ie,Me,function(){var pt;if(!c)try{var In=g.parse(re);B=!0,R({id:Xe,json:In,rootPath:[],onSort:(pt=Ki(pn().mark(function oi(vi){var Tr;return pn().wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:G("onSort",Tr=vi.operations),ne(Tr);case 3:case"end":return Hr.stop()}},oi)})),function(oi){return pt.apply(this,arguments)}),onClose:function(){B=!1,rt()}})}catch(oi){k(oi)}},function(){c||je({rootPath:[]})},function(){s&&(o&&o.querySelector(".cm-search")?Z4(s):Q4(s))},function(){c||s&&(B4(s),rt())},function(){c||s&&(kD(s),rt())},function(){e(7,P=!0),ur(h,!0)},function(){C(Lo.tree)},function(){wr()},function(pt){G("select validation error",pt);var In=Ei(pt);yt(In.from,In.to),rt()},Oo,vo,h,f,p,m,g,v,y,b,C,k,D,L,R,U,rt,ne,je,function(){G("refresh"),zl().then(function(){if(s){var pt=Zt();G("updateTheme",{dark:pt}),s.dispatch({effects:[q.reconfigure(Wn.theme({},{dark:pt}))]})}})},Ii,he,On,function(pt){Hi[pt?"unshift":"push"](function(){e(4,o=pt)})},function(){return e(8,W=!1)},function(pt){Hi[pt?"unshift":"push"](function(){e(5,a=pt)})}]}var tot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,eot,Zrt,Ti,{readOnly:0,mainMenuBar:1,statusBar:2,externalContent:29,indentation:30,tabSize:31,escapeUnicodeCharacters:32,parser:33,validator:34,validationParser:35,onChange:36,onChangeMode:37,onError:38,onFocus:39,onBlur:40,onRenderMenu:3,onSortModal:41,onTransformModal:42,focus:43,patch:44,openTransformModal:45,refresh:46,validate:47},Jrt,[-1,-1,-1,-1]),r}return Se(e,[{key:"focus",get:function(){return this.$$.ctx[43]}},{key:"patch",get:function(){return this.$$.ctx[44]}},{key:"openTransformModal",get:function(){return this.$$.ctx[45]}},{key:"refresh",get:function(){return this.$$.ctx[46]}},{key:"validate",get:function(){return this.$$.ctx[47]}}]),e}();function not(t){var n,e;return n=new Mk({props:{items:t[0]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};1&zn(r,1)[0]&&(o.items=i[0]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function iot(t,n,e){var i,r,o=n.json,s=n.readOnly,a=n.historyState,l=n.onSort,c=n.onTransform,u=n.onContextMenu,d=n.onUndo,h=n.onRedo,f=n.onRenderMenu;return t.$$set=function(p){"json"in p&&e(1,o=p.json),"readOnly"in p&&e(2,s=p.readOnly),"historyState"in p&&e(3,a=p.historyState),"onSort"in p&&e(4,l=p.onSort),"onTransform"in p&&e(5,c=p.onTransform),"onContextMenu"in p&&e(6,u=p.onContextMenu),"onUndo"in p&&e(7,d=p.onUndo),"onRedo"in p&&e(8,h=p.onRedo),"onRenderMenu"in p&&e(9,f=p.onRenderMenu)},t.$$.update=function(){510&t.$$.dirty&&e(10,i=s?[{type:"space"}]:[{type:"button",icon:_k,title:"Sort",className:"jse-sort",onClick:l,disabled:s||void 0===o},{type:"button",icon:gk,title:"Transform contents (filter, sort, project)",className:"jse-transform",onClick:c,disabled:s||void 0===o},{type:"button",icon:Oae,title:uN,className:"jse-contextmenu",onClick:u},{type:"separator"},{type:"button",icon:$P,title:"Undo (Ctrl+Z)",className:"jse-undo",onClick:d,disabled:!a.canUndo},{type:"button",icon:LP,title:"Redo (Ctrl+Shift+Z)",className:"jse-redo",onClick:h,disabled:!a.canRedo},{type:"space"}]),1536&t.$$.dirty&&e(0,r=f(i)||i)},[r,o,s,a,l,c,u,d,h,f,i]}var rot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,iot,not,Ti,{json:1,readOnly:2,historyState:3,onSort:4,onTransform:5,onContextMenu:6,onUndo:7,onRedo:8,onRenderMenu:9}),r}return Se(e)}();function Eme(t,n,e){var i=t.slice();return i[9]=n[e],i}function Ame(t){var n,e,i,r=[t[9].props],o=t[9].component;function s(a){for(var l={},c=0;c0){for(var y=[g],b=qi(v);b.length>0&&!Jc(m,b);)y.unshift({op:"add",path:an(b),value:{}}),b=qi(b);return y}}return g})),f);var p,m}return t.$$set=function(h){"path"in h&&e(1,o=h.path),"value"in h&&e(2,s=h.value),"context"in h&&e(3,a=h.context),"enforceString"in h&&e(4,l=h.enforceString),"selection"in h&&e(5,c=h.selection),"searchResultItems"in h&&e(6,u=h.searchResultItems)},t.$$.update=function(){40&t.$$.dirty&&e(7,i=!a.readOnly&&Yi(c)&&mp(c)),254&t.$$.dirty&&e(0,r=a.onRenderValue({path:o,value:s,readOnly:a.readOnly,enforceString:l,isEditing:i,parser:a.parser,normalization:a.normalization,selection:c,searchResultItems:u,onPatch:d,onPasteJson:a.onPasteJson,onSelect:a.onSelect,onFind:a.onFind,findNextInside:a.findNextInside,focus:a.focus}))},[r,o,s,a,l,c,u,i]}var aot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,sot,oot,Ti,{path:1,value:2,context:3,enforceString:4,selection:5,searchResultItems:6}),r}return Se(e)}();function lot(t){di(t,"svelte-l28mqd",".jse-inline-value.svelte-l28mqd{font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);line-height:var(--jse-line-height);border:none;padding:0 calc(0.5 * var(--jse-padding));background:transparent;color:inherit;cursor:pointer}.jse-inline-value.svelte-l28mqd:hover{background:var(--jse-hover-background-color)}.jse-inline-value.jse-selected.svelte-l28mqd{background:var(--jse-selection-background-color)}")}function cot(t){var n,e,i,r,o=ah(t[2].stringify(t[1]),50)+"";return{c:function(){n=ve("button"),e=tn(o),j(n,"type","button"),j(n,"class","jse-inline-value svelte-l28mqd"),At(n,"jse-selected",t[3])},m:function(s,a){Pe(s,n,a),ue(n,e),i||(r=It(n,"dblclick",t[6]),i=!0)},p:function(s,a){var l=zn(a,1)[0];6&l&&o!==(o=ah(s[2].stringify(s[1]),50)+"")&&qn(e,o),8&l&&At(n,"jse-selected",s[3])},i:jt,o:jt,d:function(s){s&&Fe(n),i=!1,r()}}}function uot(t,n,e){var i,r=n.path,o=n.value,s=n.parser,a=n.isSelected,l=n.onEdit;return t.$$set=function(c){"path"in c&&e(0,r=c.path),"value"in c&&e(1,o=c.value),"parser"in c&&e(2,s=c.parser),"isSelected"in c&&e(3,a=c.isSelected),"onEdit"in c&&e(4,l=c.onEdit)},t.$$.update=function(){2&t.$$.dirty&&e(5,i=eo(o)?o.length:Object.keys(o).length)},[r,o,s,a,l,i,function(){return l(r)}]}var dot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,uot,cot,Ti,{path:0,value:1,parser:2,isSelected:3,onEdit:4},lot),r}return Se(e)}();function hot(t){di(t,"svelte-h4fort",".jse-column-header.svelte-h4fort.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}.jse-column-header.svelte-h4fort span.jse-column-sort-icon.svelte-h4fort{height:1em}")}function Mme(t){var n,e,i,r;return e=new rr({props:{data:t[1]===Xc.asc?su:Mae}}),{c:function(){n=ve("span"),ft(e.$$.fragment),j(n,"class","jse-column-sort-icon svelte-h4fort"),j(n,"title",i="Currently sorted in ".concat(t[2]," order"))},m:function(o,s){Pe(o,n,s),dt(e,n,null),r=!0},p:function(o,s){var a={};2&s&&(a.data=o[1]===Xc.asc?su:Mae),e.$set(a),(!r||4&s&&i!==(i="Currently sorted in ".concat(o[2]," order")))&&j(n,"title",i)},i:function(o){r||(K(e.$$.fragment,o),r=!0)},o:function(o){ae(e.$$.fragment,o),r=!1},d:function(o){o&&Fe(n),ht(e)}}}function fot(t){var n,e,i,r,o,s,a,l,c=ah(t[3],50)+"",u=void 0!==t[1]&&Mme(t);return{c:function(){n=ve("button"),e=ve("span"),i=tn(c),r=tt(),u&&u.c(),j(e,"class","jse-column-name"),j(n,"type","button"),j(n,"class","jse-column-header svelte-h4fort"),j(n,"title",o=t[0]?t[3]:t[3]+" (Click to sort the data by this column)"),At(n,"jse-readonly",t[0])},m:function(d,h){Pe(d,n,h),ue(n,e),ue(e,i),ue(n,r),u&&u.m(n,null),s=!0,a||(l=It(n,"click",t[4]),a=!0)},p:function(d,h){var f=zn(h,1)[0];(!s||8&f)&&c!==(c=ah(d[3],50)+"")&&qn(i,c),void 0!==d[1]?u?(u.p(d,f),2&f&&K(u,1)):((u=Mme(d)).c(),K(u,1),u.m(n,null)):u&&(Lt(),ae(u,1,1,function(){u=null}),$t()),(!s||9&f&&o!==(o=d[0]?d[3]:d[3]+" (Click to sort the data by this column)"))&&j(n,"title",o),(!s||1&f)&&At(n,"jse-readonly",d[0])},i:function(d){s||(K(u),s=!0)},o:function(d){ae(u),s=!1},d:function(d){d&&Fe(n),u&&u.d(),a=!1,l()}}}function pot(t,n,e){var i,r,o,s=n.path,a=n.sortedColumn,l=n.readOnly,c=n.onSort;return t.$$set=function(u){"path"in u&&e(5,s=u.path),"sortedColumn"in u&&e(6,a=u.sortedColumn),"readOnly"in u&&e(0,l=u.readOnly),"onSort"in u&&e(7,c=u.onSort)},t.$$.update=function(){var u;32&t.$$.dirty&&e(3,i=Ui(s)?"values":iu(ql(s))),96&t.$$.dirty&&e(1,r=ir(s,null===(u=a)||void 0===u?void 0:u.path)?a.sortDirection:void 0),2&t.$$.dirty&&e(2,o=qHe[r])},[l,r,o,i,function(){l||c({path:s,sortDirection:r===Xc.asc?Xc.desc:Xc.asc})},s,a,c]}var KD,QD,mot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,pot,fot,Ti,{path:5,sortedColumn:6,readOnly:0,onSort:7},hot),r}return Se(e)}();function Ome(t,n){return KD||(QD=new WeakMap,KD=new ResizeObserver(function(e){var i,r=Re(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,s=QD.get(o.target);s&&s(o.target)}}catch(a){r.e(a)}finally{r.f()}})),QD.set(t,n),KD.observe(t),{destroy:function(){QD.delete(t),KD.unobserve(t)}}}function got(t){var n,e;return n=new lce({props:{items:t[1],tip:t[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};2&r[0]&&(o.items=i[1]),1&r[0]&&(o.tip=i[0]?"Tip: you can open this context menu via right-click or with Ctrl+Q":void 0),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function vot(t,n,e){var i,r,o,s,a,l,c,u,d,h,f,p=n.json,m=n.documentState,g=n.parser,v=n.showTip,y=n.onCloseContextMenu,b=n.onEditValue,C=n.onEditRow,k=n.onToggleEnforceString,D=n.onCut,L=n.onCopy,z=n.onPaste,R=n.onRemove,U=n.onDuplicateRow,G=n.onInsertBeforeRow,X=n.onInsertAfterRow,te=n.onRemoveRow;function P(){y(),b()}function W(){y(),C()}function J(){y(),k()}function H(){y(),D(!0)}function le(){y(),D(!1)}function E(){y(),L(!0)}function I(){y(),L(!1)}function N(){y(),z()}function q(){y(),R()}function V(){y(),U()}function re(){y(),G()}function he(){y(),X()}function Oe(){y(),te()}return t.$$set=function(_e){"json"in _e&&e(2,p=_e.json),"documentState"in _e&&e(3,m=_e.documentState),"parser"in _e&&e(4,g=_e.parser),"showTip"in _e&&e(0,v=_e.showTip),"onCloseContextMenu"in _e&&e(5,y=_e.onCloseContextMenu),"onEditValue"in _e&&e(6,b=_e.onEditValue),"onEditRow"in _e&&e(7,C=_e.onEditRow),"onToggleEnforceString"in _e&&e(8,k=_e.onToggleEnforceString),"onCut"in _e&&e(9,D=_e.onCut),"onCopy"in _e&&e(10,L=_e.onCopy),"onPaste"in _e&&e(11,z=_e.onPaste),"onRemove"in _e&&e(12,R=_e.onRemove),"onDuplicateRow"in _e&&e(13,U=_e.onDuplicateRow),"onInsertBeforeRow"in _e&&e(14,G=_e.onInsertBeforeRow),"onInsertAfterRow"in _e&&e(15,X=_e.onInsertAfterRow),"onRemoveRow"in _e&&e(16,te=_e.onRemoveRow)},t.$$.update=function(){8&t.$$.dirty[0]&&e(22,i=m.selection),4&t.$$.dirty[0]&&e(25,r=void 0!==p),4194304&t.$$.dirty[0]&&e(17,o=null!=i),4194304&t.$$.dirty[0]&&e(26,s=null!=i&&Ui(i.focusPath)),4194308&t.$$.dirty[0]&&e(23,a=void 0!==p&&null!=i?Sn(p,i.focusPath):void 0),37748736&t.$$.dirty[0]&&e(18,l=r&&(Ir(i)||vs(i)||Yi(i))),104857600&t.$$.dirty[0]&&r&&null!=i&&(Ir(i)||Yi(i)),71303172&t.$$.dirty[0]&&void 0!==p&&null!=i&&hb(i)&&!s&&Array.isArray(Sn(p,qi(i.focusPath))),37748736&t.$$.dirty[0]&&e(21,c=r&&null!=i&&hb(i)),10485760&t.$$.dirty[0]&&e(19,u=c&&!$o(a)),262144&t.$$.dirty[0]&&e(24,d=l),29491200&t.$$.dirty[0]&&d&&ng(i)&&To(a),29491200&t.$$.dirty[0]&&d&&ng(i)&&Array.isArray(a),29491200&t.$$.dirty[0]&&d&&ng(i)&&$o(a),12582936&t.$$.dirty[0]&&e(20,h=null!=i&&pf(a,m.enforceStringMap,an(i.focusPath),g)),4063232&t.$$.dirty[0]&&e(1,f=[{type:"separator"},{type:"row",items:[{type:"column",items:[{type:"label",text:"Table cell:"},{type:"dropdown-button",main:{type:"button",onClick:P,icon:N0,text:"Edit",title:"Edit the value (Double-click on the value)",disabled:!c},width:"11em",items:[{type:"button",icon:N0,text:"Edit",title:"Edit the value (Double-click on the value)",onClick:P,disabled:!c},{type:"button",icon:h?lb:cb,text:"Enforce string",title:"Enforce keeping the value as string when it contains a numeric value",onClick:J,disabled:!u}]},{type:"dropdown-button",main:{type:"button",onClick:H,icon:I0,text:"Cut",title:"Cut selected contents, formatted with indentation (Ctrl+X)",disabled:!l},width:"10em",items:[{type:"button",icon:I0,text:"Cut formatted",title:"Cut selected contents, formatted with indentation (Ctrl+X)",onClick:H,disabled:!l},{type:"button",icon:I0,text:"Cut compacted",title:"Cut selected contents, without indentation (Ctrl+Shift+X)",onClick:le,disabled:!l}]},{type:"dropdown-button",main:{type:"button",onClick:E,icon:yp,text:"Copy",title:"Copy selected contents, formatted with indentation (Ctrl+C)",disabled:!l},width:"12em",items:[{type:"button",icon:yp,text:"Copy formatted",title:"Copy selected contents, formatted with indentation (Ctrl+C)",onClick:E,disabled:!l},{type:"button",icon:yp,text:"Copy compacted",title:"Copy selected contents, without indentation (Ctrl+Shift+C)",onClick:I,disabled:!l}]},{type:"button",onClick:N,icon:Tae,text:"Paste",title:"Paste clipboard contents (Ctrl+V)",disabled:!o},{type:"button",onClick:q,icon:RP,text:"Remove",title:"Remove selected contents (Delete)",disabled:!l}]},{type:"column",items:[{type:"label",text:"Table row:"},{type:"button",onClick:W,icon:N0,text:"Edit row",title:"Edit the current row",disabled:!l},{type:"button",onClick:V,icon:Fae,text:"Duplicate row",title:"Duplicate the current row",disabled:!o},{type:"button",onClick:re,icon:F0,text:"Insert before",title:"Insert a row before the current row",disabled:!o},{type:"button",onClick:he,icon:F0,text:"Insert after",title:"Insert a row after the current row",disabled:!o},{type:"button",onClick:Oe,icon:RP,text:"Remove row",title:"Remove current row",disabled:!o}]}]}])},[v,f,p,m,g,y,b,C,k,D,L,z,R,U,G,X,te,o,l,u,h,c,i,a,d,r,s]}var yot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,vot,got,Ti,{json:2,documentState:3,parser:4,showTip:0,onCloseContextMenu:5,onEditValue:6,onEditRow:7,onToggleEnforceString:8,onCut:9,onCopy:10,onPaste:11,onRemove:12,onDuplicateRow:13,onInsertBeforeRow:14,onInsertAfterRow:15,onRemoveRow:16},null,[-1,-1]),r}return Se(e)}();function _ot(t){di(t,"svelte-1te5h1h",".jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h{flex:1;display:flex;flex-direction:column;overflow:auto;align-items:center;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h.svelte-1te5h1h:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-before.svelte-1te5h1h{flex:1}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays.svelte-1te5h1h{display:flex;flex-direction:column;gap:var(--jse-padding);max-width:300px;margin:var(--jse-padding);font-family:var(--jse-font-family);font-size:var(--jse-font-size)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays .jse-nested-arrays-info.svelte-1te5h1h{color:var(--jse-panel-color-readonly)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h{border:none;background:transparent;color:inherit;cursor:pointer;font-family:var(--jse-font-family);font-size:var(--jse-font-size);padding:5px;margin:0;background:var(--jse-button-primary-background);color:var(--jse-button-primary-color);padding:var(--jse-padding) calc(2 * var(--jse-padding));border-radius:3px;text-align:left}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:hover{background:var(--jse-button-primary-background-highlight)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action.svelte-1te5h1h:disabled{background:var(--jse-button-primary-background-disabled)}.jse-table-mode-welcome.svelte-1te5h1h .jse-nested-arrays button.jse-nested-array-action .jse-nested-array-count.svelte-1te5h1h{opacity:0.5;white-space:nowrap}.jse-table-mode-welcome.svelte-1te5h1h .jse-space.jse-after.svelte-1te5h1h{flex:2}")}function Ime(t,n,e){var i=t.slice();i[12]=n[e];var r=Sn(i[0],i[12]).length;return i[13]=r,i}function bot(t){var n,e;return{c:function(){n=tn(t[5]),e=tn(" cannot be opened in table mode. You can open the document in tree mode instead.")},m:function(i,r){Pe(i,n,r),Pe(i,e,r)},p:function(i,r){32&r&&qn(n,i[5])},d:function(i){i&&Fe(n),i&&Fe(e)}}}function xot(t){var n;return{c:function(){n=tn("An object cannot be opened in table mode. You can open a nested array instead, or open the\n document in tree mode.")},m:function(e,i){Pe(e,n,i)},p:jt,d:function(e){e&&Fe(n)}}}function Nme(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p=iu(ql(t[12]))+"",m=t[13]+"",g=1!==t[13]?"items":"item";function v(){return t[10](t[12])}return{c:function(){n=ve("button"),e=tn(t[6]),i=tn(' "'),r=tn(p),o=tn('"\n '),s=ve("span"),a=tn("("),l=tn(m),c=tt(),u=tn(g),d=tn(")"),j(s,"class","jse-nested-array-count svelte-1te5h1h"),j(n,"type","button"),j(n,"class","jse-nested-array-action svelte-1te5h1h")},m:function(y,b){Pe(y,n,b),ue(n,e),ue(n,i),ue(n,r),ue(n,o),ue(n,s),ue(s,a),ue(s,l),ue(s,c),ue(s,u),ue(s,d),h||(f=It(n,"click",v),h=!0)},p:function(y,b){t=y,64&b&&qn(e,t[6]),8&b&&p!==(p=iu(ql(t[12]))+"")&&qn(r,p),9&b&&m!==(m=t[13]+"")&&qn(l,m),9&b&&g!==(g=1!==t[13]?"items":"item")&&qn(u,g)},d:function(y){y&&Fe(n),h=!1,f()}}}function wot(t){var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v;function y(z,R){return z[4]?xot:bot}for(var b=y(t),C=b(t),k=t[3],D=[],L=0;L1&&void 0!==arguments[1]?arguments[1]:2,m=[];return function g(v,y){Do(v)&&y.length0}):[]),8&t.$$.dirty&&e(4,r=!Ui(s)),657&t.$$.dirty&&e(5,o=r?"Object with nested arrays":void 0!==l||""!==a&&void 0!==a?Do(l)?"An object":eo(l)?"An empty array":"A ".concat(MN(l,u)):"An empty document")},[l,d,h,s,r,o,i,a,c,u,function(f){return d(f)},function(){return h(Lo.tree)}]}var Sot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Cot,wot,Ti,{text:7,json:0,readOnly:8,parser:9,openJSONEditorModal:1,onChangeMode:2},_ot),r}return Se(e)}();function kot(t){di(t,"svelte-h4fort",".jse-column-header.svelte-h4fort{background:none;border:none;font-family:inherit;font-size:inherit;color:inherit;display:flex;gap:var(--jse-padding);padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding));width:100%}.jse-column-header.svelte-h4fort:hover{background:var(--jse-table-header-background-highlight)}.jse-column-header.svelte-h4fort:not(.jse-column-header.jse-readonly){cursor:pointer}")}function Dot(t){var n,e,i,r,o,s;return e=new rr({props:{data:IXe}}),{c:function(){n=ve("button"),ft(e.$$.fragment),j(n,"type","button"),j(n,"class","jse-column-header svelte-h4fort"),j(n,"title",i="The Columns are created by sampling ".concat(t[1]," items out of ").concat(t[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower.")},m:function(a,l){Pe(a,n,l),dt(e,n,null),r=!0,o||(s=It(n,"click",t[3]),o=!0)},p:function(a,l){var c=zn(l,1)[0];(!r||3&c&&i!==(i="The Columns are created by sampling ".concat(a[1]," items out of ").concat(a[0],". ")+"If you're missing a column, click here to sample all of the items instead of a subset. This is slower."))&&j(n,"title",i)},i:function(a){r||(K(e.$$.fragment,a),r=!0)},o:function(a){ae(e.$$.fragment,a),r=!1},d:function(a){a&&Fe(n),ht(e),o=!1,s()}}}function Tot(t,n,e){var i=n.count,r=n.maxSampleCount,o=n.onRefresh;return t.$$set=function(s){"count"in s&&e(0,i=s.count),"maxSampleCount"in s&&e(1,r=s.maxSampleCount),"onRefresh"in s&&e(2,o=s.onRefresh)},[i,r,o,function(){return o()}]}var Eot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Tot,Dot,Ti,{count:0,maxSampleCount:1,onRefresh:2},kot),r}return Se(e)}();function Aot(t){di(t,"svelte-hs49xj",".jse-table-mode.svelte-hs49xj.svelte-hs49xj{flex:1;display:flex;flex-direction:column;position:relative;background:var(--jse-background-color);min-width:0;min-height:0;font-family:var(--jse-font-family-mono);font-size:var(--jse-font-size-mono);color:var(--jse-text-color)}.jse-table-mode.no-main-menu.svelte-hs49xj.svelte-hs49xj{border-top:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label.svelte-hs49xj{position:fixed;right:0;top:0;width:0;height:0}.jse-table-mode.svelte-hs49xj .jse-hidden-input-label .jse-hidden-input.svelte-hs49xj{width:0;height:0;padding:0;border:0;outline:none}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj{flex:1;align-items:start;flex-direction:column;display:flex;overflow:auto;overflow-anchor:none;border-left:var(--jse-main-border);border-right:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents.svelte-hs49xj:last-child{border-bottom:var(--jse-main-border)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main.svelte-hs49xj{border-collapse:collapse;border-spacing:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-start-section td.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{margin:0;padding:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-invisible-end-section td.svelte-hs49xj{padding-bottom:var(--jse-padding)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row.svelte-hs49xj:hover{background-color:var(--jse-table-row-odd-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj{padding:0 var(--jse-padding) 0 0;vertical-align:top;white-space:nowrap;height:var(--jse-line-height)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj,.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{font-weight:normal;text-align:left;color:var(--jse-text-readonly);background:var(--jse-table-header-background)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header.svelte-hs49xj{padding:0;position:sticky;top:0}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-header .jse-table-root-error.svelte-hs49xj{padding:calc(0.5 * var(--jse-padding)) var(--jse-padding) calc(0.5 * var(--jse-padding)) calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-table-cell-gutter.svelte-hs49xj{padding:0 var(--jse-padding) 0 calc(0.5 * var(--jse-padding))}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.jse-selected-value.svelte-hs49xj>.jse-value{background:var(--jse-selection-background-color)}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div{display:inline-flex}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell.svelte-hs49xj div.jse-value{overflow-wrap:normal;white-space:nowrap;vertical-align:top;display:inline-block}.jse-table-mode.svelte-hs49xj .jse-contents table.jse-table-main .jse-table-row .jse-table-cell .jse-context-menu-anchor.svelte-hs49xj{position:relative;vertical-align:top}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading.svelte-hs49xj{align-items:unset}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading-space.svelte-hs49xj{flex:1}.jse-table-mode.svelte-hs49xj .jse-contents.jse-contents-loading .jse-loading.svelte-hs49xj{flex:2;text-align:center;color:var(--jse-panel-color-readonly);box-sizing:border-box;font-family:var(--jse-font-family);font-size:var(--jse-font-size)}")}function Fme(t,n,e){var i=t.slice();return i[120]=n[e],i[124]=e,i[121]=i[22].startIndex+i[124],i[122]=i[21].rows[i[121]],i}function Pme(t,n,e){var i,r=t.slice();r[125]=n[e],r[131]=e;var o=[String(r[121])].concat(r[125]);r[126]=o;var s=Sn(r[120],r[125]);r[127]=s;var a=r[46](r[126],r[10].selection);r[128]=a;var l=null===(i=r[122])||void 0===i?void 0:i.columns[r[131]];return r[129]=l,r}function jme(t,n,e){var i=t.slice();return i[125]=n[e],i}function Rme(t){var n,e;return n=new rot({props:{json:t[7],readOnly:t[0],historyState:t[19],onSort:t[40],onTransform:t[41],onUndo:t[42],onRedo:t[43],onContextMenu:t[32],onRenderMenu:t[5]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),524288&r[0]&&(o.historyState=i[19]),32&r[0]&&(o.onRenderMenu=i[5]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Mot(t){var n;return{c:function(){(n=ve("div")).innerHTML='
    \n
    loading...
    ',j(n,"class","jse-contents jse-contents-loading svelte-hs49xj")},m:function(e,i){Pe(e,n,i)},p:jt,i:jt,o:jt,d:function(e){e&&Fe(n)}}}function Oot(t){var n,e,i,r,o,s,a,l,c,u=[Fot,Not,Iot],d=[];function h(f,p){return f[24]?0:f[16]&&void 0!==f[15]&&""!==f[15]?1:2}return r=h(t),o=d[r]=u[r](t),{c:function(){n=ve("label"),e=ve("input"),i=tt(),o.c(),s=br(),j(e,"type","text"),e.readOnly="readonly",j(e,"tabindex","-1"),j(e,"class","jse-hidden-input svelte-hs49xj"),j(n,"class","jse-hidden-input-label svelte-hs49xj")},m:function(f,p){Pe(f,n,p),ue(n,e),t[71](e),Pe(f,i,p),d[r].m(f,p),Pe(f,s,p),a=!0,l||(c=It(e,"paste",t[37]),l=!0)},p:function(f,p){var m=r;(r=h(f))===m?d[r].p(f,p):(Lt(),ae(d[m],1,1,function(){d[m]=null}),$t(),(o=d[r])?o.p(f,p):(o=d[r]=u[r](f)).c(),K(o,1),o.m(s.parentNode,s))},i:function(f){a||(K(o),a=!0)},o:function(f){ae(o),a=!1},d:function(f){f&&Fe(n),t[71](null),f&&Fe(i),d[r].d(f),f&&Fe(s),l=!1,c()}}}function Iot(t){var n,e;return n=new Sot({props:{text:t[15],json:t[7],readOnly:t[0],parser:t[2],openJSONEditorModal:t[39],onChangeMode:t[4]}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};32768&r[0]&&(o.text=i[15]),128&r[0]&&(o.json=i[7]),1&r[0]&&(o.readOnly=i[0]),4&r[0]&&(o.parser=i[2]),16&r[0]&&(o.onChangeMode=i[4]),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function Not(t){var n,e,i,r;return n=new nd({props:{type:"error",message:"The loaded JSON document is invalid and could not be repaired automatically.",actions:t[0]?[]:[{icon:vp,text:"Repair manually",onClick:t[35]}]}}),i=new fue({props:{text:t[15]||"",json:t[7],indentation:t[3],parser:t[2]}}),{c:function(){ft(n.$$.fragment),e=tt(),ft(i.$$.fragment)},m:function(o,s){dt(n,o,s),Pe(o,e,s),dt(i,o,s),r=!0},p:function(o,s){var a={};1&s[0]&&(a.actions=o[0]?[]:[{icon:vp,text:"Repair manually",onClick:o[35]}]),n.$set(a);var l={};32768&s[0]&&(l.text=o[15]||""),128&s[0]&&(l.json=o[7]),8&s[0]&&(l.indentation=o[3]),4&s[0]&&(l.parser=o[2]),i.$set(l)},i:function(o){r||(K(n.$$.fragment,o),K(i.$$.fragment,o),r=!0)},o:function(o){ae(n.$$.fragment,o),ae(i.$$.fragment,o),r=!1},d:function(o){ht(n,o),o&&Fe(e),ht(i,o)}}}function Fot(t){for(var n,e,i,r,o,s,a,l,c,u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R=!Ui(null===(n=t[21])||void 0===n?void 0:n.root),U=R&&Lme(t),G=t[9],X=[],te=0;te"u";a("isSSR:",m);var g,v,y,b,C,k,D=n.readOnly,L=n.externalContent,z=n.mainMenuBar,R=n.escapeControlCharacters,U=n.escapeUnicodeCharacters,G=n.flattenColumns,X=n.parser,te=n.parseMemoizeOne,P=n.validator,W=n.validationParser,J=n.indentation,H=n.onChange,le=n.onChangeMode,E=n.onRenderValue,I=n.onRenderMenu,N=n.onFocus,q=n.onBlur,V=n.onSortModal,re=n.onTransformModal,he=n.onJSONEditorModal;JP({onMount:Yc,onDestroy:Hu,getWindow:function(){return w0(v)},hasFocus:function(){return rt&&document.hasFocus()||ck(v)},onFocus:function(){N&&N()},onBlur:function(){q&&q()}});var Oe,_e=void 0,Xe=1e4,Le=[],rt=!1,B={},ne=600,ie=0;function Me(Te){a("updateSelection",Te);var kt="function"==typeof Te?Te(je.selection):Te;ir(kt,je.selection)||e(10,je=Qe(Qe({},je),{},{selection:kt}))}function Ye(Te){void 0!==je.selection&&void 0!==Te&&(je.selection&&Jc(Te,je.selection.anchorPath)&&Jc(Te,je.selection.focusPath)||(a("clearing selection: path does not exist anymore",je.selection),e(10,je=Qe(Qe({},je),{},{selection:T0(Te,je)}))))}var Tt,je=dk(),yt=!1,fn=kle({onChange:function(Te){e(19,Hn=Te)}}),Hn=fn.getState();function Ei(Te){var kt=Te.previousJson,Vt=Te.previousState,rn=Te.previousText,un=Te.previousTextIsRepaired;void 0===kt&&void 0===rn||(void 0!==C?fn.add(void 0!==kt?{undo:{patch:[{op:"replace",path:"",value:kt}],state:ol(Vt),json:void 0,text:rn,textIsRepaired:un},redo:{patch:[{op:"replace",path:"",value:C}],state:ol(je),json:void 0,text:k,textIsRepaired:yt}}:{undo:{patch:void 0,json:void 0,text:rn,state:ol(Vt),textIsRepaired:un},redo:{patch:void 0,json:C,state:ol(je),text:k,textIsRepaired:yt}}):void 0!==kt&&fn.add({undo:{patch:void 0,json:kt,state:ol(Vt),text:rn,textIsRepaired:un},redo:{patch:void 0,json:void 0,text:k,textIsRepaired:yt,state:ol(je)}}))}var ln=[],ur=wb(Dle);function wr(Te,kt,Vt,rn){R0(function(){var un;try{un=ur(Te,kt,Vt,rn)}catch(ii){un=[{path:[],message:"Failed to validate: "+ii.message,severity:Jd.warning}]}ir(un,ln)||(a("validationErrors changed:",un),e(11,ln=un))},function(un){return a("validationErrors updated in ".concat(un," ms"))})}function or(){return a("validate"),_e?{parseError:_e,isRepairable:!1}:(wr(C,P,X,W),Ui(ln)?null:{validationErrors:ln})}function mr(Te,kt){if(a("patch",Te,kt),void 0===C)throw new Error("Cannot apply patch: no JSON");var Vt={json:C},rn=C,un=je,ii=yt,Ni=vae(C,Te),$n=Kse(C,je,Te).json,ei=function PZe(t,n,e){return n.some(function(i){return function(r,o,s){if(!r)return!1;if("replace"===o.op){var a=au(Yu(o.path),s),l=a.rowIndex,c=a.columnIndex,u=s.findIndex(function(d){return ir(d,r.path)});if(-1!==l&&-1!==c&&c!==u)return!1}return!0}(t.sortedColumn,i,e)})?Qe(Qe({},t),{},{sortedColumn:void 0}):t}(je,Te,Le),Xn="function"==typeof kt?kt($n,ei):void 0;e(7,C=Xn&&void 0!==Xn.json?Xn.json:$n);var yr=Xn&&void 0!==Xn.state?Xn.state:ei;e(10,je=yr),e(15,k=void 0),e(18,yt=!1),e(17,Oe=void 0),fn.add({undo:{patch:Ni,json:void 0,text:void 0,state:ol(un),textIsRepaired:ii},redo:{patch:Te,json:void 0,state:ol(yr),text:void 0,textIsRepaired:yt}});var Er={json:C,previousJson:rn,undo:Ni,redo:Te};return Vr(Vt,Er),Er}function gi(Te,kt){if(!D)return mr(Te,kt)}function Vr(Te,kt){(void 0!==Te.json||void 0!==Te?.text)&&(void 0!==k?H({text:k,json:void 0},Te,{contentErrors:or(),patchResult:kt}):void 0!==C&&H({text:void 0,json:C},Te,{contentErrors:or(),patchResult:kt}))}function Oo(Te){a("handleFind",Te)}function On(Te){a("pasted json as text",Te),e(17,Oe=Te)}function xt(Te){var kt=parseInt(Te[0]),Vt=[String(kt+1)].concat(ri(Te.slice(1)));return Jc(C,Vt)?fr(Vt,!1):fr(Te,!1)}function ai(){b&&(b.focus(),b.select())}function Ii(){je.selection||Me(function(){if(eo(C)&&!Ui(C)&&!Ui(Le))return fr(["0"].concat(ri(Le[0])),!1)}())}function Cr(Te){var kt=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Vt=lj(Te,Le,B,18),rn=Vt-ie,un=pt(Te);a("scrollTo",{path:Te,top:Vt,scrollTop:ie,elem:un});var ii=y.getBoundingClientRect();if(un&&!kt){var Ni=un.getBoundingClientRect();if(Ni.bottom>ii.top&&Ni.topVt.right&&e(13,y.scrollLeft+=rn.right-Vt.right,y),rn.left($n=ie+ii.height-18)&&e(13,y.scrollTop+=un-$n,y),rn0&&void 0!==Vt[0])||Vt[0],void 0!==C){rn.next=3;break}return rn.abrupt("return");case 3:return rn.next=5,cue({json:C,documentState:je,indentation:kt?J:void 0,parser:X});case 5:case"end":return rn.stop()}},Te)})),qa.apply(this,arguments)}function Oc(){due({json:C,text:k,documentState:je,keepSelection:!0,readOnly:D,onChange:H,onPatch:gi})}function xe(){!function jZe(t){var n=t.json,e=t.documentState,i=t.columns,o=t.onPatch;if(!t.readOnly&&void 0!==n&&e.selection&&M0(e.selection)){var s=au(e.selection.focusPath,i),a=s.rowIndex,l=s.columnIndex;kl("duplicate row",{rowIndex:a});var c=[String(a)];o(pae(n,[c]),function(u,d){var h=fr(lg({rowIndex:a0?a-1:void 0,h=void 0!==d?fr(lg({rowIndex:d,columnIndex:l},i),!1):void 0;return kl("remove row new selection",{rowIndex:a,newRowIndex:d,newSelection:h}),{state:Qe(Qe({},u),{},{selection:h})}})}}({json:C,documentState:je,columns:Le,readOnly:D,onPatch:gi})}function Ue(){return(Ue=Ki(pn().mark(function Te(kt){return pn().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:return Vt.next=2,hue({char:kt,selectInside:!1,refJsonEditor:v,json:C,documentState:je,readOnly:D,parser:X,onPatch:gi,onReplaceJson:kn,onSelect:Me});case 2:case"end":return Vt.stop()}},Te)}))).apply(this,arguments)}function kn(Te,kt){var Vt=je,rn=C,un=k,ii={json:C,text:k},Ni=yt,$n=ru(C,je,[],lh),ei="function"==typeof kt?kt(Te,$n):void 0;e(7,C=ei&&void 0!==ei.json?ei.json:Te),e(10,je=ei&&void 0!==ei.state?ei.state:$n),e(15,k=void 0),e(18,yt=!1),Ye(C),Ei({previousJson:rn,previousState:Vt,previousText:un,previousTextIsRepaired:Ni}),Vr(ii,null)}function ni(Te,kt){a("handleChangeText");var Vt=je,rn=C,un=k,ii={json:C,text:k},Ni=yt;try{e(7,C=te(Te)),e(10,je=ru(C,je,[],lh)),e(15,k=void 0),e(18,yt=!1)}catch{try{e(7,C=te(Kd(Te))),e(10,je=ru(C,je,[],lh)),e(15,k=Te),e(18,yt=!0)}catch{e(7,C=void 0),e(10,je=dk({json:C,expand:lh})),e(15,k=Te),e(18,yt=!1)}}if("function"==typeof kt){var $n=kt(C,je);e(7,C=$n&&$n.json?$n.json:C),e(10,je=$n&&$n.state?$n.state:je)}Ye(C),Ei({previousJson:rn,previousState:Vt,previousText:un,previousTextIsRepaired:Ni}),Vr(ii,null)}function ci(Te){var Vt=Te.rootPath,rn=Te.onTransform,un=Te.onClose;D||void 0===C||(rt=!0,re({id:Te.id||p,json:C,rootPath:Vt||[],onTransform:rn?function(ii){rn({operations:ii,json:C,transformedJson:Xu(C,ii)})}:function(ii){a("onTransform",Vt,ii),gi(ii)},onClose:function(){rt=!1,ai(),un&&un()}}))}function li(Te){a("openJSONEditorModal",{path:Te}),rt=!0,he({content:{json:Sn(C,Te)},path:Te,onPatch:Tt.onPatch,onClose:function(){rt=!1,ai()}})}function Sr(Te,kt){l(qle,{text:Te,onParse:ok,onRepair:yse,onApply:kt},Qe(Qe({},Vm),{},{styleWindow:{width:"600px",height:"500px"},styleContent:{padding:0,height:"100%"}}),{onClose:function(){return ai()}})}function qr(){if(!D&&fn.getState().canUndo){var Te=fn.undo();if(Te){var kt={json:C,text:k};e(7,C=Te.undo.patch?Xu(C,Te.undo.patch):Te.undo.json),e(10,je=Te.undo.state),e(15,k=Te.undo.text),e(18,yt=Te.undo.textIsRepaired),a("undo",{item:Te,json:C}),Vr(kt,{json:C,previousJson:kt.json,redo:Te.undo.patch,undo:Te.redo.patch}),ai(),je.selection&&Cr(je.selection.focusPath,!1)}}}function fi(){if(!D&&fn.getState().canRedo){var Te=fn.redo();if(Te){var kt={json:C,text:k};e(7,C=Te.redo.patch?Xu(C,Te.redo.patch):Te.redo.json),e(10,je=Te.redo.state),e(15,k=Te.redo.text),e(18,yt=Te.redo.textIsRepaired),a("redo",{item:Te,json:C}),Vr(kt,{json:C,previousJson:kt.json,redo:Te.redo.patch,undo:Te.undo.patch}),ai(),je.selection&&Cr(je.selection.focusPath,!1)}}}function vr(Te,kt){e(68,B[kt]=Te.getBoundingClientRect().height,B)}return t.$$set=function(Te){"readOnly"in Te&&e(0,D=Te.readOnly),"externalContent"in Te&&e(47,L=Te.externalContent),"mainMenuBar"in Te&&e(1,z=Te.mainMenuBar),"escapeControlCharacters"in Te&&e(48,R=Te.escapeControlCharacters),"escapeUnicodeCharacters"in Te&&e(49,U=Te.escapeUnicodeCharacters),"flattenColumns"in Te&&e(50,G=Te.flattenColumns),"parser"in Te&&e(2,X=Te.parser),"parseMemoizeOne"in Te&&e(51,te=Te.parseMemoizeOne),"validator"in Te&&e(52,P=Te.validator),"validationParser"in Te&&e(53,W=Te.validationParser),"indentation"in Te&&e(3,J=Te.indentation),"onChange"in Te&&e(54,H=Te.onChange),"onChangeMode"in Te&&e(4,le=Te.onChangeMode),"onRenderValue"in Te&&e(55,E=Te.onRenderValue),"onRenderMenu"in Te&&e(5,I=Te.onRenderMenu),"onFocus"in Te&&e(56,N=Te.onFocus),"onBlur"in Te&&e(57,q=Te.onBlur),"onSortModal"in Te&&e(58,V=Te.onSortModal),"onTransformModal"in Te&&e(59,re=Te.onTransformModal),"onJSONEditorModal"in Te&&e(60,he=Te.onJSONEditorModal)},t.$$.update=function(){393216&t.$$.dirty[1]&&e(67,g=gP({escapeControlCharacters:R,escapeUnicodeCharacters:U})),65536&t.$$.dirty[1]&&function Zt(Te){var kt=C,Vt=x0(Te)?Te.text!==k:!ir(kt,Te.json);if(a("update external content",{isChanged:Vt}),Vt){var rn={json:C,text:k},un=C,ii=je,Ni=k,$n=yt;if(x0(Te))try{e(7,C=te(Te.text)),e(15,k=Te.text),e(18,yt=!1),e(16,_e=void 0)}catch(ei){try{e(7,C=te(Kd(Te.text))),e(15,k=Te.text),e(18,yt=!0),e(16,_e=void 0)}catch{e(7,C=void 0),e(15,k=L.text),e(18,yt=!1),e(16,_e=sk(k,ei.message||ei.toString()))}}else e(7,C=Te.json),e(15,k=void 0),e(18,yt=!1),e(16,_e=void 0);Ye(C),je.sortedColumn&&e(10,je=Qe(Qe({},je),{},{sortedColumn:void 0})),Ei({previousJson:un,previousState:ii,previousText:Ni,previousTextIsRepaired:$n}),Vr(rn,null)}}(L),896&t.$$.dirty[0]|524288&t.$$.dirty[1]&&e(9,Le=eo(C)?function(Te,kt){var Vt,rn=new Set(kt.map(an)),un=new Set(Te.map(an)),ii=Re(rn);try{for(ii.s();!(Vt=ii.n()).done;){var Ni=Vt.value;un.has(Ni)||rn.delete(Ni)}}catch(yr){ii.e(yr)}finally{ii.f()}var $n,ei=Re(un);try{for(ei.s();!($n=ei.n()).done;){var Xn=$n.value;rn.has(Xn)||rn.add(Xn)}}catch(yr){ei.e(yr)}finally{ei.f()}return ri(rn).map(Yu)}(function(Te,kt){var Vt=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1/0,rn={};Array.isArray(Te)&&function Hqe(t,n,e){if(t.length1?(t.length-1)/(n-1):t.length,r=0;rXe),128&t.$$.dirty[0]|448&t.$$.dirty[2]&&e(22,o=function(Te,kt,Vt,rn,un){for(var ii=arguments.length>5&&void 0!==arguments[5]?arguments[5]:80,Ni=eo(Vt)?Vt.length:0,$n=function IZe(t,n){var e=Object.values(t);return Ui(e)?n:e.reduce(function(r,o){return r+o})/e.length}(rn,un),ei=Te-ii,Xn=kt+2*ii,yr=function(gd){return rn[gd]||un},Er=0,Io=0;Io0&&(Io-=yr(--Er));for(var sa=Er,md=0;md0?fr(lg({rowIndex:yr.rowIndex,columnIndex:Io-1},ei),!1):Xn;Me(Vt),qo(Vt.focusPath)}if("ArrowRight"===kt&&(Te.preventDefault(),Ii(),je.selection)){var rn=function(ei,Xn){var yr=au(Xn.focusPath,ei),Io=yr.columnIndex;return Io0?fr(lg({rowIndex:Er-1,columnIndex:yr.columnIndex},ei),!1):Xn}(Le,je.selection);Me(un),qo(un.focusPath)}if("ArrowDown"===kt&&(Te.preventDefault(),Ii(),je.selection)){var ii=function(ei,Xn,yr){var Er=au(yr.focusPath,Xn),Io=Er.rowIndex;return Io1?" (".concat(t[18].length,")"):""),onClose:t[23]}}),h=new Jme({props:{mode:Fn(t[18]).mode,content:Fn(t[18]).content,readOnly:t[0],indentation:t[1],tabSize:t[2],statusBar:t[5],mainMenuBar:t[3],navigationBar:t[4],escapeControlCharacters:t[6],escapeUnicodeCharacters:t[7],flattenColumns:t[8],parser:t[9],parseMemoizeOne:t[20],validator:t[10],validationParser:t[11],pathParser:t[12],insideModal:!0,onError:t[26],onChange:t[24],onChangeMode:t[25],onRenderValue:t[13],onClassName:t[14],onFocus:fh,onBlur:fh,onRenderMenu:t[15],onSortModal:t[16],onTransformModal:t[17],onJSONEditorModal:t[27]}});var C=t[19]&&Kme(t),k=t[18].length>1&&Qme(t);function D(R,U){return R[0]?Wot:qot}var L=D(t),z=L(t);return{c:function(){n=ve("div"),ft(e.$$.fragment),i=tt(),r=ve("div"),(o=ve("div")).innerHTML='
    Path
    ',s=tt(),a=ve("input"),l=tt(),(c=ve("div")).innerHTML='
    Contents
    ',u=tt(),d=ve("div"),ft(h.$$.fragment),f=tt(),p=ve("div"),C&&C.c(),m=tt(),k&&k.c(),g=tt(),z.c(),j(o,"class","jse-label svelte-1hibiw3"),j(a,"class","jse-path svelte-1hibiw3"),j(a,"type","text"),a.readOnly=!0,j(a,"title","Selected path"),a.value=t[21],j(c,"class","jse-label svelte-1hibiw3"),j(d,"class","jse-modal-inline-editor svelte-1hibiw3"),j(p,"class","jse-actions svelte-1hibiw3"),j(r,"class","jse-modal-contents svelte-1hibiw3"),j(n,"class","jse-modal jse-jsoneditor-modal svelte-1hibiw3")},m:function(R,U){Pe(R,n,U),dt(e,n,null),ue(n,i),ue(n,r),ue(r,o),ue(r,s),ue(r,a),ue(r,l),ue(r,c),ue(r,u),ue(r,d),dt(h,d,null),ue(r,f),ue(r,p),C&&C.m(p,null),ue(p,m),k&&k.m(p,null),ue(p,g),z.m(p,null),v=!0,y||(b=ya(Ok.call(null,n,t[23])),y=!0)},p:function(R,U){var G={};262144&U[0]&&(G.title="Edit nested content "+(R[18].length>1?" (".concat(R[18].length,")"):"")),e.$set(G),(!v||2097152&U[0]&&a.value!==R[21])&&(a.value=R[21]);var X={};262144&U[0]&&(X.mode=Fn(R[18]).mode),262144&U[0]&&(X.content=Fn(R[18]).content),1&U[0]&&(X.readOnly=R[0]),2&U[0]&&(X.indentation=R[1]),4&U[0]&&(X.tabSize=R[2]),32&U[0]&&(X.statusBar=R[5]),8&U[0]&&(X.mainMenuBar=R[3]),16&U[0]&&(X.navigationBar=R[4]),64&U[0]&&(X.escapeControlCharacters=R[6]),128&U[0]&&(X.escapeUnicodeCharacters=R[7]),256&U[0]&&(X.flattenColumns=R[8]),512&U[0]&&(X.parser=R[9]),1048576&U[0]&&(X.parseMemoizeOne=R[20]),1024&U[0]&&(X.validator=R[10]),2048&U[0]&&(X.validationParser=R[11]),4096&U[0]&&(X.pathParser=R[12]),8192&U[0]&&(X.onRenderValue=R[13]),16384&U[0]&&(X.onClassName=R[14]),32768&U[0]&&(X.onRenderMenu=R[15]),65536&U[0]&&(X.onSortModal=R[16]),131072&U[0]&&(X.onTransformModal=R[17]),h.$set(X),R[19]?C?C.p(R,U):((C=Kme(R)).c(),C.m(p,m)):C&&(C.d(1),C=null),R[18].length>1?k?(k.p(R,U),262144&U[0]&&K(k,1)):((k=Qme(R)).c(),K(k,1),k.m(p,g)):k&&(Lt(),ae(k,1,1,function(){k=null}),$t()),L===(L=D(R))&&z?z.p(R,U):(z.d(1),(z=L(R))&&(z.c(),z.m(p,null)))},i:function(R){v||(K(e.$$.fragment,R),K(h.$$.fragment,R),K(k),v=!0)},o:function(R){ae(e.$$.fragment,R),ae(h.$$.fragment,R),ae(k),v=!1},d:function(R){R&&Fe(n),ht(e),ht(h),C&&C.d(),k&&k.d(),z.d(),y=!1,b()}}}function Zme(t){t.focus()}function Xot(t,n,e){var i,r,o,s=ba("jsoneditor:JSONEditorModal"),a=n.content,l=n.path,c=n.onPatch,u=n.readOnly,d=n.indentation,h=n.tabSize,f=n.mainMenuBar,p=n.navigationBar,m=n.statusBar,g=n.escapeControlCharacters,v=n.escapeUnicodeCharacters,y=n.flattenColumns,b=n.parser,C=n.validator,k=n.validationParser,D=n.pathParser,L=n.onRenderValue,z=n.onClassName,R=n.onRenderMenu,U=n.onSortModal,G=n.onTransformModal,X=_a("simple-modal").close,te=[{mode:W(a),content:a,relativePath:l}],P=void 0;function W(H){return mP(H)&&eo(H.json)?Lo.table:Lo.tree}function J(H){s("handleChange",H);var le=Qe(Qe({},Fn(te)),{},{content:H});e(18,te=[].concat(ri(qi(te)),[le]))}return t.$$set=function(H){"content"in H&&e(28,a=H.content),"path"in H&&e(29,l=H.path),"onPatch"in H&&e(30,c=H.onPatch),"readOnly"in H&&e(0,u=H.readOnly),"indentation"in H&&e(1,d=H.indentation),"tabSize"in H&&e(2,h=H.tabSize),"mainMenuBar"in H&&e(3,f=H.mainMenuBar),"navigationBar"in H&&e(4,p=H.navigationBar),"statusBar"in H&&e(5,m=H.statusBar),"escapeControlCharacters"in H&&e(6,g=H.escapeControlCharacters),"escapeUnicodeCharacters"in H&&e(7,v=H.escapeUnicodeCharacters),"flattenColumns"in H&&e(8,y=H.flattenColumns),"parser"in H&&e(9,b=H.parser),"validator"in H&&e(10,C=H.validator),"validationParser"in H&&e(11,k=H.validationParser),"pathParser"in H&&e(12,D=H.pathParser),"onRenderValue"in H&&e(13,L=H.onRenderValue),"onClassName"in H&&e(14,z=H.onClassName),"onRenderMenu"in H&&e(15,R=H.onRenderMenu),"onSortModal"in H&&e(16,U=H.onSortModal),"onTransformModal"in H&&e(17,G=H.onTransformModal)},t.$$.update=function(){262144&t.$$.dirty[0]&&e(31,i=te.flatMap(function(H){return H.relativePath})),1&t.$$.dirty[1]&&e(21,r=Ui(i)?"(whole document)":iu(ql(i))),512&t.$$.dirty[0]&&e(20,o=wb(b.parse))},[u,d,h,f,p,m,g,v,y,b,C,k,D,L,z,R,U,G,te,P,o,r,function(){if(s("handleApply"),!u)try{e(19,P=void 0);var H=[{op:"replace",path:an(Fn(te).relativePath),value:bse(Fn(te).content,b).json}];if(te.length>1){var le={json:Xu(bse(te[te.length-2].content,b).json,H)};e(18,te=qi(te)),J(le)}else c(H),X()}catch(E){e(19,P=E.toString())}},function(){s("handleClose"),te.length>1?(e(18,te=qi(te)),e(19,P=void 0)):X()},J,function(H){s("handleChangeMode",H);var le=Qe(Qe({},Fn(te)),{},{mode:H});e(18,te=[].concat(ri(qi(te)),[le]))},function(H){e(19,P=H.toString()),console.error(H)},function(H){var le=H.content,E=H.path;s("handleJSONEditorModal",{content:le,path:E});var I={mode:W(le),content:le,relativePath:E};e(18,te=[].concat(ri(te),[I]))},a,l,c,i]}var Jot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Xot,Yot,Ti,{content:28,path:29,onPatch:30,readOnly:0,indentation:1,tabSize:2,mainMenuBar:3,navigationBar:4,statusBar:5,escapeControlCharacters:6,escapeUnicodeCharacters:7,flattenColumns:8,parser:9,validator:10,validationParser:11,pathParser:12,onRenderValue:13,onClassName:14,onRenderMenu:15,onSortModal:16,onTransformModal:17},Got,[-1,-1]),r}return Se(e)}();function Kot(t,n,e){var i=_a("simple-modal");return[i.open,i.close]}var Qot=function(t){wt(e,Mn);var n=Ct(e);function e(i){var r;return Ce(this,e),Nn(An(r=n.call(this)),i,Kot,null,Ti,{open:0,close:1}),r}return Se(e,[{key:"open",get:function(){return this.$$.ctx[0]}},{key:"close",get:function(){return this.$$.ctx[1]}}]),e}();function Zot(t){di(t,"svelte-sxaskb",':root{--jse-theme:light;--jse-font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,\n Cantarell, "Helvetica Neue", sans-serif;--jse-font-family-mono:consolas, menlo, monaco, "Ubuntu Mono", "source-code-pro", monospace;--jse-font-size-mono:14px;--jse-font-size:16px;--jse-font-size-text-mode-search:80%;--jse-line-height:calc(1em + 4px);--jse-indent-size:calc(1em + 4px);--jse-color-picker-button-size:1em;--jse-padding:10px;--jse-theme-color:#3883fa;--jse-theme-color-highlight:#5f9dff;--jse-background-color:#fff;--jse-text-color:#4d4d4d;--jse-text-readonly:#8d8d8d;--jse-text-color-inverse:#fff;--jse-error-color:#ee5341;--jse-warning-color:#fdc539;--jse-main-border:1px solid #d7d7d7;--jse-menu-color:var(--jse-text-color-inverse);--jse-menu-button-size:32px;--jse-modal-background:#f5f5f5;--jse-modal-overlay-background:rgba(0, 0, 0, 0.3);--jse-modal-code-background:rgba(0, 0, 0, 0.05);--jse-modal-theme-color:#707070;--jse-modal-theme-color-highlight:#646464;--jse-tooltip-color:var(--jse-text-color);--jse-tooltip-background:var(--jse-modal-background);--jse-tooltip-border:var(--jse-main-border);--jse-tooltip-action-button-color:var(--jse-text-color-inverse);--jse-tooltip-action-button-background:#4d4d4d;--jse-panel-background:#ebebeb;--jse-panel-color:var(--jse-text-color);--jse-panel-color-readonly:#b2b2b2;--jse-panel-border:var(--jse-main-border);--jse-panel-button-color:inherit;--jse-panel-button-background:transparent;--jse-panel-button-color-highlight:var(--jse-text-color);--jse-panel-button-background-highlight:#e0e0e0;--jse-navigation-bar-background:var(--jse-background-color);--jse-navigation-bar-background-highlight:#e5e5e5;--jse-navigation-bar-dropdown-color:#656565;--jse-context-menu-background:#656565;--jse-context-menu-background-highlight:#7a7a7a;--jse-context-menu-color:var(--jse-text-color-inverse);--jse-context-menu-color-disabled:#9d9d9d;--jse-context-menu-separator-color:#7a7a7a;--jse-context-menu-pointer-hover-background:#b2b2b2;--jse-context-menu-pointer-background:var(--jse-context-menu-background);--jse-context-menu-pointer-background-highlight:var(--jse-context-menu-background-highlight);--jse-context-menu-pointer-color:var(--jse-context-menu-color);--jse-context-menu-pointer-size:calc(1em + 4px);--jse-context-menu-tip-background:rgba(255, 255, 255, 0.2);--jse-context-menu-tip-color:inherit;--jse-key-color:#1a1a1a;--jse-value-color:#1a1a1a;--jse-value-color-number:#ee422e;--jse-value-color-boolean:#ff8c00;--jse-value-color-null:#004ed0;--jse-value-color-string:#008000;--jse-value-color-url:#008000;--jse-delimiter-color:rgba(0, 0, 0, 0.38);--jse-edit-outline:2px solid #656565;--jse-contents-background-color:transparent;--jse-contents-cursor:pointer;--jse-contents-selected-cursor:grab;--jse-selection-background-color:#d3d3d3;--jse-selection-background-inactive-color:#e8e8e8;--jse-hover-background-color:rgba(0, 0, 0, 0.06);--jse-active-line-background-color:rgba(0, 0, 0, 0.06);--jse-search-match-background-color:#99ff7780;--jse-collapsed-items-background-color:#f5f5f5;--jse-collapsed-items-selected-background-color:#c2c2c2;--jse-collapsed-items-link-color:rgba(0, 0, 0, 0.38);--jse-collapsed-items-link-color-highlight:#ee5341;--jse-search-match-color:#ffe665;--jse-search-match-outline:1px solid #ffd700;--jse-search-match-active-color:#ffd700;--jse-search-match-active-outline:1px solid #e1be00;--jse-tag-background:rgba(0, 0, 0, 0.2);--jse-tag-color:var(--jse-text-color-inverse);--jse-table-header-background:#f5f5f5;--jse-table-header-background-highlight:#e8e8e8;--jse-table-row-odd-background:rgba(0, 0, 0, 0.05);--jse-controls-box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.24);--jse-input-background:var(--jse-background-color);--jse-input-background-readonly:transparent;--jse-input-border:1px solid #d8dbdf;--jse-input-border-focus:1px solid var(--jse-theme-color);--jse-input-radius:3px;--jse-button-background:#e0e0e0;--jse-button-background-highlight:#e7e7e7;--jse-button-color:var(--jse-text-color);--jse-button-primary-background:var(--jse-theme-color);--jse-button-primary-background-highlight:var(--jse-theme-color-highlight);--jse-button-primary-background-disabled:#9d9d9d;--jse-button-primary-color:var(--jse-text-color-inverse);--jse-button-secondary-background:#d3d3d3;--jse-button-secondary-background-highlight:#e1e1e1;--jse-button-secondary-background-disabled:#9d9d9d;--jse-button-secondary-color:var(--jse-text-color);--jse-a-color:#156fc5;--jse-a-color-highlight:#0f508d;--jse-message-error-background:var(--jse-error-color);--jse-message-error-color:var(--jse-text-color-inverse);--jse-message-warning-background:#ffde5c;--jse-message-warning-color:var(--jse-text-color);--jse-message-success-background:#9ac45d;--jse-message-success-color:var(--jse-text-color-inverse);--jse-message-info-background:#4f91ff;--jse-message-info-color:var(--jse-text-color-inverse);--jse-message-action-background:rgba(255, 255, 255, 0.2);--jse-message-action-background-highlight:rgba(255, 255, 255, 0.3);--item-is-active-bg:#3883fa;--border:1px solid #d8dbdf;--border-radius:3px;--background:#fff;--padding:0 10px;--multi-select-padding:0 10px;--jse-color-picker-background:var(--jse-panel-background);--jse-color-picker-border-box-shadow:#cbcbcb 0 0 0 1px}.jse-main.svelte-sxaskb{width:100%;height:100%;min-width:0;min-height:150px;font-family:var(--jse-font-family);font-size:var(--jse-font-size);line-height:normal;position:relative;display:flex;flex-direction:row}')}function ege(t){var n,e;return n=new Jme({props:{mode:t[1],content:t[0],readOnly:t[2],indentation:t[3],tabSize:t[4],statusBar:t[7],mainMenuBar:t[5],navigationBar:t[6],escapeControlCharacters:t[8],escapeUnicodeCharacters:t[9],flattenColumns:t[10],parser:t[11],parseMemoizeOne:t[24],validator:t[12],validationParser:t[13],pathParser:t[14],insideModal:!1,onError:t[18],onChange:t[25],onChangeMode:t[28],onRenderValue:t[15],onClassName:t[16],onFocus:t[26],onBlur:t[27],onRenderMenu:t[17],onSortModal:t[30],onTransformModal:t[29],onJSONEditorModal:t[31]}}),t[56](n),{c:function(){ft(n.$$.fragment)},m:function(r,o){dt(n,r,o),e=!0},p:function(r,o){var s={};2&o[0]&&(s.mode=r[1]),1&o[0]&&(s.content=r[0]),4&o[0]&&(s.readOnly=r[2]),8&o[0]&&(s.indentation=r[3]),16&o[0]&&(s.tabSize=r[4]),128&o[0]&&(s.statusBar=r[7]),32&o[0]&&(s.mainMenuBar=r[5]),64&o[0]&&(s.navigationBar=r[6]),256&o[0]&&(s.escapeControlCharacters=r[8]),512&o[0]&&(s.escapeUnicodeCharacters=r[9]),1024&o[0]&&(s.flattenColumns=r[10]),2048&o[0]&&(s.parser=r[11]),16777216&o[0]&&(s.parseMemoizeOne=r[24]),4096&o[0]&&(s.validator=r[12]),8192&o[0]&&(s.validationParser=r[13]),16384&o[0]&&(s.pathParser=r[14]),262144&o[0]&&(s.onError=r[18]),32768&o[0]&&(s.onRenderValue=r[15]),65536&o[0]&&(s.onClassName=r[16]),131072&o[0]&&(s.onRenderMenu=r[17]),n.$set(s)},i:function(r){e||(K(n.$$.fragment,r),e=!0)},o:function(r){ae(n.$$.fragment,r),e=!1},d:function(r){t[56](null),ht(n,r)}}}function est(t){var n,e,i,r,o,s=t[19];function a(u){t[55](u)}var l={};void 0!==t[22]&&(l.open=t[22]),n=new Qot({props:l}),Hi.push(function(){return zu(n,"open",a)});var c=ege(t);return{c:function(){ft(n.$$.fragment),i=tt(),r=ve("div"),c.c(),j(r,"class","jse-main svelte-sxaskb"),At(r,"jse-focus",t[20])},m:function(u,d){dt(n,u,d),Pe(u,i,d),Pe(u,r,d),c.m(r,null),o=!0},p:function(u,d){var h={};!e&&4194304&d[0]&&(e=!0,h.open=u[22],Uu(function(){return e=!1})),n.$set(h),524288&d[0]&&Ti(s,s=u[19])?(Lt(),ae(c,1,1,jt),$t(),(c=ege(u)).c(),K(c,1),c.m(r,null)):c.p(u,d),(!o||1048576&d[0])&&At(r,"jse-focus",u[20])},i:function(u){o||(K(n.$$.fragment,u),K(c),o=!0)},o:function(u){ae(n.$$.fragment,u),ae(c),o=!1},d:function(u){ht(n,u),u&&Fe(i),u&&Fe(r),c.d(u)}}}function tst(t){var n,e;return n=new PZ({props:{closeOnEsc:!1,$$slots:{default:[est]},$$scope:{ctx:t}}}),{c:function(){ft(n.$$.fragment)},m:function(i,r){dt(n,i,r),e=!0},p:function(i,r){var o={};25165823&r[0]|268435456&r[1]&&(o.$$scope={dirty:r,ctx:i}),n.$set(o)},i:function(i){e||(K(n.$$.fragment,i),e=!0)},o:function(i){ae(n.$$.fragment,i),e=!1},d:function(i){ht(n,i)}}}function nst(t){for(var n,e,i,r=[{show:null===(n=t[23])||void 0===n?void 0:n.component},jZ,{closeOnEsc:!1}],o={$$slots:{default:[tst]},$$scope:{ctx:t}},s=0;s1)return!1;var p=this._items[0];return""===p||'""'===p}},{key:"str",get:function(){var p;return null!==(p=this._str)&&void 0!==p?p:this._str=this._items.reduce(function(m,g){return"".concat(m).concat(g)},"")}},{key:"names",get:function(){var p;return null!==(p=this._names)&&void 0!==p?p:this._names=this._items.reduce(function(m,g){return g instanceof e&&(m[g.str]=(m[g.str]||0)+1),m},{})}}]),f}(n);function r(d){for(var h=[d[0]],f=0,p=arguments.length,m=new Array(p>1?p-1:0),g=1;g1?p-1:0),g=1;g0&&void 0!==arguments[0]?arguments[0]:{},u=c.prefixes,d=c.parent;Ce(this,l),this._names={},this._prefixes=u,this._parent=d}return Se(l,[{key:"toName",value:function(c){return c instanceof e.Name?c:this.name(c)}},{key:"name",value:function(c){return new e.Name(this._newName(c))}},{key:"_newName",value:function(c){var u=this._names[c]||this._nameGroup(c);return"".concat(c).concat(u.index++)}},{key:"_nameGroup",value:function(c){var u,d;if(null!==(d=null===(u=this._parent)||void 0===u?void 0:u._prefixes)&&void 0!==d&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error('CodeGen: prefix "'.concat(c,'" is not allowed in this scope'));return this._names[c]={prefix:c,index:0}}}]),l}();t.Scope=r;var o=function(l){wt(u,l);var c=Ct(u);function u(d,h){var f;return Ce(this,u),(f=c.call(this,h)).prefix=d,f}return Se(u,[{key:"setValue",value:function(d,h){var f=h.property,p=h.itemIndex;this.value=d,this.scopePath=(0,e._)(Jq||(Jq=Ee([".","[","]"])),new e.Name(f),p)}}]),u}(e.Name);t.ValueScopeName=o;var s=(0,e._)(Kq||(Kq=Ee(["\n"],["\\n"]))),a=function(l){wt(u,l);var c=Ct(u);function u(d){var h;return Ce(this,u),(h=c.call(this,d))._values={},h._scope=d.scope,h.opts=Qe(Qe({},d),{},{_n:d.lines?s:e.nil}),h}return Se(u,[{key:"get",value:function(){return this._scope}},{key:"name",value:function(d){return new o(d,this._newName(d))}},{key:"value",value:function(d,h){var f;if(void 0===h.ref)throw new Error("CodeGen: ref must be passed in value");var p=this.toName(d),m=p.prefix,g=null!==(f=h.key)&&void 0!==f?f:h.ref,v=this._values[m];if(v){var y=v.get(g);if(y)return y}else v=this._values[m]=new Map;v.set(g,p);var b=this._scope[m]||(this._scope[m]=[]),C=b.length;return b[C]=h.ref,p.setValue(h,{property:m,itemIndex:C}),p}},{key:"getValue",value:function(d,h){var f=this._values[d];if(f)return f.get(h)}},{key:"scopeRefs",value:function(d){return this._reduceValues(arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._values,function(f){if(void 0===f.scopePath)throw new Error('CodeGen: name "'.concat(f,'" has no value'));return(0,e._)(Qq||(Qq=Ee(["","",""])),d,f.scopePath)})}},{key:"scopeCode",value:function(){return this._reduceValues(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._values,function(p){if(void 0===p.value)throw new Error('CodeGen: name "'.concat(p,'" has no value'));return p.value.code},arguments.length>1?arguments[1]:void 0,arguments.length>2?arguments[2]:void 0)}},{key:"_reduceValues",value:function(d,h){var f=this,p=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m=arguments.length>3?arguments[3]:void 0,g=e.nil,v=function(b){var C=d[b];if(!C)return"continue";var k=p[b]=p[b]||new Map;C.forEach(function(D){if(!k.has(D)){k.set(D,n.Started);var L=h(D);if(L){var z=f.opts.es5?t.varKinds.var:t.varKinds.const;g=(0,e._)(Zq||(Zq=Ee(["",""," "," = ",";",""])),g,z,D,L,f.opts._n)}else{if(!(L=m?.(D)))throw new i(D);g=(0,e._)(eY||(eY=Ee(["","","",""])),g,L,f.opts._n)}k.set(D,n.Completed)}})};for(var y in d)v(y);return g}}]),u}(r);t.ValueScope=a}(hge)),hge}function xr(){return dge||(dge=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var n=eT(),e=fge(),i=eT();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var r=fge();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return r.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};var o=function(){function N(){Ce(this,N)}return Se(N,[{key:"optimizeNodes",value:function(){return this}},{key:"optimizeNames",value:function(q,V){return this}}]),N}(),s=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe){var _e;return Ce(this,V),(_e=q.call(this)).varKind=re,_e.name=he,_e.rhs=Oe,_e}return Se(V,[{key:"render",value:function(re){var Oe=re._n,_e=re.es5?e.varKinds.var:this.varKind,Xe=void 0===this.rhs?"":" = ".concat(this.rhs);return"".concat(_e," ").concat(this.name).concat(Xe,";")+Oe}},{key:"optimizeNames",value:function(re,he){if(re[this.name.str])return this.rhs&&(this.rhs=P(this.rhs,re,he)),this}},{key:"names",get:function(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}]),V}(o),a=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe){var _e;return Ce(this,V),(_e=q.call(this)).lhs=re,_e.rhs=he,_e.sideEffects=Oe,_e}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.lhs," = ").concat(this.rhs,";")+he}},{key:"optimizeNames",value:function(re,he){if(!(this.lhs instanceof n.Name)||re[this.lhs.str]||this.sideEffects)return this.rhs=P(this.rhs,re,he),this}},{key:"names",get:function(){return te(this.lhs instanceof n.Name?{}:Qe({},this.lhs.names),this.rhs)}}]),V}(o),l=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe,_e){var Xe;return Ce(this,V),(Xe=q.call(this,re,Oe,_e)).op=he,Xe}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.lhs," ").concat(this.op,"= ").concat(this.rhs,";")+he}}]),V}(a),c=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).label=re,he.names={},he}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.label,":")+he}}]),V}(o),u=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).label=re,he.names={},he}return Se(V,[{key:"render",value:function(re){var he=re._n,Oe=this.label?" ".concat(this.label):"";return"break".concat(Oe,";")+he}}]),V}(o),d=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).error=re,he}return Se(V,[{key:"render",value:function(re){var he=re._n;return"throw ".concat(this.error,";")+he}},{key:"names",get:function(){return this.error.names}}]),V}(o),h=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).code=re,he}return Se(V,[{key:"render",value:function(re){var he=re._n;return"".concat(this.code,";")+he}},{key:"optimizeNodes",value:function(){return"".concat(this.code)?this:void 0}},{key:"optimizeNames",value:function(re,he){return this.code=P(this.code,re,he),this}},{key:"names",get:function(){return this.code instanceof n._CodeOrName?this.code.names:{}}}]),V}(o),f=function(N){wt(V,N);var q=Ct(V);function V(){var re,he=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Ce(this,V),(re=q.call(this)).nodes=he,re}return Se(V,[{key:"render",value:function(re){return this.nodes.reduce(function(he,Oe){return he+Oe.render(re)},"")}},{key:"optimizeNodes",value:function(){for(var re=this.nodes,he=re.length;he--;){var Oe=re[he].optimizeNodes();Array.isArray(Oe)?re.splice.apply(re,[he,1].concat(ri(Oe))):Oe?re[he]=Oe:re.splice(he,1)}return re.length>0?this:void 0}},{key:"optimizeNames",value:function(re,he){for(var Oe=this.nodes,_e=Oe.length;_e--;){var Xe=Oe[_e];Xe.optimizeNames(re,he)||(W(re,Xe.names),Oe.splice(_e,1))}return Oe.length>0?this:void 0}},{key:"names",get:function(){return this.nodes.reduce(function(re,he){return X(re,he.names)},{})}}]),V}(o),p=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){return"{"+re._n+hr(Wi(V.prototype),"render",this).call(this,re)+"}"+re._n}}]),V}(f),m=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V)}(f),g=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V)}(p);g.kind="else";var v=function(N){wt(V,N);var q=Ct(V);function V(re,he){var Oe;return Ce(this,V),(Oe=q.call(this,he)).condition=re,Oe}return Se(V,[{key:"render",value:function(re){var he="if(".concat(this.condition,")")+hr(Wi(V.prototype),"render",this).call(this,re);return this.else&&(he+="else "+this.else.render(re)),he}},{key:"optimizeNodes",value:function(){hr(Wi(V.prototype),"optimizeNodes",this).call(this);var re=this.condition;if(!0===re)return this.nodes;var he=this.else;if(he){var Oe=he.optimizeNodes();he=this.else=Array.isArray(Oe)?new g(Oe):Oe}return he?!1===re?he instanceof V?he:he.nodes:this.nodes.length?this:new V(J(re),he instanceof V?[he]:he.nodes):!1!==re&&this.nodes.length?this:void 0}},{key:"optimizeNames",value:function(re,he){var Oe;if(this.else=null===(Oe=this.else)||void 0===Oe?void 0:Oe.optimizeNames(re,he),hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he)||this.else)return this.condition=P(this.condition,re,he),this}},{key:"names",get:function(){var re=hr(Wi(V.prototype),"names",this);return te(re,this.condition),this.else&&X(re,this.else.names),re}}]),V}(p);v.kind="if";var y=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V)}(p);y.kind="for";var b=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).iteration=re,he}return Se(V,[{key:"render",value:function(re){return"for(".concat(this.iteration,")")+hr(Wi(V.prototype),"render",this).call(this,re)}},{key:"optimizeNames",value:function(re,he){if(hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he))return this.iteration=P(this.iteration,re,he),this}},{key:"names",get:function(){return X(hr(Wi(V.prototype),"names",this),this.iteration.names)}}]),V}(y),C=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe,_e){var Xe;return Ce(this,V),(Xe=q.call(this)).varKind=re,Xe.name=he,Xe.from=Oe,Xe.to=_e,Xe}return Se(V,[{key:"render",value:function(re){var Oe=this.name,_e=this.from,Xe=this.to;return"for(".concat(re.es5?e.varKinds.var:this.varKind," ").concat(Oe,"=").concat(_e,"; ").concat(Oe,"<").concat(Xe,"; ").concat(Oe,"++)")+hr(Wi(V.prototype),"render",this).call(this,re)}},{key:"names",get:function(){var re=te(hr(Wi(V.prototype),"names",this),this.from);return te(re,this.to)}}]),V}(y),k=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe,_e){var Xe;return Ce(this,V),(Xe=q.call(this)).loop=re,Xe.varKind=he,Xe.name=Oe,Xe.iterable=_e,Xe}return Se(V,[{key:"render",value:function(re){return"for(".concat(this.varKind," ").concat(this.name," ").concat(this.loop," ").concat(this.iterable,")")+hr(Wi(V.prototype),"render",this).call(this,re)}},{key:"optimizeNames",value:function(re,he){if(hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he))return this.iterable=P(this.iterable,re,he),this}},{key:"names",get:function(){return X(hr(Wi(V.prototype),"names",this),this.iterable.names)}}]),V}(y),D=function(N){wt(V,N);var q=Ct(V);function V(re,he,Oe){var _e;return Ce(this,V),(_e=q.call(this)).name=re,_e.args=he,_e.async=Oe,_e}return Se(V,[{key:"render",value:function(re){return"".concat(this.async?"async ":"","function ").concat(this.name,"(").concat(this.args,")")+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(p);D.kind="func";var L=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){return"return "+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(f);L.kind="return";var z=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){var he="try"+hr(Wi(V.prototype),"render",this).call(this,re);return this.catch&&(he+=this.catch.render(re)),this.finally&&(he+=this.finally.render(re)),he}},{key:"optimizeNodes",value:function(){var re,he;return hr(Wi(V.prototype),"optimizeNodes",this).call(this),null===(re=this.catch)||void 0===re||re.optimizeNodes(),null===(he=this.finally)||void 0===he||he.optimizeNodes(),this}},{key:"optimizeNames",value:function(re,he){var Oe,_e;return hr(Wi(V.prototype),"optimizeNames",this).call(this,re,he),null===(Oe=this.catch)||void 0===Oe||Oe.optimizeNames(re,he),null===(_e=this.finally)||void 0===_e||_e.optimizeNames(re,he),this}},{key:"names",get:function(){var re=hr(Wi(V.prototype),"names",this);return this.catch&&X(re,this.catch.names),this.finally&&X(re,this.finally.names),re}}]),V}(p),R=function(N){wt(V,N);var q=Ct(V);function V(re){var he;return Ce(this,V),(he=q.call(this)).error=re,he}return Se(V,[{key:"render",value:function(re){return"catch(".concat(this.error,")")+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(p);R.kind="catch";var U=function(N){wt(V,N);var q=Ct(V);function V(){return Ce(this,V),q.apply(this,arguments)}return Se(V,[{key:"render",value:function(re){return"finally"+hr(Wi(V.prototype),"render",this).call(this,re)}}]),V}(p);U.kind="finally";var G=function(){function N(q){var V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ce(this,N),this._values={},this._blockStarts=[],this._constants={},this.opts=Qe(Qe({},V),{},{_n:V.lines?"\n":""}),this._extScope=q,this._scope=new e.Scope({parent:q}),this._nodes=[new m]}return Se(N,[{key:"toString",value:function(){return this._root.render(this.opts)}},{key:"name",value:function(q){return this._scope.name(q)}},{key:"scopeName",value:function(q){return this._extScope.name(q)}},{key:"scopeValue",value:function(q,V){var re=this._extScope.value(q,V);return(this._values[re.prefix]||(this._values[re.prefix]=new Set)).add(re),re}},{key:"getScopeValue",value:function(q,V){return this._extScope.getValue(q,V)}},{key:"scopeRefs",value:function(q){return this._extScope.scopeRefs(q,this._values)}},{key:"scopeCode",value:function(){return this._extScope.scopeCode(this._values)}},{key:"_def",value:function(q,V,re,he){var Oe=this._scope.toName(V);return void 0!==re&&he&&(this._constants[Oe.str]=re),this._leafNode(new s(q,Oe,re)),Oe}},{key:"const",value:function(q,V,re){return this._def(e.varKinds.const,q,V,re)}},{key:"let",value:function(q,V,re){return this._def(e.varKinds.let,q,V,re)}},{key:"var",value:function(q,V,re){return this._def(e.varKinds.var,q,V,re)}},{key:"assign",value:function(q,V,re){return this._leafNode(new a(q,V,re))}},{key:"add",value:function(q,V){return this._leafNode(new l(q,t.operators.ADD,V))}},{key:"code",value:function(q){return"function"==typeof q?q():q!==n.nil&&this._leafNode(new h(q)),this}},{key:"object",value:function(){for(var q=["{"],V=arguments.length,re=new Array(V),he=0;he1&&q.push(","),q.push(Le),(Le!==rt||this.opts.es5)&&(q.push(":"),(0,n.addCodeArg)(q,rt))}return q.push("}"),new n._Code(q)}},{key:"if",value:function(q,V,re){if(this._blockNode(new v(q)),V&&re)this.code(V).else().code(re).endIf();else if(V)this.code(V).endIf();else if(re)throw new Error('CodeGen: "else" body without "then" body');return this}},{key:"elseIf",value:function(q){return this._elseNode(new v(q))}},{key:"else",value:function(){return this._elseNode(new g)}},{key:"endIf",value:function(){return this._endBlockNode(v,g)}},{key:"_for",value:function(q,V){return this._blockNode(q),V&&this.code(V).endFor(),this}},{key:"for",value:function(q,V){return this._for(new b(q),V)}},{key:"forRange",value:function(q,V,re,he){var Oe=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.es5?e.varKinds.var:e.varKinds.let,_e=this._scope.toName(q);return this._for(new C(Oe,_e,V,re),function(){return he(_e)})}},{key:"forOf",value:function(q,V,re){var he=this,Oe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.varKinds.const,_e=this._scope.toName(q);if(this.opts.es5){var Xe=V instanceof n.Name?V:this.var("_arr",V);return this.forRange("_i",0,(0,n._)(tY||(tY=Ee(["",".length"])),Xe),function(Le){he.var(_e,(0,n._)(nY||(nY=Ee(["","[","]"])),Xe,Le)),re(_e)})}return this._for(new k("of",Oe,_e,V),function(){return re(_e)})}},{key:"forIn",value:function(q,V,re){var he=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.es5?e.varKinds.var:e.varKinds.const;if(this.opts.ownProperties)return this.forOf(q,(0,n._)(iY||(iY=Ee(["Object.keys(",")"])),V),re);var Oe=this._scope.toName(q);return this._for(new k("in",he,Oe,V),function(){return re(Oe)})}},{key:"endFor",value:function(){return this._endBlockNode(y)}},{key:"label",value:function(q){return this._leafNode(new c(q))}},{key:"break",value:function(q){return this._leafNode(new u(q))}},{key:"return",value:function(q){var V=new L;if(this._blockNode(V),this.code(q),1!==V.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(L)}},{key:"try",value:function(q,V,re){if(!V&&!re)throw new Error('CodeGen: "try" without "catch" and "finally"');var he=new z;if(this._blockNode(he),this.code(q),V){var Oe=this.name("e");this._currNode=he.catch=new R(Oe),V(Oe)}return re&&(this._currNode=he.finally=new U,this.code(re)),this._endBlockNode(R,U)}},{key:"throw",value:function(q){return this._leafNode(new d(q))}},{key:"block",value:function(q,V){return this._blockStarts.push(this._nodes.length),q&&this.code(q).endBlock(V),this}},{key:"endBlock",value:function(q){var V=this._blockStarts.pop();if(void 0===V)throw new Error("CodeGen: not in self-balancing block");var re=this._nodes.length-V;if(re<0||void 0!==q&&re!==q)throw new Error("CodeGen: wrong number of nodes: ".concat(re," vs ").concat(q," expected"));return this._nodes.length=V,this}},{key:"func",value:function(q){var he=arguments.length>3?arguments[3]:void 0;return this._blockNode(new D(q,arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.nil,arguments.length>2?arguments[2]:void 0)),he&&this.code(he).endFunc(),this}},{key:"endFunc",value:function(){return this._endBlockNode(D)}},{key:"optimize",value:function(){for(var q=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;q-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}},{key:"_leafNode",value:function(q){return this._currNode.nodes.push(q),this}},{key:"_blockNode",value:function(q){this._currNode.nodes.push(q),this._nodes.push(q)}},{key:"_endBlockNode",value:function(q,V){var re=this._currNode;if(re instanceof q||V&&re instanceof V)return this._nodes.pop(),this;throw new Error('CodeGen: not in block "'.concat(V?"".concat(q.kind,"/").concat(V.kind):q.kind,'"'))}},{key:"_elseNode",value:function(q){var V=this._currNode;if(!(V instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=V.else=q,this}},{key:"_root",get:function(){return this._nodes[0]}},{key:"_currNode",get:function(){var q=this._nodes;return q[q.length-1]},set:function(q){var V=this._nodes;V[V.length-1]=q}}]),N}();function X(N,q){for(var V in q)N[V]=(N[V]||0)+(q[V]||0);return N}function te(N,q){return q instanceof n._CodeOrName?X(N,q.names):N}function P(N,q,V){return N instanceof n.Name?re(N):(he=N)instanceof n._Code&&he._items.some(function(Oe){return Oe instanceof n.Name&&1===q[Oe.str]&&void 0!==V[Oe.str]})?new n._Code(N._items.reduce(function(he,Oe){return Oe instanceof n.Name&&(Oe=re(Oe)),Oe instanceof n._Code?he.push.apply(he,ri(Oe._items)):he.push(Oe),he},[])):N;var he;function re(he){var Oe=V[he.str];return void 0===Oe||1!==q[he.str]?he:(delete q[he.str],Oe)}}function W(N,q){for(var V in q)N[V]=(N[V]||0)-(q[V]||0)}function J(N){return"boolean"==typeof N||"number"==typeof N||null===N?!N:(0,n._)(rY||(rY=Ee(["!",""])),I(N))}t.CodeGen=G,t.not=J;var H=E(t.operators.AND);t.and=function(){for(var N=arguments.length,q=new Array(N),V=0;V1&&void 0!==arguments[1]?arguments[1]:f.schema;if(f.opts.strictSchema&&"boolean"!=typeof p){var v=f.self.RULES.keywords;for(var y in p)v[y]||h(f,'unknown keyword: "'.concat(y,'"'))}}function r(f,p){if("boolean"==typeof f)return!f;for(var m in f)if(p[m])return!0;return!1}function o(f){return"number"==typeof f?"".concat(f):f.replace(/~/g,"~0").replace(/\//g,"~1")}function s(f){return f.replace(/~1/g,"/").replace(/~0/g,"~")}function a(f){var p=f.mergeNames,m=f.mergeToName,g=f.mergeValues,v=f.resultToName;return function(y,b,C,k){var D=void 0===C?b:C instanceof n.Name?(b instanceof n.Name?p(y,b,C):m(y,b,C),C):b instanceof n.Name?(m(y,C,b),b):g(b,C);return k!==n.Name||D instanceof n.Name?D:v(y,D)}}function l(f,p){if(!0===p)return f.var("props",!0);var m=f.var("props",(0,n._)(_Y||(_Y=Ee(["{}"]))));return void 0!==p&&c(f,m,p),m}function c(f,p,m){Object.keys(m).forEach(function(g){return f.assign((0,n._)(bY||(bY=Ee(["","",""])),p,(0,n.getProperty)(g)),!0)})}t.toHash=function(f){var p,m={},g=Re(f);try{for(g.s();!(p=g.n()).done;)m[p.value]=!0}catch(v){g.e(v)}finally{g.f()}return m},t.alwaysValidSchema=function(f,p){return"boolean"==typeof p?p:0===Object.keys(p).length||(i(f,p),!r(p,f.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=r,t.schemaHasRulesButRef=function(f,p){if("boolean"==typeof f)return!f;for(var m in f)if("$ref"!==m&&p.all[m])return!0;return!1},t.schemaRefOrVal=function(f,p,m,g){var v=f.topSchemaRef,y=f.schemaPath;if(!g){if("number"==typeof p||"boolean"==typeof p)return p;if("string"==typeof p)return(0,n._)(aY||(aY=Ee(["",""])),p)}return(0,n._)(lY||(lY=Ee(["","","",""])),v,y,(0,n.getProperty)(m))},t.unescapeFragment=function(f){return s(decodeURIComponent(f))},t.escapeFragment=function(f){return encodeURIComponent(o(f))},t.escapeJsonPointer=o,t.unescapeJsonPointer=s,t.eachItem=function(f,p){if(Array.isArray(f)){var m,g=Re(f);try{for(g.s();!(m=g.n()).done;)p(m.value)}catch(v){g.e(v)}finally{g.f()}}else p(f)},t.mergeEvaluated={props:a({mergeNames:function(f,p,m){return f.if((0,n._)(cY||(cY=Ee([""," !== true && "," !== undefined"])),m,p),function(){f.if((0,n._)(uY||(uY=Ee([""," === true"])),p),function(){return f.assign(m,!0)},function(){return f.assign(m,(0,n._)(dY||(dY=Ee([""," || {}"])),m)).code((0,n._)(hY||(hY=Ee(["Object.assign(",", ",")"])),m,p))})})},mergeToName:function(f,p,m){return f.if((0,n._)(fY||(fY=Ee([""," !== true"])),m),function(){!0===p?f.assign(m,!0):(f.assign(m,(0,n._)(pY||(pY=Ee([""," || {}"])),m)),c(f,m,p))})},mergeValues:function(f,p){return!0===f||Qe(Qe({},f),p)},resultToName:l}),items:a({mergeNames:function(f,p,m){return f.if((0,n._)(mY||(mY=Ee([""," !== true && "," !== undefined"])),m,p),function(){return f.assign(m,(0,n._)(gY||(gY=Ee([""," === true ? true : "," > "," ? "," : ",""])),p,m,p,m,p))})},mergeToName:function(f,p,m){return f.if((0,n._)(vY||(vY=Ee([""," !== true"])),m),function(){return f.assign(m,!0===p||(0,n._)(yY||(yY=Ee([""," > "," ? "," : ",""])),m,p,m,p))})},mergeValues:function(f,p){return!0===f||Math.max(f,p)},resultToName:function(f,p){return f.var("items",p)}})},t.evaluatedPropsToName=l,t.setEvaluated=c;var u,f,d={};function h(f,p){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f.opts.strictSchema;if(m){if(p="strict mode: ".concat(p),!0===m)throw new Error(p);f.self.logger.warn(p)}}t.useFunc=function(f,p){return f.scopeValue("func",{ref:p,code:d[p.code]||(d[p.code]=new e._Code(p.code))})},(f=u=t.Type||(t.Type={}))[f.Num=0]="Num",f[f.Str=1]="Str",t.getErrorPath=function(f,p,m){if(f instanceof n.Name){var g=p===u.Num;return(0,n._)(m?g?xY||(xY=Ee(['"[" + ',' + "]"'])):wY||(wY=Ee(['"[\'" + ',' + "\']"'])):g?CY||(CY=Ee(['"/" + ',""])):SY||(SY=Ee(['"/" + ','.replace(/~/g, "~0").replace(/\\//g, "~1")'],['"/" + ','.replace(/~/g, "~0").replace(/\\\\//g, "~1")'])),f)}return m?(0,n.getProperty)(f).toString():"/"+o(f)},t.checkStrictMode=h}(Lr);var pge,mge,gge,tT={};function Lp(){if(pge)return tT;pge=1,Object.defineProperty(tT,"__esModule",{value:!0});var t=xr(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};return tT.default=n,tT}function nT(){return mge||(mge=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var n=xr(),e=Lr,i=Lp();function r(d,h){var f=d.const("err",h);d.if((0,n._)(LY||(LY=Ee([""," === null"])),i.default.vErrors),function(){return d.assign(i.default.vErrors,(0,n._)($Y||($Y=Ee(["[","]"])),f))},(0,n._)(BY||(BY=Ee(["",".push(",")"])),i.default.vErrors,f)),d.code((0,n._)(VY||(VY=Ee(["","++"])),i.default.errors))}function o(d,h){var f=d.gen,p=d.validateName;d.schemaEnv.$async?f.throw((0,n._)(HY||(HY=Ee(["new ","(",")"])),d.ValidationError,h)):(f.assign((0,n._)(UY||(UY=Ee(["",".errors"])),p),h),f.return(!1))}t.keywordError={message:function(d){var h=d.keyword;return(0,n.str)(kY||(kY=Ee(['must pass "','" keyword validation'])),h)}},t.keyword$DataError={message:function(d){var h=d.keyword,f=d.schemaType;return f?(0,n.str)(DY||(DY=Ee(['"','" keyword must be '," ($data)"])),h,f):(0,n.str)(TY||(TY=Ee(['"','" keyword is invalid ($data)'])),h)}},t.reportError=function(d){var p=arguments.length>3?arguments[3]:void 0,m=d.it,g=m.gen,v=m.compositeRule,y=m.allErrors,b=a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0);p??(v||y)?r(g,b):o(m,(0,n._)(EY||(EY=Ee(["[","]"])),b))},t.reportExtraError=function(d){var p=d.it,g=p.compositeRule,v=p.allErrors;r(p.gen,a(d,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.keywordError,arguments.length>2?arguments[2]:void 0)),g||v||o(p,i.default.vErrors)},t.resetErrorsCount=function(d,h){d.assign(i.default.errors,h),d.if((0,n._)(AY||(AY=Ee([""," !== null"])),i.default.vErrors),function(){return d.if(h,function(){return d.assign((0,n._)(MY||(MY=Ee(["",".length"])),i.default.vErrors),h)},function(){return d.assign(i.default.vErrors,null)})})},t.extendErrors=function(d){var h=d.gen,f=d.keyword,p=d.schemaValue,m=d.data,g=d.errsCount,v=d.it;if(void 0===g)throw new Error("ajv implementation error");var y=h.name("err");h.forRange("i",g,i.default.errors,function(b){h.const(y,(0,n._)(OY||(OY=Ee(["","[","]"])),i.default.vErrors,b)),h.if((0,n._)(IY||(IY=Ee(["",".instancePath === undefined"])),y),function(){return h.assign((0,n._)(NY||(NY=Ee(["",".instancePath"])),y),(0,n.strConcat)(i.default.instancePath,v.errorPath))}),h.assign((0,n._)(FY||(FY=Ee(["",".schemaPath"])),y),(0,n.str)(PY||(PY=Ee(["","/",""])),v.errSchemaPath,f)),v.opts.verbose&&(h.assign((0,n._)(jY||(jY=Ee(["",".schema"])),y),p),h.assign((0,n._)(RY||(RY=Ee(["",".data"])),y),m))})};var s={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function a(d,h,f){return!1===d.it.createErrors?(0,n._)(zY||(zY=Ee(["{}"]))):function(p,m){var g=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=p.gen,y=[l(p.it,g),c(p,g)];return function u(d,h,f){var p=h.params,m=h.message,v=d.data,y=d.schemaValue,b=d.it,C=b.opts,k=b.propertyName,D=b.topSchemaRef,L=b.schemaPath;f.push([s.keyword,d.keyword],[s.params,"function"==typeof p?p(d):p||(0,n._)(YY||(YY=Ee(["{}"])))]),C.messages&&f.push([s.message,"function"==typeof m?m(d):m]),C.verbose&&f.push([s.schema,y],[s.parentSchema,(0,n._)(XY||(XY=Ee(["","",""])),D,L)],[i.default.data,v]),k&&f.push([s.propertyName,k])}(p,m,y),v.object.apply(v,y)}(d,h,f)}function l(d,h){var f=d.errorPath,p=h.instancePath,m=p?(0,n.str)(GY||(GY=Ee(["","",""])),f,(0,e.getErrorPath)(p,e.Type.Str)):f;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,m)]}function c(d,h){var f=d.keyword,p=d.it.errSchemaPath,m=h.schemaPath,g=h.parentSchema?p:(0,n.str)(WY||(WY=Ee(["","/",""])),p,f);return m&&(g=(0,n.str)(qY||(qY=Ee(["","",""])),g,(0,e.getErrorPath)(m,e.Type.Str))),[s.schemaPath,g]}}(age)),age}var ex={},_g={};Object.defineProperty(_g,"__esModule",{value:!0}),_g.getRules=_g.isJSONType=void 0;var hst=new Set(["string","number","integer","boolean","null","object","array"]);_g.isJSONType=function(t){return"string"==typeof t&&hst.has(t)},_g.getRules=function(){var t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Qe(Qe({},t),{},{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}};var vge,bf={};function yge(){if(vge)return bf;function t(e,i){return i.rules.some(function(r){return n(e,r)})}function n(e,i){var r;return void 0!==e[i.keyword]||(null===(r=i.definition.implements)||void 0===r?void 0:r.some(function(o){return void 0!==e[o]}))}return vge=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.shouldUseRule=bf.shouldUseGroup=bf.schemaHasRulesForType=void 0,bf.schemaHasRulesForType=function(e,i){var o=e.self.RULES.types[i];return o&&!0!==o&&t(e.schema,o)},bf.shouldUseGroup=t,bf.shouldUseRule=n,bf}!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var n,f,e=_g,i=yge(),r=nT(),o=xr(),s=Lr;function a(f){var p=Array.isArray(f)?f:f?[f]:[];if(p.every(e.isJSONType))return p;throw new Error("type must be JSONType or JSONType[]: "+p.join(","))}(f=n=t.DataType||(t.DataType={}))[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong",t.getSchemaTypes=function(f){var p=a(f.type);if(p.includes("null")){if(!1===f.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!p.length&&void 0!==f.nullable)throw new Error('"nullable" cannot be used without "type"');!0===f.nullable&&p.push("null")}return p},t.getJSONTypes=a,t.coerceAndCheckDataType=function(f,p){var D,m=f.gen,g=f.data,v=f.opts,y=(D=v.coerceTypes)?p.filter(function(L){return l.has(L)||"array"===D&&"array"===L}):[],b=p.length>0&&!(0===y.length&&1===p.length&&(0,i.schemaHasRulesForType)(f,p[0]));if(b){var C=u(p,g,v.strictNumbers,n.Wrong);m.if(C,function(){y.length?function(k,D,L){var z=k.gen,R=k.data,U=k.opts,G=z.let("dataType",(0,o._)(KY||(KY=Ee(["typeof ",""])),R)),X=z.let("coerced",(0,o._)(QY||(QY=Ee(["undefined"]))));"array"===U.coerceTypes&&z.if((0,o._)(ZY||(ZY=Ee([""," == 'object' && Array.isArray(",") && ",".length == 1"])),G,R,R),function(){return z.assign(R,(0,o._)(eX||(eX=Ee(["","[0]"])),R)).assign(G,(0,o._)(tX||(tX=Ee(["typeof ",""])),R)).if(u(D,R,U.strictNumbers),function(){return z.assign(X,R)})}),z.if((0,o._)(nX||(nX=Ee([""," !== undefined"])),X));var te,P=Re(L);try{for(P.s();!(te=P.n()).done;){var W=te.value;(l.has(W)||"array"===W&&"array"===U.coerceTypes)&&J(W)}}catch(H){P.e(H)}finally{P.f()}function J(H){switch(H){case"string":return void z.elseIf((0,o._)(rX||(rX=Ee(["",' == "number" || ',' == "boolean"'])),G,G)).assign(X,(0,o._)(oX||(oX=Ee(['"" + ',""])),R)).elseIf((0,o._)(sX||(sX=Ee([""," === null"])),R)).assign(X,(0,o._)(aX||(aX=Ee(['""']))));case"number":return void z.elseIf((0,o._)(lX||(lX=Ee(["",' == "boolean" || '," === null\n || (",' == "string" && '," && "," == +",")"])),G,R,G,R,R,R)).assign(X,(0,o._)(cX||(cX=Ee(["+",""])),R));case"integer":return void z.elseIf((0,o._)(uX||(uX=Ee(["",' === "boolean" || '," === null\n || (",' === "string" && '," && "," == +"," && !("," % 1))"])),G,R,G,R,R,R,R)).assign(X,(0,o._)(dX||(dX=Ee(["+",""])),R));case"boolean":return void z.elseIf((0,o._)(hX||(hX=Ee(["",' === "false" || '," === 0 || "," === null"])),R,R,R)).assign(X,!1).elseIf((0,o._)(fX||(fX=Ee(["",' === "true" || '," === 1"])),R,R)).assign(X,!0);case"null":return z.elseIf((0,o._)(pX||(pX=Ee(["",' === "" || '," === 0 || "," === false"])),R,R,R)),void z.assign(X,null);case"array":z.elseIf((0,o._)(mX||(mX=Ee(["",' === "string" || ',' === "number"\n || ',' === "boolean" || '," === null"])),G,G,G,R)).assign(X,(0,o._)(gX||(gX=Ee(["[","]"])),R))}}z.else(),h(k),z.endIf(),z.if((0,o._)(iX||(iX=Ee([""," !== undefined"])),X),function(){var H,le,E,I,N;z.assign(R,X),le=X,I=(H=k).parentData,N=H.parentDataProperty,(E=H.gen).if((0,o._)(vX||(vX=Ee([""," !== undefined"])),I),function(){return E.assign((0,o._)(yX||(yX=Ee(["","[","]"])),I,N),le)})})}(f,p,y):h(f)})}return b};var l=new Set(["string","number","integer","boolean","null"]);function c(f,p,m){var g,v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.Correct,y=v===n.Correct?o.operators.EQ:o.operators.NEQ;switch(f){case"null":return(0,o._)(_X||(_X=Ee([""," "," null"])),p,y);case"array":g=(0,o._)(bX||(bX=Ee(["Array.isArray(",")"])),p);break;case"object":g=(0,o._)(xX||(xX=Ee([""," && typeof ",' == "object" && !Array.isArray(',")"])),p,p,p);break;case"integer":g=b((0,o._)(wX||(wX=Ee(["!("," % 1) && !isNaN(",")"])),p,p));break;case"number":g=b();break;default:return(0,o._)(CX||(CX=Ee(["typeof "," "," ",""])),p,y,f)}return v===n.Correct?g:(0,o.not)(g);function b(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.nil;return(0,o.and)((0,o._)(SX||(SX=Ee(["typeof ",' == "number"'])),p),C,m?(0,o._)(kX||(kX=Ee(["isFinite(",")"])),p):o.nil)}}function u(f,p,m,g){if(1===f.length)return c(f[0],p,m,g);var v,y=(0,s.toHash)(f);if(y.array&&y.object){var b=(0,o._)(DX||(DX=Ee(["typeof ",' != "object"'])),p);v=y.null?b:(0,o._)(TX||(TX=Ee(["!"," || ",""])),p,b),delete y.null,delete y.array,delete y.object}else v=o.nil;for(var C in y.number&&delete y.integer,y)v=(0,o.and)(v,c(C,p,m,g));return v}t.checkDataType=c,t.checkDataTypes=u;var d={message:function(f){return"must be ".concat(f.schema)},params:function(f){var p=f.schema,m=f.schemaValue;return"string"==typeof p?(0,o._)(EX||(EX=Ee(["{type: ","}"])),p):(0,o._)(AX||(AX=Ee(["{type: ","}"])),m)}};function h(f){var m,g,v,y,b,p=(g=(m=f).gen,v=m.data,b=(0,s.schemaRefOrVal)(m,y=m.schema,"type"),{gen:g,keyword:"type",data:v,schema:y.type,schemaCode:b,schemaValue:b,parentSchema:y,params:{},it:m});(0,r.reportError)(p,d)}t.reportTypeError=h}(ex);var _ge,bge,xge,tx={},ud={},lo={};function dd(){if(bge)return lo;bge=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.validateUnion=lo.validateArray=lo.usePattern=lo.callValidateCode=lo.schemaProperties=lo.allSchemaProperties=lo.noPropertyInData=lo.propertyInData=lo.isOwnProperty=lo.hasPropFunc=lo.reportMissingProp=lo.checkMissingProp=lo.checkReportMissingProp=void 0;var t=xr(),n=Lr,e=Lp(),i=Lr;function r(c){return c.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)(jX||(jX=Ee(["Object.prototype.hasOwnProperty"])))})}function o(c,u,d){return(0,t._)(RX||(RX=Ee(["",".call(",", ",")"])),r(c),u,d)}function s(c,u,d,h){var f=(0,t._)(BX||(BX=Ee(["",""," === undefined"])),u,(0,t.getProperty)(d));return h?(0,t.or)(f,(0,t.not)(o(c,u,d))):f}function a(c){return c?Object.keys(c).filter(function(u){return"__proto__"!==u}):[]}lo.checkReportMissingProp=function(c,u){var d=c.gen;d.if(s(d,c.data,u,c.it.opts.ownProperties),function(){c.setParams({missingProperty:(0,t._)(FX||(FX=Ee(["",""])),u)},!0),c.error()})},lo.checkMissingProp=function(c,u,d){var h=c.gen,f=c.data,p=c.it.opts;return t.or.apply(void 0,ri(u.map(function(m){return(0,t.and)(s(h,f,m,p.ownProperties),(0,t._)(PX||(PX=Ee([""," = ",""])),d,m))})))},lo.reportMissingProp=function(c,u){c.setParams({missingProperty:u},!0),c.error()},lo.hasPropFunc=r,lo.isOwnProperty=o,lo.propertyInData=function(c,u,d,h){var f=(0,t._)(LX||(LX=Ee(["",""," !== undefined"])),u,(0,t.getProperty)(d));return h?(0,t._)($X||($X=Ee([""," && ",""])),f,o(c,u,d)):f},lo.noPropertyInData=s,lo.allSchemaProperties=a,lo.schemaProperties=function(c,u){return a(u).filter(function(d){return!(0,n.alwaysValidSchema)(c,u[d])})},lo.callValidateCode=function(c,u,d,h){var f=c.schemaCode,p=c.data,m=c.it,g=m.gen,v=m.topSchemaRef,y=m.schemaPath,b=m.errorPath,C=c.it,k=h?(0,t._)(VX||(VX=Ee(["",", ",", ","",""])),f,p,v,y):p,D=[[e.default.instancePath,(0,t.strConcat)(e.default.instancePath,b)],[e.default.parentData,C.parentData],[e.default.parentDataProperty,C.parentDataProperty],[e.default.rootData,e.default.rootData]];C.opts.dynamicRef&&D.push([e.default.dynamicAnchors,e.default.dynamicAnchors]);var L=(0,t._)(HX||(HX=Ee(["",", ",""])),k,g.object.apply(g,D));return d!==t.nil?(0,t._)(UX||(UX=Ee(["",".call(",", ",")"])),u,d,L):(0,t._)(zX||(zX=Ee(["","(",")"])),u,L)};var l=(0,t._)(GX||(GX=Ee(["new RegExp"])));return lo.usePattern=function(c,u){var d=c.gen,h=c.it.opts,f=h.unicodeRegExp?"u":"",p=h.code.regExp,m=p(u,f);return d.scopeValue("pattern",{key:m.toString(),ref:m,code:(0,t._)(WX||(WX=Ee(["","(",", ",")"])),"new RegExp"===p.code?l:(0,i.useFunc)(d,p),u,f)})},lo.validateArray=function(c){var u=c.gen,d=c.data,h=c.keyword,f=c.it,p=u.name("valid");if(f.allErrors){var m=u.let("valid",!0);return g(function(){return u.assign(m,!1)}),m}return u.var(p,!0),g(function(){return u.break()}),p;function g(v){var y=u.const("len",(0,t._)(qX||(qX=Ee(["",".length"])),d));u.forRange("i",0,y,function(b){c.subschema({keyword:h,dataProp:b,dataPropType:n.Type.Num},p),u.if((0,t.not)(p),v)})}},lo.validateUnion=function(c){var u=c.gen,d=c.schema,h=c.keyword,f=c.it;if(!Array.isArray(d))throw new Error("ajv implementation error");if(!d.some(function(g){return(0,n.alwaysValidSchema)(f,g)})||f.opts.unevaluated){var p=u.let("valid",!1),m=u.name("_valid");u.block(function(){return d.forEach(function(g,v){var y=c.subschema({keyword:h,schemaProp:v,compositeRule:!0},m);u.assign(p,(0,t._)(YX||(YX=Ee([""," || ",""])),p,m)),c.mergeValidEvaluated(y,m)||u.if((0,t.not)(p))})}),c.result(p,function(){return c.reset()},function(){return c.error(!0)})}},lo}var wge,xf={},za={},Cge=function t(n,e){if(n===e)return!0;if(n&&e&&"object"==gn(n)&&"object"==gn(e)){if(n.constructor!==e.constructor)return!1;var i,r,o;if(Array.isArray(n)){if((i=n.length)!=e.length)return!1;for(r=i;0!=r--;)if(!t(n[r],e[r]))return!1;return!0}if(n.constructor===RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();if((i=(o=Object.keys(n)).length)!==Object.keys(e).length)return!1;for(r=i;0!=r--;)if(!Object.prototype.hasOwnProperty.call(e,o[r]))return!1;for(r=i;0!=r--;){var s=o[r];if(!t(n[s],e[s]))return!1}return!0}return n!=n&&e!=e},fR={},pst={get exports(){return fR},set exports(t){fR=t}},$p=pst.exports=function(t,n,e){"function"==typeof n&&(e=n,n={}),iT(n,"function"==typeof(e=n.cb||e)?e:e.pre||function(){},e.post||function(){},t,"",t)};function iT(t,n,e,i,r,o,s,a,l,c){if(i&&"object"==gn(i)&&!Array.isArray(i)){for(var u in n(i,r,o,s,a,l,c),i){var d=i[u];if(Array.isArray(d)){if(u in $p.arrayKeywords)for(var h=0;h1&&void 0!==arguments[1])||arguments[1];return"boolean"==typeof t||(!0===n?!pR(t):!!n&&Sge(t)<=n)};var _st=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function pR(t){for(var n in t){if(_st.has(n))return!0;var e=t[n];if(Array.isArray(e)&&e.some(pR)||"object"==gn(e)&&pR(e))return!0}return!1}function Sge(t){var n=0;for(var e in t)if("$ref"===e||(n++,!yst.has(e)&&("object"==gn(t[e])&&(0,mst.eachItem)(t[e],function(i){return n+=Sge(i)}),n===1/0)))return 1/0;return n}function kge(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";!1!==(arguments.length>2?arguments[2]:void 0)&&(n=u1(n));var i=t.parse(n);return Dge(t,i)}function Dge(t,n){return t.serialize(n).split("#")[0]+"#"}za.getFullPath=kge,za._getFullPath=Dge;var bst=/#\/?$/;function u1(t){return t?t.replace(bst,""):""}za.normalizeId=u1,za.resolveUrl=function(t,n,e){return e=u1(e),t.resolve(n,e)};var Tge,xst=/^[a-z_][-a-z0-9._]*$/i;function rT(){if(Tge)return _f;Tge=1,Object.defineProperty(_f,"__esModule",{value:!0}),_f.getData=_f.KeywordCxt=_f.validateFunctionCode=void 0;var t=function(){if(gge)return yg;gge=1,Object.defineProperty(yg,"__esModule",{value:!0}),yg.boolOrEmptySchema=yg.topBoolOrEmptySchema=void 0;var P=nT(),W=xr(),J=Lp(),H={message:"boolean schema is false"};function le(E,I){(0,P.reportError)({gen:E.gen,keyword:"false schema",data:E.data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:E},H,void 0,I)}return yg.topBoolOrEmptySchema=function(E){var I=E.gen,N=E.schema,q=E.validateName;!1===N?le(E,!1):"object"==gn(N)&&!0===N.$async?I.return(J.default.data):(I.assign((0,W._)(JY||(JY=Ee(["",".errors"])),q),null),I.return(!0))},yg.boolOrEmptySchema=function(E,I){var N=E.gen;!1===E.schema?(N.var(I,!1),le(E)):N.var(I,!0)},yg}(),n=ex,e=yge(),i=ex,r=function(){if(_ge)return tx;_ge=1,Object.defineProperty(tx,"__esModule",{value:!0}),tx.assignDefaults=void 0;var P=xr(),W=Lr;function J(H,le,E){var I=H.gen,N=H.compositeRule,q=H.data,V=H.opts;if(void 0!==E){var re=(0,P._)(MX||(MX=Ee(["","",""])),q,(0,P.getProperty)(le));if(N)(0,W.checkStrictMode)(H,"default is ignored for: ".concat(re));else{var he=(0,P._)(OX||(OX=Ee([""," === undefined"])),re);"empty"===V.useDefaults&&(he=(0,P._)(IX||(IX=Ee([""," || "," === null || ",' === ""'])),he,re,re)),I.if(he,(0,P._)(NX||(NX=Ee([""," = ",""])),re,(0,P.stringify)(E)))}}}return tx.assignDefaults=function(H,le){var E=H.schema,I=E.properties,N=E.items;if("object"===le&&I)for(var q in I)J(H,q,I[q].default);else"array"===le&&Array.isArray(N)&&N.forEach(function(V,re){return J(H,re,V.default)})},tx}(),o=function fst(){if(xge)return ud;xge=1,Object.defineProperty(ud,"__esModule",{value:!0}),ud.validateKeywordUsage=ud.validSchemaType=ud.funcKeywordCode=ud.macroKeywordCode=void 0;var t=xr(),n=Lp(),e=dd(),i=nT();function r(s){var a=s.gen,l=s.data,c=s.it;a.if(c.parentData,function(){return a.assign(l,(0,t._)(tJ||(tJ=Ee(["","[","]"])),c.parentData,c.parentDataProperty))})}function o(s,a,l){if(void 0===l)throw new Error('keyword "'.concat(a,'" failed to compile'));return s.scopeValue("keyword","function"==typeof l?{ref:l}:{ref:l,code:(0,t.stringify)(l)})}return ud.macroKeywordCode=function(s,a){var l=s.gen,c=s.keyword,h=s.it,f=a.macro.call(h.self,s.schema,s.parentSchema,h),p=o(l,c,f);!1!==h.opts.validateSchema&&h.self.validateSchema(f,!0);var m=l.name("valid");s.subschema({schema:f,schemaPath:t.nil,errSchemaPath:"".concat(h.errSchemaPath,"/").concat(c),topSchemaRef:p,compositeRule:!0},m),s.pass(m,function(){return s.error(!0)})},ud.funcKeywordCode=function(s,a){var l,c=s.gen,u=s.keyword,d=s.schema,h=s.parentSchema,f=s.$data,p=s.it;!function(C,k){if(k.async&&!C.schemaEnv.$async)throw new Error("async keyword in sync schema")}(p,a);var m=!f&&a.compile?a.compile.call(p.self,d,h,p):a.validate,g=o(c,u,m),v=c.let("valid");function y(){var C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.async?(0,t._)(ZX||(ZX=Ee(["await "]))):t.nil,k=p.opts.passContext?n.default.this:n.default.self,D=!("compile"in a&&!f||!1===a.schema);c.assign(v,(0,t._)(eJ||(eJ=Ee(["","",""])),C,(0,e.callValidateCode)(s,g,k,D)),a.modifying)}function b(C){var k;c.if((0,t.not)(null!==(k=a.valid)&&void 0!==k?k:v),C)}s.block$data(v,function(){if(!1===a.errors)y(),a.modifying&&r(s),b(function(){return s.error()});else{var C=a.async?(D=c.let("ruleErrs",null),c.try(function(){return y((0,t._)(XX||(XX=Ee(["await "]))))},function(L){return c.assign(v,!1).if((0,t._)(JX||(JX=Ee([""," instanceof ",""])),L,p.ValidationError),function(){return c.assign(D,(0,t._)(KX||(KX=Ee(["",".errors"])),L))},function(){return c.throw(L)})}),D):(k=(0,t._)(QX||(QX=Ee(["",".errors"])),g),c.assign(k,null),y(t.nil),k);a.modifying&&r(s),b(function(){return function(D,L){var z=D.gen;z.if((0,t._)(nJ||(nJ=Ee(["Array.isArray(",")"])),L),function(){z.assign(n.default.vErrors,(0,t._)(iJ||(iJ=Ee([""," === null ? "," : ",".concat(",")"])),n.default.vErrors,L,n.default.vErrors,L)).assign(n.default.errors,(0,t._)(rJ||(rJ=Ee(["",".length"])),n.default.vErrors)),(0,i.extendErrors)(D)},function(){return D.error()})}(s,C)})}var D,k}),s.ok(null!==(l=a.valid)&&void 0!==l?l:v)},ud.validSchemaType=function(s,a){var l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!a.length||a.some(function(c){return"array"===c?Array.isArray(s):"object"===c?s&&"object"==gn(s)&&!Array.isArray(s):gn(s)==c||l&&void 0===s})},ud.validateKeywordUsage=function(s,a,l){var c=s.schema,u=s.opts,d=s.self,h=s.errSchemaPath;if(Array.isArray(a.keyword)?!a.keyword.includes(l):a.keyword!==l)throw new Error("ajv implementation error");var f=a.dependencies;if(f?.some(function(m){return!Object.prototype.hasOwnProperty.call(c,m)}))throw new Error("parent schema must have dependencies of ".concat(l,": ").concat(f.join(",")));if(a.validateSchema&&!a.validateSchema(c[l])){var p='keyword "'.concat(l,'" value is invalid at path "').concat(h,'": ')+d.errorsText(a.validateSchema.errors);if("log"!==u.validateSchema)throw new Error(p);d.logger.error(p)}},ud}(),s=function(){if(wge)return xf;wge=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.extendSubschemaMode=xf.extendSubschemaData=xf.getSubschema=void 0;var P=xr(),W=Lr;return xf.getSubschema=function(J,H){var le=H.keyword,E=H.schemaProp,I=H.schema,N=H.schemaPath,q=H.errSchemaPath,V=H.topSchemaRef;if(void 0!==le&&void 0!==I)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==le){var re=J.schema[le];return void 0===E?{schema:re,schemaPath:(0,P._)(oJ||(oJ=Ee(["","",""])),J.schemaPath,(0,P.getProperty)(le)),errSchemaPath:"".concat(J.errSchemaPath,"/").concat(le)}:{schema:re[E],schemaPath:(0,P._)(sJ||(sJ=Ee(["","","",""])),J.schemaPath,(0,P.getProperty)(le),(0,P.getProperty)(E)),errSchemaPath:"".concat(J.errSchemaPath,"/").concat(le,"/").concat((0,W.escapeFragment)(E))}}if(void 0!==I){if(void 0===N||void 0===q||void 0===V)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:I,schemaPath:N,topSchemaRef:V,errSchemaPath:q}}throw new Error('either "keyword" or "schema" must be passed')},xf.extendSubschemaData=function(J,H,le){var E=le.dataProp,I=le.dataPropType,N=le.data,q=le.dataTypes,V=le.propertyName;if(void 0!==N&&void 0!==E)throw new Error('both "data" and "dataProp" passed, only one allowed');var re=H.gen;if(void 0!==E){var he=H.errorPath,Oe=H.dataPathArr,_e=H.opts;Xe(re.let("data",(0,P._)(aJ||(aJ=Ee(["","",""])),H.data,(0,P.getProperty)(E)),!0)),J.errorPath=(0,P.str)(lJ||(lJ=Ee(["","",""])),he,(0,W.getErrorPath)(E,I,_e.jsPropertySyntax)),J.parentDataProperty=(0,P._)(cJ||(cJ=Ee(["",""])),E),J.dataPathArr=[].concat(ri(Oe),[J.parentDataProperty])}function Xe(Le){J.data=Le,J.dataLevel=H.dataLevel+1,J.dataTypes=[],H.definedProperties=new Set,J.parentData=H.data,J.dataNames=[].concat(ri(H.dataNames),[Le])}void 0!==N&&(Xe(N instanceof P.Name?N:re.let("data",N,!0)),void 0!==V&&(J.propertyName=V)),q&&(J.dataTypes=q)},xf.extendSubschemaMode=function(J,H){var le=H.jtdDiscriminator,E=H.jtdMetadata,I=H.compositeRule,N=H.createErrors,q=H.allErrors;void 0!==I&&(J.compositeRule=I),void 0!==N&&(J.createErrors=N),void 0!==q&&(J.allErrors=q),J.jtdDiscriminator=le,J.jtdMetadata=E},xf}(),a=xr(),l=Lp(),c=za,u=Lr,d=nT();function h(P,W){var N,J=P.gen,H=P.validateName,le=P.schema,E=P.schemaEnv,I=P.opts;I.code.es5?J.func(H,(0,a._)(uJ||(uJ=Ee(["",", ",""])),l.default.data,l.default.valCxt),E.$async,function(){var N,q;J.code((0,a._)(dJ||(dJ=Ee(['"use strict"; ',""])),f(le,I))),q=I,(N=J).if(l.default.valCxt,function(){N.var(l.default.instancePath,(0,a._)(mJ||(mJ=Ee(["",".",""])),l.default.valCxt,l.default.instancePath)),N.var(l.default.parentData,(0,a._)(gJ||(gJ=Ee(["",".",""])),l.default.valCxt,l.default.parentData)),N.var(l.default.parentDataProperty,(0,a._)(vJ||(vJ=Ee(["",".",""])),l.default.valCxt,l.default.parentDataProperty)),N.var(l.default.rootData,(0,a._)(yJ||(yJ=Ee(["",".",""])),l.default.valCxt,l.default.rootData)),q.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(_J||(_J=Ee(["",".",""])),l.default.valCxt,l.default.dynamicAnchors))},function(){N.var(l.default.instancePath,(0,a._)(bJ||(bJ=Ee(['""'])))),N.var(l.default.parentData,(0,a._)(xJ||(xJ=Ee(["undefined"])))),N.var(l.default.parentDataProperty,(0,a._)(wJ||(wJ=Ee(["undefined"])))),N.var(l.default.rootData,l.default.data),q.dynamicRef&&N.var(l.default.dynamicAnchors,(0,a._)(CJ||(CJ=Ee(["{}"]))))}),J.code(W)}):J.func(H,(0,a._)(hJ||(hJ=Ee(["",", ",""])),l.default.data,(N=I,(0,a._)(fJ||(fJ=Ee(["{",'="", ',", ",", ","=","","}={}"])),l.default.instancePath,l.default.parentData,l.default.parentDataProperty,l.default.rootData,l.default.data,N.dynamicRef?(0,a._)(pJ||(pJ=Ee([", ","={}"])),l.default.dynamicAnchors):a.nil))),E.$async,function(){return J.code(f(le,I)).code(W)})}function f(P,W){var J="object"==gn(P)&&P[W.schemaId];return J&&(W.code.source||W.code.process)?(0,a._)(OJ||(OJ=Ee(["/*# sourceURL="," */"])),J):a.nil}function m(P){var W=P.schema,J=P.self;if("boolean"==typeof W)return!W;for(var H in W)if(J.RULES.all[H])return!0;return!1}function g(P){return"boolean"!=typeof P.schema}function v(P){var W,J,H,E;(0,u.checkUnknownRules)(P),H=(W=P).errSchemaPath,E=W.self,(J=W.schema).$ref&&W.opts.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(J,E.RULES)&&E.logger.warn('$ref: keywords ignored in schema at path "'.concat(H,'"'))}function y(P,W){if(P.opts.jtd)return C(P,[],!1,W);var J=(0,n.getSchemaTypes)(P.schema);C(P,J,!(0,n.coerceAndCheckDataType)(P,J),W)}function b(P){var W=P.gen,J=P.schemaEnv,le=P.errSchemaPath,E=P.opts,I=P.schema.$comment;if(!0===E.$comment)W.code((0,a._)(NJ||(NJ=Ee(["",".logger.log(",")"])),l.default.self,I));else if("function"==typeof E.$comment){var N=(0,a.str)(FJ||(FJ=Ee(["","/$comment"])),le),q=W.scopeValue("root",{ref:J.root});W.code((0,a._)(PJ||(PJ=Ee(["",".opts.$comment(",", ",", ",".schema)"])),l.default.self,I,N,q))}}function C(P,W,J,H){var he,Oe,_e,Xe,le=P.gen,E=P.schema,I=P.data,N=P.allErrors,q=P.opts,V=P.self.RULES;function re(he){(0,e.shouldUseGroup)(E,he)&&(he.type?(le.if((0,i.checkDataType)(he.type,I,q.strictNumbers)),k(P,he),1===W.length&&W[0]===he.type&&J&&(le.else(),(0,i.reportTypeError)(P)),le.endIf()):k(P,he),N||le.if((0,a._)(HJ||(HJ=Ee([""," === ",""])),l.default.errors,H||0)))}!E.$ref||!q.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(E,V)?(q.jtd||(Oe=W,(he=P).schemaEnv.meta||!he.opts.strictTypes||(function(_e,Xe){if(Xe.length){if(!_e.dataTypes.length)return void(_e.dataTypes=Xe);Xe.forEach(function(Le){L(_e.dataTypes,Le)||z(_e,'type "'.concat(Le,'" not allowed by context "').concat(_e.dataTypes.join(","),'"'))}),function(Le,rt){var B,ne=[],ie=Re(Le.dataTypes);try{for(ie.s();!(B=ie.n()).done;){var Me=B.value;L(rt,Me)?ne.push(Me):rt.includes("integer")&&"number"===Me&&ne.push("integer")}}catch(Ye){ie.e(Ye)}finally{ie.f()}Le.dataTypes=ne}(_e,Xe)}}(he,Oe),he.opts.allowUnionTypes||(_e=he,(Xe=Oe).length>1&&(2!==Xe.length||!Xe.includes("null"))&&z(_e,"use allowUnionTypes to allow union type keyword")),function(_e,Xe){var Le=_e.self.RULES.all;for(var rt in Le){var B=Le[rt];if("object"==gn(B)&&(0,e.shouldUseRule)(_e.schema,B)){var ne=B.definition.type;ne.length&&!ne.some(function(ie){return D(Xe,ie)})&&z(_e,'missing type "'.concat(ne.join(","),'" for keyword "').concat(rt,'"'))}}}(he,he.dataTypes))),le.block(function(){var he,Oe=Re(V.rules);try{for(Oe.s();!(he=Oe.n()).done;)re(he.value)}catch(_e){Oe.e(_e)}finally{Oe.f()}re(V.post)})):le.block(function(){return U(P,"$ref",V.all.$ref.definition)})}function k(P,W){var J=P.gen,H=P.schema;P.opts.useDefaults&&(0,r.assignDefaults)(P,W.type),J.block(function(){var le,E=Re(W.rules);try{for(E.s();!(le=E.n()).done;){var I=le.value;(0,e.shouldUseRule)(H,I)&&U(P,I.keyword,I.definition,W.type)}}catch(N){E.e(N)}finally{E.f()}})}function D(P,W){return P.includes(W)||"number"===W&&P.includes("integer")}function L(P,W){return P.includes(W)||"integer"===W&&P.includes("number")}function z(P,W){W+=' at "'.concat(P.schemaEnv.baseId+P.errSchemaPath,'" (strictTypes)'),(0,u.checkStrictMode)(P,W,P.opts.strictTypes)}_f.validateFunctionCode=function(P){var W,J,H,le;g(P)&&(v(P),m(P))?(J=(W=P).schema,H=W.opts,le=W.gen,h(W,function(){var E,N;H.$comment&&J.$comment&&b(W),N=(E=W).opts,void 0!==E.schema.default&&N.useDefaults&&N.strictSchema&&(0,u.checkStrictMode)(E,"default is ignored in the schema root"),le.let(l.default.vErrors,null),le.let(l.default.errors,0),H.unevaluated&&function(E){var I=E.gen,N=E.validateName;E.evaluated=I.const("evaluated",(0,a._)(SJ||(SJ=Ee(["",".evaluated"])),N)),I.if((0,a._)(kJ||(kJ=Ee(["",".dynamicProps"])),E.evaluated),function(){return I.assign((0,a._)(DJ||(DJ=Ee(["",".props"])),E.evaluated),(0,a._)(TJ||(TJ=Ee(["undefined"]))))}),I.if((0,a._)(EJ||(EJ=Ee(["",".dynamicItems"])),E.evaluated),function(){return I.assign((0,a._)(AJ||(AJ=Ee(["",".items"])),E.evaluated),(0,a._)(MJ||(MJ=Ee(["undefined"]))))})}(W),y(W),function(E){var he,Oe,_e,Xe,Le,I=E.gen,q=E.validateName,V=E.ValidationError,re=E.opts;E.schemaEnv.$async?I.if((0,a._)(jJ||(jJ=Ee([""," === 0"])),l.default.errors),function(){return I.return(l.default.data)},function(){return I.throw((0,a._)(RJ||(RJ=Ee(["new ","(",")"])),V,l.default.vErrors))}):(I.assign((0,a._)(LJ||(LJ=Ee(["",".errors"])),q),l.default.vErrors),re.unevaluated&&(Oe=(he=E).gen,_e=he.evaluated,Le=he.items,(Xe=he.props)instanceof a.Name&&Oe.assign((0,a._)(BJ||(BJ=Ee(["",".props"])),_e),Xe),Le instanceof a.Name&&Oe.assign((0,a._)(VJ||(VJ=Ee(["",".items"])),_e),Le)),I.return((0,a._)($J||($J=Ee([""," === 0"])),l.default.errors)))}(W)})):h(P,function(){return(0,t.topBoolOrEmptySchema)(P)})};var R=function(){function P(W,J,H){if(Ce(this,P),(0,o.validateKeywordUsage)(W,J,H),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=H,this.data=W.data,this.schema=W.schema[H],this.$data=J.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(W,this.schema,H,this.$data),this.schemaType=J.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=J,this.$data)this.schemaCode=W.gen.const("vSchema",te(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,J.schemaType,J.allowUndefined))throw new Error("".concat(H," value must be ").concat(JSON.stringify(J.schemaType)));("code"in J?J.trackErrors:!1!==J.errors)&&(this.errsCount=W.gen.const("_errs",l.default.errors))}return Se(P,[{key:"result",value:function(W,J,H){this.failResult((0,a.not)(W),J,H)}},{key:"failResult",value:function(W,J,H){this.gen.if(W),H?H():this.error(),J?(this.gen.else(),J(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}},{key:"pass",value:function(W,J){this.failResult((0,a.not)(W),void 0,J)}},{key:"fail",value:function(W){if(void 0===W)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}},{key:"fail$data",value:function(W){if(!this.$data)return this.fail(W);var J=this.schemaCode;this.fail((0,a._)(UJ||(UJ=Ee([""," !== undefined && (",")"])),J,(0,a.or)(this.invalid$data(),W)))}},{key:"error",value:function(W,J,H){if(J)return this.setParams(J),this._error(W,H),void this.setParams({});this._error(W,H)}},{key:"_error",value:function(W,J){(W?d.reportExtraError:d.reportError)(this,this.def.error,J)}},{key:"$dataError",value:function(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}},{key:"reset",value:function(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}},{key:"ok",value:function(W){this.allErrors||this.gen.if(W)}},{key:"setParams",value:function(W,J){J?Object.assign(this.params,W):this.params=W}},{key:"block$data",value:function(W,J){var H=this,le=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.nil;this.gen.block(function(){H.check$data(W,le),J()})}},{key:"check$data",value:function(){var W=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.nil,J=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.nil;if(this.$data){var H=this.gen,le=this.schemaCode,E=this.schemaType,I=this.def;H.if((0,a.or)((0,a._)(zJ||(zJ=Ee([""," === undefined"])),le),J)),W!==a.nil&&H.assign(W,!0),(E.length||I.validateSchema)&&(H.elseIf(this.invalid$data()),this.$dataError(),W!==a.nil&&H.assign(W,!1)),H.else()}}},{key:"invalid$data",value:function(){var W=this.gen,J=this.schemaCode,H=this.schemaType,le=this.def,E=this.it;return(0,a.or)(function(){if(H.length){if(!(J instanceof a.Name))throw new Error("ajv implementation error");var I=Array.isArray(H)?H:[H];return(0,a._)(GJ||(GJ=Ee(["",""])),(0,i.checkDataTypes)(I,J,E.opts.strictNumbers,i.DataType.Wrong))}return a.nil}(),function(){if(le.validateSchema){var I=W.scopeValue("validate$data",{ref:le.validateSchema});return(0,a._)(WJ||(WJ=Ee(["!","(",")"])),I,J)}return a.nil}())}},{key:"subschema",value:function(W,J){var H=(0,s.getSubschema)(this.it,W);(0,s.extendSubschemaData)(H,this.it,W),(0,s.extendSubschemaMode)(H,W);var le=Qe(Qe(Qe({},this.it),H),{},{items:void 0,props:void 0});return function p(P,W){g(P)&&(v(P),m(P))?function(J,H){var N,q,E=J.gen;J.opts.$comment&&J.schema.$comment&&b(J),(q=(N=J).schema[N.opts.schemaId])&&(N.baseId=(0,c.resolveUrl)(N.opts.uriResolver,N.baseId,q)),function(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}(J);var I=E.const("_errs",l.default.errors);y(J,I),E.var(H,(0,a._)(IJ||(IJ=Ee([""," === ",""])),I,l.default.errors))}(P,W):(0,t.boolOrEmptySchema)(P,W)}(le,J),le}},{key:"mergeEvaluated",value:function(W,J){var H=this.it,le=this.gen;H.opts.unevaluated&&(!0!==H.props&&void 0!==W.props&&(H.props=u.mergeEvaluated.props(le,W.props,H.props,J)),!0!==H.items&&void 0!==W.items&&(H.items=u.mergeEvaluated.items(le,W.items,H.items,J)))}},{key:"mergeValidEvaluated",value:function(W,J){var H=this,le=this.it;if(le.opts.unevaluated&&(!0!==le.props||!0!==le.items))return this.gen.if(J,function(){return H.mergeEvaluated(W,a.Name)}),!0}}]),P}();function U(P,W,J,H){var le=new R(P,J,W);"code"in J?J.code(le,H):le.$data&&J.validate?(0,o.funcKeywordCode)(le,J):"macro"in J?(0,o.macroKeywordCode)(le,J):(J.compile||J.validate)&&(0,o.funcKeywordCode)(le,J)}_f.KeywordCxt=R;var G=/^\/(?:[^~]|~0|~1)*$/,X=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function te(P,W){var J,H,le=W.dataLevel,E=W.dataNames,I=W.dataPathArr;if(""===P)return l.default.rootData;if("/"===P[0]){if(!G.test(P))throw new Error("Invalid JSON-pointer: ".concat(P));J=P,H=l.default.rootData}else{var N=X.exec(P);if(!N)throw new Error("Invalid JSON-pointer: ".concat(P));var q=+N[1];if("#"===(J=N[2])){if(q>=le)throw new Error(_e("property/index",q));return I[le-q]}if(q>le)throw new Error(_e("data",q));if(H=E[le-q],!J)return H}var V,re=H,he=Re(J.split("/"));try{for(he.s();!(V=he.n()).done;){var Oe=V.value;Oe&&(H=(0,a._)(qJ||(qJ=Ee(["","",""])),H,(0,a.getProperty)((0,u.unescapeJsonPointer)(Oe))),re=(0,a._)(YJ||(YJ=Ee([""," && ",""])),re,H))}}catch(Xe){he.e(Xe)}finally{he.f()}return re;function _e(Xe,Le){return"Cannot access ".concat(Xe," ").concat(Le," levels up, current level is ").concat(le)}}return _f.getData=te,_f}za.getSchemaRefs=function(t,n){var e=this;if("boolean"==typeof t)return{};var i=this.opts,r=i.schemaId,o=i.uriResolver,s=u1(t[r]||n),a={"":s},l=kge(o,s,!1),c={},u=new Set;return vst(t,{allKeys:!0},function(f,p,m,g){if(void 0!==g){var v=l+p,y=a[g];"string"==typeof f[r]&&(y=b.call(e,f[r])),C.call(e,f.$anchor),C.call(e,f.$dynamicAnchor),a[p]=y}function b(k){if(k=u1(y?(0,this.opts.uriResolver.resolve)(y,k):k),u.has(k))throw h(k);u.add(k);var L=this.refs[k];return"string"==typeof L&&(L=this.refs[L]),"object"==gn(L)?d(f,L.schema,k):k!==u1(v)&&("#"===k[0]?(d(f,c[k],k),c[k]=f):this.refs[k]=v),k}function C(k){if("string"==typeof k){if(!xst.test(k))throw new Error('invalid anchor "'.concat(k,'"'));b.call(this,"#".concat(k))}}}),c;function d(f,p,m){if(void 0!==p&&!gst(f,p))throw h(m)}function h(f){return new Error('reference "'.concat(f,'" resolves to more than one schema'))}};var Ege,oT={};function mR(){if(Ege)return oT;Ege=1,Object.defineProperty(oT,"__esModule",{value:!0});var t=function(n){wt(i,O_(Error));var e=Ct(i);function i(r){var o;return Ce(this,i),(o=e.call(this,"validation failed")).errors=r,o.ajv=o.validation=!0,o}return Se(i)}();return oT.default=t,oT}var Age,sT={};function gR(){if(Age)return sT;Age=1,Object.defineProperty(sT,"__esModule",{value:!0});var t=za,n=function(e){wt(r,O_(Error));var i=Ct(r);function r(o,s,a,l){var c;return Ce(this,r),(c=i.call(this,l||"can't resolve reference ".concat(a," from id ").concat(s))).missingRef=(0,t.resolveUrl)(o,s,a),c.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(o,c.missingRef)),c}return Se(r)}();return sT.default=n,sT}var Xl={};Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.resolveSchema=Xl.getCompilingSchema=Xl.resolveRef=Xl.compileSchema=Xl.SchemaEnv=void 0;var hd=xr(),wst=mR(),bg=Lp(),fd=za,Mge=Lr,Cst=rT(),aT=Se(function t(n){var e,i;Ce(this,t),this.refs={},this.dynamicAnchors={},"object"==gn(n.schema)&&(i=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(e=n.baseId)&&void 0!==e?e:(0,fd.normalizeId)(i?.[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=i?.$async,this.refs={}});function vR(t){var n=Oge.call(this,t);if(n)return n;var e,i=(0,fd.getFullPath)(this.opts.uriResolver,t.root.baseId),r=this.opts.code,l=new hd.CodeGen(this.scope,{es5:r.es5,lines:r.lines,ownProperties:this.opts.ownProperties});t.$async&&(e=l.scopeValue("Error",{ref:wst.default,code:(0,hd._)(XJ||(XJ=Ee(['require("ajv/dist/runtime/validation_error").default'])))}));var c=l.scopeName("validate");t.validateName=c;var u,d={gen:l,allErrors:this.opts.allErrors,data:bg.default.data,parentData:bg.default.parentData,parentDataProperty:bg.default.parentDataProperty,dataNames:[bg.default.data],dataPathArr:[hd.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:t.schema,code:(0,hd.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:e,schema:t.schema,schemaEnv:t,rootId:i,baseId:t.baseId||i,schemaPath:hd.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hd._)(JJ||(JJ=Ee(['""']))),opts:this.opts,self:this};try{this._compilations.add(t),(0,Cst.validateFunctionCode)(d),l.optimize(this.opts.code.optimize);var h=l.toString();u="".concat(l.scopeRefs(bg.default.scope),"return ").concat(h),this.opts.code.process&&(u=this.opts.code.process(u,t));var f=new Function("".concat(bg.default.self),"".concat(bg.default.scope),u)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=t.schema,f.schemaEnv=t,t.$async&&(f.$async=!0),!0===this.opts.code.source&&(f.source={validateName:c,validateCode:h,scopeValues:l._values}),this.opts.unevaluated){var p=d.props,m=d.items;f.evaluated={props:p instanceof hd.Name?void 0:p,items:m instanceof hd.Name?void 0:m,dynamicProps:p instanceof hd.Name,dynamicItems:m instanceof hd.Name},f.source&&(f.source.evaluated=(0,hd.stringify)(f.evaluated))}return t.validate=f,t}catch(g){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),g}finally{this._compilations.delete(t)}}function Sst(t){return(0,fd.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:vR.call(this,t)}function Oge(t){var n,e,i,r=Re(this._compilations);try{for(r.s();!(n=r.n()).done;){var o=n.value;if((e=o).schema===(i=t).schema&&e.root===i.root&&e.baseId===i.baseId)return o}}catch(s){r.e(s)}finally{r.f()}}function kst(t,n){for(var e;"string"==typeof(e=this.refs[n]);)n=e;return e||this.schemas[n]||lT.call(this,t,n)}function lT(t,n){var e=this.opts.uriResolver.parse(n),i=(0,fd._getFullPath)(this.opts.uriResolver,e),r=(0,fd.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&i===r)return yR.call(this,e,t);var o=(0,fd.normalizeId)(i),s=this.refs[o]||this.schemas[o];if("string"==typeof s){var a=lT.call(this,t,s);return"object"!==gn(a?.schema)?void 0:yR.call(this,e,a)}if("object"===gn(s?.schema)){if(s.validate||vR.call(this,s),o===(0,fd.normalizeId)(n)){var l=s.schema,c=this.opts.schemaId,u=l[c];return u&&(r=(0,fd.resolveUrl)(this.opts.uriResolver,r,u)),new aT({schema:l,schemaId:c,root:t,baseId:r})}return yR.call(this,e,s)}}Xl.SchemaEnv=aT,Xl.compileSchema=vR,Xl.resolveRef=function(t,n,e){var i;e=(0,fd.resolveUrl)(this.opts.uriResolver,n,e);var r=t.refs[e];if(r)return r;var o=kst.call(this,t,e);if(void 0===o){var s=null===(i=t.localRefs)||void 0===i?void 0:i[e];s&&(o=new aT({schema:s,schemaId:this.opts.schemaId,root:t,baseId:n}))}return void 0!==o?t.refs[e]=Sst.call(this,o):void 0},Xl.getCompilingSchema=Oge,Xl.resolveSchema=lT;var Dst=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yR(t,n){var e,i=n.baseId,r=n.schema,o=n.root;if("/"===(null===(e=t.fragment)||void 0===e?void 0:e[0])){var s,a,l=Re(t.fragment.slice(1).split("/"));try{for(l.s();!(s=l.n()).done;){var c=s.value;if("boolean"==typeof r)return;var u=r[(0,Mge.unescapeFragment)(c)];if(void 0===u)return;var d="object"===gn(r=u)&&r[this.opts.schemaId];!Dst.has(c)&&d&&(i=(0,fd.resolveUrl)(this.opts.uriResolver,i,d))}}catch(p){l.e(p)}finally{l.f()}if("boolean"!=typeof r&&r.$ref&&!(0,Mge.schemaHasRulesButRef)(r,this.RULES)){var h=(0,fd.resolveUrl)(this.opts.uriResolver,i,r.$ref);a=lT.call(this,o,h)}return(a=a||new aT({schema:r,schemaId:this.opts.schemaId,root:o,baseId:i})).schema!==a.root.schema?a:void 0}}var Tst={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},_R={},Ige={};(function(t){function n(){for(var xe=arguments.length,He=Array(xe),We=0;We1){He[0]=He[0].slice(0,-1);for(var lt=He.length-1,Ue=1;Ue= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=Math.floor,G=String.fromCharCode;function X(xe){throw new RangeError(z[xe])}function P(xe,He){var We=xe.split("@"),lt="";return We.length>1&&(lt=We[0]+"@",xe=We[1]),lt+function te(xe,He){for(var We=[],lt=xe.length;lt--;)We[lt]=He(xe[lt]);return We}((xe=xe.replace(L,".")).split("."),He).join(".")}function W(xe){for(var He=[],We=0,lt=xe.length;We=55296&&Ue<=56319&&We>1,xe+=U(xe/He);xe>455;lt+=f)xe=U(xe/35);return U(lt+36*xe/(xe+38))},I=function(xe){var He=[],We=xe.length,lt=0,Ue=128,kn=72,ni=xe.lastIndexOf("-");ni<0&&(ni=0);for(var ci=0;ci=128&&X("not-basic"),He.push(xe.charCodeAt(ci));for(var li=ni>0?ni+1:0;li=We&&X("invalid-input");var vr=H(xe.charCodeAt(li++));(vr>=f||vr>U((h-lt)/qr))&&X("overflow"),lt+=vr*qr;var Te=fi<=kn?1:fi>=kn+26?26:fi-kn;if(vrU(h/kt)&&X("overflow"),qr*=kt}var Vt=He.length+1;kn=E(lt-Sr,Vt,0==Sr),U(lt/Vt)>h-Ue&&X("overflow"),Ue+=U(lt/Vt),lt%=Vt,He.splice(lt++,0,Ue)}return String.fromCodePoint.apply(String,He)},N=function(xe){var He=[],We=(xe=W(xe)).length,lt=128,Ue=0,kn=72,ni=!0,ci=!1,li=void 0;try{for(var Sr,qr=xe[Symbol.iterator]();!(ni=(Sr=qr.next()).done);ni=!0){var fi=Sr.value;fi<128&&He.push(G(fi))}}catch(vd){ci=!0,li=vd}finally{try{!ni&&qr.return&&qr.return()}finally{if(ci)throw li}}var vr=He.length,Te=vr;for(vr&&He.push("-");Te=lt&&$nU((h-Ue)/ei)&&X("overflow"),Ue+=(kt-lt)*ei,lt=kt;var Xn=!0,yr=!1,Er=void 0;try{for(var Io,sa=xe[Symbol.iterator]();!(Xn=(Io=sa.next()).done);Xn=!0){var md=Io.value;if(mdh&&X("overflow"),md==lt){for(var pu=Ue,aa=f;;aa+=f){var El=aa<=kn?1:aa>=kn+26?26:aa-kn;if(pu>6|192).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase():"%"+(He>>12|224).toString(16).toUpperCase()+"%"+(He>>6&63|128).toString(16).toUpperCase()+"%"+(63&He|128).toString(16).toUpperCase()}function _e(xe){for(var He="",We=0,lt=xe.length;We=194&&Ue<224){if(lt-We>=6){var kn=parseInt(xe.substr(We+4,2),16);He+=String.fromCharCode((31&Ue)<<6|63&kn)}else He+=xe.substr(We,6);We+=6}else if(Ue>=224){if(lt-We>=9){var ni=parseInt(xe.substr(We+4,2),16),ci=parseInt(xe.substr(We+7,2),16);He+=String.fromCharCode((15&Ue)<<12|(63&ni)<<6|63&ci)}else He+=xe.substr(We,9);We+=9}else He+=xe.substr(We,3),We+=3}return He}function Xe(xe,He){function We(lt){var Ue=_e(lt);return Ue.match(He.UNRESERVED)?Ue:lt}return xe.scheme&&(xe.scheme=String(xe.scheme).replace(He.PCT_ENCODED,We).toLowerCase().replace(He.NOT_SCHEME,"")),void 0!==xe.userinfo&&(xe.userinfo=String(xe.userinfo).replace(He.PCT_ENCODED,We).replace(He.NOT_USERINFO,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.host&&(xe.host=String(xe.host).replace(He.PCT_ENCODED,We).toLowerCase().replace(He.NOT_HOST,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.path&&(xe.path=String(xe.path).replace(He.PCT_ENCODED,We).replace(xe.scheme?He.NOT_PATH:He.NOT_PATH_NOSCHEME,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.query&&(xe.query=String(xe.query).replace(He.PCT_ENCODED,We).replace(He.NOT_QUERY,Oe).replace(He.PCT_ENCODED,r)),void 0!==xe.fragment&&(xe.fragment=String(xe.fragment).replace(He.PCT_ENCODED,We).replace(He.NOT_FRAGMENT,Oe).replace(He.PCT_ENCODED,r)),xe}function Le(xe){return xe.replace(/^0*(.*)/,"$1")||"0"}function rt(xe,He){var We=xe.match(He.IPV4ADDRESS)||[],lt=u(We,2)[1];return lt?lt.split(".").map(Le).join("."):xe}function B(xe,He){var We=xe.match(He.IPV6ADDRESS)||[],lt=u(We,3),Ue=lt[1],kn=lt[2];if(Ue){for(var ni=Ue.toLowerCase().split("::").reverse(),ci=u(ni,2),li=ci[0],Sr=ci[1],qr=Sr?Sr.split(":").map(Le):[],fi=li.split(":").map(Le),vr=He.IPV4ADDRESS.test(fi[fi.length-1]),Te=vr?7:8,kt=fi.length-Te,Vt=Array(Te),rn=0;rn1){var Ni=Vt.slice(0,un.index),$n=Vt.slice(un.index+un.length);ii=Ni.join(":")+"::"+$n.join(":")}else ii=Vt.join(":");return kn&&(ii+="%"+kn),ii}return xe}var ne=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ie=void 0==="".match(/(){0}/)[1];function Me(xe){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},We={},lt=!1!==He.iri?c:l;"suffix"===He.reference&&(xe=(He.scheme?He.scheme+":":"")+"//"+xe);var Ue=xe.match(ne);if(Ue){ie?(We.scheme=Ue[1],We.userinfo=Ue[3],We.host=Ue[4],We.port=parseInt(Ue[5],10),We.path=Ue[6]||"",We.query=Ue[7],We.fragment=Ue[8],isNaN(We.port)&&(We.port=Ue[5])):(We.scheme=Ue[1]||void 0,We.userinfo=-1!==xe.indexOf("@")?Ue[3]:void 0,We.host=-1!==xe.indexOf("//")?Ue[4]:void 0,We.port=parseInt(Ue[5],10),We.path=Ue[6]||"",We.query=-1!==xe.indexOf("?")?Ue[7]:void 0,We.fragment=-1!==xe.indexOf("#")?Ue[8]:void 0,isNaN(We.port)&&(We.port=xe.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ue[4]:void 0)),We.host&&(We.host=B(rt(We.host,lt),lt)),We.reference=void 0!==We.scheme||void 0!==We.userinfo||void 0!==We.host||void 0!==We.port||We.path||void 0!==We.query?void 0===We.scheme?"relative":void 0===We.fragment?"absolute":"uri":"same-document",He.reference&&"suffix"!==He.reference&&He.reference!==We.reference&&(We.error=We.error||"URI is not a "+He.reference+" reference.");var kn=he[(He.scheme||We.scheme||"").toLowerCase()];if(He.unicodeSupport||kn&&kn.unicodeSupport)Xe(We,lt);else{if(We.host&&(He.domainHost||kn&&kn.domainHost))try{We.host=re.toASCII(We.host.replace(lt.PCT_ENCODED,_e).toLowerCase())}catch(ni){We.error=We.error||"Host's domain name can not be converted to ASCII via punycode: "+ni}Xe(We,l)}kn&&kn.parse&&kn.parse(We,He)}else We.error=We.error||"URI can not be parsed.";return We}var je=/^\.\.?\//,yt=/^\/\.(\/|$)/,Tt=/^\/\.\.(\/|$)/,fn=/^\/?(?:.|\n)*?(?=\/|$)/;function Hn(xe){for(var He=[];xe.length;)if(xe.match(je))xe=xe.replace(je,"");else if(xe.match(yt))xe=xe.replace(yt,"/");else if(xe.match(Tt))xe=xe.replace(Tt,"/"),He.pop();else if("."===xe||".."===xe)xe="";else{var We=xe.match(fn);if(!We)throw new Error("Unexpected dot segment condition");var lt=We[0];xe=xe.slice(lt.length),He.push(lt)}return He.join("")}function Zt(xe){var He=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},We=He.iri?c:l,lt=[],Ue=he[(He.scheme||xe.scheme||"").toLowerCase()];if(Ue&&Ue.serialize&&Ue.serialize(xe,He),xe.host&&!We.IPV6ADDRESS.test(xe.host)&&(He.domainHost||Ue&&Ue.domainHost))try{xe.host=He.iri?re.toUnicode(xe.host):re.toASCII(xe.host.replace(We.PCT_ENCODED,_e).toLowerCase())}catch(ci){xe.error=xe.error||"Host's domain name can not be converted to "+(He.iri?"Unicode":"ASCII")+" via punycode: "+ci}Xe(xe,We),"suffix"!==He.reference&&xe.scheme&&(lt.push(xe.scheme),lt.push(":"));var kn=function Ye(xe,He){var We=!1!==He.iri?c:l,lt=[];return void 0!==xe.userinfo&&(lt.push(xe.userinfo),lt.push("@")),void 0!==xe.host&<.push(B(rt(String(xe.host),We),We).replace(We.IPV6ADDRESS,function(Ue,kn,ni){return"["+kn+(ni?"%25"+ni:"")+"]"})),"number"!=typeof xe.port&&"string"!=typeof xe.port||(lt.push(":"),lt.push(String(xe.port))),lt.length?lt.join(""):void 0}(xe,He);if(void 0!==kn&&("suffix"!==He.reference&<.push("//"),lt.push(kn),xe.path&&"/"!==xe.path.charAt(0)&<.push("/")),void 0!==xe.path){var ni=xe.path;He.absolutePath||Ue&&Ue.absolutePath||(ni=Hn(ni)),void 0===kn&&(ni=ni.replace(/^\/\//,"/%2F")),lt.push(ni)}return void 0!==xe.query&&(lt.push("?"),lt.push(xe.query)),void 0!==xe.fragment&&(lt.push("#"),lt.push(xe.fragment)),lt.join("")}function Ei(xe,He){var We=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},lt={};return arguments[3]||(xe=Me(Zt(xe,We),We),He=Me(Zt(He,We),We)),!(We=We||{}).tolerant&&He.scheme?(lt.scheme=He.scheme,lt.userinfo=He.userinfo,lt.host=He.host,lt.port=He.port,lt.path=Hn(He.path||""),lt.query=He.query):(void 0!==He.userinfo||void 0!==He.host||void 0!==He.port?(lt.userinfo=He.userinfo,lt.host=He.host,lt.port=He.port,lt.path=Hn(He.path||""),lt.query=He.query):(He.path?("/"===He.path.charAt(0)?lt.path=Hn(He.path):(lt.path=void 0===xe.userinfo&&void 0===xe.host&&void 0===xe.port||xe.path?xe.path?xe.path.slice(0,xe.path.lastIndexOf("/")+1)+He.path:He.path:"/"+He.path,lt.path=Hn(lt.path)),lt.query=He.query):(lt.path=xe.path,lt.query=void 0!==He.query?He.query:xe.query),lt.userinfo=xe.userinfo,lt.host=xe.host,lt.port=xe.port),lt.scheme=xe.scheme),lt.fragment=He.fragment,lt}function mr(xe,He){return xe&&xe.toString().replace(He&&He.iri?c.PCT_ENCODED:l.PCT_ENCODED,_e)}var gi={scheme:"http",domainHost:!0,parse:function(xe,He){return xe.host||(xe.error=xe.error||"HTTP URIs must have a host."),xe},serialize:function(xe,He){var We="https"===String(xe.scheme).toLowerCase();return xe.port!==(We?443:80)&&""!==xe.port||(xe.port=void 0),xe.path||(xe.path="/"),xe}},Vr={scheme:"https",domainHost:gi.domainHost,parse:gi.parse,serialize:gi.serialize};function Oo(xe){return"boolean"==typeof xe.secure?xe.secure:"wss"===String(xe.scheme).toLowerCase()}var On={scheme:"ws",domainHost:!0,parse:function(xe,He){var We=xe;return We.secure=Oo(We),We.resourceName=(We.path||"/")+(We.query?"?"+We.query:""),We.path=void 0,We.query=void 0,We},serialize:function(xe,He){if(xe.port!==(Oo(xe)?443:80)&&""!==xe.port||(xe.port=void 0),"boolean"==typeof xe.secure&&(xe.scheme=xe.secure?"wss":"ws",xe.secure=void 0),xe.resourceName){var We=xe.resourceName.split("?"),lt=u(We,2),Ue=lt[0],kn=lt[1];xe.path=Ue&&"/"!==Ue?Ue:void 0,xe.query=kn,xe.resourceName=void 0}return xe.fragment=void 0,xe}},xt={scheme:"wss",domainHost:On.domainHost,parse:On.parse,serialize:On.serialize},ai={},Ii="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Cr="[0-9A-Fa-f]",vo=e(e("%[EFef]"+Cr+"%"+Cr+Cr+"%"+Cr+Cr)+"|"+e("%[89A-Fa-f]"+Cr+"%"+Cr+Cr)+"|"+e("%"+Cr+Cr)),pt=n("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),oi=new RegExp(Ii,"g"),vi=new RegExp(vo,"g"),Tr=new RegExp(n("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',pt),"g"),Hr=new RegExp(n("[^]",Ii,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),no=Hr;function Us(xe){var He=_e(xe);return He.match(oi)?He:xe}var gr={scheme:"mailto",parse:function(xe,He){var We=xe,lt=We.to=We.path?We.path.split(","):[];if(We.path=void 0,We.query){for(var Ue=!1,kn={},ni=We.query.split("&"),ci=0,li=ni.length;ci string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},b=function(){function E(){var I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Ce(this,E),this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,I=this.opts=Qe(Qe({},I),function y(E){var I,N,q,V,re,he,Oe,_e,Xe,Le,rt,B,ne,ie,Me,Ye,je,yt,Tt,fn,Hn,Zt,Ei,ln,ur,wr=E.strict,or=null===(I=E.code)||void 0===I?void 0:I.optimize,mr=!0===or||void 0===or?1:or||0,gi=null!==(q=null===(N=E.code)||void 0===N?void 0:N.regExp)&&void 0!==q?q:f,Vr=null!==(V=E.uriResolver)&&void 0!==V?V:h.default;return{strictSchema:null===(he=null!==(re=E.strictSchema)&&void 0!==re?re:wr)||void 0===he||he,strictNumbers:null===(_e=null!==(Oe=E.strictNumbers)&&void 0!==Oe?Oe:wr)||void 0===_e||_e,strictTypes:null!==(Le=null!==(Xe=E.strictTypes)&&void 0!==Xe?Xe:wr)&&void 0!==Le?Le:"log",strictTuples:null!==(B=null!==(rt=E.strictTuples)&&void 0!==rt?rt:wr)&&void 0!==B?B:"log",strictRequired:null!==(ie=null!==(ne=E.strictRequired)&&void 0!==ne?ne:wr)&&void 0!==ie&&ie,code:E.code?Qe(Qe({},E.code),{},{optimize:mr,regExp:gi}):{optimize:mr,regExp:gi},loopRequired:null!==(Me=E.loopRequired)&&void 0!==Me?Me:200,loopEnum:null!==(Ye=E.loopEnum)&&void 0!==Ye?Ye:200,meta:null===(je=E.meta)||void 0===je||je,messages:null===(yt=E.messages)||void 0===yt||yt,inlineRefs:null===(Tt=E.inlineRefs)||void 0===Tt||Tt,schemaId:null!==(fn=E.schemaId)&&void 0!==fn?fn:"$id",addUsedSchema:null===(Hn=E.addUsedSchema)||void 0===Hn||Hn,validateSchema:null===(Zt=E.validateSchema)||void 0===Zt||Zt,validateFormats:null===(Ei=E.validateFormats)||void 0===Ei||Ei,unicodeRegExp:null===(ln=E.unicodeRegExp)||void 0===ln||ln,int32range:null===(ur=E.int32range)||void 0===ur||ur,uriResolver:Vr}}(I));var N=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:m,es5:N.es5,lines:N.lines}),this.logger=function G(E){if(!1===E)return U;if(void 0===E)return console;if(E.log&&E.warn&&E.error)return E;throw new Error("logger must implement log, warn and error methods")}(I.logger);var re=I.validateFormats;I.validateFormats=!1,this.RULES=(0,o.getRules)(),C.call(this,g,I,"NOT SUPPORTED"),C.call(this,v,I,"DEPRECATED","warn"),this._metaOpts=R.call(this),I.formats&&L.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),I.keywords&&z.call(this,I.keywords),"object"==gn(I.meta)&&this.addMetaSchema(I.meta),D.call(this),I.validateFormats=re}return Se(E,[{key:"_addVocabularies",value:function(){this.addKeyword("$async")}},{key:"_addDefaultMetaSchema",value:function(){var I=this.opts,N=I.$data,q=I.meta,V=I.schemaId,re=d;"id"===V&&((re=Qe({},d)).id=re.$id,delete re.$id),q&&N&&this.addMetaSchema(re,re[V],!1)}},{key:"defaultMeta",value:function(){var I=this.opts,N=I.meta,q=I.schemaId;return this.opts.defaultMeta="object"==gn(N)?N[q]||N:void 0}},{key:"validate",value:function(I,N){var q;if("string"==typeof I){if(!(q=this.getSchema(I)))throw new Error('no schema with key or ref "'.concat(I,'"'))}else q=this.compile(I);var V=q(N);return"$async"in q||(this.errors=q.errors),V}},{key:"compile",value:function(I,N){var q=this._addSchema(I,N);return q.validate||this._compileSchemaEnv(q)}},{key:"compileAsync",value:function(I,N){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");var q=this.opts.loadSchema;return V.call(this,I,N);function V(Me,Ye){return re.apply(this,arguments)}function re(){return(re=Ki(pn().mark(function Me(Ye,je){var yt;return pn().wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return Tt.next=2,he.call(this,Ye.$schema);case 2:return yt=this._addSchema(Ye,je),Tt.abrupt("return",yt.validate||_e.call(this,yt));case 4:case"end":return Tt.stop()}},Me,this)}))).apply(this,arguments)}function he(Me){return Oe.apply(this,arguments)}function Oe(){return(Oe=Ki(pn().mark(function Me(Ye){return pn().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(!Ye||this.getSchema(Ye)){je.next=3;break}return je.next=3,V.call(this,{$ref:Ye},!0);case 3:case"end":return je.stop()}},Me,this)}))).apply(this,arguments)}function _e(Me){return Xe.apply(this,arguments)}function Xe(){return(Xe=Ki(pn().mark(function Me(Ye){return pn().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.prev=0,je.abrupt("return",this._compileSchemaEnv(Ye));case 4:if(je.prev=4,je.t0=je.catch(0),je.t0 instanceof r.default){je.next=8;break}throw je.t0;case 8:return Le.call(this,je.t0),je.next=11,rt.call(this,je.t0.missingSchema);case 11:return je.abrupt("return",_e.call(this,Ye));case 12:case"end":return je.stop()}},Me,this,[[0,4]])}))).apply(this,arguments)}function Le(Me){var Ye=Me.missingSchema,je=Me.missingRef;if(this.refs[Ye])throw new Error("AnySchema ".concat(Ye," is loaded but ").concat(je," cannot be resolved"))}function rt(Me){return B.apply(this,arguments)}function B(){return(B=Ki(pn().mark(function Me(Ye){var je;return pn().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:return yt.next=2,ne.call(this,Ye);case 2:if(je=yt.sent,this.refs[Ye]){yt.next=6;break}return yt.next=6,he.call(this,je.$schema);case 6:this.refs[Ye]||this.addSchema(je,Ye,N);case 7:case"end":return yt.stop()}},Me,this)}))).apply(this,arguments)}function ne(Me){return ie.apply(this,arguments)}function ie(){return(ie=Ki(pn().mark(function Me(Ye){var je;return pn().wrap(function(yt){for(;;)switch(yt.prev=yt.next){case 0:if(!(je=this._loading[Ye])){yt.next=3;break}return yt.abrupt("return",je);case 3:return yt.prev=3,yt.next=6,this._loading[Ye]=q(Ye);case 6:return yt.abrupt("return",yt.sent);case 7:return yt.prev=7,delete this._loading[Ye],yt.finish(7);case 10:case"end":return yt.stop()}},Me,this,[[3,,7,10]])}))).apply(this,arguments)}}},{key:"addSchema",value:function(I,N,q){var V,re=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema;if(Array.isArray(I)){var he,Oe=Re(I);try{for(Oe.s();!(he=Oe.n()).done;)this.addSchema(he.value,void 0,q,re)}catch(Le){Oe.e(Le)}finally{Oe.f()}return this}if("object"===gn(I)){var Xe=this.opts.schemaId;if(void 0!==(V=I[Xe])&&"string"!=typeof V)throw new Error("schema ".concat(Xe," must be string"))}return N=(0,l.normalizeId)(N||V),this._checkUnique(N),this.schemas[N]=this._addSchema(I,q,N,re,!0),this}},{key:"addMetaSchema",value:function(I,N){return this.addSchema(I,N,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.opts.validateSchema),this}},{key:"validateSchema",value:function(I,N){if("boolean"==typeof I)return!0;var q;if(void 0!==(q=I.$schema)&&"string"!=typeof q)throw new Error("$schema must be a string");if(!(q=q||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;var V=this.validate(q,I);if(!V&&N){var re="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(re);this.logger.error(re)}return V}},{key:"getSchema",value:function(I){for(var N;"string"==typeof(N=k.call(this,I));)I=N;if(void 0===N){var V=new s.SchemaEnv({schema:{},schemaId:this.opts.schemaId});if(!(N=s.resolveSchema.call(this,V,I)))return;this.refs[I]=N}return N.validate||this._compileSchemaEnv(N)}},{key:"removeSchema",value:function(I){if(I instanceof RegExp)return this._removeAllSchemas(this.schemas,I),this._removeAllSchemas(this.refs,I),this;switch(gn(I)){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":var N=k.call(this,I);return"object"==gn(N)&&this._cache.delete(N.schema),delete this.schemas[I],delete this.refs[I],this;case"object":this._cache.delete(I);var V=I[this.opts.schemaId];return V&&(V=(0,l.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this;default:throw new Error("ajv.removeSchema: invalid parameter")}}},{key:"addVocabulary",value:function(I){var N,q=Re(I);try{for(q.s();!(N=q.n()).done;)this.addKeyword(N.value)}catch(re){q.e(re)}finally{q.f()}return this}},{key:"addKeyword",value:function(I,N){var q,V=this;if("string"==typeof I)q=I,"object"==gn(N)&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),N.keyword=q);else{if("object"!=gn(I)||void 0!==N)throw new Error("invalid addKeywords parameters");if(q=(N=I).keyword,Array.isArray(q)&&!q.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(te.call(this,q,N),!N)return(0,u.eachItem)(q,function(he){return P.call(V,he)}),this;J.call(this,N);var re=Qe(Qe({},N),{},{type:(0,c.getJSONTypes)(N.type),schemaType:(0,c.getJSONTypes)(N.schemaType)});return(0,u.eachItem)(q,0===re.type.length?function(he){return P.call(V,he,re)}:function(he){return re.type.forEach(function(Oe){return P.call(V,he,re,Oe)})}),this}},{key:"getKeyword",value:function(I){var N=this.RULES.all[I];return"object"==gn(N)?N.definition:!!N}},{key:"removeKeyword",value:function(I){var N=this.RULES;delete N.keywords[I],delete N.all[I];var q,V=Re(N.rules);try{for(V.s();!(q=V.n()).done;){var re=q.value,he=re.rules.findIndex(function(Oe){return Oe.keyword===I});he>=0&&re.rules.splice(he,1)}}catch(Oe){V.e(Oe)}finally{V.f()}return this}},{key:"addFormat",value:function(I,N){return"string"==typeof N&&(N=new RegExp(N)),this.formats[I]=N,this}},{key:"errorsText",value:function(){var I=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.errors,N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},q=N.separator,V=void 0===q?", ":q,re=N.dataVar,he=void 0===re?"data":re;return I&&0!==I.length?I.map(function(Oe){return"".concat(he).concat(Oe.instancePath," ").concat(Oe.message)}).reduce(function(Oe,_e){return Oe+V+_e}):"No errors"}},{key:"$dataMetaSchema",value:function(I,N){var q=this.RULES.all;I=JSON.parse(JSON.stringify(I));var V,re=Re(N);try{for(re.s();!(V=re.n()).done;){var he,Oe=V.value.split("/").slice(1),_e=I,Xe=Re(Oe);try{for(Xe.s();!(he=Xe.n()).done;)_e=_e[he.value]}catch(ie){Xe.e(ie)}finally{Xe.f()}for(var Le in q){var rt=q[Le];if("object"==gn(rt)){var ne=_e[Le];rt.definition.$data&&ne&&(_e[Le]=le(ne))}}}}catch(ie){re.e(ie)}finally{re.f()}return I}},{key:"_removeAllSchemas",value:function(I,N){for(var q in I){var V=I[q];N&&!N.test(q)||("string"==typeof V?delete I[q]:V&&!V.meta&&(this._cache.delete(V.schema),delete I[q]))}}},{key:"_addSchema",value:function(I,N,q){var V,re=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.opts.validateSchema,he=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.opts.addUsedSchema,Oe=this.opts.schemaId;if("object"==gn(I))V=I[Oe];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof I)throw new Error("schema must be object or boolean")}var _e=this._cache.get(I);if(void 0!==_e)return _e;q=(0,l.normalizeId)(V||q);var Xe=l.getSchemaRefs.call(this,I,q);return _e=new s.SchemaEnv({schema:I,schemaId:Oe,meta:N,baseId:q,localRefs:Xe}),this._cache.set(_e.schema,_e),he&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=_e),re&&this.validateSchema(I,!0),_e}},{key:"_checkUnique",value:function(I){if(this.schemas[I]||this.refs[I])throw new Error('schema with key or id "'.concat(I,'" already exists'))}},{key:"_compileSchemaEnv",value:function(I){if(I.meta?this._compileMetaSchema(I):s.compileSchema.call(this,I),!I.validate)throw new Error("ajv implementation error");return I.validate}},{key:"_compileMetaSchema",value:function(I){var N=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,I)}finally{this.opts=N}}}]),E}();function C(E,I,N){var q=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"error";for(var V in E){var re=V;re in I&&this.logger[q]("".concat(N,": option ").concat(V,". ").concat(E[re]))}}function k(E){return E=(0,l.normalizeId)(E),this.schemas[E]||this.refs[E]}function D(){var E=this.opts.schemas;if(E)if(Array.isArray(E))this.addSchema(E);else for(var I in E)this.addSchema(E[I],I)}function L(){for(var E in this.opts.formats){var I=this.opts.formats[E];I&&this.addFormat(E,I)}}function z(E){if(Array.isArray(E))this.addVocabulary(E);else for(var I in this.logger.warn("keywords option as map is deprecated, pass array"),E){var N=E[I];N.keyword||(N.keyword=I),this.addKeyword(N)}}function R(){var E,I=Qe({},this.opts),N=Re(p);try{for(N.s();!(E=N.n()).done;)delete I[E.value]}catch(q){N.e(q)}finally{N.f()}return I}t.default=b,b.ValidationError=i.default,b.MissingRefError=r.default;var U={log:function(){},warn:function(){},error:function(){}},X=/^[a-z_$][a-z0-9_$:-]*$/i;function te(E,I){var N=this.RULES;if((0,u.eachItem)(E,function(q){if(N.keywords[q])throw new Error("Keyword ".concat(q," is already defined"));if(!X.test(q))throw new Error("Keyword ".concat(q," has invalid name"))}),I&&I.$data&&!("code"in I)&&!("validate"in I))throw new Error('$data keyword must have "code" or "validate" function')}function P(E,I,N){var q,V=this,re=I?.post;if(N&&re)throw new Error('keyword with "post" flag cannot have "type"');var he=this.RULES,Oe=re?he.post:he.rules.find(function(Xe){return Xe.type===N});if(Oe||he.rules.push(Oe={type:N,rules:[]}),he.keywords[E]=!0,I){var _e={keyword:E,definition:Qe(Qe({},I),{},{type:(0,c.getJSONTypes)(I.type),schemaType:(0,c.getJSONTypes)(I.schemaType)})};I.before?W.call(this,Oe,_e,I.before):Oe.rules.push(_e),he.all[E]=_e,null===(q=I.implements)||void 0===q||q.forEach(function(Xe){return V.addKeyword(Xe)})}}function W(E,I,N){var q=E.rules.findIndex(function(V){return V.keyword===N});q>=0?E.rules.splice(q,0,I):(E.rules.push(I),this.logger.warn("rule ".concat(N," is not defined")))}function J(E){var I=E.metaSchema;void 0!==I&&(E.$data&&this.opts.$data&&(I=le(I)),E.validateSchema=this.compile(I,!0))}var H={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function le(E){return{anyOf:[E,H]}}}(sge);var bR={},xR={},wR={};Object.defineProperty(wR,"__esModule",{value:!0}),wR.default={keyword:"id",code:function(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};var xg={};Object.defineProperty(xg,"__esModule",{value:!0}),xg.callRef=xg.getValidate=void 0;var Ast=gR(),Fge=dd(),Jl=xr(),d1=Lp(),Pge=Xl,cT=Lr,Mst={keyword:"$ref",schemaType:"string",code:function(t){var n=t.gen,e=t.schema,i=t.it,r=i.baseId,o=i.schemaEnv,s=i.validateName,a=i.opts,l=i.self,c=o.root;if(("#"===e||"#/"===e)&&r===c.baseId)return function(){if(o===c)return uT(t,s,o,o.$async);var m=n.scopeValue("root",{ref:c});return uT(t,(0,Jl._)(KJ||(KJ=Ee(["",".validate"])),m),c,c.$async)}();var u,d,h,f,m,g,p=Pge.resolveRef.call(l,c,r,e);if(void 0===p)throw new Ast.default(i.opts.uriResolver,r,e);return p instanceof Pge.SchemaEnv?(g=jge(t,m=p),void uT(t,g,m,m.$async)):(u=p,d=n.scopeValue("schema",!0===a.code.source?{ref:u,code:(0,Jl.stringify)(u)}:{ref:u}),h=n.name("valid"),f=t.subschema({schema:u,dataTypes:[],schemaPath:Jl.nil,topSchemaRef:d,errSchemaPath:e},h),t.mergeEvaluated(f),void t.ok(h))}};function jge(t,n){var e=t.gen;return n.validate?e.scopeValue("validate",{ref:n.validate}):(0,Jl._)(QJ||(QJ=Ee(["",".validate"])),e.scopeValue("wrapper",{ref:n}))}function uT(t,n,e,i){var r=t.gen,o=t.it,s=o.allErrors,a=o.schemaEnv,l=o.opts.passContext?d1.default.this:Jl.nil;function c(d){var h=(0,Jl._)(tK||(tK=Ee(["",".errors"])),d);r.assign(d1.default.vErrors,(0,Jl._)(nK||(nK=Ee([""," === null ? "," : ",".concat(",")"])),d1.default.vErrors,h,d1.default.vErrors,h)),r.assign(d1.default.errors,(0,Jl._)(iK||(iK=Ee(["",".length"])),d1.default.vErrors))}function u(d){var h;if(o.opts.unevaluated){var f=null===(h=e?.validate)||void 0===h?void 0:h.evaluated;if(!0!==o.props)if(f&&!f.dynamicProps)void 0!==f.props&&(o.props=cT.mergeEvaluated.props(r,f.props,o.props));else{var p=r.var("props",(0,Jl._)(rK||(rK=Ee(["",".evaluated.props"])),d));o.props=cT.mergeEvaluated.props(r,p,o.props,Jl.Name)}if(!0!==o.items)if(f&&!f.dynamicItems)void 0!==f.items&&(o.items=cT.mergeEvaluated.items(r,f.items,o.items));else{var m=r.var("items",(0,Jl._)(oK||(oK=Ee(["",".evaluated.items"])),d));o.items=cT.mergeEvaluated.items(r,m,o.items,Jl.Name)}}}i?function(){if(!a.$async)throw new Error("async schema referenced by sync schema");var d=r.let("valid");r.try(function(){r.code((0,Jl._)(ZJ||(ZJ=Ee(["await ",""])),(0,Fge.callValidateCode)(t,n,l))),u(n),s||r.assign(d,!0)},function(h){r.if((0,Jl._)(eK||(eK=Ee(["!("," instanceof ",")"])),h,o.ValidationError),function(){return r.throw(h)}),c(h),s||r.assign(d,!1)}),t.ok(d)}():t.result((0,Fge.callValidateCode)(t,n,l),function(){return u(n)},function(){return c(n)})}xg.getValidate=jge,xg.callRef=uT,xg.default=Mst,Object.defineProperty(xR,"__esModule",{value:!0}),xR.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",wR.default,xg.default];var CR={},SR={};Object.defineProperty(SR,"__esModule",{value:!0});var dT=xr(),Bp=dT.operators,hT={maximum:{okStr:"<=",ok:Bp.LTE,fail:Bp.GT},minimum:{okStr:">=",ok:Bp.GTE,fail:Bp.LT},exclusiveMaximum:{okStr:"<",ok:Bp.LT,fail:Bp.GTE},exclusiveMinimum:{okStr:">",ok:Bp.GT,fail:Bp.LTE}},Nst={message:function(t){var n=t.keyword,e=t.schemaCode;return(0,dT.str)(sK||(sK=Ee(["must be "," ",""])),hT[n].okStr,e)},params:function(t){var n=t.keyword,e=t.schemaCode;return(0,dT._)(aK||(aK=Ee(["{comparison: ",", limit: ","}"])),hT[n].okStr,e)}},Fst={keyword:Object.keys(hT),type:"number",schemaType:"number",$data:!0,error:Nst,code:function(t){var n=t.keyword,e=t.data,i=t.schemaCode;t.fail$data((0,dT._)(lK||(lK=Ee([""," "," "," || isNaN(",")"])),e,hT[n].fail,i,e))}};SR.default=Fst;var kR={};Object.defineProperty(kR,"__esModule",{value:!0});var nx=xr(),Pst={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,nx.str)(cK||(cK=Ee(["must be multiple of ",""])),n)},params:function(t){var n=t.schemaCode;return(0,nx._)(uK||(uK=Ee(["{multipleOf: ","}"])),n)}},code:function(t){var e=t.data,i=t.schemaCode,r=t.it.opts.multipleOfPrecision,o=t.gen.let("res"),s=r?(0,nx._)(dK||(dK=Ee(["Math.abs(Math.round(",") - ",") > 1e-",""])),o,o,r):(0,nx._)(hK||(hK=Ee([""," !== parseInt(",")"])),o,o);t.fail$data((0,nx._)(fK||(fK=Ee(["("," === 0 || ("," = ","/",", ","))"])),i,o,e,i,s))}};kR.default=Pst;var DR={},TR={};function Rge(t){for(var n,e=t.length,i=0,r=0;r=55296&&n<=56319&&r=a.loopRequired;if(s.allErrors?function(){if(l||o)t.block$data(ox.nil,g);else{var v,y=Re(e);try{for(y.s();!(v=y.n()).done;)(0,rx.checkReportMissingProp)(t,v.value)}catch(C){y.e(C)}finally{y.f()}}}():function(){var v=n.let("missing");if(l||o){var y=n.let("valid",!0);t.block$data(y,function(){return C=y,t.setParams({missingProperty:b=v}),void n.forOf(b,i,function(){n.assign(C,(0,rx.propertyInData)(n,r,b,a.ownProperties)),n.if((0,ox.not)(C),function(){t.error(),n.break()})},ox.nil);var b,C}),t.ok(y)}else n.if((0,rx.checkMissingProp)(t,e,v)),(0,rx.reportMissingProp)(t,v),n.else()}(),a.strictRequired){var c,u=t.parentSchema.properties,d=t.it.definedProperties,h=Re(e);try{for(h.s();!(c=h.n()).done;){var f=c.value;if(void 0===u?.[f]&&!d.has(f)){var p=s.schemaEnv.baseId+s.errSchemaPath,m='required property "'.concat(f,'" is not defined at "').concat(p,'" (strictRequired)');(0,zst.checkStrictMode)(s,m,s.opts.strictRequired)}}}catch(v){h.e(v)}finally{h.f()}}}function g(){n.forOf("prop",i,function(v){t.setParams({missingProperty:v}),n.if((0,rx.noPropertyInData)(n,r,v,a.ownProperties),function(){return t.error()})})}}};MR.default=Gst;var OR={};Object.defineProperty(OR,"__esModule",{value:!0});var sx=xr(),Wst={message:function(t){var e=t.schemaCode,i="maxItems"===t.keyword?"more":"fewer";return(0,sx.str)(EK||(EK=Ee(["must NOT have "," than "," items"])),i,e)},params:function(t){var n=t.schemaCode;return(0,sx._)(AK||(AK=Ee(["{limit: ","}"])),n)}},qst={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Wst,code:function(t){var e=t.data,i=t.schemaCode,r="maxItems"===t.keyword?sx.operators.GT:sx.operators.LT;t.fail$data((0,sx._)(MK||(MK=Ee(["",".length "," ",""])),e,r,i))}};OR.default=qst;var IR={},ax={};Object.defineProperty(ax,"__esModule",{value:!0});var Lge=Cge;Lge.code='require("ajv/dist/runtime/equal").default',ax.default=Lge,Object.defineProperty(IR,"__esModule",{value:!0});var NR=ex,Ga=xr(),Yst=Lr,Xst=ax,Jst={message:function(t){var n=t.params,e=n.i,i=n.j;return(0,Ga.str)(OK||(OK=Ee(["must NOT have duplicate items (items ## "," and "," are identical)"])),i,e)},params:function(t){var n=t.params,e=n.i,i=n.j;return(0,Ga._)(IK||(IK=Ee(["{i: ",", j: ","}"])),e,i)}},Kst={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Jst,code:function(t){var n=t.gen,e=t.data,o=t.parentSchema,s=t.schemaCode,a=t.it;if(t.$data||t.schema){var l=n.let("valid"),c=o.items?(0,NR.getSchemaTypes)(o.items):[];t.block$data(l,function(){var h=n.let("i",(0,Ga._)(FK||(FK=Ee(["",".length"])),e)),f=n.let("j");t.setParams({i:h,j:f}),n.assign(l,!0),n.if((0,Ga._)(PK||(PK=Ee([""," > 1"])),h),function(){return(c.length>0&&!c.some(function(p){return"object"===p||"array"===p})?u:d)(h,f)})},(0,Ga._)(NK||(NK=Ee([""," === false"])),s)),t.ok(l)}function u(h,f){var p=n.name("item"),m=(0,NR.checkDataTypes)(c,p,a.opts.strictNumbers,NR.DataType.Wrong),g=n.const("indices",(0,Ga._)(jK||(jK=Ee(["{}"]))));n.for((0,Ga._)(RK||(RK=Ee([";","--;"])),h),function(){n.let(p,(0,Ga._)(LK||(LK=Ee(["","[","]"])),e,h)),n.if(m,(0,Ga._)($K||($K=Ee(["continue"])))),c.length>1&&n.if((0,Ga._)(BK||(BK=Ee(["typeof ",' == "string"'])),p),(0,Ga._)(VK||(VK=Ee(["",' += "_"'])),p)),n.if((0,Ga._)(HK||(HK=Ee(["typeof ","[",'] == "number"'])),g,p),function(){n.assign(f,(0,Ga._)(UK||(UK=Ee(["","[","]"])),g,p)),t.error(),n.assign(l,!1).break()}).code((0,Ga._)(zK||(zK=Ee(["","[","] = ",""])),g,p,h))})}function d(h,f){var p=(0,Yst.useFunc)(n,Xst.default),m=n.name("outer");n.label(m).for((0,Ga._)(GK||(GK=Ee([";","--;"])),h),function(){return n.for((0,Ga._)(WK||(WK=Ee([""," = ","; ","--;"])),f,h,f),function(){return n.if((0,Ga._)(qK||(qK=Ee(["","(","[","], ","[","])"])),p,e,h,e,f),function(){t.error(),n.assign(l,!1).break(m)})})})}}};IR.default=Kst;var FR={};Object.defineProperty(FR,"__esModule",{value:!0});var PR=xr(),Qst=Lr,Zst=ax,eat={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:function(t){var n=t.schemaCode;return(0,PR._)(YK||(YK=Ee(["{allowedValue: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,r=t.schemaCode,o=t.schema;t.$data||o&&"object"==gn(o)?t.fail$data((0,PR._)(XK||(XK=Ee(["!","(",", ",")"])),(0,Qst.useFunc)(n,Zst.default),e,r)):t.fail((0,PR._)(JK||(JK=Ee([""," !== ",""])),o,e))}};FR.default=eat;var jR={};Object.defineProperty(jR,"__esModule",{value:!0});var lx=xr(),tat=Lr,nat=ax,iat={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:function(t){var n=t.schemaCode;return(0,lx._)(KK||(KK=Ee(["{allowedValues: ","}"])),n)}},code:function(t){var n=t.gen,e=t.data,i=t.$data,r=t.schema,o=t.schemaCode,s=t.it;if(!i&&0===r.length)throw new Error("enum must have non-empty array");var a,l,u=function(){return a??(a=(0,tat.useFunc)(n,nat.default))};if(r.length>=s.opts.loopEnum||i)l=n.let("valid"),t.block$data(l,function(){n.assign(l,!1),n.forOf("v",o,function(h){return n.if((0,lx._)(QK||(QK=Ee(["","(",", ",")"])),u(),e,h),function(){return n.assign(l,!0).break()})})});else{if(!Array.isArray(r))throw new Error("ajv implementation error");var d=n.const("vSchema",o);l=lx.or.apply(void 0,ri(r.map(function(h,f){return p=d,"object"===gn(g=r[m=f])&&null!==g?(0,lx._)(ZK||(ZK=Ee(["","(",", ","[","])"])),u(),e,p,m):(0,lx._)(eQ||(eQ=Ee([""," === ",""])),e,g);var p,m,g})))}t.pass(l)}};jR.default=iat,Object.defineProperty(CR,"__esModule",{value:!0}),CR.default=[SR.default,kR.default,DR.default,ER.default,AR.default,MR.default,OR.default,IR.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},FR.default,jR.default];var RR={},h1={};Object.defineProperty(h1,"__esModule",{value:!0}),h1.validateAdditionalItems=void 0;var Cg=xr(),LR=Lr,pat={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Cg.str)(tQ||(tQ=Ee(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Cg._)(nQ||(nQ=Ee(["{limit: ","}"])),n)}},code:function(t){var e=t.it,i=t.parentSchema.items;Array.isArray(i)?$ge(t,i):(0,LR.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function $ge(t,n){var e=t.gen,i=t.schema,r=t.data,o=t.keyword,s=t.it;s.items=!0;var a=e.const("len",(0,Cg._)(iQ||(iQ=Ee(["",".length"])),r));if(!1===i)t.setParams({len:n.length}),t.pass((0,Cg._)(rQ||(rQ=Ee([""," <= ",""])),a,n.length));else if("object"==gn(i)&&!(0,LR.alwaysValidSchema)(s,i)){var l=e.var("valid",(0,Cg._)(oQ||(oQ=Ee([""," <= ",""])),a,n.length));e.if((0,Cg.not)(l),function(){return c=l,void e.forRange("i",n.length,a,function(u){t.subschema({keyword:o,dataProp:u,dataPropType:LR.Type.Num},c),s.allErrors||e.if((0,Cg.not)(c),function(){return e.break()})});var c}),t.ok(l)}}h1.validateAdditionalItems=$ge,h1.default=pat;var $R={},f1={};Object.defineProperty(f1,"__esModule",{value:!0}),f1.validateTuple=void 0;var Bge=xr(),pT=Lr,mat=dd(),gat={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code:function(t){var n=t.schema,e=t.it;if(Array.isArray(n))return Vge(t,"additionalItems",n);e.items=!0,(0,pT.alwaysValidSchema)(e,n)||t.ok((0,mat.validateArray)(t))}};function Vge(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.schema,i=t.gen,o=t.data,s=t.keyword,a=t.it;(function u(d){var h=a.opts,f=a.errSchemaPath,p=e.length;if(h.strictTuples&&!(p===d.minItems&&(p===d.maxItems||!1===d[n]))){var g='"'.concat(s,'" is ').concat(p,"-tuple, but minItems or maxItems/").concat(n,' are not specified or different at path "').concat(f,'"');(0,pT.checkStrictMode)(a,g,h.strictTuples)}})(t.parentSchema),a.opts.unevaluated&&e.length&&!0!==a.items&&(a.items=pT.mergeEvaluated.items(i,e.length,a.items));var l=i.name("valid"),c=i.const("len",(0,Bge._)(sQ||(sQ=Ee(["",".length"])),o));e.forEach(function(d,h){(0,pT.alwaysValidSchema)(a,d)||(i.if((0,Bge._)(aQ||(aQ=Ee([""," > ",""])),c,h),function(){return t.subschema({keyword:s,schemaProp:h,dataProp:h},l)}),t.ok(l))})}f1.validateTuple=Vge,f1.default=gat,Object.defineProperty($R,"__esModule",{value:!0});var vat=f1,yat={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:function(t){return(0,vat.validateTuple)(t,"items")}};$R.default=yat;var BR={};Object.defineProperty(BR,"__esModule",{value:!0});var Hge=xr(),_at=Lr,bat=dd(),xat=h1,wat={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:function(t){var n=t.params.len;return(0,Hge.str)(lQ||(lQ=Ee(["must NOT have more than "," items"])),n)},params:function(t){var n=t.params.len;return(0,Hge._)(cQ||(cQ=Ee(["{limit: ","}"])),n)}},code:function(t){var n=t.schema,i=t.it,r=t.parentSchema.prefixItems;i.items=!0,(0,_at.alwaysValidSchema)(i,n)||(r?(0,xat.validateAdditionalItems)(t,r):t.ok((0,bat.validateArray)(t)))}};BR.default=wat;var VR={};Object.defineProperty(VR,"__esModule",{value:!0});var fu=xr(),mT=Lr,Cat={message:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,fu.str)(uQ||(uQ=Ee(["must contain at least "," valid item(s)"])),e):(0,fu.str)(dQ||(dQ=Ee(["must contain at least "," and no more than "," valid item(s)"])),e,i)},params:function(t){var n=t.params,e=n.min,i=n.max;return void 0===i?(0,fu._)(hQ||(hQ=Ee(["{minContains: ","}"])),e):(0,fu._)(fQ||(fQ=Ee(["{minContains: ",", maxContains: ","}"])),e,i)}},Sat={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Cat,code:function(t){var n,e,i=t.gen,r=t.schema,o=t.parentSchema,s=t.data,a=t.it,l=o.minContains;a.opts.next?(n=void 0===l?1:l,e=o.maxContains):n=1;var u=i.const("len",(0,fu._)(pQ||(pQ=Ee(["",".length"])),s));if(t.setParams({min:n,max:e}),void 0!==e||0!==n){if(void 0!==e&&n>e)return(0,mT.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void t.fail();if((0,mT.alwaysValidSchema)(a,r)){var d=(0,fu._)(mQ||(mQ=Ee([""," >= ",""])),u,n);return void 0!==e&&(d=(0,fu._)(gQ||(gQ=Ee([""," && "," <= ",""])),d,u,e)),void t.pass(d)}a.items=!0;var h=i.name("valid");void 0===e&&1===n?p(h,function(){return i.if(h,function(){return i.break()})}):0===n?(i.let(h,!0),void 0!==e&&i.if((0,fu._)(vQ||(vQ=Ee(["",".length > 0"])),s),f)):(i.let(h,!1),f()),t.result(h,function(){return t.reset()})}else(0,mT.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');function f(){var m=i.name("_valid"),g=i.let("count",0);p(m,function(){return i.if(m,function(){return v=g,i.code((0,fu._)(yQ||(yQ=Ee(["","++"])),v)),void(void 0===e?i.if((0,fu._)(_Q||(_Q=Ee([""," >= ",""])),v,n),function(){return i.assign(h,!0).break()}):(i.if((0,fu._)(bQ||(bQ=Ee([""," > ",""])),v,e),function(){return i.assign(h,!1).break()}),1===n?i.assign(h,!0):i.if((0,fu._)(xQ||(xQ=Ee([""," >= ",""])),v,n),function(){return i.assign(h,!0)})));var v})})}function p(m,g){i.forRange("i",0,u,function(v){t.subschema({keyword:"contains",dataProp:v,dataPropType:mT.Type.Num,compositeRule:!0},m),g()})}}};VR.default=Sat;var Uge={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var n=xr(),e=Lr,i=dd();t.error={message:function(a){var l=a.params,c=l.property,d=l.deps,h=1===l.depsCount?"property":"properties";return(0,n.str)(wQ||(wQ=Ee(["must have "," "," when property "," is present"])),h,d,c)},params:function(a){var l=a.params,c=l.property,u=l.depsCount,d=l.deps,h=l.missingProperty;return(0,n._)(CQ||(CQ=Ee(["{property: ",",\n missingProperty: ",",\n depsCount: ",",\n deps: ","}"])),c,h,u,d)}};var r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code:function(a){var l=zn(function(d){var h=d.schema,f={},p={};for(var m in h)"__proto__"!==m&&((Array.isArray(h[m])?f:p)[m]=h[m]);return[f,p]}(a),2),u=l[1];o(a,l[0]),s(a,u)}};function o(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.it;if(0!==Object.keys(l).length){var h=c.let("missing"),f=function(m){var g=l[m];if(0===g.length)return"continue";var v=(0,i.propertyInData)(c,u,m,d.opts.ownProperties);a.setParams({property:m,depsCount:g.length,deps:g.join(", ")}),d.allErrors?c.if(v,function(){var y,b=Re(g);try{for(b.s();!(y=b.n()).done;)(0,i.checkReportMissingProp)(a,y.value)}catch(k){b.e(k)}finally{b.f()}}):(c.if((0,n._)(SQ||(SQ=Ee([""," && (",")"])),v,(0,i.checkMissingProp)(a,g,h))),(0,i.reportMissingProp)(a,h),c.else())};for(var p in l)f(p)}}function s(a){var l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.schema,c=a.gen,u=a.data,d=a.keyword,h=a.it,f=c.name("valid"),p=function(g){if((0,e.alwaysValidSchema)(h,l[g]))return"continue";c.if((0,i.propertyInData)(c,u,g,h.opts.ownProperties),function(){var v=a.subschema({keyword:d,schemaProp:g},f);a.mergeValidEvaluated(v,f)},function(){return c.var(f,!0)}),a.ok(f)};for(var m in l)p(m)}t.validatePropertyDeps=o,t.validateSchemaDeps=s,t.default=r}(Uge);var HR={};Object.defineProperty(HR,"__esModule",{value:!0});var zge=xr(),kat=Lr,Dat={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:function(t){var n=t.params;return(0,zge._)(kQ||(kQ=Ee(["{propertyName: ","}"])),n.propertyName)}},code:function(t){var n=t.gen,i=t.data,r=t.it;if(!(0,kat.alwaysValidSchema)(r,t.schema)){var o=n.name("valid");n.forIn("key",i,function(s){t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},o),n.if((0,zge.not)(o),function(){t.error(!0),r.allErrors||n.break()})}),t.ok(o)}}};HR.default=Dat;var gT={};Object.defineProperty(gT,"__esModule",{value:!0});var vT=dd(),pd=xr(),Tat=Lp(),yT=Lr,Eat={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:function(t){var n=t.params;return(0,pd._)(DQ||(DQ=Ee(["{additionalProperty: ","}"])),n.additionalProperty)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.data,o=t.errsCount,s=t.it;if(!o)throw new Error("ajv implementation error");var a=s.allErrors,l=s.opts;if(s.props=!0,"all"===l.removeAdditional||!(0,yT.alwaysValidSchema)(s,e)){var c=(0,vT.allSchemaProperties)(i.properties),u=(0,vT.allSchemaProperties)(i.patternProperties);n.forIn("key",r,function(p){c.length||u.length?n.if(function(m){var g;if(c.length>8){var v=(0,yT.schemaRefOrVal)(s,i.properties,"properties");g=(0,vT.isOwnProperty)(n,v,m)}else g=c.length?pd.or.apply(void 0,ri(c.map(function(y){return(0,pd._)(EQ||(EQ=Ee([""," === ",""])),m,y)}))):pd.nil;return u.length&&(g=pd.or.apply(void 0,[g].concat(ri(u.map(function(y){return(0,pd._)(AQ||(AQ=Ee(["",".test(",")"])),(0,vT.usePattern)(t,y),m)}))))),(0,pd.not)(g)}(p),function(){return h(p)}):h(p)}),t.ok((0,pd._)(TQ||(TQ=Ee([""," === ",""])),o,Tat.default.errors))}function d(p){n.code((0,pd._)(MQ||(MQ=Ee(["delete ","[","]"])),r,p))}function h(p){if("all"===l.removeAdditional||l.removeAdditional&&!1===e)d(p);else{if(!1===e)return t.setParams({additionalProperty:p}),t.error(),void(a||n.break());if("object"==gn(e)&&!(0,yT.alwaysValidSchema)(s,e)){var m=n.name("valid");"failing"===l.removeAdditional?(f(p,m,!1),n.if((0,pd.not)(m),function(){t.reset(),d(p)})):(f(p,m),a||n.if((0,pd.not)(m),function(){return n.break()}))}}}function f(p,m,g){var v={keyword:"additionalProperties",dataProp:p,dataPropType:yT.Type.Str};!1===g&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,m)}}};gT.default=Eat;var UR={};Object.defineProperty(UR,"__esModule",{value:!0});var Aat=rT(),Gge=dd(),zR=Lr,Wge=gT,Mat={keyword:"properties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,r=t.data,o=t.it;"all"===o.opts.removeAdditional&&void 0===t.parentSchema.additionalProperties&&Wge.default.code(new Aat.KeywordCxt(o,Wge.default,"additionalProperties"));var s,a=(0,Gge.allSchemaProperties)(e),l=Re(a);try{for(l.s();!(s=l.n()).done;)o.definedProperties.add(s.value)}catch(v){l.e(v)}finally{l.f()}o.opts.unevaluated&&a.length&&!0!==o.props&&(o.props=zR.mergeEvaluated.props(n,(0,zR.toHash)(a),o.props));var v,u=a.filter(function(v){return!(0,zR.alwaysValidSchema)(o,e[v])});if(0!==u.length){var d,h=n.name("valid"),f=Re(u);try{for(f.s();!(d=f.n()).done;){var p=d.value;o.opts.useDefaults&&!o.compositeRule&&void 0!==e[v=p].default?g(p):(n.if((0,Gge.propertyInData)(n,r,p,o.opts.ownProperties)),g(p),o.allErrors||n.else().var(h,!0),n.endIf()),t.it.definedProperties.add(p),t.ok(h)}}catch(v){f.e(v)}finally{f.f()}}function g(v){t.subschema({keyword:"properties",schemaProp:v,dataProp:v},h)}}};UR.default=Mat;var GR={};Object.defineProperty(GR,"__esModule",{value:!0});var qge=dd(),_T=xr(),Yge=Lr,Xge=Lr,Oat={keyword:"patternProperties",type:"object",schemaType:"object",code:function(t){var n=t.gen,e=t.schema,i=t.data,r=t.parentSchema,o=t.it,s=o.opts,a=(0,qge.allSchemaProperties)(e),l=a.filter(function(p){return(0,Yge.alwaysValidSchema)(o,e[p])});if(0!==a.length&&(l.length!==a.length||o.opts.unevaluated&&!0!==o.props)){var c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,u=n.name("valid");!0===o.props||o.props instanceof _T.Name||(o.props=(0,Xge.evaluatedPropsToName)(n,o.props));var d=o.props;!function(){var p,m=Re(a);try{for(m.s();!(p=m.n()).done;){var g=p.value;c&&h(g),o.allErrors?f(g):(n.var(u,!0),f(g),n.if(u))}}catch(v){m.e(v)}finally{m.f()}}()}function h(p){for(var m in c)new RegExp(p).test(m)&&(0,Yge.checkStrictMode)(o,"property ".concat(m," matches pattern ").concat(p," (use allowMatchingProperties)"))}function f(p){n.forIn("key",i,function(m){n.if((0,_T._)(OQ||(OQ=Ee(["",".test(",")"])),(0,qge.usePattern)(t,p),m),function(){var g=l.includes(p);g||t.subschema({keyword:"patternProperties",schemaProp:p,dataProp:m,dataPropType:Xge.Type.Str},u),o.opts.unevaluated&&!0!==d?n.assign((0,_T._)(IQ||(IQ=Ee(["","[","]"])),d,m),!0):g||o.allErrors||n.if((0,_T.not)(u),function(){return n.break()})})})}}};GR.default=Oat;var WR={};Object.defineProperty(WR,"__esModule",{value:!0});var Iat=Lr,Nat={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code:function(t){var n=t.gen;if((0,Iat.alwaysValidSchema)(t.it,t.schema))t.fail();else{var r=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),t.failResult(r,function(){return t.reset()},function(){return t.error()})}},error:{message:"must NOT be valid"}};WR.default=Nat;var qR={};Object.defineProperty(qR,"__esModule",{value:!0});var Fat={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:dd().validateUnion,error:{message:"must match a schema in anyOf"}};qR.default=Fat;var YR={};Object.defineProperty(YR,"__esModule",{value:!0});var bT=xr(),Pat=Lr,jat={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:function(t){var n=t.params;return(0,bT._)(NQ||(NQ=Ee(["{passingSchemas: ","}"])),n.passing)}},code:function(t){var n=t.gen,e=t.schema,i=t.parentSchema,r=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");if(!r.opts.discriminator||!i.discriminator){var o=e,s=n.let("valid",!1),a=n.let("passing",null),l=n.name("_valid");t.setParams({passing:a}),n.block(function(){o.forEach(function(c,u){var d;(0,Pat.alwaysValidSchema)(r,c)?n.var(l,!0):d=t.subschema({keyword:"oneOf",schemaProp:u,compositeRule:!0},l),u>0&&n.if((0,bT._)(FQ||(FQ=Ee([""," && ",""])),l,s)).assign(s,!1).assign(a,(0,bT._)(PQ||(PQ=Ee(["[",", ","]"])),a,u)).else(),n.if(l,function(){n.assign(s,!0),n.assign(a,u),d&&t.mergeEvaluated(d,bT.Name)})})}),t.result(s,function(){return t.reset()},function(){return t.error(!0)})}}};YR.default=jat;var XR={};Object.defineProperty(XR,"__esModule",{value:!0});var Rat=Lr,Lat={keyword:"allOf",schemaType:"array",code:function(t){var n=t.gen,e=t.schema,i=t.it;if(!Array.isArray(e))throw new Error("ajv implementation error");var r=n.name("valid");e.forEach(function(o,s){if(!(0,Rat.alwaysValidSchema)(i,o)){var a=t.subschema({keyword:"allOf",schemaProp:s},r);t.ok(r),t.mergeEvaluated(a)}})}};XR.default=Lat;var JR={};Object.defineProperty(JR,"__esModule",{value:!0});var xT=xr(),Jge=Lr,$at={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:function(t){var n=t.params;return(0,xT.str)(jQ||(jQ=Ee(['must match "','" schema'])),n.ifClause)},params:function(t){var n=t.params;return(0,xT._)(RQ||(RQ=Ee(["{failingKeyword: ","}"])),n.ifClause)}},code:function(t){var n=t.gen,e=t.parentSchema,i=t.it;void 0===e.then&&void 0===e.else&&(0,Jge.checkStrictMode)(i,'"if" without "then" and "else" is ignored');var r=Kge(i,"then"),o=Kge(i,"else");if(r||o){var s,a=n.let("valid",!0),l=n.name("_valid");if(s=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.mergeEvaluated(s),t.reset(),r&&o){var c=n.let("ifClause");t.setParams({ifClause:c}),n.if(l,u("then",c),u("else",c))}else r?n.if(l,u("then")):n.if((0,xT.not)(l),u("else"));t.pass(a,function(){return t.error(!0)})}function u(d,h){return function(){var f=t.subschema({keyword:d},l);n.assign(a,l),t.mergeValidEvaluated(f,a),h?n.assign(h,(0,xT._)(LQ||(LQ=Ee(["",""])),d)):t.setParams({ifClause:d})}}}};function Kge(t,n){var e=t.schema[n];return void 0!==e&&!(0,Jge.alwaysValidSchema)(t,e)}JR.default=$at;var KR={};Object.defineProperty(KR,"__esModule",{value:!0});var Bat=Lr,Vat={keyword:["then","else"],schemaType:["object","boolean"],code:function(t){void 0===t.parentSchema.if&&(0,Bat.checkStrictMode)(t.it,'"'.concat(t.keyword,'" without "if" is ignored'))}};KR.default=Vat,Object.defineProperty(RR,"__esModule",{value:!0});var Hat=h1,Uat=$R,zat=f1,Gat=BR,Wat=VR,qat=Uge,Yat=HR,Xat=gT,Jat=UR,Kat=GR,Qat=WR,Zat=qR,elt=YR,tlt=XR,nlt=JR,ilt=KR;RR.default=function(){var n=[Qat.default,Zat.default,elt.default,tlt.default,nlt.default,ilt.default,Yat.default,Xat.default,qat.default,Jat.default,Kat.default];return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?n.push(Uat.default,Gat.default):n.push(Hat.default,zat.default),n.push(Wat.default),n};var QR={},ZR={};Object.defineProperty(ZR,"__esModule",{value:!0});var As=xr(),rlt={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:function(t){var n=t.schemaCode;return(0,As.str)($Q||($Q=Ee(['must match format "','"'])),n)},params:function(t){var n=t.schemaCode;return(0,As._)(BQ||(BQ=Ee(["{format: ","}"])),n)}},code:function(t,n){var g,v,h,f,p,m,e=t.gen,i=t.data,o=t.schema,s=t.schemaCode,a=t.it,l=a.opts,c=a.errSchemaPath,u=a.schemaEnv,d=a.self;l.validateFormats&&(t.$data?(h=e.scopeValue("formats",{ref:d.formats,code:l.code.formats}),f=e.const("fDef",(0,As._)(VQ||(VQ=Ee(["","[","]"])),h,s)),p=e.let("fType"),m=e.let("format"),e.if((0,As._)(HQ||(HQ=Ee(["typeof ",' == "object" && !('," instanceof RegExp)"])),f,f),function(){return e.assign(p,(0,As._)(UQ||(UQ=Ee(["",'.type || "string"'])),f)).assign(m,(0,As._)(zQ||(zQ=Ee(["",".validate"])),f))},function(){return e.assign(p,(0,As._)(GQ||(GQ=Ee(['"string"'])))).assign(m,f)}),t.fail$data((0,As.or)(!1===l.strictSchema?As.nil:(0,As._)(WQ||(WQ=Ee([""," && !",""])),s,m),(g=u.$async?(0,As._)(qQ||(qQ=Ee(["(",".async ? await ","(",") : ","(","))"])),f,m,i,m,i):(0,As._)(YQ||(YQ=Ee(["","(",")"])),m,i),v=(0,As._)(XQ||(XQ=Ee(["(typeof ",' == "function" ? '," : ",".test(","))"])),m,g,m,i),(0,As._)(JQ||(JQ=Ee([""," && "," !== true && "," === "," && !",""])),m,m,p,n,v))))):function(){var h=d.formats[o];if(h){if(!0!==h){var f=zn(function(v){var y=v instanceof RegExp?(0,As.regexpCode)(v):l.code.formats?(0,As._)(KQ||(KQ=Ee(["","",""])),l.code.formats,(0,As.getProperty)(o)):void 0,b=e.scopeValue("formats",{key:o,ref:v,code:y});return"object"!=gn(v)||v instanceof RegExp?["string",v,b]:[v.type||"string",v.validate,(0,As._)(QQ||(QQ=Ee(["",".validate"])),b)]}(h),3),m=f[1],g=f[2];f[0]===n&&t.pass(function(){if("object"==gn(h)&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,As._)(ZQ||(ZQ=Ee(["await ","(",")"])),g,i)}return(0,As._)("function"==typeof m?eZ||(eZ=Ee(["","(",")"])):tZ||(tZ=Ee(["",".test(",")"])),g,i)}())}}else!function(){if(!1!==l.strictSchema)throw new Error(v());function v(){return'unknown format "'.concat(o,'" ignored in schema at path "').concat(c,'"')}d.logger.warn(v())}()}())}};ZR.default=rlt,Object.defineProperty(QR,"__esModule",{value:!0}),QR.default=[ZR.default];var p1={};Object.defineProperty(p1,"__esModule",{value:!0}),p1.contentVocabulary=p1.metadataVocabulary=void 0,p1.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],p1.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(bR,"__esModule",{value:!0});var llt=QR,Qge=p1,clt=[xR.default,CR.default,(0,RR.default)(),llt.default,Qge.metadataVocabulary,Qge.contentVocabulary];bR.default=clt;var eL={},Zge={};(function(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(n=t.DiscrError||(t.DiscrError={})).Tag="tag",n.Mapping="mapping"})(Zge),Object.defineProperty(eL,"__esModule",{value:!0});var m1=xr(),tL=Zge,eve=Xl,ult=Lr,dlt={keyword:"discriminator",type:"object",schemaType:"object",error:{message:function(t){var n=t.params,i=n.tagName;return n.discrError===tL.DiscrError.Tag?'tag "'.concat(i,'" must be string'):'value of tag "'.concat(i,'" must be in oneOf')},params:function(t){var n=t.params,e=n.discrError,i=n.tag,r=n.tagName;return(0,m1._)(nZ||(nZ=Ee(["{error: ",", tag: ",", tagValue: ","}"])),e,r,i)}},code:function(t){var n=t.gen,e=t.data,i=t.schema,r=t.parentSchema,o=t.it,s=r.oneOf;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");var a=i.propertyName;if("string"!=typeof a)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");var l=n.let("valid",!1),c=n.const("tag",(0,m1._)(iZ||(iZ=Ee(["","",""])),e,(0,m1.getProperty)(a)));function u(d){var h=n.name("valid"),f=t.subschema({keyword:"oneOf",schemaProp:d},h);return t.mergeEvaluated(f,m1.Name),h}n.if((0,m1._)(rZ||(rZ=Ee(["typeof ",' == "string"'])),c),function(){return function(){var d=function(){for(var f,p={},m=C(r),g=!0,v=0;v",9:"Array"},u="UnquotedIdentifier",d="QuotedIdentifier",h="Rbracket",f="Rparen",p="Comma",m="Colon",g="Rbrace",v="Number",y="Current",b="Expref",C="Pipe",L="EQ",z="GT",R="LT",U="GTE",G="LTE",X="NE",te="Flatten",P="Star",W="Filter",J="Dot",le="Lbrace",E="Lbracket",I="Lparen",N="Literal",q={".":J,"*":P,",":p,":":m,"{":le,"}":g,"]":h,"(":I,")":f,"@":y},V={"<":!0,">":!0,"=":!0,"!":!0},re={" ":!0,"\t":!0,"\n":!0};function he(B){return B>="0"&&B<="9"||"-"===B}function Oe(){}Oe.prototype={tokenize:function(B){var ne,ie,Me,Ye,je=[];for(this._current=0;this._current="a"&&Ye<="z"||Ye>="A"&&Ye<="Z"||"_"===Ye)ne=this._current,ie=this._consumeUnquotedIdentifier(B),je.push({type:u,value:ie,start:ne});else if(void 0!==q[B[this._current]])je.push({type:q[B[this._current]],value:B[this._current],start:this._current}),this._current++;else if(he(B[this._current]))Me=this._consumeNumber(B),je.push(Me);else if("["===B[this._current])Me=this._consumeLBracket(B),je.push(Me);else if('"'===B[this._current])ne=this._current,ie=this._consumeQuotedIdentifier(B),je.push({type:d,value:ie,start:ne});else if("'"===B[this._current])ne=this._current,ie=this._consumeRawStringLiteral(B),je.push({type:N,value:ie,start:ne});else if("`"===B[this._current]){ne=this._current;var yt=this._consumeLiteral(B);je.push({type:N,value:yt,start:ne})}else if(void 0!==V[B[this._current]])je.push(this._consumeOperator(B));else if(void 0!==re[B[this._current]])this._current++;else if("&"===B[this._current])ne=this._current,this._current++,"&"===B[this._current]?(this._current++,je.push({type:"And",value:"&&",start:ne})):je.push({type:b,value:"&",start:ne});else{if("|"!==B[this._current]){var Tt=new Error("Unknown character:"+B[this._current]);throw Tt.name="LexerError",Tt}ne=this._current,this._current++,"|"===B[this._current]?(this._current++,je.push({type:"Or",value:"||",start:ne})):je.push({type:C,value:"|",start:ne})}return je},_consumeUnquotedIdentifier:function(B){var ne,ie=this._current;for(this._current++;this._current="a"&&ne<="z"||ne>="A"&&ne<="Z"||ne>="0"&&ne<="9"||"_"===ne);)this._current++;return B.slice(ie,this._current)},_consumeQuotedIdentifier:function(B){var ne=this._current;this._current++;for(var ie=B.length;'"'!==B[this._current]&&this._current"===ie?"="===B[this._current]?(this._current++,{type:U,value:">=",start:ne}):{type:z,value:">",start:ne}:"="===ie&&"="===B[this._current]?(this._current++,{type:L,value:"==",start:ne}):void 0},_consumeLiteral:function(B){this._current++;for(var ne,ie=this._current,Me=B.length;"`"!==B[this._current]&&this._current=0||["true","false","null"].indexOf(B)>=0)return!0;if(!("-0123456789".indexOf(B[0])>=0))return!1;try{return JSON.parse(B),!0}catch{return!1}}};var _e={};function Xe(){}function Le(B){this.runtime=B}function rt(B){this._interpreter=B,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[s]}]},avg:{_func:this._functionAvg,_signature:[{types:[8]}]},ceil:{_func:this._functionCeil,_signature:[{types:[s]}]},contains:{_func:this._functionContains,_signature:[{types:[a,3]},{types:[1]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[a]},{types:[a]}]},floor:{_func:this._functionFloor,_signature:[{types:[s]}]},length:{_func:this._functionLength,_signature:[{types:[a,3,4]}]},map:{_func:this._functionMap,_signature:[{types:[6]},{types:[3]}]},max:{_func:this._functionMax,_signature:[{types:[8,9]}]},merge:{_func:this._functionMerge,_signature:[{types:[4],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[3]},{types:[6]}]},sum:{_func:this._functionSum,_signature:[{types:[8]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[a]},{types:[a]}]},min:{_func:this._functionMin,_signature:[{types:[8,9]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[3]},{types:[6]}]},type:{_func:this._functionType,_signature:[{types:[1]}]},keys:{_func:this._functionKeys,_signature:[{types:[4]}]},values:{_func:this._functionValues,_signature:[{types:[4]}]},sort:{_func:this._functionSort,_signature:[{types:[9,8]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[3]},{types:[6]}]},join:{_func:this._functionJoin,_signature:[{types:[a]},{types:[9]}]},reverse:{_func:this._functionReverse,_signature:[{types:[a,3]}]},to_array:{_func:this._functionToArray,_signature:[{types:[1]}]},to_string:{_func:this._functionToString,_signature:[{types:[1]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[1]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[1],variadic:!0}]}}}_e.EOF=0,_e.UnquotedIdentifier=0,_e.QuotedIdentifier=0,_e.Rbracket=0,_e.Rparen=0,_e.Comma=0,_e.Rbrace=0,_e.Number=0,_e.Current=0,_e.Expref=0,_e.Pipe=1,_e.Or=2,_e.And=3,_e.EQ=5,_e.GT=5,_e.LT=5,_e.GTE=5,_e.LTE=5,_e.NE=5,_e.Flatten=9,_e.Star=20,_e.Filter=21,_e.Dot=40,_e.Not=45,_e.Lbrace=50,_e.Lbracket=55,_e.Lparen=60,Xe.prototype={parse:function(B){this._loadTokens(B),this.index=0;var ne=this.expression(0);if("EOF"!==this._lookahead(0)){var ie=this._lookaheadToken(0),Me=new Error("Unexpected token type: "+ie.type+", value: "+ie.value);throw Me.name="ParserError",Me}return ne},_loadTokens:function(B){var ne=(new Oe).tokenize(B);ne.push({type:"EOF",value:"",start:B.length}),this.tokens=ne},expression:function(B){var ne=this._lookaheadToken(0);this._advance();for(var ie=this.nud(ne),Me=this._lookahead(0);B<_e[Me];)this._advance(),ie=this.led(Me,ie),Me=this._lookahead(0);return ie},_lookahead:function(B){return this.tokens[this.index+B].type},_lookaheadToken:function(B){return this.tokens[this.index+B]},_advance:function(){this.index++},nud:function(B){var ne,ie;switch(B.type){case N:return{type:"Literal",value:B.value};case u:return{type:"Field",name:B.value};case d:var Me={type:"Field",name:B.value};if(this._lookahead(0)===I)throw new Error("Quoted identifier not allowed for function names.");return Me;case"Not":return{type:"NotExpression",children:[ne=this.expression(_e.Not)]};case P:return ne=null,{type:"ValueProjection",children:[{type:"Identity"},ne=this._lookahead(0)===h?{type:"Identity"}:this._parseProjectionRHS(_e.Star)]};case W:return this.led(B.type,{type:"Identity"});case le:return this._parseMultiselectHash();case te:return{type:"Projection",children:[{type:te,children:[{type:"Identity"}]},ne=this._parseProjectionRHS(_e.Flatten)]};case E:return this._lookahead(0)===v||this._lookahead(0)===m?(ne=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},ne)):this._lookahead(0)===P&&this._lookahead(1)===h?(this._advance(),this._advance(),{type:"Projection",children:[{type:"Identity"},ne=this._parseProjectionRHS(_e.Star)]}):this._parseMultiselectList();case y:return{type:y};case b:return{type:"ExpressionReference",children:[ie=this.expression(_e.Expref)]};case I:for(var Ye=[];this._lookahead(0)!==f;)this._lookahead(0)===y?(ie={type:y},this._advance()):ie=this.expression(0),Ye.push(ie);return this._match(f),Ye[0];default:this._errorToken(B)}},led:function(B,ne){var ie;switch(B){case J:var Me=_e.Dot;return this._lookahead(0)!==P?{type:"Subexpression",children:[ne,ie=this._parseDotRHS(Me)]}:(this._advance(),{type:"ValueProjection",children:[ne,ie=this._parseProjectionRHS(Me)]});case C:return ie=this.expression(_e.Pipe),{type:C,children:[ne,ie]};case"Or":return{type:"OrExpression",children:[ne,ie=this.expression(_e.Or)]};case"And":return{type:"AndExpression",children:[ne,ie=this.expression(_e.And)]};case I:for(var Ye,je=ne.name,yt=[];this._lookahead(0)!==f;)this._lookahead(0)===y?(Ye={type:y},this._advance()):Ye=this.expression(0),this._lookahead(0)===p&&this._match(p),yt.push(Ye);return this._match(f),{type:"Function",name:je,children:yt};case W:var Tt=this.expression(0);return this._match(h),{type:"FilterProjection",children:[ne,ie=this._lookahead(0)===te?{type:"Identity"}:this._parseProjectionRHS(_e.Filter),Tt]};case te:return{type:"Projection",children:[{type:te,children:[ne]},this._parseProjectionRHS(_e.Flatten)]};case L:case X:case z:case U:case R:case G:return this._parseComparator(ne,B);case E:var fn=this._lookaheadToken(0);return fn.type===v||fn.type===m?(ie=this._parseIndexExpression(),this._projectIfSlice(ne,ie)):(this._match(P),this._match(h),{type:"Projection",children:[ne,ie=this._parseProjectionRHS(_e.Star)]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(B){if(this._lookahead(0)!==B){var ne=this._lookaheadToken(0),ie=new Error("Expected "+B+", got: "+ne.type);throw ie.name="ParserError",ie}this._advance()},_errorToken:function(B){var ne=new Error("Invalid token ("+B.type+'): "'+B.value+'"');throw ne.name="ParserError",ne},_parseIndexExpression:function(){if(this._lookahead(0)===m||this._lookahead(1)===m)return this._parseSliceExpression();var B={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(h),B},_projectIfSlice:function(B,ne){var ie={type:"IndexExpression",children:[B,ne]};return"Slice"===ne.type?{type:"Projection",children:[ie,this._parseProjectionRHS(_e.Star)]}:ie},_parseSliceExpression:function(){for(var B=[null,null,null],ne=0,ie=this._lookahead(0);ie!==h&&ne<3;){if(ie===m)ne++,this._advance();else{if(ie!==v){var Me=this._lookahead(0),Ye=new Error("Syntax error, unexpected token: "+Me.value+"("+Me.type+")");throw Ye.name="Parsererror",Ye}B[ne]=this._lookaheadToken(0).value,this._advance()}ie=this._lookahead(0)}return this._match(h),{type:"Slice",children:B}},_parseComparator:function(B,ne){return{type:"Comparator",name:ne,children:[B,this.expression(_e[ne])]}},_parseDotRHS:function(B){var ne=this._lookahead(0);return[u,d,P].indexOf(ne)>=0?this.expression(B):ne===E?(this._match(E),this._parseMultiselectList()):ne===le?(this._match(le),this._parseMultiselectHash()):void 0},_parseProjectionRHS:function(B){var ne;if(_e[this._lookahead(0)]<10)ne={type:"Identity"};else if(this._lookahead(0)===E)ne=this.expression(B);else if(this._lookahead(0)===W)ne=this.expression(B);else{if(this._lookahead(0)!==J){var ie=this._lookaheadToken(0),Me=new Error("Sytanx error, unexpected token: "+ie.value+"("+ie.type+")");throw Me.name="ParserError",Me}this._match(J),ne=this._parseDotRHS(B)}return ne},_parseMultiselectList:function(){for(var B=[];this._lookahead(0)!==h;){var ne=this.expression(0);if(B.push(ne),this._lookahead(0)===p&&(this._match(p),this._lookahead(0)===h))throw new Error("Unexpected token Rbracket")}return this._match(h),{type:"MultiSelectList",children:B}},_parseMultiselectHash:function(){for(var B,ne,ie,Me=[],Ye=[u,d];;){if(B=this._lookaheadToken(0),Ye.indexOf(B.type)<0)throw new Error("Expecting an identifier token, got: "+B.type);if(ne=B.value,this._advance(),this._match(m),ie={type:"KeyValuePair",name:ne,value:this.expression(0)},Me.push(ie),this._lookahead(0)===p)this._match(p);else if(this._lookahead(0)===g){this._match(g);break}}return{type:"MultiSelectHash",children:Me}}},Le.prototype={search:function(B,ne){return this.visit(B,ne)},visit:function(B,ne){var ie,Me,Ye,je,yt,Tt,fn,Hn,Zt;switch(B.type){case"Field":return null!==ne&&e(ne)?void 0===(Tt=ne[B.name])?null:Tt:null;case"Subexpression":for(Ye=this.visit(B.children[0],ne),Zt=1;Zt0)for(Zt=wr;Ztor;Zt+=mr)Ye.push(ne[Zt]);return Ye;case"Projection":var gi=this.visit(B.children[0],ne);if(!n(gi))return null;for(Hn=[],Zt=0;Ztyt;break;case U:Ye=je>=yt;break;case R:Ye=je=B&&(ne=ie<0?B-1:B),ne}},rt.prototype={callFunction:function(B,ne){var ie=this.functionTable[B];if(void 0===ie)throw new Error("Unknown function: "+B+"()");return this._validateArgs(B,ne,ie._signature),ie._func.call(this,ne)},_validateArgs:function(B,ne,ie){var Me,Ye,je,yt;if(ie[ie.length-1].variadic){if(ne.length=0;Me--)ie+=ne[Me];return ie}var Ye=B[0].slice(0);return Ye.reverse(),Ye},_functionAbs:function(B){return Math.abs(B[0])},_functionCeil:function(B){return Math.ceil(B[0])},_functionAvg:function(B){for(var ne=0,ie=B[0],Me=0;Me=0},_functionFloor:function(B){return Math.floor(B[0])},_functionLength:function(B){return e(B[0])?Object.keys(B[0]).length:B[0].length},_functionMap:function(B){for(var ne=[],ie=this._interpreter,Me=B[0],Ye=B[1],je=0;je0){if(this._getTypeName(B[0][0])===s)return Math.max.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Me=1;Me0){if(this._getTypeName(B[0][0])===s)return Math.min.apply(Math,B[0]);for(var ne=B[0],ie=ne[0],Me=1;Meln?1:Eiyt&&(yt=ie,ne=Ye[Tt]);return ne},_functionMinBy:function(B){for(var ne,ie,Ye=B[0],je=this.createKeyFunction(B[1],[s,a]),yt=1/0,Tt=0;Tt1&&void 0!==arguments[1]?arguments[1]:1;return(n>0?t.toFixed(n).replace(/0+$/,"").replace(/\.$/,""):t.toString())||"0"}var glt=function(){function t(n,e,i,r){nL(this,t);var o=this;if(void 0!==n)if(Array.isArray(n))this.rgba=n;else if(void 0===i){var s=n&&""+n;s&&function(a){if(a.startsWith("hsl")){var l=a.match(/([\-\d\.e]+)/g).map(Number),c=wT(l,4),u=c[0],d=c[1],h=c[2],f=c[3];void 0===f&&(f=1),o.hsla=[u/=360,d/=100,h/=100,f]}else if(a.startsWith("rgb")){var p=a.match(/([\-\d\.e]+)/g).map(Number),m=wT(p,4),b=m[3];void 0===b&&(b=1),o.rgba=[m[0],m[1],m[2],b]}else o.rgba=a.startsWith("#")?t.hexToRgb(a):t.nameToRgb(a)||t.hexToRgb(a)}(s.toLowerCase())}else this.rgba=[n,e,i,void 0===r?1:r]}return iL(t,[{key:"printRGB",value:function(n){var e=(n?this.rgba:this.rgba.slice(0,3)).map(function(i,r){return ive(i,3===r?3:0)});return n?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(n){var e=[360,100,100,1],i=["","%","%",""],r=(n?this.hsla:this.hsla.slice(0,3)).map(function(o,s){return ive(o*e[s],3===s?3:1)+i[s]});return n?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(n){var e=this.hex;return n?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){3===n.length&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){3===n.length&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba.map(function(e,i){return i<3?e.toString(16):Math.round(255*e).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var e=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(r){return parseInt(r,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var e=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=mlt[e];return void 0===i?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var e=wT(n,4),i=e[0],r=e[1],o=e[2],s=e[3];i/=255,r/=255,o/=255;var a=Math.max(i,r,o),l=Math.min(i,r,o),c=void 0,u=void 0,d=(a+l)/2;if(a===l)c=u=0;else{var h=a-l;switch(u=d>.5?h/(2-a-l):h/(a+l),a){case i:c=(r-o)/h+(r1&&(g-=1),g<.16666666666666666?p+6*(m-p)*g:g<.5?m:g<.6666666666666666?p+(m-p)*(.6666666666666666-g)*6:p},d=o<.5?o*(1+r):o+r-o*r,h=2*o-d;a=u(h,d,i+1/3),l=u(h,d,i),c=u(h,d,i-1/3)}var f=[255*a,255*l,255*c].map(Math.round);return f[3]=s,f}}]),t}(),vlt=function(){function t(){nL(this,t),this._events=[]}return iL(t,[{key:"add",value:function(n,e,i){n.addEventListener(e,i,!1),this._events.push({target:n,type:e,handler:i})}},{key:"remove",value:function(n,e,i){this._events=this._events.filter(function(r){var o=!0;return n&&n!==r.target&&(o=!1),e&&e!==r.type&&(o=!1),i&&i!==r.handler&&(o=!1),o&&t._doRemove(r.target,r.type,r.handler),!o})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,e,i){n.removeEventListener(e,i,!1)}}]),t}();function rL(t,n,e){var i=!1;function r(l,c,u){return Math.max(c,Math.min(l,u))}function o(l,c,u){if(u&&(i=!0),i){l.preventDefault();var d=n.getBoundingClientRect(),h=d.width,f=d.height,m=c.clientY,g=r(c.clientX-d.left,0,h),v=r(m-d.top,0,f);e(g/h,v/f)}}function s(l,c){1===(void 0===l.buttons?l.which:l.buttons)?o(l,l,c):i=!1}function a(l,c){1===l.touches.length?o(l,l.touches[0],c):i=!1}t.add(n,"mousedown",function(l){s(l,!0)}),t.add(n,"touchstart",function(l){a(l,!0)}),t.add(window,"mousemove",s),t.add(n,"touchmove",a),t.add(window,"mouseup",function(l){i=!1}),t.add(n,"touchend",function(l){i=!1}),t.add(n,"touchcancel",function(l){i=!1})}function Ch(t,n){return(n||document).querySelector(t)}function rve(t){t.preventDefault(),t.stopPropagation()}function oL(t,n,e,i,r){t.add(n,"keydown",function(o){e.indexOf(o.key)>=0&&(r&&rve(o),i(o))})}var ove=function(){function t(n){nL(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new vlt,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(n)}return iL(t,[{key:"setOptions",value:function(n){var e=this;if(n){var i=this.settings;if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),function(a,l,c){for(var u in a)l[u]=a[u]}(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var r=n.color||n.colour;r&&this._setColor(r)}var o=i.parent;if(o&&i.popup&&!this._popupInited){var s=function(a){return e.openHandler(a)};this._events.add(o,"click",s),oL(this._events,o,[" ","Spacebar","Enter"],s),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=n&&"keydown"===n.type?this._domEdit:this.domElement;setTimeout(function(){return e.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var e=n&&n.type,i=!1;n?"mousedown"===e||"focusin"===e?n.timeStamp>(this.__containedEvent||0)+100&&(i=!0):(rve(n),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="","mousedown"!==e&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,e){this.closeHandler(),this.setOptions(n),e&&this.openHandler()}},{key:"setColor",value:function(n,e){this._setColor(n,{silent:e})}},{key:"_setColor",value:function(n,e){if("string"==typeof n&&(n=n.trim()),n){e=e||{};var i=void 0;try{i=new glt(n)}catch(o){if(e.failSilently)return;throw o}if(!this.settings.alpha){var r=i.hsla;r[3]=1,i.hsla=r}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(n,e){this.setColor(n,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var n=this._toggleDOM(!0);return this._setPosition(),n}var e,i,o=(e=this.settings.template||'
    ',(i=document.createElement("div")).innerHTML=e,i.firstElementChild);return this.domElement=o,this._domH=Ch(".picker_hue",o),this._domSL=Ch(".picker_sl",o),this._domA=Ch(".picker_alpha",o),this._domEdit=Ch(".picker_editor input",o),this._domSample=Ch(".picker_sample",o),this._domOkay=Ch(".picker_done button",o),this._domCancel=Ch(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,e=this,i=this.domElement,r=this._events;function o(l,c,u){r.add(l,c,u)}o(i,"click",function(l){return l.preventDefault()}),rL(r,this._domH,function(l,c){return e._setHSLA(l)}),rL(r,this._domSL,function(l,c){return e._setHSLA(null,l,1-c)}),this.settings.alpha&&rL(r,this._domA,function(l,c){return e._setHSLA(null,null,null,1-c)});var s=this._domEdit;o(s,"input",function(l){e._setColor(this.value,{fromEditor:!0,failSilently:!0})}),o(s,"focus",function(l){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var l=function(u){return n.closeHandler(u)};o(window,"mousedown",l),o(window,"focusin",l),oL(r,i,["Esc","Escape"],l);var c=function(u){n.__containedEvent=u.timeStamp};o(i,"mousedown",c),o(i,"focusin",c),o(n._domCancel,"click",l)});var a=function(l){n._ifPopup(function(){return n.closeHandler(l)}),n.onDone&&n.onDone(n.colour)};o(this._domOkay,"click",a),oL(r,i,["Enter"],a)}},{key:"_setPosition",value:function(){var n=this.settings.parent,e=this.domElement;n!==e.parentNode&&n.appendChild(e),this._ifPopup(function(i){"static"===getComputedStyle(n).position&&(n.style.position="relative");var r=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(o){o===r?e.classList.add(o):e.classList.remove(o)}),e.classList.add(r)})}},{key:"_setHSLA",value:function(n,e,i,r,o){o=o||{};var s=this.colour,a=s.hsla;[n,e,i,r].forEach(function(l,c){(l||0===l)&&(a[c]=l)}),s.hsla=a,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(this.domElement){n=n||{};var e=this.colour,i=e.hsla,r="hsl("+360*i[0]+", 100%, 50%)",o=e.hslString,s=e.hslaString,l=this._domSL,c=this._domA,u=Ch(".picker_selector",this._domH),d=Ch(".picker_selector",l),h=Ch(".picker_selector",c);b(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,b(0,d,i[1]),C(0,d,1-i[2]),l.style.color=o,C(0,h,1-i[3]);var f=o,p=f.replace("hsl","hsla").replace(")",", 0)");if(this._domA.style.background="linear-gradient("+[f,p]+"), linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!n.fromEditor){var v=this.settings.alpha,y=void 0;switch(this.settings.editorFormat){case"rgb":y=e.printRGB(v);break;case"hsl":y=e.printHSL(v);break;default:y=e.printHex(v)}this._domEdit.value=y}this._domSample.style.color=s}function b(k,D,L){D.style.left=100*L+"%"}function C(k,D,L){D.style.top=100*L+"%"}}},{key:"_ifPopup",value:function(n,e){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(n){var e=this.domElement;if(!e)return!1;var i=n?"":"none",r=e.style.display!==i;return r&&(e.style.display=i),r}}]),t}(),sL=document.createElement("style");sL.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(sL),ove.StyleElement=sL;var ylt=Object.freeze({__proto__:null,default:ove});const _lt=["editor"];function blt(t,n){if(1&t&&(_(0,"ngb-alert",38),pe(1,"img",39),_(2,"h6",40),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while modifying storage object: ",e.error,"")}}function xlt(t,n){1&t&&(_(0,"ngb-alert",41),pe(1,"img",42),_(2,"h6",40),O(3,"Storage object was modified successfully."),x()()),2&t&&S("dismissible",!1)}function wlt(t,n){1&t&&(_(0,"span"),O(1,"Save as a copy"),x())}function Clt(t,n){1&t&&O(0,"Save")}function Slt(t,n){if(1&t&&(_(0,"button",43),Z(1,wlt,2,0,"span",44),Z(2,Clt,1,0,"ng-template",null,45,cs),x()),2&t){const e=Ta(3),i=$();S("disabled",i.updating),w(1),S("ngIf",i.object.collection!==i.f.collection.value||i.object.key!==i.f.keyname.value||i.object.user_id!==i.f.user_id.value)("ngIfElse",e)}}const aL=function(){return["/storage"]},klt=function(t){return{collection:t}},Dlt=function(t,n){return{collection:t,key:n}},Tlt=function(t,n,e){return{collection:t,key:n,user_id:e}},lL=function(t){return{"is-invalid":t}},ux=function(t){return{active:t}};let Elt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;editor;jsonEditor;error="";object;objectForm;updating=!1;updated=!1;ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Co.required],keyname:["",Co.required],user_id:["",Co.required],permission_read:[{value:0,disabled:!1},Co.required],permission_write:[{value:0,disabled:!1},Co.required]}),this.route.data.subscribe(e=>{this.object=e[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},e=>{this.error=e})}constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.object.value}}})}updateObject(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(o){return this.error=o,void(this.updating=!1)}let i=this.object.version;(this.object.collection!==this.f.collection.value||this.object.key!==this.f.keyname.value||this.object.user_id!==this.f.user_id.value)&&(i=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:i,value:e,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(o=>{this.updated=!0,this.updating=!1,this.object.version=o.version,""===i&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},o=>{this.error=o,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const e=this.object;this.consoleService.deleteStorageObject("",e.collection,e.key,e.user_id,e.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(_lt,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:88,vars:60,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["id","permission_read","name","permission_read",1,"btn-group","btn-group-toggle"],[1,"btn","btn-outline-secondary",3,"ngClass"],["formControlName","permission_read","type","radio",3,"value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["id","permission_write","name","permission_write",1,"btn-group","btn-group-toggle"],["formControlName","permission_write","type","radio",3,"value"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3","jsoneditor",2,"height","518px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Storage Object"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4),O(6,"Storage"),x(),_(7,"li",4)(8,"a",5),O(9),x()(),_(10,"li",4)(11,"a",5),O(12),x()(),_(13,"li",4)(14,"a",5),O(15),x()()()()(),Z(16,blt,4,2,"ngb-alert",6),Z(17,xlt,4,1,"ngb-alert",7),_(18,"form",8),ye("ngSubmit",function(){return r.updateObject()}),_(19,"div",9)(20,"div",10)(21,"div",11)(22,"label",12),O(23,"Collection"),x()(),pe(24,"input",13),_(25,"div",14),O(26,"Collection is required"),x()(),_(27,"div",10)(28,"div",11)(29,"label",15),O(30,"Key"),x()(),pe(31,"input",16),_(32,"div",14),O(33,"Key is required"),x()()(),_(34,"div",9)(35,"div",10)(36,"div",11)(37,"label",17),O(38,"User ID"),x()(),pe(39,"input",18),_(40,"div",14),O(41,"User ID is required"),x()(),_(42,"div",19)(43,"div",11)(44,"label",20),O(45,"Read Permission"),x()(),_(46,"div",21)(47,"label",22),pe(48,"input",23),O(49," No Read "),x(),_(50,"label",22),pe(51,"input",23),O(52," Owner Read "),x(),_(53,"label",22),pe(54,"input",23),O(55," Public Read "),x()()()(),_(56,"div",9)(57,"div",10)(58,"div",11)(59,"label",24),O(60,"Version"),x()(),pe(61,"input",25),x(),_(62,"div",19)(63,"div",11)(64,"label",26),O(65,"Write Permission"),x()(),_(66,"div",27)(67,"label",22),pe(68,"input",28),O(69," No Write "),x(),_(70,"label",22),pe(71,"input",28),O(72," Owner Write "),x()()()(),_(73,"div",29)(74,"div",10)(75,"div",11)(76,"label",30),O(77,"Create Time"),x()(),pe(78,"input",31),x(),_(79,"div",10)(80,"div",11)(81,"label",32),O(82,"Update Time"),x()(),pe(83,"input",33),x()(),_(84,"div",34),pe(85,"div",35,36),x(),Z(87,Slt,4,3,"button",37),x()),2&i&&(w(8),S("routerLink",ml(32,aL))("queryParams",sr(33,klt,r.object.collection)),w(1),bt(r.object.collection),w(2),S("routerLink",ml(35,aL))("queryParams",Mr(36,Dlt,r.object.collection,r.object.key)),w(1),bt(r.object.key),w(2),S("routerLink",ml(39,aL))("queryParams",ty(40,Tlt,r.object.collection,r.object.key,r.object.user_id)),w(1),bt(r.object.user_id),w(1),S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.objectForm),w(6),S("ngClass",sr(44,lL,r.f.collection.dirty&&r.f.collection.errors)),w(1),S("hidden",r.f.collection.disabled||r.f.collection.valid||r.f.collection.pristine),w(6),S("ngClass",sr(46,lL,r.f.keyname.dirty&&r.f.keyname.errors)),w(1),S("hidden",r.f.keyname.disabled||r.f.keyname.valid||r.f.keyname.pristine),w(7),S("ngClass",sr(48,lL,r.f.user_id.dirty&&r.f.user_id.errors)),w(1),S("hidden",r.f.user_id.disabled||r.f.user_id.valid||r.f.user_id.pristine),w(7),S("ngClass",sr(50,ux,0==r.f.permission_read.value)),w(1),S("value",0),w(2),S("ngClass",sr(52,ux,1==r.f.permission_read.value)),w(1),S("value",1),w(2),S("ngClass",sr(54,ux,2==r.f.permission_read.value)),w(1),S("value",2),w(7),S("value",r.object.version),w(6),S("ngClass",sr(56,ux,0==r.f.permission_write.value)),w(1),S("value",0),w(2),S("ngClass",sr(58,ux,1==r.f.permission_write.value)),w(1),S("value",1),w(7),S("value",r.object.create_time),w(5),S("value",r.object.update_time),w(4),S("ngIf",r.updateAllowed()))},dependencies:[Ou,nm,vn,po,fa,Qs,j3,da,ha,Hf,js,Zs],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),Alt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("collection"),o=e.paramMap.get("key"),s=e.paramMap.get("user_id");return this.consoleService.getStorage("",r,o,s)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Mlt(t,n){if(1&t&&(_(0,"ngb-alert",18),pe(1,"img",19),_(2,"h6",20),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while processing request: ",e.error,"")}}function Olt(t,n){1&t&&(_(0,"th",21),O(1,"Remove"),x())}function Ilt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"Yes"),x()}}function Nlt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"No"),x()}}function Flt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"Yes"),x()}}function Plt(t,n){if(1&t){const e=vt();_(0,"td",25),ye("click",function(){Be(e);const r=$().$implicit;return Ve($().viewLeaderboardEntries(r))}),O(1,"No"),x()}}function jlt(t,n){if(1&t){const e=vt();_(0,"td",26)(1,"button",27),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteLeaderboard(r,s,a))}),O(2,"Delete"),x()()}}function Rlt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(2),x(),_(3,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(4),x(),_(5,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(6),x(),_(7,"td",22),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewLeaderboardEntries(o))}),O(8),x(),Z(9,Ilt,2,0,"td",23),Z(10,Nlt,2,0,"td",23),Z(11,Flt,2,0,"td",23),Z(12,Plt,2,0,"td",23),Z(13,jlt,3,0,"td",24),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.id),w(2),bt(i.orderString[e.sort_order]),w(2),bt(i.operatorString[e.operator]),w(2),bt(""===e.reset_schedule?"-":e.reset_schedule),w(1),S("ngIf",e.authoritative),w(1),S("ngIf",!e.authoritative),w(1),S("ngIf",e.tournament),w(1),S("ngIf",!e.tournament),w(1),S("ngIf",i.deleteAllowed())}}function Llt(t,n){1&t&&(_(0,"tr")(1,"td",28),O(2,"No leaderboards were found."),x()())}let $lt=(()=>{class t{route;router;authService;consoleService;deleteConfirmService;error="";leaderboards=[];nextCursor="";leaderboardsCount=0;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};constructor(e,i,r,o,s){this.route=e,this.router=i,this.authService=r,this.consoleService=o,this.deleteConfirmService=s}ngOnInit(){this.nextCursor=this.route.snapshot.queryParamMap.get("cursor"),this.search(this.nextCursor&&""!==this.nextCursor?1:0)}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}deleteLeaderboard(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",r.id).subscribe(()=>{this.error="",this.leaderboards.splice(i,1),this.leaderboardsCount--},o=>{this.error=o})})}viewLeaderboardEntries(e){this.router.navigate(["/leaderboards",e.id],{relativeTo:this.route})}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboards("",i).subscribe(r=>{this.error="",this.leaderboards.length=0,this.leaderboards.push(...r.leaderboards),this.leaderboardsCount=r.total,this.nextCursor=r.cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(zo),de(bi),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:33,vars:7,consts:[[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"pb-1"],[1,"pb-4"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(_(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),O(4,"Leaderboards"),x(),_(5,"h6",4),O(6),x()(),_(7,"div",5)(8,"div",6)(9,"button",7),ye("click",function(){return r.search(0)}),pe(10,"img",8),x(),_(11,"button",7),ye("click",function(){return r.search(1)}),pe(12,"img",9),x()()()()(),Z(13,Mlt,4,2,"ngb-alert",10),_(14,"table",11)(15,"thead",12)(16,"tr")(17,"th"),O(18,"Leaderboard ID"),x(),_(19,"th",13),O(20,"Sort Order"),x(),_(21,"th",13),O(22,"Operator"),x(),_(23,"th",13),O(24,"Reset Schedule"),x(),_(25,"th",14),O(26,"Authoritative"),x(),_(27,"th",14),O(28,"Tournament"),x(),Z(29,Olt,2,0,"th",15),x()(),_(30,"tbody"),Z(31,Rlt,14,9,"tr",16),Z(32,Llt,3,0,"tr",17),x()()),2&i&&(w(6),mn("",r.leaderboardsCount," leaderboards found."),w(3),S("disabled",0===r.leaderboards.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(16),S("ngIf",r.deleteAllowed()),w(2),S("ngForOf",r.leaderboards),w(1),S("ngIf",0===r.leaderboards.length))},dependencies:[Ln,vn,po],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Blt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listLeaderboards("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Vlt(t,n){if(1&t&&(_(0,"ngb-alert",31),pe(1,"img",32),_(2,"h6",33),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying accounts: ",e.error,"")}}function Hlt(t,n){if(1&t){const e=vt();_(0,"ngb-alert",31),pe(1,"img",32),_(2,"h6",33),O(3,"Query ongoing..."),x(),_(4,"button",34),ye("click",function(){return Be(e),Ve($().cancelQuery())}),O(5,"Cancel!"),x()()}2&t&&S("dismissible",!1)}function Ult(t,n){1&t&&(_(0,"th",35),O(1,"Remove"),x())}function zlt(t,n){1&t&&(_(0,"tr")(1,"td",36),O(2,"No users found - change the filter criteria or add new user accounts."),x()())}function Glt(t,n){1&t&&pe(0,"td")}function Wlt(t,n){if(1&t){const e=vt();_(0,"td",39)(1,"button",40),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteAccount(r,s,a))}),O(2,"Delete"),x()()}}function qlt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(2),x(),_(3,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(6),x(),_(7,"td",37),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(8),x(),Z(9,Glt,1,0,"td",29),Z(10,Wlt,3,0,"td",38),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.id),w(2),bt(e.username),w(2),bt(e.display_name),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let Ylt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";accountsCount=0;accounts=[];nextCursor="";prevCursor="";searchForm;querySubject;ongoingQuery=!1;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.querySubject=new dr,this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.f.filter_type.setValue(+e.get("filter_type")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(i=>{this.accounts.length=0,i&&(this.accounts.push(...i[0].users),this.accountsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}ngOnDestroy(){this.querySubject.next(),this.querySubject.complete()}search(e){this.ongoingQuery&&this.querySubject.next(),this.ongoingQuery=!0;let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,i).pipe(Ko(this.querySubject)).subscribe(o=>{this.error="",this.accounts.length=0,this.accounts.push(...o.users),this.accountsCount=o.total_count,this.nextCursor=o.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:i},queryParamsHandling:"merge"}),this.ongoingQuery=!1},o=>{this.error=o,this.ongoingQuery=!1})}cancelQuery(){this.querySubject.next(),this.ongoingQuery=!1}deleteAccount(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteAccount("",r.id,!1).subscribe(()=>{this.error="",this.accounts.splice(i,1),this.accountsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:46,vars:10,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID, social provider ID, device ID, or username (use '%' for prefix or suffix wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button",1,"btn","btn-danger",3,"click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Accounts"),x(),_(2,"h6",1),O(3),x(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return r.search(0)}),_(8,"div",6),pe(9,"input",7),_(10,"div",8)(11,"span",9),ye("click",function(){return r.f.filter.setValue(r.systemUserId)}),pe(12,"img",10),x()(),_(13,"div",8)(14,"div",11)(15,"button",12),ye("click",function(){return r.f.filter_type.setValue(0),r.search(0)}),O(16,"Search"),x(),_(17,"div",13),pe(18,"button",14),_(19,"div",15)(20,"button",16),ye("click",function(){return r.f.filter_type.setValue(1),r.search(0)}),O(21,"Tombstones"),x()()()()()()()(),_(22,"div",17)(23,"div",18)(24,"button",19),ye("click",function(){return r.search(0)}),pe(25,"img",20),x(),_(26,"button",19),ye("click",function(){return r.search(1)}),pe(27,"img",21),x()()()()(),Z(28,Vlt,4,2,"ngb-alert",22),Z(29,Hlt,6,1,"ngb-alert",22),_(30,"div",23)(31,"table",24)(32,"thead",25)(33,"tr")(34,"th",26),O(35,"User ID"),x(),_(36,"th"),O(37,"Username"),x(),_(38,"th"),O(39,"Display Name"),x(),_(40,"th",27),O(41,"Last Update"),x(),Z(42,Ult,2,0,"th",28),x()(),_(43,"tbody"),Z(44,zlt,3,0,"tr",29),Z(45,qlt,11,6,"tr",30),x()()()),2&i&&(w(3),mn("",r.accountsCount," accounts found."),w(4),S("formGroup",r.searchForm),w(11),S("disabled",!r.f.filter.value||""===r.f.filter.value),w(6),S("disabled",0===r.accounts.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(1),S("ngIf",r.ongoingQuery),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.accounts.length),w(1),S("ngForOf",r.accounts))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),Xlt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter"),o=e.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",r,"true"===o,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Jlt(t,n){if(1&t){const e=vt();_(0,"button",15),ye("click",function(r){return Be(e),Ve($().exportAccount(r))}),pe(1,"img",16),O(2,"Export"),x()}}function Klt(t,n){1&t&&(_(0,"span"),O(1,"Unban"),x())}function Qlt(t,n){1&t&&(_(0,"span"),O(1,"Ban"),x())}function Zlt(t,n){if(1&t){const e=vt();_(0,"button",15),ye("click",function(r){return Be(e),Ve($().banUnbanAccount(r))}),pe(1,"img",17),Z(2,Klt,2,0,"span",18),Z(3,Qlt,2,0,"span",18),x()}if(2&t){const e=$();w(2),S("ngIf",e.account.disable_time),w(1),S("ngIf",!e.account.disable_time)}}function ect(t,n){if(1&t){const e=vt();_(0,"button",19),ye("click",function(r){return Be(e),Ve($().deleteAccount(r,!1))}),pe(1,"img",20),O(2,"Delete"),x()}}function tct(t,n){if(1&t){const e=vt();_(0,"button",19),ye("click",function(r){return Be(e),Ve($().deleteAccount(r,!0))}),pe(1,"img",21),O(2,"Recorded delete"),x()}}function nct(t,n){if(1&t&&(_(0,"ngb-alert",22),pe(1,"img",23),_(2,"h6",24),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}const ict=function(t,n){return["/accounts",t,n]};function rct(t,n){if(1&t&&(_(0,"div"),sc(1,25),_(2,"a",26),O(3),x(),ac(),x()),2&t){const e=n.$implicit,i=$();w(1),S("ngbNavItem",e.path),w(1),S("routerLink",Mr(3,ict,i.account.user.id,e.path)),w(1),bt(e.label)}}const oct=function(){return["/accounts"]},sct=function(){return["/storage"]},act=function(t){return{user_id:t}};let lct=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;account;error="";views=[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"},{label:"Subscriptions",path:"subscriptions"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAccount(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,i).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},r=>{this.error=r})})}banUnbanAccount(e){e.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),e.target.disabled=!1},i=>{this.error=i,e.target.disabled=!1})}exportAccount(e){e.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(i=>{this.error="";const r=this.account.user.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,qI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Account"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),O(7,"Account"),x()(),_(8,"li",6),O(9),x()()(),_(10,"div"),Z(11,Jlt,3,0,"button",7),Z(12,Zlt,4,2,"button",7),Z(13,ect,3,0,"button",8),Z(14,tct,3,0,"button",8),x()(),Z(15,nct,4,2,"ngb-alert",9),_(16,"nav",10,11),Z(18,rct,4,6,"div",12),_(19,"div"),sc(20,13),_(21,"a",14),O(22," Storage "),x(),ac(),x()(),pe(23,"router-outlet")),2&i&&(w(6),S("routerLink",ml(10,oct)),w(3),bt(r.account.user.id),w(2),S("ngIf",r.exportAllowed()),w(1),S("ngIf",r.banAllowed()),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.error),w(3),S("ngForOf",r.views),w(3),S("routerLink",ml(11,sct))("queryParams",sr(12,act,r.account.user.id)))},dependencies:[cm,Ou,Ny,Ln,vn,po,zd,Yh,r_,Yf],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),cct=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getAccount("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const uct=["editor"];function dct(t,n){if(1&t&&(_(0,"ngb-alert",29),pe(1,"img",30),_(2,"h6",31),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function hct(t,n){1&t&&(_(0,"ngb-alert",32),pe(1,"img",33),_(2,"h6",31),O(3,"Account was modified successfully."),x()()),2&t&&S("dismissible",!1)}function fct(t,n){1&t&&(_(0,"button",34),O(1,"Save"),x()),2&t&&S("disabled",$().updating)}const pct=function(t){return{"is-invalid":t}};let mct=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Co.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.account.user.metadata}}})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(uct,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(Z(0,dct,4,2,"ngb-alert",0),Z(1,hct,4,1,"ngb-alert",1),_(2,"form",2),ye("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),O(7,"User ID"),x()(),pe(8,"input",7),x(),_(9,"div",4)(10,"div",5)(11,"label",8),O(12,"Username"),x()(),pe(13,"input",9),_(14,"div",10),O(15,"Username is required"),x()()(),_(16,"div",3)(17,"div",4)(18,"div",5)(19,"label",11),O(20,"Display Name"),x()(),pe(21,"input",12),x(),_(22,"div",13)(23,"div",5)(24,"label",14),O(25,"Avatar URL"),x()(),pe(26,"input",15),x()(),_(27,"div",3)(28,"div",4)(29,"div",5)(30,"label",16),O(31,"Location"),x()(),pe(32,"input",17),x(),_(33,"div",13)(34,"div",5)(35,"label",18),O(36,"Timezone"),x()(),pe(37,"input",19),x()(),_(38,"div",20)(39,"div",4)(40,"div",5)(41,"label",21),O(42,"Create Time"),x()(),pe(43,"input",22),x(),_(44,"div",4)(45,"div",5)(46,"label",23),O(47,"Update Time"),x()(),pe(48,"input",24),x()(),_(49,"div",25),pe(50,"div",26,27),x(),Z(52,fct,2,1,"button",28),x()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.accountForm),w(6),S("value",r.account.user.id),w(5),S("ngClass",sr(9,pct,r.f.username.dirty&&r.f.username.errors)),w(1),S("hidden",r.f.username.disabled||r.f.username.valid||r.f.username.pristine),w(29),S("value",r.account.user.create_time),w(5),S("value",r.account.user.update_time),w(4),S("ngIf",r.updateAllowed()))},dependencies:[nm,vn,po,fa,Qs,da,ha,Hf,js,Zs]})}return t})();function gct(t,n){if(1&t&&(_(0,"ngb-alert",36),pe(1,"img",37),_(2,"h6",38),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function vct(t,n){1&t&&(_(0,"ngb-alert",39),pe(1,"img",40),_(2,"h6",38),O(3,"Account was modified successfully."),x()()),2&t&&S("dismissible",!1)}function yct(t,n){if(1&t&&(_(0,"option",41),O(1),x()),2&t){const e=n.$implicit,i=n.index;Ph("value",i),S("selected",0===i),w(1),bt(e.id)}}function _ct(t,n){1&t&&(_(0,"button",42),O(1,"Save"),x()),2&t&&S("disabled",$().updating)}let bct=(()=>{class t{route;router;consoleService;authService;formBuilder;error="";account;accountForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(e=>{this.account=e[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},e=>{this.error=e})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let e={email:this.f.email.value};this.f.password.dirty&&(e.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,e).subscribe(i=>{this.updated=!0,this.updating=!1,this.f.password.reset()},i=>{this.error=i,this.updating=!1})}unlinkDeviceId(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},r=>{this.error=r})}unlinkCustomID(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},i=>{this.error=i})}unlinkFacebook(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},i=>{this.error=i})}unlinkFacebookInstantGames(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},i=>{this.error=i})}unlinkApple(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},i=>{this.error=i})}unlinkGameCenter(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},i=>{this.error=i})}unlinkGoogle(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},i=>{this.error=i})}unlinkSteam(e){e.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},i=>{this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}copyDeviceIdToClipboard(e){const i=document.createElement("textarea");i.style.position="fixed",i.style.left="0",i.style.top="0",i.style.opacity="0",i.value=this.account.devices[e].id,document.body.appendChild(i),i.focus(),i.select(),document.execCommand("copy"),document.body.removeChild(i)}get f(){return this.accountForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:102,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["src","/static/svg/copy.svg","alt","","width","16","height","",1,""],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(Z(0,gct,4,2,"ngb-alert",0),Z(1,vct,4,1,"ngb-alert",1),_(2,"form",2),ye("ngSubmit",function(){return r.updateAccount()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),O(7,"Device IDs"),x()(),_(8,"div",7)(9,"button",8),ye("click",function(){return r.copyDeviceIdToClipboard(r.f.selected_device_id_index.value)}),pe(10,"img",9),O(11," Copy "),x(),_(12,"select",10),Z(13,yct,2,3,"option",11),x(),_(14,"div",12)(15,"button",13),ye("click",function(s){return r.unlinkDeviceId(s)}),O(16,"Unlink"),x()()()(),_(17,"div",4)(18,"div",5)(19,"label",14),O(20,"Custom ID"),x()(),_(21,"div",7),pe(22,"input",15),_(23,"div",12)(24,"button",13),ye("click",function(s){return r.unlinkCustomID(s)}),O(25,"Unlink"),x()()()()(),_(26,"div",3)(27,"div",4)(28,"div",5)(29,"label",16),O(30,"Facebook ID"),x()(),_(31,"div",7),pe(32,"input",17),_(33,"div",12)(34,"button",13),ye("click",function(s){return r.unlinkFacebook(s)}),O(35,"Unlink"),x()()()(),_(36,"div",18)(37,"div",5)(38,"label",19),O(39,"FB Instant Game ID"),x()(),_(40,"div",7),pe(41,"input",20),_(42,"div",12)(43,"button",13),ye("click",function(s){return r.unlinkFacebookInstantGames(s)}),O(44,"Unlink"),x()()()()(),_(45,"div",3)(46,"div",4)(47,"div",5)(48,"label",21),O(49,"Apple ID"),x()(),_(50,"div",7),pe(51,"input",22),_(52,"div",12)(53,"button",13),ye("click",function(s){return r.unlinkApple(s)}),O(54,"Unlink"),x()()()(),_(55,"div",18)(56,"div",5)(57,"label",23),O(58,"GameCenter ID"),x()(),_(59,"div",7),pe(60,"input",24),_(61,"div",12)(62,"button",13),ye("click",function(s){return r.unlinkGameCenter(s)}),O(63,"Unlink"),x()()()()(),_(64,"div",3)(65,"div",4)(66,"div",5)(67,"label",25),O(68,"Google ID"),x()(),_(69,"div",7),pe(70,"input",26),_(71,"div",12)(72,"button",13),ye("click",function(s){return r.unlinkGoogle(s)}),O(73,"Unlink"),x()()()(),_(74,"div",4)(75,"div",5)(76,"label",27),O(77,"Steam ID"),x()(),_(78,"div",7),pe(79,"input",28),_(80,"div",12)(81,"button",13),ye("click",function(s){return r.unlinkSteam(s)}),O(82,"Unlink"),x()()()()(),_(83,"div",3)(84,"div",4)(85,"div",5)(86,"label",29),O(87,"Email"),x(),pe(88,"br"),x(),pe(89,"input",30),x(),_(90,"div",4)(91,"div",5)(92,"label",31),O(93,"Password"),x()(),pe(94,"input",32),x()(),_(95,"div",33)(96,"div",4),pe(97,"div",5),_(98,"span",34),O(99),x()(),pe(100,"div",4),x(),Z(101,_ct,2,1,"button",35),x()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.accountForm),w(11),S("ngForOf",r.account.devices),w(2),S("disabled",!r.updateAllowed()||0===r.account.devices.length),w(7),S("value",r.account.custom_id),w(2),S("disabled",!r.updateAllowed()||!r.account.custom_id||""===r.account.custom_id),w(8),S("value",r.account.user.facebook_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_id||""===r.account.user.facebook_id),w(7),S("value",r.account.user.facebook_instant_game_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.facebook_instant_game_id||""===r.account.user.facebook_instant_game_id),w(8),S("value",r.account.user.apple_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.apple_id||""===r.account.user.apple_id),w(7),S("value",r.account.user.gamecenter_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.gamecenter_id||""===r.account.user.gamecenter_id),w(8),S("value",r.account.user.google_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.google_id||""===r.account.user.google_id),w(7),S("value",r.account.user.steam_id),w(2),S("disabled",!r.updateAllowed()||!r.account.user.steam_id||""===r.account.user.steam_id),w(18),mn("Verification Status: ",null===r.account.verify_time?"Not Verified":"Verified",""),w(2),S("ngIf",r.updateAllowed()))},dependencies:[Ln,vn,po,fa,HC,UC,Qs,kv,da,ha,js,Zs],styles:[".custom-select[_ngcontent-%COMP%]{height:auto}"]})}return t})();const xct=["editor"];function wct(t,n){if(1&t&&(_(0,"ngb-alert",24),pe(1,"img",25),_(2,"h6",26),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Cct(t,n){1&t&&(_(0,"ngb-alert",27),pe(1,"img",28),_(2,"h6",26),O(3,"Account was modified successfully."),x()()),2&t&&S("dismissible",!1)}function Sct(t,n){if(1&t){const e=vt();_(0,"button",29),ye("click",function(){return Be(e),Ve($().updateWallet())}),O(1,"Save"),x()}2&t&&S("disabled",$().updating)}function kct(t,n){1&t&&(_(0,"th",30),O(1,"Remove"),x())}function Dct(t,n){1&t&&(_(0,"tr")(1,"td",31),O(2,"No wallet ledger items found."),x()())}function Tct(t,n){1&t&&pe(0,"div",37)}function Ect(t,n){1&t&&pe(0,"div",38)}function Act(t,n){if(1&t){const e=vt();_(0,"td")(1,"button",39),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteLedgerItem(r,s,a))}),O(2,"Delete"),x()()}}function Mct(t,n){if(1&t&&(_(0,"tr")(1,"td",40)(2,"pre",41)(3,"small"),O(4),x()()()()),2&t){const e=$().$implicit;w(4),bt(e.metadata)}}function Oct(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",32),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.walletLedgerMetadataOpen[o]=!s.walletLedgerMetadataOpen[o])}),Z(3,Tct,1,0,"div",33),Z(4,Ect,1,0,"div",34),x(),O(5),x(),_(6,"td",35)(7,"pre",36),O(8),x()(),_(9,"td"),O(10),x(),Z(11,Act,3,0,"td",22),x(),Z(12,Mct,5,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.walletLedgerMetadataOpen[e]),w(1),S("ngIf",r.walletLedgerMetadataOpen[e]),w(1),mn(" ",i.id," "),w(3),bt(i.changeset),w(2),bt(i.update_time),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.walletLedgerMetadataOpen[e])}}let Ict=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;editor;jsonEditor;error="";account;walletLedger=[];walletLedgerMetadataOpen=[];updating=!1;updated=!1;nextCursor="";prevCursor="";limit=100;userID;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(e=>{this.walletLedger.length=0,this.walletLedger.push(...e[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length,this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}loadData(e){this.consoleService.getWalletLedger("",this.userID,this.limit,e).subscribe(i=>{this.walletLedger=i.items,this.walletLedgerMetadataOpen=[],this.nextCursor=i.next_cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.account.wallet}}})}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:e}).subscribe(r=>{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteLedgerItem(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,r.id).subscribe(()=>{this.error="",this.walletLedger.splice(i,1),this.walletLedgerMetadataOpen.splice(i,1)},o=>{this.error=o})})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(xct,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:32,vars:9,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(Z(0,wct,4,2,"ngb-alert",0),Z(1,Cct,4,1,"ngb-alert",1),_(2,"div",2),pe(3,"div",3,4),x(),Z(5,Sct,2,1,"button",5),pe(6,"hr",6),_(7,"div",7)(8,"div",8),pe(9,"div",9),_(10,"div",10)(11,"div",11)(12,"button",12),ye("click",function(){return r.loadData("")}),pe(13,"img",13),x(),_(14,"button",12),ye("click",function(){return r.loadData(r.prevCursor)}),pe(15,"img",14),x(),_(16,"button",12),ye("click",function(){return r.loadData(r.nextCursor)}),pe(17,"img",15),x()()()()(),_(18,"div",16)(19,"table",17)(20,"thead",18)(21,"tr")(22,"th",19),O(23,"ID"),x(),_(24,"th"),O(25,"Changeset"),x(),_(26,"th",20),O(27,"Update Time"),x(),Z(28,kct,2,0,"th",21),x()(),_(29,"tbody"),Z(30,Dct,3,0,"tr",22),Z(31,Oct,13,7,"ng-template",23),x()()()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(4),S("ngIf",r.updateAllowed()),w(7),S("disabled",0===r.walletLedger.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(12),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.walletLedger.length),w(1),S("ngForOf",r.walletLedger))},dependencies:[Ln,vn,po],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]})}return t})(),Nct=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",r,100,"")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Fct(t,n){if(1&t&&(_(0,"ngb-alert",10),pe(1,"img",11),_(2,"h6",12),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Pct(t,n){1&t&&(_(0,"th",13),O(1,"Remove"),x())}function jct(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No friends found."),x()())}function Rct(t,n){1&t&&(_(0,"span"),O(1,"Friend (0)"),x())}function Lct(t,n){1&t&&(_(0,"span"),O(1,"Invite Sent (1)"),x())}function $ct(t,n){1&t&&(_(0,"span"),O(1,"Invite Received (2)"),x())}function Bct(t,n){1&t&&(_(0,"span"),O(1,"Blocked (3)"),x())}function Vct(t,n){if(1&t){const e=vt();_(0,"td",17)(1,"button",18),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteFriend(r,s,a))}),O(2,"Delete"),x()()}}function Hct(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o.user))}),O(2),x(),_(3,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o.user))}),O(4),x(),_(5,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o.user))}),Z(6,Rct,2,0,"span",8),Z(7,Lct,2,0,"span",8),Z(8,$ct,2,0,"span",8),Z(9,Bct,2,0,"span",8),x(),_(10,"td"),O(11),x(),Z(12,Vct,3,0,"td",16),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.user.id),w(2),bt(e.user.username),w(2),S("ngIf",0===e.state),w(1),S("ngIf",1===e.state),w(1),S("ngIf",2===e.state),w(1),S("ngIf",3===e.state),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed())}}let Uct=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;friends=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.friends.length=0,this.friends.push(...e[0].friends)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteFriend(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,r.user.id).subscribe(()=>{this.error="",this.friends.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/accounts",e.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(Z(0,Fct,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),O(6,"User ID"),x(),_(7,"th"),O(8,"Username"),x(),_(9,"th",5),O(10,"State"),x(),_(11,"th",6),O(12,"Update Time"),x(),Z(13,Pct,2,0,"th",7),x()(),_(14,"tbody"),Z(15,jct,3,0,"tr",8),Z(16,Hct,13,8,"tr",9),x()()()),2&i&&(S("ngIf",r.error),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.friends.length),w(1),S("ngForOf",r.friends))},dependencies:[Ln,vn,po],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),zct=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getFriends("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Gct(t,n){if(1&t&&(_(0,"ngb-alert",10),pe(1,"img",11),_(2,"h6",12),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Wct(t,n){1&t&&(_(0,"th",13),O(1,"Remove"),x())}function qct(t,n){1&t&&(_(0,"tr")(1,"td",14),O(2,"No group membership found."),x()())}function Yct(t,n){1&t&&(_(0,"span"),O(1,"Superadmin (0)"),x())}function Xct(t,n){1&t&&(_(0,"span"),O(1,"Admin (1)"),x())}function Jct(t,n){1&t&&(_(0,"span"),O(1,"Member (2)"),x())}function Kct(t,n){1&t&&(_(0,"span"),O(1,"Join Request (3)"),x())}function Qct(t,n){1&t&&(_(0,"span"),O(1,"Banned (4)"),x())}function Zct(t,n){if(1&t){const e=vt();_(0,"td")(1,"button",16),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteGroupUser(r,s,a))}),O(2,"Delete"),x()()}}function eut(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(2),x(),_(3,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),Z(6,Yct,2,0,"span",8),Z(7,Xct,2,0,"span",8),Z(8,Jct,2,0,"span",8),Z(9,Kct,2,0,"span",8),Z(10,Qct,2,0,"span",8),x(),_(11,"td",15),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(12),x(),Z(13,Zct,3,0,"td",8),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.group.id),w(2),bt(e.group.name),w(2),S("ngIf",0===e.state),w(1),S("ngIf",1===e.state),w(1),S("ngIf",2===e.state),w(1),S("ngIf",3===e.state),w(1),S("ngIf",4===e.state),w(2),bt(e.group.update_time),w(1),S("ngIf",i.deleteAllowed())}}let tut=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;error="";account;groups=[];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.groups.length=0,this.groups.push(...e[0].user_groups)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.account=e[0].account},e=>{this.error=e})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,r.group.id).subscribe(()=>{this.error="",this.groups.splice(i,1)},o=>{this.error=o})})}viewAccount(e){this.router.navigate(["/groups",e.group.id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(Z(0,Gct,4,2,"ngb-alert",0),_(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),O(6,"Group ID"),x(),_(7,"th"),O(8,"Name"),x(),_(9,"th",5),O(10,"State"),x(),_(11,"th",6),O(12,"Update Time"),x(),Z(13,Wct,2,0,"th",7),x()(),_(14,"tbody"),Z(15,qct,3,0,"tr",8),Z(16,eut,14,9,"tr",9),x()()()),2&i&&(S("ngIf",r.error),w(13),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.groups.length),w(1),S("ngForOf",r.groups))},dependencies:[Ln,vn,po],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),nut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getGroups("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const iut=["editor"];function rut(t,n){if(1&t&&(_(0,"ngb-alert",34),pe(1,"img",35),_(2,"h6",36),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function out(t,n){1&t&&(_(0,"ngb-alert",37),pe(1,"img",38),_(2,"h6",36),O(3,"Group was modified successfully."),x()()),2&t&&S("dismissible",!1)}function sut(t,n){1&t&&(_(0,"button",39),O(1,"Save"),x()),2&t&&S("disabled",$().updating)}const aut=function(t){return["/accounts",t]},lut=function(t){return{"is-invalid":t}};let cut=(()=>{class t{route;router;consoleService;authService;formBuilder;editor;jsonEditor;error="";group;groupForm;updating=!1;updated=!1;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s}ngOnInit(){this.groupForm=this.formBuilder.group({name:["",Co.required],description:[""],avatar_url:[""],lang_tag:[""],open:[""],max_count:[""]}),this.route.parent.data.subscribe(e=>{this.group=e[0],this.f.name.setValue(this.group.name),this.f.description.setValue(this.group.description),this.f.avatar_url.setValue(this.group.avatar_url),this.f.lang_tag.setValue(this.group.lang_tag),this.f.open.setValue(this.group.open),this.f.max_count.setValue(this.group.max_count),this.updateAllowed()||this.groupForm.disable()},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!this.updateAllowed(),content:{text:this.group.metadata}}})}updateGroup(){this.error="",this.updated=!1,this.updating=!0;let e="";try{e=Zm(this.jsonEditor.get()).text}catch(r){return this.error=r,void(this.updating=!1)}if(this.f.max_count.value{this.updated=!0,this.updating=!1},r=>{this.error=r,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f(){return this.groupForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(iut,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:71,vars:16,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","group_id",1,"d-inline"],["type","text","id","group_id","placeholder","Group ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","creator_id",1,"d-inline"],[2,"width","100%",3,"routerLink"],["type","text","id","creator_id","placeholder","Creator ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","name",1,"d-inline"],["type","text","id","name","placeholder","Name","required","","formControlName","name",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","formControlName","description",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","lang_tag",1,"d-inline"],["type","text","id","lang_tag","placeholder","Language","formControlName","lang_tag",1,"form-control","form-control-sm","my-2"],["type","text","id","edge_count","placeholder","Members","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_count",1,"d-inline"],["type","text","id","max_count","placeholder","Max Count","formControlName","max_count",1,"form-control","form-control-sm","my-2"],["type","checkbox","id","open","formControlName","open",1,"my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(i,r){1&i&&(Z(0,rut,4,2,"ngb-alert",0),Z(1,out,4,1,"ngb-alert",1),_(2,"form",2),ye("ngSubmit",function(){return r.updateGroup()}),_(3,"div",3)(4,"div",4)(5,"div",5)(6,"label",6),O(7,"Group ID"),x()(),pe(8,"input",7),x(),_(9,"div",4)(10,"div",5)(11,"label",8),O(12,"Creator ID"),x()(),_(13,"a",9),pe(14,"input",10),x()()(),_(15,"div",3)(16,"div",4)(17,"div",5)(18,"label",11),O(19,"Name"),x()(),pe(20,"input",12),_(21,"div",13),O(22,"Name is required"),x()(),_(23,"div",4)(24,"div",5)(25,"label",14),O(26,"Description"),x()(),pe(27,"input",15),x()(),_(28,"div",3)(29,"div",16)(30,"div",5)(31,"label",17),O(32,"Avatar URL"),x()(),pe(33,"input",18),x(),_(34,"div",4)(35,"div",5)(36,"label",19),O(37,"Language"),x()(),pe(38,"input",20),x()(),_(39,"div",3)(40,"div",4)(41,"div",5)(42,"label",8),O(43,"Members"),x()(),pe(44,"input",21),x(),_(45,"div",16)(46,"div",5)(47,"label",22),O(48,"Max Count"),x()(),pe(49,"input",23),x()(),_(50,"div",3)(51,"div",16)(52,"div",5)(53,"label",22),O(54,"Open"),x()(),pe(55,"input",24),x()(),_(56,"div",25)(57,"div",4)(58,"div",5)(59,"label",26),O(60,"Create Time"),x()(),pe(61,"input",27),x(),_(62,"div",4)(63,"div",5)(64,"label",28),O(65,"Update Time"),x()(),pe(66,"input",29),x()(),_(67,"div",30),pe(68,"div",31,32),x(),Z(70,sut,2,1,"button",33),x()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",r.updated),w(1),S("formGroup",r.groupForm),w(6),S("value",r.group.id),w(5),S("routerLink",sr(12,aut,r.group.creator_id)),w(1),S("value",r.group.creator_id),w(6),S("ngClass",sr(14,lut,r.f.name.dirty&&r.f.name.errors)),w(1),S("hidden",r.f.name.disabled||r.f.name.valid||r.f.name.pristine),w(23),S("value",r.group.edge_count),w(17),S("value",r.group.create_time),w(5),S("value",r.group.update_time),w(4),S("ngIf",r.updateAllowed()))},dependencies:[Ou,nm,vn,po,fa,Qs,OC,da,ha,Hf,js,Zs]})}return t})();function uut(t,n){if(1&t&&(_(0,"ngb-alert",13),pe(1,"img",14),_(2,"h6",15),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function dut(t,n){1&t&&(_(0,"span"),O(1,"Add by membership state"),x())}function hut(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$(2);w(1),bt(e.activeState)}}function fut(t,n){if(1&t){const e=vt();_(0,"button",20),ye("click",function(){const o=Be(e).$implicit;return Ve($(2).activeState=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function put(t,n){if(1&t&&(_(0,"div",16)(1,"button",17),Z(2,dut,2,0,"span",11),Z(3,hut,2,1,"span",11),x(),_(4,"div",18),Z(5,fut,2,1,"button",19),x()()),2&t){const e=$();w(2),S("ngIf",!e.activeState||""===e.activeState),w(1),S("ngIf",e.activeState&&""!==e.activeState),w(2),S("ngForOf",e.states)}}function mut(t,n){if(1&t){const e=vt();_(0,"div",21)(1,"div",22)(2,"div",23)(3,"form",24)(4,"div",25),pe(5,"input",26),_(6,"div",27)(7,"div",28)(8,"button",29),ye("click",function(){return Be(e),Ve($().add())}),O(9,"Add"),x()()()()()()()()}if(2&t){const e=$();w(3),S("formGroup",e.addForm)}}function gut(t,n){1&t&&(_(0,"th",30),O(1,"Demote"),x())}function vut(t,n){1&t&&(_(0,"th",30),O(1,"Promote"),x())}function yut(t,n){1&t&&(_(0,"th",31),O(1,"Remove"),x())}function _ut(t,n){1&t&&(_(0,"tr")(1,"td",32),O(2,"No group membership found."),x()())}function but(t,n){1&t&&(_(0,"span"),O(1,"Superadmin (0)"),x())}function xut(t,n){1&t&&(_(0,"span"),O(1,"Admin (1)"),x())}function wut(t,n){1&t&&(_(0,"span"),O(1,"Member (2)"),x())}function Cut(t,n){1&t&&(_(0,"span"),O(1,"Join Request (3)"),x())}function Sut(t,n){1&t&&(_(0,"span"),O(1,"Banned (4)"),x())}function kut(t,n){if(1&t){const e=vt();_(0,"td",36)(1,"button",37),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().demoteGroupUser(r,s,a))}),st(),_(2,"svg",38),pe(3,"path",39),x()()()}}function Dut(t,n){if(1&t){const e=vt();_(0,"td",36)(1,"button",37),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().promoteGroupUser(r,s,a))}),st(),_(2,"svg",40),pe(3,"path",41),x()()()}}function Tut(t,n){if(1&t){const e=vt();_(0,"td",42)(1,"button",43),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteGroupUser(r,s,a))}),O(2,"Delete"),x()()}}function Eut(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(2),x(),_(3,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),Z(6,but,2,0,"span",11),Z(7,xut,2,0,"span",11),Z(8,wut,2,0,"span",11),Z(9,Cut,2,0,"span",11),Z(10,Sut,2,0,"span",11),x(),_(11,"td",33),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(12),x(),Z(13,kut,4,0,"td",34),Z(14,Dut,4,0,"td",34),Z(15,Tut,3,0,"td",35),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.user.id),w(2),bt(e.user.username),w(2),S("ngIf",0===e.state),w(1),S("ngIf",1===e.state),w(1),S("ngIf",2===e.state),w(1),S("ngIf",3===e.state),w(1),S("ngIf",4===e.state),w(2),bt(e.user.update_time),w(1),S("ngIf",i.editionAllowed()),w(1),S("ngIf",i.editionAllowed()),w(1),S("ngIf",i.editionAllowed())}}let Aut=(()=>{class t{route;router;consoleService;formBuilder;authService;error="";group;members=[];activeState="Add Member";states=["Add Member","Join"];addForm;constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o,this.authService=s,this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.addForm=this.formBuilder.group({ids:[""]})}ngOnInit(){this.route.data.subscribe(e=>{this.members.length=0,this.members.push(...e[0].group_users)},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}editionAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteGroupUser(e,i,r){e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",r.user.id,this.group.id).subscribe(()=>{this.members.splice(i,1)},o=>{this.error=o})}demoteGroupUser(e,i,r){this.error="",this.consoleService.demoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state++},o=>{this.error=o})}promoteGroupUser(e,i,r){this.error="",this.consoleService.promoteGroupMember("",this.group.id,r.user.id).subscribe(()=>{this.members[i].state--},o=>{this.error=o})}viewAccount(e){this.router.navigate(["/accounts",e.user.id],{relativeTo:this.route})}add(){this.consoleService.addGroupUsers("",this.group.id,{ids:this.f.ids.value,join_request:"Join"===this.activeState}).subscribe(()=>{this.error="",this.router.navigate([this.router.url])},i=>{this.error=i})}get f(){return this.addForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(Na),de(zo))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:21,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["class","btn-group mb-1","ngbDropdown","",4,"ngIf"],["class","row no-gutters mb-4",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 70px",4,"ngIf"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup"],[1,"input-group"],["id","ids","type","text","formControlName","ids","placeholder","Add user IDs as members, comma-separated",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],[2,"width","70px"],[2,"width","90px"],["colSpan","7",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],["class","text-center align-middle",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-outline-secondary",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-down"],["fill-rule","evenodd","d","M8 1a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L7.5 13.293V1.5A.5.5 0 0 1 8 1z"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-arrow-up"],["fill-rule","evenodd","d","M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5z"],[1,"text-center","align-middle"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(Z(0,uut,4,2,"ngb-alert",0),Z(1,put,6,3,"div",1),Z(2,mut,10,1,"div",2),_(3,"div",3)(4,"table",4)(5,"thead",5)(6,"tr")(7,"th",6),O(8,"User ID"),x(),_(9,"th"),O(10,"Name"),x(),_(11,"th",7),O(12,"State"),x(),_(13,"th",8),O(14,"Update Time"),x(),Z(15,gut,2,0,"th",9),Z(16,vut,2,0,"th",9),Z(17,yut,2,0,"th",10),x()(),_(18,"tbody"),Z(19,_ut,3,0,"tr",11),Z(20,Eut,16,11,"tr",12),x()()()),2&i&&(S("ngIf",r.error),w(1),S("ngIf",!r.group.open&&r.editionAllowed()),w(1),S("ngIf",r.editionAllowed()),w(13),S("ngIf",r.editionAllowed()),w(1),S("ngIf",r.editionAllowed()),w(1),S("ngIf",r.editionAllowed()),w(2),S("ngIf",0===r.members.length),w(1),S("ngForOf",r.members))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Mut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.getMembers("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Out(t,n){if(1&t&&(_(0,"ngb-alert",28),pe(1,"img",29),_(2,"h6",30),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Iut(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.activeType)}}function Nut(t,n){if(1&t){const e=vt();_(0,"button",31),ye("click",function(){const o=Be(e).$implicit;return Ve($().activeType=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function Fut(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.activeNode)}}function Put(t,n){if(1&t){const e=vt();_(0,"button",31),ye("click",function(){const o=Be(e).$implicit;return Ve($().activeNode=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function jut(t,n){1&t&&(_(0,"tr")(1,"td",32),O(2,"No realtime matches were found."),x()())}function Rut(t,n){1&t&&pe(0,"div",40)}function Lut(t,n){1&t&&pe(0,"div",41)}function $ut(t,n){if(1&t){const e=vt();_(0,"div",37),ye("click",function(){Be(e);const r=$(),o=r.index,s=r.$implicit,a=$();return a.getMatchState(o,s),Ve(a.matchStatesOpen[o]=!a.matchStatesOpen[o])}),Z(1,Rut,1,0,"div",38),Z(2,Lut,1,0,"div",39),x()}if(2&t){const e=$().index,i=$();w(1),S("ngIf",!i.matchStatesOpen[e]),w(1),S("ngIf",i.matchStatesOpen[e])}}function But(t,n){1&t&&pe(0,"div",42)}function Vut(t,n){1&t&&(_(0,"span"),O(1,"Yes"),x())}function Hut(t,n){1&t&&(_(0,"span"),O(1,"No"),x())}function Uut(t,n){1&t&&pe(0,"img",51)}function zut(t,n){if(1&t&&(_(0,"div")(1,"small")(2,"b"),O(3,"Current Tick"),x()(),_(4,"pre",47)(5,"small"),O(6),x()(),_(7,"small")(8,"b"),O(9,"Match State"),x()(),_(10,"pre",47)(11,"small"),O(12),x()()()),2&t){const e=$(2).index,i=$();w(6),bt(i.matchStates[e].tick),w(6),bt(i.matchStates[e].state)}}function Gut(t,n){1&t&&pe(0,"img",51)}function Wut(t,n){if(1&t&&(_(0,"pre",47)(1,"small"),O(2),x()()),2&t){const e=$(2).index,i=$();w(2),bt(i.getMatchPresencesString(i.matchStates[e].presences))}}function qut(t,n){if(1&t&&(_(0,"tr",43)(1,"td",44)(2,"div",45)(3,"div",46)(4,"small")(5,"b"),O(6,"Match Label"),x()(),_(7,"pre",47)(8,"small"),O(9),x()()(),_(10,"div",48),Z(11,Uut,1,0,"img",49),Z(12,zut,13,2,"div",7),x(),_(13,"div",48)(14,"small")(15,"b"),O(16,"Match Presences"),x()(),Z(17,Gut,1,0,"img",49),Z(18,Wut,3,1,"pre",50),x()()()()),2&t){const e=$(),i=e.$implicit,r=e.index,o=$();w(9),bt(i.api_match.label),w(2),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),S("ngIf",null!==o.matchStates[r]),w(5),S("ngIf",!o.matchStates[r]||null===o.matchStates[r]),w(1),S("ngIf",null!==o.matchStates[r])}}function Yut(t,n){if(1&t&&(_(0,"tr")(1,"td"),Z(2,$ut,3,2,"div",33),Z(3,But,1,0,"div",34),O(4),x(),_(5,"td"),O(6),x(),_(7,"td",35),Z(8,Vut,2,0,"span",7),Z(9,Hut,2,0,"span",7),x(),_(10,"td"),O(11),x(),_(12,"td"),O(13),x(),_(14,"td"),O(15),x()(),Z(16,qut,19,5,"tr",36)),2&t){const e=n.index,i=n.$implicit,r=$();w(2),S("ngIf",i.api_match.authoritative),w(1),S("ngIf",!i.api_match.authoritative),w(1),mn(" ",i.api_match.match_id," "),w(2),bt(i.api_match.size),w(2),S("ngIf",i.api_match.authoritative),w(1),S("ngIf",!i.api_match.authoritative),w(2),bt(i.node),w(2),bt(i.api_match.handler_name),w(2),bt(i.api_match.authoritative?i.api_match.tick_rate:"-"),w(1),S("ngIf",r.matchStatesOpen[e])}}let Xut=(()=>{class t{route;router;formBuilder;consoleService;error="";matches=[];matchStates=[];matchStatesOpen=[];updated=!1;searchForm1;searchForm2;searchForm3;type;activeType="All";types=["All","Authoritative","Relayed"];activeNode="All Nodes";nodes=["All Nodes"];constructor(e,i,r,o){this.route=e,this.router=i,this.formBuilder=r,this.consoleService=o,this.searchForm1=this.formBuilder.group({match_id:""}),this.searchForm2=this.formBuilder.group({match_id:""}),this.searchForm3=this.formBuilder.group({query:""})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.match_id.setValue(e.get("match_id")),this.f2.match_id.setValue(e.get("match_id")),this.f3.query.setValue(e.get("query"));const i=e.get("type");this.type=Number(i);const r=e.get("node");if(this.route.data.subscribe(o=>{o&&(o[0]&&(this.error="",this.matches.length=0,this.matches.push(...o[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length),o[1]&&this.nodes.push(...o[1]),o.error&&(this.error=o.error))},o=>{this.error=o}),null===i?(this.type=0,this.activeType=this.types[0]):0==this.type||1===this.type||2===this.type?this.activeType=this.types[this.type]:this.error="Invalid type",null!==r){let o=!1;this.nodes.forEach(s=>{r===s&&(this.activeNode=r,o=!0)}),o||(this.error="Invalid node.")}}search(){const e=this.getType();this.type=e,sve(this.consoleService,e,0===e?this.f1.match_id.value:this.f2.match_id.value,this.f3.query.value,this.activeNode===this.nodes[0]?"":this.activeNode).subscribe(i=>this.postData(i),i=>{this.error=i})}postData(e){let i;switch(this.error="",this.matches.length=0,this.matches.push(...e.matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length,this.type){case 0:i={type:this.type,match_id:this.f1.match_id.value};break;case 1:i={type:this.type,query:this.f3.query.value},this.activeNode!==this.nodes[0]&&(i.node=this.activeNode);break;case 2:i={type:this.type,match_id:this.f2.match_id.value}}this.router.navigate([],{relativeTo:this.route,queryParams:i})}getType(){let e=0;return this.types.forEach((i,r)=>{this.activeType===i&&(e=r)}),e}getMatchState(e,i){this.matchStatesOpen[e]||(this.matchStates[e]=null,this.error="",this.consoleService.getMatchState("",i.api_match.match_id).subscribe(r=>{this.matchStatesOpen[e]=!0,this.matchStates[e]=r},r=>{this.matchStatesOpen[e]=!1,this.matchStates[e]=null,this.error=r}))}getMatchPresencesString(e){return JSON.stringify(e)}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(Na),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:53,vars:16,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"input-group","mb-1"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-right"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"click"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","match_id","placeholder","Filter by match ID",1,"form-control"],["type","text","formControlName","query","placeholder","Filter by query or match ID",1,"form-control","border-right-0"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius-left"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","button","ngbDropdownItem","",3,"click"],["colSpan","8",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","6",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Active Matches"),x(),_(2,"h6",1),O(3),x(),Z(4,Out,4,2,"ngb-alert",2),_(5,"div",3)(6,"div",4)(7,"div",5)(8,"button",6),Z(9,Iut,2,1,"span",7),x(),_(10,"div",8),Z(11,Nut,2,1,"button",9),x()()(),_(12,"div",10)(13,"button",11),ye("click",function(){return r.search()}),O(14,"Search"),x()()(),_(15,"div",12)(16,"div",13)(17,"div",14)(18,"form",15),ye("ngSubmit",function(){return r.search()}),_(19,"div",16),pe(20,"input",17),x()(),_(21,"form",15),ye("ngSubmit",function(){return r.search()}),_(22,"div",16),pe(23,"input",17),x()(),_(24,"form",15),ye("ngSubmit",function(){return r.search()}),_(25,"div",16),pe(26,"input",18),_(27,"div",10)(28,"div",5)(29,"button",19),Z(30,Fut,2,1,"span",7),x(),_(31,"div",8),Z(32,Put,2,1,"button",9),x()()()()()()()(),_(33,"div",20)(34,"table",21)(35,"thead",22)(36,"tr")(37,"th")(38,"span"),O(39,"Match ID"),x()(),_(40,"th",23),O(41,"Presence Count"),x(),_(42,"th",24),O(43,"Authoritative"),x(),_(44,"th",24),O(45,"Node"),x(),_(46,"th",25),O(47,"Handler Name"),x(),_(48,"th",26),O(49,"Tick Rate"),x()()(),_(50,"tbody"),Z(51,jut,3,0,"tr",7),Z(52,Yut,17,10,"ng-template",27),x()()()),2&i&&(w(3),mn("",r.matches.length," running matches found."),w(1),S("ngIf",r.error),w(5),S("ngIf",r.activeType&&""!==r.activeType),w(2),S("ngForOf",r.types),w(7),S("hidden","All"!==r.activeType)("formGroup",r.searchForm1),w(3),S("hidden","Relayed"!==r.activeType)("formGroup",r.searchForm2),w(3),S("hidden","Authoritative"!==r.activeType)("formGroup",r.searchForm3),w(6),S("ngIf",r.activeNode&&""!==r.activeNode),w(2),S("ngForOf",r.nodes),w(6),jn("pl-3",r.matches.length>0),w(13),S("ngIf",0===r.matches.length),w(1),S("ngForOf",r.matches))},dependencies:[Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}.dropdown-radius-right[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}"]})}return t})(),Jut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));return sve(this.consoleService,r,e.queryParamMap.get("match_id"),e.queryParamMap.get("query"),e.queryParamMap.get("node")).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))))}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sve(t,n,e,i,r){switch(n){case 0:return t.listMatches("",null,null,null,null,null,e);case 1:return t.listMatches("",null,!0,null,null,null,null,i,r);case 2:return t.listMatches("",null,!1,null,null,null,e)}return Rn(null)}let Kut=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.getStatus("").pipe(et(r=>Rn(r.nodes.map(o=>o.name)))).pipe(Ll(r=>(e.data={...e.data,error:r},Rn([]))))}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qut(t,n){if(1&t&&(_(0,"ngb-alert",25),pe(1,"img",26),_(2,"h6",27),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying groups: ",e.error,"")}}function Zut(t,n){1&t&&(_(0,"th",28),O(1,"Remove"),x())}function edt(t,n){1&t&&(_(0,"tr")(1,"td",29),O(2,"No groups found - change the filter criteria or add new user groups."),x()())}function tdt(t,n){1&t&&pe(0,"td")}function ndt(t,n){if(1&t){const e=vt();_(0,"td",32)(1,"button",33),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteGroup(r,s,a))}),O(2,"Delete"),x()()}}function idt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td",30),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewGroup(o))}),O(2),x(),_(3,"td",30),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewGroup(o))}),O(4),x(),_(5,"td",30),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewGroup(o))}),O(6),x(),Z(7,tdt,1,0,"td",23),Z(8,ndt,3,0,"td",31),x()}if(2&t){const e=n.$implicit,i=$();w(2),bt(e.id),w(2),bt(e.name),w(2),bt(e.update_time),w(1),S("ngIf",i.deleteAllowed()&&e.id===i.systemUserId),w(1),S("ngIf",i.deleteAllowed()&&e.id!==i.systemUserId)}}let rdt=(()=>{class t{route;router;consoleService;authService;formBuilder;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";groupsCount=0;groups=[];nextCursor="";prevCursor="";searchForm;constructor(e,i,r,o,s,a){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.deleteConfirmService=a}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""]});const e=this.route.snapshot.queryParamMap;this.f.filter.setValue(e.get("filter")),this.nextCursor=e.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):this.f.filter.value&&this.search(0),this.route.data.subscribe(i=>{this.groups.length=0,i&&(this.groups.push(...i[0].groups),this.groupsCount=i[0].total_count,this.nextCursor=i[0].next_cursor,this.prevCursor=i[0].prev_cursor)},i=>{this.error=i})}search(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listGroups("",this.f.filter.value,i).subscribe(r=>{this.error="",this.groups.length=0,this.groups.push(...r.groups),this.groupsCount=r.total_count,this.nextCursor=r.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,cursor:i},queryParamsHandling:"merge"})},r=>{this.error=r})}deleteGroup(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteGroup("",r.id).subscribe(()=>{this.error="",this.groups.splice(i,1),this.groupsCount--},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}viewGroup(e){this.router.navigate(["/groups",e.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:35,vars:8,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by group ID or name (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Groups"),x(),_(2,"h6",1),O(3),x(),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"form",5),ye("ngSubmit",function(){return r.search(0)}),_(8,"div",6),pe(9,"input",7),_(10,"div",8)(11,"div",9)(12,"button",10),ye("click",function(){return r.search(0)}),O(13,"Search"),x()()()()()(),_(14,"div",11)(15,"div",12)(16,"button",13),ye("click",function(){return r.search(0)}),pe(17,"img",14),x(),_(18,"button",13),ye("click",function(){return r.search(1)}),pe(19,"img",15),x()()()()(),Z(20,Qut,4,2,"ngb-alert",16),_(21,"div",17)(22,"table",18)(23,"thead",19)(24,"tr")(25,"th",20),O(26,"Group ID"),x(),_(27,"th"),O(28,"Name"),x(),_(29,"th",21),O(30,"Last Update"),x(),Z(31,Zut,2,0,"th",22),x()(),_(32,"tbody"),Z(33,edt,3,0,"tr",23),Z(34,idt,9,5,"tr",24),x()()()),2&i&&(w(3),mn("",r.groupsCount," groups found."),w(4),S("formGroup",r.searchForm),w(9),S("disabled",0===r.groups.length),w(2),S("disabled",""===r.nextCursor),w(2),S("ngIf",r.error),w(11),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.groups.length),w(1),S("ngForOf",r.groups))},dependencies:[Ln,vn,po,fa,Qs,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),odt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.queryParamMap.get("filter");return this.consoleService.listGroups("",r,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function sdt(t,n){if(1&t){const e=vt();_(0,"button",13),ye("click",function(r){return Be(e),Ve($().exportGroup(r))}),pe(1,"img",14),O(2,"Export"),x()}}function adt(t,n){if(1&t){const e=vt();_(0,"button",15),ye("click",function(r){return Be(e),Ve($().deleteGroup(r,!1))}),pe(1,"img",16),O(2,"Delete"),x()}}function ldt(t,n){if(1&t&&(_(0,"ngb-alert",17),pe(1,"img",18),_(2,"h6",19),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}const cdt=function(t,n){return["/groups",t,n]};function udt(t,n){if(1&t&&(_(0,"div"),sc(1,20),_(2,"a",21),O(3),x(),ac(),x()),2&t){const e=n.$implicit,i=$();w(1),S("ngbNavItem",e.path),w(1),S("routerLink",Mr(3,cdt,i.group.id,e.path)),w(1),bt(e.label)}}const ddt=function(){return["/groups"]};let hdt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;group;error="";views=[{label:"Details",path:"details"},{label:"Members",path:"members"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.group=e[0]},e=>{this.error=e})}deleteGroup(e,i){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteGroup("",this.group.id).subscribe(()=>{this.error="",this.router.navigate(["/groups"])},r=>{this.error=r})})}exportGroup(e){e.target.disabled=!0,this.error="",this.consoleService.exportGroup("",this.group.id).subscribe(i=>{this.error="";const r=this.group.id+"-export.json",o=JSON.stringify(i,null,2),s=(new TextEncoder).encode(o),a=new Blob([s],{type:"application/json;charset=utf-8"});(0,qI.saveAs)(a,r),e.target.disabled=!1},i=>{e.target.disabled=!1,this.error=i})}updateAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}banAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:18,vars:7,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"User Group"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),O(7,"Group"),x()(),_(8,"li",6),O(9),x()()(),_(10,"div"),Z(11,sdt,3,0,"button",7),Z(12,adt,3,0,"button",8),x()(),Z(13,ldt,4,2,"ngb-alert",9),_(14,"nav",10,11),Z(16,udt,4,6,"div",12),x(),pe(17,"router-outlet")),2&i&&(w(6),S("routerLink",ml(6,ddt)),w(3),bt(r.group.id),w(2),S("ngIf",r.exportAllowed()),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.error),w(3),S("ngForOf",r.views))},dependencies:[cm,Ou,Ny,Ln,vn,po,zd,Yh,r_,Yf],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.account-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),fdt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getGroup("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function pdt(t,n){if(1&t){const e=vt();_(0,"button",12),ye("click",function(r){return Be(e),Ve($().deleteLeaderboard(r))}),pe(1,"img",13),O(2,"Delete Leaderboard"),x()}}function mdt(t,n){if(1&t&&(_(0,"ngb-alert",14),pe(1,"img",15),_(2,"h6",16),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}const gdt=function(t,n){return["/leaderboards",t,n]};function vdt(t,n){if(1&t&&(_(0,"div"),sc(1,17),_(2,"a",18),O(3),x(),ac(),x()),2&t){const e=n.$implicit,i=$();w(1),S("ngbNavItem",e.path),w(1),S("routerLink",Mr(3,gdt,i.leaderboard.id,e.path)),w(1),bt(e.label)}}const ydt=function(){return["/leaderboards"]};let _dt=(()=>{class t{route;router;consoleService;authService;deleteConfirmService;leaderboard;error="";views=[{label:"Details",path:"details"},{label:"Records",path:"records"}];constructor(e,i,r,o,s){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.deleteConfirmService=s}ngOnInit(){this.route.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}deleteLeaderboard(e){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},i=>{this.error=i})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_DEVELOPER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Leaderboard"),x(),_(2,"div",1)(3,"nav",2)(4,"ol",3)(5,"li",4)(6,"a",5),O(7,"Leaderboards"),x()(),_(8,"li",6),O(9),x()()(),_(10,"div"),Z(11,pdt,3,0,"button",7),x()(),Z(12,mdt,4,2,"ngb-alert",8),_(13,"nav",9,10),Z(15,vdt,4,6,"div",11),x(),pe(16,"router-outlet")),2&i&&(w(6),S("routerLink",ml(5,ydt)),w(3),bt(r.leaderboard.id),w(2),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.error),w(3),S("ngForOf",r.views))},dependencies:[cm,Ou,Ny,Ln,vn,po,zd,Yh,r_,Yf],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:solid 2px #7668ED}.navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})(),bdt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.paramMap.get("id");return this.consoleService.getLeaderboard("",r)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const xdt=["editor"];function wdt(t,n){if(1&t&&(_(0,"ngb-alert",24),pe(1,"img",25),_(2,"h6",26),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Cdt(t,n){if(1&t&&(_(0,"div",27)(1,"h6"),O(2,"Tournament"),x(),pe(3,"hr",28),_(4,"div",2)(5,"div",3)(6,"div",4)(7,"label",29),O(8,"Title"),x()(),pe(9,"input",30),x(),_(10,"div",3)(11,"div",4)(12,"label",31),O(13,"Description"),x()(),pe(14,"input",32),x()(),_(15,"div",2)(16,"div",3)(17,"div",4)(18,"label",33),O(19,"Category"),x()(),pe(20,"input",34),x(),_(21,"div",3)(22,"div",4)(23,"label",35),O(24,"Max Num Score"),x()(),pe(25,"input",36),x()(),_(26,"div",2)(27,"div",3)(28,"div",4)(29,"label",37),O(30,"Size"),x()(),pe(31,"input",38),x(),_(32,"div",3)(33,"div",4)(34,"label",39),O(35,"Max Size"),x()(),pe(36,"input",40),x()(),_(37,"div",2)(38,"div",3)(39,"div",4)(40,"label",41),O(41,"Duration"),x()(),pe(42,"input",42),x(),_(43,"div",3)(44,"div",4)(45,"label",43),O(46,"Join Required"),x()(),pe(47,"input",44),x()(),_(48,"div",2)(49,"div",3)(50,"div",4)(51,"label",45),O(52,"Start Time"),x()(),pe(53,"input",46),x(),_(54,"div",3)(55,"div",4)(56,"label",47),O(57,"End Time"),x()(),pe(58,"input",48),x()(),_(59,"div",2)(60,"div",3)(61,"div",4)(62,"label",49),O(63,"Start Active"),x()(),pe(64,"input",50),x(),_(65,"div",3)(66,"div",4)(67,"label",51),O(68,"End Active"),x()(),pe(69,"input",52),x()()()),2&t){const e=$();w(9),S("value",e.leaderboard.title),w(5),S("value",e.leaderboard.description),w(6),S("value",e.leaderboard.category),w(5),S("value",e.leaderboard.max_num_score),w(6),S("value",e.leaderboard.size),w(5),S("value",e.leaderboard.max_size),w(6),S("value",e.leaderboard.duration),w(5),S("value",e.leaderboard.join_required),w(6),S("value",e.leaderboard.start_time),w(5),S("value",e.leaderboard.end_time),w(6),S("value",e.leaderboard.start_active),w(5),S("value",e.leaderboard.end_active)}}let Sdt=(()=>{class t{route;editor;orderString={0:"Ascending",1:"Descending"};operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"};jsonEditor;leaderboard;error="";constructor(e){this.route=e}ngOnInit(){this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}ngAfterViewInit(){this.jsonEditor=new Rp({target:this.editor.nativeElement,props:{mode:Lo.text,readOnly:!0,content:{text:this.leaderboard.metadata??""}}})}static \u0275fac=function(i){return new(i||t)(de(Pr))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&xo(xdt,5),2&i){let o;wn(o=Cn())&&(r.editor=o.first)}},decls:50,vars:10,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["type","text","id","prev_reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["type","text","id","next_reset","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3","jsoneditor",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(i,r){1&i&&(Z(0,wdt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),O(6,"ID"),x()(),pe(7,"input",6),x(),_(8,"div",3)(9,"div",4)(10,"label",7),O(11,"Authoritative"),x()(),pe(12,"input",8),x()(),_(13,"div",2)(14,"div",3)(15,"div",4)(16,"label",9),O(17,"Sort Order"),x()(),pe(18,"input",10),x(),_(19,"div",3)(20,"div",4)(21,"label",11),O(22,"Operator"),x()(),pe(23,"input",12),x()(),_(24,"div",2)(25,"div",3)(26,"div",4)(27,"label",13),O(28,"Reset Schedule"),x()(),pe(29,"input",14),x(),_(30,"div",3)(31,"div",4)(32,"label",15),O(33,"Create Time"),x()(),pe(34,"input",16),x()(),_(35,"div",17)(36,"div",3)(37,"div",4)(38,"label",13),O(39,"Prev Reset"),x()(),pe(40,"input",18),x(),_(41,"div",3)(42,"div",4)(43,"label",15),O(44,"Next Reset"),x()(),pe(45,"input",19),x()()(),Z(46,Cdt,70,12,"div",20),_(47,"div",21),pe(48,"div",22,23),x()),2&i&&(S("ngIf",r.error),w(7),S("value",r.leaderboard.id),w(5),S("value",r.leaderboard.authoritative),w(6),S("value",r.orderString[r.leaderboard.sort_order]),w(5),S("value",r.operatorString[r.leaderboard.operator]),w(6),S("value",r.leaderboard.reset_schedule),w(5),S("value",r.leaderboard.create_time),w(6),S("value",r.leaderboard.prev_reset),w(5),S("value",r.leaderboard.next_reset),w(1),S("ngIf",r.leaderboard.tournament))},dependencies:[vn,po],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:solid 1px #dadae9;padding-bottom:1.5em}"]})}return t})();function kdt(t,n){if(1&t&&(_(0,"ngb-alert",19),pe(1,"img",20),_(2,"h6",21),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("An error occurred: ",e.error,"")}}function Ddt(t,n){1&t&&(_(0,"th",22),O(1,"Remove"),x())}function Tdt(t,n){1&t&&(_(0,"tr")(1,"td",23),O(2,"No records found."),x()())}function Edt(t,n){1&t&&pe(0,"div",28)}function Adt(t,n){1&t&&pe(0,"div",29)}function Mdt(t,n){if(1&t){const e=vt();_(0,"td",30)(1,"button",31),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteRecord(r,s,a))}),O(2,"Delete"),x()()}}function Odt(t,n){if(1&t&&(_(0,"tr")(1,"td",32)(2,"pre",33)(3,"small"),O(4),x()()()()),2&t){const e=$().$implicit;w(4),bt(e.metadata)}}function Idt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",24),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.recordsMetadataOpen[o]=!s.recordsMetadataOpen[o])}),Z(3,Edt,1,0,"div",25),Z(4,Adt,1,0,"div",26),x(),O(5),x(),_(6,"td"),O(7),x(),_(8,"td"),O(9),x(),_(10,"td"),O(11),x(),_(12,"td"),O(13),x(),_(14,"td"),O(15),x(),_(16,"td"),O(17),x(),Z(18,Mdt,3,0,"td",27),x(),Z(19,Odt,5,1,"tr",17)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.recordsMetadataOpen[e]),w(1),S("ngIf",r.recordsMetadataOpen[e]),w(1),mn(" ",i.owner_id," "),w(2),bt(i.username),w(2),bt(i.score),w(2),bt(i.subscore),w(2),bt(i.rank),w(2),bt(i.num_score),w(2),bt(i.expiry_time?i.expiry_time:"-"),w(1),S("ngIf",r.deleteAllowed()),w(1),S("ngIf",r.recordsMetadataOpen[e])}}let Ndt=(()=>{class t{route;consoleService;authService;deleteConfirmService;error="";leaderboard;records=[];recordsMetadataOpen=[];nextCursor="";prevCursor="";constructor(e,i,r,o){this.route=e,this.consoleService=i,this.authService=r,this.deleteConfirmService=o}ngOnInit(){this.route.data.subscribe(e=>{this.records.length=0,this.records.push(...e[0].records),this.nextCursor=e[0].next_cursor,this.prevCursor=e[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},e=>{this.error=e}),this.route.parent.data.subscribe(e=>{this.leaderboard=e[0]},e=>{this.error=e})}loadRecords(e){let i="";switch(e){case-1:i=this.prevCursor;break;case 0:i="";break;case 1:i=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,i,null).subscribe(r=>{this.error="",this.nextCursor=r.next_cursor,this.prevCursor=r.prev_cursor,this.records.length=0,this.records.push(...r.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},r=>{this.error=r})}deleteRecord(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",r.leaderboard_id,r.owner_id).subscribe(()=>{this.error="",this.records.splice(i,1),this.recordsMetadataOpen.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi),de(zo),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(i,r){1&i&&(Z(0,kdt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),pe(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return r.loadRecords(0)}),pe(7,"img",7),x(),_(8,"button",6),ye("click",function(){return r.loadRecords(-1)}),pe(9,"img",8),x(),_(10,"button",6),ye("click",function(){return r.loadRecords(1)}),pe(11,"img",9),x()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th",13),O(17,"Owner ID"),x(),_(18,"th"),O(19,"Username"),x(),_(20,"th",14),O(21,"Score"),x(),_(22,"th",14),O(23,"Subscore"),x(),_(24,"th",14),O(25,"Rank"),x(),_(26,"th",14),O(27,"No. of scores"),x(),_(28,"th",15),O(29,"Expiry Time"),x(),Z(30,Ddt,2,0,"th",16),x()(),_(31,"tbody"),Z(32,Tdt,3,0,"tr",17),Z(33,Idt,20,11,"ng-template",18),x()()()),2&i&&(S("ngIf",r.error),w(6),S("disabled",0===r.records.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(20),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.records.length),w(1),S("ngForOf",r.records))},dependencies:[Ln,vn,po]})}return t})(),Fdt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",r,null,100,null,null)}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const Pdt=["editorReq"],jdt=["editorVars"],Rdt=["editorRes"];function Ldt(t,n){if(1&t&&(_(0,"ngb-alert",27),pe(1,"img",28),_(2,"h6",29),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error invoking RPC call: ",e.error,"")}}function $dt(t,n){if(1&t&&(_(0,"option",30),O(1),x()),2&t){const e=n.$implicit;Ph("value",e.method),w(1),bt(e.method)}}function Bdt(t,n){if(1&t&&(_(0,"option",30),O(1),x()),2&t){const e=n.$implicit;Ph("value",e.method),w(1),bt(e.method)}}function Vdt(t,n){if(1&t){const e=vt();_(0,"button",31),ye("click",function(){return Be(e),Ve($().addSessionVars())}),O(1,"Add Session Variables"),x()}}let Hdt=(()=>{class t{route;router;consoleService;formBuilder;editorReq;editorVars;editorRes;jsonEditorReq;jsonEditorVars;jsonEditorRes;error="";rpcEndpoints=[];endpoints=[];endpointCallForm;addVars=!1;constructor(e,i,r,o){this.route=e,this.router=i,this.consoleService=r,this.formBuilder=o}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Co.required],user_id:[""]}),this.f.method.valueChanges.subscribe(i=>{const r=this.endpoints.concat(this.rpcEndpoints).find(o=>o.method===i?o:null);this.updateQueryParam(r.method),this.setupRequestBody(r.body_template)}),this.route.data.subscribe(i=>{const r=i[0];this.endpoints.length=0,this.endpoints.push(...r.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...r.rpc_endpoints)},i=>{this.error=i});const e=this.endpoints.concat(this.rpcEndpoints).find(i=>i.method===this.route.snapshot.queryParamMap.get("endpoint")?i:null);null!=e&&this.f.method.setValue(e.method)}ngAfterViewInit(){this.jsonEditorReq=new Rp({target:this.editorReq.nativeElement,props:{mode:Lo.text,readOnly:!0}}),this.jsonEditorVars=new Rp({target:this.editorVars.nativeElement,props:{mode:Lo.text}}),this.jsonEditorRes=new Rp({target:this.editorRes.nativeElement,props:{mode:Lo.text,readOnly:!0}})}sendRequest(){this.error="";let e="";try{e=Zm(this.jsonEditorReq.get()).text}catch(s){return void(this.error=s)}let i={};try{const s=Zm(this.jsonEditorVars.get()).text;if(""!==s){const a=JSON.parse(s);Object.keys(a).forEach(l=>{if("string"!=typeof l)throw new Error(`Invalid session variables: ${l} must be a string`);if("string"!=typeof a[l])throw new Error(`Invalid session variables: ${a[l]} must be a string`)}),i=a}}catch(s){return void(this.error=s)}const r={user_id:this.f.user_id.value,body:e,session_vars:i};let o=null;o=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,r):this.consoleService.callApiEndpoint("",this.f.method.value,r),o.subscribe(s=>{if(s.error_message&&""!==s.error_message)this.jsonEditorRes.set({json:s.error_message});else{e="";try{e=""===s.body?s.body:JSON.stringify(JSON.parse(s.body),null,2)}catch(a){return void(this.error=a)}this.jsonEditorRes.set({text:e})}},s=>{this.jsonEditorRes.set({text:""}),this.error=s})}isRpcEndpoint(e){return null!=this.rpcEndpoints.find(i=>i.method===e?i:null)}setupRequestBody(e){if(null!=this.jsonEditorReq){if(!e||""===e)return this.jsonEditorReq.set({text:""}),void this.jsonEditorReq.updateProps({readOnly:!this.isRpcEndpoint(this.f.method.value)});try{const i=JSON.stringify(JSON.parse(e),null,2);this.jsonEditorReq.set({text:i}),this.jsonEditorReq.updateProps({readOnly:!1})}catch(i){return void(this.error=i)}}}updateQueryParam(e){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:e},queryParamsHandling:"merge"})}addSessionVars(){this.addVars=!0,this.jsonEditorVars.set({json:{"":"","":""}})}get f(){return this.endpointCallForm.controls}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],viewQuery:function(i,r){if(1&i&&(xo(Pdt,5),xo(jdt,5),xo(Rdt,5)),2&i){let o;wn(o=Cn())&&(r.editorReq=o.first),wn(o=Cn())&&(r.editorVars=o.first),wn(o=Cn())&&(r.editorRes=o.first)}},decls:43,vars:8,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","btn btn-primary","type","button",3,"click",4,"ngIf"],[1,"row","mb-3",3,"hidden"],[1,"col-md-6","py-3"],[1,"text-muted","pt-2"],[1,"card","p-2","mb-3","jsoneditor"],[2,"height","200px"],["editorVars",""],[1,"row","mb-3"],[1,"col-lg-6","py-3"],[2,"height","500px"],["editorReq",""],["editorRes",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"API Explorer"),x(),Z(2,Ldt,4,2,"ngb-alert",1),_(3,"div",2)(4,"div",3)(5,"div",4)(6,"form",5),ye("ngSubmit",function(){return r.sendRequest()}),_(7,"div",6)(8,"div",7)(9,"select",8)(10,"option",9),O(11,"Select Endpoint"),x(),Z(12,$dt,2,2,"option",10),_(13,"option",11),O(14,"----"),x(),Z(15,Bdt,2,2,"option",10),x()(),pe(16,"input",12),_(17,"div",13)(18,"button",14),O(19,"Send Request"),x()()()()()()(),Z(20,Vdt,2,0,"button",15),_(21,"div",16)(22,"div",17)(23,"h5"),O(24,"Session Vars"),x(),_(25,"div",18),O(26,"Add variables as object of string to string key-value pairs."),x(),_(27,"div",19),pe(28,"div",20,21),x()()(),_(30,"div",22)(31,"div",23)(32,"h5"),O(33,"Request Body"),x(),_(34,"div",19),pe(35,"div",24,25),x()(),_(37,"div",23)(38,"h5"),O(39,"Response"),x(),_(40,"div",19),pe(41,"div",24,26),x()()()),2&i&&(w(2),S("ngIf",r.error),w(4),S("formGroup",r.endpointCallForm),w(4),S("value",""),w(2),S("ngForOf",r.rpcEndpoints),w(3),S("ngForOf",r.endpoints),w(3),S("disabled",r.f.method.invalid),w(2),S("ngIf",!r.addVars),w(1),S("hidden",!r.addVars))},dependencies:[Ln,vn,po,fa,HC,UC,Qs,kv,da,ha,js,Zs],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}"]})}return t})(),Udt=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){return this.consoleService.listApiEndpoints("")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function zdt(t,n){if(1&t&&(_(0,"ngb-alert",16),pe(1,"img",17),_(2,"h6",18),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while processing request: ",e.error,"")}}function Gdt(t,n){1&t&&(_(0,"th"),O(1,"User ID"),x())}function Wdt(t,n){1&t&&pe(0,"div",23)}function qdt(t,n){1&t&&pe(0,"div",24)}function Ydt(t,n){if(1&t&&(_(0,"td"),O(1),x()),2&t){const e=$().$implicit;w(1),bt(e.user_id)}}function Xdt(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),O(6,"Provider Response"),x()()(),_(7,"div")(8,"pre",28)(9,"small"),O(10),x()()()()()()),2&t){const e=$().$implicit;w(10),bt(e.provider_response)}}function Jdt(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.purchasesRowsOpen[o]=!s.purchasesRowsOpen[o])}),Z(3,Wdt,1,0,"div",20),Z(4,qdt,1,0,"div",21),x(),O(5),x(),Z(6,Ydt,2,1,"td",13),_(7,"td"),O(8),x(),_(9,"td"),O(10),x(),_(11,"td"),O(12),x(),_(13,"td"),O(14),x(),_(15,"td"),O(16),x()(),Z(17,Xdt,11,1,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.purchasesRowsOpen[e]),w(1),S("ngIf",r.purchasesRowsOpen[e]),w(1),mn(" ",i.transaction_id," "),w(1),S("ngIf",!r.userId),w(2),bt(i.product_id),w(2),bt(r.getStoreText(i.store)),w(2),bt(i.purchase_time),w(2),bt(i.create_time),w(2),bt(r.getRefundText(i.refund_time)),w(1),S("ngIf",r.purchasesRowsOpen[e])}}function Kdt(t,n){1&t&&(_(0,"tr")(1,"td",29),O(2,"No purchases were found."),x()())}let ave=(()=>{class t{route;consoleService;purchases=[];purchasesRowsOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;transactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.route.data.subscribe(i=>{this.purchases=i[0].validated_purchases,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.transactionId.firstChange||(this.transactionId?(this.transactionId=this.transactionId.trim(),this.consoleService.getPurchase("",this.transactionId).subscribe(i=>{this.purchases=[i]},i=>{this.error=i})):""===this.transactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listPurchases("",this.userId,this.limit,e).subscribe(i=>{this.purchases=i.validated_purchases,this.purchasesRowsOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(zy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["app-purchases"]],inputs:{transactionId:["transaction_id","transactionId"]},features:[Yn],decls:32,vars:7,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[4,"ngIf"],[2,"width","180px"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","6"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","6",1,"text-muted"]],template:function(i,r){1&i&&(Z(0,zdt,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),pe(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return r.loadData("")}),pe(7,"img",7),x(),_(8,"button",6),ye("click",function(){return r.loadData(r.prevCursor)}),pe(9,"img",8),x(),_(10,"button",6),ye("click",function(){return r.loadData(r.nextCursor)}),pe(11,"img",9),x()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),O(17,"Transaction ID"),x(),Z(18,Gdt,2,0,"th",13),_(19,"th"),O(20,"Product ID"),x(),_(21,"th"),O(22,"Store"),x(),_(23,"th",14),O(24,"Purchase Time"),x(),_(25,"th",14),O(26,"Create Time"),x(),_(27,"th",14),O(28,"Refund Time"),x()()(),_(29,"tbody"),Z(30,Jdt,18,10,"ng-template",15),Z(31,Kdt,3,0,"tr",13),x()()()),2&i&&(S("ngIf",r.error),w(6),S("disabled",0===r.purchases.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(8),S("ngIf",!r.userId),w(12),S("ngForOf",r.purchases),w(1),S("ngIf",0===r.purchases.length))},dependencies:[Ln,vn,po]})}return t})(),lve=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listPurchases("",r,100,"")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Qdt(t,n){1&t&&(_(0,"span"),O(1,"Filter by type"),x())}function Zdt(t,n){if(1&t&&(_(0,"span"),O(1),x()),2&t){const e=$();w(1),bt(e.activeFilter)}}function eht(t,n){if(1&t){const e=vt();_(0,"button",39),ye("click",function(){const o=Be(e).$implicit;return Ve($().activeFilter=o)}),O(1),x()}if(2&t){const e=n.$implicit;w(1),bt(e)}}function tht(t,n){if(1&t&&(_(0,"h6"),O(1),x()),2&t){const e=$();w(1),mn("Showing results for chat room label: ",e.f1.label.value,"")}}const nht=function(t){return["/groups",t]};function iht(t,n){if(1&t&&(_(0,"h6"),O(1,"Showing results for group ID: "),_(2,"a",40),O(3),x()()),2&t){const e=$();w(2),S("routerLink",sr(2,nht,e.route.snapshot.queryParamMap.get("group_id"))),w(1),bt(e.f2.group_id.value)}}const cve=function(t){return["/accounts",t]};function rht(t,n){if(1&t&&(_(0,"h6"),O(1,"Showing results for user IDs: "),_(2,"a",40),O(3),x(),O(4,", "),_(5,"a",40),O(6),x()()),2&t){const e=$();w(2),S("routerLink",sr(4,cve,e.route.snapshot.queryParamMap.get("user_id_one"))),w(1),bt(e.f3.user_id_one.value),w(2),S("routerLink",sr(6,cve,e.route.snapshot.queryParamMap.get("user_id_two"))),w(1),bt(e.f3.user_id_two.value)}}function oht(t,n){if(1&t&&(_(0,"ngb-alert",41),pe(1,"img",42),_(2,"h6",43),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error when querying messages: ",e.error,"")}}function sht(t,n){1&t&&(_(0,"th",44),O(1,"Remove"),x())}function aht(t,n){if(1&t&&(_(0,"tr")(1,"td",45),O(2,"No messages found."),x()()),2&t){const e=$();w(1),ut("colspan",e.deleteAllowed()?6:5)}}function lht(t,n){1&t&&pe(0,"div",54)}function cht(t,n){1&t&&pe(0,"div",55)}function uht(t,n){1&t&&pe(0,"td")}function dht(t,n){if(1&t){const e=vt();_(0,"td",56)(1,"button",57),ye("click",function(r){Be(e);const o=$(),s=o.index,a=o.$implicit;return Ve($().deleteMessage(r,s,a))}),O(2,"Delete"),x()()}}function hht(t,n){if(1&t&&(_(0,"tr",58)(1,"td"),O(2),x()()),2&t){const e=$().$implicit,i=$();w(1),ut("colspan",i.deleteAllowed()?6:5),w(1),mn(" ",e.content," ")}}function fht(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td"),O(2),x(),_(3,"td",46),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(4),x(),_(5,"td",47),ye("click",function(){const o=Be(e).$implicit;return Ve($().viewAccount(o))}),O(6),x(),_(7,"td",48)(8,"div",49),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.messageStatesOpen[o]=!s.messageStatesOpen[o])}),Z(9,lht,1,0,"div",50),Z(10,cht,1,0,"div",51),x(),O(11),x(),_(12,"td"),O(13),x(),Z(14,uht,1,0,"td",3),Z(15,dht,3,0,"td",52),x(),Z(16,hht,3,2,"tr",53)}if(2&t){const e=n.$implicit,i=n.index,r=$();w(2),bt(e.code),w(2),bt(e.sender_id),w(2),bt(e.username),w(3),S("ngIf",!r.messageStatesOpen[i]),w(1),S("ngIf",r.messageStatesOpen[i]),w(1),mn(" ",e.content," "),w(2),bt(e.create_time),w(1),S("ngIf",r.deleteAllowed()&&e.sender_id===r.systemUserId),w(1),S("ngIf",r.deleteAllowed()&&e.sender_id!==r.systemUserId),w(1),S("ngIf",r.messageStatesOpen[i])}}function pht(t,n){if(1&t&&(_(0,"ngb-alert",59),pe(1,"img",42),_(2,"h6",43),O(3,"Failed to delete data."),x(),_(4,"p",60),O(5),x()()),2&t){const e=$();S("dismissible",!1),w(5),bt(e.deleteError)}}function mht(t,n){if(1&t){const e=vt();_(0,"ngb-alert",61),ye("close",function(){return Be(e),Ve($().deleteSuccess=!1)}),pe(1,"img",62),_(2,"h6",43),O(3),x()()}if(2&t){const e=$();S("dismissible",!0),w(3),Ef("",e.totalDeleted," messages ",e.totalDeleted>0?"successfully":""," deleted.")}}function ght(t,n){if(1&t){const e=vt();_(0,"button",63),ye("click",function(){return Be(e),Ve($().deleteData())}),O(1,"Delete messages"),x()}2&t&&S("disabled",$().deleting)}let vht=(()=>{class t{route;router;consoleService;authService;formBuilder;modalService;deleteConfirmService;systemUserId="00000000-0000-0000-0000-000000000000";error="";messages=[];nextCursor="";searchForm1;searchForm2;searchForm3;type;confirmDeleteForm;deleteError="";deleteSuccess=!1;deleting=!1;totalDeleted=0;activeFilter="";filters=["Chat Room","Group Chat","Direct Chat"];messageStatesOpen=[];constructor(e,i,r,o,s,a,l){this.route=e,this.router=i,this.consoleService=r,this.authService=o,this.formBuilder=s,this.modalService=a,this.deleteConfirmService=l,this.searchForm1=this.formBuilder.group({label:""}),this.searchForm2=this.formBuilder.group({group_id:""}),this.searchForm3=this.formBuilder.group({user_id_one:"",user_id_two:""}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Co.compose([Co.required,Co.pattern("DELETE")])],numberValueControl:{title:"Choose how many days to retain:",id:"days"},days:30})}ngOnInit(){const e=this.route.snapshot.queryParamMap;this.f1.label.setValue(e.get("label")),this.f2.group_id.setValue(e.get("group_id")),this.f3.user_id_one.setValue(e.get("user_id_one")),this.f3.user_id_two.setValue(e.get("user_id_two")),this.nextCursor=e.get("cursor");const i=e.get("type");this.type=Number(i),this.route.data.subscribe(r=>{r&&(r[0]&&(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...r[0].messages),this.nextCursor=r[0].next_cursor),r.error&&(this.error=r.error))},r=>{this.error=r}),null===i?(this.type=2,this.activeFilter=this.filters[0]):2===this.type||3===this.type||4===this.type?this.activeFilter=this.filters[this.type-2]:this.error="Invalid type."}search(e){let i="";switch(e){case 0:i="";break;case 1:i=this.nextCursor}this.updateMessages(this.type,this.f1.label.value,this.f2.group_id.value,this.f3.user_id_one.value,this.f3.user_id_two.value,i)}updateMessages(e,i,r,o,s,a){switch(e){case 2:this.consoleService.listChannelMessages("",e.toString(),i,null,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 3:this.consoleService.listChannelMessages("",e.toString(),null,r,null,null,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l});break;case 4:this.consoleService.listChannelMessages("",e.toString(),null,null,o,s,encodeURIComponent(a)).subscribe(l=>this.postData(l,a),l=>{this.error=l})}}postData(e,i){let r;switch(this.error="",this.messageStatesOpen=[],this.messages.length=0,this.messages.push(...e.messages),this.nextCursor=e.next_cursor,this.type){case 2:r={type:this.type,label:this.f1.label.value,cursor:i};break;case 3:r={type:this.type,group_id:this.f2.group_id.value,cursor:i};break;case 4:r={type:this.type,user_id_one:this.f3.user_id_one.value,user_id_two:this.f3.user_id_two.value,cursor:i}}this.router.navigate([],{relativeTo:this.route,queryParams:r})}deleteMessage(e,i,r){this.deleteConfirmService.openDeleteConfirmModal(()=>{e.target.disabled=!0,e.preventDefault(),this.error="",this.consoleService.deleteChannelMessages("",null,[r.message_id]).subscribe(()=>{this.error="",this.messageStatesOpen.splice(i,1),this.messages.splice(i,1)},o=>{this.error=o})})}deleteAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}deleteMessagesAllowed(){return this.authService.sessionRole<=ti.USER_ROLE_MAINTAINER}get f1(){return this.searchForm1.controls}get f2(){return this.searchForm2.controls}get f3(){return this.searchForm3.controls}get f(){return this.confirmDeleteForm.controls}deleteData(){this.deleteConfirmService.openDeleteConfirmModal(e=>{this.deleteError="",this.deleting=!0;const i=new Date,r=Number(e.days);i.setDate(i.getDate()-r),this.consoleService.deleteChannelMessages("",i.toISOString(),null).subscribe(o=>{this.totalDeleted=Number(o.total),this.deleting=!1,this.deleteError="",this.deleteSuccess=!0;const s=this.route.snapshot.queryParamMap,a=s.get("type");let l=s.get("label");l||(l="0");const c=s.get("group_id"),u=s.get("user_id_one"),d=s.get("user_id_two");let h=s.get("cursor");h||(h=""),a&&this.updateMessages(Number(a),l,c,u,d,h)},o=>{this.deleting=!1,this.deleteError=o})},this.confirmDeleteForm,"Delete messages","Are you sure you want to delete all messages before retain days?")}viewAccount(e){this.router.navigate(["/accounts",e.sender_id],{relativeTo:this.route})}static \u0275fac=function(i){return new(i||t)(de(Pr),de(_r),de(bi),de(zo),de(Na),de(f2),de(Hl))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:68,vars:21,consts:[[1,"pb-1"],["ngbDropdown","",1,"btn-group","mb-1"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"hidden","formGroup"],[1,"input-group"],["type","text","formControlName","label","placeholder","Search by chat room label",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","submit",1,"btn","btn-primary","dropdown-radius-left",3,"click"],["type","text","formControlName","group_id","placeholder","Search by group ID",1,"form-control","border-right-0"],["type","text","formControlName","user_id_one","placeholder","Search by user ID 1",1,"form-control","border-right-0"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","text","formControlName","user_id_two","placeholder","Search by user ID 2",1,"form-control","border-right-0"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Search",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered",2,"table-layout","fixed"],[1,"thead-light"],[2,"width","60px"],[2,"width","320px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",3,"dismissible",4,"ngIf"],["type","success",3,"dismissible","close",4,"ngIf"],["role","alert",1,"d-flex","justify-content-between","align-items-center"],["type","button","class","btn btn-danger",3,"disabled","click",4,"ngIf"],["type","button","ngbDropdownItem","",3,"click"],[2,"width","100%",3,"routerLink"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[1,"text-muted"],[3,"click"],[2,"text-overflow","ellipsis","overflow","hidden",3,"click"],[2,"white-space","nowrap","text-overflow","ellipsis","overflow","hidden"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],[1,"open-row"],["type","danger",3,"dismissible"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-danger",3,"disabled","click"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Chat Messages"),x(),_(2,"div",1)(3,"button",2),Z(4,Qdt,2,0,"span",3),Z(5,Zdt,2,1,"span",3),x(),_(6,"div",4),Z(7,eht,2,1,"button",5),x()(),_(8,"div",6)(9,"div",7)(10,"div",8)(11,"form",9)(12,"div",10),pe(13,"input",11),_(14,"div",12)(15,"div",13)(16,"button",14),ye("click",function(){return r.type=2,r.search(0)}),O(17,"Search"),x()()()()(),_(18,"form",9)(19,"div",10),pe(20,"input",15),_(21,"div",12)(22,"div",13)(23,"button",14),ye("click",function(){return r.type=3,r.search(0)}),O(24,"Search "),x()()()()(),_(25,"form",9)(26,"div",10),pe(27,"input",16),_(28,"div",12)(29,"span",17),ye("click",function(){return r.f3.user_id_one.setValue(r.systemUserId)}),pe(30,"img",18),x()(),pe(31,"input",19),_(32,"div",12)(33,"div",13)(34,"button",14),ye("click",function(){return r.type=4,r.search(0)}),O(35,"Search "),x()()()()()(),_(36,"div",20)(37,"div",21)(38,"button",22),ye("click",function(){return r.search(0)}),pe(39,"img",23),x(),_(40,"button",22),ye("click",function(){return r.search(1)}),pe(41,"img",24),x()()()()(),Z(42,tht,2,1,"h6",3),Z(43,iht,4,4,"h6",3),Z(44,rht,7,8,"h6",3),Z(45,oht,4,2,"ngb-alert",25),_(46,"div",26)(47,"table",27)(48,"thead",28)(49,"tr")(50,"th",29),O(51,"Code"),x(),_(52,"th",30),O(53,"Sender ID"),x(),_(54,"th",31),O(55,"Username"),x(),_(56,"th"),O(57,"Content"),x(),_(58,"th",32),O(59,"Create Time"),x(),Z(60,sht,2,0,"th",33),x()(),_(61,"tbody"),Z(62,aht,3,1,"tr",3),Z(63,fht,17,10,"ng-template",34),x()()(),Z(64,pht,6,2,"ngb-alert",35),Z(65,mht,4,3,"ngb-alert",36),_(66,"div",37),Z(67,ght,2,1,"button",38),x()),2&i&&(w(4),S("ngIf",!r.activeFilter||""===r.activeFilter),w(1),S("ngIf",r.activeFilter&&""!==r.activeFilter),w(2),S("ngForOf",r.filters),w(4),S("hidden","Chat Room"!==r.activeFilter)("formGroup",r.searchForm1),w(7),S("hidden","Group Chat"!==r.activeFilter)("formGroup",r.searchForm2),w(7),S("hidden","Direct Chat"!==r.activeFilter)("formGroup",r.searchForm3),w(13),S("disabled",0===r.messages.length),w(2),S("disabled",""===r.nextCursor||null===r.nextCursor),w(2),S("ngIf",0!=r.messages.length&&""===r.error&&2==r.type),w(1),S("ngIf",0!=r.messages.length&&""===r.error&&3==r.type),w(1),S("ngIf",0!=r.messages.length&&""===r.error&&4==r.type),w(1),S("ngIf",r.error),w(15),S("ngIf",r.deleteAllowed()),w(2),S("ngIf",0===r.messages.length),w(1),S("ngForOf",r.messages),w(1),S("ngIf",r.deleteError),w(1),S("ngIf",r.deleteSuccess),w(2),S("ngIf",r.deleteMessagesAllowed()))},dependencies:[Ou,Ln,vn,po,Ru,wm,qf,Wf,fa,Qs,da,ha,js,Zs],styles:[".input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}.dropdown-radius-left[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.open-row[_ngcontent-%COMP%]{background:#FAFAFC}"]})}return t})(),yht=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=Number(e.queryParamMap.get("type"));switch(r){case 2:return this.consoleService.listChannelMessages("",r.toString(),e.queryParamMap.get("label"),null,null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))));case 3:return this.consoleService.listChannelMessages("",r.toString(),null,e.queryParamMap.get("group_id"),null,null,encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))));case 4:return this.consoleService.listChannelMessages("",r.toString(),null,null,e.queryParamMap.get("user_id_one"),e.queryParamMap.get("user_id_two"),encodeURIComponent(e.queryParamMap.get("cursor"))).pipe(Ll(o=>(e.data={...e.data,error:o},Rn(null))));default:return Rn(null)}}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function _ht(t,n){if(1&t&&(_(0,"ngb-alert",16),pe(1,"img",17),_(2,"h6",18),O(3),x()()),2&t){const e=$();S("dismissible",!1),w(3),mn("Error while processing request: ",e.error,"")}}function bht(t,n){1&t&&pe(0,"div",23)}function xht(t,n){1&t&&pe(0,"div",24)}function wht(t,n){if(1&t&&(_(0,"tr",25)(1,"td",26)(2,"div",27)(3,"div")(4,"small")(5,"b"),O(6,"Provider Response"),x()()(),_(7,"div")(8,"pre",28)(9,"small"),O(10),x()()(),_(11,"div",29)(12,"small")(13,"b"),O(14,"Provider Notification"),x()()(),_(15,"div")(16,"pre",28)(17,"small"),O(18),x()()()()()()),2&t){const e=$().$implicit;w(10),bt(e.provider_response),w(8),bt(e.provider_notification)}}function Cht(t,n){if(1&t){const e=vt();_(0,"tr")(1,"td")(2,"div",19),ye("click",function(){const o=Be(e).index,s=$();return Ve(s.subscriptionsRowOpen[o]=!s.subscriptionsRowOpen[o])}),Z(3,bht,1,0,"div",20),Z(4,xht,1,0,"div",21),x(),O(5),x(),_(6,"td"),O(7),x(),_(8,"td"),O(9),x(),_(10,"td"),O(11),x(),_(12,"td"),O(13),x(),_(14,"td"),O(15),x(),_(16,"td"),O(17),x()(),Z(18,wht,19,2,"tr",22)}if(2&t){const e=n.index,i=n.$implicit,r=$();w(3),S("ngIf",!r.subscriptionsRowOpen[e]),w(1),S("ngIf",r.subscriptionsRowOpen[e]),w(1),mn(" ",i.product_id," "),w(2),bt(i.original_transaction_id),w(2),bt(r.getStoreText(i.store)),w(2),bt(i.purchase_time),w(2),bt(i.expiry_time),w(2),bt(i.create_time),w(2),bt(r.getRefundText(i.refund_time)),w(1),S("ngIf",r.subscriptionsRowOpen[e])}}function Sht(t,n){1&t&&(_(0,"tr")(1,"td",30),O(2,"No subscriptions were found."),x()())}let uve=(()=>{class t{route;consoleService;subscriptions=[];subscriptionsRowOpen=[];error="";nextCursor="";prevCursor="";userId;limit=100;originalTransactionId;constructor(e,i){this.route=e,this.consoleService=i}ngOnInit(){const e=this.route?.parent?.snapshot?.paramMap?.get("id")??"";e&&(this.userId=e),this.userId=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(i=>{this.subscriptions=i[0].validated_subscriptions,this.nextCursor=i[0].cursor,this.prevCursor=i[0].prev_cursor})}ngOnChanges(e){e.originalTransactionId.firstChange||(this.originalTransactionId?(this.originalTransactionId=this.originalTransactionId.trim(),this.consoleService.getSubscription("",this.originalTransactionId).subscribe(i=>{this.subscriptions=[i]},i=>{this.error=i})):""===this.originalTransactionId&&this.loadData(""))}loadData(e){this.error="",this.consoleService.listSubscriptions("",this.userId,this.limit,e).subscribe(i=>{this.subscriptions=i.validated_subscriptions,this.subscriptionsRowOpen=[],this.nextCursor=i.cursor,this.prevCursor=i.prev_cursor},i=>{this.error=i})}getStoreText(e){return this.formatStoreText(zy[e])}getRefundText(e){return"1970-01-01T00:00:00Z"===e?"":e}formatStoreText(e){return e.split("_").map(i=>i[0]+i.slice(1).toLowerCase()).join(" ")}static \u0275fac=function(i){return new(i||t)(de(Pr),de(bi))};static \u0275cmp=Rt({type:t,selectors:[["app-subscriptions"]],inputs:{originalTransactionId:["original_transaction_id","originalTransactionId"]},features:[Yn],decls:33,vars:6,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],[1,"pt-2"],["colspan","7",1,"text-muted"]],template:function(i,r){1&i&&(Z(0,_ht,4,2,"ngb-alert",0),_(1,"div",1)(2,"div",2),pe(3,"div",3),_(4,"div",4)(5,"div",5)(6,"button",6),ye("click",function(){return r.loadData("")}),pe(7,"img",7),x(),_(8,"button",6),ye("click",function(){return r.loadData(r.prevCursor)}),pe(9,"img",8),x(),_(10,"button",6),ye("click",function(){return r.loadData(r.nextCursor)}),pe(11,"img",9),x()()()()(),_(12,"div",10)(13,"table",11)(14,"thead",12)(15,"tr")(16,"th"),O(17,"Product ID"),x(),_(18,"th"),O(19,"Original Transaction ID"),x(),_(20,"th"),O(21,"Store"),x(),_(22,"th",13),O(23,"Purchase Time"),x(),_(24,"th",13),O(25,"Expiry Time"),x(),_(26,"th",13),O(27,"Create Time"),x(),_(28,"th",13),O(29,"Refund Time"),x()()(),_(30,"tbody"),Z(31,Cht,19,10,"ng-template",14),Z(32,Sht,3,0,"tr",15),x()()()),2&i&&(S("ngIf",r.error),w(6),S("disabled",0===r.subscriptions.length),w(2),S("disabled",""===r.prevCursor),w(2),S("disabled",""===r.nextCursor),w(21),S("ngForOf",r.subscriptions),w(1),S("ngIf",0===r.subscriptions.length))},dependencies:[Ln,vn,po]})}return t})(),dve=(()=>{class t{consoleService;constructor(e){this.consoleService=e}resolve(e,i){const r=e.parent?.paramMap?.get("id")??"";return this.consoleService.listSubscriptions("",r,100,"")}static \u0275fac=function(i){return new(i||t)(gt(bi))};static \u0275prov=Et({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();const kht=[{path:"",component:XPe,canActivate:[m3e],canActivateChild:[JPe],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:sVe,resolve:[aVe]},{path:"config",component:$Ve,resolve:[BVe]},{path:"users",component:GVe,resolve:[WVe]},{path:"modules",component:sHe,resolve:[aHe]},{path:"storage",component:gHe,resolve:[vHe,yHe],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:Elt,resolve:[Alt],pathMatch:"full"},{path:"leaderboards",component:$lt,resolve:[Blt]},{path:"leaderboards/:id",component:_dt,resolve:[bdt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:Sdt,resolve:[]},{path:"records",component:Ndt,resolve:[Fdt]}]},{path:"matches",component:Xut,resolve:[Jut,Kut]},{path:"groups",component:rdt,resolve:[odt]},{path:"groups/:id",component:hdt,resolve:[fdt],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:cut,resolve:[]},{path:"members",component:Aut,resolve:[Mut],runGuardsAndResolvers:"always"}]},{path:"accounts",component:Ylt,resolve:[Xlt]},{path:"accounts/:id",component:lct,resolve:[cct],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:mct,resolve:[]},{path:"authentication",component:bct,resolve:[]},{path:"wallet",component:Ict,resolve:[Nct]},{path:"friends",component:Uct,resolve:[zct]},{path:"groups",component:tut,resolve:[nut]},{path:"purchases",component:ave,resolve:[lve]},{path:"subscriptions",component:uve,resolve:[dve]}]},{path:"apiexplorer",component:Hdt,resolve:[Udt]},{path:"chat",component:vht,resolve:[yht]},{path:"purchases",component:(()=>{class t{formBuilder;transactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({transaction_id:[""]})}search(){this.transactionId=this.f.transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:12,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","transaction_id","placeholder","Search by transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Purchases"),x(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),ye("ngSubmit",function(){return r.search()}),_(6,"div",5),pe(7,"input",6),_(8,"div",7)(9,"button",8),ye("click",function(){return r.search()}),O(10,"Search"),x()()()()()()(),pe(11,"app-purchases",9)),2&i&&(w(5),S("formGroup",r.searchForm),w(6),S("transaction_id",r.transactionId))},dependencies:[fa,Qs,da,ha,js,Zs,ave],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[lve]},{path:"subscriptions",component:(()=>{class t{formBuilder;originalTransactionId;searchForm;constructor(e){this.formBuilder=e}ngOnInit(){this.searchForm=this.formBuilder.group({original_transaction_id:[""]})}search(){this.originalTransactionId=this.f.original_transaction_id.value}get f(){return this.searchForm.controls}static \u0275fac=function(i){return new(i||t)(de(Na))};static \u0275cmp=Rt({type:t,selectors:[["ng-component"]],decls:13,vars:2,consts:[[1,"pb-1"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","original_transaction_id","placeholder","Search by original_transaction_id (purchaseToken for Play Store purchases)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],[3,"original_transaction_id"]],template:function(i,r){1&i&&(_(0,"h2",0),O(1,"Subscriptions"),x(),_(2,"div",1)(3,"div",2)(4,"div",3)(5,"form",4),ye("ngSubmit",function(){return r.search()}),_(6,"div",5),pe(7,"input",6),_(8,"div",7)(9,"div",8)(10,"button",9),ye("click",function(){return r.search()}),O(11,"Search"),x()()()()()()()(),pe(12,"app-subscriptions",10)),2&i&&(w(5),S("formGroup",r.searchForm),w(7),S("original_transaction_id",r.originalTransactionId))},dependencies:[fa,Qs,da,ha,js,Zs,uve],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:transparent;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]})}return t})(),resolve:[dve]}]},{path:"login",component:f3e,canActivate:[p3e]},{path:"**",redirectTo:""}];let Dht=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ki({type:t});static \u0275inj=wi({imports:[LV.forRoot(kht,{useHash:!0}),LV]})}return t})(),Tht=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275cmp=Rt({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(i,r){1&i&&pe(0,"router-outlet")},dependencies:[cm]})}return t})();new class Aht extends Vd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=requestAnimationFrame(()=>n.flush(null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(cancelAnimationFrame(e),n.scheduled=void 0)}});let Oht=1;const Iht=Promise.resolve(),CT={};function hve(t){return t in CT&&(delete CT[t],!0)}const fve={setImmediate(t){const n=Oht++;return CT[n]=!0,Iht.then(()=>hve(n)&&t()),n},clearImmediate(t){hve(t)}};new class Fht extends Vd{flush(n){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;n=n||e.shift();do{if(i=n.execute(n.state,n.delay))break}while(++r0?super.requestAsyncId(n,e,i):(n.actions.push(this),n.scheduled||(n.scheduled=fve.setImmediate(n.flush.bind(n,null))))}recycleAsyncId(n,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(n,e,i);0===n.actions.length&&(fve.clearImmediate(e),n.scheduled=void 0)}});RegExp(/[&<>"']/g.source);const uft=new Vn("ng-select-selection-model");function dft(){return new hft}class hft{constructor(){this._selected=[]}get value(){return this._selected}select(n,e,i){if(n.selected=!0,(!n.children||!e&&i)&&this._selected.push(n),e)if(n.parent){const r=n.parent.children.length,o=n.parent.children.filter(s=>s.selected).length;n.parent.selected=r===o}else n.children&&(this._setChildrenSelectedState(n.children,!0),this._removeChildren(n),this._selected=i&&this._activeChildren(n)?[...this._selected.filter(r=>r.parent!==n),n]:[...this._selected,...n.children.filter(r=>!r.disabled)])}unselect(n,e){if(this._selected=this._selected.filter(i=>i!==n),n.selected=!1,e)if(n.parent&&n.parent.selected){const i=n.parent.children;this._removeParent(n.parent),this._removeChildren(n.parent),this._selected.push(...i.filter(r=>r!==n&&!r.disabled)),n.parent.selected=!1}else n.children&&(this._setChildrenSelectedState(n.children,!1),this._removeChildren(n))}clear(n){this._selected=n?this._selected.filter(e=>e.disabled):[]}_setChildrenSelectedState(n,e){for(const i of n)i.disabled||(i.selected=e)}_removeChildren(n){this._selected=[...this._selected.filter(e=>e.parent!==n),...n.children.filter(e=>e.parent===n&&e.disabled&&e.selected)]}_removeParent(n){this._selected=this._selected.filter(e=>e!==n)}_activeChildren(n){return n.children.every(e=>!e.disabled||e.selected)}}let fft=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=ki({type:t}),t.\u0275inj=wi({providers:[{provide:uft,useValue:dft}],imports:[Mf]}),t})(),pft=(()=>{class t{authenticationService;constructor(e){this.authenticationService=e}intercept(e,i){const r=this.authenticationService.currentSessionValue;return r&&r.token&&(e=e.clone({setHeaders:{Authorization:`Bearer ${r.token}`}})),i.handle(e)}static \u0275fac=function(i){return new(i||t)(gt(zo))};static \u0275prov=Et({token:t,factory:t.\u0275fac})}return t})(),mft=(()=>{class t{authenticationService;router;constructor(e,i){this.authenticationService=e,this.router=i}intercept(e,i){return i.handle(e).pipe(Ll(r=>(401===r.status?this.authenticationService.logout().subscribe({next:()=>{e.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})}}):r.status>=500&&console.log(`${r.status}: + ${r.error.message||r.statusText}`),sm(r.error.message||r.statusText))))}static \u0275fac=function(i){return new(i||t)(gt(zo),gt(_r))};static \u0275prov=Et({token:t,factory:t.\u0275fac})}return t})(),gft=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ki({type:t,bootstrap:[Tht]});static \u0275inj=wi({providers:[u3e,jz,{provide:Y3,useValue:{host:document.location.origin,timeout:15e3}},{provide:W3,useClass:pft,multi:!0},{provide:W3,useClass:mft,multi:!0}],imports:[xVe,Dht,yM,$De,a3e,BPe,$9e,$Me.forRoot({apiKey:"dHl7FTjJ9icepBjEdOCcyMFQYL1BBiQO",debug:!1,loadOnInitialization:!0}),BDe,jMe,PMe,fft]})}return t})();ISe().bootstrapModule(gft).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},343:(Yt,Dn)=>{"use strict";Dn.byteLength=function $e(A){var F=Ze(A),Ae=F[1];return 3*(F[0]+Ae)/4-Ae},Dn.toByteArray=function oe(A){var F,yn,ee=Ze(A),Ae=ee[0],Je=ee[1],St=new Ie(function ge(A,F,ee){return 3*(F+ee)/4-ee}(0,Ae,Je)),Ft=0,Gt=Je>0?Ae-4:Ae;for(yn=0;yn>16&255,St[Ft++]=F>>8&255,St[Ft++]=255&F;return 2===Je&&(F=nt[A.charCodeAt(yn)]<<2|nt[A.charCodeAt(yn+1)]>>4,St[Ft++]=255&F),1===Je&&(F=nt[A.charCodeAt(yn)]<<10|nt[A.charCodeAt(yn+1)]<<4|nt[A.charCodeAt(yn+2)]>>2,St[Ft++]=F>>8&255,St[Ft++]=255&F),St},Dn.fromByteArray=function T(A){for(var F,ee=A.length,Ae=ee%3,Je=[],Ft=0,Gt=ee-Ae;FtGt?Gt:Ft+16383));return 1===Ae?Je.push(ke[(F=A[ee-1])>>2]+ke[F<<4&63]+"=="):2===Ae&&Je.push(ke[(F=(A[ee-2]<<8)+A[ee-1])>>10]+ke[F>>4&63]+ke[F<<2&63]+"="),Je.join("")};for(var ke=[],nt=[],Ie=typeof Uint8Array<"u"?Uint8Array:Array,ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ze=0,be=ct.length;ze0)throw new Error("Invalid string. Length must be a multiple of 4");var ee=A.indexOf("=");return-1===ee&&(ee=F),[ee,ee===F?0:4-ee%4]}function ce(A){return ke[A>>18&63]+ke[A>>12&63]+ke[A>>6&63]+ke[63&A]}function se(A,F,ee){for(var Je=[],St=F;St{"use strict";var Ie=ke(343),ct=ke(461),ze="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;Dn.lW=ge,Dn.h2=50;var be=2147483647;function $e(De){if(De>be)throw new RangeError('The value "'+De+'" is invalid for option "size"');var Y=new Uint8Array(De);return Object.setPrototypeOf(Y,ge.prototype),Y}function ge(De,Y,Q){if("number"==typeof De){if("string"==typeof Y)throw new TypeError('The "string" argument must be of type string. Received type number');return T(De)}return oe(De,Y,Q)}function oe(De,Y,Q){if("string"==typeof De)return function A(De,Y){if(("string"!=typeof Y||""===Y)&&(Y="utf8"),!ge.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);var Q=0|Gt(De,Y),Ne=$e(Q),et=Ne.write(De,Y);return et!==Q&&(Ne=Ne.slice(0,et)),Ne}(De,Y);if(ArrayBuffer.isView(De))return function ee(De){if(la(De,Uint8Array)){var Y=new Uint8Array(De);return Ae(Y.buffer,Y.byteOffset,Y.byteLength)}return F(De)}(De);if(null==De)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof De);if(la(De,ArrayBuffer)||De&&la(De.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(la(De,SharedArrayBuffer)||De&&la(De.buffer,SharedArrayBuffer)))return Ae(De,Y,Q);if("number"==typeof De)throw new TypeError('The "value" argument must not be of type number. Received type number');var Ne=De.valueOf&&De.valueOf();if(null!=Ne&&Ne!==De)return ge.from(Ne,Y,Q);var et=function Je(De){if(ge.isBuffer(De)){var Y=0|St(De.length),Q=$e(Y);return 0===Q.length||De.copy(Q,0,0,Y),Q}return void 0!==De.length?"number"!=typeof De.length||ro(De.length)?$e(0):F(De):"Buffer"===De.type&&Array.isArray(De.data)?F(De.data):void 0}(De);if(et)return et;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof De[Symbol.toPrimitive])return ge.from(De[Symbol.toPrimitive]("string"),Y,Q);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof De)}function ce(De){if("number"!=typeof De)throw new TypeError('"size" argument must be of type number');if(De<0)throw new RangeError('The value "'+De+'" is invalid for option "size"')}function T(De){return ce(De),$e(De<0?0:0|St(De))}function F(De){for(var Y=De.length<0?0:0|St(De.length),Q=$e(Y),Ne=0;Ne=be)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+be.toString(16)+" bytes");return 0|De}function Gt(De,Y){if(ge.isBuffer(De))return De.length;if(ArrayBuffer.isView(De)||la(De,ArrayBuffer))return De.byteLength;if("string"!=typeof De)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof De);var Q=De.length,Ne=arguments.length>2&&!0===arguments[2];if(!Ne&&0===Q)return 0;for(var et=!1;;)switch(Y){case"ascii":case"latin1":case"binary":return Q;case"utf8":case"utf-8":return Nc(De).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Q;case"hex":return Q>>>1;case"base64":return _u(De).length;default:if(et)return Ne?-1:Nc(De).length;Y=(""+Y).toLowerCase(),et=!0}}function yn(De,Y,Q){var Ne=!1;if((void 0===Y||Y<0)&&(Y=0),Y>this.length||((void 0===Q||Q>this.length)&&(Q=this.length),Q<=0)||(Q>>>=0)<=(Y>>>=0))return"";for(De||(De="utf8");;)switch(De){case"hex":return yu(this,Y,Q);case"utf8":case"utf-8":return _n(this,Y,Q);case"ascii":return Kn(this,Y,Q);case"latin1":case"binary":return Ic(this,Y,Q);case"base64":return Ca(this,Y,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Fo(this,Y,Q);default:if(Ne)throw new TypeError("Unknown encoding: "+De);De=(De+"").toLowerCase(),Ne=!0}}function en(De,Y,Q){var Ne=De[Y];De[Y]=De[Q],De[Q]=Ne}function Ai(De,Y,Q,Ne,et){if(0===De.length)return-1;if("string"==typeof Q?(Ne=Q,Q=0):Q>2147483647?Q=2147483647:Q<-2147483648&&(Q=-2147483648),ro(Q=+Q)&&(Q=et?0:De.length-1),Q<0&&(Q=De.length+Q),Q>=De.length){if(et)return-1;Q=De.length-1}else if(Q<0){if(!et)return-1;Q=0}if("string"==typeof Y&&(Y=ge.from(Y,Ne)),ge.isBuffer(Y))return 0===Y.length?-1:$r(De,Y,Q,Ne,et);if("number"==typeof Y)return Y&=255,"function"==typeof Uint8Array.prototype.indexOf?et?Uint8Array.prototype.indexOf.call(De,Y,Q):Uint8Array.prototype.lastIndexOf.call(De,Y,Q):$r(De,[Y],Q,Ne,et);throw new TypeError("val must be string, number or Buffer")}function $r(De,Y,Q,Ne,et){var ot,Ht=1,Kt=De.length,Zi=Y.length;if(void 0!==Ne&&("ucs2"===(Ne=String(Ne).toLowerCase())||"ucs-2"===Ne||"utf16le"===Ne||"utf-16le"===Ne)){if(De.length<2||Y.length<2)return-1;Ht=2,Kt/=2,Zi/=2,Q/=2}function M(hn,fe){return 1===Ht?hn[fe]:hn.readUInt16BE(fe*Ht)}if(et){var Dt=-1;for(ot=Q;otKt&&(Q=Kt-Zi),ot=Q;ot>=0;ot--){for(var Ut=!0,Bt=0;Btet&&(Ne=et):Ne=et;var Ht=Y.length;Ne>Ht/2&&(Ne=Ht/2);for(var Kt=0;Kt>8,Ht.push(Q%256),Ht.push(Ne);return Ht}(Y,De.length-Q),De,Q,Ne)}function Ca(De,Y,Q){return Ie.fromByteArray(0===Y&&Q===De.length?De:De.slice(Y,Q))}function _n(De,Y,Q){Q=Math.min(De.length,Q);for(var Ne=[],et=Y;et239?4:Ht>223?3:Ht>191?2:1;if(et+Zi<=Q)switch(Zi){case 1:Ht<128&&(Kt=Ht);break;case 2:128==(192&(M=De[et+1]))&&(Ut=(31&Ht)<<6|63&M)>127&&(Kt=Ut);break;case 3:ot=De[et+2],128==(192&(M=De[et+1]))&&128==(192&ot)&&(Ut=(15&Ht)<<12|(63&M)<<6|63&ot)>2047&&(Ut<55296||Ut>57343)&&(Kt=Ut);break;case 4:ot=De[et+2],Dt=De[et+3],128==(192&(M=De[et+1]))&&128==(192&ot)&&128==(192&Dt)&&(Ut=(15&Ht)<<18|(63&M)<<12|(63&ot)<<6|63&Dt)>65535&&Ut<1114112&&(Kt=Ut)}null===Kt?(Kt=65533,Zi=1):Kt>65535&&(Ne.push((Kt-=65536)>>>10&1023|55296),Kt=56320|1023&Kt),Ne.push(Kt),et+=Zi}return function Sd(De){var Y=De.length;if(Y<=Cd)return String.fromCharCode.apply(String,De);for(var Q="",Ne=0;Neet.length?ge.from(Kt).copy(et,Ht):Uint8Array.prototype.set.call(et,Kt,Ht);else{if(!ge.isBuffer(Kt))throw new TypeError('"list" argument must be an Array of Buffers');Kt.copy(et,Ht)}Ht+=Kt.length}return et},ge.byteLength=Gt,ge.prototype._isBuffer=!0,ge.prototype.swap16=function(){var Y=this.length;if(Y%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Q=0;QQ&&(Y+=" ... "),""},ze&&(ge.prototype[ze]=ge.prototype.inspect),ge.prototype.compare=function(Y,Q,Ne,et,Ht){if(la(Y,Uint8Array)&&(Y=ge.from(Y,Y.offset,Y.byteLength)),!ge.isBuffer(Y))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Y);if(void 0===Q&&(Q=0),void 0===Ne&&(Ne=Y?Y.length:0),void 0===et&&(et=0),void 0===Ht&&(Ht=this.length),Q<0||Ne>Y.length||et<0||Ht>this.length)throw new RangeError("out of range index");if(et>=Ht&&Q>=Ne)return 0;if(et>=Ht)return-1;if(Q>=Ne)return 1;if(this===Y)return 0;for(var Kt=(Ht>>>=0)-(et>>>=0),Zi=(Ne>>>=0)-(Q>>>=0),M=Math.min(Kt,Zi),ot=this.slice(et,Ht),Dt=Y.slice(Q,Ne),Ut=0;Ut>>=0,isFinite(Ne)?(Ne>>>=0,void 0===et&&(et="utf8")):(et=Ne,Ne=void 0)}var Ht=this.length-Q;if((void 0===Ne||Ne>Ht)&&(Ne=Ht),Y.length>0&&(Ne<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");et||(et="utf8");for(var Kt=!1;;)switch(et){case"hex":return Ur(this,Y,Q,Ne);case"utf8":case"utf-8":return ss(this,Y,Q,Ne);case"ascii":case"latin1":case"binary":return Ya(this,Y,Q,Ne);case"base64":return dr(this,Y,Q,Ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return vu(this,Y,Q,Ne);default:if(Kt)throw new TypeError("Unknown encoding: "+et);et=(""+et).toLowerCase(),Kt=!0}},ge.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Cd=4096;function Kn(De,Y,Q){var Ne="";Q=Math.min(De.length,Q);for(var et=Y;etNe)&&(Q=Ne);for(var et="",Ht=Y;HtQ)throw new RangeError("Trying to access beyond buffer length")}function io(De,Y,Q,Ne,et,Ht){if(!ge.isBuffer(De))throw new TypeError('"buffer" argument must be a Buffer instance');if(Y>et||YDe.length)throw new RangeError("Index out of range")}function Sa(De,Y,Q,Ne,et,Ht){if(Q+Ne>De.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("Index out of range")}function Yr(De,Y,Q,Ne,et){return Y=+Y,Q>>>=0,et||Sa(De,0,Q,4),ct.write(De,Y,Q,Ne,23,4),Q+4}function cl(De,Y,Q,Ne,et){return Y=+Y,Q>>>=0,et||Sa(De,0,Q,8),ct.write(De,Y,Q,Ne,52,8),Q+8}ge.prototype.slice=function(Y,Q){var Ne=this.length;(Y=~~Y)<0?(Y+=Ne)<0&&(Y=0):Y>Ne&&(Y=Ne),(Q=void 0===Q?Ne:~~Q)<0?(Q+=Ne)<0&&(Q=0):Q>Ne&&(Q=Ne),Q>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=this[Y],Ht=1,Kt=0;++Kt>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=this[Y+--Q],Ht=1;Q>0&&(Ht*=256);)et+=this[Y+--Q]*Ht;return et},ge.prototype.readUint8=ge.prototype.readUInt8=function(Y,Q){return Y>>>=0,Q||_o(Y,1,this.length),this[Y]},ge.prototype.readUint16LE=ge.prototype.readUInt16LE=function(Y,Q){return Y>>>=0,Q||_o(Y,2,this.length),this[Y]|this[Y+1]<<8},ge.prototype.readUint16BE=ge.prototype.readUInt16BE=function(Y,Q){return Y>>>=0,Q||_o(Y,2,this.length),this[Y]<<8|this[Y+1]},ge.prototype.readUint32LE=ge.prototype.readUInt32LE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),(this[Y]|this[Y+1]<<8|this[Y+2]<<16)+16777216*this[Y+3]},ge.prototype.readUint32BE=ge.prototype.readUInt32BE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),16777216*this[Y]+(this[Y+1]<<16|this[Y+2]<<8|this[Y+3])},ge.prototype.readIntLE=function(Y,Q,Ne){Y>>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=this[Y],Ht=1,Kt=0;++Kt=(Ht*=128)&&(et-=Math.pow(2,8*Q)),et},ge.prototype.readIntBE=function(Y,Q,Ne){Y>>>=0,Q>>>=0,Ne||_o(Y,Q,this.length);for(var et=Q,Ht=1,Kt=this[Y+--et];et>0&&(Ht*=256);)Kt+=this[Y+--et]*Ht;return Kt>=(Ht*=128)&&(Kt-=Math.pow(2,8*Q)),Kt},ge.prototype.readInt8=function(Y,Q){return Y>>>=0,Q||_o(Y,1,this.length),128&this[Y]?-1*(255-this[Y]+1):this[Y]},ge.prototype.readInt16LE=function(Y,Q){Y>>>=0,Q||_o(Y,2,this.length);var Ne=this[Y]|this[Y+1]<<8;return 32768&Ne?4294901760|Ne:Ne},ge.prototype.readInt16BE=function(Y,Q){Y>>>=0,Q||_o(Y,2,this.length);var Ne=this[Y+1]|this[Y]<<8;return 32768&Ne?4294901760|Ne:Ne},ge.prototype.readInt32LE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),this[Y]|this[Y+1]<<8|this[Y+2]<<16|this[Y+3]<<24},ge.prototype.readInt32BE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),this[Y]<<24|this[Y+1]<<16|this[Y+2]<<8|this[Y+3]},ge.prototype.readFloatLE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),ct.read(this,Y,!0,23,4)},ge.prototype.readFloatBE=function(Y,Q){return Y>>>=0,Q||_o(Y,4,this.length),ct.read(this,Y,!1,23,4)},ge.prototype.readDoubleLE=function(Y,Q){return Y>>>=0,Q||_o(Y,8,this.length),ct.read(this,Y,!0,52,8)},ge.prototype.readDoubleBE=function(Y,Q){return Y>>>=0,Q||_o(Y,8,this.length),ct.read(this,Y,!1,52,8)},ge.prototype.writeUintLE=ge.prototype.writeUIntLE=function(Y,Q,Ne,et){Y=+Y,Q>>>=0,Ne>>>=0,et||io(this,Y,Q,Ne,Math.pow(2,8*Ne)-1,0);var Kt=1,Zi=0;for(this[Q]=255&Y;++Zi>>=0,Ne>>>=0,et||io(this,Y,Q,Ne,Math.pow(2,8*Ne)-1,0);var Kt=Ne-1,Zi=1;for(this[Q+Kt]=255&Y;--Kt>=0&&(Zi*=256);)this[Q+Kt]=Y/Zi&255;return Q+Ne},ge.prototype.writeUint8=ge.prototype.writeUInt8=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,1,255,0),this[Q]=255&Y,Q+1},ge.prototype.writeUint16LE=ge.prototype.writeUInt16LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,65535,0),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},ge.prototype.writeUint16BE=ge.prototype.writeUInt16BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,65535,0),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},ge.prototype.writeUint32LE=ge.prototype.writeUInt32LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,4294967295,0),this[Q+3]=Y>>>24,this[Q+2]=Y>>>16,this[Q+1]=Y>>>8,this[Q]=255&Y,Q+4},ge.prototype.writeUint32BE=ge.prototype.writeUInt32BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,4294967295,0),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},ge.prototype.writeIntLE=function(Y,Q,Ne,et){if(Y=+Y,Q>>>=0,!et){var Ht=Math.pow(2,8*Ne-1);io(this,Y,Q,Ne,Ht-1,-Ht)}var Kt=0,Zi=1,M=0;for(this[Q]=255&Y;++Kt>0)-M&255;return Q+Ne},ge.prototype.writeIntBE=function(Y,Q,Ne,et){if(Y=+Y,Q>>>=0,!et){var Ht=Math.pow(2,8*Ne-1);io(this,Y,Q,Ne,Ht-1,-Ht)}var Kt=Ne-1,Zi=1,M=0;for(this[Q+Kt]=255&Y;--Kt>=0&&(Zi*=256);)Y<0&&0===M&&0!==this[Q+Kt+1]&&(M=1),this[Q+Kt]=(Y/Zi>>0)-M&255;return Q+Ne},ge.prototype.writeInt8=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,1,127,-128),Y<0&&(Y=255+Y+1),this[Q]=255&Y,Q+1},ge.prototype.writeInt16LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,32767,-32768),this[Q]=255&Y,this[Q+1]=Y>>>8,Q+2},ge.prototype.writeInt16BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,2,32767,-32768),this[Q]=Y>>>8,this[Q+1]=255&Y,Q+2},ge.prototype.writeInt32LE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,2147483647,-2147483648),this[Q]=255&Y,this[Q+1]=Y>>>8,this[Q+2]=Y>>>16,this[Q+3]=Y>>>24,Q+4},ge.prototype.writeInt32BE=function(Y,Q,Ne){return Y=+Y,Q>>>=0,Ne||io(this,Y,Q,4,2147483647,-2147483648),Y<0&&(Y=4294967295+Y+1),this[Q]=Y>>>24,this[Q+1]=Y>>>16,this[Q+2]=Y>>>8,this[Q+3]=255&Y,Q+4},ge.prototype.writeFloatLE=function(Y,Q,Ne){return Yr(this,Y,Q,!0,Ne)},ge.prototype.writeFloatBE=function(Y,Q,Ne){return Yr(this,Y,Q,!1,Ne)},ge.prototype.writeDoubleLE=function(Y,Q,Ne){return cl(this,Y,Q,!0,Ne)},ge.prototype.writeDoubleBE=function(Y,Q,Ne){return cl(this,Y,Q,!1,Ne)},ge.prototype.copy=function(Y,Q,Ne,et){if(!ge.isBuffer(Y))throw new TypeError("argument should be a Buffer");if(Ne||(Ne=0),!et&&0!==et&&(et=this.length),Q>=Y.length&&(Q=Y.length),Q||(Q=0),et>0&&et=this.length)throw new RangeError("Index out of range");if(et<0)throw new RangeError("sourceEnd out of bounds");et>this.length&&(et=this.length),Y.length-Q>>=0,Ne=void 0===Ne?this.length:Ne>>>0,Y||(Y=0),"number"==typeof Y)for(Kt=Q;Kt55295&&Q<57344){if(!et){if(Q>56319){(Y-=3)>-1&&Ht.push(239,191,189);continue}if(Kt+1===Ne){(Y-=3)>-1&&Ht.push(239,191,189);continue}et=Q;continue}if(Q<56320){(Y-=3)>-1&&Ht.push(239,191,189),et=Q;continue}Q=65536+(et-55296<<10|Q-56320)}else et&&(Y-=3)>-1&&Ht.push(239,191,189);if(et=null,Q<128){if((Y-=1)<0)break;Ht.push(Q)}else if(Q<2048){if((Y-=2)<0)break;Ht.push(Q>>6|192,63&Q|128)}else if(Q<65536){if((Y-=3)<0)break;Ht.push(Q>>12|224,Q>>6&63|128,63&Q|128)}else{if(!(Q<1114112))throw new Error("Invalid code point");if((Y-=4)<0)break;Ht.push(Q>>18|240,Q>>12&63|128,Q>>6&63|128,63&Q|128)}}return Ht}function _u(De){return Ie.toByteArray(function kd(De){if((De=(De=De.split("=")[0]).trim().replace(Ql,"")).length<2)return"";for(;De.length%4!=0;)De+="=";return De}(De))}function Xa(De,Y,Q,Ne){for(var et=0;et=Y.length||et>=De.length);++et)Y[et+Q]=De[et];return et}function la(De,Y){return De instanceof Y||null!=De&&null!=De.constructor&&null!=De.constructor.name&&De.constructor.name===Y.name}function ro(De){return De!=De}var Ml=function(){for(var De="0123456789abcdef",Y=new Array(256),Q=0;Q<16;++Q)for(var Ne=16*Q,et=0;et<16;++et)Y[Ne+et]=De[Q]+De[et];return Y}()},797:function(Yt){Yt.exports=function(Dn){var ke={};function nt(Ie){if(ke[Ie])return ke[Ie].exports;var ct=ke[Ie]={exports:{},id:Ie,loaded:!1};return Dn[Ie].call(ct.exports,ct,ct.exports,nt),ct.loaded=!0,ct.exports}return nt.m=Dn,nt.c=ke,nt.p="",nt(0)}([function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(1),ct=nt(3),ze=nt(8),be=nt(15);function Ze(se,T,A){var F=null,ee=function(Ai,$r){A&&A(Ai,$r),F&&F.visit(Ai,$r)},Ae="function"==typeof A?ee:null,Je=!1;if(T){var St="boolean"==typeof T.attachComment&&T.attachComment;((Je="boolean"==typeof T.comment&&T.comment)||St)&&((F=new Ie.CommentHandler).attach=St,T.comment=!0,Ae=ee)}var Gt,Ft=!1;T&&"string"==typeof T.sourceType&&(Ft="module"===T.sourceType),Gt=T&&"boolean"==typeof T.jsx&&T.jsx?new ct.JSXParser(se,T,Ae):new ze.Parser(se,T,Ae);var en=Ft?Gt.parseModule():Gt.parseScript();return Je&&F&&(en.comments=F.comments),Gt.config.tokens&&(en.tokens=Gt.tokens),Gt.config.tolerant&&(en.errors=Gt.errorHandler.errors),en}ke.parse=Ze,ke.parseModule=function $e(se,T,A){var F=T||{};return F.sourceType="module",Ze(se,F,A)},ke.parseScript=function ge(se,T,A){var F=T||{};return F.sourceType="script",Ze(se,F,A)},ke.tokenize=function oe(se,T,A){var ee,F=new be.Tokenizer(se,T);ee=[];try{for(;;){var Ae=F.getNextToken();if(!Ae)break;A&&(Ae=A(Ae)),ee.push(Ae)}}catch(Je){F.errorHandler.tolerate(Je)}return F.errorHandler.tolerant&&(ee.errors=F.errors()),ee};var ce=nt(2);ke.Syntax=ce.Syntax,ke.version="4.0.1"},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(2),ct=function(){function ze(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return ze.prototype.insertInnerComments=function(be,Ze){if(be.type===Ie.Syntax.BlockStatement&&0===be.body.length){for(var $e=[],ge=this.leading.length-1;ge>=0;--ge){var oe=this.leading[ge];Ze.end.offset>=oe.start&&($e.unshift(oe.comment),this.leading.splice(ge,1),this.trailing.splice(ge,1))}$e.length&&(be.innerComments=$e)}},ze.prototype.findTrailingComments=function(be){var Ze=[];if(this.trailing.length>0){for(var $e=this.trailing.length-1;$e>=0;--$e){var ge=this.trailing[$e];ge.start>=be.end.offset&&Ze.unshift(ge.comment)}return this.trailing.length=0,Ze}var oe=this.stack[this.stack.length-1];if(oe&&oe.node.trailingComments){var ce=oe.node.trailingComments[0];ce&&ce.range[0]>=be.end.offset&&(Ze=oe.node.trailingComments,delete oe.node.trailingComments)}return Ze},ze.prototype.findLeadingComments=function(be){for(var $e,Ze=[];this.stack.length>0&&(ge=this.stack[this.stack.length-1])&&ge.start>=be.start.offset;)$e=ge.node,this.stack.pop();if($e){for(var ce=($e.leadingComments?$e.leadingComments.length:0)-1;ce>=0;--ce){var se=$e.leadingComments[ce];se.range[1]<=be.start.offset&&(Ze.unshift(se),$e.leadingComments.splice(ce,1))}return $e.leadingComments&&0===$e.leadingComments.length&&delete $e.leadingComments,Ze}for(ce=this.leading.length-1;ce>=0;--ce){var ge;(ge=this.leading[ce]).start<=be.start.offset&&(Ze.unshift(ge.comment),this.leading.splice(ce,1))}return Ze},ze.prototype.visitNode=function(be,Ze){if(!(be.type===Ie.Syntax.Program&&be.body.length>0)){this.insertInnerComments(be,Ze);var $e=this.findTrailingComments(Ze),ge=this.findLeadingComments(Ze);ge.length>0&&(be.leadingComments=ge),$e.length>0&&(be.trailingComments=$e),this.stack.push({node:be,start:Ze.start.offset})}},ze.prototype.visitComment=function(be,Ze){var $e="L"===be.type[0]?"Line":"Block",ge={type:$e,value:be.value};if(be.range&&(ge.range=be.range),be.loc&&(ge.loc=be.loc),this.comments.push(ge),this.attach){var oe={comment:{type:$e,value:be.value,range:[Ze.start.offset,Ze.end.offset]},start:Ze.start.offset};be.loc&&(oe.comment.loc=be.loc),be.type=$e,this.leading.push(oe),this.trailing.push(oe)}},ze.prototype.visit=function(be,Ze){"LineComment"===be.type||"BlockComment"===be.type?this.visitComment(be,Ze):this.attach&&this.visitNode(be,Ze)},ze}();ke.CommentHandler=ct},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(Dn,ke,nt){"use strict";var T,Ie=this&&this.__extends||(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,F){A.__proto__=F}||function(A,F){for(var ee in F)F.hasOwnProperty(ee)&&(A[ee]=F[ee])},function(A,F){function ee(){this.constructor=A}T(A,F),A.prototype=null===F?Object.create(F):(ee.prototype=F.prototype,new ee)});Object.defineProperty(ke,"__esModule",{value:!0});var ct=nt(4),ze=nt(5),be=nt(6),Ze=nt(7),$e=nt(8),ge=nt(13),oe=nt(14);function ce(T){var A;switch(T.type){case be.JSXSyntax.JSXIdentifier:A=T.name;break;case be.JSXSyntax.JSXNamespacedName:var ee=T;A=ce(ee.namespace)+":"+ce(ee.name);break;case be.JSXSyntax.JSXMemberExpression:var Ae=T;A=ce(Ae.object)+"."+ce(Ae.property)}return A}ge.TokenName[100]="JSXIdentifier",ge.TokenName[101]="JSXText";var se=function(T){function A(F,ee,Ae){return T.call(this,F,ee,Ae)||this}return Ie(A,T),A.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():T.prototype.parsePrimaryExpression.call(this)},A.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},A.prototype.finishJSX=function(){this.nextToken()},A.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},A.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},A.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},A.prototype.scanXHTMLEntity=function(F){for(var ee="&",Ae=!0,Je=!1,St=!1,Ft=!1;!this.scanner.eof()&&Ae&&!Je;){var Gt=this.scanner.source[this.scanner.index];if(Gt===F)break;if(Je=";"===Gt,ee+=Gt,++this.scanner.index,!Je)switch(ee.length){case 2:St="#"===Gt;break;case 3:St&&(Ae=(Ft="x"===Gt)||ct.Character.isDecimalDigit(Gt.charCodeAt(0)),St=St&&!Ft);break;default:Ae=(Ae=Ae&&!(St&&!ct.Character.isDecimalDigit(Gt.charCodeAt(0))))&&!(Ft&&!ct.Character.isHexDigit(Gt.charCodeAt(0)))}}if(Ae&&Je&&ee.length>2){var yn=ee.substr(1,ee.length-2);St&&yn.length>1?ee=String.fromCharCode(parseInt(yn.substr(1),10)):Ft&&yn.length>2?ee=String.fromCharCode(parseInt("0"+yn.substr(1),16)):!St&&!Ft&&oe.XHTMLEntities[yn]&&(ee=oe.XHTMLEntities[yn])}return ee},A.prototype.lexJSX=function(){var F=this.scanner.source.charCodeAt(this.scanner.index);if(60===F||62===F||47===F||58===F||61===F||123===F||125===F)return{type:7,value:ee=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===F||39===F){for(var Ae=this.scanner.index,Je=this.scanner.source[this.scanner.index++],St="";!this.scanner.eof()&&(Ft=this.scanner.source[this.scanner.index++])!==Je;)St+="&"===Ft?this.scanXHTMLEntity(Je):Ft;return{type:8,value:St,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Ae,end:this.scanner.index}}if(46===F){var ee,Gt=this.scanner.source.charCodeAt(this.scanner.index+1),yn=this.scanner.source.charCodeAt(this.scanner.index+2);return Ae=this.scanner.index,this.scanner.index+=(ee=46===Gt&&46===yn?"...":".").length,{type:7,value:ee,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Ae,end:this.scanner.index}}if(96===F)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(ct.Character.isIdentifierStart(F)&&92!==F){for(Ae=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var Ft=this.scanner.source.charCodeAt(this.scanner.index);if(ct.Character.isIdentifierPart(Ft)&&92!==Ft)++this.scanner.index;else{if(45!==Ft)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(Ae,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:Ae,end:this.scanner.index}}return this.scanner.lex()},A.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var F=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(F)),F},A.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var F=this.scanner.index,ee="";!this.scanner.eof();){var Ae=this.scanner.source[this.scanner.index];if("{"===Ae||"<"===Ae)break;++this.scanner.index,ee+=Ae,ct.Character.isLineTerminator(Ae.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===Ae&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var Je={type:101,value:ee,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:F,end:this.scanner.index};return ee.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(Je)),Je},A.prototype.peekJSXToken=function(){var F=this.scanner.saveState();this.scanner.scanComments();var ee=this.lexJSX();return this.scanner.restoreState(F),ee},A.prototype.expectJSX=function(F){var ee=this.nextJSXToken();(7!==ee.type||ee.value!==F)&&this.throwUnexpectedToken(ee)},A.prototype.matchJSX=function(F){var ee=this.peekJSXToken();return 7===ee.type&&ee.value===F},A.prototype.parseJSXIdentifier=function(){var F=this.createJSXNode(),ee=this.nextJSXToken();return 100!==ee.type&&this.throwUnexpectedToken(ee),this.finalize(F,new ze.JSXIdentifier(ee.value))},A.prototype.parseJSXElementName=function(){var F=this.createJSXNode(),ee=this.parseJSXIdentifier();if(this.matchJSX(":")){var Ae=ee;this.expectJSX(":");var Je=this.parseJSXIdentifier();ee=this.finalize(F,new ze.JSXNamespacedName(Ae,Je))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var St=ee;this.expectJSX(".");var Ft=this.parseJSXIdentifier();ee=this.finalize(F,new ze.JSXMemberExpression(St,Ft))}return ee},A.prototype.parseJSXAttributeName=function(){var ee,F=this.createJSXNode(),Ae=this.parseJSXIdentifier();if(this.matchJSX(":")){var Je=Ae;this.expectJSX(":");var St=this.parseJSXIdentifier();ee=this.finalize(F,new ze.JSXNamespacedName(Je,St))}else ee=Ae;return ee},A.prototype.parseJSXStringLiteralAttribute=function(){var F=this.createJSXNode(),ee=this.nextJSXToken();8!==ee.type&&this.throwUnexpectedToken(ee);var Ae=this.getTokenRaw(ee);return this.finalize(F,new Ze.Literal(ee.value,Ae))},A.prototype.parseJSXExpressionAttribute=function(){var F=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var ee=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(F,new ze.JSXExpressionContainer(ee))},A.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},A.prototype.parseJSXNameValueAttribute=function(){var F=this.createJSXNode(),ee=this.parseJSXAttributeName(),Ae=null;return this.matchJSX("=")&&(this.expectJSX("="),Ae=this.parseJSXAttributeValue()),this.finalize(F,new ze.JSXAttribute(ee,Ae))},A.prototype.parseJSXSpreadAttribute=function(){var F=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var ee=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(F,new ze.JSXSpreadAttribute(ee))},A.prototype.parseJSXAttributes=function(){for(var F=[];!this.matchJSX("/")&&!this.matchJSX(">");){var ee=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();F.push(ee)}return F},A.prototype.parseJSXOpeningElement=function(){var F=this.createJSXNode();this.expectJSX("<");var ee=this.parseJSXElementName(),Ae=this.parseJSXAttributes(),Je=this.matchJSX("/");return Je&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(F,new ze.JSXOpeningElement(ee,Je,Ae))},A.prototype.parseJSXBoundaryElement=function(){var F=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var ee=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(F,new ze.JSXClosingElement(ee))}var Ae=this.parseJSXElementName(),Je=this.parseJSXAttributes(),St=this.matchJSX("/");return St&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(F,new ze.JSXOpeningElement(Ae,St,Je))},A.prototype.parseJSXEmptyExpression=function(){var F=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(F,new ze.JSXEmptyExpression)},A.prototype.parseJSXExpressionContainer=function(){var ee,F=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(ee=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),ee=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(F,new ze.JSXExpressionContainer(ee))},A.prototype.parseJSXChildren=function(){for(var F=[];!this.scanner.eof();){var ee=this.createJSXChildNode(),Ae=this.nextJSXText();if(Ae.start0))break;Ft=this.finalize(F.node,new ze.JSXElement(F.opening,F.children,F.closing)),(F=ee[ee.length-1]).children.push(Ft),ee.pop()}}return F},A.prototype.parseJSXElement=function(){var F=this.createJSXNode(),ee=this.parseJSXOpeningElement(),Ae=[],Je=null;if(!ee.selfClosing){var St=this.parseComplexJSXElement({node:F,opening:ee,closing:Je,children:Ae});Ae=St.children,Je=St.closing}return this.finalize(F,new ze.JSXElement(ee,Ae,Je))},A.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var F=this.parseJSXElement();return this.finishJSX(),F},A.prototype.isStartOfExpression=function(){return T.prototype.isStartOfExpression.call(this)||this.match("<")},A}($e.Parser);ke.JSXParser=se},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var nt={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};ke.Character={fromCodePoint:function(Ie){return Ie<65536?String.fromCharCode(Ie):String.fromCharCode(55296+(Ie-65536>>10))+String.fromCharCode(56320+(Ie-65536&1023))},isWhiteSpace:function(Ie){return 32===Ie||9===Ie||11===Ie||12===Ie||160===Ie||Ie>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(Ie)>=0},isLineTerminator:function(Ie){return 10===Ie||13===Ie||8232===Ie||8233===Ie},isIdentifierStart:function(Ie){return 36===Ie||95===Ie||Ie>=65&&Ie<=90||Ie>=97&&Ie<=122||92===Ie||Ie>=128&&nt.NonAsciiIdentifierStart.test(ke.Character.fromCodePoint(Ie))},isIdentifierPart:function(Ie){return 36===Ie||95===Ie||Ie>=65&&Ie<=90||Ie>=97&&Ie<=122||Ie>=48&&Ie<=57||92===Ie||Ie>=128&&nt.NonAsciiIdentifierPart.test(ke.Character.fromCodePoint(Ie))},isDecimalDigit:function(Ie){return Ie>=48&&Ie<=57},isHexDigit:function(Ie){return Ie>=48&&Ie<=57||Ie>=65&&Ie<=70||Ie>=97&&Ie<=102},isOctalDigit:function(Ie){return Ie>=48&&Ie<=55}}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(6);ke.JSXClosingElement=function F(ee){this.type=Ie.JSXSyntax.JSXClosingElement,this.name=ee},ke.JSXElement=function F(ee,Ae,Je){this.type=Ie.JSXSyntax.JSXElement,this.openingElement=ee,this.children=Ae,this.closingElement=Je},ke.JSXEmptyExpression=function F(){this.type=Ie.JSXSyntax.JSXEmptyExpression},ke.JSXExpressionContainer=function F(ee){this.type=Ie.JSXSyntax.JSXExpressionContainer,this.expression=ee},ke.JSXIdentifier=function F(ee){this.type=Ie.JSXSyntax.JSXIdentifier,this.name=ee},ke.JSXMemberExpression=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXMemberExpression,this.object=ee,this.property=Ae},ke.JSXAttribute=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXAttribute,this.name=ee,this.value=Ae},ke.JSXNamespacedName=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXNamespacedName,this.namespace=ee,this.name=Ae},ke.JSXOpeningElement=function F(ee,Ae,Je){this.type=Ie.JSXSyntax.JSXOpeningElement,this.name=ee,this.selfClosing=Ae,this.attributes=Je},ke.JSXSpreadAttribute=function F(ee){this.type=Ie.JSXSyntax.JSXSpreadAttribute,this.argument=ee},ke.JSXText=function F(ee,Ae){this.type=Ie.JSXSyntax.JSXText,this.value=ee,this.raw=Ae}},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(2);ke.ArrayExpression=function Ge(qe){this.type=Ie.Syntax.ArrayExpression,this.elements=qe},ke.ArrayPattern=function Ge(qe){this.type=Ie.Syntax.ArrayPattern,this.elements=qe},ke.ArrowFunctionExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ArrowFunctionExpression,this.id=null,this.params=qe,this.body=_t,this.generator=!1,this.expression=bn,this.async=!1},ke.AssignmentExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.AssignmentExpression,this.operator=qe,this.left=_t,this.right=bn},ke.AssignmentPattern=function Ge(qe,_t){this.type=Ie.Syntax.AssignmentPattern,this.left=qe,this.right=_t},ke.AsyncArrowFunctionExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ArrowFunctionExpression,this.id=null,this.params=qe,this.body=_t,this.generator=!1,this.expression=bn,this.async=!0},ke.AsyncFunctionDeclaration=function Ge(qe,_t,bn){this.type=Ie.Syntax.FunctionDeclaration,this.id=qe,this.params=_t,this.body=bn,this.generator=!1,this.expression=!1,this.async=!0},ke.AsyncFunctionExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.FunctionExpression,this.id=qe,this.params=_t,this.body=bn,this.generator=!1,this.expression=!1,this.async=!0},ke.AwaitExpression=function Ge(qe){this.type=Ie.Syntax.AwaitExpression,this.argument=qe},ke.BinaryExpression=function Ge(qe,_t,bn){this.type="||"===qe||"&&"===qe?Ie.Syntax.LogicalExpression:Ie.Syntax.BinaryExpression,this.operator=qe,this.left=_t,this.right=bn},ke.BlockStatement=function Ge(qe){this.type=Ie.Syntax.BlockStatement,this.body=qe},ke.BreakStatement=function Ge(qe){this.type=Ie.Syntax.BreakStatement,this.label=qe},ke.CallExpression=function Ge(qe,_t){this.type=Ie.Syntax.CallExpression,this.callee=qe,this.arguments=_t},ke.CatchClause=function Ge(qe,_t){this.type=Ie.Syntax.CatchClause,this.param=qe,this.body=_t},ke.ClassBody=function Ge(qe){this.type=Ie.Syntax.ClassBody,this.body=qe},ke.ClassDeclaration=function Ge(qe,_t,bn){this.type=Ie.Syntax.ClassDeclaration,this.id=qe,this.superClass=_t,this.body=bn},ke.ClassExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ClassExpression,this.id=qe,this.superClass=_t,this.body=bn},ke.ComputedMemberExpression=function Ge(qe,_t){this.type=Ie.Syntax.MemberExpression,this.computed=!0,this.object=qe,this.property=_t},ke.ConditionalExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.ConditionalExpression,this.test=qe,this.consequent=_t,this.alternate=bn},ke.ContinueStatement=function Ge(qe){this.type=Ie.Syntax.ContinueStatement,this.label=qe},ke.DebuggerStatement=function Ge(){this.type=Ie.Syntax.DebuggerStatement},ke.Directive=function Ge(qe,_t){this.type=Ie.Syntax.ExpressionStatement,this.expression=qe,this.directive=_t},ke.DoWhileStatement=function Ge(qe,_t){this.type=Ie.Syntax.DoWhileStatement,this.body=qe,this.test=_t},ke.EmptyStatement=function Ge(){this.type=Ie.Syntax.EmptyStatement},ke.ExportAllDeclaration=function Ge(qe){this.type=Ie.Syntax.ExportAllDeclaration,this.source=qe},ke.ExportDefaultDeclaration=function Ge(qe){this.type=Ie.Syntax.ExportDefaultDeclaration,this.declaration=qe},ke.ExportNamedDeclaration=function Ge(qe,_t,bn){this.type=Ie.Syntax.ExportNamedDeclaration,this.declaration=qe,this.specifiers=_t,this.source=bn},ke.ExportSpecifier=function Ge(qe,_t){this.type=Ie.Syntax.ExportSpecifier,this.exported=_t,this.local=qe},ke.ExpressionStatement=function Ge(qe){this.type=Ie.Syntax.ExpressionStatement,this.expression=qe},ke.ForInStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.ForInStatement,this.left=qe,this.right=_t,this.body=bn,this.each=!1},ke.ForOfStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.ForOfStatement,this.left=qe,this.right=_t,this.body=bn},ke.ForStatement=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.ForStatement,this.init=qe,this.test=_t,this.update=bn,this.body=Nr},ke.FunctionDeclaration=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.FunctionDeclaration,this.id=qe,this.params=_t,this.body=bn,this.generator=Nr,this.expression=!1,this.async=!1},ke.FunctionExpression=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.FunctionExpression,this.id=qe,this.params=_t,this.body=bn,this.generator=Nr,this.expression=!1,this.async=!1},ke.Identifier=function Ge(qe){this.type=Ie.Syntax.Identifier,this.name=qe},ke.IfStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.IfStatement,this.test=qe,this.consequent=_t,this.alternate=bn},ke.ImportDeclaration=function Ge(qe,_t){this.type=Ie.Syntax.ImportDeclaration,this.specifiers=qe,this.source=_t},ke.ImportDefaultSpecifier=function Ge(qe){this.type=Ie.Syntax.ImportDefaultSpecifier,this.local=qe},ke.ImportNamespaceSpecifier=function Ge(qe){this.type=Ie.Syntax.ImportNamespaceSpecifier,this.local=qe},ke.ImportSpecifier=function Ge(qe,_t){this.type=Ie.Syntax.ImportSpecifier,this.local=qe,this.imported=_t},ke.LabeledStatement=function Ge(qe,_t){this.type=Ie.Syntax.LabeledStatement,this.label=qe,this.body=_t},ke.Literal=function Ge(qe,_t){this.type=Ie.Syntax.Literal,this.value=qe,this.raw=_t},ke.MetaProperty=function Ge(qe,_t){this.type=Ie.Syntax.MetaProperty,this.meta=qe,this.property=_t},ke.MethodDefinition=function Ge(qe,_t,bn,Nr,g1){this.type=Ie.Syntax.MethodDefinition,this.key=qe,this.computed=_t,this.value=bn,this.kind=Nr,this.static=g1},ke.Module=function Ge(qe){this.type=Ie.Syntax.Program,this.body=qe,this.sourceType="module"},ke.NewExpression=function Ge(qe,_t){this.type=Ie.Syntax.NewExpression,this.callee=qe,this.arguments=_t},ke.ObjectExpression=function Ge(qe){this.type=Ie.Syntax.ObjectExpression,this.properties=qe},ke.ObjectPattern=function Ge(qe){this.type=Ie.Syntax.ObjectPattern,this.properties=qe},ke.Property=function Ge(qe,_t,bn,Nr,g1,Mi){this.type=Ie.Syntax.Property,this.key=_t,this.computed=bn,this.value=Nr,this.kind=qe,this.method=g1,this.shorthand=Mi},ke.RegexLiteral=function Ge(qe,_t,bn,Nr){this.type=Ie.Syntax.Literal,this.value=qe,this.raw=_t,this.regex={pattern:bn,flags:Nr}},ke.RestElement=function Ge(qe){this.type=Ie.Syntax.RestElement,this.argument=qe},ke.ReturnStatement=function Ge(qe){this.type=Ie.Syntax.ReturnStatement,this.argument=qe},ke.Script=function Ge(qe){this.type=Ie.Syntax.Program,this.body=qe,this.sourceType="script"},ke.SequenceExpression=function Ge(qe){this.type=Ie.Syntax.SequenceExpression,this.expressions=qe},ke.SpreadElement=function Ge(qe){this.type=Ie.Syntax.SpreadElement,this.argument=qe},ke.StaticMemberExpression=function Ge(qe,_t){this.type=Ie.Syntax.MemberExpression,this.computed=!1,this.object=qe,this.property=_t},ke.Super=function Ge(){this.type=Ie.Syntax.Super},ke.SwitchCase=function Ge(qe,_t){this.type=Ie.Syntax.SwitchCase,this.test=qe,this.consequent=_t},ke.SwitchStatement=function Ge(qe,_t){this.type=Ie.Syntax.SwitchStatement,this.discriminant=qe,this.cases=_t},ke.TaggedTemplateExpression=function Ge(qe,_t){this.type=Ie.Syntax.TaggedTemplateExpression,this.tag=qe,this.quasi=_t},ke.TemplateElement=function Ge(qe,_t){this.type=Ie.Syntax.TemplateElement,this.value=qe,this.tail=_t},ke.TemplateLiteral=function Ge(qe,_t){this.type=Ie.Syntax.TemplateLiteral,this.quasis=qe,this.expressions=_t},ke.ThisExpression=function Ge(){this.type=Ie.Syntax.ThisExpression},ke.ThrowStatement=function Ge(qe){this.type=Ie.Syntax.ThrowStatement,this.argument=qe},ke.TryStatement=function Ge(qe,_t,bn){this.type=Ie.Syntax.TryStatement,this.block=qe,this.handler=_t,this.finalizer=bn},ke.UnaryExpression=function Ge(qe,_t){this.type=Ie.Syntax.UnaryExpression,this.operator=qe,this.argument=_t,this.prefix=!0},ke.UpdateExpression=function Ge(qe,_t,bn){this.type=Ie.Syntax.UpdateExpression,this.operator=qe,this.argument=_t,this.prefix=bn},ke.VariableDeclaration=function Ge(qe,_t){this.type=Ie.Syntax.VariableDeclaration,this.declarations=qe,this.kind=_t},ke.VariableDeclarator=function Ge(qe,_t){this.type=Ie.Syntax.VariableDeclarator,this.id=qe,this.init=_t},ke.WhileStatement=function Ge(qe,_t){this.type=Ie.Syntax.WhileStatement,this.test=qe,this.body=_t},ke.WithStatement=function Ge(qe,_t){this.type=Ie.Syntax.WithStatement,this.object=qe,this.body=_t},ke.YieldExpression=function Ge(qe,_t){this.type=Ie.Syntax.YieldExpression,this.argument=qe,this.delegate=_t}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(9),ct=nt(10),ze=nt(11),be=nt(7),Ze=nt(12),$e=nt(2),ge=nt(13),oe="ArrowParameterPlaceHolder",ce=function(){function se(T,A,F){void 0===A&&(A={}),this.config={range:"boolean"==typeof A.range&&A.range,loc:"boolean"==typeof A.loc&&A.loc,source:null,tokens:"boolean"==typeof A.tokens&&A.tokens,comment:"boolean"==typeof A.comment&&A.comment,tolerant:"boolean"==typeof A.tolerant&&A.tolerant},this.config.loc&&A.source&&null!==A.source&&(this.config.source=String(A.source)),this.delegate=F,this.errorHandler=new ct.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new Ze.Scanner(T,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return se.prototype.throwError=function(T){for(var A=[],F=1;F0&&this.delegate)for(var A=0;A>="===T||">>>="===T||"&="===T||"^="===T||"|="===T},se.prototype.isolateCoverGrammar=function(T){var A=this.context.isBindingElement,F=this.context.isAssignmentTarget,ee=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Ae=T.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=A,this.context.isAssignmentTarget=F,this.context.firstCoverInitializedNameError=ee,Ae},se.prototype.inheritCoverGrammar=function(T){var A=this.context.isBindingElement,F=this.context.isAssignmentTarget,ee=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var Ae=T.call(this);return this.context.isBindingElement=this.context.isBindingElement&&A,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&F,this.context.firstCoverInitializedNameError=ee||this.context.firstCoverInitializedNameError,Ae},se.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2!==this.lookahead.type&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},se.prototype.parsePrimaryExpression=function(){var A,F,ee,T=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),A=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(T,new be.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,ze.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,F=this.nextToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.Literal(F.value,ee));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,F=this.nextToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.Literal("true"===F.value,ee));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,F=this.nextToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.Literal(null,ee));break;case 10:A=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,A=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":A=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":A=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,F=this.nextRegexToken(),ee=this.getTokenRaw(F),A=this.finalize(T,new be.RegexLiteral(F.regex,ee,F.pattern,F.flags));break;default:A=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?A=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?A=this.finalize(T,new be.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?A=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),A=this.finalize(T,new be.ThisExpression)):A=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:A=this.throwUnexpectedToken(this.nextToken())}return A},se.prototype.parseSpreadElement=function(){var T=this.createNode();this.expect("...");var A=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(T,new be.SpreadElement(A))},se.prototype.parseArrayInitializer=function(){var T=this.createNode(),A=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),A.push(null);else if(this.match("...")){var F=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),A.push(F)}else A.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(T,new be.ArrayExpression(A))},se.prototype.parsePropertyMethod=function(T){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var A=this.context.strict,F=this.context.allowStrictDirective;this.context.allowStrictDirective=T.simple;var ee=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&T.firstRestricted&&this.tolerateUnexpectedToken(T.firstRestricted,T.message),this.context.strict&&T.stricted&&this.tolerateUnexpectedToken(T.stricted,T.message),this.context.strict=A,this.context.allowStrictDirective=F,ee},se.prototype.parsePropertyMethodFunction=function(){var A=this.createNode(),F=this.context.allowYield;this.context.allowYield=!0;var ee=this.parseFormalParameters(),Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(A,new be.FunctionExpression(null,ee.params,Ae,!1))},se.prototype.parsePropertyMethodAsyncFunction=function(){var T=this.createNode(),A=this.context.allowYield,F=this.context.await;this.context.allowYield=!1,this.context.await=!0;var ee=this.parseFormalParameters(),Ae=this.parsePropertyMethod(ee);return this.context.allowYield=A,this.context.await=F,this.finalize(T,new be.AsyncFunctionExpression(null,ee.params,Ae))},se.prototype.parseObjectPropertyKey=function(){var F,T=this.createNode(),A=this.nextToken();switch(A.type){case 8:case 6:this.context.strict&&A.octal&&this.tolerateUnexpectedToken(A,ze.Messages.StrictOctalLiteral);var ee=this.getTokenRaw(A);F=this.finalize(T,new be.Literal(A.value,ee));break;case 3:case 1:case 5:case 4:F=this.finalize(T,new be.Identifier(A.value));break;case 7:"["===A.value?(F=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):F=this.throwUnexpectedToken(A);break;default:F=this.throwUnexpectedToken(A)}return F},se.prototype.isPropertyKey=function(T,A){return T.type===$e.Syntax.Identifier&&T.name===A||T.type===$e.Syntax.Literal&&T.value===A},se.prototype.parseObjectProperty=function(T){var ee,A=this.createNode(),F=this.lookahead,Ae=null,Je=null,St=!1,Ft=!1,Gt=!1,yn=!1;if(3===F.type){var en=F.value;this.nextToken(),St=this.match("["),Ae=(yn=!(this.hasLineTerminator||"async"!==en||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(A,new be.Identifier(en))}else this.match("*")?this.nextToken():(St=this.match("["),Ae=this.parseObjectPropertyKey());var Ai=this.qualifiedPropertyName(this.lookahead);if(3===F.type&&!yn&&"get"===F.value&&Ai)ee="get",St=this.match("["),Ae=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod();else if(3===F.type&&!yn&&"set"===F.value&&Ai)ee="set",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseSetterMethod();else if(7===F.type&&"*"===F.value&&Ai)ee="init",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),Ft=!0;else if(Ae||this.throwUnexpectedToken(this.lookahead),ee="init",this.match(":")&&!yn)!St&&this.isPropertyKey(Ae,"__proto__")&&(T.value&&this.tolerateError(ze.Messages.DuplicateProtoProperty),T.value=!0),this.nextToken(),Je=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))Je=yn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),Ft=!0;else if(3===F.type)if(en=this.finalize(A,new be.Identifier(F.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),Gt=!0;var $r=this.isolateCoverGrammar(this.parseAssignmentExpression);Je=this.finalize(A,new be.AssignmentPattern(en,$r))}else Gt=!0,Je=en;else this.throwUnexpectedToken(this.nextToken());return this.finalize(A,new be.Property(ee,Ae,St,Je,Ft,Gt))},se.prototype.parseObjectInitializer=function(){var T=this.createNode();this.expect("{");for(var A=[],F={value:!1};!this.match("}");)A.push(this.parseObjectProperty(F)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(T,new be.ObjectExpression(A))},se.prototype.parseTemplateHead=function(){Ie.assert(this.lookahead.head,"Template literal must start with a template head");var T=this.createNode(),A=this.nextToken();return this.finalize(T,new be.TemplateElement({raw:A.value,cooked:A.cooked},A.tail))},se.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var T=this.createNode(),A=this.nextToken();return this.finalize(T,new be.TemplateElement({raw:A.value,cooked:A.cooked},A.tail))},se.prototype.parseTemplateLiteral=function(){var T=this.createNode(),A=[],F=[],ee=this.parseTemplateHead();for(F.push(ee);!ee.tail;)A.push(this.parseExpression()),ee=this.parseTemplateElement(),F.push(ee);return this.finalize(T,new be.TemplateLiteral(F,A))},se.prototype.reinterpretExpressionAsPattern=function(T){switch(T.type){case $e.Syntax.Identifier:case $e.Syntax.MemberExpression:case $e.Syntax.RestElement:case $e.Syntax.AssignmentPattern:break;case $e.Syntax.SpreadElement:T.type=$e.Syntax.RestElement,this.reinterpretExpressionAsPattern(T.argument);break;case $e.Syntax.ArrayExpression:T.type=$e.Syntax.ArrayPattern;for(var A=0;A")||this.expect("=>"),T={type:oe,params:[],async:!1};else{var A=this.lookahead,F=[];if(this.match("..."))T=this.parseRestElement(F),this.expect(")"),this.match("=>")||this.expect("=>"),T={type:oe,params:[T],async:!1};else{var ee=!1;if(this.context.isBindingElement=!0,T=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var Ae=[];for(this.context.isAssignmentTarget=!1,Ae.push(T);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var Je=0;Je")||this.expect("=>"),this.context.isBindingElement=!1,Je=0;Je")&&(T.type===$e.Syntax.Identifier&&"yield"===T.name&&(ee=!0,T={type:oe,params:[T],async:!1}),!ee)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),T.type===$e.Syntax.SequenceExpression)for(Je=0;Je")){for(var Ft=0;Ft0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var Ae=[T,this.lookahead],Je=A,St=this.isolateCoverGrammar(this.parseExponentiationExpression),Ft=[Je,F.value,St],Gt=[ee];!((ee=this.binaryPrecedence(this.lookahead))<=0);){for(;Ft.length>2&&ee<=Gt[Gt.length-1];){St=Ft.pop();var yn=Ft.pop();Gt.pop(),Je=Ft.pop(),Ae.pop();var en=this.startNode(Ae[Ae.length-1]);Ft.push(this.finalize(en,new be.BinaryExpression(yn,Je,St)))}Ft.push(this.nextToken().value),Gt.push(ee),Ae.push(this.lookahead),Ft.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var Ai=Ft.length-1;A=Ft[Ai];for(var $r=Ae.pop();Ai>1;){var Ur=Ae.pop();en=this.startNode(Ur,$r&&$r.lineStart),A=this.finalize(en,new be.BinaryExpression(yn=Ft[Ai-1],Ft[Ai-2],A)),Ai-=2,$r=Ur}}return A},se.prototype.parseConditionalExpression=function(){var T=this.lookahead,A=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var F=this.context.allowIn;this.context.allowIn=!0;var ee=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=F,this.expect(":");var Ae=this.isolateCoverGrammar(this.parseAssignmentExpression);A=this.finalize(this.startNode(T),new be.ConditionalExpression(A,ee,Ae)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return A},se.prototype.checkPatternParam=function(T,A){switch(A.type){case $e.Syntax.Identifier:this.validateParam(T,A,A.name);break;case $e.Syntax.RestElement:this.checkPatternParam(T,A.argument);break;case $e.Syntax.AssignmentPattern:this.checkPatternParam(T,A.left);break;case $e.Syntax.ArrayPattern:for(var F=0;F")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var Ae=T.async,Je=this.reinterpretAsCoverFormalsList(T);if(Je){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var St=this.context.strict,Ft=this.context.allowStrictDirective;this.context.allowStrictDirective=Je.simple;var Gt=this.context.allowYield,yn=this.context.await;this.context.allowYield=!0,this.context.await=Ae;var en=this.startNode(A);this.expect("=>");var Ai=void 0;if(this.match("{")){var $r=this.context.allowIn;this.context.allowIn=!0,Ai=this.parseFunctionSourceElements(),this.context.allowIn=$r}else Ai=this.isolateCoverGrammar(this.parseAssignmentExpression);var Ur=Ai.type!==$e.Syntax.BlockStatement;this.context.strict&&Je.firstRestricted&&this.throwUnexpectedToken(Je.firstRestricted,Je.message),this.context.strict&&Je.stricted&&this.tolerateUnexpectedToken(Je.stricted,Je.message),T=this.finalize(en,Ae?new be.AsyncArrowFunctionExpression(Je.params,Ai,Ur):new be.ArrowFunctionExpression(Je.params,Ai,Ur)),this.context.strict=St,this.context.allowStrictDirective=Ft,this.context.allowYield=Gt,this.context.await=yn}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(ze.Messages.InvalidLHSInAssignment),this.context.strict&&T.type===$e.Syntax.Identifier){var ss=T;this.scanner.isRestrictedWord(ss.name)&&this.tolerateUnexpectedToken(F,ze.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(ss.name)&&this.tolerateUnexpectedToken(F,ze.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(T):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var Ya=(F=this.nextToken()).value,dr=this.isolateCoverGrammar(this.parseAssignmentExpression);T=this.finalize(this.startNode(A),new be.AssignmentExpression(Ya,T,dr)),this.context.firstCoverInitializedNameError=null}}return T},se.prototype.parseExpression=function(){var T=this.lookahead,A=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var F=[];for(F.push(A);2!==this.lookahead.type&&this.match(",");)this.nextToken(),F.push(this.isolateCoverGrammar(this.parseAssignmentExpression));A=this.finalize(this.startNode(T),new be.SequenceExpression(F))}return A},se.prototype.parseStatementListItem=function(){var T;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,ze.Messages.IllegalExportDeclaration),T=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,ze.Messages.IllegalImportDeclaration),T=this.parseImportDeclaration();break;case"const":T=this.parseLexicalDeclaration({inFor:!1});break;case"function":T=this.parseFunctionDeclaration();break;case"class":T=this.parseClassDeclaration();break;case"let":T=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:T=this.parseStatement()}else T=this.parseStatement();return T},se.prototype.parseBlock=function(){var T=this.createNode();this.expect("{");for(var A=[];!this.match("}");)A.push(this.parseStatementListItem());return this.expect("}"),this.finalize(T,new be.BlockStatement(A))},se.prototype.parseLexicalBinding=function(T,A){var F=this.createNode(),Ae=this.parsePattern([],T);this.context.strict&&Ae.type===$e.Syntax.Identifier&&this.scanner.isRestrictedWord(Ae.name)&&this.tolerateError(ze.Messages.StrictVarName);var Je=null;return"const"===T?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(ze.Messages.DeclarationMissingInitializer,"const")):(!A.inFor&&Ae.type!==$e.Syntax.Identifier||this.match("="))&&(this.expect("="),Je=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(F,new be.VariableDeclarator(Ae,Je))},se.prototype.parseBindingList=function(T,A){for(var F=[this.parseLexicalBinding(T,A)];this.match(",");)this.nextToken(),F.push(this.parseLexicalBinding(T,A));return F},se.prototype.isLexicalDeclaration=function(){var T=this.scanner.saveState();this.scanner.scanComments();var A=this.scanner.lex();return this.scanner.restoreState(T),3===A.type||7===A.type&&"["===A.value||7===A.type&&"{"===A.value||4===A.type&&"let"===A.value||4===A.type&&"yield"===A.value},se.prototype.parseLexicalDeclaration=function(T){var A=this.createNode(),F=this.nextToken().value;Ie.assert("let"===F||"const"===F,"Lexical declaration must be either let or const");var ee=this.parseBindingList(F,T);return this.consumeSemicolon(),this.finalize(A,new be.VariableDeclaration(ee,F))},se.prototype.parseBindingRestElement=function(T,A){var F=this.createNode();this.expect("...");var ee=this.parsePattern(T,A);return this.finalize(F,new be.RestElement(ee))},se.prototype.parseArrayPattern=function(T,A){var F=this.createNode();this.expect("[");for(var ee=[];!this.match("]");)if(this.match(","))this.nextToken(),ee.push(null);else{if(this.match("...")){ee.push(this.parseBindingRestElement(T,A));break}ee.push(this.parsePatternWithDefault(T,A)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(F,new be.ArrayPattern(ee))},se.prototype.parsePropertyPattern=function(T,A){var St,Ft,F=this.createNode(),ee=!1,Ae=!1;if(3===this.lookahead.type){var Gt=this.lookahead;St=this.parseVariableIdentifier();var yn=this.finalize(F,new be.Identifier(Gt.value));if(this.match("=")){T.push(Gt),Ae=!0,this.nextToken();var en=this.parseAssignmentExpression();Ft=this.finalize(this.startNode(Gt),new be.AssignmentPattern(yn,en))}else this.match(":")?(this.expect(":"),Ft=this.parsePatternWithDefault(T,A)):(T.push(Gt),Ae=!0,Ft=yn)}else ee=this.match("["),St=this.parseObjectPropertyKey(),this.expect(":"),Ft=this.parsePatternWithDefault(T,A);return this.finalize(F,new be.Property("init",St,ee,Ft,!1,Ae))},se.prototype.parseObjectPattern=function(T,A){var F=this.createNode(),ee=[];for(this.expect("{");!this.match("}");)ee.push(this.parsePropertyPattern(T,A)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(F,new be.ObjectPattern(ee))},se.prototype.parsePattern=function(T,A){var F;return this.match("[")?F=this.parseArrayPattern(T,A):this.match("{")?F=this.parseObjectPattern(T,A):(this.matchKeyword("let")&&("const"===A||"let"===A)&&this.tolerateUnexpectedToken(this.lookahead,ze.Messages.LetInLexicalBinding),T.push(this.lookahead),F=this.parseVariableIdentifier(A)),F},se.prototype.parsePatternWithDefault=function(T,A){var F=this.lookahead,ee=this.parsePattern(T,A);if(this.match("=")){this.nextToken();var Ae=this.context.allowYield;this.context.allowYield=!0;var Je=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=Ae,ee=this.finalize(this.startNode(F),new be.AssignmentPattern(ee,Je))}return ee},se.prototype.parseVariableIdentifier=function(T){var A=this.createNode(),F=this.nextToken();return 4===F.type&&"yield"===F.value?this.context.strict?this.tolerateUnexpectedToken(F,ze.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(F):3!==F.type?this.context.strict&&4===F.type&&this.scanner.isStrictModeReservedWord(F.value)?this.tolerateUnexpectedToken(F,ze.Messages.StrictReservedWord):(this.context.strict||"let"!==F.value||"var"!==T)&&this.throwUnexpectedToken(F):(this.context.isModule||this.context.await)&&3===F.type&&"await"===F.value&&this.tolerateUnexpectedToken(F),this.finalize(A,new be.Identifier(F.value))},se.prototype.parseVariableDeclaration=function(T){var A=this.createNode(),ee=this.parsePattern([],"var");this.context.strict&&ee.type===$e.Syntax.Identifier&&this.scanner.isRestrictedWord(ee.name)&&this.tolerateError(ze.Messages.StrictVarName);var Ae=null;return this.match("=")?(this.nextToken(),Ae=this.isolateCoverGrammar(this.parseAssignmentExpression)):ee.type!==$e.Syntax.Identifier&&!T.inFor&&this.expect("="),this.finalize(A,new be.VariableDeclarator(ee,Ae))},se.prototype.parseVariableDeclarationList=function(T){var A={inFor:T.inFor},F=[];for(F.push(this.parseVariableDeclaration(A));this.match(",");)this.nextToken(),F.push(this.parseVariableDeclaration(A));return F},se.prototype.parseVariableStatement=function(){var T=this.createNode();this.expectKeyword("var");var A=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(T,new be.VariableDeclaration(A,"var"))},se.prototype.parseEmptyStatement=function(){var T=this.createNode();return this.expect(";"),this.finalize(T,new be.EmptyStatement)},se.prototype.parseExpressionStatement=function(){var T=this.createNode(),A=this.parseExpression();return this.consumeSemicolon(),this.finalize(T,new be.ExpressionStatement(A))},se.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(ze.Messages.StrictFunction),this.parseStatement()},se.prototype.parseIfStatement=function(){var A,T=this.createNode(),F=null;this.expectKeyword("if"),this.expect("(");var ee=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),A=this.finalize(this.createNode(),new be.EmptyStatement)):(this.expect(")"),A=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),F=this.parseIfClause())),this.finalize(T,new be.IfStatement(ee,A,F))},se.prototype.parseDoWhileStatement=function(){var T=this.createNode();this.expectKeyword("do");var A=this.context.inIteration;this.context.inIteration=!0;var F=this.parseStatement();this.context.inIteration=A,this.expectKeyword("while"),this.expect("(");var ee=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(T,new be.DoWhileStatement(F,ee))},se.prototype.parseWhileStatement=function(){var A,T=this.createNode();this.expectKeyword("while"),this.expect("(");var F=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),A=this.finalize(this.createNode(),new be.EmptyStatement);else{this.expect(")");var ee=this.context.inIteration;this.context.inIteration=!0,A=this.parseStatement(),this.context.inIteration=ee}return this.finalize(T,new be.WhileStatement(F,A))},se.prototype.parseForStatement=function(){var Ae,Je,Ur,T=null,A=null,F=null,ee=!0,St=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){T=this.createNode(),this.nextToken();var Ft=this.context.allowIn;this.context.allowIn=!1;var Gt=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=Ft,1===Gt.length&&this.matchKeyword("in")){var yn=Gt[0];yn.init&&(yn.id.type===$e.Syntax.ArrayPattern||yn.id.type===$e.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(ze.Messages.ForInOfLoopInitializer,"for-in"),T=this.finalize(T,new be.VariableDeclaration(Gt,"var")),this.nextToken(),Ae=T,Je=this.parseExpression(),T=null}else 1===Gt.length&&null===Gt[0].init&&this.matchContextualKeyword("of")?(T=this.finalize(T,new be.VariableDeclaration(Gt,"var")),this.nextToken(),Ae=T,Je=this.parseAssignmentExpression(),T=null,ee=!1):(T=this.finalize(T,new be.VariableDeclaration(Gt,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){T=this.createNode();var en=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(Ft=this.context.allowIn,this.context.allowIn=!1,Gt=this.parseBindingList(en,{inFor:!0}),this.context.allowIn=Ft,1===Gt.length&&null===Gt[0].init&&this.matchKeyword("in")?(T=this.finalize(T,new be.VariableDeclaration(Gt,en)),this.nextToken(),Ae=T,Je=this.parseExpression(),T=null):1===Gt.length&&null===Gt[0].init&&this.matchContextualKeyword("of")?(T=this.finalize(T,new be.VariableDeclaration(Gt,en)),this.nextToken(),Ae=T,Je=this.parseAssignmentExpression(),T=null,ee=!1):(this.consumeSemicolon(),T=this.finalize(T,new be.VariableDeclaration(Gt,en)))):(T=this.finalize(T,new be.Identifier(en)),this.nextToken(),Ae=T,Je=this.parseExpression(),T=null)}else{var Ai=this.lookahead;if(Ft=this.context.allowIn,this.context.allowIn=!1,T=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=Ft,this.matchKeyword("in"))(!this.context.isAssignmentTarget||T.type===$e.Syntax.AssignmentExpression)&&this.tolerateError(ze.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(T),Ae=T,Je=this.parseExpression(),T=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||T.type===$e.Syntax.AssignmentExpression)&&this.tolerateError(ze.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(T),Ae=T,Je=this.parseAssignmentExpression(),T=null,ee=!1;else{if(this.match(",")){for(var $r=[T];this.match(",");)this.nextToken(),$r.push(this.isolateCoverGrammar(this.parseAssignmentExpression));T=this.finalize(this.startNode(Ai),new be.SequenceExpression($r))}this.expect(";")}}if(typeof Ae>"u"&&(this.match(";")||(A=this.parseExpression()),this.expect(";"),this.match(")")||(F=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),Ur=this.finalize(this.createNode(),new be.EmptyStatement);else{this.expect(")");var ss=this.context.inIteration;this.context.inIteration=!0,Ur=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=ss}return this.finalize(St,typeof Ae>"u"?new be.ForStatement(T,A,F,Ur):ee?new be.ForInStatement(Ae,Je,Ur):new be.ForOfStatement(Ae,Je,Ur))},se.prototype.parseContinueStatement=function(){var T=this.createNode();this.expectKeyword("continue");var A=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var F=this.parseVariableIdentifier();A=F,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+F.name)||this.throwError(ze.Messages.UnknownLabel,F.name)}return this.consumeSemicolon(),null===A&&!this.context.inIteration&&this.throwError(ze.Messages.IllegalContinue),this.finalize(T,new be.ContinueStatement(A))},se.prototype.parseBreakStatement=function(){var T=this.createNode();this.expectKeyword("break");var A=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var F=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+F.name)||this.throwError(ze.Messages.UnknownLabel,F.name),A=F}return this.consumeSemicolon(),null===A&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(ze.Messages.IllegalBreak),this.finalize(T,new be.BreakStatement(A))},se.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(ze.Messages.IllegalReturn);var T=this.createNode();this.expectKeyword("return");var F=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(T,new be.ReturnStatement(F))},se.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(ze.Messages.StrictModeWith);var A,T=this.createNode();this.expectKeyword("with"),this.expect("(");var F=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),A=this.finalize(this.createNode(),new be.EmptyStatement)):(this.expect(")"),A=this.parseStatement()),this.finalize(T,new be.WithStatement(F,A))},se.prototype.parseSwitchCase=function(){var A,T=this.createNode();this.matchKeyword("default")?(this.nextToken(),A=null):(this.expectKeyword("case"),A=this.parseExpression()),this.expect(":");for(var F=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)F.push(this.parseStatementListItem());return this.finalize(T,new be.SwitchCase(A,F))},se.prototype.parseSwitchStatement=function(){var T=this.createNode();this.expectKeyword("switch"),this.expect("(");var A=this.parseExpression();this.expect(")");var F=this.context.inSwitch;this.context.inSwitch=!0;var ee=[],Ae=!1;for(this.expect("{");!this.match("}");){var Je=this.parseSwitchCase();null===Je.test&&(Ae&&this.throwError(ze.Messages.MultipleDefaultsInSwitch),Ae=!0),ee.push(Je)}return this.expect("}"),this.context.inSwitch=F,this.finalize(T,new be.SwitchStatement(A,ee))},se.prototype.parseLabelledStatement=function(){var F,T=this.createNode(),A=this.parseExpression();if(A.type===$e.Syntax.Identifier&&this.match(":")){this.nextToken();var ee=A,Ae="$"+ee.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,Ae)&&this.throwError(ze.Messages.Redeclaration,"Label",ee.name),this.context.labelSet[Ae]=!0;var Je=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),Je=this.parseClassDeclaration();else if(this.matchKeyword("function")){var St=this.lookahead,Ft=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(St,ze.Messages.StrictFunction):Ft.generator&&this.tolerateUnexpectedToken(St,ze.Messages.GeneratorInLegacyContext),Je=Ft}else Je=this.parseStatement();delete this.context.labelSet[Ae],F=new be.LabeledStatement(ee,Je)}else this.consumeSemicolon(),F=new be.ExpressionStatement(A);return this.finalize(T,F)},se.prototype.parseThrowStatement=function(){var T=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(ze.Messages.NewlineAfterThrow);var A=this.parseExpression();return this.consumeSemicolon(),this.finalize(T,new be.ThrowStatement(A))},se.prototype.parseCatchClause=function(){var T=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var A=[],F=this.parsePattern(A),ee={},Ae=0;Ae0&&this.tolerateError(ze.Messages.BadGetterArity);var Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(T,new be.FunctionExpression(null,ee.params,Ae,false))},se.prototype.parseSetterMethod=function(){var T=this.createNode(),F=this.context.allowYield;this.context.allowYield=!0;var ee=this.parseFormalParameters();1!==ee.params.length?this.tolerateError(ze.Messages.BadSetterArity):ee.params[0]instanceof be.RestElement&&this.tolerateError(ze.Messages.BadSetterRestParameter);var Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(T,new be.FunctionExpression(null,ee.params,Ae,false))},se.prototype.parseGeneratorMethod=function(){var T=this.createNode(),F=this.context.allowYield;this.context.allowYield=!0;var ee=this.parseFormalParameters();this.context.allowYield=!1;var Ae=this.parsePropertyMethod(ee);return this.context.allowYield=F,this.finalize(T,new be.FunctionExpression(null,ee.params,Ae,!0))},se.prototype.isStartOfExpression=function(){var T=!0,A=this.lookahead.value;switch(this.lookahead.type){case 7:T="["===A||"("===A||"{"===A||"+"===A||"-"===A||"!"===A||"~"===A||"++"===A||"--"===A||"/"===A||"/="===A;break;case 4:T="class"===A||"delete"===A||"function"===A||"let"===A||"new"===A||"super"===A||"this"===A||"typeof"===A||"void"===A||"yield"===A}return T},se.prototype.parseYieldExpression=function(){var T=this.createNode();this.expectKeyword("yield");var A=null,F=!1;if(!this.hasLineTerminator){var ee=this.context.allowYield;this.context.allowYield=!1,(F=this.match("*"))?(this.nextToken(),A=this.parseAssignmentExpression()):this.isStartOfExpression()&&(A=this.parseAssignmentExpression()),this.context.allowYield=ee}return this.finalize(T,new be.YieldExpression(A,F))},se.prototype.parseClassElement=function(T){var A=this.lookahead,F=this.createNode(),ee="",Ae=null,Je=null,St=!1,Ft=!1,Gt=!1,yn=!1;if(this.match("*"))this.nextToken();else if(St=this.match("["),"static"===(Ae=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(A=this.lookahead,Gt=!0,St=this.match("["),this.match("*")?this.nextToken():Ae=this.parseObjectPropertyKey()),3===A.type&&!this.hasLineTerminator&&"async"===A.value){var Ai=this.lookahead.value;":"!==Ai&&"("!==Ai&&"*"!==Ai&&(yn=!0,A=this.lookahead,Ae=this.parseObjectPropertyKey(),3===A.type&&"constructor"===A.value&&this.tolerateUnexpectedToken(A,ze.Messages.ConstructorIsAsync))}var $r=this.qualifiedPropertyName(this.lookahead);return 3===A.type?"get"===A.value&&$r?(ee="get",St=this.match("["),Ae=this.parseObjectPropertyKey(),this.context.allowYield=!1,Je=this.parseGetterMethod()):"set"===A.value&&$r&&(ee="set",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseSetterMethod()):7===A.type&&"*"===A.value&&$r&&(ee="init",St=this.match("["),Ae=this.parseObjectPropertyKey(),Je=this.parseGeneratorMethod(),Ft=!0),!ee&&Ae&&this.match("(")&&(ee="init",Je=yn?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),Ft=!0),ee||this.throwUnexpectedToken(this.lookahead),"init"===ee&&(ee="method"),St||(Gt&&this.isPropertyKey(Ae,"prototype")&&this.throwUnexpectedToken(A,ze.Messages.StaticPrototype),!Gt&&this.isPropertyKey(Ae,"constructor")&&(("method"!==ee||!Ft||Je&&Je.generator)&&this.throwUnexpectedToken(A,ze.Messages.ConstructorSpecialMethod),T.value?this.throwUnexpectedToken(A,ze.Messages.DuplicateConstructor):T.value=!0,ee="constructor")),this.finalize(F,new be.MethodDefinition(Ae,St,Je,ee,Gt))},se.prototype.parseClassElementList=function(){var T=[],A={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():T.push(this.parseClassElement(A));return this.expect("}"),T},se.prototype.parseClassBody=function(){var T=this.createNode(),A=this.parseClassElementList();return this.finalize(T,new be.ClassBody(A))},se.prototype.parseClassDeclaration=function(T){var A=this.createNode(),F=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var ee=T&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),Ae=null;this.matchKeyword("extends")&&(this.nextToken(),Ae=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Je=this.parseClassBody();return this.context.strict=F,this.finalize(A,new be.ClassDeclaration(ee,Ae,Je))},se.prototype.parseClassExpression=function(){var T=this.createNode(),A=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var F=3===this.lookahead.type?this.parseVariableIdentifier():null,ee=null;this.matchKeyword("extends")&&(this.nextToken(),ee=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var Ae=this.parseClassBody();return this.context.strict=A,this.finalize(T,new be.ClassExpression(F,ee,Ae))},se.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var T=this.createNode(),A=this.parseDirectivePrologues();2!==this.lookahead.type;)A.push(this.parseStatementListItem());return this.finalize(T,new be.Module(A))},se.prototype.parseScript=function(){for(var T=this.createNode(),A=this.parseDirectivePrologues();2!==this.lookahead.type;)A.push(this.parseStatementListItem());return this.finalize(T,new be.Script(A))},se.prototype.parseModuleSpecifier=function(){var T=this.createNode();8!==this.lookahead.type&&this.throwError(ze.Messages.InvalidModuleSpecifier);var A=this.nextToken(),F=this.getTokenRaw(A);return this.finalize(T,new be.Literal(A.value,F))},se.prototype.parseImportSpecifier=function(){var A,F,T=this.createNode();return 3===this.lookahead.type?(F=A=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),F=this.parseVariableIdentifier())):(F=A=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),F=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(T,new be.ImportSpecifier(F,A))},se.prototype.parseNamedImports=function(){this.expect("{");for(var T=[];!this.match("}");)T.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),T},se.prototype.parseImportDefaultSpecifier=function(){var T=this.createNode(),A=this.parseIdentifierName();return this.finalize(T,new be.ImportDefaultSpecifier(A))},se.prototype.parseImportNamespaceSpecifier=function(){var T=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(ze.Messages.NoAsAfterImportNamespace),this.nextToken();var A=this.parseIdentifierName();return this.finalize(T,new be.ImportNamespaceSpecifier(A))},se.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(ze.Messages.IllegalImportDeclaration);var T=this.createNode();this.expectKeyword("import");var A,F=[];return 8===this.lookahead.type||(this.match("{")?F=F.concat(this.parseNamedImports()):this.match("*")?F.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(F.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?F.push(this.parseImportNamespaceSpecifier()):this.match("{")?F=F.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?ze.Messages.UnexpectedToken:ze.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),A=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(T,new be.ImportDeclaration(F,A))},se.prototype.parseExportSpecifier=function(){var T=this.createNode(),A=this.parseIdentifierName(),F=A;return this.matchContextualKeyword("as")&&(this.nextToken(),F=this.parseIdentifierName()),this.finalize(T,new be.ExportSpecifier(A,F))},se.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(ze.Messages.IllegalExportDeclaration);var A,T=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var F=this.parseFunctionDeclaration(!0);A=this.finalize(T,new be.ExportDefaultDeclaration(F))}else this.matchKeyword("class")?(F=this.parseClassDeclaration(!0),A=this.finalize(T,new be.ExportDefaultDeclaration(F))):this.matchContextualKeyword("async")?(F=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),A=this.finalize(T,new be.ExportDefaultDeclaration(F))):(this.matchContextualKeyword("from")&&this.throwError(ze.Messages.UnexpectedToken,this.lookahead.value),F=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),A=this.finalize(T,new be.ExportDefaultDeclaration(F)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?ze.Messages.UnexpectedToken:ze.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var Ae=this.parseModuleSpecifier();this.consumeSemicolon(),A=this.finalize(T,new be.ExportAllDeclaration(Ae))}else if(4===this.lookahead.type){switch(F=void 0,this.lookahead.value){case"let":case"const":F=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":F=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}A=this.finalize(T,new be.ExportNamedDeclaration(F,[],null))}else if(this.matchAsyncFunction())F=this.parseFunctionDeclaration(),A=this.finalize(T,new be.ExportNamedDeclaration(F,[],null));else{var Je=[],St=null,Ft=!1;for(this.expect("{");!this.match("}");)Ft=Ft||this.matchKeyword("default"),Je.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),St=this.parseModuleSpecifier(),this.consumeSemicolon()):Ft?this.throwError(this.lookahead.value?ze.Messages.UnexpectedToken:ze.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),A=this.finalize(T,new be.ExportNamedDeclaration(null,Je,St))}return A},se}();ke.Parser=ce},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.assert=function nt(Ie,ct){if(!Ie)throw new Error("ASSERT: "+ct)}},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var nt=function(){function Ie(){this.errors=[],this.tolerant=!1}return Ie.prototype.recordError=function(ct){this.errors.push(ct)},Ie.prototype.tolerate=function(ct){if(!this.tolerant)throw ct;this.recordError(ct)},Ie.prototype.constructError=function(ct,ze){var be=new Error(ct);try{throw be}catch(Ze){Object.create&&Object.defineProperty&&(be=Object.create(Ze),Object.defineProperty(be,"column",{value:ze}))}return be},Ie.prototype.createError=function(ct,ze,be,Ze){var ge=this.constructError("Line "+ze+": "+Ze,be);return ge.index=ct,ge.lineNumber=ze,ge.description=Ze,ge},Ie.prototype.throwError=function(ct,ze,be,Ze){throw this.createError(ct,ze,be,Ze)},Ie.prototype.tolerateError=function(ct,ze,be,Ze){var $e=this.createError(ct,ze,be,Ze);if(!this.tolerant)throw $e;this.recordError($e)},Ie}();ke.ErrorHandler=nt},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(9),ct=nt(4),ze=nt(11);function be(ge){return"0123456789abcdef".indexOf(ge.toLowerCase())}function Ze(ge){return"01234567".indexOf(ge)}var $e=function(){function ge(oe,ce){this.source=oe,this.errorHandler=ce,this.trackComment=!1,this.isModule=!1,this.length=oe.length,this.index=0,this.lineNumber=oe.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return ge.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},ge.prototype.restoreState=function(oe){this.index=oe.index,this.lineNumber=oe.lineNumber,this.lineStart=oe.lineStart},ge.prototype.eof=function(){return this.index>=this.length},ge.prototype.throwUnexpectedToken=function(oe){return void 0===oe&&(oe=ze.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,oe)},ge.prototype.tolerateUnexpectedToken=function(oe){void 0===oe&&(oe=ze.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,oe)},ge.prototype.skipSingleLineComment=function(oe){var se,T,ce=[];for(this.trackComment&&(ce=[],se=this.index-oe,T={start:{line:this.lineNumber,column:this.index-this.lineStart-oe},end:{}});!this.eof();){var A=this.source.charCodeAt(this.index);if(++this.index,ct.Character.isLineTerminator(A))return this.trackComment&&(T.end={line:this.lineNumber,column:this.index-this.lineStart-1},ce.push({multiLine:!1,slice:[se+oe,this.index-1],range:[se,this.index-1],loc:T})),13===A&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ce}return this.trackComment&&(T.end={line:this.lineNumber,column:this.index-this.lineStart},ce.push({multiLine:!1,slice:[se+oe,this.index],range:[se,this.index],loc:T})),ce},ge.prototype.skipMultiLineComment=function(){var ce,se,oe=[];for(this.trackComment&&(oe=[],ce=this.index-2,se={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var T=this.source.charCodeAt(this.index);if(ct.Character.isLineTerminator(T))13===T&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===T){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(se.end={line:this.lineNumber,column:this.index-this.lineStart},oe.push({multiLine:!0,slice:[ce+2,this.index-2],range:[ce,this.index],loc:se})),oe;++this.index}else++this.index}return this.trackComment&&(se.end={line:this.lineNumber,column:this.index-this.lineStart},oe.push({multiLine:!0,slice:[ce+2,this.index],range:[ce,this.index],loc:se})),this.tolerateUnexpectedToken(),oe},ge.prototype.scanComments=function(){var oe;this.trackComment&&(oe=[]);for(var ce=0===this.index;!this.eof();){var se=this.source.charCodeAt(this.index);if(ct.Character.isWhiteSpace(se))++this.index;else if(ct.Character.isLineTerminator(se))++this.index,13===se&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,ce=!0;else if(47===se)if(47===(se=this.source.charCodeAt(this.index+1))){this.index+=2;var T=this.skipSingleLineComment(2);this.trackComment&&(oe=oe.concat(T)),ce=!0}else{if(42!==se)break;this.index+=2,T=this.skipMultiLineComment(),this.trackComment&&(oe=oe.concat(T))}else if(ce&&45===se){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,T=this.skipSingleLineComment(3),this.trackComment&&(oe=oe.concat(T))}else{if(60!==se||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,T=this.skipSingleLineComment(4),this.trackComment&&(oe=oe.concat(T))}}return oe},ge.prototype.isFutureReservedWord=function(oe){switch(oe){case"enum":case"export":case"import":case"super":return!0;default:return!1}},ge.prototype.isStrictModeReservedWord=function(oe){switch(oe){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},ge.prototype.isRestrictedWord=function(oe){return"eval"===oe||"arguments"===oe},ge.prototype.isKeyword=function(oe){switch(oe.length){case 2:return"if"===oe||"in"===oe||"do"===oe;case 3:return"var"===oe||"for"===oe||"new"===oe||"try"===oe||"let"===oe;case 4:return"this"===oe||"else"===oe||"case"===oe||"void"===oe||"with"===oe||"enum"===oe;case 5:return"while"===oe||"break"===oe||"catch"===oe||"throw"===oe||"const"===oe||"yield"===oe||"class"===oe||"super"===oe;case 6:return"return"===oe||"typeof"===oe||"delete"===oe||"switch"===oe||"export"===oe||"import"===oe;case 7:return"default"===oe||"finally"===oe||"extends"===oe;case 8:return"function"===oe||"continue"===oe||"debugger"===oe;case 10:return"instanceof"===oe;default:return!1}},ge.prototype.codePointAt=function(oe){var ce=this.source.charCodeAt(oe);if(ce>=55296&&ce<=56319){var se=this.source.charCodeAt(oe+1);se>=56320&&se<=57343&&(ce=1024*(ce-55296)+se-56320+65536)}return ce},ge.prototype.scanHexEscape=function(oe){for(var ce="u"===oe?4:2,se=0,T=0;T1114111||"}"!==oe)&&this.throwUnexpectedToken(),ct.Character.fromCodePoint(ce)},ge.prototype.getIdentifier=function(){for(var oe=this.index++;!this.eof();){var ce=this.source.charCodeAt(this.index);if(92===ce)return this.index=oe,this.getComplexIdentifier();if(ce>=55296&&ce<57343)return this.index=oe,this.getComplexIdentifier();if(!ct.Character.isIdentifierPart(ce))break;++this.index}return this.source.slice(oe,this.index)},ge.prototype.getComplexIdentifier=function(){var se,oe=this.codePointAt(this.index),ce=ct.Character.fromCodePoint(oe);for(this.index+=ce.length,92===oe&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,se=this.scanUnicodeCodePointEscape()):(null===(se=this.scanHexEscape("u"))||"\\"===se||!ct.Character.isIdentifierStart(se.charCodeAt(0)))&&this.throwUnexpectedToken(),ce=se);!this.eof()&&(oe=this.codePointAt(this.index),ct.Character.isIdentifierPart(oe));)ce+=se=ct.Character.fromCodePoint(oe),this.index+=se.length,92===oe&&(ce=ce.substr(0,ce.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,se=this.scanUnicodeCodePointEscape()):(null===(se=this.scanHexEscape("u"))||"\\"===se||!ct.Character.isIdentifierPart(se.charCodeAt(0)))&&this.throwUnexpectedToken(),ce+=se);return ce},ge.prototype.octalToDecimal=function(oe){var ce="0"!==oe,se=Ze(oe);return!this.eof()&&ct.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(ce=!0,se=8*se+Ze(this.source[this.index++]),"0123".indexOf(oe)>=0&&!this.eof()&&ct.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(se=8*se+Ze(this.source[this.index++]))),{code:se,octal:ce}},ge.prototype.scanIdentifier=function(){var oe,ce=this.index,se=92===this.source.charCodeAt(ce)?this.getComplexIdentifier():this.getIdentifier();if(3!=(oe=1===se.length?3:this.isKeyword(se)?4:"null"===se?5:"true"===se||"false"===se?1:3)&&ce+se.length!==this.index){var T=this.index;this.index=ce,this.tolerateUnexpectedToken(ze.Messages.InvalidEscapedReservedWord),this.index=T}return{type:oe,value:se,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ce,end:this.index}},ge.prototype.scanPunctuator=function(){var oe=this.index,ce=this.source[this.index];switch(ce){case"(":case"{":"{"===ce&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,ce="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(ce=this.source.substr(this.index,4))?this.index+=4:"==="===(ce=ce.substr(0,3))||"!=="===ce||">>>"===ce||"<<="===ce||">>="===ce||"**="===ce?this.index+=3:"&&"===(ce=ce.substr(0,2))||"||"===ce||"=="===ce||"!="===ce||"+="===ce||"-="===ce||"*="===ce||"/="===ce||"++"===ce||"--"===ce||"<<"===ce||">>"===ce||"&="===ce||"|="===ce||"^="===ce||"%="===ce||"<="===ce||">="===ce||"=>"===ce||"**"===ce?this.index+=2:"<>=!+-*%&|^/".indexOf(ce=this.source[this.index])>=0&&++this.index}return this.index===oe&&this.throwUnexpectedToken(),{type:7,value:ce,lineNumber:this.lineNumber,lineStart:this.lineStart,start:oe,end:this.index}},ge.prototype.scanHexLiteral=function(oe){for(var ce="";!this.eof()&&ct.Character.isHexDigit(this.source.charCodeAt(this.index));)ce+=this.source[this.index++];return 0===ce.length&&this.throwUnexpectedToken(),ct.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+ce,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:oe,end:this.index}},ge.prototype.scanBinaryLiteral=function(oe){for(var se,ce="";!this.eof()&&("0"===(se=this.source[this.index])||"1"===se);)ce+=this.source[this.index++];return 0===ce.length&&this.throwUnexpectedToken(),this.eof()||(se=this.source.charCodeAt(this.index),(ct.Character.isIdentifierStart(se)||ct.Character.isDecimalDigit(se))&&this.throwUnexpectedToken()),{type:6,value:parseInt(ce,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:oe,end:this.index}},ge.prototype.scanOctalLiteral=function(oe,ce){var se="",T=!1;for(ct.Character.isOctalDigit(oe.charCodeAt(0))?(T=!0,se="0"+this.source[this.index++]):++this.index;!this.eof()&&ct.Character.isOctalDigit(this.source.charCodeAt(this.index));)se+=this.source[this.index++];return!T&&0===se.length&&this.throwUnexpectedToken(),(ct.Character.isIdentifierStart(this.source.charCodeAt(this.index))||ct.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(se,8),octal:T,lineNumber:this.lineNumber,lineStart:this.lineStart,start:ce,end:this.index}},ge.prototype.isImplicitOctalLiteral=function(){for(var oe=this.index+1;oe=0&&(T=T.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(F,ee,Ae){var Je=parseInt(ee||Ae,16);return Je>1114111&&A.throwUnexpectedToken(ze.Messages.InvalidRegExp),Je<=65535?String.fromCharCode(Je):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(T)}catch{this.throwUnexpectedToken(ze.Messages.InvalidRegExp)}try{return new RegExp(oe,ce)}catch{return null}},ge.prototype.scanRegExpBody=function(){var oe=this.source[this.index];Ie.assert("/"===oe,"Regular expression literal must start with a slash");for(var ce=this.source[this.index++],se=!1,T=!1;!this.eof();)if(ce+=oe=this.source[this.index++],"\\"===oe)oe=this.source[this.index++],ct.Character.isLineTerminator(oe.charCodeAt(0))&&this.throwUnexpectedToken(ze.Messages.UnterminatedRegExp),ce+=oe;else if(ct.Character.isLineTerminator(oe.charCodeAt(0)))this.throwUnexpectedToken(ze.Messages.UnterminatedRegExp);else if(se)"]"===oe&&(se=!1);else{if("/"===oe){T=!0;break}"["===oe&&(se=!0)}return T||this.throwUnexpectedToken(ze.Messages.UnterminatedRegExp),ce.substr(1,ce.length-2)},ge.prototype.scanRegExpFlags=function(){for(var ce="";!this.eof();){var se=this.source[this.index];if(!ct.Character.isIdentifierPart(se.charCodeAt(0)))break;if(++this.index,"\\"!==se||this.eof())ce+=se;else if("u"===(se=this.source[this.index])){++this.index;var T=this.index,A=this.scanHexEscape("u");if(null!==A)for(ce+=A;T=55296&&oe<57343&&ct.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},ge}();ke.Scanner=$e},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.TokenName={},ke.TokenName[1]="Boolean",ke.TokenName[2]="",ke.TokenName[3]="Identifier",ke.TokenName[4]="Keyword",ke.TokenName[5]="Null",ke.TokenName[6]="Numeric",ke.TokenName[7]="Punctuator",ke.TokenName[8]="String",ke.TokenName[9]="RegularExpression",ke.TokenName[10]="Template"},function(Dn,ke){"use strict";Object.defineProperty(ke,"__esModule",{value:!0}),ke.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(Dn,ke,nt){"use strict";Object.defineProperty(ke,"__esModule",{value:!0});var Ie=nt(10),ct=nt(12),ze=nt(13),be=function(){function $e(){this.values=[],this.curly=this.paren=-1}return $e.prototype.beforeFunctionExpression=function(ge){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(ge)>=0},$e.prototype.isRegexStart=function(){var ge=this.values[this.values.length-1],oe=null!==ge;switch(ge){case"this":case"]":oe=!1;break;case")":var ce=this.values[this.paren-1];oe="if"===ce||"while"===ce||"for"===ce||"with"===ce;break;case"}":if(oe=!1,"function"===this.values[this.curly-3])oe=!!(se=this.values[this.curly-4])&&!this.beforeFunctionExpression(se);else if("function"===this.values[this.curly-4]){var se;oe=!(se=this.values[this.curly-5])||!this.beforeFunctionExpression(se)}}return oe},$e.prototype.push=function(ge){7===ge.type||4===ge.type?("{"===ge.value?this.curly=this.values.length:"("===ge.value&&(this.paren=this.values.length),this.values.push(ge.value)):this.values.push(null)},$e}(),Ze=function(){function $e(ge,oe){this.errorHandler=new Ie.ErrorHandler,this.errorHandler.tolerant=!!oe&&"boolean"==typeof oe.tolerant&&oe.tolerant,this.scanner=new ct.Scanner(ge,this.errorHandler),this.scanner.trackComment=!!oe&&"boolean"==typeof oe.comment&&oe.comment,this.trackRange=!!oe&&"boolean"==typeof oe.range&&oe.range,this.trackLoc=!!oe&&"boolean"==typeof oe.loc&&oe.loc,this.buffer=[],this.reader=new be}return $e.prototype.errors=function(){return this.errorHandler.errors},$e.prototype.getNextToken=function(){if(0===this.buffer.length){var ge=this.scanner.scanComments();if(this.scanner.trackComment)for(var oe=0;oe=se.status}function Ze(ce){try{ce.dispatchEvent(new MouseEvent("click"))}catch{var se=document.createEvent("MouseEvents");se.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),ce.dispatchEvent(se)}}var $e="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,ge=$e.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),oe=$e.saveAs||("object"!=typeof window||window!==$e?function(){}:"download"in HTMLAnchorElement.prototype&&!ge?function(ce,se,T){var A=$e.URL||$e.webkitURL,F=document.createElement("a");F.download=se=se||ce.name||"download",F.rel="noopener","string"==typeof ce?(F.href=ce,F.origin===location.origin?Ze(F):be(F.href)?ze(ce,se,T):Ze(F,F.target="_blank")):(F.href=A.createObjectURL(ce),setTimeout(function(){A.revokeObjectURL(F.href)},4e4),setTimeout(function(){Ze(F)},0))}:"msSaveOrOpenBlob"in navigator?function(ce,se,T){if(se=se||ce.name||"download","string"!=typeof ce)navigator.msSaveOrOpenBlob(function ct(ce,se){return typeof se>"u"?se={autoBom:!1}:"object"!=typeof se&&(console.warn("Deprecated: Expected third argument to be a object"),se={autoBom:!se}),se.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(ce.type)?new Blob(["\ufeff",ce],{type:ce.type}):ce}(ce,T),se);else if(be(ce))ze(ce,se,T);else{var A=document.createElement("a");A.href=ce,A.target="_blank",setTimeout(function(){Ze(A)})}}:function(ce,se,T,A){if((A=A||open("","_blank"))&&(A.document.title=A.document.body.innerText="downloading..."),"string"==typeof ce)return ze(ce,se,T);var F="application/octet-stream"===ce.type,ee=/constructor/i.test($e.HTMLElement)||$e.safari,Ae=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ae||F&&ee||ge)&&typeof FileReader<"u"){var Je=new FileReader;Je.onloadend=function(){var Gt=Je.result;Gt=Ae?Gt:Gt.replace(/^data:[^;]*;/,"data:attachment/file;"),A?A.location.href=Gt:location=Gt,A=null},Je.readAsDataURL(ce)}else{var St=$e.URL||$e.webkitURL,Ft=St.createObjectURL(ce);A?A.location=Ft:location.href=Ft,A=null,setTimeout(function(){St.revokeObjectURL(Ft)},4e4)}});$e.saveAs=oe.saveAs=oe,Yt.exports=oe})?ke.apply(Dn,[]):ke)&&(Yt.exports=Ie)},461:(Yt,Dn)=>{Dn.read=function(ke,nt,Ie,ct,ze){var be,Ze,$e=8*ze-ct-1,ge=(1<<$e)-1,oe=ge>>1,ce=-7,se=Ie?ze-1:0,T=Ie?-1:1,A=ke[nt+se];for(se+=T,be=A&(1<<-ce)-1,A>>=-ce,ce+=$e;ce>0;be=256*be+ke[nt+se],se+=T,ce-=8);for(Ze=be&(1<<-ce)-1,be>>=-ce,ce+=ct;ce>0;Ze=256*Ze+ke[nt+se],se+=T,ce-=8);if(0===be)be=1-oe;else{if(be===ge)return Ze?NaN:1/0*(A?-1:1);Ze+=Math.pow(2,ct),be-=oe}return(A?-1:1)*Ze*Math.pow(2,be-ct)},Dn.write=function(ke,nt,Ie,ct,ze,be){var Ze,$e,ge,oe=8*be-ze-1,ce=(1<>1,T=23===ze?Math.pow(2,-24)-Math.pow(2,-77):0,A=ct?0:be-1,F=ct?1:-1,ee=nt<0||0===nt&&1/nt<0?1:0;for(nt=Math.abs(nt),isNaN(nt)||nt===1/0?($e=isNaN(nt)?1:0,Ze=ce):(Ze=Math.floor(Math.log(nt)/Math.LN2),nt*(ge=Math.pow(2,-Ze))<1&&(Ze--,ge*=2),(nt+=Ze+se>=1?T/ge:T*Math.pow(2,1-se))*ge>=2&&(Ze++,ge/=2),Ze+se>=ce?($e=0,Ze=ce):Ze+se>=1?($e=(nt*ge-1)*Math.pow(2,ze),Ze+=se):($e=nt*Math.pow(2,se-1)*Math.pow(2,ze),Ze=0));ze>=8;ke[Ie+A]=255&$e,A+=F,$e/=256,ze-=8);for(Ze=Ze<0;ke[Ie+A]=255&Ze,A+=F,Ze/=256,oe-=8);ke[Ie+A-F]|=128*ee}},870:(Yt,Dn,ke)=>{"use strict";var nt=ke(133);Yt.exports=nt},133:(Yt,Dn,ke)=>{"use strict";var nt=ke(840),Ie=ke(34);function ct(ze){return function(){throw new Error("Function "+ze+" is deprecated and cannot be used.")}}Yt.exports.Type=ke(647),Yt.exports.Schema=ke(372),Yt.exports.FAILSAFE_SCHEMA=ke(746),Yt.exports.JSON_SCHEMA=ke(147),Yt.exports.CORE_SCHEMA=ke(192),Yt.exports.DEFAULT_SAFE_SCHEMA=ke(31),Yt.exports.DEFAULT_FULL_SCHEMA=ke(94),Yt.exports.load=nt.load,Yt.exports.loadAll=nt.loadAll,Yt.exports.safeLoad=nt.safeLoad,Yt.exports.safeLoadAll=nt.safeLoadAll,Yt.exports.dump=Ie.dump,Yt.exports.safeDump=Ie.safeDump,Yt.exports.YAMLException=ke(314),Yt.exports.MINIMAL_SCHEMA=ke(746),Yt.exports.SAFE_SCHEMA=ke(31),Yt.exports.DEFAULT_SCHEMA=ke(94),Yt.exports.scan=ct("scan"),Yt.exports.parse=ct("parse"),Yt.exports.compose=ct("compose"),Yt.exports.addConstructor=ct("addConstructor")},997:Yt=>{"use strict";function Dn(be){return typeof be>"u"||null===be}Yt.exports.isNothing=Dn,Yt.exports.isObject=function ke(be){return"object"==typeof be&&null!==be},Yt.exports.toArray=function nt(be){return Array.isArray(be)?be:Dn(be)?[]:[be]},Yt.exports.repeat=function ct(be,Ze){var ge,$e="";for(ge=0;ge{"use strict";var nt=ke(997),Ie=ke(314),ct=ke(94),ze=ke(31),be=Object.prototype.toString,Ze=Object.prototype.hasOwnProperty,$e=9,ge=10,oe=13,ce=32,se=33,T=34,A=35,F=37,ee=38,Ae=39,Je=42,St=44,Ft=45,Gt=58,yn=61,en=62,Ai=63,$r=64,Ur=91,ss=93,Ya=96,dr=123,vu=124,Ca=125,_n={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},Cd=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kn(fe){var mt,Ot,Jt;if(mt=fe.toString(16).toUpperCase(),fe<=255)Ot="x",Jt=2;else if(fe<=65535)Ot="u",Jt=4;else{if(!(fe<=4294967295))throw new Ie("code point within a string may not be greater than 0xFFFFFFFF");Ot="U",Jt=8}return"\\"+Ot+nt.repeat("0",Jt-mt.length)+mt}function Ic(fe){this.schema=fe.schema||ct,this.indent=Math.max(1,fe.indent||2),this.noArrayIndent=fe.noArrayIndent||!1,this.skipInvalid=fe.skipInvalid||!1,this.flowLevel=nt.isNothing(fe.flowLevel)?-1:fe.flowLevel,this.styleMap=function Sd(fe,mt){var Ot,Jt,qt,Pt,cn,Wt,Ge;if(null===mt)return{};for(Ot={},qt=0,Pt=(Jt=Object.keys(mt)).length;qt0?fe.charCodeAt(Pt-1):null,Nr=Nr&&cl(cn,Wt)}else{for(Pt=0;PtJt&&" "!==fe[bn+1],bn=Pt);else if(!Sa(cn))return Xa;Wt=Pt>0?fe.charCodeAt(Pt-1):null,Nr=Nr&&cl(cn,Wt)}qe=qe||_t&&Pt-bn-1>Jt&&" "!==fe[bn+1]}return Ge||qe?Ot>9&&kd(fe)?Xa:qe?_u:Dd:Nr&&!qt(fe)?Nc:Fc}(mt,Jt||fe.flowLevel>-1&&Ot>=fe.flowLevel,fe.indent,Pt,function Wt(Ge){return function _o(fe,mt){var Ot,Jt;for(Ot=0,Jt=fe.implicitTypes.length;Ot"+Ml(mt,fe.indent)+De(yu(function Y(fe,mt){for(var Pt,cn,Ot=/(\n+)([^\n]*)/g,Jt=(qe=void 0,qe=fe.indexOf("\n"),Ot.lastIndex=qe=-1!==qe?qe:fe.length,Q(fe.slice(0,qe),mt)),qt="\n"===fe[0]||" "===fe[0];cn=Ot.exec(fe);){var Ge=cn[2];Pt=" "===Ge[0],Jt+=cn[1]+(qt||Pt||""===Ge?"":"\n")+Q(Ge,mt),qt=Pt}var qe;return Jt}(mt,Pt),qt));case Xa:return'"'+function Ne(fe){for(var Ot,Jt,qt,mt="",Pt=0;Pt=55296&&Ot<=56319&&(Jt=fe.charCodeAt(Pt+1))>=56320&&Jt<=57343?(mt+=Kn(1024*(Ot-55296)+Jt-56320+65536),Pt++):mt+=!(qt=_n[Ot])&&Sa(Ot)?fe[Pt]:qt||Kn(Ot);return mt}(mt)+'"';default:throw new Ie("impossible error: invalid scalar style")}}()}function Ml(fe,mt){var Ot=kd(fe)?String(mt):"",Jt="\n"===fe[fe.length-1];return Ot+(!Jt||"\n"!==fe[fe.length-2]&&"\n"!==fe?Jt?"":"-":"+")+"\n"}function De(fe){return"\n"===fe[fe.length-1]?fe.slice(0,-1):fe}function Q(fe,mt){if(""===fe||" "===fe[0])return fe;for(var Jt,Pt,Ot=/ [^ ]/g,qt=0,cn=0,Wt=0,Ge="";Jt=Ot.exec(fe);)(Wt=Jt.index)-qt>mt&&(Ge+="\n"+fe.slice(qt,Pt=cn>qt?cn:Wt),qt=Pt+1),cn=Wt;return Ge+="\n",(Ge+=fe.length-qt>mt&&cn>qt?fe.slice(qt,cn)+"\n"+fe.slice(cn+1):fe.slice(qt)).slice(1)}function M(fe,mt,Ot){var Jt,qt,Pt,cn,Wt,Ge;for(Pt=0,cn=(qt=Ot?fe.explicitTypes:fe.implicitTypes).length;Pt tag resolver accepts not "'+Ge+'" style');Jt=Wt.represent[Ge](mt,Ge)}fe.dump=Jt}return!0}return!1}function ot(fe,mt,Ot,Jt,qt,Pt){fe.tag=null,fe.dump=Ot,M(fe,Ot,!1)||M(fe,Ot,!0);var cn=be.call(fe.dump);Jt&&(Jt=fe.flowLevel<0||fe.flowLevel>mt);var Ge,qe,Wt="[object Object]"===cn||"[object Array]"===cn;if(Wt&&(qe=-1!==(Ge=fe.duplicates.indexOf(Ot))),(null!==fe.tag&&"?"!==fe.tag||qe||2!==fe.indent&&mt>0)&&(qt=!1),qe&&fe.usedDuplicates[Ge])fe.dump="*ref_"+Ge;else{if(Wt&&qe&&!fe.usedDuplicates[Ge]&&(fe.usedDuplicates[Ge]=!0),"[object Object]"===cn)Jt&&0!==Object.keys(fe.dump).length?(function Zi(fe,mt,Ot,Jt){var Wt,Ge,qe,_t,bn,Nr,qt="",Pt=fe.tag,cn=Object.keys(Ot);if(!0===fe.sortKeys)cn.sort();else if("function"==typeof fe.sortKeys)cn.sort(fe.sortKeys);else if(fe.sortKeys)throw new Ie("sortKeys must be a boolean or a function");for(Wt=0,Ge=cn.length;Wt1024)&&(fe.dump&&ge===fe.dump.charCodeAt(0)?Nr+="?":Nr+="? "),Nr+=fe.dump,bn&&(Nr+=Fo(fe,mt)),ot(fe,mt+1,_t,!0,bn)&&(fe.dump&&ge===fe.dump.charCodeAt(0)?Nr+=":":Nr+=": ",qt+=Nr+=fe.dump));fe.tag=Pt,fe.dump=qt||"{}"}(fe,mt,fe.dump,qt),qe&&(fe.dump="&ref_"+Ge+fe.dump)):(function Kt(fe,mt,Ot){var cn,Wt,Ge,qe,_t,Jt="",qt=fe.tag,Pt=Object.keys(Ot);for(cn=0,Wt=Pt.length;cn1024&&(_t+="? "),_t+=fe.dump+(fe.condenseFlow?'"':"")+":"+(fe.condenseFlow?"":" "),ot(fe,mt,qe,!1,!1)&&(Jt+=_t+=fe.dump));fe.tag=qt,fe.dump="{"+Jt+"}"}(fe,mt,fe.dump),qe&&(fe.dump="&ref_"+Ge+" "+fe.dump));else if("[object Array]"===cn){var _t=fe.noArrayIndent&&mt>0?mt-1:mt;Jt&&0!==fe.dump.length?(function Ht(fe,mt,Ot,Jt){var cn,Wt,qt="",Pt=fe.tag;for(cn=0,Wt=Ot.length;cn "+fe.dump)}return!0}function Dt(fe,mt){var qt,Pt,Ot=[],Jt=[];for(Ut(fe,Ot,Jt),qt=0,Pt=Jt.length;qt{"use strict";function Dn(ke,nt){Error.call(this),this.name="YAMLException",this.reason=ke,this.mark=nt,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(Dn.prototype=Object.create(Error.prototype)).constructor=Dn,Dn.prototype.toString=function(nt){var Ie=this.name+": ";return Ie+=this.reason||"(unknown reason)",!nt&&this.mark&&(Ie+=" "+this.mark.toString()),Ie},Yt.exports=Dn},840:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(314),ct=ke(48),ze=ke(31),be=ke(94),Ze=Object.prototype.hasOwnProperty,$e=1,ge=2,oe=3,ce=4,se=1,T=2,A=3,F=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,Ae=/[,\[\]\{\}]/,Je=/^(?:!|!!|![a-z\-]+!)$/i,St=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ft(M){return Object.prototype.toString.call(M)}function Gt(M){return 10===M||13===M}function yn(M){return 9===M||32===M}function en(M){return 9===M||32===M||10===M||13===M}function Ai(M){return 44===M||91===M||93===M||123===M||125===M}function $r(M){var ot;return 48<=M&&M<=57?M-48:97<=(ot=32|M)&&ot<=102?ot-97+10:-1}function Ur(M){return 120===M?2:117===M?4:85===M?8:0}function ss(M){return 48<=M&&M<=57?M-48:-1}function Ya(M){return 48===M?"\0":97===M?"\x07":98===M?"\b":116===M||9===M?"\t":110===M?"\n":118===M?"\v":102===M?"\f":114===M?"\r":101===M?"\x1b":32===M?" ":34===M?'"':47===M?"/":92===M?"\\":78===M?"\x85":95===M?"\xa0":76===M?"\u2028":80===M?"\u2029":""}function dr(M){return M<=65535?String.fromCharCode(M):String.fromCharCode(55296+(M-65536>>10),56320+(M-65536&1023))}for(var vu=new Array(256),Ca=new Array(256),_n=0;_n<256;_n++)vu[_n]=Ya(_n)?1:0,Ca[_n]=Ya(_n);function Cd(M,ot){this.input=M,this.filename=ot.filename||null,this.schema=ot.schema||be,this.onWarning=ot.onWarning||null,this.legacy=ot.legacy||!1,this.json=ot.json||!1,this.listener=ot.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=M.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Sd(M,ot){return new Ie(ot,new ct(M.filename,M.input,M.position,M.line,M.position-M.lineStart))}function Kn(M,ot){throw Sd(M,ot)}function Ic(M,ot){M.onWarning&&M.onWarning.call(null,Sd(M,ot))}var yu={YAML:function(ot,Dt,Ut){var Bt,hn,fe;null!==ot.version&&Kn(ot,"duplication of %YAML directive"),1!==Ut.length&&Kn(ot,"YAML directive accepts exactly one argument"),null===(Bt=/^([0-9]+)\.([0-9]+)$/.exec(Ut[0]))&&Kn(ot,"ill-formed argument of the YAML directive"),hn=parseInt(Bt[1],10),fe=parseInt(Bt[2],10),1!==hn&&Kn(ot,"unacceptable YAML version of the document"),ot.version=Ut[0],ot.checkLineBreaks=fe<2,1!==fe&&2!==fe&&Ic(ot,"unsupported YAML version of the document")},TAG:function(ot,Dt,Ut){var Bt,hn;2!==Ut.length&&Kn(ot,"TAG directive accepts exactly two arguments"),hn=Ut[1],Je.test(Bt=Ut[0])||Kn(ot,"ill-formed tag handle (first argument) of the TAG directive"),Ze.call(ot.tagMap,Bt)&&Kn(ot,'there is a previously declared suffix for "'+Bt+'" tag handle'),St.test(hn)||Kn(ot,"ill-formed tag prefix (second argument) of the TAG directive"),ot.tagMap[Bt]=hn}};function Fo(M,ot,Dt,Ut){var Bt,hn,fe,mt;if(ot1&&(M.result+=nt.repeat("\n",ot-1))}function Xa(M,ot){var Dt,Ot,Ut=M.tag,Bt=M.anchor,hn=[],mt=!1;for(null!==M.anchor&&(M.anchorMap[M.anchor]=hn),Ot=M.input.charCodeAt(M.position);0!==Ot&&45===Ot&&en(M.input.charCodeAt(M.position+1));)if(mt=!0,M.position++,Yr(M,!0,-1)&&M.lineIndent<=ot)hn.push(null),Ot=M.input.charCodeAt(M.position);else if(Dt=M.line,Y(M,ot,oe,!1,!0),hn.push(M.result),Yr(M,!0,-1),Ot=M.input.charCodeAt(M.position),(M.line===Dt||M.lineIndent>ot)&&0!==Ot)Kn(M,"bad indentation of a sequence entry");else if(M.lineIndentot?Ot=1:M.lineIndent===ot?Ot=0:M.lineIndentot?Ot=1:M.lineIndent===ot?Ot=0:M.lineIndentot)&&(Y(M,ot,ce,!0,Bt)&&(Ge?cn=M.result:Wt=M.result),Ge||(io(M,Jt,qt,Pt,cn,Wt,hn,fe),Pt=cn=Wt=null),Yr(M,!0,-1),_t=M.input.charCodeAt(M.position)),M.lineIndent>ot&&0!==_t)Kn(M,"bad indentation of a mapping entry");else if(M.lineIndent=0))break;0===qt?Kn(M,"bad explicit indentation width of a block scalar; it cannot be less than one"):fe?Kn(M,"repeat of an indentation width identifier"):(mt=ot+qt-1,fe=!0)}if(yn(Pt)){do{Pt=M.input.charCodeAt(++M.position)}while(yn(Pt));if(35===Pt)do{Pt=M.input.charCodeAt(++M.position)}while(!Gt(Pt)&&0!==Pt)}for(;0!==Pt;){for(Sa(M),M.lineIndent=0,Pt=M.input.charCodeAt(M.position);(!fe||M.lineIndentmt&&(mt=M.lineIndent),Gt(Pt))Ot++;else{if(M.lineIndent0){for(Bt=fe,hn=0;Bt>0;Bt--)(fe=$r(mt=M.input.charCodeAt(++M.position)))>=0?hn=(hn<<4)+fe:Kn(M,"expected hexadecimal character");M.result+=dr(hn),M.position++}else Kn(M,"unknown escape sequence");Dt=Ut=M.position}else Gt(mt)?(Fo(M,Dt,Ut,!0),Ql(M,Yr(M,!1,ot)),Dt=Ut=M.position):M.position===M.lineStart&&cl(M)?Kn(M,"unexpected end of the document within a double quoted scalar"):(M.position++,Ut=M.position)}Kn(M,"unexpected end of the stream within a double quoted scalar")}(M,Ge)?qt=!0:function De(M){var ot,Dt,Ut;if(42!==(Ut=M.input.charCodeAt(M.position)))return!1;for(Ut=M.input.charCodeAt(++M.position),ot=M.position;0!==Ut&&!en(Ut)&&!Ai(Ut);)Ut=M.input.charCodeAt(++M.position);return M.position===ot&&Kn(M,"name of an alias node must contain at least one character"),Dt=M.input.slice(ot,M.position),Ze.call(M.anchorMap,Dt)||Kn(M,'unidentified alias "'+Dt+'"'),M.result=M.anchorMap[Dt],Yr(M,!0,-1),!0}(M)?(qt=!0,(null!==M.tag||null!==M.anchor)&&Kn(M,"alias node should not have any properties")):function kd(M,ot,Dt){var Bt,hn,fe,mt,Ot,Jt,qt,Wt,Pt=M.kind,cn=M.result;if(en(Wt=M.input.charCodeAt(M.position))||Ai(Wt)||35===Wt||38===Wt||42===Wt||33===Wt||124===Wt||62===Wt||39===Wt||34===Wt||37===Wt||64===Wt||96===Wt||(63===Wt||45===Wt)&&(en(Bt=M.input.charCodeAt(M.position+1))||Dt&&Ai(Bt)))return!1;for(M.kind="scalar",M.result="",hn=fe=M.position,mt=!1;0!==Wt;){if(58===Wt){if(en(Bt=M.input.charCodeAt(M.position+1))||Dt&&Ai(Bt))break}else if(35===Wt){if(en(M.input.charCodeAt(M.position-1)))break}else{if(M.position===M.lineStart&&cl(M)||Dt&&Ai(Wt))break;if(Gt(Wt)){if(Ot=M.line,Jt=M.lineStart,qt=M.lineIndent,Yr(M,!1,-1),M.lineIndent>=ot){mt=!0,Wt=M.input.charCodeAt(M.position);continue}M.position=fe,M.line=Ot,M.lineStart=Jt,M.lineIndent=qt;break}}mt&&(Fo(M,hn,fe,!1),Ql(M,M.line-Ot),hn=fe=M.position,mt=!1),yn(Wt)||(fe=M.position+1),Wt=M.input.charCodeAt(++M.position)}return Fo(M,hn,fe,!1),!!M.result||(M.kind=Pt,M.result=cn,!1)}(M,Ge,$e===Dt)&&(qt=!0,null===M.tag&&(M.tag="?")),null!==M.anchor&&(M.anchorMap[M.anchor]=M.result)):0===Ot&&(qt=mt&&Xa(M,qe))),null!==M.tag&&"!"!==M.tag)if("?"===M.tag){for(null!==M.result&&"scalar"!==M.kind&&Kn(M,'unacceptable node kind for ! tag; it should be "scalar", not "'+M.kind+'"'),Pt=0,cn=M.implicitTypes.length;Pt tag; it should be "'+Wt.kind+'", not "'+M.kind+'"'),Wt.resolve(M.result)?(M.result=Wt.construct(M.result),null!==M.anchor&&(M.anchorMap[M.anchor]=M.result)):Kn(M,"cannot resolve a node with !<"+M.tag+"> explicit tag")):Kn(M,"unknown tag !<"+M.tag+">");return null!==M.listener&&M.listener("close",M),null!==M.tag||null!==M.anchor||qt}function Q(M){var Dt,Ut,Bt,fe,ot=M.position,hn=!1;for(M.version=null,M.checkLineBreaks=M.legacy,M.tagMap={},M.anchorMap={};0!==(fe=M.input.charCodeAt(M.position))&&(Yr(M,!0,-1),fe=M.input.charCodeAt(M.position),!(M.lineIndent>0||37!==fe));){for(hn=!0,fe=M.input.charCodeAt(++M.position),Dt=M.position;0!==fe&&!en(fe);)fe=M.input.charCodeAt(++M.position);for(Bt=[],(Ut=M.input.slice(Dt,M.position)).length<1&&Kn(M,"directive name must not be less than one character in length");0!==fe;){for(;yn(fe);)fe=M.input.charCodeAt(++M.position);if(35===fe){do{fe=M.input.charCodeAt(++M.position)}while(0!==fe&&!Gt(fe));break}if(Gt(fe))break;for(Dt=M.position;0!==fe&&!en(fe);)fe=M.input.charCodeAt(++M.position);Bt.push(M.input.slice(Dt,M.position))}0!==fe&&Sa(M),Ze.call(yu,Ut)?yu[Ut](M,Ut,Bt):Ic(M,'unknown document directive "'+Ut+'"')}Yr(M,!0,-1),0===M.lineIndent&&45===M.input.charCodeAt(M.position)&&45===M.input.charCodeAt(M.position+1)&&45===M.input.charCodeAt(M.position+2)?(M.position+=3,Yr(M,!0,-1)):hn&&Kn(M,"directives end mark is expected"),Y(M,M.lineIndent-1,ce,!1,!0),Yr(M,!0,-1),M.checkLineBreaks&&ee.test(M.input.slice(ot,M.position))&&Ic(M,"non-ASCII line breaks are interpreted as content"),M.documents.push(M.result),M.position===M.lineStart&&cl(M)?46===M.input.charCodeAt(M.position)&&(M.position+=3,Yr(M,!0,-1)):M.position"u"&&(Dt=ot,ot=null);var Ut=Ne(M,Dt);if("function"!=typeof ot)return Ut;for(var Bt=0,hn=Ut.length;Bt"u"&&(Dt=ot,ot=null),et(M,ot,nt.extend({schema:ze},Dt))},Yt.exports.safeLoad=function Zi(M,ot){return Ht(M,nt.extend({schema:ze},ot))}},48:(Yt,Dn,ke)=>{"use strict";var nt=ke(997);function Ie(ct,ze,be,Ze,$e){this.name=ct,this.buffer=ze,this.position=be,this.line=Ze,this.column=$e}Ie.prototype.getSnippet=function(ze,be){var Ze,$e,ge,oe,ce;if(!this.buffer)return null;for(ze=ze||4,be=be||75,Ze="",$e=this.position;$e>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt($e-1));)if(this.position-($e-=1)>be/2-1){Ze=" ... ",$e+=5;break}for(ge="",oe=this.position;oebe/2-1){ge=" ... ",oe-=5;break}return ce=this.buffer.slice($e,oe),nt.repeat(" ",ze)+Ze+ce+ge+"\n"+nt.repeat(" ",ze+this.position-$e+Ze.length)+"^"},Ie.prototype.toString=function(ze){var be,Ze="";return this.name&&(Ze+='in "'+this.name+'" '),Ze+="at line "+(this.line+1)+", column "+(this.column+1),ze||(be=this.getSnippet())&&(Ze+=":\n"+be),Ze},Yt.exports=Ie},372:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(314),ct=ke(647);function ze($e,ge,oe){var ce=[];return $e.include.forEach(function(se){oe=ze(se,ge,oe)}),$e[ge].forEach(function(se){oe.forEach(function(T,A){T.tag===se.tag&&T.kind===se.kind&&ce.push(A)}),oe.push(se)}),oe.filter(function(se,T){return-1===ce.indexOf(T)})}function Ze($e){this.include=$e.include||[],this.implicit=$e.implicit||[],this.explicit=$e.explicit||[],this.implicit.forEach(function(ge){if(ge.loadKind&&"scalar"!==ge.loadKind)throw new Ie("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=ze(this,"implicit",[]),this.compiledExplicit=ze(this,"explicit",[]),this.compiledTypeMap=function be(){var ge,oe,$e={scalar:{},sequence:{},mapping:{},fallback:{}};function ce(se){$e[se.kind][se.tag]=$e.fallback[se.tag]=se}for(ge=0,oe=arguments.length;ge{"use strict";var nt=ke(372);Yt.exports=new nt({include:[ke(147)]})},94:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=nt.DEFAULT=new nt({include:[ke(31)],explicit:[ke(771),ke(632),ke(716)]})},31:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=new nt({include:[ke(192)],implicit:[ke(934),ke(996)],explicit:[ke(486),ke(166),ke(711),ke(738)]})},746:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=new nt({explicit:[ke(464),ke(322),ke(71)]})},147:(Yt,Dn,ke)=>{"use strict";var nt=ke(372);Yt.exports=new nt({include:[ke(746)],implicit:[ke(568),ke(911),ke(877),ke(615)]})},647:(Yt,Dn,ke)=>{"use strict";var nt=ke(314),Ie=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],ct=["scalar","sequence","mapping"];Yt.exports=function be(Ze,$e){if($e=$e||{},Object.keys($e).forEach(function(ge){if(-1===Ie.indexOf(ge))throw new nt('Unknown option "'+ge+'" is met in definition of "'+Ze+'" YAML type.')}),this.tag=Ze,this.kind=$e.kind||null,this.resolve=$e.resolve||function(){return!0},this.construct=$e.construct||function(ge){return ge},this.instanceOf=$e.instanceOf||null,this.predicate=$e.predicate||null,this.represent=$e.represent||null,this.defaultStyle=$e.defaultStyle||null,this.styleAliases=function ze(Ze){var $e={};return null!==Ze&&Object.keys(Ze).forEach(function(ge){Ze[ge].forEach(function(oe){$e[String(oe)]=ge})}),$e}($e.styleAliases||null),-1===ct.indexOf(this.kind))throw new nt('Unknown kind "'+this.kind+'" is specified for "'+Ze+'" YAML type.')}},486:(Yt,Dn,ke)=>{"use strict";var nt;try{nt=ke(172).lW}catch{}var ct=ke(647),ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";Yt.exports=new ct("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function be(oe){if(null===oe)return!1;var ce,se,T=0,A=oe.length,F=ze;for(se=0;se64)){if(ce<0)return!1;T+=6}return T%8==0},construct:function Ze(oe){var ce,se,T=oe.replace(/[\r\n=]/g,""),A=T.length,F=ze,ee=0,Ae=[];for(ce=0;ce>16&255),Ae.push(ee>>8&255),Ae.push(255&ee)),ee=ee<<6|F.indexOf(T.charAt(ce));return 0==(se=A%4*6)?(Ae.push(ee>>16&255),Ae.push(ee>>8&255),Ae.push(255&ee)):18===se?(Ae.push(ee>>10&255),Ae.push(ee>>2&255)):12===se&&Ae.push(ee>>4&255),nt?nt.from?nt.from(Ae):new nt(Ae):Ae},predicate:function ge(oe){return nt&&nt.isBuffer(oe)},represent:function $e(oe){var T,A,ce="",se=0,F=oe.length,ee=ze;for(T=0;T>18&63],ce+=ee[se>>12&63],ce+=ee[se>>6&63],ce+=ee[63&se]),se=(se<<8)+oe[T];return 0==(A=F%3)?(ce+=ee[se>>18&63],ce+=ee[se>>12&63],ce+=ee[se>>6&63],ce+=ee[63&se]):2===A?(ce+=ee[se>>10&63],ce+=ee[se>>4&63],ce+=ee[se<<2&63],ce+=ee[64]):1===A&&(ce+=ee[se>>2&63],ce+=ee[se<<4&63],ce+=ee[64],ce+=ee[64]),ce}})},911:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function Ie(be){if(null===be)return!1;var Ze=be.length;return 4===Ze&&("true"===be||"True"===be||"TRUE"===be)||5===Ze&&("false"===be||"False"===be||"FALSE"===be)},construct:function ct(be){return"true"===be||"True"===be||"TRUE"===be},predicate:function ze(be){return"[object Boolean]"===Object.prototype.toString.call(be)},represent:{lowercase:function(be){return be?"true":"false"},uppercase:function(be){return be?"TRUE":"FALSE"},camelcase:function(be){return be?"True":"False"}},defaultStyle:"lowercase"})},615:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(647),ct=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ze=/^[-+]?[0-9]+e/;Yt.exports=new Ie("tag:yaml.org,2002:float",{kind:"scalar",resolve:function ze(oe){return!(null===oe||!ct.test(oe)||"_"===oe[oe.length-1])},construct:function be(oe){var ce,se,T,A;return se="-"===(ce=oe.replace(/_/g,"").toLowerCase())[0]?-1:1,A=[],"+-".indexOf(ce[0])>=0&&(ce=ce.slice(1)),".inf"===ce?1===se?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===ce?NaN:ce.indexOf(":")>=0?(ce.split(":").forEach(function(F){A.unshift(parseFloat(F,10))}),ce=0,T=1,A.forEach(function(F){ce+=F*T,T*=60}),se*ce):se*parseFloat(ce,10)},predicate:function ge(oe){return"[object Number]"===Object.prototype.toString.call(oe)&&(oe%1!=0||nt.isNegativeZero(oe))},represent:function $e(oe,ce){var se;if(isNaN(oe))switch(ce){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===oe)switch(ce){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===oe)switch(ce){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(nt.isNegativeZero(oe))return"-0.0";return se=oe.toString(10),Ze.test(se)?se.replace("e",".e"):se},defaultStyle:"lowercase"})},877:(Yt,Dn,ke)=>{"use strict";var nt=ke(997),Ie=ke(647);function ct(oe){return 48<=oe&&oe<=57||65<=oe&&oe<=70||97<=oe&&oe<=102}function ze(oe){return 48<=oe&&oe<=55}function be(oe){return 48<=oe&&oe<=57}Yt.exports=new Ie("tag:yaml.org,2002:int",{kind:"scalar",resolve:function Ze(oe){if(null===oe)return!1;var A,ce=oe.length,se=0,T=!1;if(!ce)return!1;if(("-"===(A=oe[se])||"+"===A)&&(A=oe[++se]),"0"===A){if(se+1===ce)return!0;if("b"===(A=oe[++se])){for(se++;se=0?"0b"+oe.toString(2):"-0b"+oe.toString(2).slice(1)},octal:function(oe){return oe>=0?"0"+oe.toString(8):"-0"+oe.toString(8).slice(1)},decimal:function(oe){return oe.toString(10)},hexadecimal:function(oe){return oe>=0?"0x"+oe.toString(16).toUpperCase():"-0x"+oe.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},716:(Yt,Dn,ke)=>{"use strict";var nt;try{nt=ke(797)}catch{typeof window<"u"&&(nt=window.esprima)}var ct=ke(647);Yt.exports=new ct("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function ze(ge){if(null===ge)return!1;try{var ce=nt.parse("("+ge+")",{range:!0});return!("Program"!==ce.type||1!==ce.body.length||"ExpressionStatement"!==ce.body[0].type||"ArrowFunctionExpression"!==ce.body[0].expression.type&&"FunctionExpression"!==ce.body[0].expression.type)}catch{return!1}},construct:function be(ge){var T,oe="("+ge+")",ce=nt.parse(oe,{range:!0}),se=[];if("Program"!==ce.type||1!==ce.body.length||"ExpressionStatement"!==ce.body[0].type||"ArrowFunctionExpression"!==ce.body[0].expression.type&&"FunctionExpression"!==ce.body[0].expression.type)throw new Error("Failed to resolve function");return ce.body[0].expression.params.forEach(function(A){se.push(A.name)}),T=ce.body[0].expression.body.range,new Function(se,"BlockStatement"===ce.body[0].expression.body.type?oe.slice(T[0]+1,T[1]-1):"return "+oe.slice(T[0],T[1]))},predicate:function $e(ge){return"[object Function]"===Object.prototype.toString.call(ge)},represent:function Ze(ge){return ge.toString()}})},632:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function Ie(Ze){if(null===Ze||0===Ze.length)return!1;var $e=Ze,ge=/\/([gim]*)$/.exec(Ze),oe="";return!("/"===$e[0]&&(ge&&(oe=ge[1]),oe.length>3||"/"!==$e[$e.length-oe.length-1]))},construct:function ct(Ze){var $e=Ze,ge=/\/([gim]*)$/.exec(Ze),oe="";return"/"===$e[0]&&(ge&&(oe=ge[1]),$e=$e.slice(1,$e.length-oe.length-1)),new RegExp($e,oe)},predicate:function be(Ze){return"[object RegExp]"===Object.prototype.toString.call(Ze)},represent:function ze(Ze){var $e="/"+Ze.source+"/";return Ze.global&&($e+="g"),Ze.multiline&&($e+="m"),Ze.ignoreCase&&($e+="i"),$e}})},771:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function Ie(){return!0},construct:function ct(){},predicate:function be(Ze){return typeof Ze>"u"},represent:function ze(){return""}})},71:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Ie){return null!==Ie?Ie:{}}})},996:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Ie(ct){return"<<"===ct||null===ct}})},568:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:null",{kind:"scalar",resolve:function Ie(be){if(null===be)return!0;var Ze=be.length;return 1===Ze&&"~"===be||4===Ze&&("null"===be||"Null"===be||"NULL"===be)},construct:function ct(){return null},predicate:function ze(be){return null===be},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},166:(Yt,Dn,ke)=>{"use strict";var nt=ke(647),Ie=Object.prototype.hasOwnProperty,ct=Object.prototype.toString;Yt.exports=new nt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function ze(Ze){if(null===Ze)return!0;var ge,oe,ce,se,T,$e=[],A=Ze;for(ge=0,oe=A.length;ge{"use strict";var nt=ke(647),Ie=Object.prototype.toString;Yt.exports=new nt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function ct(be){if(null===be)return!0;var Ze,$e,ge,oe,ce,se=be;for(ce=new Array(se.length),Ze=0,$e=se.length;Ze<$e;Ze+=1){if("[object Object]"!==Ie.call(ge=se[Ze])||1!==(oe=Object.keys(ge)).length)return!1;ce[Ze]=[oe[0],ge[oe[0]]]}return!0},construct:function ze(be){if(null===be)return[];var Ze,$e,ge,oe,ce,se=be;for(ce=new Array(se.length),Ze=0,$e=se.length;Ze<$e;Ze+=1)ge=se[Ze],oe=Object.keys(ge),ce[Ze]=[oe[0],ge[oe[0]]];return ce}})},322:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Ie){return null!==Ie?Ie:[]}})},738:(Yt,Dn,ke)=>{"use strict";var nt=ke(647),Ie=Object.prototype.hasOwnProperty;Yt.exports=new nt("tag:yaml.org,2002:set",{kind:"mapping",resolve:function ct(be){if(null===be)return!0;var Ze,$e=be;for(Ze in $e)if(Ie.call($e,Ze)&&null!==$e[Ze])return!1;return!0},construct:function ze(be){return null!==be?be:{}}})},464:(Yt,Dn,ke)=>{"use strict";var nt=ke(647);Yt.exports=new nt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Ie){return null!==Ie?Ie:""}})},934:(Yt,Dn,ke)=>{"use strict";var nt=ke(647),Ie=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ct=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Yt.exports=new nt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function ze($e){return null!==$e&&(null!==Ie.exec($e)||null!==ct.exec($e))},construct:function be($e){var ge,oe,ce,se,T,A,F,Ft,ee=0,Ae=null;if(null===(ge=Ie.exec($e))&&(ge=ct.exec($e)),null===ge)throw new Error("Date resolve error");if(oe=+ge[1],ce=+ge[2]-1,se=+ge[3],!ge[4])return new Date(Date.UTC(oe,ce,se));if(T=+ge[4],A=+ge[5],F=+ge[6],ge[7]){for(ee=ge[7].slice(0,3);ee.length<3;)ee+="0";ee=+ee}return ge[9]&&(Ae=6e4*(60*+ge[10]+ +(ge[11]||0)),"-"===ge[9]&&(Ae=-Ae)),Ft=new Date(Date.UTC(oe,ce,se,T,A,F,ee)),Ae&&Ft.setTime(Ft.getTime()-Ae),Ft},instanceOf:Date,represent:function Ze($e){return $e.toISOString()}})}},Yt=>{Yt(Yt.s=378)}]); \ No newline at end of file diff --git a/console/ui/dist/prod/static/svg/chat.svg b/console/ui/dist/prod/static/svg/chat.svg index 5c16182bfe..49c69d37bf 100644 --- a/console/ui/dist/prod/static/svg/chat.svg +++ b/console/ui/dist/prod/static/svg/chat.svg @@ -1,10 +1 @@ - - - - - - + \ No newline at end of file diff --git a/console/ui/dist/prod/static/svg/purchases.svg b/console/ui/dist/prod/static/svg/purchases.svg new file mode 100644 index 0000000000..7d8a95da12 --- /dev/null +++ b/console/ui/dist/prod/static/svg/purchases.svg @@ -0,0 +1 @@ + diff --git a/console/ui/dist/prod/static/svg/subscriptions.svg b/console/ui/dist/prod/static/svg/subscriptions.svg new file mode 100644 index 0000000000..7e9700c342 --- /dev/null +++ b/console/ui/dist/prod/static/svg/subscriptions.svg @@ -0,0 +1 @@ + diff --git a/console/ui/src/app/base/base.component.ts b/console/ui/src/app/base/base.component.ts index ae967accf0..f91bb297d0 100644 --- a/console/ui/src/app/base/base.component.ts +++ b/console/ui/src/app/base/base.component.ts @@ -53,8 +53,8 @@ export class BaseComponent implements OnInit, OnDestroy { {navItem: 'storage', routerLink: ['/storage'], label: 'Storage', minRole: UserRole.USER_ROLE_READONLY, icon: 'storage'}, {navItem: 'leaderboards', routerLink: ['/leaderboards'], label: 'Leaderboards', minRole: UserRole.USER_ROLE_READONLY, icon: 'leaderboard'}, {navItem: 'chat', routerLink: ['/chat'], label: 'Chat Messages', minRole: UserRole.USER_ROLE_READONLY, icon: 'chat'}, - {navItem: 'purchases', routerLink: ['/purchases'], label: 'Purchases', minRole: UserRole.USER_ROLE_READONLY, icon: ''}, - {navItem: 'subscriptions', routerLink: ['/subscriptions'], label: 'Subscriptions', minRole: UserRole.USER_ROLE_READONLY, icon: ''}, + {navItem: 'purchases', routerLink: ['/purchases'], label: 'Purchases', minRole: UserRole.USER_ROLE_READONLY, icon: 'purchases'}, + {navItem: 'subscriptions', routerLink: ['/subscriptions'], label: 'Subscriptions', minRole: UserRole.USER_ROLE_READONLY, icon: 'subscriptions'}, {navItem: 'matches', routerLink: ['/matches'], label: 'Matches', minRole: UserRole.USER_ROLE_READONLY, icon: 'running-matches'}, {navItem: 'apiexplorer', routerLink: ['/apiexplorer'], label: 'API Explorer', minRole: UserRole.USER_ROLE_DEVELOPER, icon: 'api-explorer'}, ]; diff --git a/console/ui/src/static/svg/chat.svg b/console/ui/src/static/svg/chat.svg index 5c16182bfe..49c69d37bf 100644 --- a/console/ui/src/static/svg/chat.svg +++ b/console/ui/src/static/svg/chat.svg @@ -1,10 +1 @@ - - - - - - + \ No newline at end of file diff --git a/console/ui/src/static/svg/purchases.svg b/console/ui/src/static/svg/purchases.svg new file mode 100644 index 0000000000..7d8a95da12 --- /dev/null +++ b/console/ui/src/static/svg/purchases.svg @@ -0,0 +1 @@ + diff --git a/console/ui/src/static/svg/subscriptions.svg b/console/ui/src/static/svg/subscriptions.svg new file mode 100644 index 0000000000..7e9700c342 --- /dev/null +++ b/console/ui/src/static/svg/subscriptions.svg @@ -0,0 +1 @@ + diff --git a/server/console.go b/server/console.go index a03e728fb5..7a39b863fa 100644 --- a/server/console.go +++ b/server/console.go @@ -98,6 +98,9 @@ var restrictedMethods = map[string]console.UserRole{ // Purchase "/nakama.console.Console/ListPurchases": console.UserRole_USER_ROLE_READONLY, + // Subscription + "/nakama.console.Console/ListSubscriptions": console.UserRole_USER_ROLE_READONLY, + // Runtime "/nakama.console.Console/GetRuntime": console.UserRole_USER_ROLE_DEVELOPER,