com.wallstop-studios.unity-helpers
Version:
Treasure chest of Unity developer tools
14 lines • 114 kB
JavaScript
"use strict";(()=>{var Zi=Object.create;var _r=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ta=Object.getOwnPropertyNames,Bt=Object.getOwnPropertySymbols,ra=Object.getPrototypeOf,Ar=Object.prototype.hasOwnProperty,bo=Object.prototype.propertyIsEnumerable;var ho=(e,t,r)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,P=(e,t)=>{for(var r in t||(t={}))Ar.call(t,r)&&ho(e,r,t[r]);if(Bt)for(var r of Bt(t))bo.call(t,r)&&ho(e,r,t[r]);return e};var vo=(e,t)=>{var r={};for(var o in e)Ar.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&Bt)for(var o of Bt(e))t.indexOf(o)<0&&bo.call(e,o)&&(r[o]=e[o]);return r};var Cr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var oa=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ta(t))!Ar.call(e,n)&&n!==r&&_r(e,n,{get:()=>t[n],enumerable:!(o=ea(t,n))||o.enumerable});return e};var $t=(e,t,r)=>(r=e!=null?Zi(ra(e)):{},oa(t||!e||!e.__esModule?_r(r,"default",{value:e,enumerable:!0}):r,e));var go=(e,t,r)=>new Promise((o,n)=>{var i=c=>{try{a(r.next(c))}catch(p){n(p)}},s=c=>{try{a(r.throw(c))}catch(p){n(p)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(i,s);a((r=r.apply(e,t)).next())});var xo=Cr((kr,yo)=>{(function(e,t){typeof kr=="object"&&typeof yo!="undefined"?t():typeof define=="function"&&define.amd?define(t):t()})(kr,(function(){"use strict";function e(r){var o=!0,n=!1,i=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function a(k){return!!(k&&k!==document&&k.nodeName!=="HTML"&&k.nodeName!=="BODY"&&"classList"in k&&"contains"in k.classList)}function c(k){var ut=k.type,je=k.tagName;return!!(je==="INPUT"&&s[ut]&&!k.readOnly||je==="TEXTAREA"&&!k.readOnly||k.isContentEditable)}function p(k){k.classList.contains("focus-visible")||(k.classList.add("focus-visible"),k.setAttribute("data-focus-visible-added",""))}function l(k){k.hasAttribute("data-focus-visible-added")&&(k.classList.remove("focus-visible"),k.removeAttribute("data-focus-visible-added"))}function f(k){k.metaKey||k.altKey||k.ctrlKey||(a(r.activeElement)&&p(r.activeElement),o=!0)}function u(k){o=!1}function d(k){a(k.target)&&(o||c(k.target))&&p(k.target)}function v(k){a(k.target)&&(k.target.classList.contains("focus-visible")||k.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(i),i=window.setTimeout(function(){n=!1},100),l(k.target))}function S(k){document.visibilityState==="hidden"&&(n&&(o=!0),X())}function X(){document.addEventListener("mousemove",ee),document.addEventListener("mousedown",ee),document.addEventListener("mouseup",ee),document.addEventListener("pointermove",ee),document.addEventListener("pointerdown",ee),document.addEventListener("pointerup",ee),document.addEventListener("touchmove",ee),document.addEventListener("touchstart",ee),document.addEventListener("touchend",ee)}function re(){document.removeEventListener("mousemove",ee),document.removeEventListener("mousedown",ee),document.removeEventListener("mouseup",ee),document.removeEventListener("pointermove",ee),document.removeEventListener("pointerdown",ee),document.removeEventListener("pointerup",ee),document.removeEventListener("touchmove",ee),document.removeEventListener("touchstart",ee),document.removeEventListener("touchend",ee)}function ee(k){k.target.nodeName&&k.target.nodeName.toLowerCase()==="html"||(o=!1,re())}document.addEventListener("keydown",f,!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",S,!0),X(),r.addEventListener("focus",d,!0),r.addEventListener("blur",v,!0),r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&r.host?r.host.setAttribute("data-js-focus-visible",""):r.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if(typeof window!="undefined"&&typeof document!="undefined"){window.applyFocusVisiblePolyfill=e;var t;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(r){t=document.createEvent("CustomEvent"),t.initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}typeof document!="undefined"&&e(document)}))});var ro=Cr((jy,Rn)=>{"use strict";/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/var qa=/["'&<>]/;Rn.exports=Ka;function Ka(e){var t=""+e,r=qa.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}s!==i&&(n+=t.substring(s,i)),s=i+1,n+=o}return s!==i?n+t.substring(s,i):n}});var ao=Cr((Nt,io)=>{/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/(function(t,r){typeof Nt=="object"&&typeof io=="object"?io.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Nt=="object"?Nt.ClipboardJS=r():t.ClipboardJS=r()})(Nt,function(){return(function(){var e={686:(function(o,n,i){"use strict";i.d(n,{default:function(){return Xi}});var s=i(279),a=i.n(s),c=i(370),p=i.n(c),l=i(817),f=i.n(l);function u(q){try{return document.execCommand(q)}catch(C){return!1}}var d=function(C){var _=f()(C);return u("cut"),_},v=d;function S(q){var C=document.documentElement.getAttribute("dir")==="rtl",_=document.createElement("textarea");_.style.fontSize="12pt",_.style.border="0",_.style.padding="0",_.style.margin="0",_.style.position="absolute",_.style[C?"right":"left"]="-9999px";var D=window.pageYOffset||document.documentElement.scrollTop;return _.style.top="".concat(D,"px"),_.setAttribute("readonly",""),_.value=q,_}var X=function(C,_){var D=S(C);_.container.appendChild(D);var N=f()(D);return u("copy"),D.remove(),N},re=function(C){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},D="";return typeof C=="string"?D=X(C,_):C instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(C==null?void 0:C.type)?D=X(C.value,_):(D=f()(C),u("copy")),D},ee=re;function k(q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(_){return typeof _}:k=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},k(q)}var ut=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=C.action,D=_===void 0?"copy":_,N=C.container,G=C.target,We=C.text;if(D!=="copy"&&D!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(G!==void 0)if(G&&k(G)==="object"&&G.nodeType===1){if(D==="copy"&&G.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(D==="cut"&&(G.hasAttribute("readonly")||G.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(We)return ee(We,{container:N});if(G)return D==="cut"?v(G):ee(G,{container:N})},je=ut;function R(q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(_){return typeof _}:R=function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},R(q)}function se(q,C){if(!(q instanceof C))throw new TypeError("Cannot call a class as a function")}function ce(q,C){for(var _=0;_<C.length;_++){var D=C[_];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(q,D.key,D)}}function he(q,C,_){return C&&ce(q.prototype,C),_&&ce(q,_),q}function Se(q,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");q.prototype=Object.create(C&&C.prototype,{constructor:{value:q,writable:!0,configurable:!0}}),C&&Ue(q,C)}function Ue(q,C){return Ue=Object.setPrototypeOf||function(D,N){return D.__proto__=N,D},Ue(q,C)}function Qi(q){var C=Gi();return function(){var D=Qt(q),N;if(C){var G=Qt(this).constructor;N=Reflect.construct(D,arguments,G)}else N=D.apply(this,arguments);return Yi(this,N)}}function Yi(q,C){return C&&(R(C)==="object"||typeof C=="function")?C:Bi(q)}function Bi(q){if(q===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return q}function Gi(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(q){return!1}}function Qt(q){return Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)},Qt(q)}function Mr(q,C){var _="data-clipboard-".concat(q);if(C.hasAttribute(_))return C.getAttribute(_)}var Ji=(function(q){Se(_,q);var C=Qi(_);function _(D,N){var G;return se(this,_),G=C.call(this),G.resolveOptions(N),G.listenClick(D),G}return he(_,[{key:"resolveOptions",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof N.action=="function"?N.action:this.defaultAction,this.target=typeof N.target=="function"?N.target:this.defaultTarget,this.text=typeof N.text=="function"?N.text:this.defaultText,this.container=R(N.container)==="object"?N.container:document.body}},{key:"listenClick",value:function(N){var G=this;this.listener=p()(N,"click",function(We){return G.onClick(We)})}},{key:"onClick",value:function(N){var G=N.delegateTarget||N.currentTarget,We=this.action(G)||"copy",Yt=je({action:We,container:this.container,target:this.target(G),text:this.text(G)});this.emit(Yt?"success":"error",{action:We,text:Yt,trigger:G,clearSelection:function(){G&&G.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(N){return Mr("action",N)}},{key:"defaultTarget",value:function(N){var G=Mr("target",N);if(G)return document.querySelector(G)}},{key:"defaultText",value:function(N){return Mr("text",N)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return ee(N,G)}},{key:"cut",value:function(N){return v(N)}},{key:"isSupported",value:function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],G=typeof N=="string"?[N]:N,We=!!document.queryCommandSupported;return G.forEach(function(Yt){We=We&&!!document.queryCommandSupported(Yt)}),We}}]),_})(a()),Xi=Ji}),828:(function(o){var n=9;if(typeof Element!="undefined"&&!Element.prototype.matches){var i=Element.prototype;i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector}function s(a,c){for(;a&&a.nodeType!==n;){if(typeof a.matches=="function"&&a.matches(c))return a;a=a.parentNode}}o.exports=s}),438:(function(o,n,i){var s=i(828);function a(l,f,u,d,v){var S=p.apply(this,arguments);return l.addEventListener(u,S,v),{destroy:function(){l.removeEventListener(u,S,v)}}}function c(l,f,u,d,v){return typeof l.addEventListener=="function"?a.apply(null,arguments):typeof u=="function"?a.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(S){return a(S,f,u,d,v)}))}function p(l,f,u,d){return function(v){v.delegateTarget=s(v.target,f),v.delegateTarget&&d.call(l,v)}}o.exports=c}),879:(function(o,n){n.node=function(i){return i!==void 0&&i instanceof HTMLElement&&i.nodeType===1},n.nodeList=function(i){var s=Object.prototype.toString.call(i);return i!==void 0&&(s==="[object NodeList]"||s==="[object HTMLCollection]")&&"length"in i&&(i.length===0||n.node(i[0]))},n.string=function(i){return typeof i=="string"||i instanceof String},n.fn=function(i){var s=Object.prototype.toString.call(i);return s==="[object Function]"}}),370:(function(o,n,i){var s=i(879),a=i(438);function c(u,d,v){if(!u&&!d&&!v)throw new Error("Missing required arguments");if(!s.string(d))throw new TypeError("Second argument must be a String");if(!s.fn(v))throw new TypeError("Third argument must be a Function");if(s.node(u))return p(u,d,v);if(s.nodeList(u))return l(u,d,v);if(s.string(u))return f(u,d,v);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(u,d,v){return u.addEventListener(d,v),{destroy:function(){u.removeEventListener(d,v)}}}function l(u,d,v){return Array.prototype.forEach.call(u,function(S){S.addEventListener(d,v)}),{destroy:function(){Array.prototype.forEach.call(u,function(S){S.removeEventListener(d,v)})}}}function f(u,d,v){return a(document.body,u,d,v)}o.exports=c}),817:(function(o){function n(i){var s;if(i.nodeName==="SELECT")i.focus(),s=i.value;else if(i.nodeName==="INPUT"||i.nodeName==="TEXTAREA"){var a=i.hasAttribute("readonly");a||i.setAttribute("readonly",""),i.select(),i.setSelectionRange(0,i.value.length),a||i.removeAttribute("readonly"),s=i.value}else{i.hasAttribute("contenteditable")&&i.focus();var c=window.getSelection(),p=document.createRange();p.selectNodeContents(i),c.removeAllRanges(),c.addRange(p),s=c.toString()}return s}o.exports=n}),279:(function(o){function n(){}n.prototype={on:function(i,s,a){var c=this.e||(this.e={});return(c[i]||(c[i]=[])).push({fn:s,ctx:a}),this},once:function(i,s,a){var c=this;function p(){c.off(i,p),s.apply(a,arguments)}return p._=s,this.on(i,p,a)},emit:function(i){var s=[].slice.call(arguments,1),a=((this.e||(this.e={}))[i]||[]).slice(),c=0,p=a.length;for(c;c<p;c++)a[c].fn.apply(a[c].ctx,s);return this},off:function(i,s){var a=this.e||(this.e={}),c=a[i],p=[];if(c&&s)for(var l=0,f=c.length;l<f;l++)c[l].fn!==s&&c[l].fn._!==s&&p.push(c[l]);return p.length?a[i]=p:delete a[i],this}},o.exports=n,o.exports.TinyEmitter=n})},t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}return(function(){r.n=function(o){var n=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(n,{a:n}),n}})(),(function(){r.d=function(o,n){for(var i in n)r.o(n,i)&&!r.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:n[i]})}})(),(function(){r.o=function(o,n){return Object.prototype.hasOwnProperty.call(o,n)}})(),r(686)})().default})});var ZM=$t(xo());var Hr=function(e,t){return Hr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[n]=o[n])},Hr(e,t)};function ie(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Hr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Eo(e,t,r,o){function n(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(l){try{p(o.next(l))}catch(f){s(f)}}function c(l){try{p(o.throw(l))}catch(f){s(f)}}function p(l){l.done?i(l.value):n(l.value).then(a,c)}p((o=o.apply(e,t||[])).next())})}function Gt(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,n,i,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(p){return function(l){return c([p,l])}}function c(p){if(o)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(r=0)),r;)try{if(o=1,n&&(i=p[0]&2?n.return:p[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,p[1])).done)return i;switch(n=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,n=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(l){p=[6,l],n=0}finally{o=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}function Oe(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function K(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,i=[],s;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(a){s={error:a}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i}function B(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}function dt(e){return this instanceof dt?(this.v=e,this):new dt(e)}function wo(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(e,t||[]),n,i=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),n[Symbol.asyncIterator]=function(){return this},n;function s(d){return function(v){return Promise.resolve(v).then(d,f)}}function a(d,v){o[d]&&(n[d]=function(S){return new Promise(function(X,re){i.push([d,S,X,re])>1||c(d,S)})},v&&(n[d]=v(n[d])))}function c(d,v){try{p(o[d](v))}catch(S){u(i[0][3],S)}}function p(d){d.value instanceof dt?Promise.resolve(d.value.v).then(l,f):u(i[0][2],d)}function l(d){c("next",d)}function f(d){c("throw",d)}function u(d,v){d(v),i.shift(),i.length&&c(i[0][0],i[0][1])}}function To(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Oe=="function"?Oe(e):e[Symbol.iterator](),r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r);function o(i){r[i]=e[i]&&function(s){return new Promise(function(a,c){s=e[i](s),n(a,c,s.done,s.value)})}}function n(i,s,a,c){Promise.resolve(c).then(function(p){i({value:p,done:a})},s)}}function I(e){return typeof e=="function"}function yt(e){var t=function(o){Error.call(o),o.stack=new Error().stack},r=e(t);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Jt=yt(function(e){return function(r){e(this),this.message=r?r.length+` errors occurred during unsubscription:
`+r.map(function(o,n){return n+1+") "+o.toString()}).join(`
`):"",this.name="UnsubscriptionError",this.errors=r}});function Ze(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var qe=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,r,o,n,i;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var a=Oe(s),c=a.next();!c.done;c=a.next()){var p=c.value;p.remove(this)}}catch(S){t={error:S}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}else s.remove(this);var l=this.initialTeardown;if(I(l))try{l()}catch(S){i=S instanceof Jt?S.errors:[S]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var u=Oe(f),d=u.next();!d.done;d=u.next()){var v=d.value;try{So(v)}catch(S){i=i!=null?i:[],S instanceof Jt?i=B(B([],K(i)),K(S.errors)):i.push(S)}}}catch(S){o={error:S}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}}if(i)throw new Jt(i)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)So(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(t)}},e.prototype._hasParent=function(t){var r=this._parentage;return r===t||Array.isArray(r)&&r.includes(t)},e.prototype._addParent=function(t){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(t),r):r?[r,t]:t},e.prototype._removeParent=function(t){var r=this._parentage;r===t?this._parentage=null:Array.isArray(r)&&Ze(r,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&Ze(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})();var $r=qe.EMPTY;function Xt(e){return e instanceof qe||e&&"closed"in e&&I(e.remove)&&I(e.add)&&I(e.unsubscribe)}function So(e){I(e)?e():e.unsubscribe()}var De={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var xt={setTimeout:function(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var n=xt.delegate;return n!=null&&n.setTimeout?n.setTimeout.apply(n,B([e,t],K(r))):setTimeout.apply(void 0,B([e,t],K(r)))},clearTimeout:function(e){var t=xt.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function Zt(e){xt.setTimeout(function(){var t=De.onUnhandledError;if(t)t(e);else throw e})}function ge(){}var Oo=(function(){return Pr("C",void 0,void 0)})();function Lo(e){return Pr("E",void 0,e)}function Mo(e){return Pr("N",e,void 0)}function Pr(e,t,r){return{kind:e,value:t,error:r}}var ht=null;function Et(e){if(De.useDeprecatedSynchronousErrorHandling){var t=!ht;if(t&&(ht={errorThrown:!1,error:null}),e(),t){var r=ht,o=r.errorThrown,n=r.error;if(ht=null,o)throw n}}else e()}function _o(e){De.useDeprecatedSynchronousErrorHandling&&ht&&(ht.errorThrown=!0,ht.error=e)}var Pt=(function(e){ie(t,e);function t(r){var o=e.call(this)||this;return o.isStopped=!1,r?(o.destination=r,Xt(r)&&r.add(o)):o.destination=sa,o}return t.create=function(r,o,n){return new bt(r,o,n)},t.prototype.next=function(r){this.isStopped?Ir(Mo(r),this):this._next(r)},t.prototype.error=function(r){this.isStopped?Ir(Lo(r),this):(this.isStopped=!0,this._error(r))},t.prototype.complete=function(){this.isStopped?Ir(Oo,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(r){this.destination.next(r)},t.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(qe);var na=Function.prototype.bind;function Rr(e,t){return na.call(e,t)}var ia=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var r=this.partialObserver;if(r.next)try{r.next(t)}catch(o){er(o)}},e.prototype.error=function(t){var r=this.partialObserver;if(r.error)try{r.error(t)}catch(o){er(o)}else er(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(r){er(r)}},e})(),bt=(function(e){ie(t,e);function t(r,o,n){var i=e.call(this)||this,s;if(I(r)||!r)s={next:r!=null?r:void 0,error:o!=null?o:void 0,complete:n!=null?n:void 0};else{var a;i&&De.useDeprecatedNextContext?(a=Object.create(r),a.unsubscribe=function(){return i.unsubscribe()},s={next:r.next&&Rr(r.next,a),error:r.error&&Rr(r.error,a),complete:r.complete&&Rr(r.complete,a)}):s=r}return i.destination=new ia(s),i}return t})(Pt);function er(e){De.useDeprecatedSynchronousErrorHandling?_o(e):Zt(e)}function aa(e){throw e}function Ir(e,t){var r=De.onStoppedNotification;r&&xt.setTimeout(function(){return r(e,t)})}var sa={closed:!0,next:ge,error:aa,complete:ge};var wt=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function be(e){return e}function Ao(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Fr(e)}function Fr(e){return e.length===0?be:e.length===1?e[0]:function(r){return e.reduce(function(o,n){return n(o)},r)}}var F=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(t,r,o){var n=this,i=pa(t)?t:new bt(t,r,o);return Et(function(){var s=n,a=s.operator,c=s.source;i.add(a?a.call(i,c):c?n._subscribe(i):n._trySubscribe(i))}),i},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(r){t.error(r)}},e.prototype.forEach=function(t,r){var o=this;return r=Co(r),new r(function(n,i){var s=new bt({next:function(a){try{t(a)}catch(c){i(c),s.unsubscribe()}},error:i,complete:n});o.subscribe(s)})},e.prototype._subscribe=function(t){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(t)},e.prototype[wt]=function(){return this},e.prototype.pipe=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Fr(t)(this)},e.prototype.toPromise=function(t){var r=this;return t=Co(t),new t(function(o,n){var i;r.subscribe(function(s){return i=s},function(s){return n(s)},function(){return o(i)})})},e.create=function(t){return new e(t)},e})();function Co(e){var t;return(t=e!=null?e:De.Promise)!==null&&t!==void 0?t:Promise}function ca(e){return e&&I(e.next)&&I(e.error)&&I(e.complete)}function pa(e){return e&&e instanceof Pt||ca(e)&&Xt(e)}function la(e){return I(e==null?void 0:e.lift)}function E(e){return function(t){if(la(t))return t.lift(function(r){try{return e(r,this)}catch(o){this.error(o)}});throw new TypeError("Unable to lift unknown Observable type")}}function w(e,t,r,o,n){return new ma(e,t,r,o,n)}var ma=(function(e){ie(t,e);function t(r,o,n,i,s,a){var c=e.call(this,r)||this;return c.onFinalize=s,c.shouldUnsubscribe=a,c._next=o?function(p){try{o(p)}catch(l){r.error(l)}}:e.prototype._next,c._error=i?function(p){try{i(p)}catch(l){r.error(l)}finally{this.unsubscribe()}}:e.prototype._error,c._complete=n?function(){try{n()}catch(p){r.error(p)}finally{this.unsubscribe()}}:e.prototype._complete,c}return t.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var o=this.closed;e.prototype.unsubscribe.call(this),!o&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},t})(Pt);var Tt={schedule:function(e){var t=requestAnimationFrame,r=cancelAnimationFrame,o=Tt.delegate;o&&(t=o.requestAnimationFrame,r=o.cancelAnimationFrame);var n=t(function(i){r=void 0,e(i)});return new qe(function(){return r==null?void 0:r(n)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Tt.delegate;return((r==null?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,B([],K(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Tt.delegate;return((r==null?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,B([],K(e)))},delegate:void 0};var ko=yt(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}});var T=(function(e){ie(t,e);function t(){var r=e.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return t.prototype.lift=function(r){var o=new Ho(this,this);return o.operator=r,o},t.prototype._throwIfClosed=function(){if(this.closed)throw new ko},t.prototype.next=function(r){var o=this;Et(function(){var n,i;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var s=Oe(o.currentObservers),a=s.next();!a.done;a=s.next()){var c=a.value;c.next(r)}}catch(p){n={error:p}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}}})},t.prototype.error=function(r){var o=this;Et(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=r;for(var n=o.observers;n.length;)n.shift().error(r)}})},t.prototype.complete=function(){var r=this;Et(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var o=r.observers;o.length;)o.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(r){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,r)},t.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},t.prototype._innerSubscribe=function(r){var o=this,n=this,i=n.hasError,s=n.isStopped,a=n.observers;return i||s?$r:(this.currentObservers=null,a.push(r),new qe(function(){o.currentObservers=null,Ze(a,r)}))},t.prototype._checkFinalizedStatuses=function(r){var o=this,n=o.hasError,i=o.thrownError,s=o.isStopped;n?r.error(i):s&&r.complete()},t.prototype.asObservable=function(){var r=new F;return r.source=this,r},t.create=function(r,o){return new Ho(r,o)},t})(F);var Ho=(function(e){ie(t,e);function t(r,o){var n=e.call(this)||this;return n.destination=r,n.source=o,n}return t.prototype.next=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.next)===null||n===void 0||n.call(o,r)},t.prototype.error=function(r){var o,n;(n=(o=this.destination)===null||o===void 0?void 0:o.error)===null||n===void 0||n.call(o,r)},t.prototype.complete=function(){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||o===void 0||o.call(r)},t.prototype._subscribe=function(r){var o,n;return(n=(o=this.source)===null||o===void 0?void 0:o.subscribe(r))!==null&&n!==void 0?n:$r},t})(T);var jr=(function(e){ie(t,e);function t(r){var o=e.call(this)||this;return o._value=r,o}return Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(r){var o=e.prototype._subscribe.call(this,r);return!o.closed&&r.next(this._value),o},t.prototype.getValue=function(){var r=this,o=r.hasError,n=r.thrownError,i=r._value;if(o)throw n;return this._throwIfClosed(),i},t.prototype.next=function(r){e.prototype.next.call(this,this._value=r)},t})(T);var Rt={now:function(){return(Rt.delegate||Date).now()},delegate:void 0};var It=(function(e){ie(t,e);function t(r,o,n){r===void 0&&(r=1/0),o===void 0&&(o=1/0),n===void 0&&(n=Rt);var i=e.call(this)||this;return i._bufferSize=r,i._windowTime=o,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=o===1/0,i._bufferSize=Math.max(1,r),i._windowTime=Math.max(1,o),i}return t.prototype.next=function(r){var o=this,n=o.isStopped,i=o._buffer,s=o._infiniteTimeWindow,a=o._timestampProvider,c=o._windowTime;n||(i.push(r),!s&&i.push(a.now()+c)),this._trimBuffer(),e.prototype.next.call(this,r)},t.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(r),n=this,i=n._infiniteTimeWindow,s=n._buffer,a=s.slice(),c=0;c<a.length&&!r.closed;c+=i?1:2)r.next(a[c]);return this._checkFinalizedStatuses(r),o},t.prototype._trimBuffer=function(){var r=this,o=r._bufferSize,n=r._timestampProvider,i=r._buffer,s=r._infiniteTimeWindow,a=(s?1:2)*o;if(o<1/0&&a<i.length&&i.splice(0,i.length-a),!s){for(var c=n.now(),p=0,l=1;l<i.length&&i[l]<=c;l+=2)p=l;p&&i.splice(0,p+1)}},t})(T);var $o=(function(e){ie(t,e);function t(r,o){return e.call(this)||this}return t.prototype.schedule=function(r,o){return o===void 0&&(o=0),this},t})(qe);var Ft={setInterval:function(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var n=Ft.delegate;return n!=null&&n.setInterval?n.setInterval.apply(n,B([e,t],K(r))):setInterval.apply(void 0,B([e,t],K(r)))},clearInterval:function(e){var t=Ft.delegate;return((t==null?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0};var St=(function(e){ie(t,e);function t(r,o){var n=e.call(this,r,o)||this;return n.scheduler=r,n.work=o,n.pending=!1,n}return t.prototype.schedule=function(r,o){var n;if(o===void 0&&(o=0),this.closed)return this;this.state=r;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,o)),this.pending=!0,this.delay=o,this.id=(n=this.id)!==null&&n!==void 0?n:this.requestAsyncId(s,this.id,o),this},t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),Ft.setInterval(r.flush.bind(r,this),n)},t.prototype.recycleAsyncId=function(r,o,n){if(n===void 0&&(n=0),n!=null&&this.delay===n&&this.pending===!1)return o;o!=null&&Ft.clearInterval(o)},t.prototype.execute=function(r,o){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(r,o);if(n)return n;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,o){var n=!1,i;try{this.work(r)}catch(s){n=!0,i=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),i},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,o=r.id,n=r.scheduler,i=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ze(i,this),o!=null&&(this.id=this.recycleAsyncId(n,o,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t})($o);var Ur=(function(){function e(t,r){r===void 0&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(t,r,o){return r===void 0&&(r=0),new this.schedulerActionCtor(this,t).schedule(o,r)},e.now=Rt.now,e})();var Ot=(function(e){ie(t,e);function t(r,o){o===void 0&&(o=Ur.now);var n=e.call(this,r,o)||this;return n.actions=[],n._active=!1,n}return t.prototype.flush=function(r){var o=this.actions;if(this._active){o.push(r);return}var n;this._active=!0;do if(n=r.execute(r.state,r.delay))break;while(r=o.shift());if(this._active=!1,n){for(;r=o.shift();)r.unsubscribe();throw n}},t})(Ur);var pe=new Ot(St),Wr=pe;var Po=(function(e){ie(t,e);function t(r,o){var n=e.call(this,r,o)||this;return n.scheduler=r,n.work=o,n}return t.prototype.schedule=function(r,o){return o===void 0&&(o=0),o>0?e.prototype.schedule.call(this,r,o):(this.delay=o,this.state=r,this.scheduler.flush(this),this)},t.prototype.execute=function(r,o){return o>0||this.closed?e.prototype.execute.call(this,r,o):this._execute(r,o)},t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!=null&&n>0||n==null&&this.delay>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.flush(this),0)},t})(St);var Ro=(function(e){ie(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(Ot);var Dr=new Ro(Po);var Io=(function(e){ie(t,e);function t(r,o){var n=e.call(this,r,o)||this;return n.scheduler=r,n.work=o,n}return t.prototype.requestAsyncId=function(r,o,n){return n===void 0&&(n=0),n!==null&&n>0?e.prototype.requestAsyncId.call(this,r,o,n):(r.actions.push(this),r._scheduled||(r._scheduled=Tt.requestAnimationFrame(function(){return r.flush(void 0)})))},t.prototype.recycleAsyncId=function(r,o,n){var i;if(n===void 0&&(n=0),n!=null?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,r,o,n);var s=r.actions;o!=null&&o===r._scheduled&&((i=s[s.length-1])===null||i===void 0?void 0:i.id)!==o&&(Tt.cancelAnimationFrame(o),r._scheduled=void 0)},t})(St);var Fo=(function(e){ie(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.flush=function(r){this._active=!0;var o;r?o=r.id:(o=this._scheduled,this._scheduled=void 0);var n=this.actions,i;r=r||n.shift();do if(i=r.execute(r.state,r.delay))break;while((r=n[0])&&r.id===o&&n.shift());if(this._active=!1,i){for(;(r=n[0])&&r.id===o&&n.shift();)r.unsubscribe();throw i}},t})(Ot);var ye=new Fo(Io);var y=new F(function(e){return e.complete()});function tr(e){return e&&I(e.schedule)}function Vr(e){return e[e.length-1]}function pt(e){return I(Vr(e))?e.pop():void 0}function Fe(e){return tr(Vr(e))?e.pop():void 0}function rr(e,t){return typeof Vr(e)=="number"?e.pop():t}var Lt=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function or(e){return I(e==null?void 0:e.then)}function nr(e){return I(e[wt])}function ir(e){return Symbol.asyncIterator&&I(e==null?void 0:e[Symbol.asyncIterator])}function ar(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function fa(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var sr=fa();function cr(e){return I(e==null?void 0:e[sr])}function pr(e){return wo(this,arguments,function(){var r,o,n,i;return Gt(this,function(s){switch(s.label){case 0:r=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,dt(r.read())];case 3:return o=s.sent(),n=o.value,i=o.done,i?[4,dt(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,dt(n)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function lr(e){return I(e==null?void 0:e.getReader)}function U(e){if(e instanceof F)return e;if(e!=null){if(nr(e))return ua(e);if(Lt(e))return da(e);if(or(e))return ha(e);if(ir(e))return jo(e);if(cr(e))return ba(e);if(lr(e))return va(e)}throw ar(e)}function ua(e){return new F(function(t){var r=e[wt]();if(I(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function da(e){return new F(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function ha(e){return new F(function(t){e.then(function(r){t.closed||(t.next(r),t.complete())},function(r){return t.error(r)}).then(null,Zt)})}function ba(e){return new F(function(t){var r,o;try{for(var n=Oe(e),i=n.next();!i.done;i=n.next()){var s=i.value;if(t.next(s),t.closed)return}}catch(a){r={error:a}}finally{try{i&&!i.done&&(o=n.return)&&o.call(n)}finally{if(r)throw r.error}}t.complete()})}function jo(e){return new F(function(t){ga(e,t).catch(function(r){return t.error(r)})})}function va(e){return jo(pr(e))}function ga(e,t){var r,o,n,i;return Eo(this,void 0,void 0,function(){var s,a;return Gt(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=To(e),c.label=1;case 1:return[4,r.next()];case 2:if(o=c.sent(),!!o.done)return[3,4];if(s=o.value,t.next(s),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),n={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),o&&!o.done&&(i=r.return)?[4,i.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function _e(e,t,r,o,n){o===void 0&&(o=0),n===void 0&&(n=!1);var i=t.schedule(function(){r(),n?e.add(this.schedule(null,o)):this.unsubscribe()},o);if(e.add(i),!n)return i}function xe(e,t){return t===void 0&&(t=0),E(function(r,o){r.subscribe(w(o,function(n){return _e(o,e,function(){return o.next(n)},t)},function(){return _e(o,e,function(){return o.complete()},t)},function(n){return _e(o,e,function(){return o.error(n)},t)}))})}function et(e,t){return t===void 0&&(t=0),E(function(r,o){o.add(e.schedule(function(){return r.subscribe(o)},t))})}function Uo(e,t){return U(e).pipe(et(t),xe(t))}function Wo(e,t){return U(e).pipe(et(t),xe(t))}function Do(e,t){return new F(function(r){var o=0;return t.schedule(function(){o===e.length?r.complete():(r.next(e[o++]),r.closed||this.schedule())})})}function Vo(e,t){return new F(function(r){var o;return _e(r,t,function(){o=e[sr](),_e(r,t,function(){var n,i,s;try{n=o.next(),i=n.value,s=n.done}catch(a){r.error(a);return}s?r.complete():r.next(i)},0,!0)}),function(){return I(o==null?void 0:o.return)&&o.return()}})}function mr(e,t){if(!e)throw new Error("Iterable cannot be null");return new F(function(r){_e(r,t,function(){var o=e[Symbol.asyncIterator]();_e(r,t,function(){o.next().then(function(n){n.done?r.complete():r.next(n.value)})},0,!0)})})}function No(e,t){return mr(pr(e),t)}function zo(e,t){if(e!=null){if(nr(e))return Uo(e,t);if(Lt(e))return Do(e,t);if(or(e))return Wo(e,t);if(ir(e))return mr(e,t);if(cr(e))return Vo(e,t);if(lr(e))return No(e,t)}throw ar(e)}function fe(e,t){return t?zo(e,t):U(e)}function $(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Fe(e);return fe(e,r)}function Nr(e,t){var r=I(e)?e:function(){return e},o=function(n){return n.error(r())};return new F(t?function(n){return t.schedule(o,0,n)}:o)}var fr=yt(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function qo(e){return e instanceof Date&&!isNaN(e)}function m(e,t){return E(function(r,o){var n=0;r.subscribe(w(o,function(i){o.next(e.call(t,i,n++))}))})}var ya=Array.isArray;function xa(e,t){return ya(t)?e.apply(void 0,B([],K(t))):e(t)}function lt(e){return m(function(t){return xa(e,t)})}var Ea=Array.isArray,wa=Object.getPrototypeOf,Ta=Object.prototype,Sa=Object.keys;function Ko(e){if(e.length===1){var t=e[0];if(Ea(t))return{args:t,keys:null};if(Oa(t)){var r=Sa(t);return{args:r.map(function(o){return t[o]}),keys:r}}}return{args:e,keys:null}}function Oa(e){return e&&typeof e=="object"&&wa(e)===Ta}function Qo(e,t){return e.reduce(function(r,o,n){return r[o]=t[n],r},{})}function z(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Fe(e),o=pt(e),n=Ko(e),i=n.args,s=n.keys;if(i.length===0)return fe([],r);var a=new F(zr(i,r,s?function(c){return Qo(s,c)}:be));return o?a.pipe(lt(o)):a}function zr(e,t,r){return r===void 0&&(r=be),function(o){Yo(t,function(){for(var n=e.length,i=new Array(n),s=n,a=n,c=function(l){Yo(t,function(){var f=fe(e[l],t),u=!1;f.subscribe(w(o,function(d){i[l]=d,u||(u=!0,a--),a||o.next(r(i.slice()))},function(){--s||o.complete()}))},o)},p=0;p<n;p++)c(p)},o)}}function Yo(e,t,r){e?_e(r,e,t):t()}function Bo(e,t,r,o,n,i,s,a){var c=[],p=0,l=0,f=!1,u=function(){f&&!c.length&&!p&&t.complete()},d=function(S){return p<o?v(S):c.push(S)},v=function(S){i&&t.next(S),p++;var X=!1;U(r(S,l++)).subscribe(w(t,function(re){n==null||n(re),i?d(re):t.next(re)},function(){X=!0},void 0,function(){if(X)try{p--;for(var re=function(){var ee=c.shift();s?_e(t,s,function(){return v(ee)}):v(ee)};c.length&&p<o;)re();u()}catch(ee){t.error(ee)}}))};return e.subscribe(w(t,d,function(){f=!0,u()})),function(){a==null||a()}}function J(e,t,r){return r===void 0&&(r=1/0),I(t)?J(function(o,n){return m(function(i,s){return t(o,i,n,s)})(U(e(o,n)))},r):(typeof t=="number"&&(r=t),E(function(o,n){return Bo(o,n,e,r)}))}function Mt(e){return e===void 0&&(e=1/0),J(be,e)}function Go(){return Mt(1)}function Ke(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Go()(fe(e,Fe(e)))}function H(e){return new F(function(t){U(e()).subscribe(t)})}var La=["addListener","removeListener"],Ma=["addEventListener","removeEventListener"],_a=["on","off"];function h(e,t,r,o){if(I(r)&&(o=r,r=void 0),o)return h(e,t,r).pipe(lt(o));var n=K(ka(e)?Ma.map(function(a){return function(c){return e[a](t,c,r)}}):Aa(e)?La.map(Jo(e,t)):Ca(e)?_a.map(Jo(e,t)):[],2),i=n[0],s=n[1];if(!i&&Lt(e))return J(function(a){return h(a,t,r)})(U(e));if(!i)throw new TypeError("Invalid event target");return new F(function(a){var c=function(){for(var p=[],l=0;l<arguments.length;l++)p[l]=arguments[l];return a.next(1<p.length?p:p[0])};return i(c),function(){return s(c)}})}function Jo(e,t){return function(r){return function(o){return e[r](t,o)}}}function Aa(e){return I(e.addListener)&&I(e.removeListener)}function Ca(e){return I(e.on)&&I(e.off)}function ka(e){return I(e.addEventListener)&&I(e.removeEventListener)}function ur(e,t,r){return r?ur(e,t).pipe(lt(r)):new F(function(o){var n=function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o.next(s.length===1?s[0]:s)},i=e(n);return I(t)?function(){return t(n,i)}:void 0})}function He(e,t,r){e===void 0&&(e=0),r===void 0&&(r=Wr);var o=-1;return t!=null&&(tr(t)?r=t:o=t),new F(function(n){var i=qo(e)?+e-r.now():e;i<0&&(i=0);var s=0;return r.schedule(function(){n.closed||(n.next(s++),0<=o?this.schedule(void 0,o):n.complete())},i)})}function L(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Fe(e),o=rr(e,1/0),n=e;return n.length?n.length===1?U(n[0]):Mt(o)(fe(n,r)):y}var tt=new F(ge);var Ha=Array.isArray;function dr(e){return e.length===1&&Ha(e[0])?e[0]:e}function g(e,t){return E(function(r,o){var n=0;r.subscribe(w(o,function(i){return e.call(t,i,n++)&&o.next(i)}))})}function rt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pt(e),o=dr(e);return o.length?new F(function(n){var i=o.map(function(){return[]}),s=o.map(function(){return!1});n.add(function(){i=s=null});for(var a=function(p){U(o[p]).subscribe(w(n,function(l){if(i[p].push(l),i.every(function(u){return u.length})){var f=i.map(function(u){return u.shift()});n.next(r?r.apply(void 0,B([],K(f))):f),i.some(function(u,d){return!u.length&&s[d]})&&n.complete()}},function(){s[p]=!0,!i[p].length&&n.complete()}))},c=0;!n.closed&&c<o.length;c++)a(c);return function(){i=s=null}}):y}function Xo(e){return E(function(t,r){var o=!1,n=null,i=null,s=!1,a=function(){if(i==null||i.unsubscribe(),i=null,o){o=!1;var p=n;n=null,r.next(p)}s&&r.complete()},c=function(){i=null,s&&r.complete()};t.subscribe(w(r,function(p){o=!0,n=p,i||U(e(p)).subscribe(i=w(r,a,c))},function(){s=!0,(!o||!i||i.closed)&&r.complete()}))})}function $e(e,t){return t===void 0&&(t=pe),Xo(function(){return He(e,t)})}function ot(e,t){return t===void 0&&(t=null),t=t!=null?t:e,E(function(r,o){var n=[],i=0;r.subscribe(w(o,function(s){var a,c,p,l,f=null;i++%t===0&&n.push([]);try{for(var u=Oe(n),d=u.next();!d.done;d=u.next()){var v=d.value;v.push(s),e<=v.length&&(f=f!=null?f:[],f.push(v))}}catch(re){a={error:re}}finally{try{d&&!d.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}if(f)try{for(var S=Oe(f),X=S.next();!X.done;X=S.next()){var v=X.value;Ze(n,v),o.next(v)}}catch(re){p={error:re}}finally{try{X&&!X.done&&(l=S.return)&&l.call(S)}finally{if(p)throw p.error}}},function(){var s,a;try{for(var c=Oe(n),p=c.next();!p.done;p=c.next()){var l=p.value;o.next(l)}}catch(f){s={error:f}}finally{try{p&&!p.done&&(a=c.return)&&a.call(c)}finally{if(s)throw s.error}}o.complete()},void 0,function(){n=null}))})}function ve(e){return E(function(t,r){var o=null,n=!1,i;o=t.subscribe(w(r,void 0,void 0,function(s){i=U(e(s,ve(e)(t))),o?(o.unsubscribe(),o=null,i.subscribe(r)):n=!0})),n&&(o.unsubscribe(),o=null,i.subscribe(r))})}function Zo(e,t,r,o,n){return function(i,s){var a=r,c=t,p=0;i.subscribe(w(s,function(l){var f=p++;c=a?e(c,l,f):(a=!0,l),o&&s.next(c)},n&&(function(){a&&s.next(c),s.complete()})))}}function qr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=pt(e);return r?Ao(qr.apply(void 0,B([],K(e))),lt(r)):E(function(o,n){zr(B([o],K(dr(e))))(n)})}function Pe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return qr.apply(void 0,B([],K(e)))}function jt(e){return E(function(t,r){var o=!1,n=null,i=null,s=function(){if(i==null||i.unsubscribe(),i=null,o){o=!1;var a=n;n=null,r.next(a)}};t.subscribe(w(r,function(a){i==null||i.unsubscribe(),o=!0,n=a,i=w(r,s,ge),U(e(a)).subscribe(i)},function(){s(),r.complete()},void 0,function(){n=i=null}))})}function Ae(e,t){return t===void 0&&(t=pe),E(function(r,o){var n=null,i=null,s=null,a=function(){if(n){n.unsubscribe(),n=null;var p=i;i=null,o.next(p)}};function c(){var p=s+e,l=t.now();if(l<p){n=this.schedule(void 0,p-l),o.add(n);return}a()}r.subscribe(w(o,function(p){i=p,s=t.now(),n||(n=t.schedule(c,e),o.add(n))},function(){a(),o.complete()},void 0,function(){i=n=null}))})}function Qe(e){return E(function(t,r){var o=!1;t.subscribe(w(r,function(n){o=!0,r.next(n)},function(){o||r.next(e),r.complete()}))})}function Ee(e){return e<=0?function(){return y}:E(function(t,r){var o=0;t.subscribe(w(r,function(n){++o<=e&&(r.next(n),e<=o&&r.complete())}))})}function oe(){return E(function(e,t){e.subscribe(w(t,ge))})}function en(e){return m(function(){return e})}function Kr(e,t){return t?function(r){return Ke(t.pipe(Ee(1),oe()),r.pipe(Kr(e)))}:J(function(r,o){return U(e(r,o)).pipe(Ee(1),en(r))})}function nt(e,t){t===void 0&&(t=pe);var r=He(e,t);return Kr(function(){return r})}function Qr(e,t){return E(function(r,o){var n=new Set;r.subscribe(w(o,function(i){var s=e?e(i):i;n.has(s)||(n.add(s),o.next(i))})),t&&U(t).subscribe(w(o,function(){return n.clear()},ge))})}function Y(e,t){return t===void 0&&(t=be),e=e!=null?e:$a,E(function(r,o){var n,i=!0;r.subscribe(w(o,function(s){var a=t(s);(i||!e(n,a))&&(i=!1,n=a,o.next(s))}))})}function $a(e,t){return e===t}function ne(e,t){return Y(function(r,o){return t?t(r[e],o[e]):r[e]===o[e]})}function tn(e){return e===void 0&&(e=Pa),E(function(t,r){var o=!1;t.subscribe(w(r,function(n){o=!0,r.next(n)},function(){return o?r.complete():r.error(e())}))})}function Pa(){return new fr}function ae(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){return Ke(r,$.apply(void 0,B([],K(e))))}}function hr(e,t){return t?function(r){return r.pipe(hr(function(o,n){return U(e(o,n)).pipe(m(function(i,s){return t(o,i,n,s)}))}))}:E(function(r,o){var n=0,i=null,s=!1;r.subscribe(w(o,function(a){i||(i=w(o,void 0,function(){i=null,s&&o.complete()}),U(e(a,n++)).subscribe(i))},function(){s=!0,!i&&o.complete()}))})}function A(e){return E(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}function Re(e,t){var r=arguments.length>=2;return function(o){return o.pipe(e?g(function(n,i){return e(n,i,o)}):be,Ee(1),r?Qe(t):tn(function(){return new fr}))}}function Yr(e){return e<=0?function(){return y}:E(function(t,r){var o=[];t.subscribe(w(r,function(n){o.push(n),e<o.length&&o.shift()},function(){var n,i;try{for(var s=Oe(o),a=s.next();!a.done;a=s.next()){var c=a.value;r.next(c)}}catch(p){n={error:p}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}r.complete()},void 0,function(){o=null}))})}function rn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Fe(e),o=rr(e,1/0);return E(function(n,i){Mt(o)(fe(B([n],K(e)),r)).subscribe(i)})}function Ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return rn.