blockcore-notes/main.330bfb39a7100241.js

1 line
2.2 MiB
JavaScript
Raw Normal View History

(self.webpackChunkblockcore_notes=self.webpackChunkblockcore_notes||[]).push([[179],{3385:(ne,y,x)=>{"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 m=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 h(i,t){if(i){const e=i.indexOf(t);0<=e&&i.splice(e,1)}}class f{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 o of e)o.remove(this);else e.remove(this);const{initialTeardown:n}=this;if(v(n))try{n()}catch(o){t=o instanceof m?o.errors:[o]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const o of r)try{w(o)}catch(s){t=t??[],s instanceof m?t=[...t,...s.errors]:t.push(s)}}if(t)throw new m(t)}}add(t){var e;if(t&&t!==this)if(this.closed)w(t);else{if(t instanceof f){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)&&h(e,t)}remove(t){const{_finalizers:e}=this;e&&h(e,t),t instanceof f&&t._removeParent(this)}}f.EMPTY=(()=>{const i=new f;return i.closed=!0,i})();const p=f.EMPTY;function g(i){return i instanceof f||i&&"closed"in i&&v(i.remove)&&v(i.add)&&v(i.unsubscribe)}function w(i){v(i)?i():i.unsubscribe()}const C={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},S={setTimeout(i,t,...e){const{delegate:n}=S;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){const{delegate:t}=S;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function A(i){S.setTimeout(()=>{const{onUnhandledError:t}=C;if(!t)throw i;t(i)})}function k(){}const F=O("C",void 0,void 0);function O(i,t,e){return{kind:i,value:t,error:e}}let V=null;function N(i){if(C.useDeprecatedSynchronousErrorHandling){const t=!V;if(t&&(V={errorThrown:!1,error:null}),i(),t){const{errorThrown:e,error:n}=V;if(V=null,e)throw n}}else i()}class W extends f{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,g(t)&&t.add(this)):this.destination=se}static create(t,e,n){return new $(t,e,n)}next(t){this.isStopped?ie(function E(i){return O("N",i,void 0)}(t),this):this._next(t)}error(t){this.isStopped?ie(function j(i){return O("E",void 0,i)}(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?ie(F,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 B=Function.prototype.bind;function I(i,t){return B.call(i,t)}class X{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){G(n)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){G(n)}else G(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){G(e)}}}class $ extends W{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 o;this&&C.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&I(t.next,o),error:t.error&&I(t.error,o),complete:t.complete&&I(t.complete,o)}):r=t}this.destination=new X(r)}}function G(i){C.useDeprecatedSynchronousErrorHandling?function U(i){C.useDeprecatedSynchronousErrorHandling&&V&&