blockcore-notes/main.234b38a048d4e152.js

1 line
2.7 MiB
JavaScript
Raw Normal View History

(self.webpackChunkblockcore_notes=self.webpackChunkblockcore_notes||[]).push([[179],{8611:(oe,w,E)=>{"use strict";function v(i){return"function"==typeof i}function c(i){const e=i(n=>{Error.call(n),n.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const h=c(i=>function(e){i(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e});function d(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class p{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const a of e)a.remove(this);else e.remove(this);const{initialTeardown:n}=this;if(v(n))try{n()}catch(a){t=a instanceof h?a.errors:[a]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const a of r)try{C(a)}catch(o){t=t??[],o instanceof h?t=[...t,...o.errors]:t.push(o)}}if(t)throw new h(t)}}add(t){var e;if(t&&t!==this)if(this.closed)C(t);else{if(t instanceof p){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&d(e,t)}remove(t){const{_finalizers:e}=this;e&&d(e,t),t instanceof p&&t._removeParent(this)}}p.EMPTY=(()=>{const i=new p;return i.closed=!0,i})();const g=p.EMPTY;function F(i){return i instanceof p||i&&"closed"in i&&v(i.remove)&&v(i.add)&&v(i.unsubscribe)}function C(i){v(i)?i():i.unsubscribe()}const M={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},N={setTimeout(i,t,...e){const{delegate:n}=N;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=N;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function V(i){N.setTimeout(()=>{const{onUnhandledError:t}=M;if(!t)throw i;t(i)})}function T(){}const A=W("C",void 0,void 0);function W(i,t,e){return{kind:i,value:t,error:e}}let B=null;function L(i){if(M.useDeprecatedSynchronousErrorHandling){const t=!B;if(t&&(B={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=B;if(B=null,e)throw n}}else i()}class Z extends p{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,F(t)&&t.add(this)):this.destination=ae}static create(t,e,n){return new q(t,e,n)}next(t){this.isStopped?ee(function P(i){return W("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?ee(function j(i){return W("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?ee(A,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const J=Function.prototype.bind;function H(i,t){return J.call(i,t)}class te{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){Q(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){Q(n)}else Q(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){Q(e)}}}class q extends Z{constructor(t,e,n){let r;if(super(),v(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let a;this&&M.useDeprecatedNextContext?(a=Object.create(t),a.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&H(t.next,a),error:t.error&&H(t.error,a),complete:t.complete&&H(t.complete,a)}):r=t}this.destination=new te(r)}}function Q(i){M.useDeprecatedSynchronousErrorHandling?function $(i){M.useDeprecatedSynchronousErrorHandling&&B