@genesislcap/foundation-rapid-cdn 15.110.3 → 15.110.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -223,7 +223,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
223
223
  `:`,`;var o=JSON.stringify(n);u+=i?s+o+`: `:o+`:`,u+=a(r,s)}}),u+=i?`
224
224
  `+r+`}`:`}`,u}function c(e,t){return t!==void 0&&typeof t!=`function`&&Yp(t)!==`symbol`}}function Dre(e){if(typeof e==`number`)return` `.repeat(e);if(typeof e==`string`&&e!==``)return e}let Ore=N.createInterface();function kre(e){return Number.isSafeInteger(+e)?Number(e):Hf(e)?BigInt.asIntN(64,e):parseFloat(e)}let Are={parse:e=>Sp(e,null,kre),stringify:e=>Xp(e)},Zp=class{constructor(e=Are){this.config=e,this.serialize=e=>this.config.stringify(e)}deserialize(e){return e?typeof e==`string`?this.config.parse(e):e&&e.ok?e.text().then(e=>this.config.parse(e)):(e&&e.data&&(e=e.data),this.config.parse(e)):Promise.resolve({})}};Zp=q([id(0,Lt(Ore))],Zp);let Qp=N.createInterface(e=>e.singleton(Zp));function $p(e){return typeof e==`function`}function em(e){var t=e(function(e){Error.call(e),e.stack=(/* @__PURE__ */ Error()).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var tm=em(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
225
225
  `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
226
- `):``,this.name=`UnsubscriptionError`,this.errors=t}});function nm(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var rm=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=od(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if($p(c))try{c()}catch(e){i=e instanceof tm?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=od(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{om(f)}catch(e){i=i??[],e instanceof tm?i=cd(cd([],sd(i)),sd(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new tm(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)om(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&nm(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&nm(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),im=rm.EMPTY;function am(e){return e instanceof rm||e&&`closed`in e&&$p(e.remove)&&$p(e.add)&&$p(e.unsubscribe)}function om(e){$p(e)?e():e.unsubscribe()}var sm={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},cm={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=cm.delegate;return i?.setTimeout?i.setTimeout.apply(i,cd([e,t],sd(n))):setTimeout.apply(void 0,cd([e,t],sd(n)))},clearTimeout:function(e){return(cm.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function lm(e){cm.setTimeout(function(){var t=sm.onUnhandledError;if(t)t(e);else throw e})}function um(){}var jre=(function(){return dm(`C`,void 0,void 0)})();function Mre(e){return dm(`E`,void 0,e)}function Nre(e){return dm(`N`,e,void 0)}function dm(e,t,n){return{kind:e,value:t,error:n}}var fm=null;function pm(e){if(sm.useDeprecatedSynchronousErrorHandling){var t=!fm;if(t&&(fm={errorThrown:!1,error:null}),e(),t){var n=fm,r=n.errorThrown,i=n.error;if(fm=null,r)throw i}}else e()}function Pre(e){sm.useDeprecatedSynchronousErrorHandling&&fm&&(fm.errorThrown=!0,fm.error=e)}var mm=function(e){td(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,am(t)&&t.add(n)):n.destination=Rre,n}return t.create=function(e,t,n){return new gm(e,t,n)},t.prototype.next=function(e){this.isStopped?vm(Nre(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?vm(Mre(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?vm(jre,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(rm),Fre=Function.prototype.bind;function hm(e,t){return Fre.call(e,t)}var Ire=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){_m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){_m(e)}else _m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){_m(e)}},e}(),gm=function(e){td(t,e);function t(t,n,r){var i=e.call(this)||this,a;if($p(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&sm.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&hm(t.next,o),error:t.error&&hm(t.error,o),complete:t.complete&&hm(t.complete,o)}):a=t}return i.destination=new Ire(a),i}return t}(mm);function _m(e){sm.useDeprecatedSynchronousErrorHandling?Pre(e):lm(e)}function Lre(e){throw e}function vm(e,t){var n=sm.onStoppedNotification;n&&cm.setTimeout(function(){return n(e,t)})}var Rre={closed:!0,next:um,error:Lre,complete:um},ym=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function bm(e){return e}function zre(e){return e.length===0?bm:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var xm=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Vre(e)?e:new gm(e,t,n);return pm(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Sm(t),new t(function(t,r){var i=new gm({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[ym]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return zre(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=Sm(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Sm(e){return e??sm.Promise??Promise}function Bre(e){return e&&$p(e.next)&&$p(e.error)&&$p(e.complete)}function Vre(e){return e&&e instanceof mm||Bre(e)&&am(e)}function Cm(e){return $p(e?.lift)}function wm(e){return function(t){if(Cm(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Tm(e,t,n,r,i){return new Hre(e,t,n,r,i)}var Hre=function(e){td(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(mm);function Ure(){return wm(function(e,t){var n=null;e._refCount++;var r=Tm(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){n=null;return}var r=e._connection,i=n;n=null,r&&(!i||r===i)&&r.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}(function(e){td(t,e);function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Cm(t)&&(r.lift=t.lift),r}return t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,e?.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new rm;var n=this.getSubject();t.add(this.source.subscribe(Tm(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=rm.EMPTY)}return t},t.prototype.refCount=function(){return Ure()(this)},t})(xm);var Em={now:function(){return(Em.delegate||performance).now()},delegate:void 0},Dm={schedule:function(e){var t=requestAnimationFrame,n=cancelAnimationFrame,r=Dm.delegate;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);var i=t(function(t){n=void 0,e(t)});return new rm(function(){return n?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Dm.delegate?.requestAnimationFrame||requestAnimationFrame).apply(void 0,cd([],sd(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Dm.delegate?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,cd([],sd(e)))},delegate:void 0};function Wre(e){return new xm(function(t){var n=e||Em,r=n.now(),i=0,a=function(){t.closed||(i=Dm.requestAnimationFrame(function(o){i=0;var s=n.now();t.next({timestamp:e?s:o,elapsed:s-r}),a()}))};return a(),function(){i&&Dm.cancelAnimationFrame(i)}})}Wre();var Gre=em(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Om=function(e){td(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new km(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Gre},t.prototype.next=function(e){var t=this;pm(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=od(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;pm(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;pm(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?im:(this.currentObservers=null,a.push(e),new rm(function(){t.currentObservers=null,nm(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new xm;return e.source=this,e},t.create=function(e,t){return new km(e,t)},t}(xm),km=function(e){td(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??im},t}(Om),Am=function(e){td(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Om),jm={now:function(){return(jm.delegate||Date).now()},delegate:void 0},Mm=function(e){td(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=jm);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(Om);(function(e){td(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,i=t._value,a=t.thrownError,o=t.isStopped,s=t._isComplete;n?e.error(a):(o||s)&&(r&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t})(Om);var Kre=function(e){td(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(rm),Nm={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Nm.delegate;return i?.setInterval?i.setInterval.apply(i,cd([e,t],sd(n))):setInterval.apply(void 0,cd([e,t],sd(n)))},clearInterval:function(e){return(Nm.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},Pm=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),Nm.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Nm.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return/* @__PURE__ */ Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||/* @__PURE__ */ Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,nm(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Kre),qre=1,Fm,Im={};function Lm(e){return e in Im&&(delete Im[e],!0)}var Rm={setImmediate:function(e){var t=qre++;return Im[t]=!0,Fm||(Fm=Promise.resolve()),Fm.then(function(){return Lm(t)&&e()}),t},clearImmediate:function(e){Lm(e)}},Jre=Rm.setImmediate,Yre=Rm.clearImmediate,zm={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(zm.delegate?.setImmediate||Jre).apply(void 0,cd([],sd(e)))},clearImmediate:function(e){return(zm.delegate?.clearImmediate||Yre)(e)},delegate:void 0},Xre=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=zm.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&i[i.length-1]?.id!==n&&(zm.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(Pm),Bm=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=jm.now,e}(),Vm=function(e){td(t,e);function t(t,n){n===void 0&&(n=Bm.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(Bm);new(function(e){td(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Vm))(Xre);var Hm=new Vm(Pm),Zre=Hm,Qre=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!=null&&r>0||r==null&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Pm);new(function(e){td(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Vm))(Qre);var $re=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Dm.requestAnimationFrame(function(){return t.flush(void 0)})))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&n===t._scheduled&&i[i.length-1]?.id!==n&&(Dm.cancelAnimationFrame(n),t._scheduled=void 0)},t}(Pm);new(function(e){td(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t;e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Vm))($re),function(e){td(t,e);function t(t,n){t===void 0&&(t=eie),n===void 0&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return t.prototype.flush=function(){for(var e=this,t=e.actions,n=e.maxFrames,r,i;(i=t[0])&&i.delay<=n&&(t.shift(),this.frame=i.delay,!(r=i.execute(i.state,i.delay))););if(r){for(;i=t.shift();)i.unsubscribe();throw r}},t.frameTimeFactor=10,t}(Vm);var eie=function(e){td(t,e);function t(t,n,r){r===void 0&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return t.prototype.schedule=function(n,r){if(r===void 0&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return rm.EMPTY},t.prototype.requestAsyncId=function(e,n,r){r===void 0&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){n===void 0&&(n=0)},t.prototype._execute=function(t,n){if(this.active===!0)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(Pm),Um=new xm(function(e){return e.complete()});function Wm(e){return e&&$p(e.schedule)}function Gm(e){return e[e.length-1]}function tie(e){return $p(Gm(e))?e.pop():void 0}function Km(e){return Wm(Gm(e))?e.pop():void 0}var qm=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Jm(e){return $p(e?.then)}function Ym(e){return $p(e[ym])}function Xm(e){return Symbol.asyncIterator&&$p(e?.[Symbol.asyncIterator])}function Zm(e){return/* @__PURE__ */ TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function nie(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var Qm=nie();function $m(e){return $p(e?.[Qm])}function eh(e){return Jne(this,arguments,function(){var t,n,r,i;return ad(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ld(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,ld(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ld(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function th(e){return $p(e?.getReader)}function nh(e){if(e instanceof xm)return e;if(e!=null){if(Ym(e))return rie(e);if(qm(e))return iie(e);if(Jm(e))return aie(e);if(Xm(e))return rh(e);if($m(e))return oie(e);if(th(e))return sie(e)}throw Zm(e)}function rie(e){return new xm(function(t){var n=e[ym]();if($p(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function iie(e){return new xm(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function aie(e){return new xm(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,lm)})}function oie(e){return new xm(function(t){var n,r;try{for(var i=od(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function rh(e){return new xm(function(t){cie(e,t).catch(function(e){return t.error(e)})})}function sie(e){return rh(eh(e))}function cie(e,t){var n,r,i,a;return J(this,void 0,void 0,function(){var o,s;return ad(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Yne(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function ih(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function ah(e,t){return t===void 0&&(t=0),wm(function(n,r){n.subscribe(Tm(r,function(n){return ih(r,e,function(){return r.next(n)},t)},function(){return ih(r,e,function(){return r.complete()},t)},function(n){return ih(r,e,function(){return r.error(n)},t)}))})}function oh(e,t){return t===void 0&&(t=0),wm(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function lie(e,t){return nh(e).pipe(oh(t),ah(t))}function uie(e,t){return nh(e).pipe(oh(t),ah(t))}function die(e,t){return new xm(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function fie(e,t){return new xm(function(n){var r;return ih(n,t,function(){r=e[Qm](),ih(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return $p(r?.return)&&r.return()}})}function sh(e,t){if(!e)throw Error(`Iterable cannot be null`);return new xm(function(n){ih(n,t,function(){var r=e[Symbol.asyncIterator]();ih(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function pie(e,t){return sh(eh(e),t)}function mie(e,t){if(e!=null){if(Ym(e))return lie(e,t);if(qm(e))return die(e,t);if(Jm(e))return uie(e,t);if(Xm(e))return sh(e,t);if($m(e))return fie(e,t);if(th(e))return pie(e,t)}throw Zm(e)}function ch(e,t){return t?mie(e,t):nh(e)}function lh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ch(e,Km(e))}function uh(e,t){var n=$p(e)?e:function(){return e},r=function(e){return e.error(n())};return new xm(t?function(e){return t.schedule(r,0,e)}:r)}var dh;(function(e){e.NEXT=`N`,e.ERROR=`E`,e.COMPLETE=`C`})(dh||(dh={})),function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e===`N`}return e.prototype.observe=function(e){return hie(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return i===`N`?e?.(a):i===`E`?t?.(o):n?.()},e.prototype.accept=function(e,t,n){return $p(e?.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,i=t===`N`?lh(n):t===`E`?uh(function(){return r}):t===`C`?Um:0;if(!i)throw TypeError(`Unexpected notification kind `+t);return i},e.createNext=function(t){return new e(`N`,t)},e.createError=function(t){return new e(`E`,void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e(`C`),e}();function hie(e,t){var n,r,i,a=e,o=a.kind,s=a.value,c=a.error;if(typeof o!=`string`)throw TypeError(`Invalid notification, missing "kind"`);o===`N`?(n=t.next)==null||n.call(t,s):o===`E`?(r=t.error)==null||r.call(t,c):(i=t.complete)==null||i.call(t)}var gie=em(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}});function _ie(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=new gm({next:function(e){r(e),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new gie)}});e.subscribe(a)})}em(function(e){return function(){e(this),this.name=`ArgumentOutOfRangeError`,this.message=`argument out of range`}}),em(function(e){return function(t){e(this),this.name=`NotFoundError`,this.message=t}}),em(function(e){return function(t){e(this),this.name=`SequenceError`,this.message=t}});function vie(e){return e instanceof Date&&!isNaN(e)}em(function(e){return function(t){t===void 0&&(t=null),e(this),this.message=`Timeout has occurred`,this.name=`TimeoutError`,this.info=t}});function fh(e,t){return wm(function(n,r){var i=0;n.subscribe(Tm(r,function(n){r.next(e.call(t,n,i++))}))})}var yie=Array.isArray;function bie(e,t){return yie(t)?e.apply(void 0,cd([],sd(t))):e(t)}function xie(e){return fh(function(t){return bie(e,t)})}var Sie=Array.isArray,Cie=Object.getPrototypeOf,wie=Object.prototype,Tie=Object.keys;function Eie(e){if(e.length===1){var t=e[0];if(Sie(t))return{args:t,keys:null};if(Die(t)){var n=Tie(t);return{args:n.map(function(e){return t[e]}),keys:n}}}return{args:e,keys:null}}function Die(e){return e&&typeof e==`object`&&Cie(e)===wie}function Oie(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}function kie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Km(e),r=tie(e),i=Eie(e),a=i.args,o=i.keys;if(a.length===0)return ch([],n);var s=new xm(Aie(a,n,o?function(e){return Oie(o,e)}:bm));return r?s.pipe(xie(r)):s}function Aie(e,t,n){return n===void 0&&(n=bm),function(r){ph(t,function(){for(var i=e.length,a=Array(i),o=i,s=i,c=function(i){ph(t,function(){var c=ch(e[i],t),l=!1;c.subscribe(Tm(r,function(e){a[i]=e,l||(l=!0,s--),s||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},l=0;l<i;l++)c(l)},r)}}function ph(e,t,n){e?ih(n,e,t):t()}function jie(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){a&&t.next(e),l++;var s=!1;nh(n(e,u++)).subscribe(Tm(t,function(e){i?.(e),a?p(e):t.next(e)},function(){s=!0},void 0,function(){if(s)try{l--;for(var e=function(){var e=c.shift();o?ih(t,o,function(){return m(e)}):m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(Tm(t,p,function(){d=!0,f()})),function(){s?.()}}function mh(e,t,n){return n===void 0&&(n=1/0),$p(t)?mh(function(n,r){return fh(function(e,i){return t(n,e,r,i)})(nh(e(n,r)))},n):(typeof t==`number`&&(n=t),wm(function(t,r){return jie(t,r,e,n)}))}function Mie(e){return e===void 0&&(e=1/0),mh(bm,e)}function Nie(){return Mie(1)}function hh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nie()(ch(e,Km(e)))}function gh(e,t,n){e===void 0&&(e=0),n===void 0&&(n=Zre);var r=-1;return t!=null&&(Wm(t)?n=t:r=t),new xm(function(t){var i=vie(e)?+e-n.now():e;i<0&&(i=0);var a=0;return n.schedule(function(){t.closed||(t.next(a++),0<=r?this.schedule(void 0,r):t.complete())},i)})}function Pie(e,t){return e===void 0&&(e=0),t===void 0&&(t=Hm),e<0&&(e=0),gh(e,e,t)}new xm(um),Array.isArray;function _h(e,t){return wm(function(n,r){var i=0;n.subscribe(Tm(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function Fie(e,t,n,r,i){return function(a,o){var s=n,c=t,l=0;a.subscribe(Tm(o,function(t){var n=l++;c=s?e(c,t,n):(s=!0,t),r&&o.next(c)},i&&(function(){s&&o.next(c),o.complete()})))}}function vh(e,t){return t?function(n){return n.pipe(vh(function(n,r){return nh(e(n,r)).pipe(fh(function(e,i){return t(n,e,r,i)}))}))}:wm(function(t,n){var r=0,i=null,a=!1;t.subscribe(Tm(n,function(t){i||(i=Tm(n,void 0,function(){i=null,a&&n.complete()}),nh(e(t,r++)).subscribe(i))},function(){a=!0,!i&&n.complete()}))})}function yh(e){return wm(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}function Iie(e){e===void 0&&(e=1/0);var t=e&&typeof e==`object`?e:{count:e},n=t.count,r=n===void 0?1/0:n,i=t.delay,a=t.resetOnSuccess,o=a!==void 0&&a;return r<=0?bm:wm(function(e,t){var n=0,a,s=function(){var c=!1;a=e.subscribe(Tm(t,function(e){o&&(n=0),t.next(e)},void 0,function(e){if(n++<r){var o=function(){a?(a.unsubscribe(),a=null,s()):c=!0};if(i!=null){var l=typeof i==`number`?gh(i):nh(i(e,n)),u=Tm(t,function(){u.unsubscribe(),o()},function(){t.complete()});l.subscribe(u)}else o()}else t.error(e)})),c&&(a.unsubscribe(),a=null,s())};s()})}function bh(e,t){return wm(Fie(e,t,arguments.length>=2,!0))}function xh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Km(e);return wm(function(t,r){(n?hh(e,t,n):hh(e,t)).subscribe(r)})}function Sh(e,t){return wm(function(n,r){var i=null,a=0,o=!1,s=function(){return o&&!i&&r.complete()};n.subscribe(Tm(r,function(n){i?.unsubscribe();var o=0,c=a++;nh(e(n,c)).subscribe(i=Tm(r,function(e){return r.next(t?t(n,e,c,o++):e)},function(){i=null,s()}))},function(){o=!0,s()}))})}function Ch(e,t){return t===void 0&&(t=!1),wm(function(n,r){var i=0;n.subscribe(Tm(r,function(n){var a=e(n,i++);(a||t)&&r.next(n),!a&&r.complete()}))})}var Lie=class{static get isMacOS(){return navigator.platform.toLowerCase().includes(`mac`)||navigator.userAgent.toLowerCase().includes(`mac os`)}static get isWindows(){return navigator.platform.toLowerCase().includes(`win`)||navigator.userAgent.toLowerCase().includes(`windows`)}static get isLinux(){return navigator.platform.toLowerCase().includes(`linux`)||navigator.userAgent.toLowerCase().includes(`linux`)}static getModifierSymbols(){return this.isMacOS?{ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`}:{ctrl:`Ctrl`,alt:`Alt`,shift:`Shift`,meta:`Win`}}static formatKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.getModifierSymbols(),o=[];t&&o.push(a.ctrl),n&&o.push(a.alt),r&&o.push(a.shift),i&&o.push(a.meta);let s=this.isMacOS?``:`+`,c=this.isMacOS?e.toUpperCase():e;return o.length>0?`${o.join(s)}${s}${c}`:c}};let wh=`foundation-shortcut-blocked`,Th=`Shortcut blocked`,Eh=`This shortcut is currently unavailable in this context.`;function Dh(e,t){let n=Object.assign(Object.assign({},e),{blockedMessage:e.blockedMessage??{title:Th,text:Eh}});t&&typeof t.dispatchEvent==`function`?t.dispatchEvent(new CustomEvent(wh,{bubbles:!0,composed:!0,detail:n})):typeof document<`u`&&document.dispatchEvent(new CustomEvent(wh,{bubbles:!0,composed:!0,detail:n}))}let Oh={designSystems:[`rapid`],customEditableSelectors:[]},kh={defaultMessage:{title:Th,text:Eh},inputMessage:{title:Th,text:`This shortcut is unavailable while typing in an input field.`},pausedMessage:{title:Th,text:`Shortcuts are paused.`},elementFocusMessage:{title:Th,text:`This shortcut is unavailable in the current focus context.`},emitPausedBlockedEvent:!0};var Rie=class{constructor(){this.shortcuts=/* @__PURE__ */ new Map,this.shortcutLookup=/* @__PURE__ */ new Map,this.keyCombinationMap=/* @__PURE__ */ new Map,this._isPausedSubject=new Am(!1),this.executionGuards=/* @__PURE__ */ new Map,this.editableContextConfig=Object.assign({},Oh),this.editableSelector=Jd(Oh.designSystems,Oh.customEditableSelectors),this.blockedMessageConfig=Object.assign({},kh)}get isPaused(){return this._isPausedSubject.value}get isPaused$(){return this._isPausedSubject.asObservable()}get isPausedSubject(){return this._isPausedSubject}registerShortcuts(e){e.forEach(e=>{this.registerShortcut(e)})}registerShortcut(e){let t=`${e.context}:${e.id}`,n=this.normalizeShortcutDefinition(e),r=this.createKeyCombinationKey(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),i=Lie.formatKeyCombination(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),a=this.keyCombinationMap.get(r);if(a){let e=[];for(let t of a){let i=this.shortcutLookup.get(t);i&&i.context===n.context&&(Id.warn(`Shortcut with key combination '${r}' already exists in context '${n.context}' (id: '${i.id}'). It will be replaced by new shortcut '${n.id}'.`),e.push(t))}e.forEach(e=>{let t=this.shortcutLookup.get(e);if(t){let n=this.shortcuts.get(t.context);n&&(n.delete(t.id),n.size===0&&this.shortcuts.delete(t.context)),this.shortcutLookup.delete(e)}a.delete(e)}),a.size===0&&this.keyCombinationMap.delete(r)}return this.shortcuts.has(n.context)||this.shortcuts.set(n.context,/* @__PURE__ */ new Map),this.shortcuts.get(n.context).set(n.id,n),this.shortcutLookup.set(t,n),this.keyCombinationMap.has(r)||this.keyCombinationMap.set(r,/* @__PURE__ */ new Set),this.keyCombinationMap.get(r).add(t),{shortcut:n,id:n.id,keyCombination:r,keyCombinationDisplay:i,disabled:()=>this.getExecutionStatus(n).disabled||!1,tooltip:()=>this.getExecutionStatus(n).tooltip}}unregisterShortcut(e,t){let n=`${e}:${t}`,r=this.shortcuts.get(e);if(r){let i=r.get(t);if(i){let a=this.normalizeShortcutDefinition(i),o=this.createKeyCombinationKey(a.key,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey);r.delete(t),r.size===0&&this.shortcuts.delete(e),this.shortcutLookup.delete(n);let s=this.keyCombinationMap.get(o);s&&(s.delete(n),s.size===0&&this.keyCombinationMap.delete(o))}}}unregisterShortcutsByContext(e){let t=this.shortcuts.get(e);t&&Array.from(t.keys()).forEach(t=>this.unregisterShortcut(e,t))}executeShortcut(e,t){this.executeShortcutByContext(this.getActiveContext(),e,t)}shouldEmitBlockedEvent(e){return e?.emitBlockedEvent!==!1}resolveBlockedMessage(e,t){return e?.blockedMessage??t}executeShortcutByContext(e,t,n){let r=this.shortcuts.get(e)?.get(t);if(this.isPaused){this.blockedMessageConfig.emitPausedBlockedEvent&&this.shouldEmitBlockedEvent(r)&&Dh({shortcutId:t,context:e,reason:`paused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.pausedMessage)},n);return}if(r){if(r.elementRef&&!this.isElementFocused(r.elementRef)){this.shouldEmitBlockedEvent(r)&&Dh({shortcutId:t,context:e,reason:`element-not-focused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.elementFocusMessage)},n);return}let i=this.getExecutionStatus(r);if(i.disabled){this.shouldEmitBlockedEvent(r)&&Dh({shortcutId:t,context:e,reason:`disabled`,blockedMessage:this.resolveBlockedMessage(r,i.tooltip===void 0?this.blockedMessageConfig.defaultMessage:{title:this.blockedMessageConfig.defaultMessage.title,text:i.tooltip})},n);return}try{r.action()}catch(n){Id.error(`Error executing shortcut ${e}:${t}:`,n)}}}getShortcuts(){let e=[];for(let t of this.shortcuts.values())e.push(...t.values());return e}getShortcutsByContext(e){let t=this.shortcuts.get(e);return t?Array.from(t.values()):[]}findShortcutByKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.createKeyCombinationKey(e,t,n,r,i),o=this.keyCombinationMap.get(a);if(o){if(this._activeContext){let e=this.shortcuts.get(this._activeContext);if(e)for(let t of o){let[n,r]=t.split(`:`);if(n!==this._activeContext)continue;let i=e.get(r);if(i)return i}}for(let e of o){let t=this.shortcutLookup.get(e);if(t)return t}}}getContexts(){return Array.from(this.shortcuts.keys())}getShortcutsByContextMap(){return new Map(this.shortcuts)}registerContext(e){this.shortcuts.has(e)||this.shortcuts.set(e,/* @__PURE__ */ new Map)}setActiveContext(e){this.registerContext(e),this._activeContext=e}getActiveContext(){return this._activeContext}clearActiveContext(){this._activeContext=void 0}registerExecutionGuard(e,t){this.executionGuards.set(e,t)}unregisterExecutionGuard(e){this.executionGuards.delete(e)}clearExecutionGuards(){this.executionGuards.clear()}configureEditableContext(e={}){let t=(e.designSystems??Oh.designSystems).filter(e=>e===`rapid`),n=(e.customEditableSelectors??Oh.customEditableSelectors).map(e=>e?.trim()).filter(e=>!!e);this.editableContextConfig={designSystems:Array.from(new Set(e.designSystems===void 0?Oh.designSystems:t)),customEditableSelectors:Array.from(new Set(n))},this.refreshEditableSelector()}getEditableContextConfig(){return{designSystems:[...this.editableContextConfig.designSystems],customEditableSelectors:[...this.editableContextConfig.customEditableSelectors]}}getEditableSelector(){return this.editableSelector}configureBlockedMessages(e={}){let t=(e,t)=>({title:(e?.title)?.trim()??t.title,text:(e?.text)?.trim()??t.text});this.blockedMessageConfig={defaultMessage:t(e.defaultMessage,kh.defaultMessage),inputMessage:t(e.inputMessage,kh.inputMessage),pausedMessage:t(e.pausedMessage,kh.pausedMessage),elementFocusMessage:t(e.elementFocusMessage,kh.elementFocusMessage),emitPausedBlockedEvent:e.emitPausedBlockedEvent??kh.emitPausedBlockedEvent}}getBlockedMessages(){return Object.assign({},this.blockedMessageConfig)}pause(){this._isPausedSubject.next(!0)}resume(){this._isPausedSubject.next(!1)}normalizeShortcutDefinition(e){let t=Object.assign({},e);return(t.optionKey||t.altKey)&&(t.altKey=!0,t.optionKey=!0),t}createKeyCombinationKey(e,t=!1,n=!1,r=!1,i=!1){let a=[];return t&&a.push(`ctrl`),n&&a.push(`alt`),r&&a.push(`shift`),i&&a.push(`meta`),(a.length>0?`${a.join(`+`)}+${e}`:e).toLowerCase()}isElementFocused(e){return e instanceof HTMLElement&&document.activeElement===e}getExecutionStatus(e){if(this.isPaused)return{disabled:!0,tooltip:this.blockedMessageConfig.pausedMessage.text};let t=this.getExecutionGuardStatus();return t.disabled?t:e.canExecute?e.canExecute():{disabled:!1,tooltip:void 0}}getExecutionGuardStatus(){for(let e of this.executionGuards.values()){let t=e(),n=typeof t==`boolean`?{disabled:t}:t;if(n?.disabled)return{disabled:!0,tooltip:n.tooltip}}return{disabled:!1,tooltip:void 0}}refreshEditableSelector(){this.editableSelector=Jd(this.editableContextConfig.designSystems,this.editableContextConfig.customEditableSelectors)}};let zie=N.createInterface(e=>e.singleton(Rie)),Bie={Space:`space`,Enter:`enter`,Escape:`escape`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,F1:`f1`,F2:`f2`,F3:`f3`,F4:`f4`,F5:`f5`,F6:`f6`,F7:`f7`,F8:`f8`,F9:`f9`,F10:`f10`,F11:`f11`,F12:`f12`};function Vie(e){return e?e.startsWith(`Key`)?e.replace(`Key`,``).toLowerCase():e.startsWith(`Digit`)?e.replace(`Digit`,``):Bie[e]||e.toLowerCase():``}let Ah=class extends Qe{constructor(){super(...arguments),this.keyListener=null,this.isListening=!1}connectedCallback(){super.connectedCallback(),this.addKeyListener()}disconnectedCallback(){super.disconnectedCallback(),this.removeKeyListener()}addKeyListener(){this.isListening||(this.keyListener=this.handleKeyDown.bind(this),document.addEventListener(`keydown`,this.keyListener),this.isListening=!0)}removeKeyListener(){this.isListening&&this.keyListener&&(document.removeEventListener(`keydown`,this.keyListener),this.keyListener=null,this.isListening=!1)}handleKeyDown(e){let t=this.shortcutManager,n=t.getBlockedMessages(),r=t.getEditableSelector(),i=this.getEventElement(e)??this,a=e.ctrlKey||e.altKey||e.shiftKey||e.metaKey,o=Vie(e.code),s=t.findShortcutByKeyCombination(o,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey);if(s){if(tf(e,r)){a&&s.emitBlockedEvent!==!1&&Dh({shortcutId:s.id,context:s.context,reason:`editable-context`,blockedMessage:s.blockedMessage??n.inputMessage},i);return}s&&(e.preventDefault(),e.stopPropagation(),t.executeShortcut(s.id,i))}}getEventElement(e){return(e.composedPath?.call(e)??[]).find(e=>e instanceof Element)??e.target??null}};q([Ft(zie)],Ah.prototype,`shortcutManager`,void 0),Ah=q([$e({name:`foundation-shortcut-listener`})],Ah);let{create:Hie}=ri,jh=Hie(`active-color-scheme`).withDefault(e=>fs.getValueFor(e)===cs.LightMode?`light`:`dark`),Mh=class extends Qe{stylesChanged(e,t){e&&this.parentElement.$fastController.removeStyles(e),this.parentElement.$fastController.addStyles(t)}};q([C],Mh.prototype,`styles`,void 0),Mh=q([$e({name:`slotted-styles`})],Mh);var Nh;(function(e){e.Italic=`italic`,e.Normal=`normal`})(Nh||(Nh={}));var Ph;(function(e){e[e.Thin=100]=`Thin`,e[e.Light=300]=`Light`,e[e.Regular=400]=`Regular`,e[e.Medium=500]=`Medium`,e[e.Bold=700]=`Bold`,e[e.Black=900]=`Black`})(Ph||(Ph={}));var Fh,Uie=/* @__PURE__ */ new Uint8Array(16);function Wie(){if(!Fh&&(Fh=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<`u`&&typeof msCrypto.getRandomValues==`function`&&msCrypto.getRandomValues.bind(msCrypto),!Fh))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return Fh(Uie)}var Gie=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ih(e){return typeof e==`string`&&Gie.test(e)}for(var Lh=[],Rh=0;Rh<256;++Rh)Lh.push((Rh+256).toString(16).substr(1));function zh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Lh[e[t+0]]+Lh[e[t+1]]+Lh[e[t+2]]+Lh[e[t+3]]+`-`+Lh[e[t+4]]+Lh[e[t+5]]+`-`+Lh[e[t+6]]+Lh[e[t+7]]+`-`+Lh[e[t+8]]+Lh[e[t+9]]+`-`+Lh[e[t+10]]+Lh[e[t+11]]+Lh[e[t+12]]+Lh[e[t+13]]+Lh[e[t+14]]+Lh[e[t+15]]).toLowerCase();if(!Ih(n))throw TypeError(`Stringified UUID is invalid`);return n}function Kie(e){if(!Ih(e))throw TypeError(`Invalid UUID`);var t,n=/* @__PURE__ */ new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}function qie(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var Jie=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,Yie=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function Bh(e,t,n){function r(e,r,i,a){if(typeof e==`string`&&(e=qie(e)),typeof r==`string`&&(r=Kie(r)),r.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),o=n(o),o[6]=o[6]&15|t,o[8]=o[8]&63|128,i){a=a||0;for(var s=0;s<16;++s)i[a+s]=o[s];return i}return zh(o)}try{r.name=e}catch{}return r.DNS=Jie,r.URL=Yie,r}function Xie(e){if(typeof e==`string`){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return Zie(Qie($ie(e),e.length*8))}function Zie(e){for(var t=[],n=e.length*32,r=`0123456789abcdef`,i=0;i<n;i+=8){var a=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(a>>>4&15)+r.charAt(a&15),16);t.push(o)}return t}function Vh(e){return(e+64>>>9<<4)+14+1}function Qie(e,t){e[t>>5]|=128<<t%32,e[Vh(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<e.length;o+=16){var s=n,c=r,l=i,u=a;n=Wh(n,r,i,a,e[o],7,-680876936),a=Wh(a,n,r,i,e[o+1],12,-389564586),i=Wh(i,a,n,r,e[o+2],17,606105819),r=Wh(r,i,a,n,e[o+3],22,-1044525330),n=Wh(n,r,i,a,e[o+4],7,-176418897),a=Wh(a,n,r,i,e[o+5],12,1200080426),i=Wh(i,a,n,r,e[o+6],17,-1473231341),r=Wh(r,i,a,n,e[o+7],22,-45705983),n=Wh(n,r,i,a,e[o+8],7,1770035416),a=Wh(a,n,r,i,e[o+9],12,-1958414417),i=Wh(i,a,n,r,e[o+10],17,-42063),r=Wh(r,i,a,n,e[o+11],22,-1990404162),n=Wh(n,r,i,a,e[o+12],7,1804603682),a=Wh(a,n,r,i,e[o+13],12,-40341101),i=Wh(i,a,n,r,e[o+14],17,-1502002290),r=Wh(r,i,a,n,e[o+15],22,1236535329),n=Gh(n,r,i,a,e[o+1],5,-165796510),a=Gh(a,n,r,i,e[o+6],9,-1069501632),i=Gh(i,a,n,r,e[o+11],14,643717713),r=Gh(r,i,a,n,e[o],20,-373897302),n=Gh(n,r,i,a,e[o+5],5,-701558691),a=Gh(a,n,r,i,e[o+10],9,38016083),i=Gh(i,a,n,r,e[o+15],14,-660478335),r=Gh(r,i,a,n,e[o+4],20,-405537848),n=Gh(n,r,i,a,e[o+9],5,568446438),a=Gh(a,n,r,i,e[o+14],9,-1019803690),i=Gh(i,a,n,r,e[o+3],14,-187363961),r=Gh(r,i,a,n,e[o+8],20,1163531501),n=Gh(n,r,i,a,e[o+13],5,-1444681467),a=Gh(a,n,r,i,e[o+2],9,-51403784),i=Gh(i,a,n,r,e[o+7],14,1735328473),r=Gh(r,i,a,n,e[o+12],20,-1926607734),n=Kh(n,r,i,a,e[o+5],4,-378558),a=Kh(a,n,r,i,e[o+8],11,-2022574463),i=Kh(i,a,n,r,e[o+11],16,1839030562),r=Kh(r,i,a,n,e[o+14],23,-35309556),n=Kh(n,r,i,a,e[o+1],4,-1530992060),a=Kh(a,n,r,i,e[o+4],11,1272893353),i=Kh(i,a,n,r,e[o+7],16,-155497632),r=Kh(r,i,a,n,e[o+10],23,-1094730640),n=Kh(n,r,i,a,e[o+13],4,681279174),a=Kh(a,n,r,i,e[o],11,-358537222),i=Kh(i,a,n,r,e[o+3],16,-722521979),r=Kh(r,i,a,n,e[o+6],23,76029189),n=Kh(n,r,i,a,e[o+9],4,-640364487),a=Kh(a,n,r,i,e[o+12],11,-421815835),i=Kh(i,a,n,r,e[o+15],16,530742520),r=Kh(r,i,a,n,e[o+2],23,-995338651),n=qh(n,r,i,a,e[o],6,-198630844),a=qh(a,n,r,i,e[o+7],10,1126891415),i=qh(i,a,n,r,e[o+14],15,-1416354905),r=qh(r,i,a,n,e[o+5],21,-57434055),n=qh(n,r,i,a,e[o+12],6,1700485571),a=qh(a,n,r,i,e[o+3],10,-1894986606),i=qh(i,a,n,r,e[o+10],15,-1051523),r=qh(r,i,a,n,e[o+1],21,-2054922799),n=qh(n,r,i,a,e[o+8],6,1873313359),a=qh(a,n,r,i,e[o+15],10,-30611744),i=qh(i,a,n,r,e[o+6],15,-1560198380),r=qh(r,i,a,n,e[o+13],21,1309151649),n=qh(n,r,i,a,e[o+4],6,-145523070),a=qh(a,n,r,i,e[o+11],10,-1120210379),i=qh(i,a,n,r,e[o+2],15,718787259),r=qh(r,i,a,n,e[o+9],21,-343485551),n=Hh(n,s),r=Hh(r,c),i=Hh(i,l),a=Hh(a,u)}return[n,r,i,a]}function $ie(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(Vh(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function Hh(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function eae(e,t){return e<<t|e>>>32-t}function Uh(e,t,n,r,i,a){return Hh(eae(Hh(Hh(t,e),Hh(r,a)),i),n)}function Wh(e,t,n,r,i,a,o){return Uh(t&n|~t&r,e,t,i,a,o)}function Gh(e,t,n,r,i,a,o){return Uh(t&r|n&~r,e,t,i,a,o)}function Kh(e,t,n,r,i,a,o){return Uh(t^n^r,e,t,i,a,o)}function qh(e,t,n,r,i,a,o){return Uh(n^(t|~r),e,t,i,a,o)}Bh(`v3`,48,Xie);function Jh(e,t,n){e=e||{};var r=e.random||(e.rng||Wie)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return zh(r)}function tae(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function Yh(e,t){return e<<t|e>>>32-t}function nae(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e==`string`){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,o=Math.ceil(a/16),s=Array(o),c=0;c<o;++c){for(var l=/* @__PURE__ */ new Uint32Array(16),u=0;u<16;++u)l[u]=e[c*64+u*4]<<24|e[c*64+u*4+1]<<16|e[c*64+u*4+2]<<8|e[c*64+u*4+3];s[c]=l}s[o-1][14]=(e.length-1)*8/2**32,s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var f=/* @__PURE__ */ new Uint32Array(80),p=0;p<16;++p)f[p]=s[d][p];for(var m=16;m<80;++m)f[m]=Yh(f[m-3]^f[m-8]^f[m-14]^f[m-16],1);for(var h=n[0],g=n[1],_=n[2],v=n[3],y=n[4],b=0;b<80;++b){var ee=Math.floor(b/20),x=Yh(h,5)+tae(ee,g,_,v)+y+t[ee]+f[b]>>>0;y=v,v=_,_=Yh(g,30)>>>0,g=h,h=x}n[0]=n[0]+h>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}Bh(`v5`,80,nae);var rae=class{constructor(){}createId(e=!1){let t=Jh();return e&&Id.debug(`UUID.createID ${t}`),t}createRemoteId(){return J(this,arguments,void 0,function*(e=!1){let t=Jh();return e&&Id.debug(`UUID.createRemoteID ${t}`),t})}};let Xh=N.createInterface(e=>e.singleton(rae)),Zh=1e3,iae=e=>T`<div class="inactivity-overlay" style="display:${e=>e.isVisible?`display`:`none`}"><${e}-card class="dialog-card"><div class="card-body"><div class="dialog-header"><${e}-icon name="warning" class="warning-icon"></${e}-icon><h2>Session Timeout Warning</h2></div><div class="dialog-content"><p>
226
+ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function nm(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var rm=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=od(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if($p(c))try{c()}catch(e){i=e instanceof tm?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=od(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{om(f)}catch(e){i=i??[],e instanceof tm?i=cd(cd([],sd(i)),sd(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new tm(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)om(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&nm(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&nm(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),im=rm.EMPTY;function am(e){return e instanceof rm||e&&`closed`in e&&$p(e.remove)&&$p(e.add)&&$p(e.unsubscribe)}function om(e){$p(e)?e():e.unsubscribe()}var sm={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},cm={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=cm.delegate;return i?.setTimeout?i.setTimeout.apply(i,cd([e,t],sd(n))):setTimeout.apply(void 0,cd([e,t],sd(n)))},clearTimeout:function(e){return(cm.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function lm(e){cm.setTimeout(function(){var t=sm.onUnhandledError;if(t)t(e);else throw e})}function um(){}var jre=(function(){return dm(`C`,void 0,void 0)})();function Mre(e){return dm(`E`,void 0,e)}function Nre(e){return dm(`N`,e,void 0)}function dm(e,t,n){return{kind:e,value:t,error:n}}var fm=null;function pm(e){if(sm.useDeprecatedSynchronousErrorHandling){var t=!fm;if(t&&(fm={errorThrown:!1,error:null}),e(),t){var n=fm,r=n.errorThrown,i=n.error;if(fm=null,r)throw i}}else e()}function Pre(e){sm.useDeprecatedSynchronousErrorHandling&&fm&&(fm.errorThrown=!0,fm.error=e)}var mm=function(e){td(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,am(t)&&t.add(n)):n.destination=Rre,n}return t.create=function(e,t,n){return new gm(e,t,n)},t.prototype.next=function(e){this.isStopped?vm(Nre(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?vm(Mre(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?vm(jre,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(rm),Fre=Function.prototype.bind;function hm(e,t){return Fre.call(e,t)}var Ire=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){_m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){_m(e)}else _m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){_m(e)}},e}(),gm=function(e){td(t,e);function t(t,n,r){var i=e.call(this)||this,a;if($p(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&sm.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&hm(t.next,o),error:t.error&&hm(t.error,o),complete:t.complete&&hm(t.complete,o)}):a=t}return i.destination=new Ire(a),i}return t}(mm);function _m(e){sm.useDeprecatedSynchronousErrorHandling?Pre(e):lm(e)}function Lre(e){throw e}function vm(e,t){var n=sm.onStoppedNotification;n&&cm.setTimeout(function(){return n(e,t)})}var Rre={closed:!0,next:um,error:Lre,complete:um},ym=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function bm(e){return e}function zre(e){return e.length===0?bm:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var xm=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Vre(e)?e:new gm(e,t,n);return pm(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Sm(t),new t(function(t,r){var i=new gm({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[ym]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return zre(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=Sm(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Sm(e){return e??sm.Promise??Promise}function Bre(e){return e&&$p(e.next)&&$p(e.error)&&$p(e.complete)}function Vre(e){return e&&e instanceof mm||Bre(e)&&am(e)}function Cm(e){return $p(e?.lift)}function wm(e){return function(t){if(Cm(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Tm(e,t,n,r,i){return new Hre(e,t,n,r,i)}var Hre=function(e){td(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(mm);function Ure(){return wm(function(e,t){var n=null;e._refCount++;var r=Tm(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){n=null;return}var r=e._connection,i=n;n=null,r&&(!i||r===i)&&r.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}(function(e){td(t,e);function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Cm(t)&&(r.lift=t.lift),r}return t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,e?.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new rm;var n=this.getSubject();t.add(this.source.subscribe(Tm(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=rm.EMPTY)}return t},t.prototype.refCount=function(){return Ure()(this)},t})(xm);var Em={now:function(){return(Em.delegate||performance).now()},delegate:void 0},Dm={schedule:function(e){var t=requestAnimationFrame,n=cancelAnimationFrame,r=Dm.delegate;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);var i=t(function(t){n=void 0,e(t)});return new rm(function(){return n?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Dm.delegate?.requestAnimationFrame||requestAnimationFrame).apply(void 0,cd([],sd(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Dm.delegate?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,cd([],sd(e)))},delegate:void 0};function Wre(e){return new xm(function(t){var n=e||Em,r=n.now(),i=0,a=function(){t.closed||(i=Dm.requestAnimationFrame(function(o){i=0;var s=n.now();t.next({timestamp:e?s:o,elapsed:s-r}),a()}))};return a(),function(){i&&Dm.cancelAnimationFrame(i)}})}Wre();var Gre=em(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Om=function(e){td(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new km(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Gre},t.prototype.next=function(e){var t=this;pm(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=od(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;pm(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;pm(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?im:(this.currentObservers=null,a.push(e),new rm(function(){t.currentObservers=null,nm(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new xm;return e.source=this,e},t.create=function(e,t){return new km(e,t)},t}(xm),km=function(e){td(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??im},t}(Om),Am=function(e){td(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Om),jm={now:function(){return(jm.delegate||Date).now()},delegate:void 0},Mm=function(e){td(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=jm);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(Om);(function(e){td(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,i=t._value,a=t.thrownError,o=t.isStopped,s=t._isComplete;n?e.error(a):(o||s)&&(r&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t})(Om);var Kre=function(e){td(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(rm),Nm={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Nm.delegate;return i?.setInterval?i.setInterval.apply(i,cd([e,t],sd(n))):setInterval.apply(void 0,cd([e,t],sd(n)))},clearInterval:function(e){return(Nm.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},Pm=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),Nm.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Nm.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return/* @__PURE__ */ Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||/* @__PURE__ */ Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,nm(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Kre),qre=1,Fm,Im={};function Lm(e){return e in Im&&(delete Im[e],!0)}var Rm={setImmediate:function(e){var t=qre++;return Im[t]=!0,Fm||(Fm=Promise.resolve()),Fm.then(function(){return Lm(t)&&e()}),t},clearImmediate:function(e){Lm(e)}},Jre=Rm.setImmediate,Yre=Rm.clearImmediate,zm={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(zm.delegate?.setImmediate||Jre).apply(void 0,cd([],sd(e)))},clearImmediate:function(e){return(zm.delegate?.clearImmediate||Yre)(e)},delegate:void 0},Xre=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=zm.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&i[i.length-1]?.id!==n&&(zm.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(Pm),Bm=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=jm.now,e}(),Vm=function(e){td(t,e);function t(t,n){n===void 0&&(n=Bm.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(Bm);new(function(e){td(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Vm))(Xre);var Hm=new Vm(Pm),Zre=Hm,Qre=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!=null&&r>0||r==null&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Pm);new(function(e){td(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Vm))(Qre);var $re=function(e){td(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Dm.requestAnimationFrame(function(){return t.flush(void 0)})))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&n===t._scheduled&&i[i.length-1]?.id!==n&&(Dm.cancelAnimationFrame(n),t._scheduled=void 0)},t}(Pm);new(function(e){td(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t;e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Vm))($re),function(e){td(t,e);function t(t,n){t===void 0&&(t=eie),n===void 0&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return t.prototype.flush=function(){for(var e=this,t=e.actions,n=e.maxFrames,r,i;(i=t[0])&&i.delay<=n&&(t.shift(),this.frame=i.delay,!(r=i.execute(i.state,i.delay))););if(r){for(;i=t.shift();)i.unsubscribe();throw r}},t.frameTimeFactor=10,t}(Vm);var eie=function(e){td(t,e);function t(t,n,r){r===void 0&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return t.prototype.schedule=function(n,r){if(r===void 0&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return rm.EMPTY},t.prototype.requestAsyncId=function(e,n,r){r===void 0&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){n===void 0&&(n=0)},t.prototype._execute=function(t,n){if(this.active===!0)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(Pm),Um=new xm(function(e){return e.complete()});function Wm(e){return e&&$p(e.schedule)}function Gm(e){return e[e.length-1]}function tie(e){return $p(Gm(e))?e.pop():void 0}function Km(e){return Wm(Gm(e))?e.pop():void 0}var qm=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function Jm(e){return $p(e?.then)}function Ym(e){return $p(e[ym])}function Xm(e){return Symbol.asyncIterator&&$p(e?.[Symbol.asyncIterator])}function Zm(e){return/* @__PURE__ */ TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function nie(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var Qm=nie();function $m(e){return $p(e?.[Qm])}function eh(e){return Jne(this,arguments,function(){var t,n,r,i;return ad(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ld(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,ld(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ld(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function th(e){return $p(e?.getReader)}function nh(e){if(e instanceof xm)return e;if(e!=null){if(Ym(e))return rie(e);if(qm(e))return iie(e);if(Jm(e))return aie(e);if(Xm(e))return rh(e);if($m(e))return oie(e);if(th(e))return sie(e)}throw Zm(e)}function rie(e){return new xm(function(t){var n=e[ym]();if($p(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function iie(e){return new xm(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function aie(e){return new xm(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,lm)})}function oie(e){return new xm(function(t){var n,r;try{for(var i=od(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function rh(e){return new xm(function(t){cie(e,t).catch(function(e){return t.error(e)})})}function sie(e){return rh(eh(e))}function cie(e,t){var n,r,i,a;return J(this,void 0,void 0,function(){var o,s;return ad(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Yne(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function ih(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function ah(e,t){return t===void 0&&(t=0),wm(function(n,r){n.subscribe(Tm(r,function(n){return ih(r,e,function(){return r.next(n)},t)},function(){return ih(r,e,function(){return r.complete()},t)},function(n){return ih(r,e,function(){return r.error(n)},t)}))})}function oh(e,t){return t===void 0&&(t=0),wm(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function lie(e,t){return nh(e).pipe(oh(t),ah(t))}function uie(e,t){return nh(e).pipe(oh(t),ah(t))}function die(e,t){return new xm(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function fie(e,t){return new xm(function(n){var r;return ih(n,t,function(){r=e[Qm](),ih(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return $p(r?.return)&&r.return()}})}function sh(e,t){if(!e)throw Error(`Iterable cannot be null`);return new xm(function(n){ih(n,t,function(){var r=e[Symbol.asyncIterator]();ih(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function pie(e,t){return sh(eh(e),t)}function mie(e,t){if(e!=null){if(Ym(e))return lie(e,t);if(qm(e))return die(e,t);if(Jm(e))return uie(e,t);if(Xm(e))return sh(e,t);if($m(e))return fie(e,t);if(th(e))return pie(e,t)}throw Zm(e)}function ch(e,t){return t?mie(e,t):nh(e)}function lh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ch(e,Km(e))}function uh(e,t){var n=$p(e)?e:function(){return e},r=function(e){return e.error(n())};return new xm(t?function(e){return t.schedule(r,0,e)}:r)}var dh;(function(e){e.NEXT=`N`,e.ERROR=`E`,e.COMPLETE=`C`})(dh||(dh={})),function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e===`N`}return e.prototype.observe=function(e){return hie(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return i===`N`?e?.(a):i===`E`?t?.(o):n?.()},e.prototype.accept=function(e,t,n){return $p(e?.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,i=t===`N`?lh(n):t===`E`?uh(function(){return r}):t===`C`?Um:0;if(!i)throw TypeError(`Unexpected notification kind `+t);return i},e.createNext=function(t){return new e(`N`,t)},e.createError=function(t){return new e(`E`,void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e(`C`),e}();function hie(e,t){var n,r,i,a=e,o=a.kind,s=a.value,c=a.error;if(typeof o!=`string`)throw TypeError(`Invalid notification, missing "kind"`);o===`N`?(n=t.next)==null||n.call(t,s):o===`E`?(r=t.error)==null||r.call(t,c):(i=t.complete)==null||i.call(t)}var gie=em(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}});function _ie(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=new gm({next:function(e){r(e),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new gie)}});e.subscribe(a)})}em(function(e){return function(){e(this),this.name=`ArgumentOutOfRangeError`,this.message=`argument out of range`}}),em(function(e){return function(t){e(this),this.name=`NotFoundError`,this.message=t}}),em(function(e){return function(t){e(this),this.name=`SequenceError`,this.message=t}});function vie(e){return e instanceof Date&&!isNaN(e)}em(function(e){return function(t){t===void 0&&(t=null),e(this),this.message=`Timeout has occurred`,this.name=`TimeoutError`,this.info=t}});function fh(e,t){return wm(function(n,r){var i=0;n.subscribe(Tm(r,function(n){r.next(e.call(t,n,i++))}))})}var yie=Array.isArray;function bie(e,t){return yie(t)?e.apply(void 0,cd([],sd(t))):e(t)}function xie(e){return fh(function(t){return bie(e,t)})}var Sie=Array.isArray,Cie=Object.getPrototypeOf,wie=Object.prototype,Tie=Object.keys;function Eie(e){if(e.length===1){var t=e[0];if(Sie(t))return{args:t,keys:null};if(Die(t)){var n=Tie(t);return{args:n.map(function(e){return t[e]}),keys:n}}}return{args:e,keys:null}}function Die(e){return e&&typeof e==`object`&&Cie(e)===wie}function Oie(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}function kie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Km(e),r=tie(e),i=Eie(e),a=i.args,o=i.keys;if(a.length===0)return ch([],n);var s=new xm(Aie(a,n,o?function(e){return Oie(o,e)}:bm));return r?s.pipe(xie(r)):s}function Aie(e,t,n){return n===void 0&&(n=bm),function(r){ph(t,function(){for(var i=e.length,a=Array(i),o=i,s=i,c=function(i){ph(t,function(){var c=ch(e[i],t),l=!1;c.subscribe(Tm(r,function(e){a[i]=e,l||(l=!0,s--),s||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},l=0;l<i;l++)c(l)},r)}}function ph(e,t,n){e?ih(n,e,t):t()}function jie(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){a&&t.next(e),l++;var s=!1;nh(n(e,u++)).subscribe(Tm(t,function(e){i?.(e),a?p(e):t.next(e)},function(){s=!0},void 0,function(){if(s)try{l--;for(var e=function(){var e=c.shift();o?ih(t,o,function(){return m(e)}):m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(Tm(t,p,function(){d=!0,f()})),function(){s?.()}}function mh(e,t,n){return n===void 0&&(n=1/0),$p(t)?mh(function(n,r){return fh(function(e,i){return t(n,e,r,i)})(nh(e(n,r)))},n):(typeof t==`number`&&(n=t),wm(function(t,r){return jie(t,r,e,n)}))}function Mie(e){return e===void 0&&(e=1/0),mh(bm,e)}function Nie(){return Mie(1)}function hh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Nie()(ch(e,Km(e)))}function gh(e,t,n){e===void 0&&(e=0),n===void 0&&(n=Zre);var r=-1;return t!=null&&(Wm(t)?n=t:r=t),new xm(function(t){var i=vie(e)?+e-n.now():e;i<0&&(i=0);var a=0;return n.schedule(function(){t.closed||(t.next(a++),0<=r?this.schedule(void 0,r):t.complete())},i)})}function Pie(e,t){return e===void 0&&(e=0),t===void 0&&(t=Hm),e<0&&(e=0),gh(e,e,t)}new xm(um),Array.isArray;function _h(e,t){return wm(function(n,r){var i=0;n.subscribe(Tm(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function Fie(e,t,n,r,i){return function(a,o){var s=n,c=t,l=0;a.subscribe(Tm(o,function(t){var n=l++;c=s?e(c,t,n):(s=!0,t),r&&o.next(c)},i&&(function(){s&&o.next(c),o.complete()})))}}function vh(e,t){return t?function(n){return n.pipe(vh(function(n,r){return nh(e(n,r)).pipe(fh(function(e,i){return t(n,e,r,i)}))}))}:wm(function(t,n){var r=0,i=null,a=!1;t.subscribe(Tm(n,function(t){i||(i=Tm(n,void 0,function(){i=null,a&&n.complete()}),nh(e(t,r++)).subscribe(i))},function(){a=!0,!i&&n.complete()}))})}function yh(e){return wm(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}function Iie(e){e===void 0&&(e=1/0);var t=e&&typeof e==`object`?e:{count:e},n=t.count,r=n===void 0?1/0:n,i=t.delay,a=t.resetOnSuccess,o=a!==void 0&&a;return r<=0?bm:wm(function(e,t){var n=0,a,s=function(){var c=!1;a=e.subscribe(Tm(t,function(e){o&&(n=0),t.next(e)},void 0,function(e){if(n++<r){var o=function(){a?(a.unsubscribe(),a=null,s()):c=!0};if(i!=null){var l=typeof i==`number`?gh(i):nh(i(e,n)),u=Tm(t,function(){u.unsubscribe(),o()},function(){t.complete()});l.subscribe(u)}else o()}else t.error(e)})),c&&(a.unsubscribe(),a=null,s())};s()})}function bh(e,t){return wm(Fie(e,t,arguments.length>=2,!0))}function xh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Km(e);return wm(function(t,r){(n?hh(e,t,n):hh(e,t)).subscribe(r)})}function Sh(e,t){return wm(function(n,r){var i=null,a=0,o=!1,s=function(){return o&&!i&&r.complete()};n.subscribe(Tm(r,function(n){i?.unsubscribe();var o=0,c=a++;nh(e(n,c)).subscribe(i=Tm(r,function(e){return r.next(t?t(n,e,c,o++):e)},function(){i=null,s()}))},function(){o=!0,s()}))})}function Ch(e,t){return t===void 0&&(t=!1),wm(function(n,r){var i=0;n.subscribe(Tm(r,function(n){var a=e(n,i++);(a||t)&&r.next(n),!a&&r.complete()}))})}var Lie=class{static get isMacOS(){return navigator.platform.toLowerCase().includes(`mac`)||navigator.userAgent.toLowerCase().includes(`mac os`)}static get isWindows(){return navigator.platform.toLowerCase().includes(`win`)||navigator.userAgent.toLowerCase().includes(`windows`)}static get isLinux(){return navigator.platform.toLowerCase().includes(`linux`)||navigator.userAgent.toLowerCase().includes(`linux`)}static getModifierSymbols(){return this.isMacOS?{ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`}:{ctrl:`Ctrl`,alt:`Alt`,shift:`Shift`,meta:`Win`}}static formatKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.getModifierSymbols(),o=[];t&&o.push(a.ctrl),n&&o.push(a.alt),r&&o.push(a.shift),i&&o.push(a.meta);let s=this.isMacOS?``:`+`,c=this.isMacOS?e.toUpperCase():e;return o.length>0?`${o.join(s)}${s}${c}`:c}};let wh=`foundation-shortcut-blocked`,Th=`Shortcut blocked`,Eh=`This shortcut is currently unavailable in this context.`;function Dh(e,t){let n=Object.assign(Object.assign({},e),{blockedMessage:e.blockedMessage??{title:Th,text:Eh}});t&&typeof t.dispatchEvent==`function`?t.dispatchEvent(new CustomEvent(wh,{bubbles:!0,composed:!0,detail:n})):typeof document<`u`&&document.dispatchEvent(new CustomEvent(wh,{bubbles:!0,composed:!0,detail:n}))}let Oh={designSystems:[`rapid`],customEditableSelectors:[]},kh={defaultMessage:{title:Th,text:Eh},inputMessage:{title:Th,text:`This shortcut is unavailable while typing in an input field.`},pausedMessage:{title:Th,text:`Shortcuts are paused.`},elementFocusMessage:{title:Th,text:`This shortcut is unavailable in the current focus context.`},emitPausedBlockedEvent:!0};var Rie=class{constructor(){this.shortcuts=/* @__PURE__ */ new Map,this.shortcutLookup=/* @__PURE__ */ new Map,this.keyCombinationMap=/* @__PURE__ */ new Map,this._isPausedSubject=new Am(!1),this.executionGuards=/* @__PURE__ */ new Map,this.editableContextConfig=Object.assign({},Oh),this.editableSelector=Jd(Oh.designSystems,Oh.customEditableSelectors),this.blockedMessageConfig=Object.assign({},kh)}get isPaused(){return this._isPausedSubject.value}get isPaused$(){return this._isPausedSubject.asObservable()}get isPausedSubject(){return this._isPausedSubject}registerShortcuts(e){e.forEach(e=>{this.registerShortcut(e)})}registerShortcut(e){let t=`${e.context}:${e.id}`,n=this.normalizeShortcutDefinition(e),r=this.createKeyCombinationKey(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),i=Lie.formatKeyCombination(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),a=this.keyCombinationMap.get(r);if(a){let e=[];for(let t of a){let i=this.shortcutLookup.get(t);i&&i.context===n.context&&(Id.warn(`Shortcut with key combination '${r}' already exists in context '${n.context}' (id: '${i.id}'). It will be replaced by new shortcut '${n.id}'.`),e.push(t))}e.forEach(e=>{let t=this.shortcutLookup.get(e);if(t){let n=this.shortcuts.get(t.context);n&&(n.delete(t.id),n.size===0&&this.shortcuts.delete(t.context)),this.shortcutLookup.delete(e)}a.delete(e)}),a.size===0&&this.keyCombinationMap.delete(r)}return this.shortcuts.has(n.context)||this.shortcuts.set(n.context,/* @__PURE__ */ new Map),this.shortcuts.get(n.context).set(n.id,n),this.shortcutLookup.set(t,n),this.keyCombinationMap.has(r)||this.keyCombinationMap.set(r,/* @__PURE__ */ new Set),this.keyCombinationMap.get(r).add(t),{shortcut:n,id:n.id,keyCombination:r,keyCombinationDisplay:i,disabled:()=>this.getExecutionStatus(n).disabled||!1,tooltip:()=>this.getExecutionStatus(n).tooltip}}unregisterShortcut(e,t){let n=`${e}:${t}`,r=this.shortcuts.get(e);if(r){let i=r.get(t);if(i){let a=this.normalizeShortcutDefinition(i),o=this.createKeyCombinationKey(a.key,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey);r.delete(t),r.size===0&&this.shortcuts.delete(e),this.shortcutLookup.delete(n);let s=this.keyCombinationMap.get(o);s&&(s.delete(n),s.size===0&&this.keyCombinationMap.delete(o))}}}unregisterShortcutsByContext(e){let t=this.shortcuts.get(e);t&&Array.from(t.keys()).forEach(t=>this.unregisterShortcut(e,t))}executeShortcut(e,t){this.executeShortcutByContext(this.getActiveContext(),e,t)}shouldEmitBlockedEvent(e){return e?.emitBlockedEvent!==!1}resolveBlockedMessage(e,t){return e?.blockedMessage??t}executeShortcutByContext(e,t,n){let r=this.shortcuts.get(e)?.get(t);if(this.isPaused){this.blockedMessageConfig.emitPausedBlockedEvent&&this.shouldEmitBlockedEvent(r)&&Dh({shortcutId:t,context:e,reason:`paused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.pausedMessage)},n);return}if(r){if(r.elementRef&&!this.isElementFocused(r.elementRef)){this.shouldEmitBlockedEvent(r)&&Dh({shortcutId:t,context:e,reason:`element-not-focused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.elementFocusMessage)},n);return}let i=this.getExecutionStatus(r);if(i.disabled){this.shouldEmitBlockedEvent(r)&&Dh({shortcutId:t,context:e,reason:`disabled`,blockedMessage:this.resolveBlockedMessage(r,i.tooltip===void 0?this.blockedMessageConfig.defaultMessage:{title:this.blockedMessageConfig.defaultMessage.title,text:i.tooltip})},n);return}try{r.action()}catch(n){Id.error(`Error executing shortcut ${e}:${t}:`,n)}}}getShortcuts(){let e=[];for(let t of this.shortcuts.values())e.push(...t.values());return e}getShortcutsByContext(e){let t=this.shortcuts.get(e);return t?Array.from(t.values()):[]}findShortcutByKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.createKeyCombinationKey(e,t,n,r,i),o=this.keyCombinationMap.get(a);if(o){if(this._activeContext){let e=this.shortcuts.get(this._activeContext);if(e)for(let t of o){let[n,r]=t.split(`:`);if(n!==this._activeContext)continue;let i=e.get(r);if(i)return i}}for(let e of o){let t=this.shortcutLookup.get(e);if(t)return t}}}getContexts(){return Array.from(this.shortcuts.keys())}getShortcutsByContextMap(){return new Map(this.shortcuts)}registerContext(e){this.shortcuts.has(e)||this.shortcuts.set(e,/* @__PURE__ */ new Map)}setActiveContext(e){this.registerContext(e),this._activeContext=e}getActiveContext(){return this._activeContext}clearActiveContext(){this._activeContext=void 0}registerExecutionGuard(e,t){this.executionGuards.set(e,t)}unregisterExecutionGuard(e){this.executionGuards.delete(e)}clearExecutionGuards(){this.executionGuards.clear()}configureEditableContext(e={}){let t=(e.designSystems??Oh.designSystems).filter(e=>e===`rapid`),n=(e.customEditableSelectors??Oh.customEditableSelectors).map(e=>e?.trim()).filter(e=>!!e);this.editableContextConfig={designSystems:Array.from(new Set(e.designSystems===void 0?Oh.designSystems:t)),customEditableSelectors:Array.from(new Set(n))},this.refreshEditableSelector()}getEditableContextConfig(){return{designSystems:[...this.editableContextConfig.designSystems],customEditableSelectors:[...this.editableContextConfig.customEditableSelectors]}}getEditableSelector(){return this.editableSelector}configureBlockedMessages(e={}){let t=(e,t)=>({title:(e?.title)?.trim()??t.title,text:(e?.text)?.trim()??t.text});this.blockedMessageConfig={defaultMessage:t(e.defaultMessage,kh.defaultMessage),inputMessage:t(e.inputMessage,kh.inputMessage),pausedMessage:t(e.pausedMessage,kh.pausedMessage),elementFocusMessage:t(e.elementFocusMessage,kh.elementFocusMessage),emitPausedBlockedEvent:e.emitPausedBlockedEvent??kh.emitPausedBlockedEvent}}getBlockedMessages(){return Object.assign({},this.blockedMessageConfig)}pause(){this._isPausedSubject.next(!0)}resume(){this._isPausedSubject.next(!1)}normalizeShortcutDefinition(e){let t=Object.assign({},e);return(t.optionKey||t.altKey)&&(t.altKey=!0,t.optionKey=!0),t}createKeyCombinationKey(e,t=!1,n=!1,r=!1,i=!1){let a=[];return t&&a.push(`ctrl`),n&&a.push(`alt`),r&&a.push(`shift`),i&&a.push(`meta`),(a.length>0?`${a.join(`+`)}+${e}`:e).toLowerCase()}isElementFocused(e){return e instanceof HTMLElement&&document.activeElement===e}getExecutionStatus(e){if(this.isPaused)return{disabled:!0,tooltip:this.blockedMessageConfig.pausedMessage.text};let t=this.getExecutionGuardStatus();return t.disabled?t:e.canExecute?e.canExecute():{disabled:!1,tooltip:void 0}}getExecutionGuardStatus(){for(let e of this.executionGuards.values()){let t=e(),n=typeof t==`boolean`?{disabled:t}:t;if(n?.disabled)return{disabled:!0,tooltip:n.tooltip}}return{disabled:!1,tooltip:void 0}}refreshEditableSelector(){this.editableSelector=Jd(this.editableContextConfig.designSystems,this.editableContextConfig.customEditableSelectors)}};let zie=N.createInterface(e=>e.singleton(Rie)),Bie={Space:`space`,Enter:`enter`,Escape:`escape`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,F1:`f1`,F2:`f2`,F3:`f3`,F4:`f4`,F5:`f5`,F6:`f6`,F7:`f7`,F8:`f8`,F9:`f9`,F10:`f10`,F11:`f11`,F12:`f12`};function Vie(e){return e?e.startsWith(`Key`)?e.replace(`Key`,``).toLowerCase():e.startsWith(`Digit`)?e.replace(`Digit`,``):Bie[e]||e.toLowerCase():``}let Ah=class extends Qe{constructor(){super(...arguments),this.keyListener=null,this.isListening=!1}connectedCallback(){super.connectedCallback(),this.addKeyListener()}disconnectedCallback(){super.disconnectedCallback(),this.removeKeyListener()}addKeyListener(){this.isListening||(this.keyListener=this.handleKeyDown.bind(this),document.addEventListener(`keydown`,this.keyListener),this.isListening=!0)}removeKeyListener(){this.isListening&&this.keyListener&&(document.removeEventListener(`keydown`,this.keyListener),this.keyListener=null,this.isListening=!1)}handleKeyDown(e){let t=this.shortcutManager,n=t.getBlockedMessages(),r=t.getEditableSelector(),i=this.getEventElement(e)??this,a=e.ctrlKey||e.altKey||e.shiftKey||e.metaKey,o=Vie(e.code),s=t.findShortcutByKeyCombination(o,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey);if(s){if(tf(e,r)){a&&s.emitBlockedEvent!==!1&&Dh({shortcutId:s.id,context:s.context,reason:`editable-context`,blockedMessage:s.blockedMessage??n.inputMessage},i);return}s&&(e.preventDefault(),e.stopPropagation(),t.executeShortcut(s.id,i))}}getEventElement(e){return(e.composedPath?.call(e)??[]).find(e=>e instanceof Element)??e.target??null}};q([Ft(zie)],Ah.prototype,`shortcutManager`,void 0),Ah=q([$e({name:`foundation-shortcut-listener`})],Ah);let{create:Hie}=ri,jh=Hie(`active-color-scheme`).withDefault(e=>fs.getValueFor(e)===cs.LightMode?`light`:`dark`),Mh=class extends Qe{stylesChanged(e,t){let n=this.parentController;n&&(e&&n.removeStyles(e),t&&n.addStyles(t))}connectedCallback(){super.connectedCallback();let e=this.parentElement;if(e){if(this.parentController){this.applyStyles();return}e.localName.includes(`-`)&&!customElements.get(e.localName)&&customElements.whenDefined(e.localName).then(()=>{this.isConnected&&this.parentElement===e&&this.applyStyles()})}}get parentController(){return this.parentElement?.$fastController}applyStyles(){var e;this.styles&&((e=this.parentController)==null||e.addStyles(this.styles))}};q([C],Mh.prototype,`styles`,void 0),Mh=q([$e({name:`slotted-styles`})],Mh);var Nh;(function(e){e.Italic=`italic`,e.Normal=`normal`})(Nh||(Nh={}));var Ph;(function(e){e[e.Thin=100]=`Thin`,e[e.Light=300]=`Light`,e[e.Regular=400]=`Regular`,e[e.Medium=500]=`Medium`,e[e.Bold=700]=`Bold`,e[e.Black=900]=`Black`})(Ph||(Ph={}));var Fh,Uie=/* @__PURE__ */ new Uint8Array(16);function Wie(){if(!Fh&&(Fh=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<`u`&&typeof msCrypto.getRandomValues==`function`&&msCrypto.getRandomValues.bind(msCrypto),!Fh))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return Fh(Uie)}var Gie=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ih(e){return typeof e==`string`&&Gie.test(e)}for(var Lh=[],Rh=0;Rh<256;++Rh)Lh.push((Rh+256).toString(16).substr(1));function zh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Lh[e[t+0]]+Lh[e[t+1]]+Lh[e[t+2]]+Lh[e[t+3]]+`-`+Lh[e[t+4]]+Lh[e[t+5]]+`-`+Lh[e[t+6]]+Lh[e[t+7]]+`-`+Lh[e[t+8]]+Lh[e[t+9]]+`-`+Lh[e[t+10]]+Lh[e[t+11]]+Lh[e[t+12]]+Lh[e[t+13]]+Lh[e[t+14]]+Lh[e[t+15]]).toLowerCase();if(!Ih(n))throw TypeError(`Stringified UUID is invalid`);return n}function Kie(e){if(!Ih(e))throw TypeError(`Invalid UUID`);var t,n=/* @__PURE__ */ new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}function qie(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var Jie=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,Yie=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function Bh(e,t,n){function r(e,r,i,a){if(typeof e==`string`&&(e=qie(e)),typeof r==`string`&&(r=Kie(r)),r.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),o=n(o),o[6]=o[6]&15|t,o[8]=o[8]&63|128,i){a=a||0;for(var s=0;s<16;++s)i[a+s]=o[s];return i}return zh(o)}try{r.name=e}catch{}return r.DNS=Jie,r.URL=Yie,r}function Xie(e){if(typeof e==`string`){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return Zie(Qie($ie(e),e.length*8))}function Zie(e){for(var t=[],n=e.length*32,r=`0123456789abcdef`,i=0;i<n;i+=8){var a=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(a>>>4&15)+r.charAt(a&15),16);t.push(o)}return t}function Vh(e){return(e+64>>>9<<4)+14+1}function Qie(e,t){e[t>>5]|=128<<t%32,e[Vh(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<e.length;o+=16){var s=n,c=r,l=i,u=a;n=Wh(n,r,i,a,e[o],7,-680876936),a=Wh(a,n,r,i,e[o+1],12,-389564586),i=Wh(i,a,n,r,e[o+2],17,606105819),r=Wh(r,i,a,n,e[o+3],22,-1044525330),n=Wh(n,r,i,a,e[o+4],7,-176418897),a=Wh(a,n,r,i,e[o+5],12,1200080426),i=Wh(i,a,n,r,e[o+6],17,-1473231341),r=Wh(r,i,a,n,e[o+7],22,-45705983),n=Wh(n,r,i,a,e[o+8],7,1770035416),a=Wh(a,n,r,i,e[o+9],12,-1958414417),i=Wh(i,a,n,r,e[o+10],17,-42063),r=Wh(r,i,a,n,e[o+11],22,-1990404162),n=Wh(n,r,i,a,e[o+12],7,1804603682),a=Wh(a,n,r,i,e[o+13],12,-40341101),i=Wh(i,a,n,r,e[o+14],17,-1502002290),r=Wh(r,i,a,n,e[o+15],22,1236535329),n=Gh(n,r,i,a,e[o+1],5,-165796510),a=Gh(a,n,r,i,e[o+6],9,-1069501632),i=Gh(i,a,n,r,e[o+11],14,643717713),r=Gh(r,i,a,n,e[o],20,-373897302),n=Gh(n,r,i,a,e[o+5],5,-701558691),a=Gh(a,n,r,i,e[o+10],9,38016083),i=Gh(i,a,n,r,e[o+15],14,-660478335),r=Gh(r,i,a,n,e[o+4],20,-405537848),n=Gh(n,r,i,a,e[o+9],5,568446438),a=Gh(a,n,r,i,e[o+14],9,-1019803690),i=Gh(i,a,n,r,e[o+3],14,-187363961),r=Gh(r,i,a,n,e[o+8],20,1163531501),n=Gh(n,r,i,a,e[o+13],5,-1444681467),a=Gh(a,n,r,i,e[o+2],9,-51403784),i=Gh(i,a,n,r,e[o+7],14,1735328473),r=Gh(r,i,a,n,e[o+12],20,-1926607734),n=Kh(n,r,i,a,e[o+5],4,-378558),a=Kh(a,n,r,i,e[o+8],11,-2022574463),i=Kh(i,a,n,r,e[o+11],16,1839030562),r=Kh(r,i,a,n,e[o+14],23,-35309556),n=Kh(n,r,i,a,e[o+1],4,-1530992060),a=Kh(a,n,r,i,e[o+4],11,1272893353),i=Kh(i,a,n,r,e[o+7],16,-155497632),r=Kh(r,i,a,n,e[o+10],23,-1094730640),n=Kh(n,r,i,a,e[o+13],4,681279174),a=Kh(a,n,r,i,e[o],11,-358537222),i=Kh(i,a,n,r,e[o+3],16,-722521979),r=Kh(r,i,a,n,e[o+6],23,76029189),n=Kh(n,r,i,a,e[o+9],4,-640364487),a=Kh(a,n,r,i,e[o+12],11,-421815835),i=Kh(i,a,n,r,e[o+15],16,530742520),r=Kh(r,i,a,n,e[o+2],23,-995338651),n=qh(n,r,i,a,e[o],6,-198630844),a=qh(a,n,r,i,e[o+7],10,1126891415),i=qh(i,a,n,r,e[o+14],15,-1416354905),r=qh(r,i,a,n,e[o+5],21,-57434055),n=qh(n,r,i,a,e[o+12],6,1700485571),a=qh(a,n,r,i,e[o+3],10,-1894986606),i=qh(i,a,n,r,e[o+10],15,-1051523),r=qh(r,i,a,n,e[o+1],21,-2054922799),n=qh(n,r,i,a,e[o+8],6,1873313359),a=qh(a,n,r,i,e[o+15],10,-30611744),i=qh(i,a,n,r,e[o+6],15,-1560198380),r=qh(r,i,a,n,e[o+13],21,1309151649),n=qh(n,r,i,a,e[o+4],6,-145523070),a=qh(a,n,r,i,e[o+11],10,-1120210379),i=qh(i,a,n,r,e[o+2],15,718787259),r=qh(r,i,a,n,e[o+9],21,-343485551),n=Hh(n,s),r=Hh(r,c),i=Hh(i,l),a=Hh(a,u)}return[n,r,i,a]}function $ie(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(Vh(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function Hh(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function eae(e,t){return e<<t|e>>>32-t}function Uh(e,t,n,r,i,a){return Hh(eae(Hh(Hh(t,e),Hh(r,a)),i),n)}function Wh(e,t,n,r,i,a,o){return Uh(t&n|~t&r,e,t,i,a,o)}function Gh(e,t,n,r,i,a,o){return Uh(t&r|n&~r,e,t,i,a,o)}function Kh(e,t,n,r,i,a,o){return Uh(t^n^r,e,t,i,a,o)}function qh(e,t,n,r,i,a,o){return Uh(n^(t|~r),e,t,i,a,o)}Bh(`v3`,48,Xie);function Jh(e,t,n){e=e||{};var r=e.random||(e.rng||Wie)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return zh(r)}function tae(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function Yh(e,t){return e<<t|e>>>32-t}function nae(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e==`string`){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,o=Math.ceil(a/16),s=Array(o),c=0;c<o;++c){for(var l=/* @__PURE__ */ new Uint32Array(16),u=0;u<16;++u)l[u]=e[c*64+u*4]<<24|e[c*64+u*4+1]<<16|e[c*64+u*4+2]<<8|e[c*64+u*4+3];s[c]=l}s[o-1][14]=(e.length-1)*8/2**32,s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var f=/* @__PURE__ */ new Uint32Array(80),p=0;p<16;++p)f[p]=s[d][p];for(var m=16;m<80;++m)f[m]=Yh(f[m-3]^f[m-8]^f[m-14]^f[m-16],1);for(var h=n[0],g=n[1],_=n[2],v=n[3],y=n[4],b=0;b<80;++b){var ee=Math.floor(b/20),x=Yh(h,5)+tae(ee,g,_,v)+y+t[ee]+f[b]>>>0;y=v,v=_,_=Yh(g,30)>>>0,g=h,h=x}n[0]=n[0]+h>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}Bh(`v5`,80,nae);var rae=class{constructor(){}createId(e=!1){let t=Jh();return e&&Id.debug(`UUID.createID ${t}`),t}createRemoteId(){return J(this,arguments,void 0,function*(e=!1){let t=Jh();return e&&Id.debug(`UUID.createRemoteID ${t}`),t})}};let Xh=N.createInterface(e=>e.singleton(rae)),Zh=1e3,iae=e=>T`<div class="inactivity-overlay" style="display:${e=>e.isVisible?`display`:`none`}"><${e}-card class="dialog-card"><div class="card-body"><div class="dialog-header"><${e}-icon name="warning" class="warning-icon"></${e}-icon><h2>Session Timeout Warning</h2></div><div class="dialog-content"><p>
227
227
  You have been inactive for too long. You will be automatically logged out in <strong>${e=>e.remainingSeconds}</strong>
228
228
  seconds.
229
229
  </p><p>
@@ -223,7 +223,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
223
223
  `:`,`;var o=JSON.stringify(n);u+=i?s+o+`: `:o+`:`,u+=a(r,s)}}),u+=i?`
224
224
  `+r+`}`:`}`,u}function c(e,t){return t!==void 0&&typeof t!=`function`&&Jp(t)!==`symbol`}}function Ore(e){if(typeof e==`number`)return` `.repeat(e);if(typeof e==`string`&&e!==``)return e}let kre=N.createInterface();function Are(e){return Number.isSafeInteger(+e)?Number(e):Vf(e)?BigInt.asIntN(64,e):parseFloat(e)}let jre={parse:e=>xp(e,null,Are),stringify:e=>Yp(e)},Xp=class{constructor(e=jre){this.config=e,this.serialize=e=>this.config.stringify(e)}deserialize(e){return e?typeof e==`string`?this.config.parse(e):e&&e.ok?e.text().then(e=>this.config.parse(e)):(e&&e.data&&(e=e.data),this.config.parse(e)):Promise.resolve({})}};Xp=q([rd(0,It(kre))],Xp);let Zp=N.createInterface(e=>e.singleton(Xp));function Qp(e){return typeof e==`function`}function $p(e){var t=e(function(e){Error.call(e),e.stack=(/* @__PURE__ */ Error()).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var em=$p(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription:
225
225
  `+t.map(function(e,t){return t+1+`) `+e.toString()}).join(`
226
- `):``,this.name=`UnsubscriptionError`,this.errors=t}});function tm(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var nm=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=ad(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(Qp(c))try{c()}catch(e){i=e instanceof em?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ad(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{am(f)}catch(e){i=i??[],e instanceof em?i=sd(sd([],od(i)),od(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new em(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)am(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&tm(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&tm(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),rm=nm.EMPTY;function im(e){return e instanceof nm||e&&`closed`in e&&Qp(e.remove)&&Qp(e.add)&&Qp(e.unsubscribe)}function am(e){Qp(e)?e():e.unsubscribe()}var om={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},sm={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=sm.delegate;return i?.setTimeout?i.setTimeout.apply(i,sd([e,t],od(n))):setTimeout.apply(void 0,sd([e,t],od(n)))},clearTimeout:function(e){return(sm.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function cm(e){sm.setTimeout(function(){var t=om.onUnhandledError;if(t)t(e);else throw e})}function lm(){}var Mre=(function(){return um(`C`,void 0,void 0)})();function Nre(e){return um(`E`,void 0,e)}function Pre(e){return um(`N`,e,void 0)}function um(e,t,n){return{kind:e,value:t,error:n}}var dm=null;function fm(e){if(om.useDeprecatedSynchronousErrorHandling){var t=!dm;if(t&&(dm={errorThrown:!1,error:null}),e(),t){var n=dm,r=n.errorThrown,i=n.error;if(dm=null,r)throw i}}else e()}function Fre(e){om.useDeprecatedSynchronousErrorHandling&&dm&&(dm.errorThrown=!0,dm.error=e)}var pm=function(e){ed(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,im(t)&&t.add(n)):n.destination=zre,n}return t.create=function(e,t,n){return new hm(e,t,n)},t.prototype.next=function(e){this.isStopped?_m(Pre(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?_m(Nre(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?_m(Mre,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(nm),Ire=Function.prototype.bind;function mm(e,t){return Ire.call(e,t)}var Lre=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){gm(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){gm(e)}else gm(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){gm(e)}},e}(),hm=function(e){ed(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Qp(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&om.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&mm(t.next,o),error:t.error&&mm(t.error,o),complete:t.complete&&mm(t.complete,o)}):a=t}return i.destination=new Lre(a),i}return t}(pm);function gm(e){om.useDeprecatedSynchronousErrorHandling?Fre(e):cm(e)}function Rre(e){throw e}function _m(e,t){var n=om.onStoppedNotification;n&&sm.setTimeout(function(){return n(e,t)})}var zre={closed:!0,next:lm,error:Rre,complete:lm},vm=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function ym(e){return e}function Bre(e){return e.length===0?ym:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var bm=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Hre(e)?e:new hm(e,t,n);return fm(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=xm(t),new t(function(t,r){var i=new hm({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[vm]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bre(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=xm(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function xm(e){return e??om.Promise??Promise}function Vre(e){return e&&Qp(e.next)&&Qp(e.error)&&Qp(e.complete)}function Hre(e){return e&&e instanceof pm||Vre(e)&&im(e)}function Sm(e){return Qp(e?.lift)}function Cm(e){return function(t){if(Sm(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function wm(e,t,n,r,i){return new Ure(e,t,n,r,i)}var Ure=function(e){ed(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(pm);function Wre(){return Cm(function(e,t){var n=null;e._refCount++;var r=wm(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){n=null;return}var r=e._connection,i=n;n=null,r&&(!i||r===i)&&r.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}(function(e){ed(t,e);function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Sm(t)&&(r.lift=t.lift),r}return t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,e?.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new nm;var n=this.getSubject();t.add(this.source.subscribe(wm(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=nm.EMPTY)}return t},t.prototype.refCount=function(){return Wre()(this)},t})(bm);var Tm={now:function(){return(Tm.delegate||performance).now()},delegate:void 0},Em={schedule:function(e){var t=requestAnimationFrame,n=cancelAnimationFrame,r=Em.delegate;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);var i=t(function(t){n=void 0,e(t)});return new nm(function(){return n?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Em.delegate?.requestAnimationFrame||requestAnimationFrame).apply(void 0,sd([],od(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Em.delegate?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,sd([],od(e)))},delegate:void 0};function Gre(e){return new bm(function(t){var n=e||Tm,r=n.now(),i=0,a=function(){t.closed||(i=Em.requestAnimationFrame(function(o){i=0;var s=n.now();t.next({timestamp:e?s:o,elapsed:s-r}),a()}))};return a(),function(){i&&Em.cancelAnimationFrame(i)}})}Gre();var Kre=$p(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Dm=function(e){ed(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Om(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Kre},t.prototype.next=function(e){var t=this;fm(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=ad(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;fm(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;fm(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?rm:(this.currentObservers=null,a.push(e),new nm(function(){t.currentObservers=null,tm(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new bm;return e.source=this,e},t.create=function(e,t){return new Om(e,t)},t}(bm),Om=function(e){ed(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??rm},t}(Dm),km=function(e){ed(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Dm),Am={now:function(){return(Am.delegate||Date).now()},delegate:void 0},jm=function(e){ed(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=Am);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(Dm);(function(e){ed(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,i=t._value,a=t.thrownError,o=t.isStopped,s=t._isComplete;n?e.error(a):(o||s)&&(r&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t})(Dm);var qre=function(e){ed(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(nm),Mm={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Mm.delegate;return i?.setInterval?i.setInterval.apply(i,sd([e,t],od(n))):setInterval.apply(void 0,sd([e,t],od(n)))},clearInterval:function(e){return(Mm.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},Nm=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),Mm.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Mm.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return/* @__PURE__ */ Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||/* @__PURE__ */ Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,tm(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(qre),Jre=1,Pm,Fm={};function Im(e){return e in Fm&&(delete Fm[e],!0)}var Lm={setImmediate:function(e){var t=Jre++;return Fm[t]=!0,Pm||(Pm=Promise.resolve()),Pm.then(function(){return Im(t)&&e()}),t},clearImmediate:function(e){Im(e)}},Yre=Lm.setImmediate,Xre=Lm.clearImmediate,Rm={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Rm.delegate?.setImmediate||Yre).apply(void 0,sd([],od(e)))},clearImmediate:function(e){return(Rm.delegate?.clearImmediate||Xre)(e)},delegate:void 0},Zre=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Rm.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&i[i.length-1]?.id!==n&&(Rm.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(Nm),zm=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Am.now,e}(),Bm=function(e){ed(t,e);function t(t,n){n===void 0&&(n=zm.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(zm);new(function(e){ed(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Bm))(Zre);var Vm=new Bm(Nm),Qre=Vm,$re=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!=null&&r>0||r==null&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Nm);new(function(e){ed(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Bm))($re);var eie=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Em.requestAnimationFrame(function(){return t.flush(void 0)})))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&n===t._scheduled&&i[i.length-1]?.id!==n&&(Em.cancelAnimationFrame(n),t._scheduled=void 0)},t}(Nm);new(function(e){ed(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t;e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Bm))(eie),function(e){ed(t,e);function t(t,n){t===void 0&&(t=tie),n===void 0&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return t.prototype.flush=function(){for(var e=this,t=e.actions,n=e.maxFrames,r,i;(i=t[0])&&i.delay<=n&&(t.shift(),this.frame=i.delay,!(r=i.execute(i.state,i.delay))););if(r){for(;i=t.shift();)i.unsubscribe();throw r}},t.frameTimeFactor=10,t}(Bm);var tie=function(e){ed(t,e);function t(t,n,r){r===void 0&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return t.prototype.schedule=function(n,r){if(r===void 0&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return nm.EMPTY},t.prototype.requestAsyncId=function(e,n,r){r===void 0&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){n===void 0&&(n=0)},t.prototype._execute=function(t,n){if(this.active===!0)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(Nm),Hm=new bm(function(e){return e.complete()});function Um(e){return e&&Qp(e.schedule)}function Wm(e){return e[e.length-1]}function nie(e){return Qp(Wm(e))?e.pop():void 0}function Gm(e){return Um(Wm(e))?e.pop():void 0}var Km=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function qm(e){return Qp(e?.then)}function Jm(e){return Qp(e[vm])}function Ym(e){return Symbol.asyncIterator&&Qp(e?.[Symbol.asyncIterator])}function Xm(e){return/* @__PURE__ */ TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function rie(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var Zm=rie();function Qm(e){return Qp(e?.[Zm])}function $m(e){return Yne(this,arguments,function(){var t,n,r,i;return id(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,cd(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,cd(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,cd(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eh(e){return Qp(e?.getReader)}function th(e){if(e instanceof bm)return e;if(e!=null){if(Jm(e))return iie(e);if(Km(e))return aie(e);if(qm(e))return oie(e);if(Ym(e))return nh(e);if(Qm(e))return sie(e);if(eh(e))return cie(e)}throw Xm(e)}function iie(e){return new bm(function(t){var n=e[vm]();if(Qp(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function aie(e){return new bm(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function oie(e){return new bm(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,cm)})}function sie(e){return new bm(function(t){var n,r;try{for(var i=ad(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function nh(e){return new bm(function(t){lie(e,t).catch(function(e){return t.error(e)})})}function cie(e){return nh($m(e))}function lie(e,t){var n,r,i,a;return J(this,void 0,void 0,function(){var o,s;return id(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Xne(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function rh(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function ih(e,t){return t===void 0&&(t=0),Cm(function(n,r){n.subscribe(wm(r,function(n){return rh(r,e,function(){return r.next(n)},t)},function(){return rh(r,e,function(){return r.complete()},t)},function(n){return rh(r,e,function(){return r.error(n)},t)}))})}function ah(e,t){return t===void 0&&(t=0),Cm(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function uie(e,t){return th(e).pipe(ah(t),ih(t))}function die(e,t){return th(e).pipe(ah(t),ih(t))}function fie(e,t){return new bm(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function pie(e,t){return new bm(function(n){var r;return rh(n,t,function(){r=e[Zm](),rh(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return Qp(r?.return)&&r.return()}})}function oh(e,t){if(!e)throw Error(`Iterable cannot be null`);return new bm(function(n){rh(n,t,function(){var r=e[Symbol.asyncIterator]();rh(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function mie(e,t){return oh($m(e),t)}function hie(e,t){if(e!=null){if(Jm(e))return uie(e,t);if(Km(e))return fie(e,t);if(qm(e))return die(e,t);if(Ym(e))return oh(e,t);if(Qm(e))return pie(e,t);if(eh(e))return mie(e,t)}throw Xm(e)}function sh(e,t){return t?hie(e,t):th(e)}function ch(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return sh(e,Gm(e))}function lh(e,t){var n=Qp(e)?e:function(){return e},r=function(e){return e.error(n())};return new bm(t?function(e){return t.schedule(r,0,e)}:r)}var uh;(function(e){e.NEXT=`N`,e.ERROR=`E`,e.COMPLETE=`C`})(uh||(uh={})),function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e===`N`}return e.prototype.observe=function(e){return gie(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return i===`N`?e?.(a):i===`E`?t?.(o):n?.()},e.prototype.accept=function(e,t,n){return Qp(e?.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,i=t===`N`?ch(n):t===`E`?lh(function(){return r}):t===`C`?Hm:0;if(!i)throw TypeError(`Unexpected notification kind `+t);return i},e.createNext=function(t){return new e(`N`,t)},e.createError=function(t){return new e(`E`,void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e(`C`),e}();function gie(e,t){var n,r,i,a=e,o=a.kind,s=a.value,c=a.error;if(typeof o!=`string`)throw TypeError(`Invalid notification, missing "kind"`);o===`N`?(n=t.next)==null||n.call(t,s):o===`E`?(r=t.error)==null||r.call(t,c):(i=t.complete)==null||i.call(t)}var _ie=$p(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}});function vie(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=new hm({next:function(e){r(e),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new _ie)}});e.subscribe(a)})}$p(function(e){return function(){e(this),this.name=`ArgumentOutOfRangeError`,this.message=`argument out of range`}}),$p(function(e){return function(t){e(this),this.name=`NotFoundError`,this.message=t}}),$p(function(e){return function(t){e(this),this.name=`SequenceError`,this.message=t}});function yie(e){return e instanceof Date&&!isNaN(e)}$p(function(e){return function(t){t===void 0&&(t=null),e(this),this.message=`Timeout has occurred`,this.name=`TimeoutError`,this.info=t}});function dh(e,t){return Cm(function(n,r){var i=0;n.subscribe(wm(r,function(n){r.next(e.call(t,n,i++))}))})}var bie=Array.isArray;function xie(e,t){return bie(t)?e.apply(void 0,sd([],od(t))):e(t)}function Sie(e){return dh(function(t){return xie(e,t)})}var Cie=Array.isArray,wie=Object.getPrototypeOf,Tie=Object.prototype,Eie=Object.keys;function Die(e){if(e.length===1){var t=e[0];if(Cie(t))return{args:t,keys:null};if(Oie(t)){var n=Eie(t);return{args:n.map(function(e){return t[e]}),keys:n}}}return{args:e,keys:null}}function Oie(e){return e&&typeof e==`object`&&wie(e)===Tie}function kie(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}function Aie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Gm(e),r=nie(e),i=Die(e),a=i.args,o=i.keys;if(a.length===0)return sh([],n);var s=new bm(jie(a,n,o?function(e){return kie(o,e)}:ym));return r?s.pipe(Sie(r)):s}function jie(e,t,n){return n===void 0&&(n=ym),function(r){fh(t,function(){for(var i=e.length,a=Array(i),o=i,s=i,c=function(i){fh(t,function(){var c=sh(e[i],t),l=!1;c.subscribe(wm(r,function(e){a[i]=e,l||(l=!0,s--),s||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},l=0;l<i;l++)c(l)},r)}}function fh(e,t,n){e?rh(n,e,t):t()}function Mie(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){a&&t.next(e),l++;var s=!1;th(n(e,u++)).subscribe(wm(t,function(e){i?.(e),a?p(e):t.next(e)},function(){s=!0},void 0,function(){if(s)try{l--;for(var e=function(){var e=c.shift();o?rh(t,o,function(){return m(e)}):m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(wm(t,p,function(){d=!0,f()})),function(){s?.()}}function ph(e,t,n){return n===void 0&&(n=1/0),Qp(t)?ph(function(n,r){return dh(function(e,i){return t(n,e,r,i)})(th(e(n,r)))},n):(typeof t==`number`&&(n=t),Cm(function(t,r){return Mie(t,r,e,n)}))}function Nie(e){return e===void 0&&(e=1/0),ph(ym,e)}function Pie(){return Nie(1)}function mh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Pie()(sh(e,Gm(e)))}function hh(e,t,n){e===void 0&&(e=0),n===void 0&&(n=Qre);var r=-1;return t!=null&&(Um(t)?n=t:r=t),new bm(function(t){var i=yie(e)?+e-n.now():e;i<0&&(i=0);var a=0;return n.schedule(function(){t.closed||(t.next(a++),0<=r?this.schedule(void 0,r):t.complete())},i)})}function Fie(e,t){return e===void 0&&(e=0),t===void 0&&(t=Vm),e<0&&(e=0),hh(e,e,t)}new bm(lm),Array.isArray;function gh(e,t){return Cm(function(n,r){var i=0;n.subscribe(wm(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function Iie(e,t,n,r,i){return function(a,o){var s=n,c=t,l=0;a.subscribe(wm(o,function(t){var n=l++;c=s?e(c,t,n):(s=!0,t),r&&o.next(c)},i&&(function(){s&&o.next(c),o.complete()})))}}function _h(e,t){return t?function(n){return n.pipe(_h(function(n,r){return th(e(n,r)).pipe(dh(function(e,i){return t(n,e,r,i)}))}))}:Cm(function(t,n){var r=0,i=null,a=!1;t.subscribe(wm(n,function(t){i||(i=wm(n,void 0,function(){i=null,a&&n.complete()}),th(e(t,r++)).subscribe(i))},function(){a=!0,!i&&n.complete()}))})}function vh(e){return Cm(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}function Lie(e){e===void 0&&(e=1/0);var t=e&&typeof e==`object`?e:{count:e},n=t.count,r=n===void 0?1/0:n,i=t.delay,a=t.resetOnSuccess,o=a!==void 0&&a;return r<=0?ym:Cm(function(e,t){var n=0,a,s=function(){var c=!1;a=e.subscribe(wm(t,function(e){o&&(n=0),t.next(e)},void 0,function(e){if(n++<r){var o=function(){a?(a.unsubscribe(),a=null,s()):c=!0};if(i!=null){var l=typeof i==`number`?hh(i):th(i(e,n)),u=wm(t,function(){u.unsubscribe(),o()},function(){t.complete()});l.subscribe(u)}else o()}else t.error(e)})),c&&(a.unsubscribe(),a=null,s())};s()})}function yh(e,t){return Cm(Iie(e,t,arguments.length>=2,!0))}function bh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Gm(e);return Cm(function(t,r){(n?mh(e,t,n):mh(e,t)).subscribe(r)})}function xh(e,t){return Cm(function(n,r){var i=null,a=0,o=!1,s=function(){return o&&!i&&r.complete()};n.subscribe(wm(r,function(n){i?.unsubscribe();var o=0,c=a++;th(e(n,c)).subscribe(i=wm(r,function(e){return r.next(t?t(n,e,c,o++):e)},function(){i=null,s()}))},function(){o=!0,s()}))})}function Sh(e,t){return t===void 0&&(t=!1),Cm(function(n,r){var i=0;n.subscribe(wm(r,function(n){var a=e(n,i++);(a||t)&&r.next(n),!a&&r.complete()}))})}var Rie=class{static get isMacOS(){return navigator.platform.toLowerCase().includes(`mac`)||navigator.userAgent.toLowerCase().includes(`mac os`)}static get isWindows(){return navigator.platform.toLowerCase().includes(`win`)||navigator.userAgent.toLowerCase().includes(`windows`)}static get isLinux(){return navigator.platform.toLowerCase().includes(`linux`)||navigator.userAgent.toLowerCase().includes(`linux`)}static getModifierSymbols(){return this.isMacOS?{ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`}:{ctrl:`Ctrl`,alt:`Alt`,shift:`Shift`,meta:`Win`}}static formatKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.getModifierSymbols(),o=[];t&&o.push(a.ctrl),n&&o.push(a.alt),r&&o.push(a.shift),i&&o.push(a.meta);let s=this.isMacOS?``:`+`,c=this.isMacOS?e.toUpperCase():e;return o.length>0?`${o.join(s)}${s}${c}`:c}};let Ch=`foundation-shortcut-blocked`,wh=`Shortcut blocked`,Th=`This shortcut is currently unavailable in this context.`;function Eh(e,t){let n=Object.assign(Object.assign({},e),{blockedMessage:e.blockedMessage??{title:wh,text:Th}});t&&typeof t.dispatchEvent==`function`?t.dispatchEvent(new CustomEvent(Ch,{bubbles:!0,composed:!0,detail:n})):typeof document<`u`&&document.dispatchEvent(new CustomEvent(Ch,{bubbles:!0,composed:!0,detail:n}))}let Dh={designSystems:[`rapid`],customEditableSelectors:[]},Oh={defaultMessage:{title:wh,text:Th},inputMessage:{title:wh,text:`This shortcut is unavailable while typing in an input field.`},pausedMessage:{title:wh,text:`Shortcuts are paused.`},elementFocusMessage:{title:wh,text:`This shortcut is unavailable in the current focus context.`},emitPausedBlockedEvent:!0};var zie=class{constructor(){this.shortcuts=/* @__PURE__ */ new Map,this.shortcutLookup=/* @__PURE__ */ new Map,this.keyCombinationMap=/* @__PURE__ */ new Map,this._isPausedSubject=new km(!1),this.executionGuards=/* @__PURE__ */ new Map,this.editableContextConfig=Object.assign({},Dh),this.editableSelector=qd(Dh.designSystems,Dh.customEditableSelectors),this.blockedMessageConfig=Object.assign({},Oh)}get isPaused(){return this._isPausedSubject.value}get isPaused$(){return this._isPausedSubject.asObservable()}get isPausedSubject(){return this._isPausedSubject}registerShortcuts(e){e.forEach(e=>{this.registerShortcut(e)})}registerShortcut(e){let t=`${e.context}:${e.id}`,n=this.normalizeShortcutDefinition(e),r=this.createKeyCombinationKey(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),i=Rie.formatKeyCombination(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),a=this.keyCombinationMap.get(r);if(a){let e=[];for(let t of a){let i=this.shortcutLookup.get(t);i&&i.context===n.context&&(Fd.warn(`Shortcut with key combination '${r}' already exists in context '${n.context}' (id: '${i.id}'). It will be replaced by new shortcut '${n.id}'.`),e.push(t))}e.forEach(e=>{let t=this.shortcutLookup.get(e);if(t){let n=this.shortcuts.get(t.context);n&&(n.delete(t.id),n.size===0&&this.shortcuts.delete(t.context)),this.shortcutLookup.delete(e)}a.delete(e)}),a.size===0&&this.keyCombinationMap.delete(r)}return this.shortcuts.has(n.context)||this.shortcuts.set(n.context,/* @__PURE__ */ new Map),this.shortcuts.get(n.context).set(n.id,n),this.shortcutLookup.set(t,n),this.keyCombinationMap.has(r)||this.keyCombinationMap.set(r,/* @__PURE__ */ new Set),this.keyCombinationMap.get(r).add(t),{shortcut:n,id:n.id,keyCombination:r,keyCombinationDisplay:i,disabled:()=>this.getExecutionStatus(n).disabled||!1,tooltip:()=>this.getExecutionStatus(n).tooltip}}unregisterShortcut(e,t){let n=`${e}:${t}`,r=this.shortcuts.get(e);if(r){let i=r.get(t);if(i){let a=this.normalizeShortcutDefinition(i),o=this.createKeyCombinationKey(a.key,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey);r.delete(t),r.size===0&&this.shortcuts.delete(e),this.shortcutLookup.delete(n);let s=this.keyCombinationMap.get(o);s&&(s.delete(n),s.size===0&&this.keyCombinationMap.delete(o))}}}unregisterShortcutsByContext(e){let t=this.shortcuts.get(e);t&&Array.from(t.keys()).forEach(t=>this.unregisterShortcut(e,t))}executeShortcut(e,t){this.executeShortcutByContext(this.getActiveContext(),e,t)}shouldEmitBlockedEvent(e){return e?.emitBlockedEvent!==!1}resolveBlockedMessage(e,t){return e?.blockedMessage??t}executeShortcutByContext(e,t,n){let r=this.shortcuts.get(e)?.get(t);if(this.isPaused){this.blockedMessageConfig.emitPausedBlockedEvent&&this.shouldEmitBlockedEvent(r)&&Eh({shortcutId:t,context:e,reason:`paused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.pausedMessage)},n);return}if(r){if(r.elementRef&&!this.isElementFocused(r.elementRef)){this.shouldEmitBlockedEvent(r)&&Eh({shortcutId:t,context:e,reason:`element-not-focused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.elementFocusMessage)},n);return}let i=this.getExecutionStatus(r);if(i.disabled){this.shouldEmitBlockedEvent(r)&&Eh({shortcutId:t,context:e,reason:`disabled`,blockedMessage:this.resolveBlockedMessage(r,i.tooltip===void 0?this.blockedMessageConfig.defaultMessage:{title:this.blockedMessageConfig.defaultMessage.title,text:i.tooltip})},n);return}try{r.action()}catch(n){Fd.error(`Error executing shortcut ${e}:${t}:`,n)}}}getShortcuts(){let e=[];for(let t of this.shortcuts.values())e.push(...t.values());return e}getShortcutsByContext(e){let t=this.shortcuts.get(e);return t?Array.from(t.values()):[]}findShortcutByKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.createKeyCombinationKey(e,t,n,r,i),o=this.keyCombinationMap.get(a);if(o){if(this._activeContext){let e=this.shortcuts.get(this._activeContext);if(e)for(let t of o){let[n,r]=t.split(`:`);if(n!==this._activeContext)continue;let i=e.get(r);if(i)return i}}for(let e of o){let t=this.shortcutLookup.get(e);if(t)return t}}}getContexts(){return Array.from(this.shortcuts.keys())}getShortcutsByContextMap(){return new Map(this.shortcuts)}registerContext(e){this.shortcuts.has(e)||this.shortcuts.set(e,/* @__PURE__ */ new Map)}setActiveContext(e){this.registerContext(e),this._activeContext=e}getActiveContext(){return this._activeContext}clearActiveContext(){this._activeContext=void 0}registerExecutionGuard(e,t){this.executionGuards.set(e,t)}unregisterExecutionGuard(e){this.executionGuards.delete(e)}clearExecutionGuards(){this.executionGuards.clear()}configureEditableContext(e={}){let t=(e.designSystems??Dh.designSystems).filter(e=>e===`rapid`),n=(e.customEditableSelectors??Dh.customEditableSelectors).map(e=>e?.trim()).filter(e=>!!e);this.editableContextConfig={designSystems:Array.from(new Set(e.designSystems===void 0?Dh.designSystems:t)),customEditableSelectors:Array.from(new Set(n))},this.refreshEditableSelector()}getEditableContextConfig(){return{designSystems:[...this.editableContextConfig.designSystems],customEditableSelectors:[...this.editableContextConfig.customEditableSelectors]}}getEditableSelector(){return this.editableSelector}configureBlockedMessages(e={}){let t=(e,t)=>({title:(e?.title)?.trim()??t.title,text:(e?.text)?.trim()??t.text});this.blockedMessageConfig={defaultMessage:t(e.defaultMessage,Oh.defaultMessage),inputMessage:t(e.inputMessage,Oh.inputMessage),pausedMessage:t(e.pausedMessage,Oh.pausedMessage),elementFocusMessage:t(e.elementFocusMessage,Oh.elementFocusMessage),emitPausedBlockedEvent:e.emitPausedBlockedEvent??Oh.emitPausedBlockedEvent}}getBlockedMessages(){return Object.assign({},this.blockedMessageConfig)}pause(){this._isPausedSubject.next(!0)}resume(){this._isPausedSubject.next(!1)}normalizeShortcutDefinition(e){let t=Object.assign({},e);return(t.optionKey||t.altKey)&&(t.altKey=!0,t.optionKey=!0),t}createKeyCombinationKey(e,t=!1,n=!1,r=!1,i=!1){let a=[];return t&&a.push(`ctrl`),n&&a.push(`alt`),r&&a.push(`shift`),i&&a.push(`meta`),(a.length>0?`${a.join(`+`)}+${e}`:e).toLowerCase()}isElementFocused(e){return e instanceof HTMLElement&&document.activeElement===e}getExecutionStatus(e){if(this.isPaused)return{disabled:!0,tooltip:this.blockedMessageConfig.pausedMessage.text};let t=this.getExecutionGuardStatus();return t.disabled?t:e.canExecute?e.canExecute():{disabled:!1,tooltip:void 0}}getExecutionGuardStatus(){for(let e of this.executionGuards.values()){let t=e(),n=typeof t==`boolean`?{disabled:t}:t;if(n?.disabled)return{disabled:!0,tooltip:n.tooltip}}return{disabled:!1,tooltip:void 0}}refreshEditableSelector(){this.editableSelector=qd(this.editableContextConfig.designSystems,this.editableContextConfig.customEditableSelectors)}};let Bie=N.createInterface(e=>e.singleton(zie)),Vie={Space:`space`,Enter:`enter`,Escape:`escape`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,F1:`f1`,F2:`f2`,F3:`f3`,F4:`f4`,F5:`f5`,F6:`f6`,F7:`f7`,F8:`f8`,F9:`f9`,F10:`f10`,F11:`f11`,F12:`f12`};function Hie(e){return e?e.startsWith(`Key`)?e.replace(`Key`,``).toLowerCase():e.startsWith(`Digit`)?e.replace(`Digit`,``):Vie[e]||e.toLowerCase():``}let kh=class extends Qe{constructor(){super(...arguments),this.keyListener=null,this.isListening=!1}connectedCallback(){super.connectedCallback(),this.addKeyListener()}disconnectedCallback(){super.disconnectedCallback(),this.removeKeyListener()}addKeyListener(){this.isListening||(this.keyListener=this.handleKeyDown.bind(this),document.addEventListener(`keydown`,this.keyListener),this.isListening=!0)}removeKeyListener(){this.isListening&&this.keyListener&&(document.removeEventListener(`keydown`,this.keyListener),this.keyListener=null,this.isListening=!1)}handleKeyDown(e){let t=this.shortcutManager,n=t.getBlockedMessages(),r=t.getEditableSelector(),i=this.getEventElement(e)??this,a=e.ctrlKey||e.altKey||e.shiftKey||e.metaKey,o=Hie(e.code),s=t.findShortcutByKeyCombination(o,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey);if(s){if(ef(e,r)){a&&s.emitBlockedEvent!==!1&&Eh({shortcutId:s.id,context:s.context,reason:`editable-context`,blockedMessage:s.blockedMessage??n.inputMessage},i);return}s&&(e.preventDefault(),e.stopPropagation(),t.executeShortcut(s.id,i))}}getEventElement(e){return(e.composedPath?.call(e)??[]).find(e=>e instanceof Element)??e.target??null}};q([Pt(Bie)],kh.prototype,`shortcutManager`,void 0),kh=q([$e({name:`foundation-shortcut-listener`})],kh);let{create:Uie}=ni,Ah=Uie(`active-color-scheme`).withDefault(e=>ds.getValueFor(e)===ss.LightMode?`light`:`dark`),jh=class extends Qe{stylesChanged(e,t){e&&this.parentElement.$fastController.removeStyles(e),this.parentElement.$fastController.addStyles(t)}};q([C],jh.prototype,`styles`,void 0),jh=q([$e({name:`slotted-styles`})],jh);var Mh;(function(e){e.Italic=`italic`,e.Normal=`normal`})(Mh||(Mh={}));var Nh;(function(e){e[e.Thin=100]=`Thin`,e[e.Light=300]=`Light`,e[e.Regular=400]=`Regular`,e[e.Medium=500]=`Medium`,e[e.Bold=700]=`Bold`,e[e.Black=900]=`Black`})(Nh||(Nh={}));var Ph,Wie=/* @__PURE__ */ new Uint8Array(16);function Gie(){if(!Ph&&(Ph=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<`u`&&typeof msCrypto.getRandomValues==`function`&&msCrypto.getRandomValues.bind(msCrypto),!Ph))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return Ph(Wie)}var Kie=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Fh(e){return typeof e==`string`&&Kie.test(e)}for(var Ih=[],Lh=0;Lh<256;++Lh)Ih.push((Lh+256).toString(16).substr(1));function Rh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Ih[e[t+0]]+Ih[e[t+1]]+Ih[e[t+2]]+Ih[e[t+3]]+`-`+Ih[e[t+4]]+Ih[e[t+5]]+`-`+Ih[e[t+6]]+Ih[e[t+7]]+`-`+Ih[e[t+8]]+Ih[e[t+9]]+`-`+Ih[e[t+10]]+Ih[e[t+11]]+Ih[e[t+12]]+Ih[e[t+13]]+Ih[e[t+14]]+Ih[e[t+15]]).toLowerCase();if(!Fh(n))throw TypeError(`Stringified UUID is invalid`);return n}function qie(e){if(!Fh(e))throw TypeError(`Invalid UUID`);var t,n=/* @__PURE__ */ new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}function Jie(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var Yie=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,Xie=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function zh(e,t,n){function r(e,r,i,a){if(typeof e==`string`&&(e=Jie(e)),typeof r==`string`&&(r=qie(r)),r.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),o=n(o),o[6]=o[6]&15|t,o[8]=o[8]&63|128,i){a=a||0;for(var s=0;s<16;++s)i[a+s]=o[s];return i}return Rh(o)}try{r.name=e}catch{}return r.DNS=Yie,r.URL=Xie,r}function Zie(e){if(typeof e==`string`){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return Qie($ie(eae(e),e.length*8))}function Qie(e){for(var t=[],n=e.length*32,r=`0123456789abcdef`,i=0;i<n;i+=8){var a=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(a>>>4&15)+r.charAt(a&15),16);t.push(o)}return t}function Bh(e){return(e+64>>>9<<4)+14+1}function $ie(e,t){e[t>>5]|=128<<t%32,e[Bh(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<e.length;o+=16){var s=n,c=r,l=i,u=a;n=Uh(n,r,i,a,e[o],7,-680876936),a=Uh(a,n,r,i,e[o+1],12,-389564586),i=Uh(i,a,n,r,e[o+2],17,606105819),r=Uh(r,i,a,n,e[o+3],22,-1044525330),n=Uh(n,r,i,a,e[o+4],7,-176418897),a=Uh(a,n,r,i,e[o+5],12,1200080426),i=Uh(i,a,n,r,e[o+6],17,-1473231341),r=Uh(r,i,a,n,e[o+7],22,-45705983),n=Uh(n,r,i,a,e[o+8],7,1770035416),a=Uh(a,n,r,i,e[o+9],12,-1958414417),i=Uh(i,a,n,r,e[o+10],17,-42063),r=Uh(r,i,a,n,e[o+11],22,-1990404162),n=Uh(n,r,i,a,e[o+12],7,1804603682),a=Uh(a,n,r,i,e[o+13],12,-40341101),i=Uh(i,a,n,r,e[o+14],17,-1502002290),r=Uh(r,i,a,n,e[o+15],22,1236535329),n=Wh(n,r,i,a,e[o+1],5,-165796510),a=Wh(a,n,r,i,e[o+6],9,-1069501632),i=Wh(i,a,n,r,e[o+11],14,643717713),r=Wh(r,i,a,n,e[o],20,-373897302),n=Wh(n,r,i,a,e[o+5],5,-701558691),a=Wh(a,n,r,i,e[o+10],9,38016083),i=Wh(i,a,n,r,e[o+15],14,-660478335),r=Wh(r,i,a,n,e[o+4],20,-405537848),n=Wh(n,r,i,a,e[o+9],5,568446438),a=Wh(a,n,r,i,e[o+14],9,-1019803690),i=Wh(i,a,n,r,e[o+3],14,-187363961),r=Wh(r,i,a,n,e[o+8],20,1163531501),n=Wh(n,r,i,a,e[o+13],5,-1444681467),a=Wh(a,n,r,i,e[o+2],9,-51403784),i=Wh(i,a,n,r,e[o+7],14,1735328473),r=Wh(r,i,a,n,e[o+12],20,-1926607734),n=Gh(n,r,i,a,e[o+5],4,-378558),a=Gh(a,n,r,i,e[o+8],11,-2022574463),i=Gh(i,a,n,r,e[o+11],16,1839030562),r=Gh(r,i,a,n,e[o+14],23,-35309556),n=Gh(n,r,i,a,e[o+1],4,-1530992060),a=Gh(a,n,r,i,e[o+4],11,1272893353),i=Gh(i,a,n,r,e[o+7],16,-155497632),r=Gh(r,i,a,n,e[o+10],23,-1094730640),n=Gh(n,r,i,a,e[o+13],4,681279174),a=Gh(a,n,r,i,e[o],11,-358537222),i=Gh(i,a,n,r,e[o+3],16,-722521979),r=Gh(r,i,a,n,e[o+6],23,76029189),n=Gh(n,r,i,a,e[o+9],4,-640364487),a=Gh(a,n,r,i,e[o+12],11,-421815835),i=Gh(i,a,n,r,e[o+15],16,530742520),r=Gh(r,i,a,n,e[o+2],23,-995338651),n=Kh(n,r,i,a,e[o],6,-198630844),a=Kh(a,n,r,i,e[o+7],10,1126891415),i=Kh(i,a,n,r,e[o+14],15,-1416354905),r=Kh(r,i,a,n,e[o+5],21,-57434055),n=Kh(n,r,i,a,e[o+12],6,1700485571),a=Kh(a,n,r,i,e[o+3],10,-1894986606),i=Kh(i,a,n,r,e[o+10],15,-1051523),r=Kh(r,i,a,n,e[o+1],21,-2054922799),n=Kh(n,r,i,a,e[o+8],6,1873313359),a=Kh(a,n,r,i,e[o+15],10,-30611744),i=Kh(i,a,n,r,e[o+6],15,-1560198380),r=Kh(r,i,a,n,e[o+13],21,1309151649),n=Kh(n,r,i,a,e[o+4],6,-145523070),a=Kh(a,n,r,i,e[o+11],10,-1120210379),i=Kh(i,a,n,r,e[o+2],15,718787259),r=Kh(r,i,a,n,e[o+9],21,-343485551),n=Vh(n,s),r=Vh(r,c),i=Vh(i,l),a=Vh(a,u)}return[n,r,i,a]}function eae(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(Bh(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function Vh(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function tae(e,t){return e<<t|e>>>32-t}function Hh(e,t,n,r,i,a){return Vh(tae(Vh(Vh(t,e),Vh(r,a)),i),n)}function Uh(e,t,n,r,i,a,o){return Hh(t&n|~t&r,e,t,i,a,o)}function Wh(e,t,n,r,i,a,o){return Hh(t&r|n&~r,e,t,i,a,o)}function Gh(e,t,n,r,i,a,o){return Hh(t^n^r,e,t,i,a,o)}function Kh(e,t,n,r,i,a,o){return Hh(n^(t|~r),e,t,i,a,o)}zh(`v3`,48,Zie);function qh(e,t,n){e=e||{};var r=e.random||(e.rng||Gie)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Rh(r)}function nae(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function Jh(e,t){return e<<t|e>>>32-t}function rae(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e==`string`){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,o=Math.ceil(a/16),s=Array(o),c=0;c<o;++c){for(var l=/* @__PURE__ */ new Uint32Array(16),u=0;u<16;++u)l[u]=e[c*64+u*4]<<24|e[c*64+u*4+1]<<16|e[c*64+u*4+2]<<8|e[c*64+u*4+3];s[c]=l}s[o-1][14]=(e.length-1)*8/2**32,s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var f=/* @__PURE__ */ new Uint32Array(80),p=0;p<16;++p)f[p]=s[d][p];for(var m=16;m<80;++m)f[m]=Jh(f[m-3]^f[m-8]^f[m-14]^f[m-16],1);for(var h=n[0],g=n[1],_=n[2],v=n[3],y=n[4],b=0;b<80;++b){var ee=Math.floor(b/20),x=Jh(h,5)+nae(ee,g,_,v)+y+t[ee]+f[b]>>>0;y=v,v=_,_=Jh(g,30)>>>0,g=h,h=x}n[0]=n[0]+h>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}zh(`v5`,80,rae);var iae=class{constructor(){}createId(e=!1){let t=qh();return e&&Fd.debug(`UUID.createID ${t}`),t}createRemoteId(){return J(this,arguments,void 0,function*(e=!1){let t=qh();return e&&Fd.debug(`UUID.createRemoteID ${t}`),t})}};let Yh=N.createInterface(e=>e.singleton(iae)),Xh=1e3,aae=e=>T`<div class="inactivity-overlay" style="display:${e=>e.isVisible?`display`:`none`}"><${e}-card class="dialog-card"><div class="card-body"><div class="dialog-header"><${e}-icon name="warning" class="warning-icon"></${e}-icon><h2>Session Timeout Warning</h2></div><div class="dialog-content"><p>
226
+ `):``,this.name=`UnsubscriptionError`,this.errors=t}});function tm(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var nm=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=ad(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(Qp(c))try{c()}catch(e){i=e instanceof em?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=ad(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{am(f)}catch(e){i=i??[],e instanceof em?i=sd(sd([],od(i)),od(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new em(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)am(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&tm(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&tm(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),rm=nm.EMPTY;function im(e){return e instanceof nm||e&&`closed`in e&&Qp(e.remove)&&Qp(e.add)&&Qp(e.unsubscribe)}function am(e){Qp(e)?e():e.unsubscribe()}var om={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},sm={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=sm.delegate;return i?.setTimeout?i.setTimeout.apply(i,sd([e,t],od(n))):setTimeout.apply(void 0,sd([e,t],od(n)))},clearTimeout:function(e){return(sm.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function cm(e){sm.setTimeout(function(){var t=om.onUnhandledError;if(t)t(e);else throw e})}function lm(){}var Mre=(function(){return um(`C`,void 0,void 0)})();function Nre(e){return um(`E`,void 0,e)}function Pre(e){return um(`N`,e,void 0)}function um(e,t,n){return{kind:e,value:t,error:n}}var dm=null;function fm(e){if(om.useDeprecatedSynchronousErrorHandling){var t=!dm;if(t&&(dm={errorThrown:!1,error:null}),e(),t){var n=dm,r=n.errorThrown,i=n.error;if(dm=null,r)throw i}}else e()}function Fre(e){om.useDeprecatedSynchronousErrorHandling&&dm&&(dm.errorThrown=!0,dm.error=e)}var pm=function(e){ed(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,im(t)&&t.add(n)):n.destination=zre,n}return t.create=function(e,t,n){return new hm(e,t,n)},t.prototype.next=function(e){this.isStopped?_m(Pre(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?_m(Nre(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?_m(Mre,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(nm),Ire=Function.prototype.bind;function mm(e,t){return Ire.call(e,t)}var Lre=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){gm(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){gm(e)}else gm(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){gm(e)}},e}(),hm=function(e){ed(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Qp(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&om.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&mm(t.next,o),error:t.error&&mm(t.error,o),complete:t.complete&&mm(t.complete,o)}):a=t}return i.destination=new Lre(a),i}return t}(pm);function gm(e){om.useDeprecatedSynchronousErrorHandling?Fre(e):cm(e)}function Rre(e){throw e}function _m(e,t){var n=om.onStoppedNotification;n&&sm.setTimeout(function(){return n(e,t)})}var zre={closed:!0,next:lm,error:Rre,complete:lm},vm=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function ym(e){return e}function Bre(e){return e.length===0?ym:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var bm=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Hre(e)?e:new hm(e,t,n);return fm(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=xm(t),new t(function(t,r){var i=new hm({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[vm]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bre(e)(this)},e.prototype.toPromise=function(e){var t=this;return e=xm(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function xm(e){return e??om.Promise??Promise}function Vre(e){return e&&Qp(e.next)&&Qp(e.error)&&Qp(e.complete)}function Hre(e){return e&&e instanceof pm||Vre(e)&&im(e)}function Sm(e){return Qp(e?.lift)}function Cm(e){return function(t){if(Sm(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function wm(e,t,n,r,i){return new Ure(e,t,n,r,i)}var Ure=function(e){ed(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(pm);function Wre(){return Cm(function(e,t){var n=null;e._refCount++;var r=wm(t,void 0,void 0,void 0,function(){if(!e||e._refCount<=0||0<--e._refCount){n=null;return}var r=e._connection,i=n;n=null,r&&(!i||r===i)&&r.unsubscribe(),t.unsubscribe()});e.subscribe(r),r.closed||(n=e.connect())})}(function(e){ed(t,e);function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Sm(t)&&(r.lift=t.lift),r}return t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,e?.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new nm;var n=this.getSubject();t.add(this.source.subscribe(wm(n,void 0,function(){e._teardown(),n.complete()},function(t){e._teardown(),n.error(t)},function(){return e._teardown()}))),t.closed&&(this._connection=null,t=nm.EMPTY)}return t},t.prototype.refCount=function(){return Wre()(this)},t})(bm);var Tm={now:function(){return(Tm.delegate||performance).now()},delegate:void 0},Em={schedule:function(e){var t=requestAnimationFrame,n=cancelAnimationFrame,r=Em.delegate;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);var i=t(function(t){n=void 0,e(t)});return new nm(function(){return n?.(i)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Em.delegate?.requestAnimationFrame||requestAnimationFrame).apply(void 0,sd([],od(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Em.delegate?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,sd([],od(e)))},delegate:void 0};function Gre(e){return new bm(function(t){var n=e||Tm,r=n.now(),i=0,a=function(){t.closed||(i=Em.requestAnimationFrame(function(o){i=0;var s=n.now();t.next({timestamp:e?s:o,elapsed:s-r}),a()}))};return a(),function(){i&&Em.cancelAnimationFrame(i)}})}Gre();var Kre=$p(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),Dm=function(e){ed(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Om(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Kre},t.prototype.next=function(e){var t=this;fm(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=ad(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;fm(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;fm(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?rm:(this.currentObservers=null,a.push(e),new nm(function(){t.currentObservers=null,tm(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new bm;return e.source=this,e},t.create=function(e,t){return new Om(e,t)},t}(bm),Om=function(e){ed(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??rm},t}(Dm),km=function(e){ed(t,e);function t(t){var n=e.call(this)||this;return n._value=t,n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Dm),Am={now:function(){return(Am.delegate||Date).now()},delegate:void 0},jm=function(e){ed(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=Am);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a<i.length&&!e.closed;a+=r?1:2)e.next(i[a]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,i=e._infiniteTimeWindow,a=(i?1:2)*t;if(t<1/0&&a<r.length&&r.splice(0,r.length-a),!i){for(var o=n.now(),s=0,c=1;c<r.length&&r[c]<=o;c+=2)s=c;s&&r.splice(0,s+1)}},t}(Dm);(function(e){ed(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,i=t._value,a=t.thrownError,o=t.isStopped,s=t._isComplete;n?e.error(a):(o||s)&&(r&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t})(Dm);var qre=function(e){ed(t,e);function t(t,n){return e.call(this)||this}return t.prototype.schedule=function(e,t){return t===void 0&&(t=0),this},t}(nm),Mm={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=Mm.delegate;return i?.setInterval?i.setInterval.apply(i,sd([e,t],od(n))):setInterval.apply(void 0,sd([e,t],od(n)))},clearInterval:function(e){return(Mm.delegate?.clearInterval||clearInterval)(e)},delegate:void 0},Nm=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return t.prototype.schedule=function(e,t){if(t===void 0&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return n!=null&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id??this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return n===void 0&&(n=0),Mm.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return t;t!=null&&Mm.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return/* @__PURE__ */ Error(`executing a cancelled action`);this.pending=!1;var n=this._execute(e,t);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r;try{this.work(e)}catch(e){n=!0,r=e||/* @__PURE__ */ Error(`Scheduled action threw falsy error`)}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,r=t.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,tm(i,this),n!=null&&(this.id=this.recycleAsyncId(r,n,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(qre),Jre=1,Pm,Fm={};function Im(e){return e in Fm&&(delete Fm[e],!0)}var Lm={setImmediate:function(e){var t=Jre++;return Fm[t]=!0,Pm||(Pm=Promise.resolve()),Pm.then(function(){return Im(t)&&e()}),t},clearImmediate:function(e){Im(e)}},Yre=Lm.setImmediate,Xre=Lm.clearImmediate,Rm={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(Rm.delegate?.setImmediate||Yre).apply(void 0,sd([],od(e)))},clearImmediate:function(e){return(Rm.delegate?.clearImmediate||Xre)(e)},delegate:void 0},Zre=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Rm.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&i[i.length-1]?.id!==n&&(Rm.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(Nm),zm=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=Am.now,e}(),Bm=function(e){ed(t,e);function t(t,n){n===void 0&&(n=zm.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return t.prototype.flush=function(e){var t=this.actions;if(this._active){t.push(e);return}var n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(zm);new(function(e){ed(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Bm))(Zre);var Vm=new Bm(Nm),Qre=Vm,$re=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!=null&&r>0||r==null&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Nm);new(function(e){ed(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Bm))($re);var eie=function(e){ed(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return t.prototype.requestAsyncId=function(t,n,r){return r===void 0&&(r=0),r!==null&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Em.requestAnimationFrame(function(){return t.flush(void 0)})))},t.prototype.recycleAsyncId=function(t,n,r){if(r===void 0&&(r=0),r==null?this.delay>0:r>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i=t.actions;n!=null&&n===t._scheduled&&i[i.length-1]?.id!==n&&(Em.cancelAnimationFrame(n),t._scheduled=void 0)},t}(Nm);new(function(e){ed(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(e){this._active=!0;var t;e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var n=this.actions,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(Bm))(eie),function(e){ed(t,e);function t(t,n){t===void 0&&(t=tie),n===void 0&&(n=1/0);var r=e.call(this,t,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return t.prototype.flush=function(){for(var e=this,t=e.actions,n=e.maxFrames,r,i;(i=t[0])&&i.delay<=n&&(t.shift(),this.frame=i.delay,!(r=i.execute(i.state,i.delay))););if(r){for(;i=t.shift();)i.unsubscribe();throw r}},t.frameTimeFactor=10,t}(Bm);var tie=function(e){ed(t,e);function t(t,n,r){r===void 0&&(r=t.index+=1);var i=e.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.index=r,i.active=!0,i.index=t.index=r,i}return t.prototype.schedule=function(n,r){if(r===void 0&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return nm.EMPTY},t.prototype.requestAsyncId=function(e,n,r){r===void 0&&(r=0),this.delay=e.frame+r;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,n){n===void 0&&(n=0)},t.prototype._execute=function(t,n){if(this.active===!0)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(Nm),Hm=new bm(function(e){return e.complete()});function Um(e){return e&&Qp(e.schedule)}function Wm(e){return e[e.length-1]}function nie(e){return Qp(Wm(e))?e.pop():void 0}function Gm(e){return Um(Wm(e))?e.pop():void 0}var Km=(function(e){return e&&typeof e.length==`number`&&typeof e!=`function`});function qm(e){return Qp(e?.then)}function Jm(e){return Qp(e[vm])}function Ym(e){return Symbol.asyncIterator&&Qp(e?.[Symbol.asyncIterator])}function Xm(e){return/* @__PURE__ */ TypeError(`You provided `+(typeof e==`object`&&e?`an invalid object`:`'`+e+`'`)+` where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function rie(){return typeof Symbol!=`function`||!Symbol.iterator?`@@iterator`:Symbol.iterator}var Zm=rie();function Qm(e){return Qp(e?.[Zm])}function $m(e){return Yne(this,arguments,function(){var t,n,r,i;return id(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,cd(t.read())];case 3:return n=a.sent(),r=n.value,i=n.done,i?[4,cd(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,cd(r)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function eh(e){return Qp(e?.getReader)}function th(e){if(e instanceof bm)return e;if(e!=null){if(Jm(e))return iie(e);if(Km(e))return aie(e);if(qm(e))return oie(e);if(Ym(e))return nh(e);if(Qm(e))return sie(e);if(eh(e))return cie(e)}throw Xm(e)}function iie(e){return new bm(function(t){var n=e[vm]();if(Qp(n.subscribe))return n.subscribe(t);throw TypeError(`Provided object does not correctly implement Symbol.observable`)})}function aie(e){return new bm(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function oie(e){return new bm(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,cm)})}function sie(e){return new bm(function(t){var n,r;try{for(var i=ad(e),a=i.next();!a.done;a=i.next()){var o=a.value;if(t.next(o),t.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function nh(e){return new bm(function(t){lie(e,t).catch(function(e){return t.error(e)})})}function cie(e){return nh($m(e))}function lie(e,t){var n,r,i,a;return J(this,void 0,void 0,function(){var o,s;return id(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Xne(e),c.label=1;case 1:return[4,n.next()];case 2:if(r=c.sent(),r.done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function rh(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}function ih(e,t){return t===void 0&&(t=0),Cm(function(n,r){n.subscribe(wm(r,function(n){return rh(r,e,function(){return r.next(n)},t)},function(){return rh(r,e,function(){return r.complete()},t)},function(n){return rh(r,e,function(){return r.error(n)},t)}))})}function ah(e,t){return t===void 0&&(t=0),Cm(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function uie(e,t){return th(e).pipe(ah(t),ih(t))}function die(e,t){return th(e).pipe(ah(t),ih(t))}function fie(e,t){return new bm(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function pie(e,t){return new bm(function(n){var r;return rh(n,t,function(){r=e[Zm](),rh(n,t,function(){var e,t,i;try{e=r.next(),t=e.value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return Qp(r?.return)&&r.return()}})}function oh(e,t){if(!e)throw Error(`Iterable cannot be null`);return new bm(function(n){rh(n,t,function(){var r=e[Symbol.asyncIterator]();rh(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}function mie(e,t){return oh($m(e),t)}function hie(e,t){if(e!=null){if(Jm(e))return uie(e,t);if(Km(e))return fie(e,t);if(qm(e))return die(e,t);if(Ym(e))return oh(e,t);if(Qm(e))return pie(e,t);if(eh(e))return mie(e,t)}throw Xm(e)}function sh(e,t){return t?hie(e,t):th(e)}function ch(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return sh(e,Gm(e))}function lh(e,t){var n=Qp(e)?e:function(){return e},r=function(e){return e.error(n())};return new bm(t?function(e){return t.schedule(r,0,e)}:r)}var uh;(function(e){e.NEXT=`N`,e.ERROR=`E`,e.COMPLETE=`C`})(uh||(uh={})),function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e===`N`}return e.prototype.observe=function(e){return gie(this,e)},e.prototype.do=function(e,t,n){var r=this,i=r.kind,a=r.value,o=r.error;return i===`N`?e?.(a):i===`E`?t?.(o):n?.()},e.prototype.accept=function(e,t,n){return Qp(e?.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,i=t===`N`?ch(n):t===`E`?lh(function(){return r}):t===`C`?Hm:0;if(!i)throw TypeError(`Unexpected notification kind `+t);return i},e.createNext=function(t){return new e(`N`,t)},e.createError=function(t){return new e(`E`,void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e(`C`),e}();function gie(e,t){var n,r,i,a=e,o=a.kind,s=a.value,c=a.error;if(typeof o!=`string`)throw TypeError(`Invalid notification, missing "kind"`);o===`N`?(n=t.next)==null||n.call(t,s):o===`E`?(r=t.error)==null||r.call(t,c):(i=t.complete)==null||i.call(t)}var _ie=$p(function(e){return function(){e(this),this.name=`EmptyError`,this.message=`no elements in sequence`}});function vie(e,t){var n=typeof t==`object`;return new Promise(function(r,i){var a=new hm({next:function(e){r(e),a.unsubscribe()},error:i,complete:function(){n?r(t.defaultValue):i(new _ie)}});e.subscribe(a)})}$p(function(e){return function(){e(this),this.name=`ArgumentOutOfRangeError`,this.message=`argument out of range`}}),$p(function(e){return function(t){e(this),this.name=`NotFoundError`,this.message=t}}),$p(function(e){return function(t){e(this),this.name=`SequenceError`,this.message=t}});function yie(e){return e instanceof Date&&!isNaN(e)}$p(function(e){return function(t){t===void 0&&(t=null),e(this),this.message=`Timeout has occurred`,this.name=`TimeoutError`,this.info=t}});function dh(e,t){return Cm(function(n,r){var i=0;n.subscribe(wm(r,function(n){r.next(e.call(t,n,i++))}))})}var bie=Array.isArray;function xie(e,t){return bie(t)?e.apply(void 0,sd([],od(t))):e(t)}function Sie(e){return dh(function(t){return xie(e,t)})}var Cie=Array.isArray,wie=Object.getPrototypeOf,Tie=Object.prototype,Eie=Object.keys;function Die(e){if(e.length===1){var t=e[0];if(Cie(t))return{args:t,keys:null};if(Oie(t)){var n=Eie(t);return{args:n.map(function(e){return t[e]}),keys:n}}}return{args:e,keys:null}}function Oie(e){return e&&typeof e==`object`&&wie(e)===Tie}function kie(e,t){return e.reduce(function(e,n,r){return e[n]=t[r],e},{})}function Aie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Gm(e),r=nie(e),i=Die(e),a=i.args,o=i.keys;if(a.length===0)return sh([],n);var s=new bm(jie(a,n,o?function(e){return kie(o,e)}:ym));return r?s.pipe(Sie(r)):s}function jie(e,t,n){return n===void 0&&(n=ym),function(r){fh(t,function(){for(var i=e.length,a=Array(i),o=i,s=i,c=function(i){fh(t,function(){var c=sh(e[i],t),l=!1;c.subscribe(wm(r,function(e){a[i]=e,l||(l=!0,s--),s||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},l=0;l<i;l++)c(l)},r)}}function fh(e,t,n){e?rh(n,e,t):t()}function Mie(e,t,n,r,i,a,o,s){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&t.complete()},p=function(e){return l<r?m(e):c.push(e)},m=function(e){a&&t.next(e),l++;var s=!1;th(n(e,u++)).subscribe(wm(t,function(e){i?.(e),a?p(e):t.next(e)},function(){s=!0},void 0,function(){if(s)try{l--;for(var e=function(){var e=c.shift();o?rh(t,o,function(){return m(e)}):m(e)};c.length&&l<r;)e();f()}catch(e){t.error(e)}}))};return e.subscribe(wm(t,p,function(){d=!0,f()})),function(){s?.()}}function ph(e,t,n){return n===void 0&&(n=1/0),Qp(t)?ph(function(n,r){return dh(function(e,i){return t(n,e,r,i)})(th(e(n,r)))},n):(typeof t==`number`&&(n=t),Cm(function(t,r){return Mie(t,r,e,n)}))}function Nie(e){return e===void 0&&(e=1/0),ph(ym,e)}function Pie(){return Nie(1)}function mh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Pie()(sh(e,Gm(e)))}function hh(e,t,n){e===void 0&&(e=0),n===void 0&&(n=Qre);var r=-1;return t!=null&&(Um(t)?n=t:r=t),new bm(function(t){var i=yie(e)?+e-n.now():e;i<0&&(i=0);var a=0;return n.schedule(function(){t.closed||(t.next(a++),0<=r?this.schedule(void 0,r):t.complete())},i)})}function Fie(e,t){return e===void 0&&(e=0),t===void 0&&(t=Vm),e<0&&(e=0),hh(e,e,t)}new bm(lm),Array.isArray;function gh(e,t){return Cm(function(n,r){var i=0;n.subscribe(wm(r,function(n){return e.call(t,n,i++)&&r.next(n)}))})}function Iie(e,t,n,r,i){return function(a,o){var s=n,c=t,l=0;a.subscribe(wm(o,function(t){var n=l++;c=s?e(c,t,n):(s=!0,t),r&&o.next(c)},i&&(function(){s&&o.next(c),o.complete()})))}}function _h(e,t){return t?function(n){return n.pipe(_h(function(n,r){return th(e(n,r)).pipe(dh(function(e,i){return t(n,e,r,i)}))}))}:Cm(function(t,n){var r=0,i=null,a=!1;t.subscribe(wm(n,function(t){i||(i=wm(n,void 0,function(){i=null,a&&n.complete()}),th(e(t,r++)).subscribe(i))},function(){a=!0,!i&&n.complete()}))})}function vh(e){return Cm(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}function Lie(e){e===void 0&&(e=1/0);var t=e&&typeof e==`object`?e:{count:e},n=t.count,r=n===void 0?1/0:n,i=t.delay,a=t.resetOnSuccess,o=a!==void 0&&a;return r<=0?ym:Cm(function(e,t){var n=0,a,s=function(){var c=!1;a=e.subscribe(wm(t,function(e){o&&(n=0),t.next(e)},void 0,function(e){if(n++<r){var o=function(){a?(a.unsubscribe(),a=null,s()):c=!0};if(i!=null){var l=typeof i==`number`?hh(i):th(i(e,n)),u=wm(t,function(){u.unsubscribe(),o()},function(){t.complete()});l.subscribe(u)}else o()}else t.error(e)})),c&&(a.unsubscribe(),a=null,s())};s()})}function yh(e,t){return Cm(Iie(e,t,arguments.length>=2,!0))}function bh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Gm(e);return Cm(function(t,r){(n?mh(e,t,n):mh(e,t)).subscribe(r)})}function xh(e,t){return Cm(function(n,r){var i=null,a=0,o=!1,s=function(){return o&&!i&&r.complete()};n.subscribe(wm(r,function(n){i?.unsubscribe();var o=0,c=a++;th(e(n,c)).subscribe(i=wm(r,function(e){return r.next(t?t(n,e,c,o++):e)},function(){i=null,s()}))},function(){o=!0,s()}))})}function Sh(e,t){return t===void 0&&(t=!1),Cm(function(n,r){var i=0;n.subscribe(wm(r,function(n){var a=e(n,i++);(a||t)&&r.next(n),!a&&r.complete()}))})}var Rie=class{static get isMacOS(){return navigator.platform.toLowerCase().includes(`mac`)||navigator.userAgent.toLowerCase().includes(`mac os`)}static get isWindows(){return navigator.platform.toLowerCase().includes(`win`)||navigator.userAgent.toLowerCase().includes(`windows`)}static get isLinux(){return navigator.platform.toLowerCase().includes(`linux`)||navigator.userAgent.toLowerCase().includes(`linux`)}static getModifierSymbols(){return this.isMacOS?{ctrl:`⌃`,alt:`⌥`,shift:`⇧`,meta:`⌘`}:{ctrl:`Ctrl`,alt:`Alt`,shift:`Shift`,meta:`Win`}}static formatKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.getModifierSymbols(),o=[];t&&o.push(a.ctrl),n&&o.push(a.alt),r&&o.push(a.shift),i&&o.push(a.meta);let s=this.isMacOS?``:`+`,c=this.isMacOS?e.toUpperCase():e;return o.length>0?`${o.join(s)}${s}${c}`:c}};let Ch=`foundation-shortcut-blocked`,wh=`Shortcut blocked`,Th=`This shortcut is currently unavailable in this context.`;function Eh(e,t){let n=Object.assign(Object.assign({},e),{blockedMessage:e.blockedMessage??{title:wh,text:Th}});t&&typeof t.dispatchEvent==`function`?t.dispatchEvent(new CustomEvent(Ch,{bubbles:!0,composed:!0,detail:n})):typeof document<`u`&&document.dispatchEvent(new CustomEvent(Ch,{bubbles:!0,composed:!0,detail:n}))}let Dh={designSystems:[`rapid`],customEditableSelectors:[]},Oh={defaultMessage:{title:wh,text:Th},inputMessage:{title:wh,text:`This shortcut is unavailable while typing in an input field.`},pausedMessage:{title:wh,text:`Shortcuts are paused.`},elementFocusMessage:{title:wh,text:`This shortcut is unavailable in the current focus context.`},emitPausedBlockedEvent:!0};var zie=class{constructor(){this.shortcuts=/* @__PURE__ */ new Map,this.shortcutLookup=/* @__PURE__ */ new Map,this.keyCombinationMap=/* @__PURE__ */ new Map,this._isPausedSubject=new km(!1),this.executionGuards=/* @__PURE__ */ new Map,this.editableContextConfig=Object.assign({},Dh),this.editableSelector=qd(Dh.designSystems,Dh.customEditableSelectors),this.blockedMessageConfig=Object.assign({},Oh)}get isPaused(){return this._isPausedSubject.value}get isPaused$(){return this._isPausedSubject.asObservable()}get isPausedSubject(){return this._isPausedSubject}registerShortcuts(e){e.forEach(e=>{this.registerShortcut(e)})}registerShortcut(e){let t=`${e.context}:${e.id}`,n=this.normalizeShortcutDefinition(e),r=this.createKeyCombinationKey(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),i=Rie.formatKeyCombination(n.key,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey),a=this.keyCombinationMap.get(r);if(a){let e=[];for(let t of a){let i=this.shortcutLookup.get(t);i&&i.context===n.context&&(Fd.warn(`Shortcut with key combination '${r}' already exists in context '${n.context}' (id: '${i.id}'). It will be replaced by new shortcut '${n.id}'.`),e.push(t))}e.forEach(e=>{let t=this.shortcutLookup.get(e);if(t){let n=this.shortcuts.get(t.context);n&&(n.delete(t.id),n.size===0&&this.shortcuts.delete(t.context)),this.shortcutLookup.delete(e)}a.delete(e)}),a.size===0&&this.keyCombinationMap.delete(r)}return this.shortcuts.has(n.context)||this.shortcuts.set(n.context,/* @__PURE__ */ new Map),this.shortcuts.get(n.context).set(n.id,n),this.shortcutLookup.set(t,n),this.keyCombinationMap.has(r)||this.keyCombinationMap.set(r,/* @__PURE__ */ new Set),this.keyCombinationMap.get(r).add(t),{shortcut:n,id:n.id,keyCombination:r,keyCombinationDisplay:i,disabled:()=>this.getExecutionStatus(n).disabled||!1,tooltip:()=>this.getExecutionStatus(n).tooltip}}unregisterShortcut(e,t){let n=`${e}:${t}`,r=this.shortcuts.get(e);if(r){let i=r.get(t);if(i){let a=this.normalizeShortcutDefinition(i),o=this.createKeyCombinationKey(a.key,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey);r.delete(t),r.size===0&&this.shortcuts.delete(e),this.shortcutLookup.delete(n);let s=this.keyCombinationMap.get(o);s&&(s.delete(n),s.size===0&&this.keyCombinationMap.delete(o))}}}unregisterShortcutsByContext(e){let t=this.shortcuts.get(e);t&&Array.from(t.keys()).forEach(t=>this.unregisterShortcut(e,t))}executeShortcut(e,t){this.executeShortcutByContext(this.getActiveContext(),e,t)}shouldEmitBlockedEvent(e){return e?.emitBlockedEvent!==!1}resolveBlockedMessage(e,t){return e?.blockedMessage??t}executeShortcutByContext(e,t,n){let r=this.shortcuts.get(e)?.get(t);if(this.isPaused){this.blockedMessageConfig.emitPausedBlockedEvent&&this.shouldEmitBlockedEvent(r)&&Eh({shortcutId:t,context:e,reason:`paused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.pausedMessage)},n);return}if(r){if(r.elementRef&&!this.isElementFocused(r.elementRef)){this.shouldEmitBlockedEvent(r)&&Eh({shortcutId:t,context:e,reason:`element-not-focused`,blockedMessage:this.resolveBlockedMessage(r,this.blockedMessageConfig.elementFocusMessage)},n);return}let i=this.getExecutionStatus(r);if(i.disabled){this.shouldEmitBlockedEvent(r)&&Eh({shortcutId:t,context:e,reason:`disabled`,blockedMessage:this.resolveBlockedMessage(r,i.tooltip===void 0?this.blockedMessageConfig.defaultMessage:{title:this.blockedMessageConfig.defaultMessage.title,text:i.tooltip})},n);return}try{r.action()}catch(n){Fd.error(`Error executing shortcut ${e}:${t}:`,n)}}}getShortcuts(){let e=[];for(let t of this.shortcuts.values())e.push(...t.values());return e}getShortcutsByContext(e){let t=this.shortcuts.get(e);return t?Array.from(t.values()):[]}findShortcutByKeyCombination(e,t=!1,n=!1,r=!1,i=!1){let a=this.createKeyCombinationKey(e,t,n,r,i),o=this.keyCombinationMap.get(a);if(o){if(this._activeContext){let e=this.shortcuts.get(this._activeContext);if(e)for(let t of o){let[n,r]=t.split(`:`);if(n!==this._activeContext)continue;let i=e.get(r);if(i)return i}}for(let e of o){let t=this.shortcutLookup.get(e);if(t)return t}}}getContexts(){return Array.from(this.shortcuts.keys())}getShortcutsByContextMap(){return new Map(this.shortcuts)}registerContext(e){this.shortcuts.has(e)||this.shortcuts.set(e,/* @__PURE__ */ new Map)}setActiveContext(e){this.registerContext(e),this._activeContext=e}getActiveContext(){return this._activeContext}clearActiveContext(){this._activeContext=void 0}registerExecutionGuard(e,t){this.executionGuards.set(e,t)}unregisterExecutionGuard(e){this.executionGuards.delete(e)}clearExecutionGuards(){this.executionGuards.clear()}configureEditableContext(e={}){let t=(e.designSystems??Dh.designSystems).filter(e=>e===`rapid`),n=(e.customEditableSelectors??Dh.customEditableSelectors).map(e=>e?.trim()).filter(e=>!!e);this.editableContextConfig={designSystems:Array.from(new Set(e.designSystems===void 0?Dh.designSystems:t)),customEditableSelectors:Array.from(new Set(n))},this.refreshEditableSelector()}getEditableContextConfig(){return{designSystems:[...this.editableContextConfig.designSystems],customEditableSelectors:[...this.editableContextConfig.customEditableSelectors]}}getEditableSelector(){return this.editableSelector}configureBlockedMessages(e={}){let t=(e,t)=>({title:(e?.title)?.trim()??t.title,text:(e?.text)?.trim()??t.text});this.blockedMessageConfig={defaultMessage:t(e.defaultMessage,Oh.defaultMessage),inputMessage:t(e.inputMessage,Oh.inputMessage),pausedMessage:t(e.pausedMessage,Oh.pausedMessage),elementFocusMessage:t(e.elementFocusMessage,Oh.elementFocusMessage),emitPausedBlockedEvent:e.emitPausedBlockedEvent??Oh.emitPausedBlockedEvent}}getBlockedMessages(){return Object.assign({},this.blockedMessageConfig)}pause(){this._isPausedSubject.next(!0)}resume(){this._isPausedSubject.next(!1)}normalizeShortcutDefinition(e){let t=Object.assign({},e);return(t.optionKey||t.altKey)&&(t.altKey=!0,t.optionKey=!0),t}createKeyCombinationKey(e,t=!1,n=!1,r=!1,i=!1){let a=[];return t&&a.push(`ctrl`),n&&a.push(`alt`),r&&a.push(`shift`),i&&a.push(`meta`),(a.length>0?`${a.join(`+`)}+${e}`:e).toLowerCase()}isElementFocused(e){return e instanceof HTMLElement&&document.activeElement===e}getExecutionStatus(e){if(this.isPaused)return{disabled:!0,tooltip:this.blockedMessageConfig.pausedMessage.text};let t=this.getExecutionGuardStatus();return t.disabled?t:e.canExecute?e.canExecute():{disabled:!1,tooltip:void 0}}getExecutionGuardStatus(){for(let e of this.executionGuards.values()){let t=e(),n=typeof t==`boolean`?{disabled:t}:t;if(n?.disabled)return{disabled:!0,tooltip:n.tooltip}}return{disabled:!1,tooltip:void 0}}refreshEditableSelector(){this.editableSelector=qd(this.editableContextConfig.designSystems,this.editableContextConfig.customEditableSelectors)}};let Bie=N.createInterface(e=>e.singleton(zie)),Vie={Space:`space`,Enter:`enter`,Escape:`escape`,Tab:`tab`,Backspace:`backspace`,Delete:`delete`,Insert:`insert`,Home:`home`,End:`end`,PageUp:`pageup`,PageDown:`pagedown`,ArrowUp:`arrowup`,ArrowDown:`arrowdown`,ArrowLeft:`arrowleft`,ArrowRight:`arrowright`,F1:`f1`,F2:`f2`,F3:`f3`,F4:`f4`,F5:`f5`,F6:`f6`,F7:`f7`,F8:`f8`,F9:`f9`,F10:`f10`,F11:`f11`,F12:`f12`};function Hie(e){return e?e.startsWith(`Key`)?e.replace(`Key`,``).toLowerCase():e.startsWith(`Digit`)?e.replace(`Digit`,``):Vie[e]||e.toLowerCase():``}let kh=class extends Qe{constructor(){super(...arguments),this.keyListener=null,this.isListening=!1}connectedCallback(){super.connectedCallback(),this.addKeyListener()}disconnectedCallback(){super.disconnectedCallback(),this.removeKeyListener()}addKeyListener(){this.isListening||(this.keyListener=this.handleKeyDown.bind(this),document.addEventListener(`keydown`,this.keyListener),this.isListening=!0)}removeKeyListener(){this.isListening&&this.keyListener&&(document.removeEventListener(`keydown`,this.keyListener),this.keyListener=null,this.isListening=!1)}handleKeyDown(e){let t=this.shortcutManager,n=t.getBlockedMessages(),r=t.getEditableSelector(),i=this.getEventElement(e)??this,a=e.ctrlKey||e.altKey||e.shiftKey||e.metaKey,o=Hie(e.code),s=t.findShortcutByKeyCombination(o,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey);if(s){if(ef(e,r)){a&&s.emitBlockedEvent!==!1&&Eh({shortcutId:s.id,context:s.context,reason:`editable-context`,blockedMessage:s.blockedMessage??n.inputMessage},i);return}s&&(e.preventDefault(),e.stopPropagation(),t.executeShortcut(s.id,i))}}getEventElement(e){return(e.composedPath?.call(e)??[]).find(e=>e instanceof Element)??e.target??null}};q([Pt(Bie)],kh.prototype,`shortcutManager`,void 0),kh=q([$e({name:`foundation-shortcut-listener`})],kh);let{create:Uie}=ni,Ah=Uie(`active-color-scheme`).withDefault(e=>ds.getValueFor(e)===ss.LightMode?`light`:`dark`),jh=class extends Qe{stylesChanged(e,t){let n=this.parentController;n&&(e&&n.removeStyles(e),t&&n.addStyles(t))}connectedCallback(){super.connectedCallback();let e=this.parentElement;if(e){if(this.parentController){this.applyStyles();return}e.localName.includes(`-`)&&!customElements.get(e.localName)&&customElements.whenDefined(e.localName).then(()=>{this.isConnected&&this.parentElement===e&&this.applyStyles()})}}get parentController(){return this.parentElement?.$fastController}applyStyles(){var e;this.styles&&((e=this.parentController)==null||e.addStyles(this.styles))}};q([C],jh.prototype,`styles`,void 0),jh=q([$e({name:`slotted-styles`})],jh);var Mh;(function(e){e.Italic=`italic`,e.Normal=`normal`})(Mh||(Mh={}));var Nh;(function(e){e[e.Thin=100]=`Thin`,e[e.Light=300]=`Light`,e[e.Regular=400]=`Regular`,e[e.Medium=500]=`Medium`,e[e.Bold=700]=`Bold`,e[e.Black=900]=`Black`})(Nh||(Nh={}));var Ph,Wie=/* @__PURE__ */ new Uint8Array(16);function Gie(){if(!Ph&&(Ph=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<`u`&&typeof msCrypto.getRandomValues==`function`&&msCrypto.getRandomValues.bind(msCrypto),!Ph))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return Ph(Wie)}var Kie=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Fh(e){return typeof e==`string`&&Kie.test(e)}for(var Ih=[],Lh=0;Lh<256;++Lh)Ih.push((Lh+256).toString(16).substr(1));function Rh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Ih[e[t+0]]+Ih[e[t+1]]+Ih[e[t+2]]+Ih[e[t+3]]+`-`+Ih[e[t+4]]+Ih[e[t+5]]+`-`+Ih[e[t+6]]+Ih[e[t+7]]+`-`+Ih[e[t+8]]+Ih[e[t+9]]+`-`+Ih[e[t+10]]+Ih[e[t+11]]+Ih[e[t+12]]+Ih[e[t+13]]+Ih[e[t+14]]+Ih[e[t+15]]).toLowerCase();if(!Fh(n))throw TypeError(`Stringified UUID is invalid`);return n}function qie(e){if(!Fh(e))throw TypeError(`Invalid UUID`);var t,n=/* @__PURE__ */ new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=t&255,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=t&255,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=t&255,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=t&255,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=t&255,n}function Jie(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}var Yie=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,Xie=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function zh(e,t,n){function r(e,r,i,a){if(typeof e==`string`&&(e=Jie(e)),typeof r==`string`&&(r=qie(r)),r.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);var o=new Uint8Array(16+e.length);if(o.set(r),o.set(e,r.length),o=n(o),o[6]=o[6]&15|t,o[8]=o[8]&63|128,i){a=a||0;for(var s=0;s<16;++s)i[a+s]=o[s];return i}return Rh(o)}try{r.name=e}catch{}return r.DNS=Yie,r.URL=Xie,r}function Zie(e){if(typeof e==`string`){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return Qie($ie(eae(e),e.length*8))}function Qie(e){for(var t=[],n=e.length*32,r=`0123456789abcdef`,i=0;i<n;i+=8){var a=e[i>>5]>>>i%32&255,o=parseInt(r.charAt(a>>>4&15)+r.charAt(a&15),16);t.push(o)}return t}function Bh(e){return(e+64>>>9<<4)+14+1}function $ie(e,t){e[t>>5]|=128<<t%32,e[Bh(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,a=271733878,o=0;o<e.length;o+=16){var s=n,c=r,l=i,u=a;n=Uh(n,r,i,a,e[o],7,-680876936),a=Uh(a,n,r,i,e[o+1],12,-389564586),i=Uh(i,a,n,r,e[o+2],17,606105819),r=Uh(r,i,a,n,e[o+3],22,-1044525330),n=Uh(n,r,i,a,e[o+4],7,-176418897),a=Uh(a,n,r,i,e[o+5],12,1200080426),i=Uh(i,a,n,r,e[o+6],17,-1473231341),r=Uh(r,i,a,n,e[o+7],22,-45705983),n=Uh(n,r,i,a,e[o+8],7,1770035416),a=Uh(a,n,r,i,e[o+9],12,-1958414417),i=Uh(i,a,n,r,e[o+10],17,-42063),r=Uh(r,i,a,n,e[o+11],22,-1990404162),n=Uh(n,r,i,a,e[o+12],7,1804603682),a=Uh(a,n,r,i,e[o+13],12,-40341101),i=Uh(i,a,n,r,e[o+14],17,-1502002290),r=Uh(r,i,a,n,e[o+15],22,1236535329),n=Wh(n,r,i,a,e[o+1],5,-165796510),a=Wh(a,n,r,i,e[o+6],9,-1069501632),i=Wh(i,a,n,r,e[o+11],14,643717713),r=Wh(r,i,a,n,e[o],20,-373897302),n=Wh(n,r,i,a,e[o+5],5,-701558691),a=Wh(a,n,r,i,e[o+10],9,38016083),i=Wh(i,a,n,r,e[o+15],14,-660478335),r=Wh(r,i,a,n,e[o+4],20,-405537848),n=Wh(n,r,i,a,e[o+9],5,568446438),a=Wh(a,n,r,i,e[o+14],9,-1019803690),i=Wh(i,a,n,r,e[o+3],14,-187363961),r=Wh(r,i,a,n,e[o+8],20,1163531501),n=Wh(n,r,i,a,e[o+13],5,-1444681467),a=Wh(a,n,r,i,e[o+2],9,-51403784),i=Wh(i,a,n,r,e[o+7],14,1735328473),r=Wh(r,i,a,n,e[o+12],20,-1926607734),n=Gh(n,r,i,a,e[o+5],4,-378558),a=Gh(a,n,r,i,e[o+8],11,-2022574463),i=Gh(i,a,n,r,e[o+11],16,1839030562),r=Gh(r,i,a,n,e[o+14],23,-35309556),n=Gh(n,r,i,a,e[o+1],4,-1530992060),a=Gh(a,n,r,i,e[o+4],11,1272893353),i=Gh(i,a,n,r,e[o+7],16,-155497632),r=Gh(r,i,a,n,e[o+10],23,-1094730640),n=Gh(n,r,i,a,e[o+13],4,681279174),a=Gh(a,n,r,i,e[o],11,-358537222),i=Gh(i,a,n,r,e[o+3],16,-722521979),r=Gh(r,i,a,n,e[o+6],23,76029189),n=Gh(n,r,i,a,e[o+9],4,-640364487),a=Gh(a,n,r,i,e[o+12],11,-421815835),i=Gh(i,a,n,r,e[o+15],16,530742520),r=Gh(r,i,a,n,e[o+2],23,-995338651),n=Kh(n,r,i,a,e[o],6,-198630844),a=Kh(a,n,r,i,e[o+7],10,1126891415),i=Kh(i,a,n,r,e[o+14],15,-1416354905),r=Kh(r,i,a,n,e[o+5],21,-57434055),n=Kh(n,r,i,a,e[o+12],6,1700485571),a=Kh(a,n,r,i,e[o+3],10,-1894986606),i=Kh(i,a,n,r,e[o+10],15,-1051523),r=Kh(r,i,a,n,e[o+1],21,-2054922799),n=Kh(n,r,i,a,e[o+8],6,1873313359),a=Kh(a,n,r,i,e[o+15],10,-30611744),i=Kh(i,a,n,r,e[o+6],15,-1560198380),r=Kh(r,i,a,n,e[o+13],21,1309151649),n=Kh(n,r,i,a,e[o+4],6,-145523070),a=Kh(a,n,r,i,e[o+11],10,-1120210379),i=Kh(i,a,n,r,e[o+2],15,718787259),r=Kh(r,i,a,n,e[o+9],21,-343485551),n=Vh(n,s),r=Vh(r,c),i=Vh(i,l),a=Vh(a,u)}return[n,r,i,a]}function eae(e){if(e.length===0)return[];for(var t=e.length*8,n=new Uint32Array(Bh(t)),r=0;r<t;r+=8)n[r>>5]|=(e[r/8]&255)<<r%32;return n}function Vh(e,t){var n=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(n>>16)<<16|n&65535}function tae(e,t){return e<<t|e>>>32-t}function Hh(e,t,n,r,i,a){return Vh(tae(Vh(Vh(t,e),Vh(r,a)),i),n)}function Uh(e,t,n,r,i,a,o){return Hh(t&n|~t&r,e,t,i,a,o)}function Wh(e,t,n,r,i,a,o){return Hh(t&r|n&~r,e,t,i,a,o)}function Gh(e,t,n,r,i,a,o){return Hh(t^n^r,e,t,i,a,o)}function Kh(e,t,n,r,i,a,o){return Hh(n^(t|~r),e,t,i,a,o)}zh(`v3`,48,Zie);function qh(e,t,n){e=e||{};var r=e.random||(e.rng||Gie)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Rh(r)}function nae(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function Jh(e,t){return e<<t|e>>>32-t}function rae(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e==`string`){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,o=Math.ceil(a/16),s=Array(o),c=0;c<o;++c){for(var l=/* @__PURE__ */ new Uint32Array(16),u=0;u<16;++u)l[u]=e[c*64+u*4]<<24|e[c*64+u*4+1]<<16|e[c*64+u*4+2]<<8|e[c*64+u*4+3];s[c]=l}s[o-1][14]=(e.length-1)*8/2**32,s[o-1][14]=Math.floor(s[o-1][14]),s[o-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<o;++d){for(var f=/* @__PURE__ */ new Uint32Array(80),p=0;p<16;++p)f[p]=s[d][p];for(var m=16;m<80;++m)f[m]=Jh(f[m-3]^f[m-8]^f[m-14]^f[m-16],1);for(var h=n[0],g=n[1],_=n[2],v=n[3],y=n[4],b=0;b<80;++b){var ee=Math.floor(b/20),x=Jh(h,5)+nae(ee,g,_,v)+y+t[ee]+f[b]>>>0;y=v,v=_,_=Jh(g,30)>>>0,g=h,h=x}n[0]=n[0]+h>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+_>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,n[0]&255,n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,n[1]&255,n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,n[2]&255,n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,n[3]&255,n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,n[4]&255]}zh(`v5`,80,rae);var iae=class{constructor(){}createId(e=!1){let t=qh();return e&&Fd.debug(`UUID.createID ${t}`),t}createRemoteId(){return J(this,arguments,void 0,function*(e=!1){let t=qh();return e&&Fd.debug(`UUID.createRemoteID ${t}`),t})}};let Yh=N.createInterface(e=>e.singleton(iae)),Xh=1e3,aae=e=>T`<div class="inactivity-overlay" style="display:${e=>e.isVisible?`display`:`none`}"><${e}-card class="dialog-card"><div class="card-body"><div class="dialog-header"><${e}-icon name="warning" class="warning-icon"></${e}-icon><h2>Session Timeout Warning</h2></div><div class="dialog-content"><p>
227
227
  You have been inactive for too long. You will be automatically logged out in <strong>${e=>e.remainingSeconds}</strong>
228
228
  seconds.
229
229
  </p><p>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-rapid-cdn",
3
3
  "description": "Side-effecting CDN bundle that auto-registers the Rapid Design System. Intended for AI/prototyping tools (e.g. Claude Artifacts), not for production apps.",
4
- "version": "15.110.3",
4
+ "version": "15.110.4",
5
5
  "sideEffects": true,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "unpkg": "dist/foundation-rapid-cdn.iife.min.js",
@@ -24,11 +24,11 @@
24
24
  "@babel/generator": "^7.29.0",
25
25
  "@babel/parser": "^7.29.0",
26
26
  "@babel/traverse": "^7.29.0",
27
- "@genesislcap/genx": "15.110.3",
27
+ "@genesislcap/genx": "15.110.4",
28
28
  "rolldown": "~1.2.9"
29
29
  },
30
30
  "dependencies": {
31
- "@genesislcap/rapid-design-system": "15.110.3"
31
+ "@genesislcap/rapid-design-system": "15.110.4"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",